Happy Thanksgiving!
Thursday, November 26th, 2009Wishes to you for a very wonderful Thanksgiving holiday. Thanks for visiting the blog. Don’t forget to check out the FunBox Mac Bundle sale, it is officially underway!
Wishes to you for a very wonderful Thanksgiving holiday. Thanks for visiting the blog. Don’t forget to check out the FunBox Mac Bundle sale, it is officially underway!
“A fishkeeper’s best friend!”
TankBuddy is a Mac app to help monitor and maintain aquariums. Easy enough for a single betta bowl, robust enough for professional fishkeepers! Stay tuned for more details and the official release. Also in the works: Blackout 3.4, new two-player MBB3k, and more.
MotivationLOL, the ridiculously awesome and totally useless motivational poster software for Mac, has been updated to version 2.0. MotivationLOL allows you to make funny mock motivational posters easily on your Mac. Just drag a funny pic or a family photo onto the poster frame, type a title and caption, and click Save Poster!
New in 2.0:
MotivationLOL is free, like the best things in life. Download it for your Mac by clicking here – and get motivated! LOL. (It requires 10.4 or later, by the way. For the PC version, click here, lol.)
Stay tuned for more info on BravoBug’s other soon-to-come updates.
PS: HAPPY HALLOWEEN! ![]()
If you’ve ever needed to sort an NSDictionary by its keys, you’ll quickly discover that this functionality is missing from the NSDictionary class. This is because the order of keys in an NSDictionary is undefined (really, the concept has no meaning in an NSDictionary in the first place). So the basic process to follow is:
Here’s the code. (Note: this method uses its own bubble sort algorithm, but you could easily replace this with NSArray’s built-in sorting methods if you wanted to):
-(NSMutableArray*)bubbleSortDictionaryByKeys:(NSDictionary*)dict
{
//this method takes an NSDictionary and performs a basic bubblesort
//on its keys. It then returns those ordered keys as an NSMutableArray.
//You can then traverse the original NSDictionary and retrive its
//ordered objects by simply stepping through each key in the NSMutableArray.
if(!dict)
return nil;
NSMutableArray *sortedKeys = [NSMutableArray arrayWithArray: [dict allKeys]];
if([sortedKeys count] <= 0)
return nil;
else if([sortedKeys count] == 1)
return sortedKeys; //no sort needed
//perform bubble sort on keys:
int n = [sortedKeys count] -1;
int i;
BOOL swapped = YES;
NSString *key1,*key2;
NSComparisonResult result;
while(swapped)
{
swapped = NO;
for(i=0;i<n;i++)
{
key1 = [sortedKeys objectAtIndex: i];
key2 = [sortedKeys objectAtIndex: i+1];
//here is where we do our basic NSString comparison
//This can be easily customized.
//See the options for -compare: in NSString docs
result = [key1 compare: key2 options: NSCaseInsensitiveSearch];
if(result == NSOrderedDescending)
{
//we retain for good form, but these
//objects should still be safely
//retained by the dictionary:
[key1 retain];
[key2 retain];
//pop the two keys out of the array
[sortedKeys removeObjectAtIndex: i]; // key1
[sortedKeys removeObjectAtIndex: i]; // key2
//replace them
[sortedKeys insertObject: key1 atIndex: i];
[sortedKeys insertObject: key2 atIndex: i];
[key1 release];
[key2 release];
swapped = YES;
}
}
}
return sortedKeys;
}
And here’s an example of how it can be used:
NSDictionary *test = [NSDictionary dictionaryWithObjects:
[NSArray arrayWithObjects: @"4",@"3",@"1",@"2",@"6",@"5",nil]
forKeys: [NSArray arrayWithObjects: @"dog", @"cat", @"apple", @"big bear", @"zebra", @"porcupine", nil]];
NSMutableArray *keys = [self bubbleSortDictionaryByKeys: test];
NSEnumerator *arrayEnum = [keys objectEnumerator];
NSString *aKey = nil;
NSString *str = @"";
while((aKey = [arrayEnum nextObject]))
{
str = [str stringByAppendingString:
[NSString stringWithFormat: @"\nKey: %@ -> %@", aKey, [test objectForKey: aKey]]];
}
NSLog(@"%@",str);
Output:
Key: apple -> 1
Key: big bear -> 2
Key: cat -> 3
Key: dog -> 4
Key: porcupine -> 5
Key: zebra -> 6
EasyBatch has been updated to version 1.4.2 which includes several key bug fixes, adds a contextual (”right click”) menu to the preview pane, and includes built-in support for sRGB color profile embedding.
EasyBatch requires Mac OS X 10.4 and is available for download by clicking here. Or to read more about EasyBatch, visit the EasyBatch page or read the EasyBatch FAQ/Help file.
BravoBug Software is happy to announce today the release of Blackout 3.1. Blackout is a unique screen dimmer and focus aid which provides several display modes which dim your Mac’s screen without adjusting your monitor’s hardware or gamma settings. This new update improves several of Blackout 3’s existing features. Changes in 3.1 include:
Check out Blackout 3 in action in the video below, or download Blackout 3 by clicking here (requires Mac OS X 10.5 or later).
MegaBrickBash3000 has been updated to version 1.1, a minor update which fixes a few small bugs, updates the main level set, and changes a few things such as the randomness and frequency of bonus drops. Plus the shattering bricks have been reduced in transparency for better visibility during gameplay.
MotivationLOL has also received a small upgrade. It is now available in a new build which completely removes the Shareware registration screen, as MotivationLOL was changed to freeware some time ago. This build correctly acts as though it were registered now for all users.
Just a quick update to let you know what’s in the frying pan at the moment. BravoBug is working on a brand new freeware app (details to come soon), plus significant updates to several of our Shareware apps. Some of the stuff we’re working on at the moment:
Some of these are big ‘whopper’ updates which will be in development for a while, but we’ll be getting them released as soon as possible, so stay tuned!
Thank you for supporting BravoBug Software, and thanks for visiting the blog!
I was going to write a big long essay here on the philosophy behind what makes certain music good for programming and certain music terrible for it (as if anyone but us whiny, neurotic programmers cared!). But instead I think I’ll just plug what I’m listening to right now..
(PS: Stay tuned for some announcements on the next BravoBug update, should be posted in a few days! Thank you very much for visiting and supporting indie mac software.)
Nightwalker by Trentemøller
Anyone have the movie Gattaca? Well… you can move it from your Science Fiction section to Documentaries, now. :O
As posted on Slashdot:
“The Fertility Institutes recently stunned the fertility community by being the first company to boldly offer couples the opportunity to screen their embryos not only for diseases and gender, but also for completely benign characteristics such as eye color, hair color, and complexion. The Fertility Institutes proudly claims this is just the tip of the iceberg, and plans to offer almost any conceivable customization as science makes them available. Even as couples from across the globe are flocking in droves to pay the company their life’s savings for a custom baby, opponents are vilifying the company for shattering moral and ethical boundaries. Like it or not, the era of designer babies is officially here and there is no going back.”