Software Bill of Rights (Part Two) - Development Philosophy Part 3

In my previous post I talked about why we have a  Software Bill of Rights and described in detail the first Right.  Let’s talk about the second Right.

1.  Clients have the right to working software, at regular intervals, throughout the implementation life cycle.

2.  Clients have the right to usable software.

3.  Clients have the right to clear, non-technical communication about the software being developed and the development process.

4.  Clients have the right to the best solution available.

5.  Clients have the right to be regularly involved in the software development process.

Good software should work well, but you’ll notice it doesn’t say clients have the right to working software.  “Working” software means different things depending on who you’re talking to at the moment.  To some “working” can mean the software works if you do things just right, if you enter all the correct information, you remember the correct order of operation or you’ve read the instruction manual ten times through.  To others “working” means a piece of software should do everything they can think a user will ever want, everything they can dream up or everything a competitor is doing.

“Usable” means something different and gives us the right foundation.  It implies a balance between over-engineering vs. under-engineering and feature creep vs. under-development.  Usable means the software does everything that it needs to do, nothing more and does so elegantly.

The key to “Usable” is that it puts the focus where it should be, the end user.  While most of the time the client and the developer have great ideas and intentions, neither can be the objective third party necessary to create great software.  By focusing on exactly what end users need inorder to accomplish their tasks we get an unbiased judgement about that button placement, this workflow order or the proper number of navigation elements.

Without fighting for this Right, a project will only be a success for the end user through pure luck.  Watch this video for a hilarious but oh so true example of what happens when you don’t value “Usable”: http://www.youtube.com/watch?v=jVb8EC1Y2xM

P2 Culture, Philosophy, Software Bill of Rights, Technology, User Experience No Comments »

Field of Battle

Every now and then the guys calling the shots at Phase 2 will decide to take all the employees out of the office and do something fun.  Last week it was determined that the fun experience we were all about to partake of was to be paint ball.  There was some apprehension from some of the participants especially after the war cries of some of the more blood thirsty employees filled the air.

The day of the event came and we split into two different teams while we were still at the office so we could plan on whom we were going to go after once we hit the field of battle.  However, before we left, some of the more pristine individuals realized they had to wear a helmet and that using a helmet that someone else wore and sweated in was not tolerable.  The princesses of Phase 2 raced to the store to get their own helmets so as not to be sullied by the equipment of previous fallen warriors.  One such employee, Steve, who claims to play on a regular basis, came equipped with his own mask, gun, and NASCAR suit.  Obviously he was taking this outing seriously.

We got to the paint ball field later in the day and were greeted by the humble field referee.  Those of us that were not ready for Daytona filed into the equipment shed and gathered our necessary tools.  However, the guy driving the Tide car apparently forgot that his gun doesn’t run on wishes and sunshine but rather on 9 volt batteries.  Being without his trusty power source, he was quickly laughed at and sent to the equipment shed to pick up the standard issue rifle.  Now other than his fancy mask and suit, he was one of us.  The referee then escorted us off to the first field, humbly named “The Graveyard”.

The teams were sent off in opposite directions.  There we stood and waited for the signal for the paint filled carnage to begin.  The signal went off and I froze.  Some of my team went left, some went right.  I guess that means I am going up the middle.  I trotted forward straight down the middle.  I hide behind one of the “tombstones” to try and take some cover as the paint filled ammunition starts screaming in around me.

I know it probably wasn’t the best moment, but I decided to sit back and reflect upon life.  I watched the others around me scrambling from one cover position to the next.  I thought to myself, “What’s the rush?  What is this all about?  If I do fire upon my fellow coworkers, what does that say about me?  Will they treat me differently?”  I determined that I am a lover, not a fighter, so thinking back to what I learned from the movie Pirates of the Caribbean, I shouted out the term “parley”.  Thinking I was safe and that the other team was sending a representative over to discuss the current state of affairs with me, I stood up to have a chat.  For now I am going to assume that the other team did not hear me and not that they care not for the safety and peaceful acts of a diplomat from the other team.  As you may have guessed, I was quickly riddled with paint and asked to go wait in the time out area.  As a side note, the masks have ventilation holes so you can breath, but the paint can still splatter in there.  The paint we were using must have soured as it was not pleasant to my palate.

As I sat alone in the time out area I realized my hand was stinging.  I looked down and noticed blood starting to trickle out from around my knuckle where I had apparently been shot.  I surveyed the field in front of me and watched as my coworkers bobbed and weaved their way around the course.  Occasionally one would get hit and come and join me in the time out box.  They would usually curse the person that shot them, funny enough nobody was ever appreciative that they got shot.  This was usually followed by a brief description of what happened and what they did wrong.  The typical excuses are the age old “lucky shot” or “I didn’t see him there”.

The first fight ended and we were taken to the second field to what I thought was going to be a Civil War reenactment due to the field looking like an old battlefield.  Knowing a little about history, I called dibs on being the North.  I also emptied out my paintball hopper, save for one bullet as the muskets from the civil war could only fire one shot until they had to be reloaded.  The ref called for the fight to begin, so like a good little civil war soldier I slowly marched forward to form a firing line.  However I noticed my teammates were not on the same page with me as they ran every which direction to grab cover.  I also quickly realized that the South were not using muskets as I was, they had semi-automatic weapons…alas the North was behind in technology.  I dropped down behind a little box and watched the field for a little while again.  It was more of the same with people scurrying around from cover to cover.  At least I wasn’t the first one shot this time.  Anyways as I continued to watch a soldier for the South started picking up and tossing his cover forward on the field (it was a large spool).  Realizing I was grossly outmatched as I had already seen several of my North brethren fall to the tyranny of the South, I decided to take my musket to my own leg and take a graceful exit from this battle.

We move to the next area which is a “speed” course, smaller course with no tree/weed cover.  Things have finally clicked and to help prevent my teammates from shooting me at the offset of the battle I run out and start laying down fire like I should.  I even managed to hit someone.  I was hiding behind a bunker and my teammate, Daniel, came rushing forward to the same area.  All of a sudden a massive scattering of paintballs came spraying into the area, I’m talking 75 to 100 paintballs.  Thinking it was some sort of grenade, I did the noble thing and dove on top of them, causing them to explode on me.  Obviously I am out, and again proven to be an idiot raising the ire of my teammates further.  As it turns out, apparently Daniel’s hopper fell off as he rushed forward and that was his ammunition spilling out into the bunker….my bad.

Anyways, I took a peek at my watch…we are halfway done; I can’t screw up too much more can I?  On to the next course.  I could tell I wasn’t in good with the team anymore as they shoved me right out in the middle once the round started.  I figure one more good round and they will be shooting me at the start.  I stumble forward and hide behind a barrier of some sort.  I sat there for a moment, and at first I was sad that I was such a poor performer.  A few tears escaped my eyes, but then I soon became angry, and like the Hulk I was fueled by my anger and my skin actually started to turn a pale shade of green.  I stood up with my head and gun appearing above the barrier, not really caring what happened.  Apparently nobody had heard me crying or seen where I had gone as nobody was paying me any attention.  I quickly got a line on a few people and was able to take out three of them.  Amazed at the turn of events my teammates pressed forward to where I was and we started pressing our advantage.  This was all well and good until the other team sent in two kamikazi gunmen.  Somehow with Matrix like reflexes they were able to dodge much of our fire and get in behind us using a bull rush tactic in the process taking out a few of our guys.  I was fortunate enough that Josh ran out of ammo before he got behind me and Jeremy got shot before he got to me as well.  Still in the game I looked around and luckily I was not alone.  I still had a couple of teammates in the game.  I laid down some cover fire and they made their way in and my team finally won a match.  More impressively, I finally survived a match.

Needless to say, for the remaining matches, I was less of a doofus and my teammates disdain for me grew less and less as we continued to win matches and pull the score back to where it was close to being even.  In the end the other side had a victory or two more, but it was pretty close.

After the last battle we all decided to compare battle wounds as that and drinking a beer is apparently the manly thing to do after paintball.  I had a couple of doozies that I knew were going to bruise up nicely on my arm, and of course the one on my leg that I wasn’t going to bring up.  As it turns out the winner for best wound was a bit of a surprise.  Apparently super suits don’t absorb or prevent you from getting shot.  Steve in his NASCAR outfit got hit in the back, right below his Budweiser logo and it left a nice red mark that was already swelling up nicely.

As it turned out, it was a good experience with some good team building.  We all gave each other a high five and then headed off to the pool hall to tell our stories of who shot who and to suck down a couple more beers.  So if you are looking for a good work outing, consider paintball as it might sting a little, but there are some good experiences to be had.  Also, if you ever see Steve you might bring him a 9 volt battery as apparently he is using them up quickly.

Fungineering No Comments »

Welcome to Arduino!

What is an Arduino? An Arduino is an all in one programmable microcontroller that allows you to start off very quickly in the world of microcontrollers. It is an Open Source hardware controller and there are many flavors out there, each catering to many different needs.

Arduino has an Integrated Development Environment based on the same environment used in Processing. Arduino can be programmed in the IDE using a language like AVR C that is based on the same language used for Wiring. Today I will show you how to get started on the basic “hello world” of microcontrollers. A page provided by the people who make Arduino’s explains more about what it is and can be found here.

To get started you will need a few things:

  • An Arduino board (or most any one of the many clones out there which I will discuss later)
  • A compatible computer and OS (OSX Linux and Windows are supported)
  • The IDE (downloaded from Arduino.cc)
  • An LED (not all clones have a built in LED on pin 13)
  • An appropriate resistor for your LED (resistor values can be calculated here more info below)
  • A breadboard and some patch cables

Arduino is an open source hardware device which means that it is freely available for people to get the schematics of it and create their own flavor. For this blog, I am using a seeeduino which is an arduino made by SeeedStudio and has a few advantages over the traditional arduino, like extra analog I/O and more surface mount parts which makes for a lower profile. Arduino clones are usually designed for a specific purpose, like the Roboduino which has everything setup so you can plug in PWM cables for motor controls, or the Stickduino which is about the size of a pack of gum but has all the same power as a traditional arduino. Usually, all of these clones can use the IDE for development but sometimes the method of connecting the arduino may be different.

It is the special purpose clones that might not have an LED built in on pin 13 and for this you would need an external LED and resistor to follow along, but if you have one of the many clones that are the same form-factor as the original arduino, you should have an integrated LED somewhere on the board.

If you do not want to use another LED and you have one built into the arduino then you do not need to have a separate LED and resistor or breadboard and patch cables. If you have an LED built in and have a separate LED, resistor, breadboard and patch cables, then you can blink each one individually or at the same time using the same way that I will cover below. Having a breadboard and patches handy is also great for prototyping or just playing and is good to have around anyway. Most places that sell arduino’s will have breadboards, and some will have the male to male patch cables that make it easy to plug and play into the arduino and breadboard. A breadboard is basically like a Printed Circuit Board that you don’t have to solder anything with. It has a bunch of 0.1″ holes that are wired like a typical prototype PCB.

Once you have everything you need, it’s easy to get started. First let’s make sure you have the correct resistor for your LED. Visit led.linear1.org and let’s put in some numbers.

ledcalc

What I have is an LED that has a forward voltage of 1.7v and an output of 20ma so I plug these values into the calculator and it get back a 180ohm resistor. If you happen to have 180ohm resistors laying around, you can use those. The rule is a plus or minus 10% is still ok, And if you go with higher ohms it will just mean less power gets to the LED. So in my case, I have a 220 ohm resistor sitting here so I will use that since it is higher than what is recommended and will not burn out the LED but still allow enough power to get to the LED to light it up.

Now we need to setup everything. If you are using the integrated LED then you are ready to go and can skip to the code section. For the external LED you will need to plug some things into your breadboard. First, let’s plug in the LED. I have mine put against the middle rail so I have plenty of access to the power and ground rails if i need to use them. And so I can put things in front of it, namely things that will come off the breadboard and connect to the arduino itself.

ledbreadboard

Next I will plug in my resistor to two spots on the breadboard, but one of those spots will be one of the lanes that a leg of the LED is plugged into. This is so we can make sure the power goes through the resistor at some point on its way through the LED. You can select either leg of the LED to connect the resistor, just so it is on one and only one of the legs. Otherwise we will not actually be limiting power.

ledresistorbreadboard

Now we will plug in our power and ground into our breadboard. We will need to know which leg of the LED is the anode (+ or power) and which is the cathode (- or ground). The anode is usually the longer leg of the LED, also on some round LED’s the cathode side is flat on the body. For my setup, I will be putting the resistor on the cathode, for no specific reason. Now I will plug the supply wire into the lane the anode is on and I will plug in the ground wire to the lane the resistor is plugged into and the LED is NOT plugged into.

breadboardwithwires

Now we can plug in the wires to the arduino. I will use the GND pin just past pin 13 on the right side of the Arduino and plug in the supply line to the digital pin 3 marked with a PWM on it. The integrated LED is usually connected to pin 13 and we will utilize that when we get to coding.

completesetup

Next go to your computer and open the arduino IDE. I am using version 0015 which is current as of this writing. In the IDE, navigate to File > Sketchbook > Examples > Digital and select Blink. This will open up the blink “sketch” so we can upload it to our arduino. In the arduino IDE, a “sketch” is what we call the program that will be uploaded to the arduino. Next plug your USB cable into the arduino and then the computer so it can be found by the IDE. Once we have it found, we will need to setup the IDE to connect to it. Click Tools > Board and select the arduino you are using. Diecimila should be good if you do not know or have a standard arduino. Next click again on Tools > Serial Port and select the serial port that is created by the software on the arduino. If you do not know then you can unplug the arduino and click on Tools > Serial Port and see what is there, then plug it back in and click on Tools > Arduino and select the new one that shows up. Once everything is setup, your IDE should look something like this:

arduinoide

With the arduino plugged in and the IDE ready to go, we can upload the sketch. This is done by clicking the “Upload to I/O board” button arduinoupload or going to File > Upload to I/O Board or you can use the keyboard shortcut, which differs based on your operating system. What this will do is compile the sketch and then upload the compiled version to the arduino. Once there, you should see the LED on your arduino blink. But, if you do not have an LED integrated, your board might just look like it does when it is not plugged in. To solve this, we will change a little bit of the code.

First lets talk a little bit about what the code does:

int ledPin = 13;

this just sets up a variable to make it easier for us to know later in the code, which pin is the LED pin.

pinMode(ledPin, OUTPUT);

This is how we tell the arduino that we are going to be writing to “ledPin” rather than reading from it.

digitalWrite(ledPin, HIGH);

This is how we actually write to the “ledPin” and control the LED. Note that this line is used twice, once it sets HIGH and once LOW. Basically it is saying HIGH sends power (5v) to the pin or you can think of it as turns it on. Sending LOW sets the power to 0v, or turns it off. HIGH and LOW are reserved words for the IDE and do not have to be defined.

delay(1000);

this tells the arduino that it needs to wait 1000 milliseconds, or 1 second, before going on.

Now we need to add code to make our external LED turn on. Lets first define a pin so we don’t have to use just the number later in the code. Under the “int ledPin = 13;” line lets add a new int and call it something useful like redLedPin and set it to our pin number, which should be 3. It will be the pin number you plugged the supply wire into. Next, we need to set our pin to output, so under the current pinMode call, lets add one that sets our new redLedPin to output. Now we are ready to make the LED turn on and off however we want. I am going to make my redLedPin turn on when the other LED is off. So now my code looks like this:

newcode

We can upload our code to the arduino and test it out. On my setup, I have pin 13 turning off when pin 3 turns on, and pin 13 turns on when pin 3 turns off. That is just the beginning. Now you can add all sorts of stuff to your code, or to your breadboard and have all sorts of fun. Some examples may be adding a button to make the LED’s turn on, or adding a potentiometer to adjust the fading of the LED. But the possibilities go on and on and on. Comment or email if you have questions.

arduinoledexternalled

Fungineering, Hardware & Robotics, Open Source, P2 Culture, Technology No Comments »