Sunday, November 27, 2011

RIP Anne Mccaffrey

Before my mother began reading romance novels (yuck), she read fantasy books.  More specifically, she read Anne Mccaffrey.  My mother pulled from her collection my first fantasy book, Dragonsong.  It was a quick read, but it took me to a far away world.  The threat of thread, ancient lifestyle, dragons it all took hold.  I quickly moved from DragonSong to DragonSinger and DragonDummer finishing up the Harper Hall Trilogy.  From there the other Pern books which took on a slight scifi bent, then the "Ship Who Sang" and many other series by Mccaffrey.  My cousin suggested one of my other favorite authors, David Eddings, because I liked Anne Mccaffrey.

Anne Mccaffrey died this past week from a stroke.  Anne, you brought music into a genre of of swords, magic and mythical beasts.  Your books took me out of childrens literature and opened me to hundreds of authors and worlds.

Thank you

NPR Article on Anne Mccaffrey

Thursday, November 24, 2011

Programming: Putting all of the Pieces together (Part 3)

Testing the individual units of the code is great for making sure each unit works.  Integration testing is fantastic for making sure the code fits together as intended.  What about testing the interface from the users prospective?

It all starts with plan, when I was a developer at the library we spent over a year combining 4 disparate ticket tracking and inventory systems into a single system that could link library hardware to the request for its purchase, any trouble tickets, etc.  As we were finishing the project our boss asked for a test document.  When complete it was a hundred and fourteen pages complete with step by step tests to be performed from the user interface.  Running through every page would take us about two to three hours.

A few years older and a few years smarter and I still make my team write those test plans.  However, today I'm making them create parallel selenium tests for every item in the document.  The current project is around 50 pages and the tests take 5 minutes, on slow.  The best part about this, selenium doesn't get bored and skip tests.  I don't know how many times, my own boredom caused me to miss an error in a function that I hadn't anticipated would be affected by my change.

So at this point I have tons of tests being generated.  I'm working on changing the workflow of my team so that they analyze the problem, start a new branch, build tests, code and comment, run tests, then push to our main branch.  They are starting to get better, but how do I take this from "you should do this" to "this happens every time". . .

Wednesday, November 23, 2011

Programming: Putting all of the Pieces together (Part 2)

Lets take a look at what I have to start with:
  • Bug and Feature Tracking using Fusion Forge
  • Git Repository
  • Git Flow
  • Grails Framework (Built on Groovy, Built on Spring, Built on Java)
What did I learn from VIVO:
  • Style enforcement through eclipse
  • Hudson/Jenkins for Continuous Integration
  • Seleninum for Acceptance Testing
The tools are there, now its time to start putting them together.  Our old projects, our non-VIVO projects, have never used unit tests.  Its a change in style that even our more senior engineers are just now starting to do.  What is a unit test?  According to Wikipedia it is "a method of testing an individual unit of a software project."  In our case, it is a test of each class in our Grails project.  Its interesting teaching developers to test.  If a model (or domain) accepts null values, do you have to test that it will save and validate when given a null value?  Of course you do, but until that's a part of your programming knowledge base it might not occur to you.  If you test that a model properly fails validation when given a null value for a field that is null, do you have to test for the error that is returned?  Yes, just testing for the validation doesn't allow you to confirm that a the view will be given the proper error.

Lesson 1, when changing the culture of development at your group you may encounter slackers.
Lesson 2, be specific when you say "fix the tests", explain that means fixing either the code or the test depending on the reason the test is failing.

So, we are learning as a group to test more.  Unit tests lead to integration tests, which thankfully in Grails are built similar to unit tests.  We've stumbled, found tests that are basically integration tests in unit tests and vice versa.  Found items that should have been tested for and failed later.  Next step, acceptance tests!

Programming: Putting all of the Pieces together (Part 1)

It struck me the other day as I attempted to navigate my project's git log to review code that my team had pushed into the repository, something was missing.  It's taken a long time to pull myself out of the student programmer headspace and towards a full fledged developer whose code is sacred and must retain its history.

A Little History
I didn't get started with computers until around 2000.  Of course we had one at home, but my father is a programmer and for him at the end of a long day working for a bank he didn't want or need a computer at home.  Until 1994 we had a little black and white dos box.  That was replaced by a 386 with windows 3.1 until 1999 when I would get my own computer for college.

Fast forward through 5 years of school 2 spent as pre-med and 3 as computer science and enter my first programming job at the UF Computing Helpdesk.  It was a part time job with-in a part time job.  When items were finished they went to production and that was that.

From there I went to work at Smathers Libraries a Microsoft shop.  We used Visual Studio and Visual Source Safe at first.  For those who are rabid against MS, set aside your anger. Visual Studio is quite nice even though it is proprietary.  Visual Source Safe on the other hand, absolutely abysmal.  It would claim files were locked by one user only to find that person didn't have the file locked and could not unlock it.  It would over write newer files with older files when a person saved.  In summary, it stunk.

So we switched to the next best thing, in our uneducated opinions, versioned out file folders.  Basically a by hand version control system.  We were pair programming a rather large project so every morning the code would get copied to the file share and appended with the date and prefix AM.  In the afternoon the same would occur with the prefix PM.  It worked fairly well, the file share was backed up on tape and lived on a SAN that had a redundant system across campus.  Sure we had to navigate folders to find old versions of code, but we hardly ever looked back.  Who would need to do that?

Back to Today
Since VIVO, I've been immersed in SVN, Mercurial, CVS, Bazaar and Git.  I've learned the ins and outs of my old pal from undergrad, Eclipse.  I've used various bug and feature tracking systems; SourceForge, Jira, Launchpad, and FusionForge.  Its all coming together, the lifecycle that is software development.  The code is simply the result of all the pieces falling into place and without the right pieces, the code usually suffers.

Back to my current delima.  I have very junior programmers.  They come from a mixture of environments and educational levels, and for all of them I'm deeply concerned with what they took away from those experiences.  For example, perhaps its the sum of all of my experiences or perhaps its the first school project that nearly missed a deadline due to a hard coded value but I strive not to do these things.  I found, when helping a masters student fix a table filtering issue, hard coded drop down lists for items that are stored in the database.  The breakage was due to spelling differences between the database and the dropdownlist, obviously.  Their code is scary and the worst part I am putting my and the departments reputation behind it.

So how do I help them learn and avoid accepting bad code.  My brain slowly starts up, the hamster rising from his nap, and I think "Review their code".  So I open the code and before I begin to browse the first spark hits, use the gitg explorer so you can review what they are changing.  "Duh! How can I help them improve if I don't know who committed the error."  Now my hamster is not yet up to speed and when we finally got up to speed I processed that something was missing.  Why am I doing this code review by hand?  I have standards documents and with VIVO I've used code coverage reports and unit tests and acceptance tests.  How do I put this all together?

Saturday, November 12, 2011

A Programmers Conundrum: Doing the same thing in a completely different way

I've begun to embark on a quest to understand development in Ubuntu and make myself a more active user.  This quest led me to getting involved with guys that develop the Loco Team Portal and Summit site.  Its python, django, sql, and bazaar.  Three of the four I have never used before.  I've done web development before.  I've used C#, Java, and PHP.  I've used Asp.NET, Grails, and CakePHP.  I've used Visual SourceSafe, Subversion, and Git.  On paper this is simple, similar task new frameworks for doing it.  Reality is much more difficult.

Friday, November 11, 2011

Ubuntu Development Tutorial

A while back I was trying to remember everything I needed to setup for developing things on Ubuntu.  How do I set up bzr?  What keys do I need to setup on the machine?  Then a friend of mine sent me a link to several articles on  They are the perfect guide for getting started or for just remembering everything you need to setup when moving machines.  For that second reason I'm putting all of them up here.
The articles were written by Daniel Holbach at OMG Ubuntu.  If you are ever considering developing on ubuntu or just wanting to learn more about its development I suggest you check them out.

Monday, November 7, 2011

The Ubuntu Developer Summit (UDS-P)

Precise Pangolin Sign borrowed from
I attended the Ubuntu Developer Summit last week in Orlando Florida.  While its my second UDS, the first I attended more as a guest, an outside observer who used Ubuntu and was developing an open source application.  Luck has it that UDS was held in Orlando one more time and with this UDS a chance to finally get involved.

Now a co-worker and I both decided to go and at first we figured we'd drive down and back every day.  The theory was its 10 dollars cheaper than the cheapest hotel and we'd get to sleep in our own beds.  By Wednesday that was out the window and we stayed at the hotel next door (60 dollars cheaper a night and right next door).

Day 1

The opening keynote went well, Jono stood up and talked for a bit about UDS and then Mark came up and talked about Ubuntu and someone from Linaro (sorry it was a week ago and I forget his name) talked about Linaro's progress.  Mark dropped the plans for 2014, Ubuntu on everything (phone's, tablets, TV's, computers, etc).  The most amazing thing about this plan isn't that its Ubuntu running on each of those devices, but his second image had Ubuntu running on a phone driving the other devices.  Kind of what Motorola has faked in my phone where I plug into a monitor and suddenly my dual core 1GHZ, 1GB of RAM cell phone is a desktop PC.

Morning Sessions

I first attended the Community Round Table. Jono, or whoever thought it up, had a great plan to hold round tables every morning. I didn't get to attend all of them, but they set the stage for the rest of the day. In this first round table, several community sessions were added to the weekly scheduled based on items from the round table. Next up was the Software Center Roadmap. I barely remember a thing, I need to write these closer to the actual event next time.

Afternoon Session

In the afternoon, I went to Unity Desktop Integration and Ubuntu and Tablets. Ubuntu and Tablets was the most interesting. The discussion became very detail driven. The kernel needs to be smaller, faster, less of memory hog, less of a power hog. Several topics brought up Android as our Java Desktop Linux cousin. There was some discussion of the user interface that unity had to change. Talk of tile menus vs the current layout. My hope is that with 2 years we can do something better than duplicate the tile system of android and ios. Unity to me, seems like it would work. The top menu bar would need to be something else, like a button driven menu ala android (I know I'm already picking apart the others). I didn't get to point out my webdesign thought for the desktop. Think css zen garden. Ubuntu would detect the screen size and apply the "css" style for the desktop size. The background and actions would all stay the same, only thier presentation would change. If you plugged into a bigger monitor, new layout specific for that screen size.


We stayed for the evening social event, I met up with a couple of people and then began the long drive home.

This is the end of part 1. Part 2 coming up soon ....