Category Archives: Uncategorized

Write Better Software : Embrace your Humanity

This is a bit of a stream-of-conciousness post about thought processes-vs-time.

As a software developer, I invariably encounter new challenging problems, algebraic, database, mathematical. I spend time working through these problems, and the larger more complex ones take significant time, hours, many-hours, days. The day problems are the frame of reference that is interesting here.

How do we solve our problems? How much subconcious thought is involved in brainstorming solutions, testing them against the constraints and requirements of the problem-set, and ultimately encountering a solution that fits?

I believe every human, in and out of technology work, encounters a situation to “sleep on it”. In the developer community, I have discussed with many many colleagues about problems and how a colleague solved it while eating breakfast, in the shower, in their dreams, etc. I have solved computing problems in every one of these ways, and I’m sure many more. I recall solving a problem while watching the sunrise once… and computing was not on my mind in the moment.

The fact is that every living moment of our life colours the work that we do in technology. These complex computing environments that we are implementing in technology today easily defy our abilities to immediately grasp the full-breadth of the design, the implications of design decisions, and the constraints, requirements, and responsibilities of components of the design at various levels of abstraction. Every time we are introduced to a new application design, it takes time to fully absorb that information and be able to make new hypotheses, suppositions, corrections, enhancements, and improvements upon that design. Our brain, though, is not as compartmentalized as we belive (or sometimes wish!). All those moments “off-hours”, spending time with family or friends, eating a meal, watching TV, reading a book, sleeping, dreaming… change the connections in our vast computational grey-matter. Those changes then directly affect the way we consider and imagine the technological problem-set that is also at hand over the time of days.

Our humanity colours everything we do and think about as computer scientists. It is extremely important that we embrace this aspect of our humanity, and embrace our colleauges humanity as well. Take time and give our wet-ware the computational time it takes to gain our insights and understandings of our common problem-sets.

“Sleeping on it” could be the best thing for your career you could do.

It has done wonders for my career!

Heroku ! Fingerprint already exists when key-comment does not match account email

I recently registered on heroku with my work email address : (obsfuscated)
My ssh id_dsa though is signed with my personal email address :

Heroku doesn’t like this one bit.
Following this advice, I created id_heroku_rsa wtih my work-email comment.

Still no-joy.  But, this StackOverflow thread left a clue… using the ssh debugging output, I can see that ssh is still trying to send id_rsa or id_dsa.
The answer, included on that post is to ‘ssh-add’ the special key created.

Voila, now my push succeeds.


From Wikipedia on STOP SOPA DAY

Imagine a World
Without Free Knowledge

For over a decade, we have spent millions of hours building the largest encyclopedia in human history. Right now, the U.S. Congress is considering legislation that could fatally damage the free and open Internet. For 24 hours, to raise awareness, we are blacking out Wikipedia. Learn more.

BDD/TDD test cycle for beginners

I sent this message to a RailsMentor Protege of mine :

A couple notes on BDD testing :

1. Never test “the glue”. “Glue” means anything that Ruby or Rails should be doing “automatically”. That means, database querying, sending values from controller to view, etc. So, in a view test, you should be able to adequately test your views using the isolated view tests. This is where you could test that your table-building code is working right as you expect. Your controller tests should be able to be tested without database requests (mocking model instances), see #2.

2. Skinny Controllers, Skinny Views. Make your controller code, and your view usage as absolutely minimal as possible.
The ideal controller method looks like :
def show
respond_with @some_record

Yes, THAT SMALL. Rails framework provides a HEAP of assistive methods to accomplish that. #before_filter, #after_filter, #respond_to

Views should contain very little Ruby code. #render :partial and generous use of Helpers allows your view code to be very small (and subsequently, very testable). Repeatable elements like table-rows should be in partials, where they are easily testable.

3. Cucumber-level testing : Are you using Cucumber ( Cucumber scripts should really be reserved for “business owner specification”. A business owner would not usually be concerned with error handling or the exact placement (or even widget-type) of elements on the forms. The Business owner instead is interested in knowing that Page A => Page B => Page C works… or for instance, “If I buy product “Widget Sharpener”, then my shopping cart counter increases to 1 ”

There is a general BDD/TDD work cycle :

Create cucumber feature
Code supporting Cucumber step
Cucumber-RED : Cucumber execution fails because step causes failure in model/view/controller
Match expected functionality in model/controller/view RSpec
RSpec-RED : Rspec execution fails because functionality is not implemented
Modify model/view/controller with added functionality
RSpec-GREEN : Rspec now succeeds
Cucumber-GREEN : Cucumber now succeeds

You will often find steps 5-7 (Rspec Red/Green cycle) will repeat several times between Cucumber Red/Green cycles. This is our minute-to-minute Ruby-programmer’s work experience.

I’m looking forward to hearing more from you of your experience learning Ruby and Rails.

Lego Mindstorms NXT-G moving from 1.0 to 2.0 – TriBot : Part 1

I discovered after installing Lego Mindstorms 2.0 NXT-G software that no one on the interwebs has captured this information before.

The Lego Mindstorms NXT 1.0 building instructions are found at Mindstorms Support 8527 -TriBot

So, without further ado, here is the Programming Guide for the Lego Mindstorms 1.0 TriBot : Part 1 – Driving Base

FUD all over again… This time with Testing!

Well, Jamie Cansdale has been getting heat over time from M$ over TestDriven.Net, formerly NUnitAddin.

M$ turned up the heat over the last week, and seemingly put it to HIGH yesterday.

Ian Ringrose simplified the discussion :

“Is it safe for me as a developer without a large legal department to work with Microsoft technology? “

FransBouma says : “Nail on the head.”

Yes… Nail on the head.