Browsing articles from "July, 2013"
Jul
1

Gas Pump Mashup: Software and Signware

By Rob Warner  //  Development, Software  //  No Comments

I was filling my gas tank the other day and saw this sign on the pump:

Gas pump

Apparently, it’s easier and cheaper to slap a sign on a pump than to fix the software.

I puzzled over this bug a bit; why would a gas pump refer to high-ankled footwear or English trunks? Then I realized it probably refers to “Insert Boot Disk”–I guess there’s some corruption when accessing the string table, perhaps, and sometimes the pump displays the wrong string when prompting for a ZIP code.

“Enter Data,” though, sounds like pure laziness.

Jul
1

CodeFest 2013

By Rob Warner  //  Development, Software  //  No Comments

Last Friday, the operations and infrastructure folks where I work were swinging the non-production environments to a new datacenter. The development managers decided to use this opportunity to challenge the developers to a “codefest”–a 1-day programming challenge. The rules boiled down to:

  • You must come up with your idea beforehand and submit for approval
  • Teams could be 2-5 people
  • You cannot write ANY code beforehand, but could set up your environment, install libraries, etc.
  • Coding starts promptly at 8:00 AM and ends precisely at 4:00 PM
  • Scoring criteria:
    • Completeness: 33%
    • Code Quality: 33%
    • Cool Factor: 34%
    • Bonus: Usefulness to the company: 1-5%
  • Cash prizes awarded to the top three projects.

What a great idea! I was amazed to see what sorts of projects people came up with, and to see the execution of a finished app in 8 hours. Here are some of the apps produced:

  • Use Benford’s Law to detect fraudulent medical claims
  • Use Google’s Prediction API to analyze and score customer feedback
  • Create both a REST service and a web front end for searching ICD-10 codes
  • Text a physician with some notification, differentiating between Protected Health Information (PHI) and non-PHI notifications, and sending a secure link only for PHI notifications
  • Using a microcontroller, bluetooth board, create a light display showcasing our company’s new logo, and create an Android app to control the light show through various light patterns
  • Create an iPhone app that uses the characteristics of a two-dimensional skeleton and learning algorithms to teach a figure how to walk.

I worked on the last item with Michael Privat. The plan was that I would write the piece to take a picture of someone (against a solid background), remove the background, and walk them through identifying the rectangles containing their various body parts. Those images would then be used in the character that learns how to walk. Michael would write the cool, hard stuff: to make the character learn how to walk. We would be meeting in the middle.

I didn’t quite meet him, though. I finished the front end to take or select a picture, store it in Core Data, display a grid of pictures in a UICollectionView, and remove the background from a given picture. I was just starting the UI for selecting body parts when we realized it was 3:30, and there was no way I was going to finish. Luckily, Michael had banged out the algorithm for the learning, walking figure, so we grabbed an image from the Web, cut it up, and used those images. My poor code got the boot.

How’d we do? We took second, losing only to the flashing lights. The panel of judges consisted of several folks from Senior Management (CEO, CTO, CFO, HR VP), Directors, and Managers. Nobody showed code, so the “Code Quality” criterion didn’t have an impact.

Lessons learned? I should have fudged a little and learned how to remove the background from an image beforehand. I found some posts on Stack Overflow, but felt determined to understand them before blindly using them, so I lost some time there. I also had never used the UICollectionView; it wasn’t difficult at all to use, but I still had to learn which delegate methods to override and I could have saved some time if I’d just used a UITableView. Finally, making the users define and rotate rectangles to select body parts was too ambitious, given the time constraints. I should have superimposed a silhouette on the camera and cut the picture at predetermined points. I had a lot of fun, though, and added a few more tools to my belt.

If I were entirely honorable, I would give Michael my half of the $750 second place prize. I’d already told him that I’d be using any winnings to take my team to lunch, though, so I’m making him cough it up.

Kudos to management for this activity–I can’t wait for the next one!

About

I'm Rob Warner, and I'm a software developer. I live in Jacksonville, Florida, and work for Availity, LLC. The postings on this site are my own and do not necessarily reflect the views of Availity.