Innovation can be found in Gov 2.0

It’s a Friday night in downtown Seattle. The sounds of squawk, wonks, and beep erupt from the glow of neon lights on a monitor sitting near the street corner cafe. People gather around the monitor waving. A person in front of the monitor presses buttons and moves a joy stick. The machine looks and sounds like an arcade game. It isn’t. In fact, it is a game that allows people to interact with other citizens across the city of Seattle in a project called The players are playing in a multiplayer game to solve and interact a puzzle problem.

This is one of the many ideas to come out of idea hubs initiated by, Code for America. A non-partisan, non-political 501(c)(3) organization. Code for America was a brainchild idea to recruit Silicon Valley developers to work with city government. But how do you get the best and brightest to work for the government?

First, the problem. When the housing market crashed around 2007-2009 it took a lot of tax revenue away from local and state governments. Cities had less money, resources, and needed to do more.  Roads were pot hole ridden, and blighted areas were appearing around shuttered foreclosed homes. This is where the challenge started for cities.

Silicon Valley companies know the importance of a web presence. They know how to engage their customers using mobile devices and the web. Building interactive websites that makes customers want to come back the company’s site. Actively campaigning their customers with additional services and features through email and site presence is important.

Code for America recruited programmers and designers to collaborate with city governments under a fellowship program. The concept of the program was to bridge the gap between private companies with government. One of the first application collaborated on with the City of Boston was, an ”adopt-a-hydrant” application. This let citizens adopt and name a fire hydrant if they ensure it was accessible to fire fighters after a snow storm. This solved the problem of using city resources to find and make sure fire hydrants where easily accessible after the city was blanketed by snow by interactively enlisting local citizens.

The City of Long Beach, California, was spending a huge amount of time managing their inspection request process. Their citizens would call in and leave voice mails for inspection schedules. The city spent over 1500 hours of staff time to manage the workload. The city teamed up with Code for America to create a minimum viable product, called Inspector Gadget. The process took managing business and contractors requesting inspections from 5 minutes down to a 30 second via an online process. This little change saved the city valuable time and money.

Key to solving a problem is to understand it. The second is don’t dive head first into a solution to solve the problem. Think. Figure out what minimal viable product is needed to solve the problem. There is never a one solution that solves all problems.  If that were the case, there would only be one operating system or mobile device manufacture in the market. People and problems create unique opportunities.

Gov 2.0 or e-government is still in its early phase, as government leaders start to realize they need to find solutions to their technical problems. Software as a service (Saas) solutions like Google docs provides flexibility to work anywhere with any device. Google is providing the same services for managing a document sharing and email at a much lower cost. Cloud providers like Amazon and Microsoft can provide servers and databases at lower long term costs than having to physically maintain a data center with all the required redundancy and power backups. The great thing about both Saas and Cloud hosting is that the software and services is always being upgraded at no cost to the user.

For e-government today, an on-line presence is no longer a nice to have function of local government. It has become a required tool for citizen engagement and cost reduction.  As such, there should be considerations on build verses buy approach. If it is a must build decision for software, then look for existing open source projects are out there. Someone may have already invented the wheel. If the decision is a must buy, look at all the options. Don’t figure the most expensive software is the best.

Government Transparency and Open Source Software

How it seems the most unlikely of events to see two worlds collide. Government and Open source software. Government has always been considered closed and mysterious collecting all sorts of information on its citizens. Open source software, on the other hand, with its progressive mantra of software should be free including the source code.

In the 1990’s, open source software was bad and horrible business idea. Microsoft executives in 2002, said of open source software that “is an intellectual property destroyer.” Here we are more than a decade later and Microsoft is still flourishing. They even open sourced many solutions and tools. There are many big companies that are more competitive because of this change in business philosophy. Some of these companies are thriving because developers are adopting their technology and eco systems.

Tin hat theorists, I’m not going to head down into a discussion on transparency of the US National Security Agency, FBI or CIA, because it won’t happen. What I am going to focus on how various agencies in the government are making some pretty cool open source projects, based on government transparency.

Various government agencies have been forced to create leaner, faster solutions for citizens. This is happening more and more as citizens demand more transparency on data being collected. Government information technology departments are being required to innovate. Hmm, government and innovation is some sort of an oxymoron.

The US government has created some pretty innovative projects in recent years. One group is a consulting group in the US government, called 18F. This group does project consultancy work for various government agencies, and then open sources the software. Yes that means you and me as tax payers paid for that code, but we have access to use it as we want for our own business applications. There are a number of other projects that this group and other sister groups within the US government have created.

Here are some of my favorites. Bear with some of the names, they are not acronyms of the old government think tanks. They are inspirational project names open source developers come up with in your 20-30 something age range.

Raktabija, is a bootstrap framework for a new Amazon Web Service account with vpc and auto scaling groups. A nice solution for managing multi-tenant cloud environment and data centers. It can tear down the cloud. This is great for developers that like to stand up lots of EC2 instances and forget to take them down after they are done testing or developing.

Qu . This pretty cool it’s a data platform to publish public data sets. Yes I know you could host on socrata, but if you want to host in your own cloud and be able to serve out a data set which allows an api developer access to your dataset this might be it. This is intended for more open data so if you don’t want to give people access to public data sets this isn’t for you. . Oh, how government has loved to make the most un-user friendly websites. Ever try to find anything on a USDA or IRS website? They are literally tab and many menu levels deep designed sites. Oh, responsive design for mobile devices? Yeah not all of them support that. Government is big so they had different UX designers from different era’s designing these websites. Looks like there is a draft standard for US government web designs. It is almost patriotic in color scheme with the red white and blue. It’s not Bootstrap but it is a lot better than the current government UX landscape.

eRegulations. Oh the joy of reading regulations probably didn’t get better, but it is so much nicer to read. I like to think of it as Javadoc for regulations. Simply run your tomb of regulations into the parser and out pops a nice UX looking searchable site see (

Federal Icons . You can never have enough icons for your mobile apps or websites. Right? Oh yes, Fontawesome is awesome, but here is some icons created by the Consumer Financial protection Bureau that are open sourced.

This is just a few of the many projects that have come out of the US government recently. It will be interesting to see how open source evolves government like it has done for technology companies over the years. In some ways, Pandora’s box has been opened and citizens are demanding transparency and accountability, and these projects look like a great start.

Evolution of the Internet

Many moons ago, in the span of software development, I had built out a quick template of code using the latest and greatest frameworks at the time. This chapter in time was a set of java based frameworks to build a web application. In the need to know circle, I was using Spring for dependency injection, hibernate for object relational mapping, Java Server Faces 1.2(JSF) for controller/view with Primefaces for pretty view. That was the year 2011 so we are talking old school.

Since that time, JSF has gone to version 2.2. That is to be expected as APIs evolve. The only thing is this evolution portends another end to a model view controller framework. Developers went through a renaissance to separate the view from the controller even more. The reason for this acceleration was mobile devices. Mobile devices forced developers to think of the user interface as needing to be flexible to run on a minimalist screen size and at the same time look good on a desktop size browser. Yes, new word of the day became “Responsive Design”.

JSF was going to be the new darling in late 2010 allowing developers to drop components on a page to wire up a form or website and bind it to data models. Development of interactive websites were going to be much faster to develop. Redhat, who acquired JBOSS application server, and even started its own implementation to the JSF specification creating Richfaces. Yeah! More rich components to make awesome websites faster.

Yeah, that was a short lived experience as Richfacess hit an end of life June 2016 (RIP). Like I said in the beginning “many moons ago” is really short in software development land.

What happened is that with Jquery, aka javascript on steroids, and AJAX (more steroids for javascript). Developers realized they can let the User experience(UX) teams focus on the interface and make AJAX calls to the servers and not be bothered about doing a re-deployment of the application server.

This brings us to a point where web pages simply interact with application servers by making REST based calls. Developers only have to make REST services that mobile browsers, desktop web browsers, or even other applications can interact with business services. The internet has expanded once again from just being web pages. This allows it to go beyond to other devices and services running in smart devices.

Overlap2d Project setup

Overlap2d is a nice little alpha project as of this writing that allows designers and developers work together to put together games leveraging libGDX, Box2d. The goal is to show how to create a new project using the libGDX wizard and then make the necessary configuration changes to the project to incorporate the Overlap2D runtimes, which are not yet available as a library dependency as of this time. Welcome to alpha land!

Some key things to notes. The following assumes that Java SDK 1.7 is installed. LibGDX libraries, and Overlap2d runtime are downloaded. If the project is going to use Android get the latest SDK. One of the first things, especially if using the latest version of libGDX there are changes to use gradle builds. These steps demonstrate LibGDX version 1.3.1. This is newer than the Overlap2d runtime project dependency at this time.

First step is to use the LibGDX project wizard gui to create your project. In the Overlap2d tutorial there is more information. For this example we will build the desktop and android subprojects.

Once libGDX project setup runs and builds the subproject folders copy the Overlap2D runtime to your project as a sub project. The folder structure looks something like this:
Project structure

The next steps are to make adjustments to the main project and sub project build.gradle files. The first build.gradle file to edit is the overlap2d-runtime-libgdx-master subproject that was just copied into the project. The change in this file is to change the dependency for libGDX to the current version of libGDX. Change the line with gdxVersion=’1.2.0′ to gdxVersion=’1.3.1’. The result change looks like this:

ext {
    gdxVersion = '1.3.1'
    box2dlightsVersion = '1.2'
    reflectasmVersion = '1.10.0'

Go to the main top level project folder and edit the settings.gradle file. The settings.gradle tells the gradle build to include the runtime environment. When running multiple Overlap2d dependent projects in the same eclipse workspace and each project has an Overlap2d runtime dependency this can be configured in a couple of ways. This configuration steps assumes that each project has a subproject of the overlap2d runtime in them, therefore the compile project name is different to allow eclipse to import it without saying “the project dependency already exists”.

Add to the settings.gradle, the reference name  to the overlap2d and the subproject file information and save it. The complete file looks like this:

include 'desktop', 'android', 'core','Overlap2dSideRuntime'
project(':Overlap2dSideRuntime').projectDir = new File(settingsDir, 'overlap2d-runtime-libgdx-master')

Notice that the directory name of the Overlap2d runtime is kept the same. Just the project name reference is different.

Open the build.gradle in the same top project folder. There are two sections that need to change. The android and core project references need to be changed to include some dependencies for compiling.

In the “android” project dependencies section, add the box2d dependencies needed for the Overlap2D runtime, since Overlap2D is built against box2d version 1.2. The line being added to the dependencies for the android project is:

compile “com.badlogicgames.box2dlights:box2dlights:1.2”

The android project section change result looks like this:

project(":android") {
    apply plugin: "android"

    configurations { natives }

    dependencies {
        compile project(":core")
        compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
        compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86"
        compile "com.badlogicgames.box2dlights:box2dlights:1.2"
        compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86"

The project “core” in this same file needs to also have reference to box2dlights version 1.2 and add in dependency to the Overlap2d runtime this example shows the renamed the project for compile as described in the settings.gradle mentioned above to the Overlap2d runtime subproject in the workspace:

project(":core") {
    apply plugin: "java"

    dependencies {
        compile "com.badlogicgames.gdx:gdx:$gdxVersion"
        compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
        compile "com.badlogicgames.box2dlights:box2dlights:1.2"
        compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
      compile project(":Overlap2dSideRuntime")

The final step is to import the new project into Eclipse. Make sure that eclipse has the gradle plugin. Then for the workspace select File > Import. In the import dialog, select Gradle > Gradle Project. In the “Import Gradle Project” dialog select the root folder of this project, and then click “Build Model”. This will then load the project and sub projects into the dialog. Select all the projects, and then select finish.

Eclipse Import

That should import all the projects. You can test running the desktop application and get the badlogic example, and you should be able to also build the android APK.