February 2012
6 posts
3 tags
Little Known Mac OS X Airport Utility →
Quite nice!
Feb 22nd
3 tags
“There is no class, then, in America which passes to its descendants the love of...”
– Democracy in America
Feb 20th
3 tags
Sync Multiple Google Calendars with the iPhone and...
Simply navigate to http://www.google.com/calendar/iphoneselect and enable the calendars you wish to sync! From a UX standpoint, I find it a bit odd that Google Calendar doesn’t automatically sync all calendars, but this may be an attempt to avoid overwhelming the user.
Feb 20th
4 tags
Java Enum names should be singular
Java Enums represent a type not a collection so the Enum name should be singular.
Feb 13th
3 tags
An Interface is a Contract
In OOP, an interface is quite simply a contract. If we examine the definition of a traditional contract we can begin to see the similarities: A written or spoken agreement, esp. one concerning employment, sales, or tenancy, that is intended to be enforceable by law. In particular, notice the word agreement which is the essence of a contract. When you specify an interface in Java, Objective-C,...
Feb 12th
3 tags
Neven Mrgan's tumbl: All the sizes of iOS app... →
Let’s say you’re working on an icon for an iOS app. The app is universal, so it should run on all iPhones (and iPod touches), and on the iPad. As a designer, you’re used to drawing icons at various sizes; this is a big part of what “icon design” is (as opposed to other types of illustration). …
Feb 11th
364 notes
January 2012
22 posts
4 tags
Modal View Controller Parent →
Thanks for adding this much need property in iOS 5, Apple!
Jan 29th
2 tags
Love the BBC Sherlock Holmes
I’ve been re-watching the BBC’s version of Sherlock Holmes starring Benedict Cumberbatch (one wonders if that is truly his birth name) and find myself quite engaged with the characters.  Personally, I’ve found that Steven Moffat has added another dimension to the classic novels by adding subtle character interactions; especially those between Dr. Waatson and Sherlock. Keep up...
Jan 27th
3 tags
Dropbox Command Line Client →
Quite cool, and works right out of the box! Great work andreafarizi!
Jan 27th
WatchWatch
Too funny…
Jan 25th
Tadabborat: Mercurial: warning: bitbucket.org... →
tadabborat: We are using Mercurial as our daily bases DVCS. It is very handy and easy to use. When I updated my Mercurial installation to version 1.7.5, I started to notice this warning message: warning: bitbucket.org certificate with fingerprint...
Jan 25th
1 note
3 tags
Copy to Clipboard From Mac OS X Shell →
Jan 20th
3 tags
Github Line Number Links
Just learned that you can link to Github source file line numbers. For example, for a single line, append #L23 (or whatever line number) to the end of your url while for entire line ranges append the form #L23-45 (with your line range). Pretty cool eh? Love you Github!
Jan 20th
3 tags
Use the JSONObject.NULL
Use the NULL value in Java’s JSONObject to ensure that null values show up in console output, keys(), etc.
Jan 20th
2 tags
Untrack File in Git
One of the reasons why git niggles me: I can never remember how to untrack a file.  git rm —cached filename
Jan 19th
1 tag
iTunes U
iTunes U is literally one of the best educational resources on the web. Pulling from a wide swath of universities, many of them Ivy League, it truly democratizes education. I find it odd that it isn’t mentioned more often in the media.
Jan 19th
4 tags
Print Recent Git Commits
git log --pretty=oneline
Jan 16th
131 notes
2 tags
Convert Android Activity to Dialog →
Jan 13th
4 tags
Converting from DIP units to Pixels on Android →
Using TypedValue is the correct method for converting between device independent pixels and native pixels. If Google happens to change the baseline DPI, your code will continue to work.
Jan 12th
2 tags
Customize (or Remove) Android WebView Link... →
Tired of that annoying orange box which appears in Android WebViews when a user taps a link? No problem, you can easily change the color or set the alpha to zero and remove it completely via the -webkit-tap-highlight-color.
Jan 11th
3 tags
Calling static methods in Java
When calling static methods in Java, make sure you always use the class prefix even if you are within the declaring class. For example, imagine you have a static method called addLoader and you are calling it within the URLLoader class where it is declared.  While you could simply call addLoader(…) without the class name, you should include the class name instead:...
Jan 6th
4 tags
Converting DIP to Pixels on Android →
Thanks for documenting this Google! NOT! The proper way to convert device independent pixels to device pixels on Android. While the scaling formula works, this looks cleaner and is probably more “future proof”.
Jan 5th
“But this is what proves Myers right. Unlike previous racist dictatorships, the...”
– Christopher Hitchens
Jan 4th
“Computers are bicycles for our minds.”
– Steve Jobs
Jan 3rd
4 tags
Useful Android Sample Source →
Jan 3rd
5 tags
ListView Optimization on Android
While I have always known about the convertView passed into the getView method, I was only recently made aware of the getViewTypeCount and getItemViewType methods. Both of these allow for better control of view reuse in the getView method. While the inner workings of the view recycling code is not specified in the official documentation (though you’re welcome to look at the source), it is...
Jan 3rd
4 tags
NSObject performSelector
Didn’t know about the three different variations of performSelector in NSObject. You can pass in either one or two objects, or alternatively, no objects at all (performSelector:withObject, etc). Always thought we were able to only pass in one object. Here’s hoping that will be implemented in the performSelectorOnMain thread callbacks!
Jan 2nd
“Poverty is only romantic when escaped from.”
– Unknown
Jan 2nd
December 2011
6 posts
3 tags
Perl Regex Wild Card & Newlines
In Perl, the generic wildcard character is .. A period inside a regular expression will match any character, except a newline. For example, the regexp /a.b/ will match anything that contains a, another character that’s not a newline, followed by b - “aab,” “a3b,” “a b,” and so forth.
Dec 20th
17 notes
Remember CGRectIntegral for UILabels →
Dec 18th
2 tags
Every Line of Code You Write
you add extra complexity and potential bugs. True masters keep their code simple and short!
Dec 18th
2 tags
NPM Local vs Global Install →
Something I always forget! Remember to use that -g flag.
Dec 17th
NPM completion.sh when installed with Homebrew
If you installed Node.js with Homebrew instead of from source, you’ll need to add the npm bash completion script to your .bashrc file as follows: source /usr/local/lib/node_modules/npm/lib/utils/completion.sh Different path, same thing. ;)
Dec 17th
5 tags
Converting HTML Hex Colors to UIColor →
Dec 4th
November 2011
8 posts
Moving on from Rails →
Some good thoughts on how the web landscape is changing.
Nov 30th
Nov 18th
“People hate spending money performing necessary tasks; they like buying novel...”
– BottleRocket Apps
Nov 12th
Performance is a Feature →
Nov 10th
2 tags
On learning
To really learn something you can’t simply read about it. You have to practice it to fully understand the content. Only when struggling through a problem will your weaknesses and misunderstandings become apparent. You are considered “competent” in the material once you can it explain it to someone else; not a moment before.
Nov 9th
Half of China's Millionaires Want to Leave →
Not surprising.
Nov 9th
Nov 9th
“Code is poetry”
Nov 3rd
October 2011
28 posts
2 tags
“To be sure, if an attempt is made to base this fight upon an abstract demand, in...”
– Civilization and its Discontents by Sigmund Frued
Oct 31st
6 notes
5 tags
Tiling UIImage
If you want your UIImage to repeat, you must wrap it as a “pattern” and assign it as the background color of a view. Additionally, ensure that you set the opaque on both the layer and the view if you have a semi-transparent image. More info here: http://stackoverflow.com/questions/4059487/iphone-uiviews-backgroundcolor-using-a-png-with-transparency  Edit: You must set the opaque...
Oct 30th
5 notes
Div SRC attribute →
Some interesting thoughts, wouldn’t mind hand the suggested feature.
Oct 29th
“One method you can use is to close your eyes and strike the table of random...”
– Statistics for Managers
Oct 28th
3 tags
Want to be a better programmer?
Read other programmer’s source code and make sure you understand it. Tweak it, refine it, and create something new. I promise you’ll obtain a shockingly deep understanding of the technology you’re trying to learn. Plus, the more code you read, the easier it becomes to read new code.
Oct 27th
2 tags
It's Awesome to Simply Exist →
Excellent post by Jeff Atwood of codinghorror.com on parenthood and being human in general.
Oct 24th
3 tags
Class Extension is a method for Hooking
Never thought of it this way before, but every method you create in a base class is a “hook” point for the subclasses. In other words, it’s a point where the subclass can interrupt the behavior of the base class.  Probably a good idea to chunk your classes into methods for each specific feature so the subclass can customize.
Oct 22nd
Clean Commit Messages →
Oct 21st