Coming Up for Air

Book Review: 50 Android Hacks

Cover _50 Android Hacks_ by Carl Sessa is, as you may have deduced from the title, a collection of 50 tips and tricks to help Android developers of all skill levels handle a variety of problems. For the most part, I found the book very helpful. Before I get to that, I have a minor quibble: I'm not sure "hacks" was the best choice of words. I understand the marketing aspect of it, but when I hear "hack", I think of a piece of code I'm embarrassed to share with someone else, of something I'd prefer to hide. These "hacks" seem anything but. Clean, clear, efficient, something to be proud of. It's a minor quibble, of course, but there it is. :)

The book itself is pretty easily laid out. If you've read a "cookbook", then you should be comfortable and familiar with the basic layout. Each chapter is a different tip, which range from the "easy" (e.g., centering text in a view) to the more advanced (e.g., using the SyncAdapter ). The topics covered include layouts, animations, build tools and more.

I read this, appropriately enough, using the Kindle App on my Android tablet, and the experience was very good. I've read several programming books on my tablet, and they usually have issues with unreadable source code, large blanks due to content flow issues, etc. Some of this is affected, of course, by the font size and is fixable, but I saw none of those issues here. All of the source, both XML and Java, were neatly formatted and readable, with no odd, jarring line wrap issues. The graphics were crisp and readable, and the pages were neat and clean.

This is a great book, especially for beginning to intermediate Android developers, but I'd wager that there's something here for just about everyone.

Integrating Bitbucket and Jenkins

If you're like me, you have your source code hosted in a hosted environment (such as Bitbucket ), but you have a local continuous integration server (such as Jenkins ). It would be really nice if you could have Jenkins build your project every time you commit, but without the heavy requirement of polling your repo. In this post, I'll show you how to integrate the two to do just that.

CLI Libraries Compared

I recently ran across a couple of pretty cool libraries for creating command-line tools: Airline from the Airlift project, and crest from Tomitribe . Having spent the last few years working on administration for GlassFish, this is an area near and dear to my heart, so I thought I'd cobble together a quick example using each to see how usable they are.

Android Lifecycles

Jason Lee 2014-01-03

I've been getting a number of bug reports from my app Cub Tracker that had me stumped. I was getting NullPointerExceptions where I shouldn't be. After some digging, I think I finally found the culprit: device rotation. While rotating the device does, indeed, trigger the error, it goes deeper than that. My problem is that the app doesn't correctly save the state of the view, which becomes problematic when, for example, the device is rotated. In trying to fix that, I discovered I don't understand the Android lifecycle as well as I should, so I set out to fix that.

Search

Quotes

Sample quote

Quote source

About

My name is Jason Lee. I am a software developer living in the middle of Oklahoma. I’ve been a professional developer since 1997, using a variety of languages, including Java, Javascript, PHP, Python, Delphi, and even a bit of C#. I currently work for Red Hat on the WildFly/EAP team, where, among other things, I maintain integrations for some MicroProfile specs, OpenTelemetry, Micrometer, Jakarta Faces, and Bean Validation. (Full resume here. LinkedIn profile)

I am the president of the Oklahoma City JUG, and an occasional speaker at the JUG and a variety of technical conferences.

On the personal side, I’m active in my church, and enjoy bass guitar, running, fishing, and a variety of martial arts. I’m also married to a beautiful woman, and have two boys, who, thankfully, look like their mother.

My Links

Publications