Category Archives: Code

How-to Actually Create Software

I’m now an instructor at SCI-tech Academy in South Austin and back in the shoes of seeing software development with fresh eyes. All that code looks complicated! In terms of the big picture, how do you actually make a software application (aka “app”) from scratch? Not chicken scratch. Starting from scratch. 

KISS it. Keep It Simple Stupid.

Step 1. Start by adding something stupidly simple that won’t break. Baby steps. For example, create a function that just does this…

console.log(‘TODO: This function will search for a needle in a haystack. Find it!’);

Step 2. Take some notes. Work out a todo list within that todo. Write this as a comment.

/*
This function was passed some data that we want to search.
– Can we “see” the data from inside this function?
– Do we need to prepare any calculations?
– Loop through the data, each time doing something smart…
– The caller of this function needs X and Y and Z data returned back from us.
*/

Step 3. In baby steps, translate your plain English talk into the JavaScript (or whatever language) code equivalent. Don’t try to code the whole thing at once. Get each baby step working before moving to the next item on your list. 

This takes patience, and that’s why software development is really hard. Your code will break, that’s a fact. When it breaks, most likely your most recent baby step was the culprit. 

Observe rabbits. They’re timid. They move in stages. Before moving to the next safe place, they make sure the current safe place is comfortable. So when they move, they create a chain of safe places. If something goes wrong, they can walk it back to the last working safe place, as far back as necessary. 

Step 4. Check your work. Does the loop start and stop at the right time, in the right order? Are there any unintended consequences? Did we consider all the reasonable scenarios? Do we need to consider unreasonable scenarios? 

You’re reflecting on what happened. Like coming out of a movie theater and you’re working through it in your mind, “Was that a great movie or what?” Is there some detail that I missed? It’s OK to be critical here, a pessimist, that’s your job. In time, you will trust yourself more, but not too much :-)

Step 5. Go back to Step 1. Do it over and over and over again! Keep doing that. Eventually you have created some real software! Remember your goal, and the micro-goals to get you there.