Apple Foxconn Labor

February 23, 2012 Leave a comment

Much was commented this week about Apple’s China factories where American’s favorite phone and tablet computers are made.

Being from a developing country myself, I was surprised to see such a big deal made about this “differing” labor practice in such countries when compared to Developed Countries’ practices.

First, because when you compare absolute numbers instead of relative (%), statistics can scare or impress anyone. Take the $1.78 hourly wage and the board figure of $17 a month for example:

$1.78/hr x 40hrs a week x 4 weeks comes to about = $284.8/mo income.

$17 for room for what pretty much looked like my dorm room at University of Tampa, a private university.

$0.70/meal x 90 meals a month = $63/mo for board.

This leaves $204 = 72% of disposable income. My wife has about 50% disposable income (after room and board) and she is the Marketing Director for a private company in Honduras!

When you add to this the fact that this kind of job is a temp job where these Chinese teens will remain for about 3 years to save up as well as gain experience and then move on to bigger and better things, the picture clears up considerably. It’s the equivalent of a job at McDonalds or Burger King! Who in America working at McD’s can tout 72% disposable income!?

Second, because thats how many of American’s consumer products get made: Walmart clothing from the Caribbean & Central America, Dunkin Donuts sugar from Asia, Starbucks Coffee from South America etc. the list goes on and on.

I’m not suggesting there is no room for improvement, but it’s no reason for alarm. If you want to be alarmed, check out factories in countries like Malaysia or Honduras where big companies with solid Social Responsibility Programs like Apple don’t go near!

Categories: Philosophical Tags: , , ,

Use a simple NSNotificationCenter alert

February 1, 2012 Leave a comment

NSNotification Center iOS

NSNotification Center iOS Santiapps.com by Marcio Valenzuela

The idea behind this is to notify one object/class of another object/class’ action. Thus you need the following:

1. A Class (A) whose object will register to receive notifications (be notified).
2. A Class (B) whose object will be doing something and when it finishes, must notify the other (post notification)

Receiving Class A

This class must cleanup its listening task so that when it is no longer active, the NSNotificationCenter will not waste time and resources notifying it about events it was once interested in. To do this simply add this to your dealloc method:

//1. NSNotifCtr CLEANUP in viewDidUnload or dealloc
[[NSNotificationCenter defaultCenter] removeObserver:self];

This class must actually register or addObserver:self, (add itself as an observer) to those notifications, preferably at the start such as a viewDidLoad method:

//2. Register as observer of notifications in viewDidLoad
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(receiveTestNotification:)
name:@”TestNotification”
object:nil];

Now think of the NSNotificationCenter as this huge billboard which looks like this:

NSNotificationCenter Dispatch Table

Santiapps.com by Marcio Valenzuela

This class will eventually receive the notification so it must be able to handle it with a method such as this one:

//3. Method to prove notif received…
- (void) receiveTestNotification:(NSNotification *) notification
{
// [notification name] should always be @”TestNotification”
// unless you use this method for observation of other notifications
// as well.

if ([[notification name] isEqualToString:@”TestNotification”])
NSLog (@”Successfully received the test notification!”);
}

Now lets switch to the notifying class or Sending Class.

Sending Class B

This class must have a method that is responsible for doing something, like receiving the final downloaded data, or the parsing of a result or picking of an image or person. In such a method, which is the one you want to be responsible of notifying observers that a particular task is finished, you will have some generic code such as:

//4. Post notif to NSNotif in calling method OTHER CLASS
[[NSNotificationCenter defaultCenter]
postNotificationName:@”TestNotification”
object:self];

This is the code that will post to the bulletin board when a task has finished!

Happy Notifying! :)

AddressBook UI

January 31, 2012 Leave a comment

Have you ever tried to get data fields from the address book and ran into the wonderful world of ABPerson reference only to find it reads like the blueprints to a space rocket?

Here is the straight out code on how to do it:

//Commented out code fails because the values are NOT STRINGS, but rather NSCFType)
//NSString *fone = (__bridge NSString*)ABRecordCopyValue(person, kABPersonPhoneProperty);
//self.telLabel.text = fone;
//This on the other hand, does work
ABMutableMultiValueRef phoneMulti = ABRecordCopyValue(person, kABPersonPhoneProperty);
CFStringRef fone = ABMultiValueCopyValueAtIndex(phoneMulti, 0);
NSString *foneObject = (__bridge NSString*)fone;
NSLog(@”phone is %@”,foneObject);
self.telLabel.text = foneObject;
CFRelease(fone);

//Haven’t tried with URL
//NSString *url = (__bridge NSString*)ABRecordCopyValue(person, kABPersonURLProperty);
//self.urlLabel.text = [NSString stringWithFormat:url];

//SocialProfiles are a bit different
//This didn’t seem to work
//CFStringRef social = ABMultiValueCopyValueAtIndex(socialMulti, 0);
//NSString *socialObject = (__bridge NSString*)social;
//NSLog(@”social is %@”,socialObject);
//self.twitterName.text = socialObject;
//CFRelease(social);

//So i tried this but I can’t seem to get the if statement to work
ABMutableMultiValueRef socialMulti = ABRecordCopyValue(person, kABPersonSocialProfileProperty);
NSMutableDictionary *mySocialDict = [NSMutableDictionary dictionaryWithCapacity:ABMultiValueGetCount(socialMulti)];
NSLog(@”entering social dict of count %ld”, ABMultiValueGetCount(socialMulti));
for (CFIndex i = 0; i < ABMultiValueGetCount(socialMulti); i++) {
CFStringRef socialLabel = ABAddressBookCopyLocalizedLabel(ABMultiValueCopyLabelAtIndex(socialMulti, i));
CFStringRef social = ABMultiValueCopyValueAtIndex(socialMulti, i);
if ([(__bridge NSString*)socialLabel isEqualToString:@"twitter"]) {
NSLog(@"we got a twitter");
}
[mySocialDict setObject:(__bridge NSString*)social forKey:(__bridge NSString*)socialLabel];
NSLog(@"social is %@",social);

CFRelease(social);
CFRelease(socialLabel);
}

Santiapps.com: Digital Graphic Design for newbies (noobs)

January 9, 2012 Leave a comment

Wanted to share this tutorial for graphic design noobs that are interested in creating their own artwork for iOS games. You may indeed have some graphic design skills and some much better programming skills but turning your paper art into digital usable art is a whole new ballgame.

Visit this tutorial in spanish, since this is a spanish blog:

Diseno Grafico para Juegos Digitales (Principiantes)

Storyboarding is for everyone in Xcode 4

January 6, 2012 Leave a comment

I just ran across storyboards in iOS5 and I had to link back to this article with the best storyboard tutorials:

Storyboard Tutorials!

Categories: Iphone Developer

Facebook: Worldwide Genetic Experiment

January 3, 2012 Leave a comment

What does the biggest social network share with the most global science field?

Does the most complex web software have anything to do with one of the most complex fields in human nature?

Is Facebook the world’s largest human genetic experiment?

What do you get when you mount a huge amount of human relational information onto the largest, most accessible data depot in the world?  Ill tell you what you get…the biggest artificial intelligence in the world (since we are not sure about the universe’s size or the possibility of coexisting multiverse’s).

Lets think about what Facebook contains.  On a personal level, it contains:

  1. Your name, face and personal likes and dislikes.
  2. Your family’s names, faces and personal preferences as well.
  3. Your friends’ names, appearance and their preferences.

If you consider that each one of those persons is capable, not only of posting information but also verifying each other’s information and even reproducing in order to create more and more “persons”…You have the biggest genetic tree in the world.  This genetic tree doesn’t only have names, but each name has preferences and dislikes, images and moments, work and private information.

Think how much that information is worth to pharmaceutical companies?  Facebook may be worth more for the information it contains in its data centers than for its advertising revenue!  If Facebook’s highly desirable IPO was poised to skyrocket before, get ready to factor this into it.

Nuevo Foro para Programadores iOS

December 6, 2011 Leave a comment

Quiero compartir un nuevo foro para programadores iOS:

http://santiapps.com/phpbb3/

Les invito a participar como moderadores o programadores.  Dentro de poco comenzare a subir tutoriales. Por mientras posteare un tutorial en Learnable para ir avanzando. Les agradecere su participacion en el foro.

Follow

Get every new post delivered to your Inbox.

Join 248 other followers