Skip to main content

Command Palette

Search for a command to run...

Programming is like building Lego blocks

Published
โ€ข2 min read
Programming is like building Lego blocks
A

Hello, there ๐Ÿ‘‹ I'm Alan!

I love teaching people how to code, and making coding tutorials, one of my big passions is transferring my web development/coding skills and knowledge on to people like you! ๐Ÿ”ฅ

...I'm a 29-year-old Software Developer based in Belfast in Northern Ireland. My current full-time role is Frontend Development Lead where I lead and oversee all the frontend development for our new platform and framework, built in NextJS, React TailwindCSS bundled in a NX mono-repo. I am also the Mobile Team Lead where I develop apps for our company using the Ionic Framework and React javascript.

Throughout this blog, expect to see How to posts about coding on all aspects of HTML, CSS, Javascript (JS), ReactJS, NodeJS, PHP, and even the odd review of cool UI Frameworks or libraries that I've found.

๐Ÿ”” Be sure to subscribe to my YouTube channel if you want to catch my quick, easy to follow coding tutorials! ๐Ÿ””

This may seem like a weird thing to compare programming or coding to, but it's so true, for a few reasons.

Building upon what you've done already

When you have a piece of code, you can stop and continue building upon your solution at any time - you're not forced to finish all of your code at once - you can pause and come back to it at any point - however if you stop at a point when your code isn't complete in working order then it'll obviously be broken / unfinished. The same goes for Lego - you can build something then come back to it and continue however it'll be unfinished if you leave it.

Multiple ways of building things

There are so many different ways to build certain solutions - more efficient ways, shorter ways (in terms of lines of code), modern ways, old school or "traditional" ways etc. They all have one thing in common - they all achieve the same end goal. However one solution or method may be better than another due to certain factors like efficiency, speed, performance etc.

Consistency and maintainability

Building and developing consistent code ensures the integrity of your website or product in the long term. If you continue to use proven working patterns and techniques then it's going to be future proof. It also keeps your code alot neater and makes it more readable. Looking at the maintainability factor - this means that you can continue to come back to your code and make easy and fast changes to the code without having to touch core functionality. This also applies to if another developer down the line comes on board and tries to maintain your code - the more consistent and maintainable your code is then the easier it's going to be to be picked up by someone else.

All of these points can be applied directly to Lego - and although it is slightly a weird comparison - it definitely does fit together. If you ever need to bring yourself back to basics for some scope or to realign your vision of a project then think of this post.

Can you build upon the code you're writing? Is your code consistent and maintainable? Have you figured out the best way to write the solution?

P

I would add that over the years, I noticed that people who never played with Lego had some difficulties programming. Before giving computers to your children, give them Lego!

3
A

I love that. I totally agree with you. Although it's very very rare these days that children will play with toys or anything like Lego anymore ๐Ÿ˜ญ. Most have iPads and the likes by 3 or 4!

More from this blog

A

Alan Montgomery's Blog - All things JavaScript and web

11 posts

I'm a 30-year-old Software Developer based in Northern Ireland. My current full-time role is Frontend Development Lead where I lead and oversee all the development in NextJS/React/TailwindCSS/NX.