Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Monday, September 24, 2012

Experiment 1: Traffic Light

These days, I'm very interested in automating things.

As my friend Vic would say, I haven't the foggiest when it comes to electronics. Putting on a positive spin on my relative cluelessness, it's a great opportunity for my girlfriend and I to learn something awesome together. One hour in, I think we are — just look at that focus!

Ginger Programs

For our first experiment, we needed three things:

  • Arduino Uno microcontroller
  • breadboard & jumper wires
  • LEDs (lights) & resistors

30 minutes later, with the help of this makeuseof article for beginners, we had our completed our mini traffic light!


note A breadboard is a way to connect circuits without having to solder.

Wednesday, June 13, 2012

The Wolf

Recently, I hit a personal milestone: a piece of software I wrote went out on my office's mailing list. It has been downloaded 17 times.

I've been writing little utilities here and there for years now, but I've never actually gone to the length of releasing something. When you do, a couple questions go through your mind:

  • Is this thing any good?
  • Is it actually useful?

Luckily, the first person I showed it to pushed it out to more people for feedback.

Problem

Expense reports are an everyday part of life for traveling consultants. The confirmation that they've been paid is emailed to us every two weeks in a giant Excel file with 3 columns:

  • Employee ID
  • Date Paid
  • Report ID

Most of us can't remember our Employee ID, and having to look that up requires a 2-step login. The noise of everyone else's Report ID can also be difficult to look past.

Solution

I really wanted to do two things with this utility:

  1. Not have to look up my Employee ID
  2. Not have to open Excel
I think I succeeded on both accounts. If you tell The Wolf to save your employee id, it writes a simple file to your home directory, and you never have to mention it again. By default, it will output the most recent reports paid with their date. Optionally, you can tell it to show everything of yours in the spreadsheet.

Ultimately time will tell how useful The Wolf is. The early results are good though -- the first person I sent it to loved that it churned through 3 years of expense reports in a manner of seconds, and omitted all the noise. Others have mentioned setting it up and its ease of use. I'm finding myself more and more motivated to release small tools that may help someone out.


Interested in more?

Monday, November 15, 2010

Project 1 Lessons [Coding Katas]

A few weeks ago a colleague and I took to center stage as we launched another lunchtime activity for our project's crew.

There were a few differences from the lunch and learn initiative, not the least of which was the voluntary nature of attendance. We also wanted to engage the audience with a bit more than a presentation. Perhaps worth noting, each of these goals came after the superb interest generated from casual mentioning of coding katas by friend of the blog and resident Bearsharktopus fan Chris.

Bearsharktopus Projection

The Task

CodingKata.org is a great resource for programming problems that build skills. In our case, we were using the simplest suggested problem as a way to teach Test-Driven Design (TDD). FizzBuzz was proven to be a great way to illustrate this very important concept; certainly much easier than a 10-year-old codebase.

The FizzBuzz problem is apparently adapted from a drinking game and is a frequent cast member of programming interviews. There are just five requirements:

  1. Run through the numbers 1-100
  2. If the number is divisible by three, print "fizz"
  3. If the number is divisible by five, print "buzz"
  4. If the number is divisible by three and five, print "fizzbuzz"
  5. Otherwise print the number itself

The Demonstration

Our plan going in was to switch out pairs of programmers every five minutes. Being the truly agile adopters we are, we went with another approach that seemed to flow naturally with the event -- keyboard passing.

Chris and I began with the way all good programs begin: writing a test that fails. He first asserted that our result, given a number, would return a string. Then I made it pass and wrote another test.

Soon we had almost all of our client developers writing tests and making them pass. The approach won praise and has since been requested again by those involved. Katas will definitely be on the docket for any of my projects.

Fun Fact Bearsharktopus is an Internet meme

Fun Fact There is no right answer to FizzBuzz. An "enterprise" solution is hosted on Google Code.

Yikes! Moment FizzBuzz is apparently an easy way of weeding out 99.5% of those who apply for programming jobs. Source: Coding Horror