this post was submitted on 06 Oct 2025
77 points (95.3% liked)

Programming

23155 readers
464 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 

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

top 50 comments
sorted by: hot top controversial new old
[–] Azzu@lemmy.dbzer0.com 64 points 1 week ago (1 children)

I think the best way to get better at programming is to

  1. Write programs that you actually want to make
  2. Whenever you run into a hard part, first try to do it yourself
    1. Once you succeed or fail, research the problem and see how others solved it
    2. Always look up words/concepts you don't understand while researching and don't stop until you understand
  3. 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.

[–] starshipwinepineapple@programming.dev 22 points 1 week ago* (last edited 1 week ago)

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

[–] Diplomjodler3@lemmy.world 21 points 1 week ago (2 children)

You get better at programming by programming.

[–] inzen@lemmy.world 2 points 1 week ago (1 children)

This. For me personally It helps to think of programming as as craft. It also helps a lot if you have someone more skilled than you available to discuss.

[–] Diplomjodler3@lemmy.world 2 points 1 week ago (1 children)

How do you know how skilled I am?

[–] inzen@lemmy.world 4 points 1 week ago (1 children)

I'm not sure I understand the question but I will try to answer. I did not mean to question you skill in particular, I know nothing about you.

I agree that programming requires repetition e.g. more programming, that's why I said "This".

What followed was a generic advice that helped me personally to improve a lot as a developer. I got the chance to work side by side with developers experienced in different types of projects, developers I consider more skilled than me in different ways. I consider this avaluabe experience.

Hope that clears it up a little, nothing to do with you're skill in particular. English is not my first language so maybe my phrasing is a little weird.

[–] Diplomjodler3@lemmy.world 4 points 1 week ago (1 children)

You wrote:

It also helps a lot if you have someone more skilled than you available to discuss.

Which could be read as you addressing me directly. Which of course I'm aware was not what you meant. I was just trying to be funny.

[–] inzen@lemmy.world 4 points 1 week ago

Haha, well I guess I over-thought a little 😅

load more comments (1 replies)
[–] dream_weasel@sh.itjust.works 11 points 1 week ago

Write code, get feedback, write more (better) code, get more feedback and repeat.

Just hacking your own stuff 10 hours a day isn't making you better if you're just doing what you have already done or doing things the same way you've done them before.

[–] rozodru@piefed.social 10 points 1 week ago

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.

[–] Lembot_0004@discuss.online 10 points 1 week ago

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.

[–] crapwittyname@feddit.uk 10 points 1 week ago

Nice try GPT-6

[–] unknownuserunknownlocation@kbin.earth 9 points 1 week ago (2 children)
  1. 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).
  2. 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.
  3. 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).
[–] mr_satan@lemmy.zip 4 points 1 week ago

I'd say it takes a certain curiosity to make all of this work. Like the other day I read up on SQL indexes and how they work under the hood. I didn't need to, I know what they do and what I needed them to do. But there was this itch when I realized that I don't know how they do it.

And there are many such things depending on the specialty. I'm in web dev and often the work I do is very detached from actual communication protocols and such. I see devs that don't even know how cookies work in an MVC app. And while it's not necessary, it helps a lot to have basic understanding of what happens when you call an API, how exactly HTTP differs from HTTPS, even what happens at TLS and TCP layer of things.

I consider myself a generalist and it's this curiosity that makes me adequate in many different subspecialties. I'm not the best at things, but I can get shit done myself when I need to.

[–] mikedd@lemmy.world 3 points 1 week ago

I like this answer the most.

[–] MagicShel@lemmy.zip 9 points 1 week ago

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.

[–] medem@lemmy.wtf 9 points 1 week ago (3 children)

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.

load more comments (3 replies)
[–] FizzyOrange@programming.dev 8 points 1 week ago (2 children)

I would say:

  1. Just practice, do projects. Also if you can work on projects with other people because you'll read a lot of bad code and learn how not to do things (hopefully).

  2. Learn lots of programming languages. They often have different and interesting ways of doing things that can teach you lessons that you can bring to any language. For example Haskell will teach you the benefit of keeping functions pure (and also the costs!).

If you only know Python I would recommend:

  1. Learn Python with type hints. Run Pyright (don't use mypy; it sucks) on your project and get it to pass.

  2. Go is probably a sensible next step. Very quick to learn but you'll start to learn about proper static typing, multithreading, build tools (Go has the best tooling too so unfortunately it's all downhill from here...), and you can easily build native executables that aren't dog slow.

  3. C++ or Rust. Big step up but these languages (especially C++) will teach you about how computers actually work. Pointers, memory layouts, segfaults (in C++). They also let you write what we're now calling "foundational software" (formerly "systems software" but that was too vague a term).

  4. Optionally, if you want to go a bit niche, one of the functional programming languages like Haskell or OCaml. I'd probably say OCaml because it's way easier (it doesn't force everything to be pure). I don't really like OCaml so I wouldn't spend too much time on this but it has lots of interesting ideas.

  5. Final boss is probably a dependently typed language like Lean or Idris. Pretty hardcore and not really of much practical use it you aren't writing software that Must Not Fail Ever. You'll learn loads about type systems though.

Also read programming articles on Hacker News.

load more comments (2 replies)
[–] beejjorgensen@lemmy.sdf.org 8 points 1 week ago* (last edited 1 week ago)

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. ✋🖐️🖖🤘

[–] theherk@lemmy.world 7 points 1 week ago

There is a lot here with varying degrees of helpfulness. I’ll add one thing. Many have commented essentially “build stuff”, and that is solid truth. That’s how you get better. But just like the whole perfect practice makes perfect, there is one fundamental detail that must be included. Build systems that you understand deeply. Not the code; that you are learning. But it is best to build things where you understand the outcome behavior of the system.

For example, if you don’t really understand what graphics rasterization is, building a raster program, even with a good guide, isn’t going to help as much as you might think. Though it will help you understand graphics, so go nuts. But if you really understand how baseball stats are calculated, do something with that. It will be much more gratifying and the code will be the part you’re learning, not the system it is implementing.

[–] ozymandias@lemmy.dbzer0.com 7 points 1 week ago (1 children)

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….

load more comments (1 replies)
[–] Lojcs@piefed.social 5 points 1 week ago (2 children)

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.

[–] zalgotext@sh.itjust.works 3 points 1 week ago

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.

load more comments (1 replies)
[–] ViperActual@sh.itjust.works 5 points 1 week ago

Generally I start with an end goal, and break it down into logical pieces. For instance I recently wanted to make a custom soundboard for discord. First thing I needed to figure out was how to play sounds. Next was playing those sounds to a specific sound device so that it can be routed into the audio input for discord. Then I needed to figure out how to play the same sound at the same time through the audio output. Then I needed a form to interact with so I could click a button to play a sound. Then I needed to be able to load a config file so that I could update that form when I wanted to add or delete sounds. Then I needed a way to choose files to add to the sound board. And conversely a context menu so I could right click a button to remove it. Then I needed to figure out how to save and load this config file from the filesystem. Then I needed to be able to search for and update the form so I could now quickly find sounds if the list got too long. And then once I had all that working, figure out how to play the same sound multiple times before it finished resulting in a multi threaded soundboard that can interact with any sound device on the machine and saves and loads sound lists all in Python.

[–] morphballganon@lemmy.world 5 points 1 week ago

Be result-focused. You're trying to achieve x. Look at however many tutorials you need to achieve x. Now x is part of your repertoire. Then repeat, with a new x.

Later, you'll think "I need to do y. I've done it before. I'll just copy that syntax, with new variable names etc" and boom, you're good at programming.

[–] zerofk@lemmy.zip 4 points 1 week ago

The things you mentioned are very good, but what I’m missing is feedback and a good foundation.

Feedback should come from other developers - ideally experienced, but a good dialogue between beginners can also teach both sides a lot. For me this came only after I started working, through code reviews. But you could also try contributing to open source, or putting your own code online. Although I fear you won’t get much feedback.

A good foundation is about software and hardware designs. Without this you will inevitably come to a point where you made a fundamental mistake in design.

For hardware design I recommend YouTube. Many channels talk about low level hardware. You don’t need to become an expert, just get a high level understanding.

For software design, check out the gang of four’s Design Patterns. It is a seminal work. You don’t need to read it all but be aware of the patterns, and study a few like factories and facade in detail.

[–] AngryCommieKender@lemmy.world 4 points 1 week ago

Playing Factorio.

I shall not be taking or answering any questions.

[–] SinTan1729@programming.dev 4 points 1 week ago* (last edited 1 week ago)

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.

[–] calliope@retrolemmy.com 3 points 1 week ago

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.

[–] falseWhite@lemmy.world 3 points 1 week ago (2 children)

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.

load more comments (2 replies)
[–] 0x01@lemmy.ml 3 points 1 week ago

I've taught a few developers and have pretty extensive experience on the topic

Tutorials are fine, but don't get stuck on the idea that you need guidance through the whole process, it’s better to avoid tutorials entirely than it is to follow a bunch of tutorials.

For example, when I started out my most recent student we began with some challenges that I knew would provide some context for future projects, then immediately jumped into those projects. Depending on what you're passionate about, the best project for you can differ, but we did the following projects:

  1. A lemmy face wizard page, literally just a list of lemmy faces that clicking on will copy to your clipboard
  2. An invoice maker, since they needed to send me invoices because I was paying them for their time
  3. a react native sudoku app, this one was challenging and took them a couple months, but when they were done they took over one of my contracts for mobile development

And the challenges that led to these projects? Everything from basic algorithms to api interaction puzzles.

My advice would be to pick something that you love and come up with the tiniest project you can possibly think of, then cut the scope a little more.

For example, love pokemon? Maybe make a website that you can click on one of the types and it will highlight the strengths/weaknesses of that type. Love golf? Maybe make a golf score tracker mobile app, a big button to add a stroke and another to move to the next hole.

If you are passionate about something it gets a lot easier to get better at programming because the stuff you're missing will become obvious and you'll need to look it up to finish your project.

My very first project nearly 30 years ago was a windows 95 app that moved your mouse to draw in mspaint automatically.

I'd say starting a new language is a pretty big mistake until about 4-5 months after you feel proficient with your first language. Starting over with new syntax has actually caused more than one of my students to quit

[–] jcr@jlai.lu 3 points 1 week ago

Self taught Python (and using linux OS) over the last 15 years ; the only ways I found real progress in my code/coding were while doing the following : 1/ (at start): following strictly a "school manual" with lessons and ALL exercices. It was Python 2.3 I think, a manual (in French) by Swinnen. To be honest I stopped before reaching the GUI and network programming, and guess at what I suck today in Python programming ... 2/ projects, personal projects. I did pro (paid) projects on the side, but with the impetuous to deliver results to be paid, I can not progress. On personal projects I can take the time to try stuff, to rewrite functions or programs, and to "improve" existing code with new/better coding constructs.

So here I am with a rather random level of Python programming proficiency, currently being average at most but enough proficient to have workable programs.

This isn't exactly answering your question, but one thing I see a lot of people get wrong is not knowing how to express what they're trying to do. An example I recently ran into would be when I was trying to enforce that an input to a function is a child class of an abstract class. If you express the problem with the right vocab you won't end up googling "how to make sure a variable is of the right type" and getting a different answer completely. I find that having taken classes and followed through books has helped me the most because the vocabulary to define my problem is ingrained in me. That's what I'd recommend the most, is increasing exposure to concepts and vocab so that it doesn't feel weird when you have to express a new problem.

[–] markz@suppo.fi 2 points 1 week ago
  1. Build stuff.
  2. Repeat step 1.

Really, just keep doing random projects and look up things along the way. Other learning resources like courses can help too, but should be considered supplemental.

when would be good to start a new language after learning one

Do you feel like it? If you're interested in some language, just try it.

[–] darklamer@lemmy.dbzer0.com 2 points 1 week ago

First something that you have probably already guessed yourself: practice,. practice and more practice.

Then something that too many people in my experience tend to not fully appreciate the value of: read code written by more accomplished programmers and try to figure out and understand why they wrote it the way they did.

[–] arthur@lemmy.zip 2 points 1 week ago

Reading: The Pragmatic Programmer (Andy Hunt & Dave Thomas)

There are podcasts and YouTube channels with great content already available, with videos about specific topics and or libraries.

Read other people's code.

I would advise you to avoid using chatbots to write code or explain it; programming seems a lot like learning human languages, if you do not exercise it, you will not improve. Read code and read error messages.

Using chatbots to understand concepts can be useful, but be careful, it doesn't know anything, it just generates text that seems correct, so always check on other sources.

When you feel comfortable in python, learn the basics of a new language. Each language has its own "way of thinking", and knowing that will make you a better programmer.

And have fun; without it, it is hard to stick to anything.

Following tutorials and courses is definitely a very popular way of learning programming but I personally hate it. For me, the motivation was always a problem to solve, and programming was just a tool to solve it. Of course, you probably need to follow some kind of guided experience to gather the absolute fundamentals, but to get better you just need to apply this in practice.

The first ever problem I decided to solve with programming was organizing pirated video files into manageable directory structure. I knew almost nothing about programming at this point and my thought process was something like this:

  1. Which programming language should I use? Search the web, read a bunch of articles, make a decision. I chose Python.
  2. Ok, first I need to find the files to process. Search the web for "get files in a folder Python". Read a bunch of answers (never just a single one!). Apply the solution.
  3. Now I need to somehow discern between movies and series episodes. Search the web for "check if text contains text Python".
  4. Repeat until you have a working program...

Now, the most important part of this is to have an idea for a project which either solves a real problem of yours or just is exciting to you. Some examples of my projects:

  • Due to weird grading system used in my school, calculating GPA was pretty inconvenient. I decided to solve this with programming. I wanted to make the solution easily available to my teammates so I created a web app.
  • I wanted to control my smart TV using a computer. I knew it can be controlled using Android application so it seemed likely that I can do the same using my PC.
  • I bought a smart lightbulb and I was playing with setting it to different colors while listening to music. A thought suddenly popped up: "hey, can I make it blink to the music?".

When starting most of these projects I had no idea how to approach the problem. So I just searched the web until I knew it. In the beginning you will probably be searching and reading much more than writing code. But that's a good thing! Programming (or rather software engineering) is not about typing out code, it's about breaking down the problem into smaller chunks until you actually know how to solve each of the chunks with the tools you have at hand. Once you have this understanding, writing code is usually rather easy.

[–] sobchak@programming.dev 2 points 1 week ago* (last edited 1 week ago)

Working with/on things I found interesting helped a lot. I.e. lots of small projects/scripts, using different frameworks/libraries/languages that looked interesting. Experimenting and exploring different ways things could be done. Programming is one of those "10,000 hours" things; you need to be interested in what you're doing to do something like that for so long. Computer Science coursework helped a lot too, especially the courses heavy on algorithms, data structures, big-o, proofs, etc.

In my CS coursework, we were exposed to many different languages and programming paradigms at the very beginning. It's fine to experiment and start learning multiple languages at once (preferably, all being quite different, such as a pure functional language, procedural language, object-oriented, declarative logic, etc).

[–] sik0fewl@lemmy.ca 2 points 1 week ago (1 children)

Find an open source project you love an contribute to it.

Don't. Unless you are confident you are not adding hot garbage to the code base.

[–] BilboBargains@lemmy.world 2 points 1 week ago

Identify a problem that you can solve using code. Use ai to help with syntax and code structure. Chip away at the problem a little bit each day.

load more comments
view more: next ›