r/learnprogramming • • Jul 11 '21

Construction worker learning to code.

Hi everyone I wanted to share with you where I am in regards to learning to program and the challenges that I face. Maybe you have the same challenges and want nothing more to be a programmer but holy crap what an up hill climb it can feel.

I wear hi visibility clothing for 10 hours of the day. Sometimes 5 days a week, sometimes 7 days a week. We have this thing called a 24 and 4 which means you work 24 days (10 hours/day) and take 4 days off. In between this time I am trying to teach myself to code. I have finished Automate the Boring Stuff and I am currently enrolled in CS50 through Edx. I think I have found a passion. I was recently given a problem at work and I tried to break it down the way a programmer might. I have this much time and this type of materials, I have this deadline, this many people, the weather is this, I might need meta things like ladders, lifts, fall protection etc etc and I thought to myself, I have been trying to think like a programmer and how they solve problems. Instead of taking a problem and breaking it down into a manner a computer can use. How can I take this problem and present it to my team. I drew up my plans, took the time to explain it to everyone and believe it or not.....It went well, really well.

So I am now going to use these programming problem solving skills to do my job, even if it is construction to use it in some way to translate what I do daily to learning how to code. This was just a story to tell people who might be learning to code that programming takes a special way of thinking about problems and learning these methods is very important and can be used in your day to day.

I believe that wherever you are in your life, learning to program is a great idea. It can teach you so much about problem solving and thinking outside the box.

If you are on a journey to learn programming I wish you all the best!

1.7k Upvotes

103 comments sorted by

View all comments

2

u/shine_on Jul 12 '21

I may be a bit late to the party here but I think construction and programming are actually very similar disciplines.

You have to look at the bigger picture first before getting into the nitty gritty details (i.e. I don't need to be thinking about what sort of door handles I want on my house, right now I'm concerned with whether this is a good place to even build it)

Ordering items from a supplier is just like using a library of code. You don't need to know how the nails are made or where they come from, all you need to know what type of nails you need, who to give the job of fetching them, and what you need to tell him so he brings you the right ones.

Reuse of code. You're building ten identical houses on the same street. You can use the same blueprints for each one. And in fact, if some of your houses are for hobbits and some are for giants, you can still use the same blueprints for each one if you add in a scaling factor to the main blueprint design.

Debugging and fixing a program is the same as finding a leak in a plumbing system or working out why the kitchen lights aren't coming on. If you understand how the system should work, you can work through a logical step by step process to figure out where it's gone wrong.

Always try to find an analogy between programming concepts and something you're already familiar with. A first-in first-out data structure is like the queue at the canteen, the first person in the queue is the first person out at the other end. The pile of pancakes is like a stack, the last one to go on the pile is the first one to come off it.

If you can understand a construction project, what order things need to be done in, how the different aspects of the project interact and affect each other, you'll be able to get a good grip on programming. Writing the actual code is like learning to use a JCB or something, it's a tool to get the job done but before you get in the cab you need to know what size trench you need to dig, where to dig it and why you need to dig it. You don't even need to remember which lever to pull, you can look that up each time you need to know.

Far too many people think learning to program is all about remembering what the levers do.

1

u/foxpost Jul 12 '21

Amazing write up! Thank you so much.