Wednesday, September 25, 2013

Story Time: Fun with crazy people

A while ago, I was on a project where we were working with another division the company, and were using 3rd party GIS products to sync up our data.  We were setting up a demonstration, and were on a telcon during the setup.  I had no problem getting the GIS product to communicate to the master database, but the other division was having issues.

Initially, they thought that my system was interrupting theirs.  So, I unplugged the network cable from my machine.  Still, their problem persisted. Then it got weird.
They asked me to unplug the power of my machine. When I asked why, they said that I might have been using Ethernet over power, to which I replied that there was no way this stock cheap machine was equipped with that specialty hardware, it was just a regular old power cable. Despite this, they insisted that was the problem.

So, I did what any sane person would do, and just told them over the telcon that I had unplugged the power of the machine, instead leaving it plugged in and on, but still disconnected from the network. And of course, after I told them it was unplugged, their problem mysteriously vanished.  I still don't know what the problem was. I assume that it was probably something silly and they didn't want to look foolish on the call. 

Thursday, July 18, 2013

Android Studio first impressions

I started playing around with Google's new product, Android Studio (currently version 0.20).  Previously, the provided a plug-in for Eclipse to assist in Android development.  The new tool is based in the IntelliJ IDE.

The integration with IntelliJ is a lot nicer than the previous integration with Eclipse. For one, it's just one download, instead of having to get Eclipse and the ADT separately. They provide some handy wizards to get you started as well.

I tested Android Studio out by crafting a small note-taking app.  I used their blank layout template, and just ran from there.  The GUI editor is much improved from what I remember the Eclipse version having.  It's approaching Visual Studio in style, especially in being able to assign method as the click handlers for buttons.  This makes it a little easier on the developer.

Running in emulation is relatively painless, and they include a good number of template VM's to try.  Granted, the VM's can still take a while to load even on a good workstation, but the overall creating and VM and launching is simple enough. 

Overall, I look forward to playing around more with the IDE. It's nice having a more fully integrated environment, and it'll be interesting to see what other features they add.

Friday, April 12, 2013

More GWT Thoughts

One of the really nice parts about GWT is their GWT RPC (Remote Procedure Call) interface.  It functions similar to RMI in Java, where you define methods on an interface, and just extend  the RemoteService interface.  For example:

public interface SampleInterface extends RemoteService
{
    public void myMethod();

}

You end up requiring an Async interface as well, that takes a callback as one of the parameters, but the GWT plugin for Eclipse will actually generate that for you, and prompt for changes to methods in one or the other if the method signature changes.
 
So, you get all of your handler code in a method, that's able to be called directly, without invoking any lengthy servlet strings directly.  It's extremely nice.

For more information and examples, you can check out https://developers.google.com/web-toolkit/tools/gwtdesigner/wizards/gwt/remoteservice

Thursday, September 27, 2012

Random Thoughts on Regular Expressions

Last year I got to work on a persistent URL implementation for the National Archives, and regular expressions were a god-send for that.  I had used them before in bits and pieces, but for this project I had to use them pretty extensively, to match patterns in a URL, extract those patterns, and convert them to the appropriate values for the persistent URL.  It also doubled nicely as a security measure, ensuring that I didn't grab characters that shouldn't be processed.  However, I had to beware that I didn't go overboard on the pattern matching, as there were often simple cases that it was overkill for, like always searching for a specific text string in a URL.

On the security side of things, they also came in very handy for validation of entry fields in the forms.  Need a  ensure that your phone numbers are entered in a certain fashion? Regular expressions are great for that.

Saturday, August 4, 2012

GWT thoughts

I'm really digging playing with GWT, and their MVP pattern makes it pretty easy to make some reusable and maintainable code.  Combined with the Twitter gwt-bootstrap library, I can crank out some decent looking web components.

I'll try to link to some good references later, since the most commonly found example for using MVP isn't terribly up to date.

Sunday, May 20, 2012

The awesomeness of Rocksmith

Rocksmith is just a fantastic game and learning tool. I picked it up a couple of months back and it rarely leaves my 360 game slot. Quick and dirty is that it provides a cable that lets you use your real guitar to play songs which are basically provided in a tab format.  The game's difficulty ramps up as you go; after you go through the tutorial, you realize you are playing the opening to Satisfaction by the Rolling Stones.

The initial song list is mostly classic rock and modern alternative rock, which is fun to play, but not really my favorite type of music. Fortunately, there's downloads for Judas Priest, Blink 182, the Offspring, and the Police to help with that, and more on the way.  I easily find myself saying "just one more song set", and then it's way past my bedtime.

An added benefit to the game is that there are a number of mini-games that focus on particular guitar techniques, such as chords, bends, and scales.  The games are fun, and very useful.

Overall, it's a great game and tool, and definitely worth a pickup for any guitarist that wants another way to get some practice time in.

Monday, March 26, 2012

Android and Eclipse GUI editor

The Android GUI designer in Eclipse is probably the best Java GUI editor that I've seen. It actually lets you position components instead of railroading you into Java layouts. It's not without its problems, but it's a nice change of pace.