Carpentry & Coding: Wait, what?

Samridh Tuladhar
7 min readJul 31, 2021

Carpentry is an age-old art/science that has contributed to the development of mankind even before we started recording history whereas coding is one of the latest art/science which has built the modern world.

You would think that something thousands of years old would have nothing to do with something that was just invented roughly 50 years ago but follow along with my story, and let’s build a cupboard out of some wood I found in the junkyard & learn how coding works at the same time. 😁

Alright, let’s get started!

So a week ago, my mother wanted a cupboard to put her plants on, the cupboard has to be always open & must face sunlight. That’s all the “requirements” that I got, and since I’m writing this article after I built the cupboard, it should look something like this :

Just look at the woodworking quality…, all made from junk.

So, the things that I got to know was :

  1. It should be always open, i.e., don’t build the doors.
  2. It should always have sunlight, i.e., Make sure the cupboard faces southeast ( because: geography )

But, here’s the list of things that were not provided to me :

  1. How many plants? : The number of plants decides the strength of the board, if your board is too strong, it’s too expensive, if it’s too weak it collapses.
  2. How tall are the plants? : This decides the number of stacks I can create.

And, the list of things that I deduced on my own:

  1. Always open: means that it should be able to go through the wear and tear of sunlight and rain.
  2. Watering the plants: This is will obviously cause some spillage, so the wood must be protected by a thin layer of water-resistant material.
  3. Plants have weight: The board must be strong enough to support a growing plant.

This scenario arises in all engineering design processes, where we are often given a set of vague “requirements”; some questions do pop into our minds: some, which we ask the client to provide answers to & others we deduce ourselves that’s how it’s supposed to work because: experience & physics.

So, if you are an engineer reading this: make sure you gather all the requirements, or your customer won’t be happy.

And, if you are not an engineer reading this: make sure you tell everything you can possibly want to them, or you won’t be happy. As you can see, people like me would auto-deduce what you might want often to save the trouble of getting into details, but if you want something ( which might be unreasonable to an engineer ) you should tell it, ( e.g., your room has to be larger than the main hall or the cupboard should be black, etc.), so they can put it on the list.

Phase 2: Let’s design!

Pretend that you haven’t seen the final product, and let’s say that you have to make the whole thing from scratch. 🤭

Alright, let’s quickly rush through the list of my requirements & learn some coding:

  1. Picking a spot: I already have a sweet spot that faces southeast in my house, and while you would think location doesn’t matter in coding, it has two major impacts:
    i ) The farther the code is away from you, the slower it loads.
    ii ) All data is ultimately stored in a hard drive somewhere, so, in the final “rest” position for the data, you have to comply with the regulations of that country.
  2. It should always be open: Just don’t build the door lol. Coding-wise, you’d skip the security extensions.
    Dumb idea in both cases? Yes.
    Is it required this way? Yes.
    But, Samridh, you’re building this in your house that’s already secured by a gate & a front door; the same thing doesn’t apply to code! Well, it does, if you write a code inside a VPN, it will not have access to the outside world.
  3. How many & how tall are the plants? : Just ask mom lol. In coding, just ask the client how many users they expect. Nothing has infinite scalability. The system/cupboard would get more complicated as you add more and more tall plants.
    From the customer perspective, you can ask the engineer, how many users can this system handle at X cost assuming they using it for Y hours?
  4. Weather resistance: The whole cupboard is going to be exposed to sunlight, rain, and cold, so we need to find a type of wood that can survive that kind of abuse. ( Spoiler: it’s your kitchen dining table ). Similarly, you’d want the right kind of machine to be running your code, so that it can handle the abuse the user is going to throw at it.
  5. Plant weight: The plant is going to provide a load to the board, so both the board and its support system should be able to handle it. Similarly, your machine & code should be able to handle multiple users at the same time, without any latency.
  6. The final structure: The cupboard you will put together should be rigid, strong & obeying the laws of physics while costing you as little as possible. Similarly, the code you write should also be working, able to handle load & obey the laws of computing while costing you as little as possible.

Alright, now that we have a plan of what we need, and a pseudo-vision of what we will get in the end. Let’s go and check this with my mom…, if you are an engineer, check it with your client.

Obviously, some changes will be suggested, and it is a good time to give/take some feedback, as changes can be done in the design with relatively less cost since you haven’t built the main thing yet & don’t need to tear anything down.

This is super important to both the engineer and the customer. It would be a massive headache for the engineer to change everything in the end with the same budget & a massive headache to the customer, who would have to deal with constantly changing deadlines & increasing costs.

Phase 3: Let’s go get the parts!

So, for the cupboard, we’d need :

  1. Wooden board ( preferably made of the same material as dining tables )
  2. Some rectangular blocks of wood to support those boards.
  3. Some screws to hold the supporting blocks in place.
  4. Some wall grips to screw into.

So, after a quick visit to the junkyard, this is what we get:

I didn’t take a picture at the junkyard and instead took this picture at home where we have scrap wood🤣

And, if you are wondering how will I relate this to coding, and this is what a visit to AWS looks like :

Choosing the server that’s marked free*, because… budget.

Phase 4: The tools

Like a caveman, I can use a simple saw blade and keep cutting the wood for hours… or I could get a very powerful angle grinder and cut through wood like butter. Tediously hit nails in the wall with a hammer… or, bring in a drill machine and pierce it like nothing.

Adding a drill bit in the drill without its fastener ( don’t do this! )
Inhaling the dust from the drilled concrete.

*For the love of god, don’t use these power tools like I did, without safety gear or training! These tools can kill you! Safety first!

Similarly, like a noob, I could just use a simple notepad and start writing my code… or I could get a very powerful IDE and let it predict the code I’d want to type next. Tediously compile, test and deploy my program my typing commands myself… or, let a CI server do my job.

My IDE auto-predicting what I would want to type ( helps me avoid tedious spelling mistakes )
My CI server doing my job for me. Thanks.

Do these tools add some cost to the build? Yes.
Do the tools save an insane amount of time for us? Yes.
Are all of them worth it? Maybe.

So, if you’re an engineer, having the right tools will save you a ton of work, and if you’re not one, sure, the person you hired can work without those tools, it would just take a lot of time, and you pay them by the hour… so, let them have their tools and some fun. 🤭

Phase 5: Actually building the thing

Wounds are still fresh from carpentry and coding and also it’s too boring to read through, so you know… I did my thing and… it’s done!

Phase 6: Testing the thing

Yank the support beams to test the cupboard and say it’s good.

Super legit testing.

Use some more fancy tools to look at some graphs and say your code is good.

So graph. Much wow.

Phase 7: Done!

The rush you get when an engineering project actually works… is out of this world.
- All engineers.

See? Coding & carpentry isn’t so different. You should try it out too.

Samridh Tuladhar ( @tsamridh86)

--

--

Samridh Tuladhar

A computer engineer, with a passion for cheap, affordable & environmentally friendly automation and utter disdain for paperwork and waiting.