John Leehey's Blog

A brain dump for my experiences with code

An Alternative to the ViewHolder Pattern

In Android development, there’s no getting around learning how to correctly implement your own ListView adapter. A quick google search will teach you how to quickly spin up an ArrayAdapter, but usually devs tend to just roll their own extension of BaseAdapter.

In order to be efficient with the override of getView(), avoiding calls to findViewById() becomes necessary (findViewById is a relatively expensive call). This is where the ViewHolder pattern comes in. Google’s own docs expand on usage of the ViewHolder pattern, but for the last few years I’ve drifted towards taking a different approach.

Trying Octopress

Hello World! I’ve never really maintained a blog before, so I thought I’d give it a shot. The style of Octopress intrigued me, combine that with the fact that it had an easy script to deploy to a github page and I was sold. I’ll also admit that I recently purchased a mechanical keyboard (Cherry MX Brown switches!), making typing an insane amount of fun. Seriously, I had no idea what I was missing out on, and if you haven’t tried one out, I highly recommend it.

I’ll launch an About page sometime soon, but for now know that most of my development experience is focused around Android, along with varying degrees of experience with several technologies involving frontend and backend web development. Right now this post is being composed through vim, but I think I’ll be taking a look at the Markdown syntax highlighter with notepad++ soon.

So anyways all, thanks for being here, I promise my future posts will have better content.

Woo! Markdown Header! :)