Invalid Binary message from iTunesConnect


I made some iOS4 updates to Listerful last week to take advantage of the retina display, but had another frustrating experience with Apple's submission process. After submitting the app, the portal would eventually turn the status to "Invalid Binary". Mind you, the Application Loader reported "Success", and I received no email to that effect, it just flipped the status and waited for me to check in. So my first failed submission sat for almost a week before I realized it!

Using Authlogic and Active Directory together for user logins

I just built a Rails app to replace a crotchety old .NET tool (original coding time: spread out over months; Rails: 5-6 hours!). The tool has both public and protected access needs, with the internal users being part of an Active Directory network. I always use authlogic for my authentication needs, but had never needed to deal with AD before. I didn't want to piece together a hack of Apache, mod_ldap, and authlogic's basic auth support, since that just muddies the cleanliness of an otherwise very simple design!

Easier Android layouts with DroidDraw


In picking up Android development, one thing I miss from the iPhone camp is Interface Builder.  Coding up Android's XML files to handle all the UI screens is tedious even for one display type.  Add on the different orientations, dimensions, and the rest makes it very un-fun. 

Dalvik compilation problems with Android / Eclipse


Started working on an Android version of an existing security tool.  After setting up the basic screens, I started importing some of the existing Java code.  I expected some issues, of course, but I ran into a maddening one.  Eclipse started complaining of this:

[2010-01-14 22:41:43 - MyApp] trouble writing output: null
[2010-01-14 22:41:43 - MyApp]Conversion to Dalvik format failed with error 2

Trying to Run or Debug would bomb with messages like:

Rails error: Errno::EIO (Input/output error)


All of a sudden one of my apps (still under development) started throwing the error "Errno::EIO (Input/output error)", coming from different controllers, but always tripping on a 'write' command.  No amount of googling turned up anything useful, but after a little digging, I realized that the offending line was using puts instead of logger.debug to spit out some tracing information.  I guess Rails (2.3.2) doesn't like that and was blowing up. 
Changing the appropriate lines to use logger.debug resolved it.

Flexible constant caching in Rails


As outlined in By Patrick Reagan's Recipe 61 of the very helpful Advanced Rails Recipes book, it's easy to cache your constants when loading your Rails models, which can help with both performance and speed (and accuracy!) of development. I liked this solution because it's so easy to setup.  However, some of my models are better keyed off a different field than name.  So I made the below modification to give me the flexibility I needed:


Use apt-cacher for stripped down Debian and Ubuntu repositories

I recently needed to upgrade a client's servers from Debian Sarge to Lenny.  The client is not in the US, and has a low bandwidth (yet still high cost!) connection for their servers.  So running the netinst upgrade isn't a viable option since it will take so long and eat up so much of their quota.  On the other hand, Lenny is now up to 3 DVDs.  Even if most of what is needed is on the first disc, the hassle of configuring the CD repos is a big pain, considering that these are servers with a very tightly controlled set of packages already installed.  So I didn't want

Override Authlogic login error messages for better security


Authlogic is a cool plugin that handles authentication for Rails (and Merb, etc).  But I just ran into a problem with one of its assumptions (which more generally probably ties back to a Rails assumption):  one error == one field == one message.
However, when dealing with authentication and other security mechanisms, the less information you leak out, the better the security.  So error messages that distinguish an invalid username from an incorrect password may be friendly, but they can let a would-be attacker gather more intel.  Better to hide it all behind a general "Invalid login" message.

Metro/JAX-WS uses hardcoded paths? WTF?!


It's 2009, right?  And Java is a write-once, run-anywhere platform, or at least purports to be such.  And we have eons of experience that says "don't hardcode file path references" (seriously, BeOS knew this!)

Updating NSUserDefaults from Settings.bundle

Trying to access parameters from Root.plist in your Settings.bundle using NSUserDefaults?  Luckily NSUserDefaults will sync those values for you ... after the user opens the Settings preferences for your app first.  As pointed out here, among a few other spots, that certainly seems like a bug, or at least yet another expectation gap.  I know the first thing I do when I download an app is run over to the Settings to see what goodness I can configure....

Syndicate content