Software PDP

Software Development Professional Development Plan

iPad Bible Study and Teaching

The iPad is a great teaching aid due to its capabilities and portability. It is much more natural and simpler to teach with a tablet than a computer and/or many books. However, there doesn’t appear to be many Bible study apps designed for research, study, lesson planning, and teaching. Instead, the focus tends to be on research, study, and note taking. As a result, I’ve searched through the app store looking for good teaching apps and have a current list of favorites and not-so-favorites. Here they are.

YouVersion
This is a great app for copy, paste, bookmark, note taking, reading plans, listening to the Bible, and social sharing. I have used this app since it was first released, and have enjoyed seeing the redesigns and new features.

The drawbacks for me are the community note influence, lack of commentaries for study, and lack of lesson planning. The community notes seem like a great idea, but they are not peer reviewed, they are not carefully researched, and are not the way the Bible has been instructed to be taught–through preachers called by God. As for the others, having the commentaries inside the app would be helpful for context sensitivity and reduction of app switching. Lesson planning would be similar in that context would be helpful, formatting would be helpful, and a reduction in app switching would ease the pain.

The website is also a great compliment to the mobile apps.

Bible Gateway
I have only started using this app, but like where it is going. With the commentaries built in, I did not switch from app to book to apps, etc. so much. The ability to format and use notes as lessons would be a great addition.

HCSB Study Bible
This is a lot like the Bible Gateway iOS app in that it has commentaries built in. I would prefer ESV, and would prefer to be able to download other commentaries within the app, but it appears that that has been turned off.

Google Play Books
I use this for some literature such as MacArthur Commentaries. I would now prefer to use iBooks or better yet, have them integrated into the Bible study software.

iBooks
This is a nice app for reading and referencing. I wonder what other note taking, marking up on books will be natural feeling in the future. I just hope iBooks continues to innovate.

Pages
This is a great app for teaching because it allows formatting of text. Using bold, structured outlines, pictures, links, etc. is important. The problem that I have is that the there isn’t much of a presentation mode, in that you don’t need page divisions if using to read through notes.

Notes
This is what I use for quick prayer lists, etc. that would be useful to send to someone else. It is nice that the text is not formatted, and makes for easy sharing, but not great for structured content.

Base64 in JavaScript

Following Nicholas C. Zakas’s post about encoding to Base64 in Javascript, I made an example of getting decimal, hex, and string values from a Base64 encoded string. View my working example Base64 JSFIDDLE.

See Zakas’s post on NCZOnline for an explaination.

Current Developments: Summer 2011

  • Java 7 is out and looks really interesting; fork/join, object utils, and path features should all be worth their weight in gold
  • The Squawk VM and SunSPOT devices look really cool; similarly the Google Android ADK is pretty neat, but I haven’t had time to develop on it yet
  • Building android apps is next up for my development plan
  • Google Chrome is quietly becoming a necessity for many. After the dust settles on the smart phone/tablet explosion, I think the demand for powerful webapps (and thus browsers) will have the drive for developers, etc. to require end users to use Chrome (for HTML5 feature support (e.g. worker threads), and multiple/tab processes)
  • “Family Driven Faith” by Voddie Baucham is very welcomed at this point in my life as a father and husband

First Run with Nike+ SportWatch GPS TomTom

Buying the NikeSportWatch was a painful decision for me. Using a Galaxy S smart phone for GPS with live RunKeeper run transmission to the website and heart rate monitoring was a great idea. The problem was: GPS on the Galaxy S was not so accurate, no foot pod for cadence and loss of GPS signal, and the bluetooth Polar WearLink+ HRM would completely lose connection with the Android smart phone. These are the things that persuaded be to carry even more hardware on my runs.

The Nike+ SportWatch connects quickly and easily to the foot pod, satellites, and even the optional heart rate monitor. The SportWatch uses ANT+ for its wireless communication technology, which is extremely low in power consumption and super efficient in tx/rx.  The result? All attached sensors worked throughout my first 5 mile run for 50 min with the unit.

The SportWatch was somewhat large, but still comfortable on my wrist. After the run, plugging the SportWatch into my work Windows 7 64 bit PC flawlessly awoke the Flash management application, and my data was instantly uploaded to the Nike+ web application. After I checked out the state on the web, I took a look at the JSON response text for the run, looked at the GPS data, and found the watch to be updating GPS coordinates every one second (recorded in milliseconds, of course). Comparing to a running buddy’s Garmin Forerunner 210, he says that this is a great feature, and that many GPS watches are lazier at recording GPS data.

The HRM only lost reception two times in the run, which I consider to be just fine. However the Nike+ web application should display the last HRM in such cases, as it reported that for one of my mile splits that no heart rate was available. At least a smart guess would do, considering that so much heart rate data was available.

Oracle, IBM, and Apple on OpenJDK

As a Java software developer, I am excited about the recent press releases from Oracle, IBM, and Apple to partner on the future development of OpenJDK.

I developed Java software solely on a Mac for about five years, and while I love the Mac, didn’t really love Java on the Mac.  I ran into issues with the Java SE6 JVM that seemed to be more of a headache, than the Mac experience that you expect from their auto-update utility.  Hence, why I believe that this is a step in the right direction for Apple and Oracle.

IBM, on the other hand, has really caught my attention recently.  Their developerWorks articles and resources have been a huge help to me recently when checking out JNI best practices, and just an introduction to JNI.

What I would really like to see from an OpenJDK alliance is a free, open source, real-time JVM.

As I get into more embedded and real-time Java programming, I am finding that the real-time Java community is very a specialized subset of Java developers, with an interest in the academia of real-time computing and Java in general.  With that said, it appears that this group of developers using real-time Java have their expenses paid either by the companies contracting their work, or by association with an academic institution.  And by expenses, I mean the $7000-$14000 up-front development tools prices for Sun Java Real-Time System, IBM WebSphere Real-Time, Aonix PERC, and Aicas JamaicaVM.

Oracle, IBM, Apple, OpenJDK partners: make us a free, open source, real-time JVM and JDK that will inspire innovation.

Now that OpenJDK has two BIG players on their team, why not make something BIG happen, other than just the expected?  The truth is, Apple is an embedded device company, IBM works on all fronts of Java technology, and Oracle/Sun could stand to earn Java a more reputable name for embedded and real-time programming.  In spite of how great Android/Apache Harmony/Dalvik is, Java ME, etc., Java is still thought of as a heavy, non-deterministic, non-real-time capable language by many real-time and embedded developers strictly using C/C++.  I know that the real-time JVMs are out there, but they are expensive, and unrealistic for innovation without a ton of money up-front.  I believe the opportunity to be available with the OpenJDK project at this time with its recent alliances, and I hope to see innovation in the real-time Java arena.

Using Squiggle for Object Oriented SQL Selects

I am now testing the use of Squiggle for writing SQL sellect statements in an object oriented fashion.

Coming from a background exclusively using Hibernate for database interaction, I am looking for a similar style of query building.  I would also like to bring some level of safety to the table names and column names, so that I am not typing in the names of tables and columns when writing queries.  It seems that Squiggle provides the simple functionality that I am looking for, paired with Spring configured table map beans with the table name and column names.

A simple example provided by the Squiggle authors on their Google Code project page is:

SelectQuery select = new SelectQuery();

Table people = new Table("people");

select.addColumn(people, "firstname");
select.addColumn(people, "lastname");

select.addOrder(people, "age", Order.DESCENDING);

System.out.println(select);
Which produces:

SELECT
   people.firstname ,
   people.lastname
FROM
    people
ORDER BY
    people.age DESC

Not great, but not bad for cleaning up messy string-concatenated queries.

Spring JSON Response for ExtJS AJAX Request

Both ExtJS and Spring have proven to speed up development for many projects on which I’ve worked. Both frameworks handle JSON very well, and so AJAX development moves very quickly. I will show you the quickest AJAX example that I can using Spring 3.x and ExtJS 3.x.

In your controller:

@RequestMapping(value="/exampleJSON", method=RequestMethod.POST)
@ResponseBody public Map getExampleJSON() {
    Map jsonMap = new HashMap();
    jsonMap.put("success", true);
    jsonMap.put("total", 1);
    jsonMap.put("items", new String[]{"item1"});
    return jsonMap;
}

Things to note:

  • Your items can be any collection of objects that you wish. The JSON response will be the String representation of each field within those item objects.
  • The request method must be POST. ExtJS requests via POST when performing an AJAX request.
  • The three items that must be included for ExtJS are:

    	{"success": boolean,
             "total": number,
             "items": [array]}; // This can be any name.

     

As long as your Spring JSON configuration is correct, the response will be a purely JSON response with exactly what your ExtJS needs.

For a more type-safe approach, you can create a class to return as your response body JSON object.  I usually call these classes command classes.  When I to go this route, I have a base ExtJS JSON command class that has:


boolean success = false;
int total = 0;

I then add the collection of items in the extending command class, so that it can be a List, Array, Set, or whatever else suits the requirements.

Having a command class does offer you the advantage of binding JSON coming from the request directly to the command class via the @RequestBody Spring annotation. The fastest way to have JSON returned as the response, though, remains the Map implementation in my experience.

64bit unsigned ints and XML-RPC

XML-RPC is a great way to communicate data between different platforms, such as C++ desktop, Python web, and Java mobile.  However, the XML-RPC spec is very limiting when it comes to data types.  In particular, a C++ application may have a 64bit (i8) integer that it needs to send over XML-RPC, however would not be able to, since XML-RPC is limited to 32bit (i4) integers.

There are a few solutions to this problem, but all involve extra processing time to convert them to a different data type on both the sending end, and then again on the receiving end.  Not only does it take longer to process the data, but also begins to clutter the code with conversion code, which can be confusing.

Two methods of transmitting  this data would be to convert the long integer to a string or convert it to a byte array.

Should the XML-RPC spec be updated to include longer integer values?  I think it should.

Customizing Webapps with Maven WAR Overlays

Many companies have a core product, or many, that are sold with the intention of customizing that product to the client’s needs. There are a few approaches to this, and one is built directly into Maven’s WAR plugin.

Maven’s WAR plugin will take any dependencies that have a type of “WAR” and overlay them on top of the building projects WAR, before adding the building project’s files. This alloys quick project creation, customization, and retains the core features that are built into the overlaying WAR dependency.


<dependencies>
<dependency>
<groupId>com.softwarepdp</groupId>
<artifactId>overlay</artifactId>
<version>1.0.0-RELEASE</version>
<type>war</type>
</dependency>
</dependencies>

Spring in Practice with Spring 3

Spring in Practice by Wheeler(s); Manning Early Access ProgramManning is publishing a new (as of this post) book entitled Spring in Action, by Willie Wheeler and John Wheeler, on which I will be basing my software development PDP for January to June 2010. The book is mostly written, but is part of the MEAP, which means that the final version has not yet been published. I have been reading through many chapters, and already recommend Spring in Practice.

I will mainly be focusing on Part 2 and Part 3, which covers basic Web application functionality and domain-specific topics, respectively. The reason I am focusing on these parts is because we often get many of these features for free when starting a new project, whether via a ramp-up project like AppFuse, or via internal company base projects.

My experience with Spring began in 2006 with Spring 2.0. I have developed projects using 2.0, 2.5, and am now approaching 3.0. I am excited about Spring 3.0, and will be focusing on the new features that it brings while developing my PDP project.

Update: The book has yet to be released–almost a year later. IMO this is bad sales practice; something I’ve seen at a previous job and should have avoided. Moving on…

Follow

Get every new post delivered to your Inbox.