Coming Up for Air

Writing Bash Scripts with Parameters

In the course of my work, I often find myself writing a script to automate a routine task. Almost invariably, there are cases where I need the script to behave in slightly different fashion, but only occassionally. My early scripts rather crudely used one if after, which is not very elegant. Finally, after tiring of this clumsy approach, I searched for a better way and found one: getopts. In this shortish entry, I'll give a very brief introduction to getopts, and show how I write my scripts now.

Simulating Swipes in Your Android Tests

Jason Lee 2013-02-13

As some of you may or may not know, I have small Android project, Cub Tracker , that I've been working on for quite some time now in my spare time. I've been trying to be better about quicker releases, but all the testing for the app is currently manual (and, therefore, hit-and-miss), so updates tend to be a bit slower and very cautious. (For the record, it used to have pretty decent tests, but I rewrote the app for version 2 and just never got around to porting/rewriting the tests.) My next change, though, will be pretty invasive, so I've decided it's time to fix that. In doing so, though, I hit a snag pretty quickly. Cub Tracker now uses a ViewPager as the main form of navigation, and I quickly realized I didn't know how to swipe from one page to another. It turns out there are several different ways to do it. Here are some...

Oracle JDK and the Linux Alternatives System

Jason Lee 2013-01-15

For both work and fun, I run Linux. I'm also a Java guy, which poses some interesting challenges, as most Linux distributions have a long, sad tale regarding shipping Java. Things are a bit better, I guess, with OpenJDK, but I've always liked running the "real thing", which historically meant the Sun JDK, and now Oracle's JDK . At the moment, though, I'm running Linux Mint , so I get to use the tarball.

Most of the time that works fine, but for reasons I don't remember, OpenJDK was installed on my system, and now everything is using that (which is at Update 7, and not the recently released and more secure Update 11 that I want). I'd rather not monkey with changing PATH and all that, so I turned to the Linux alternatives system to handle things. Sadly, it wasn't quite that easy, as alternatives needs to know about your alternatives, so before I could change things, I had to educate it, which turned out be easier than I feared. With Java 7 Update 11 installed in /opt/java/jdk1.7.0_11 and symlinked from /opt/java/latest, I had to do two things.

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