How do I go about this? Are there any free resources that’ll help me get started?
I see people advising to start with a small project, but you need to get some basics down right? What language? How to develop it and stuff?
My only experience is some very basic C programming classes I took during school.
Pick a language to start. If you want to automate CAD, maybe it has an existing scripting language built-in?
Learn the basics from the documentation. Look at the examples. Learn how to search for specific answers.
Finally, practice a lot. Most of the challenge is breaking a problem down into discrete steps (your algorithm), which can be written in pseudo-code. The implementation of that algorithm may look different depending on what the target language is, or what library/tools you can leverage within that language.
https://codingbat.com/ if you choose Java or Python
https://adventofcode.com/ has easy-to-challenging problems suitable for any language
Step 1 is determining what kinds of projects you want to make and selecting a language and/or libraries that will help you do that. Eg. if you want to code for the web, there’s JS. Then you can follow tutorials, and/or jump into making small projects.
Yeah, although some languages can be used for practically anything, including JS. Some people program microchips with it. Lol
Check out https://roadmap.sh for a guideline on your set goal!
To add to the list, Codingame.com
It wouldn’t be the first thing to try. Get the basics down on your own machine/environment. Try this for something additional.
CodinGame gives you the IDE and build environment in your browser, so it’s for learning/practicing/testing coding knowledge without building/deploying locally, or worrying about UI/persistence/networking etc.
It’s filled with coding puzzles and competitions. I started where they give you animated scenarios (to look like part of a game or engine), and you contribute a small, missing unit of code to complete the challenge.
You can choose from 25 languages, they encourage unit-testing, and there are global coding competitions and company outreach to top coders. I don’t wanna say they gamified it… but they did.
But once you’re comfortable with those, CodinGame lets you practice different concepts & algorithms without having to come up with the bigger systems around them.
I’ve loved it for getting back to coding after a while, tinkering with certain concepts, or trying other languages.
I’m not affiliated with it. Just loved the idea & execution. Except for Mars Lander III challenge. That can get @#$&ed.
One thing that has not been mentioned that will make a big difference: join an online community.
When you get stuck or you’re confused and need to ask a question, you need to have a place you can reliably go to for that. You will also be able to see others go through their learning journey which will encourage you to keep going.
Someone mentioned The Odin Project already, but they have a very big and wholesome community.
My specialty is web development, but the concepts of programming is pretty universal. Feel free to DM me personally if you want some help.
I’ve been going through The Odin Project for full stack web development. It’s been great and is completely free.
I would advise against using Chat GPT or any other LLM; they “hallucinate” and can give you wrong information.
Imo, the main problem is that it does the job for you and you don’t learn anything. It’s great at explaining concepts though.
Along the same lines, I would suggest to never copy/paste code. Physically writing it helps your brain remember.
Yea, just copy/pasting code without already understanding it is a bad move.
If you deliberately drive GPT into a certain direction with the prompts about a specific topic and the model has been trained on the subject matter, its accuracy will be higher. If you ask GPT about a less popular language that it has little or no training on, its answer will likely be garbage.
https://scratch.mit.edu/
Also, before starting writing code: learn to break down things small things.Could you elaborate please?
Scratch is a coding tool and system that is primarily targeted at children, and relies strongly on a visual way of working. It is easy, can be switched feom visual to text, and ultimately switched to python.
The visual coding style might help with learning the basic approach to problem-solving.
Just search for tutorials, and then follow the steps in them.
Harvard CS50 on YouTube might be a good start. Teaches python and you can then pivot to another language from there.
This is how i initially got started and i always like to recommend it. CS50x (introduction to computer science) is their college curriculum made available for free as opencourseware. Their lectures are very engaging imo, and you get problemsets to practice and check your answers. The problems are done in an online environment which i like so you don’t get bogged down in setting up your computer before you’ve even learned how to code. And then at the end you pick a project of your own and when you finish you get a free certificate (don’t bother paying for the “verified” one)
One other thing i think cs50 does pretty well is help teach you how to solve problems and how to read documentation. The reality is that learning how to code isn’t just learning a coding language. Knowing how to solve different types of problems and how to read documentation are core skills that let you get away from “tutorial hell” and start working on a project that excites you.
Looks interesting, I’ll check it out!
Not sure why nobody mentioned it, but use GPT or whatever you like to create code for you and explain everything. It is like talking to someone with some experience. Not everything is perfectly correct etc. if you get into more complicated stuff but you will certainly learn a lot and fast. The learning curve got a lot flatter with these tools.
I always recommend https://automatetheboringstuff.com/ as it helps teach you python basics, as well as learning some coding fundamentals. Its free at the website, while offering a book version you can purchase. I have been coding in python professionally for 5 years, but I started with these tutorials (after doing a non-python coding bootcamp that focused on full stack web development)
Realistically, you should still find a project that you want to do and use that as the basis of your learning, as that will influence your language of choice,. I’d start with either python or powershell stuff to get going, as both are general purpose, multiplatform languages that can do a lot and are moderately forgiving with syntax and stuff.
Past that, find a project that interests you, break down what needs done, and learn those steps individually. It’s not as cohesive as a hand holding hello world style tutorial, but I found I learned so much better if I had a need for the knowledge instead of just learning for it’s own sake.
In my case, I picked powershell as I’m a windows admin. Since I’m a data hoarder as well, I chose a video conversion pipeline to convert all of my movies into a consistent file format. Part of the requirements are to find all files with an extension that isn’t my standard (concepts: file listing, filtering, working with objects) and then execute an external program to convert the files (concepts: command line execution, state management, error handling, looping), validate the conversion completed successfully (concepts: reading file content, filtering/regex), moving the files to a new location or replacing the file with the new one and backing up the original (concepts: file management), and log file retention and cleanup. As I developed my script, I also began learning to properly “function-ize” my code to make things more readable/usable, and eventually started moving functions into a module to better modularize my code.
A decade later and I’m currently in the middle of a couple of projects using powershell to make and call API functions to automate business services at work.
As I developed my script, I also began learning to properly “function-ize” my code to make things more readable/usable
I also started with Powershell, and not by reading guides/books. I got pretty good with using the pipeline, loops, etc. but my code was terrible soup with no re-usability. Later I learned JavaScript and realized how important it is to think about functions first when writing scripts. Makes everything easier and smoother.
Yeah, it definitely helps to plan things out ahead of time, but I’ve had decent luck with refactoring a code block into a function to reuse code or cleanup sections. But I definitely try to make it into a function first when I can since it’s less work than going back and fixing stuff, but sometimes a simple code block blows up or you need to reuse it later.
Wow, thank you for the detailed response. I do have ideas for what kind of stuff to work on, especially after your great example. Thank you again!
You’re welcome! Coding has been my passion since I was in high school, and I understand how hard it can be to wrap your head around the concepts, even with formal schooling on the topic. To the point that I’ve learned so much more on my own than I did in school just because my passion allowed me to internalize the knowledge instead of just learning it.
Best of luck on your adventure!
I remember a time in my life, back when I was trying to learn C. Every time I saw a problem my brain directly started breaking it down in to steps. How to solve this consistently, think about edge cases, etc.
I want to get that back!
I learned using python.
I’ve yet to find anything that would have been a better place to start, and the concepts you pick up coding almost anything are extremely transferable.
A small project is good because it doesn’t just teach you the basics, it makes you apply what you learn to actually do stuff.
I write little python scripts to do various things all the time. Most recently I made one that automatically posts the next comic strip to [email protected].
My recommendation would be to come up with something like that, then start figuring out how to do each step of accomplishing the task you want the code to do, then putting it all together. Look things up a lot, use
print()
often, and trial and error your way to the goal.You could also read guides or watch videos, but personally I learn WAY faster by just doing.
Reading the code, making changes based on how I think something should work, then being proven right/wrong also seems to give me a better understanding than just following instructions.
I know you’ve heard it, but seriously, the biggedst hurdle to learning programming is having a solution looking for a problem. You can learn all kinds of stuff in the abstract, but your brain will either handwave over it or bounce off, if it can’t contextualise the knowledge into a problem-solving tool.
A source of small but genuine needs is the scarcest resource.
I know the world has moved on to big cosy high-level languages that let you think semantically about everything but honestly I’m still a big fan of starting with C; it is something of an austere discipline, but it gives you a boots-on-the-ground view of the problems you’re working with, and I think that really helps shape your understanding of what you’re dealing with.
(you could do a fair bit worse than the game ‘human resource machine’ for a slightly gentler introduction, then pick up some exercises in C, then move to python or similar - it will let you appreciate the cosy high-level stuff, and have a better feel for why you’re doing stuff)
aw hell yeah, that ruled back in the day.
Might be challenging to get it running in a modern environment, but I admire your taste in the classics :)