Monthly Archives: December 2009

Gorillacam Brings Timers, Burst, and More Extra Features to Your iPhone’s Camera [Downloads]

iPhone only: The iPhone’s built-in camera is capable, but its features (or lack thereof) aren’t exactly electrifying. Gorillacam adds all the tools you wish the default Camera app had and then some, including timed shots, time-lapse, burst mode, and more.

If you've ever watched the perfect shot pass you by because you're stuck waiting for the last photo you took to save to the Camera Roll, then you'll love Gorillacam's Auto-Save—it works in the background to save pictures while you keep taking more. If you want to take your pics at set intervals anywhere from one second to two minutes apart, then fire up the Time-Lapse feature. Alternatively, you could use 3-Shot Burst to take three rapid-fire pics in succession.

Gorillacam’s got enough features right there to make this free app well worth the download, but Gorillacam does even more. A countdown timer lets you take self-portraits, and Grid Overlay helps you line up and compose shots like a pro. Add to that a shot-leveler and a toggle that turns the whole screen into a shutter button and you’ve got yourself a must-have app to enhance your iPhone’s camera.

Gorillacam comes from the same company that brought you this awesome mobile phone tripod and the classic Gorillapod, and the app really goes to the heart of several missing features in the iPhone’s camera app. What dream feature would make your phone’s camera perfect? Share your thoughts in the comments.

Gorillacam [Joby]

Shrink Pic Resizes Images Automagically for Faster Uploads [Downloads]

Windows only: Image resizing tools are a dime a dozen, but free utility Shrink Pic is actually an extremely clever original: Instead of requiring manual processing, it runs in the background and automatically resizes images whenever you attach or upload them.

A perfect tool for frequent Facebook uploaders, for example, Shrink Pic works with a number of applications (most browsers, Outlook, Thunderbird, Skype, and MSN Messenger, to name just a few) to monitor when you upload, attach, or send pictures via IM. When you do, it automatically resizes the images in the background based on user-defined settings, then uploads the smaller image (so you don’t have to wait several minutes for an upload to complete just to have it severely compressed at its destination anyway). It can even resize multiple photos in the same upload. The speed at which it resizes and the quality of the compression are nothing to sneeze at, either.

Shrink Pic saves the resized images in a temporary directory, so your originals are never touched—just copied. You can use any kind of compression level you want, as well as choose from 5 different photo types to check for. If you want to disable it, all you need to do is uncheck an option in your system tray—and re-enabling it is just as easy. You can even install a portable version to a USB drive, so you never have to resize images again—not even at other computers.

Shrink Pic is a free download, Windows only.

Google City Tours Adds Walking Directions, Custom Maps [Travel]

Six months after launching City Tours in Labs, Google’s Maps team has tweaked the interface and made it more friendly to how people actually vacation: head to a city, pick places to go, and get precise directions to them.

At launch, City Tours did a decent job of knowing neat places to go inside a city, and even knew (sometimes) when they were open and what they cost. All it did for the traveler, though, was tell you how far apart those destinations were. Now City Tours includes detailed walking directions in your itinerary. And if you’re a My Maps nerd who’s picked out spots to visit on your own, you can import it and lay those map points over the cities that Google has picked out, so you get a mix of suggestions and pre-picked favorites.

There’s more to the latest upgrade, detailed at the blog post below. Have you used City Tours for a real, honest-to-goodness vacation? Tell us what works, and what you needed to DIY, in the comments.

Use Google Suggest to Find Software Alternatives [Search Techniques]

You’ve got a file that needs opening, or a piece of software that, frankly, sucks. Want to find a better, or maybe free, alternative? One reader has found Google’s auto-completing “Suggest” feature a great recommendation engine.

We’ll let reader Alex tell the tale himself:

Mainly, this tip is for when you’re looking for a list of products that all fall into a single category. All you have to do is type a single example of the product, followed by ” vs”, and you’ll get a pretty exhaustive list of alternatives.

For instance, let’s say you’re looking for new text editors. The one you’re familiar with is notepad++. Go to the Google home page and type: “notepad++ vs” and wait a moment. The auto-complete will pop up with a list:

Programmer’s Notepad

… There—you now have a list of further research topics. For a slightly bigger list you can pick one of your results and repeat the process – In this case, type "jedit vs". I recently used this in a quest to find a self-hosted equivalent of github that would host some of my code. "github vs" gave me a much larger number of products to research than any single web page had been able to provide me.

As Alex further notes, this system is sometimes better than even the Wikipedia pages that are just giant lists of software compared by features, since those pages are often subject to bias on the part of the selective crew of Wikipedia editors.

Know another search project that the Google Suggest box is perfect for? Tell us in the comments.

Notepad GNU Boosts Basic Text Editing on Windows [Downloads]

Windows: What’s the most popular and powerful editor on Windows among text aficionados? Notepad++, by a hefty margin. Want something a smidge less menu-rich and, well, different? Notepad GNU is a very clever, open source alternative.

Notepad GNU has a lot to recommend on its own, including optional background transparency, loads of HTML and other code-minded plug-ins, a menu that can quickly send a file to a browser or other app (even Notepad++), and all the text tweaking tools you need without the Office integration nonsense you don't. It doesn't offer everything that Notepad++ does, but that's kind of the point—it's a different layout and setup, and one newcomers might find pretty useful.

The one drawback, for English speaking users at least, is the hit-and-miss translation of some of Notepad GNU's more obscure features. You'll be able to grope your way around in the linguistic dark, most likely, but if you speak Russian and like the app, by all means—offer to help with the translation.

Notepad GNU is a free download for Windows systems only. It comes packaged in a RAR container, oddly enough—you can easily unpack it for free using 7-Zip.

SuperDB Core Data App with Sections

If you’ve gotten through the first few chapters of More iPhone 3 Development, you might be wondering why we included a sectionNameKeyPath when we didn’t actually divide up the table into sections. What’s the point of having the fetched results controller use sections if they’re not displayed?

The truth of the matter is that we originally planned to take the SuperDB application further than we were able to. Unfortunately, we reached a point where we had to cut it off and move on to other topics in order to both meet our deadline and to come in at a reasonable page count (as it was, we came in 250 pages over what we contracted for). Okay, we didn’t actually meet our deadline, but we would have missed it by more.

Dave and I agreed to stop working on Core Data to get the book done and leave room for the other topics, but we left open the possibility of expanding the application further here in my blog. In order to be able to do that, we left in some vestiges of the original plan to make it easier to expand the application here.

Here’s the first expansion, which is to add alphabetical sections to the table, like so:

Screen shot 2009-12-29 at 5.14.44 PM.png

Let’s continue on from the code in the 07 – SuperDB project. You can download the revised version from here. Make a new copy of it if you wish. The first thing we need to do is add a tableview delegate method that returns the title to be displayed in each section. To do that, add the following code to HeroListViewController.m, near the other table view methods:

- (NSString *)tableView:(UITableView *)tableView 
titleForHeaderInSection:(NSInteger)section {

if (!(section == 0 && [self.tableView numberOfSections] == 1)) {
id <NSFetchedResultsSectionInfo> sectionInfo =
[[self.fetchedResultsController sections] objectAtIndex:section];
return [sectionInfo name];

return nil;

This is a very generic method that will use the values from the fetched results controller. This method becomes basically a copy-and-paste bit of code that you can use unchanged in any controller that uses a fetched results controller with sections.

If you run your application now, however, you’re going to get a separate section for each row (it would also crash, but we’ll deal with that as well). In the version you’ve got now, we specified either name or secretIdentity as our sectionNameKeyPath, so every unique name or secret identity becomes its own section. Generally, not what want. So, the next step is to add virtual accessor method to our Hero object to return the value that we want to use to use to divide the list of heroes up. Let’s do it alphabetically, so that means we need to create methods to return the first letter of the name and the secret identity. We can then use these new virtual accessor methods as our section name key paths, and the fetched results controller will divvy up the list by first letter.

In Hero.h, add the following two method declarations, just before the @end keyword:

- (NSString *)nameFirstLetter;
- (NSString *)secretIdentityFirstLetter;

Save Hero.h and switch over to Hero.m, and insert the implementation of these two methods, right above the @end keyword again:

- (NSString *)nameFirstLetter {
return [ substringToIndex:1];

- (NSString *)secretIdentityFirstLetter {
return [self.secretIdentity substringToIndex:1];

Save Hero.m. Next, we have to make a few changes in HeroListViewController.m. First, change the assignment of sectionKey to reflect our new virtual accessor methods. Look for the following code in the fetchedResultsController method and change the lines in bold to switch from using name and secretIdentity to using our new first-letter methods:

case kByName: {
NSSortDescriptor *sortDescriptor1 = [[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES];
NSSortDescriptor *sortDescriptor2 = [[NSSortDescriptor alloc] initWithKey:@"secretIdentity" ascending:YES];
NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor1, sortDescriptor2, nil];
[fetchRequest setSortDescriptors:sortDescriptors];
[sortDescriptor1 release];
[sortDescriptor2 release];
[sortDescriptors release];
sectionKey = @"nameFirstLetter";

case kBySecretIdentity:{
NSSortDescriptor *sortDescriptor1 = [[NSSortDescriptor alloc] initWithKey:@"secretIdentity" ascending:YES];
NSSortDescriptor *sortDescriptor2 = [[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES];
NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor1, sortDescriptor2, nil];
[fetchRequest setSortDescriptors:sortDescriptors];
[sortDescriptor1 release];
[sortDescriptor2 release];
[sortDescriptors release];
sectionKey = @"secretIdentityFirstLetter";


That’s basically it. Well, no really. In testing this, I found that it crashed. For this new version, we need to tweak the fetched results controller delegate methods that we gave you in Chapter 2. Replace your existing implementations of controller:didChangeSection:atIndex:forChangeType: and controller:didChangeObject:atIndexPath:forChangeType:newIndexPath: with the following new versions:

- (void)controller:(NSFetchedResultsController *)controller didChangeObject:(id)anObject atIndexPath:(NSIndexPath *)indexPath forChangeType:(NSFetchedResultsChangeType)type newIndexPath:(NSIndexPath *)newIndexPath {
switch(type) {
case NSFetchedResultsChangeInsert:
[self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:newIndexPath] withRowAnimation:UITableViewRowAnimationFade];
case NSFetchedResultsChangeDelete:
[self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
case NSFetchedResultsChangeUpdate: {
NSString *sectionKeyPath = [controller sectionNameKeyPath];
if (sectionKeyPath == nil)
NSManagedObject *changedObject = [controller objectAtIndexPath:indexPath];
NSArray *keyParts = [sectionKeyPath componentsSeparatedByString:@"."];
id currentKeyValue = [changedObject valueForKeyPath:sectionKeyPath];
for (int i = 0; i < [keyParts count] - 1; i++) {
NSString *onePart = [keyParts objectAtIndex:i];
changedObject = [changedObject valueForKey:onePart];

sectionKeyPath = [keyParts lastObject];
NSDictionary *committedValues = [changedObject committedValuesForKeys:nil];

if ([[committedValues valueForKeyPath:sectionKeyPath] isEqual:currentKeyValue])

NSUInteger tableSectionCount = [self.tableView numberOfSections];
NSUInteger frcSectionCount = [[controller sections] count];
if (tableSectionCount != frcSectionCount) {
// Need to insert a section
NSArray *sections = controller.sections;
NSInteger newSectionLocation = -1;
for (id oneSection in sections) {
NSString *sectionName = [oneSection name];
if ([currentKeyValue isEqual:sectionName]) {
newSectionLocation = [sections indexOfObject:oneSection];


if (newSectionLocation == -1)
return; // uh oh

if (!((newSectionLocation == 0) && (tableSectionCount == 1) && ([self.tableView numberOfRowsInSection:0] == 0)))
[self.tableView insertSections:[NSIndexSet indexSetWithIndex:newSectionLocation] withRowAnimation:UITableViewRowAnimationFade];
NSUInteger indices[2] = {newSectionLocation, 0};
newIndexPath = [[[NSIndexPath alloc] initWithIndexes:indices length:2] autorelease];


case NSFetchedResultsChangeMove:
if (newIndexPath != nil) {

NSUInteger tableSectionCount = [self.tableView numberOfSections];
NSUInteger frcSectionCount = [[controller sections] count];
if (frcSectionCount >= tableSectionCount)
[self.tableView insertSections:[NSIndexSet indexSetWithIndex:[newIndexPath section]] withRowAnimation:UITableViewRowAnimationNone];
if (tableSectionCount > 1)
[self.tableView deleteSections:[NSIndexSet indexSetWithIndex:[indexPath section]] withRowAnimation:UITableViewRowAnimationNone];

[self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
[self.tableView insertRowsAtIndexPaths: [NSArray arrayWithObject:newIndexPath]
withRowAnimation: UITableViewRowAnimationRight


else {
[self.tableView reloadSections:[NSIndexSet indexSetWithIndex:[indexPath section]] withRowAnimation:UITableViewRowAnimationFade];



- (void)controller:(NSFetchedResultsController *)controller didChangeSection:(id <NSFetchedResultsSectionInfo>)sectionInfo atIndex:(NSUInteger)sectionIndex forChangeType:(NSFetchedResultsChangeType)type {
switch(type) {

case NSFetchedResultsChangeInsert:
if (!((sectionIndex == 0) && ([self.tableView numberOfSections] == 1)))
[self.tableView insertSections:[NSIndexSet indexSetWithIndex:sectionIndex] withRowAnimation:UITableViewRowAnimationFade];
case NSFetchedResultsChangeDelete:
if (!((sectionIndex == 0) && ([self.tableView numberOfSections] == 1) ))
[self.tableView deleteSections:[NSIndexSet indexSetWithIndex:sectionIndex] withRowAnimation:UITableViewRowAnimationFade];
case NSFetchedResultsChangeMove:
case NSFetchedResultsChangeUpdate:


Since our original application gave every row its own section, we didn’t have this problem, but what happens is when we receive notice that a row has moved, we need to make sure that the number of sections in the table and controller match. It’s possible that a row moved to a new section, possibly even causing a row to be deleted or inserted in the controller, but not the table. If a row is moved from one section to another, and we don’t account for it, the app will crash. If the moved row had been the last row in a section, we need to delete the section from the table, unless it was the last section, because tables have to have at least one section. If moving the row created a new section in the controller, we insert a new row into the table.

And that’s really it, you now have your SuperDB’s hero list divide up by first letter of either the hero’s name or secret identity, depending on which tab was selected.

You should use the fetched results controller delegate methods from this posting instead of the ones in the book. The ones in the book work just fine for the application’s in the book, but this one is more flexible and will handle a greater variety of situations correctly.

©2008-2010 Jeff LaMarche.

Cook Pasta Faster and with Less Water [Food]

Most people use six or more quarts of water to boil pasta “because that’s how it’s always been done.” What if you could get by with a lot less water and still have great noodles? Here’s how.

Photo by Jakob Montrasio.

Grandma was a smart cookie, but she might not have given you the best advice when it comes to cooking pasta. Turns out it’s not really necessary to use enough water to fill a bathtub just to make a couple servings of spaghetti.

Food science wizard Harold McGee did some experimenting and discovered a pound of spaghetti cooks in as little as 1 1/2 quarts of water, as long as you start with cold water and stir the pot more often. He also has a theory on why this works:

Because the noodles absorb water only very slowly at temperatures much below the boil, so little happens to them in the few minutes it takes for the water to heat up. And no matter how starchy the cooking water is, the solid noodle surfaces themselves are starchier, and will be sticky until they’re lubricated by sauce or oil.

Standard spaghetti noodles take 18 minutes to cook using McGee's methods, but noodles of a different thickness—angel hair pasta, for instance—will take less time, so you'll need to tinker a little bit to figure out what cooking times work for your favorite pasta. Once you get it right, you'll save some time and dimes not boiling up a huge pot of water that just gets dumped down the drain.

Bucking the system to make noodles in only a few inches of water is pretty heady stuff, but that’s not the only kitchen trend that’s not really a hard and fast rule (did you know you don’t have to refrigerate ketchup?). What rebellious kitchen habits do you have? Talk about them in the comments.

From the Tips Box: Mega Mart Parking, Icy Windshields, and Snow-Covered Bushes [From The Tips Box]

Readers offer their best tips for getting through mega marts quickly, preventing icy windshields, and getting snow off of delicate bushes.

Don’t like the gallery layout? Click here to view everything on one page.

About the Tips Box: Every day we receive boatloads of great reader tips in our inbox, but for various reasons—maybe they're a bit too niche, maybe we couldn't find a good way to present it, or maybe we just couldn't fit it in—the tip didn't make the front page. From the Tips Box is where we round up some of our favorites for your buffet-style consumption. Got a tip of your own to share? Add it in the comments, share it here, or email it to tips at

Beat Crowded Mega Marts by Using the Auto Center

Photo by Robert Stinnett.

Tanner let us know how to get in and out of a busy big box store quickly:

I got a quick tip on how to beat the hustle and bustle of Wal-Mart:

Park around the auto-repair center, which most Wal-Marts have. Go in the Customer Entrance, shop for your items (has to be 10 items or less), and check out at the auto-repair center. Never any lines, parking right beside the Customer Entrance at the auto-repair center, quick way to get in and out. Has worked all the time. Never wait in lines or park a mile away at Wal-Mart anymore!

This trick works at most other mega marts or malls (such as Sears, where the above photo was taken)—just park in the stores/sections where no one goes.

Avoid Windshield Ice With a Towel

Photo by Ctd 2005.

casey.crowe shows us how to prepare before a wintry night:

When it gets cold out and you expect ice on your windshield, throw a towel over it the night before and come out the next morning to a totally ice-free windshield!

If you live in a particularly windy area, you might consider taping the towel onto your car (tape it to the windshield to avoid paint scraping).

Stop Slippery Cutting Boards with a Dish Towel

Photo by Wonderlane.

Vanessa explains how to keep cutting boards from sliding around on slick countertops:

Place a damp kitchen towel under your cutting board to keep it “Velcroed” securely to the counter top. It works brilliantly.

Use Leaf Blowers to Clear Heavy Snow Off Delicate Bushes

Photo by Ben Sutherland.

Colin701 lets us know about another great seasonal tool that can multitask at other times of the year :

If you need to save your bushes from being smothered by snow, a leafblower works well.

After breaking a broom and chopping some limbs off with a shovel, more horsepower was the only solution.

iPhone Coding Tutorial – How To Make Spaces In UIAlertView’s

Have you ever wonder how to make spaces in a UIAlertView? or maybe even in a UITextView. Well today I am gonna show you guys how to do this in code.

1. Create A New Window Based Application
So lets do the usual process and open Xcode and go to “File” then “New Project.” Lets go ahead and do a Windows Based App. Name it whatever you like, I will name is “Spaces”

2. Implementing The Code
Now jump into the SpacesAppDelegate.m and under the applicationDidFinishLaunching method make your UIAlertView. Now when you get to messages, you can maybe do “Hi my name is Dewan Payroda! nnI like to code apps!” and thats it! nn makes a new line. In this case I did two of those, so it made two line breaks. The code is below how mines looked. Also if you want to watch a video tutorial on this click the link under the code.

– (void)applicationDidFinishLaunching:(UIApplication *)application {

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@”TEST”
message:@”Hi my name is Dewan Payroda. nnI like to code apps!”
[alert show];
[alert release];

// Override point for customization after application launch
[window makeKeyAndVisible];


Video Tutorial Here & Source Code Here

– AppStoreMod
YoutubeWebsiteTwitterXcode Video TutorialsAppStoreApps

Beef Label Decoder Clues You in on How Your Meat Was Raised [Food]

Labels on fresh supermarket beef have all sorts of stamps and and certifications on them, but it’s hard to guess what they all might mean. Here’s an interactive beef label decoder to help you figure it out.

Whether you want to know where your beef’s been for philosophical or health reasons, this web-based tool will give you some insight. For instance, if the package bears a stamp reading “USDA Organic,” you know the cow was fed only 100% organic grass, grain and corn.

A quick tour through all the labels gives you a great overview of how to tell if your steak comes from a cow that may have been given growth hormones, or if your burger could contain the remnants of antibiotics given to an ill animal.

If you want to dig a little deeper into how the way a cow was raised impacts your diet, be sure to take a look at what the Decoder has to say about things like why the type of feed cows have access to is important.

Conventional cattle are fed on a diet of corn and grain, both of which contribute to common and painful health problems and can lead to higher levels of E. Coli bacteria in meat. Grass, however, is healthier for cattle and for meat eaters. Compared with grain- and corn-fed beef, grass-fed beef has less fat, less cholesterol and fewer calories. Grass-fed beef also has a higher concentration of vitamin E, beta-carotene, vitamin C and omega-3 fatty acids.

Sure, this isn’t the most appetizing thing to think about before your next cookout (or, in the more northerly parts of the world right now, fancy steak purchase) but it’s good information to have. Got any good resources for learning more about what’s in the foods we eat? Share them in the comments.

WP Like Button Plugin by Free WordPress Templates