Ben Von Handorf

Delving into all things tech

  • Converting to the new Android Build System - Multiple libraries with the same dependencies

    Mo Libraries, Mo Problems

    I'm very excited about the new Gradle based Android build system, so I've set about converting all my projects over.  I quickly ran into difficulty, though, with a fairly common situation.  My application depends on a couple of different library projects... let's call them A and V.  Both A and V depend on the support library.  Configuring the gradle build files went well enough, but when I try to assemble the overall project, I get an error while in the dexDebug step:



    java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActivityCompatHoneycomb;

    at … more

  • M3Conf 2012 - Speaker Report


    If you came to my Beginning Native Android Development workshop and you're after the code, it's here.  M3 was a blast for me as a speaker.  I'm certainly going to submit some sessions next year!

    Aside: inValidate Me!

    Were you in either of these sessions?  Or any session by any speaker at any conference?  Have suggestions for making anyone's talk better?  PLEASE... don't keep it to yourself.  You can find me through email, twitter, fill out an evaulation, whatever you want... but if you only filled out an evaluation and put in numbers, I'm not sure what the issue is.  Honestly, I'd rather read a paragraph of rant than get a 3 in one checkbox on a … more

  • Beginning Native Android Development workshop at M3Conf - 10/25

    Come Learn Android

    I'll be leading an 8 hour introduction to Android workshop next week at M3Conf!  I'm really excited to help people get their feet wet with my favorite platform.  


    While I suppose it's possible that you'd show up to something like this with no programming experience, hopefully you know your way around one of the major platforms.  (.NET, Java, Objective-C, etc.) Other than that, there's quite a bit to download.  

    If you think you're interested in attending, PLEASE go ahead and download the prerequisites here.

    I'm doing my best to have a nice, quick bootstrap procedure, but it will still take up valuable time


    My goal for this … more

  • OT: Tankless Water Heater

    A question was asked on the Twitters about tankless water heaters.  My experience is a bit too long to put into 140 characters, so I wrote an email, but then someone asked me to put it somewhere.

    This qualifies as somewhere.  Please forgive the lack of formatting.

    We got a natural gas tankless water heater installed last year.  We've been happy with it, but there are a few things to be aware of.

    Multiple points of failure

    At this point, our hot water depends on electricity, gas and water service.  Of the 3, electricity is by far the most fragile, of course.  It's still very good, but there have been a few storms that have knocked out the power... which means … more

  • Android FragmentManager Lifetime and fragment memory leaks


    The lifetime of the FragmentManager (at least using the support library) is not bounded by the activities using it.  So: rotating the device may cause the accumulation of long-since dead fragments in the FragmentManager.  Depending on what you're doing in your fragments, this could easily cause quite a bit of memory to get locked up.

    Fruits of a wasted youth

    As with so many of my blog posts, this is an attempt to archive a tiny bit of knowledge that was hard-won after a long period of debugging.  Hopefully this is helpful to someone else, but most likely it will be important to me at some point in the future, when I forget the lessons archived here.

    The Problem

    I'm … more

  • Android Layout Exercises: A basic two panel layout

    After playing around with some Android layout files yesterday, I realized that there are probably some other people out there who struggle with the some of the finer points.  Given that I'm still a student myself, I'm not sure I'm qualified to try and teach, but there's nothing like trying to teach if you want to learn a topic, so I've decided to start a series of blog posts of indeterminate length.

    What are Android layouts? A very short primer.

    Google being an Internet company, when they needed a way to build their user interfaces for Android, they looked at the Web.  And given that they didn't have a single resolution or hardware form-factor in mind, they went with stretchy … more

  • Raising the level of discourse


    I'm as guilty as anyone else of the behavior I'm about to rant about.  I'm making an effort to do better... and I'm challenging you to do the same.

    Or: The one where a grumpy old guy rants about twitter

    I've been inconsistent with my twitter usage recently and I wasn't really sure why.  It just doesn't seem to be providing me with much that I need right now.  Yesterday, I saw a series of tweets and I think I finally figured out what my problem with twitter is... or more specifically, what my problem with the way people are using the medium is.

    A small, curated selection of my Feed from Friday (twitter names removed, but easy enough to find):

    While Satan is … more

  • Things I learned from Users - Conftron at Codemash

    Codemash is always a great experience and this year was no exception.  This year was a little different for me, though... I had a somewhat popular conference scheduling app for the conference.  At the peak, I had over 16k screen views on Thursday, 1/12.  This was nice and gratifying and everything, but the best part was the change to directly interact with people using something I had written.

    What lives in a cave...

    While for a lot of developers, directly interacting with users is part of daily life, it's a bit unusual for me.  For years, I've been doing Line of Business applications where user time was very precious and hard to come by.  After my most recent job … more

  • Devlink Mobile Smackdown–Code and Retrospective

    tl,dr; The code for this is located here, in a BitBucket repository. What was this? I was part of the Devlink Mobile Smackdown, organized by Jeff Blankenburg of Microsoft.  The goal of the talk is to give the audience a brief taste of developing for the 3 big mobile platforms… iOS, Windows Phone 7 and Android by writing a very simple twitter stalker application in 15 minutes (with a hard stop).  I was fortunate to have Jeff ask me to represent Android.  How did it go? At the end of my 15 minutes, I had forgotten one line of code, but was basically feature complete.  The other victims… er… participants, had significantly better looking applications by the end of … more

  • Android UI Helper Eclipse Plugin

    What is this?

    The single most common task I’ve run into as an Android developer is creating and wiring up fields.  Every time you create a new activity, you change your layout.  Every time you change your layout… define the new fields, use findViewById to wire them up to private properties in your activity so that you can actually do something.  It’s not hard, but it is lots of typing and it’s CEREMONY… it’s something you can only really get wrong.

    So what did you do about it?

    As part of preparing for the Devlink Mobile Smackdown presentation, I decided to try to optimize this workflow a bit.  I wrote an Eclipse plugin that would … more

  • OpenSpace Tweets and Conftron

    tl;dr If you tweet about open spaces in a specific fashion, it’s possible for automated systems to pick them up and for them to show up in conference scheduling applications.  Use the format: #codestock #OpenSpace Sat 12:30 Write linkedin recommendations for coworkers & friends! The Goal I’ve always wanted to attend more open spaces, but at many conferences the open spaces are outside the “main flow”, either physically or temporally.  IMHO, discoverability is the big issue here. A Proposal Twitter is a natural solution for this.  Simply tweeting about your open space with the conference hashtag improves the visibility massively… but with a LITTLE extra formatting, we … more

  • Sql Server CE assembly version conflict

    First, thanks to Matt for figuring out where to look for the solution to this issue. In working on the back end services for my Android application, I moved my Entity Framework model from one assembly to another.  After that and some other refactorings, I went to run and was greeted with this error: [A]System.Data.SqlServerCe.SqlCeConnection cannot be cast to [B]System.Data.SqlServerCe.SqlCeConnection. Type A originates from 'System.Data.SqlServerCe, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91' in the context 'Default' at location 'C:\Windows\assembly\GAC_MSIL\System.Data.SqlServerCe\\System.Data.SqlServerCe.dll'. Type B originates … more

  • Android: Problem launching main activity–Permission Denial

    Hoping to save someone else (or my future self) a few minutes. So I’m working on an Android app and I did a minor refactor and reduced the number of activities (screens) in my application and renamed another activity to the name of one of the removed ones.  After recompiling, my app would not start.  “adb logcat” showed the following: I/ActivityManager(  129): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.benvonhandorf.conftron/.ConferenceListActivity } W/ActivityManager(  129): Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] … more

  • Rooting your Barnes and Noble Nook Color–Part One–The SD Card is your Friend

    What’s the Goal?

    Our goal for this post is to get an alternative OS booted up on your beautiful Nook Color without damaging anything.  I’m going to select one of the better-known and more mature ROMs available to make our lives simpler, but if you want to experiment, there are a lot of options available.

    Before we start

    On the off chance that you haven’t even booted your Nook Color (NC) with the default OS yet, do so now.  You need to go ahead and let it go through device registration, creating a account, etc.  Not doing this MIGHT not cause any issues… or it might brick your device.  I recommend finishing the normal path and playing … more

  • Rooting your Barnes and Noble Nook Color–Part Zero

    Why Recently several people have seen my rooted Nook Color around and about and been interested.  I’ve send various and sundry forum links to some of them and a few of them have gone through the process of rooting the Nook or trying alternative operating systems to see the power of this incredible device. After sending out similar forum links several times, I decided to accumulate the instructions into a series of posts in the hopes of making this easier for the adventurous souls willing to go through with it. But As with any process called “rooting”, this is not for the faint of heart.  If you’re not comfortable with strange forums, obscure instructions and possibly difficult … more

  • WPF Ink Friendly Editable Text Control

    I’m rescuing some posts from my old blog.  This topic was suggested by Mike Wood.  It’s a control I’m putting together for my WPF project for fun.  I really like the Tablet PC idea and enjoy using the pen as an input device where it makes sense, so I wanted a label that you could click on and bring up an ink editing panel.  So here we have a list of strings:   Click on one of them and get out the pen! Through the magic of the control and WPF’s 2 way data binding, your listing is now updated! The control itself is reasonably straightforward… it’s pretty much a label with a popup containing an InkCanvas and a few buttons.  There are still a few quirks … more

  • Managed C++ and Unmanaged Libraries

    I’m rescuing some posts from my old blog and this seemed like something I would want to know again at some point, so I’m starting with this one: This started with an offhand remark on the Polymorphic Podcast that there was an accelerated feed available.  Listening to it, I realized that a lot of technical podcasts could be easily digested at, say, 120-130% of normal speed.  For some, it’s a lot more tolerable for me to listen to them this way. This led to the Dream Application.  It would run on a web server and refactor a requested RSS feed to point back to itself.  When a feed reader went to download an mp3, the application would download the mp3 from the actual … more

  • Eliminating magic strings when using INotifyPropertyChanged

    Like a lot of others, I'm learning Silverlight, WPF and all the other facinating new technologies coming out of Microsoft (and elsewhere) these days.  Most of this stuff is incredible, but occasionally you'll run into something that has a bit of a code smell about it.  One of those is the INotifyPropertyChange interface in WPF and Silverlight. In order to make data binding work in these two technologies, entities that have their data bound to WPF or Silverlight controls need to implement INotifyPropertyChanged in order to ensure that the controls are updated when the data in the entity changes.  All well and good, but let's take a look at the interface: // Summary: // … more

  • New blog is finally up

    I'm finally getting some new blog software in place and working to migrate content from my old blog.  I'll also be adding several new posts over the course of the next few weeks as I continue in my investigations of Silverlight, WPF, Entity Framework, Patterns and maybe even some Objective C and other, more exotic ideas. more