Logged in as Guest   Fri, Mar. 12th, 5:05 AM.      
Visitor Map
Recent Entries:
My Dev Setup Lately
Three Ways To Randomize on the iPhone
How to Remove .svn Directories On a Mac
How To Detect The iPhone Simulator
iPhoneMom Likes Doodle Games!
Updates To the Doodle Games Line
Three Jacks Now Tweets
Second iPhone App Submitted For Approval!
Pinch Media Analytics for iPhone
New iPhone Game Coming Soon!

Archive:
January - 2010
November - 2009
October - 2009
September - 2009
August - 2009
July - 2009
June - 2009
April - 2009
March - 2009
January - 2009
May - 2008
April - 2008
March - 2008
October - 2007
August - 2007
July - 2007
June - 2007
May - 2007
April - 2007
December - 2006
November - 2006
September - 2006
August - 2006
July - 2006
March - 2006
February - 2006
January - 2006
December - 2005
November - 2005
October - 2005
September - 2005
August - 2005
July - 2005
June - 2005
May - 2005
April - 2005
February - 2005
January - 2005
December - 2004
November - 2004
October - 2004
September - 2004
August - 2004
July - 2004
June - 2004
May - 2004
April - 2004
March - 2004

My Dev Setup Lately
FWIW, I have really been enjoying my Macbook. For those that care, I upgraded to 4 GB of RAM (do it yourself from Crucial and save >$100!!!) For my Blackberry and WinMo development, I have installed VirtualBox from Sun (Free!) and am running Windows 7 in the VM. For mobile dev, it is more than adequate and the combo of 4GB + Win7 makes it feel pretty smooth. No, it's not quite as good as my desktop, but this is an all in one solution. Sweet!
Submitted by bosshogg on Tuesday the 27th of October 2009, at 10:59 pm


Three Ways To Randomize on the iPhone
To the best of my knowledge, there are three ways to generate random numbers on the iPhone: The first, SecRandomCopyBytes:

UInt32 randomResult = 0;
int result = SecRandomCopyBytes(kSecRandomDefault,
                  sizeof(int), (uint8_t*)&randomResult);
if (result != 0)
      randomResult = arc4random();


The second, arc4random:

UInt32 randomResult = arc4random();



The last (and worst) rand():

UInt32 randomResult = rand();


Good luck with all your random things!

-Jon
Submitted by bosshogg on Monday the 05th of October 2009, at 03:51 am