Writing code means not just using a computer. In today's post, I look back on a event that made me a better coder.
Recently, the Internet went out at our house.
With everything connected including TV streaming, communications, and actually working full-time remotely, this was a tremendous upset since I rely on the Internet every single day.
As I sat there wondering when the Internet connection would return, I thought back to the days of my youth while living with my parents.
As a kid growing up, I mentioned how I had a Commodore VIC-20 at age 11 and was always coding. It was something I liked to do in my spare time. I liked to use a computer to solve problems.
However, I was raised in the country. In the sticks. The Boondocks. Where there was no cable. Yes, I said no cable.
And even worse, no Internet (it wasn't a thing yet). I know what you're thinking. "How did you survive?"
Welcome to Generation X, folks!
When writing code on an isolated computer without a network connection of any kind, your imagination runs wild and you try various techniques and read a TON of books to learn about best practices (and hacks).
I was constantly on the Commodore learning about BASIC, game design, and sprites (RIP Jim Butterfield).
Then It Happened
Out in the country, the power usually went out maybe once or twice a year in our area. The thing I remember the most was a time during the day when the power went out while I was writing code.
I actually yelled an expletive because I lost code up to the point where the power went out.
While waiting for the power to come on, I sat down at my desk, grabbed a piece of paper, took a deep breath while looking out the window at the backyard, and started writing pseudo-code.
My parents came upstairs and wanted to know what I was doing to occupy my time since they didn't hear the click-clack of keys on the VIC-20.
I looked up and casually said, "I'm writing code."
"But how do you know what to write?"
I said, "I know BASIC and can write down a general idea of how the code will work."
I was like a mad scientist scribbling down code then looking at it and either erasing it or crumpling up the paper and throwing it over my shoulder.
My parents were mildly freaked out.
I could occupy my time with "writing code" from my thoughts and logically walk through the process until the power returned. Then I'd start typing away, transferring my scribbles to actual code.
It Was All Career Preparation
It's funny how things come around in your lifetime.
I was on a job interview (I'm looking at you, Chris) and given the regular questions which I think I answered pretty well (at least I THOUGHT I did).
Finally, I had to answer five technical questions. The first four were general questions regarding the language where they tried to stump me.
The last question was more of a task.
"Write a recursive function to step down a tree hierarchy and every word you find in the tree containing asterisks (*), make it bold."
I asked, "without a computer?"
He replied, "yes. It doesn't have to be valid code, but pseudo-code can work."
I grabbed the paper and starting writing code.
I finished the code and handed the paper to him.
At the end of the interview, he mentioned other candidates never came close to completing something. They would struggle and struggle and then turn in an incomplete algorithm.
We parted ways and each of us said we would be in touch as either a thank you or a congratulations.
A couple days later, I was notified I got the job.
Some of the crazy things you take for granted in your life are just such wacky moments that prepare you for your career.
Who knew that when I was young, I would be preparing for a career by writing code on paper. ;-)
The funny thing about this is it took me 30 years to recognize, acknowledge, and relate this experience to my younger years of preparation.
Have you ever had a similar experience of "writing code?" How do you conduct technical interviews? Post your comments below and let's discuss.