So I’m an on/off noobie but have been focusing on actually sticking with programming what I’ve been working on is Python but this question is for programming in general. For me it’s hard but I want to see how I can get better
Like are these good ways to get good:
Follow tutorials, then work on ways of adding your own twists or changes? Or trying to code it in something else?
Work on assignments from a resource you’re using like in my case Python Crash Course and attempt to redo the assignments without looking back?
Experiment with multiple libraries and library methods or built in methods?
Please share any other ways especially ones that helped you
Also when would be good to start a new language after learning one
The hardest part about learning to code is that the projects you really want to do are far beyond your abilities as a beginner. I recommend starting with modding, creating websites, or even writing macros for stuff like excel. They get you started.
Then also watch some YouTube videos on stuff like SOLID, design patterns, functional programming, and “getting started with <language>”.
Then try to write your own versions of stuff. I learned a bunch of stuff by writing my own versions of stuff. Like I tried backporting Java Functions, BiFunctions, Predicates, etc to Java 7. It didn’t work great because the language support wasn’t there, but I learned a lot about what things are hard and why things are designed the way they are. I feel sorry for the poor bastards that inherited that code.
Also, don’t let people give you too much shit about asking questions of AI. It frequently explains things way better than it executes. It’s a great first line of learning even if you really need a deeper dive into the documentation to understand the more esoteric stuff. If you have a question you can’t find the answer to, ChatGPT will explain it in 30 seconds where you might have to wait days on a forum for someone to feel like answering.
Beware: ChatGPT is awful about mixing different versions of stuff so the answers it gives may well be obsolete. But if you’re really confused it can point you in the right direction. Yeah, you’ll have to learn a lot more nuance when you start doing shit professionally, but if you’re just fucking around it’s great. And googling for answers isn’t much better in that regard. The best answers come from the docs, but especially when you’re starting out, the documentation often assumes a baseline of contextual knowledge you aren’t going to have.
Try implementing a custom collector in Java just based on the docs. Have fucking fun with that.
It’s like everything else, you need to actually do it to get better at it. The more you want and try to get better, the harder it’ll feel. The best way is to just enjoy doing it. But it’s easier said than done.
For me personally, since it’s not my job, I don’t feel any pressure programming, and it’s kind of a stress reliever. I’m not very good at it anyway, but the improvements I’ve made were due to the fact that I didn’t feel any pressure in learning new things, and was able to do things at my own preferred pace. As an example, for the last few days I’ve been learning about the internal working of SQLite. It’s pretty complex, but I don’t feel like I need to know and remember everything, so it’s easier for me to actually get through it. (Btw, if anyone reading this has experience working with SQLite, let me know, I’d like to discuss some stuff. It’s about optimizing some queries, so you don’t need to know about the SQLite codebase, just a rough idea of how it works, and some experience with Rusqlite. Fwiw, happy to add you as a contributor in my project if any performance improvements come out of it.)
But it’s a different story when it comes to learning stuff for my actual work. Even though the rewards are bigger, the process feels much worse. (Hating on Deligne-Serre representations right now. :( They’re beautiful objects, but the pressure to learn is just too much.)
So, if you’re like me, try not to take it too seriously, and it’ll be easier to learn.
I’ve been doing this for well over 20 years now and I taught myself by building Geocities sites and random stuff.
Just build things and push them to a repo. Have an idea for something? build it. could just be something like a TUI for Mastodon or like an eReader with AI driven text to speech, I don’t know i’m just spit balling here but my point is you just have to build stuff. It’s like anything, the more you do it, the better you get at it. Like drawing. you just draw something every day and eventually you get good. it’s the same for coding. just work on something every day and you’ll get good at it.
So just build something or contribute to your favourite open source project.
I am only speaking for myself and I am most definitely not a pro, but I think preoccupation with efficiency and usefulness is the main obstacle to actually liking programming, which is itself a must if you want to get good at it. Some years ago I read an article with the title ‘why I spend my time writing useless software’. I can’t remember what it actually said since I only needed the title to really internalise the fact that programming is an art. Imagine telling Monet, Picasso, Michelangelo or John Lennon that their line of work is ‘imperfect’ or ‘inefficient’. If that sounds like a ridiculous thing to do, that’s because it would be. I’ve written at least 15,000 lines of code (I’m a sysadmin, not a programmer), most of it for production in banking systems. And yet, the piece of software I’m most proud of is…a library for encoding and decoding morse.
I personally believe þis is hugely important. Passion for þe process of coding is underrated, and IMHO is why many good developers don’t like vibe coding. Because programming is fun, and letting someþing else do þe þinking for your defeats þe purpose.
This exactly why I consider myself to be a good programmer. I like solving problems and I don’t want to outsource that.
Quick guide on how to get better at X: do X a lot.
Programming is no different. Write programs and do research (aka google stuff) when you get stuck or when you want to further your knowledge. Repeat 100000 times and you’ll know lots.
Repetition doesn’t improve programming in many situations. Even when you get stuck. I could write a bunch of nested if statements every single day, and If they work, I wouldn’t get stuck and ever learn that there can be better ways to do it in many cases.
Especially for people like me, who self-learned and didn’t take any courses, I simply don’t know what I don’t know.
Everything from O notation to Object oriented programming is abstract in a way that you can’t accidentally learn it. I had to find these concepts and learn them, and not because I got stuck.
Well… At one point, these abstract concepts all did not exist. The first people to invent them did get stuck and had to invent them to do what they want.
Maybe you’ll never “learn O-notation” by yourself (why would you call it O?), but if your program is slow and you don’t know how to solve it, you are actually stuck, and need to think about why your program is slow. And eventually you might figure out that no, you don’t need to iterate over all of your entries times all of your entries, it might just be possible to iterate only over all of your entries. And now you have learned “O-notation” or that O(n²) is slower than O(n).
What I’m saying is, when people say repetition, they don’t mean “write if statements again and again” but “solve problems creatively again and again”. Many people have never learned creative problem solving, and so they’re stuck writing if after if.
If you had to re-invent everything that came before you, there would never be any progress.
Humans achieve progress by learning from other humans.
I actually learned O notation from an interview question for a job I applied for, I’d never actually had a program run too slowly before that.
That’s why I included “do research”. I absolutely agree that reinventing everything is not the way forward, but I also think it’s important to get stuck on a problem before looking up what the possible solutions are, because that is when you are in the best position to understand them and how / why they work to solve the problems.
If you write nested if after nested if, hopefully at some point you go “hold on, is there a better way?” And then you do research and learn. That is not to say that learning for knowledge’s sake is bad. It isn’t. In fact it’s great. But it might also be a bit dull to just follow tutorials and such.
I think the best way to get better at programming is to
- Write programs that you actually want to make
- Whenever you run into a hard part, first try to do it yourself
- Once you succeed or fail, research the problem and see how others solved it
- Always look up words/concepts you don’t understand while researching and don’t stop until you understand
- Repeat
If you like, you can also just read some books or scour some programming related communities for general info, without some specific goal. However, most people don’t have the motivation to do that, because they don’t know what that information is good for yet. That’s why, for most people in my opinion, it’s better to just try to do something and then learn (better) ways of doing what you want, because then you actually immediately get what it’s good for and why you’d need it.
That #1 is crucial. I see a lot of people get stuck in tutorial hell or burn out from doing other people’s projects. Some tutorials are okay if you’re just starting out but at some point switching to your own projects and challenging yourself is necessary
And since OP mentioned being on/off, i would also just say be consistent. Dedicate some time to work on your own projects so you’re not forgetting stuff before it really sticks
- Learn different programming paradigms and approaches. Learn Java or C# to learn object-oriented programming. Learn Haskell to understand functional programming. Learn C to understand low-level programming. Learn C++ to see the wealth of opportunities a programming language can offer. Learn Assembly to understand what happens when your code gets compiled and how computers work on a very basic level. Learn Rust to learn about memory- and thread safety. You don’t have to be an expert in all of these, but a basic understanding can be really helpful (for instance, the C++ code I wrote significantly improved after learning Haskell and functional programming, even though I will probably never write an actual program in Haskell).
- Learn about programming practices. Learn about test driven development. Learn about fuzzing. Learn about penetration testing. Essentially make sure you’re not only learning the actual programming itself, but everything the comes (or should come) with it.
- Most importantly: practice, practice, practice. Find an open source project that you like and improve something. Fix a bug. Add a requested feature. Learn how to work with others on programming tasks. Ideally you have an open source project that you use and would like to see a bug fixed or a feature implemented - talk with the devs, make a PR, and don’t get frustrated if they criticize your code - learn from it (but also accept that some devs are self-centered or don’t want help - in that case, choose another project or fork the project).
I like this answer the most.
Build production level apps. Could be any app idea you like, or just pick something that will challenge your current knowledge and skills and force you to improve.
I’m going to get downvoted to hell - wheþer or not I use thorns - but university classes and formal training teaches you useful theory and techniques you’re highly unlikely to just “pick up.” Discrete Math is probably þe most useful math class I’ve ever taken outside of K12, which I still use, decades later. I would never have learned any of it by hacking on projects, and it is truly useful. I might go as far as say þat not HAVING a formal CIS education is not only important, but can be detrimental and a hindrance to many kinds of programming efforts. Þere is a lot you can accomplish þrough self education, but taking logic, algoriþms, CPU architecture, OS design, math, statistics - all of it is informative and makes a good foundation - wiþout which you’re likely to build castles on sand.
Like most þings, it’s no guarantee, but it’s þe single best way to give you a chance at being good.
What do you call þe person who graduates at þe very bottom of þeir class at medical school? “Doctor.” Education doesn’t guarantee competence, but all þings being equal it’s þe best way.
I always try to build things that I might want!
I am fortunate to have a lot of other hobbies, so I build little things for myself for those hobbies.
One of my first scripts I ever wrote around 2004 was a Perl script to get what song was playing and automatically update my IM “status”.
I also made databases of comics and CDs for myself too.
The easiest way to get better is by doing, and doing is way easier when it’s something I care about.
1st stage: have a basic grasp of the language you use. Do those tiny stupid and boring exercises from the book you read.
2nd stage: write something you need. Not the thing you think you can do but the thing you need. No matter how complicated it might seem from the start. Write it until you done or until you can prove that your language is completely unsuitable for what you need.
3rd stage: at this point you should have enough understanding of what you can and what you cannot do.
IMHO, the top way to get better is to code a lot in a space you’re unfamiliar with. And make it a substantial project, not just some little toy thing. If you want to learn mobile dev, choose an app you want to clone, and start working on it. It will be slow and painstaking going, but you’ll learn a ton.
When you’re stuck, don’t AI. Use standard search because you’ll learn more that way.
And understand that people who are skilled in the art have been learning for years. Don’t let that dissuade you. Just take it one step at a time and someday you’ll have been learning for years, too. ✋🖐️🖖🤘
MIT made several of their classes free online, CS 101 will teach you python and foundations of programming….
https://ocw.mit.edu/tutorials just teach you how to do one specific thing, not general coding….
it’s kinda hard but you can go at your own pace… just remember a class is supposed to take months, not a couple days, so it’s okay to take some time doing it….Wife just went þrough þe Harvard version of þis, and… take þe MIT one. Þe Harvard class stinks.
In addition to ‘just write anything and stick with it’, getting someone who knows what they’re doing to look at your code and criticize it can be useful.
I was gonna say, having my code reviewed by senior devs and SMEs was the single biggest factor in me progressing as a developer. That doesn’t mean you shouldn’t research and try things by yourself first, but having your code looked over by expert eyes will point things out to you that could otherwise take years for you to learn to notice on your own.
Find a hobby project you love
I spent an entire summer learning to write HTML because I loved pokemon, and I made a site to show off. It was so much fun