Listen up as I’m going to unlock the first secret of programming for you. Everything in code is built from the same building blocks. Everything. It doesn’t matter if you’re building the space shuttle, banking system, a vision-guided robotic cell, or your client’s website. Software fundamentals are language agnostic. They are your building blocks. The key secret to programming is to continuously and incrementally add new building blocks until your Lego box is full.
I’m amazed at how many people don’t realize how simple programming really is. When you wipe away all the jargon, design patterns, and programming paradigms, you get down to the nuts and bolts of software. Seriously, programming is easy when you master her secrets.
Carpenters know this about their profession. Whether they are building a ranch house or skyscrapper, the building blocks are the same. It’s cement, steel, rock, wood, nails, and screws. It’s the tools they use. It’s the techniques used to take those basic elements and assemble into simplistic to towering creations. All structures are built with a solid foundation, walls, windows, doors, anchoring for each level, paths and support for infrastructure, and components for weathering the outside world.
Musicians know this about music. It’s not just strumming on a guitar or pounding on the drums. Musicians learn and practice for years. Their fundamentals are chords, scales, timing, rhythm, melody, tone, and notation. They practice and do it a lot. Pick up a piece of sheet music. It’s a compilation of notes assembled to create a unique sound. These fundamentals are their building blocks. It’s their Lego set.I’m amazed at how many people don’t realize how simple programming really is.
Let’s relate to something that we did as kids. You and I sat through years of mathematics. As small children, our parents taught us basic numbers. One. Two. Three. My mom sat with me for hours doing flashcards. As we moved into school, we learned about addition, subtraction, multiplication, and even long division. Next, we moved into sets, unions, number properties, and exponents. As our years grew, so did our math skills. Each level built upon the ones before it.
Algebra demands that we mastered our elementaries, as these are its building blocks. It takes all of these fundamentals and compiles them into complex formulas and a new set of rules. Geometry, trigonometry, calculus, and vectors build you up incrementally to unlock the secrets of numbers. All of them are built from the same basic math Lego blocks.
Basics of Software
Software is the same. It’s an expression of our natural world through numbers. We dream up complex problems and then translate their solutions into a programming language. That language is then converted into the ones and zeros that the computer needs to do what you tell it to do. The act of programming is grabbing different building blocks out of your programming box and assembling them in different ways to create different solutions and things.
At its core, software does very basic things:
- Makes decisions
- Does tasks
- Iterates (repeats)
That’s it. Simple. You might be raising an eyebrow while you read that last word. But look at your code. What’s it doing? You can group everything into one of those four buckets. You use different keywords to run conditional expressions to decide whether to do this or that. If the user is logged in and s/he has a valid membership, then this section of the page is shown. If you select PayPal, then the PayPal screen is displayed. These simple statements are decisions that determine whether some task will run or not. Simple.Code is a big box of Lego building blocks. Master the building blocks and build anything in code.
The vision guided robotic cells that I used to build may seem daunting. There’s a camera mounted on the end of the robot’s arm. As it moves over a pick area, the camera sees and then calculates the exact position and orientation of the part to be picked up. The robot adjusts its gripper (end effector) and then swoops in to grab the part. It all happens in a second or two. It’s very fast. But it’s just snapping a picture, processing the image, running maths to calculate, doing decisions to gate tasks, repeating processes, and then remembering the location.
Listen to me. Code is a big box of Lego building blocks. Just like in maths, you are adding new blocks into your toolbox. All you have to do is master the basics. Then you use your creativity to assemble these blocks into new and different experiences. Just like that box of Legos you had/have, you can build anything with it.
How Full is Your Lego Box?
How full is your Lego box? Do an assessment. Seriously, once you realize that box is your ticket to doing great things in this profession, then you are on your way to building anything in code. Break it down. Are you trying to do Calculus or Vector Math when you’re still mastering the commutative property of basic math? Fill up your programming box with the fundamental building blocks. Focus on learning and practicing the fundamentals.
My advice to you is to continuously and incrementally learn. Keep filling up your programming Lego box. Wipe away the noise until you master the fundamentals. Design patterns and different methodologies are necessary to learn. But they will unlock your potential and help you do more when your Lego box is full.
Programming is Easy, Once You Master…
Fundamentals are the first secret of making programming easy. I discussed this during my WordCamp Milwaukee presentation on September 17, 2016. My slides are available on Speaker Deck (or below).