By eating the brains of programmers who are better than you.
Programming
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
Experiment with multiple libraries and library methods or built in methods?
I would argue that you shouldn't use external libraries. No need to import and entire lib to do one function, try making the function yourself. Yes it will not run as good but you can then optimise from there and see how the library does it after.
Lots of good advice here. I'll add a bit more that is non-technical. Get and study the book "Symbolic Logic" by Irving M. Copi. It'll help you to think more critically and expose you to different logic patterns. More philosophical than technical but I see it as being like math for words. As with everything, you get better over time if you keep at it.
Dedicate yourself with a more long term project (1+ months). I think the best way to learn is through the pain that comes with larger code bases.
Start small. Add more and more features. If there’s something you don’t know how to make, find a tutorial or a guide and make it work with your project.
Eventually you’ll discover pain points in your project. The feature you want to make doesn’t fit well with your current code. This is good time to learn from your previous mistakes and adapt your old code for the better (refactoring).
Over time you’ll learn more and more techniques to write code that can grow. You’ll see for yourself why some coding styles are considered bad and why some are better. This is difficult to see just by working with short term weekend scripts.
Don’t worry about failing. No one writes ”perfect” code. You’ll learn from your mistakes.
Code reviews. if you have no one who can review your code for you get an AI to do it
code little projects for things you're passionate about; make a to do list and put it on github/codeberg; look in issue queues for anything labelled "good first issue"; just clone a repo for a project you like and look around the code to see how they do things; go old school and get agile publishing books (humble bundle has good deals on these most times)
The best way is to try and make projects you want to make.
It is important to make ones that you really want to do yourself. I don't know how it is with the others, but I immediately got demotivated after a day of trying to develop something someone else made just for the sake of learning.
In my experience, you will learn better and faster by developing things you actually want to develop. And you will also be rewarded with a good amount of dopamine.
Learn different languages. A tool is good for problems it was designed to solve. Here is a list of programming languages i would recommend in addition to python.
- c
- elixir
- rust
- go This would give you different perspectives on how a problem can be solved. And stay far away from jacascript.
Tutorials are nice to get the mechanics of the language but you should not stick with them for a long time. Start doing your own projects as soon as you feel comfortable with the language.
Check out The Weekly Challenge. Doing these helped me become more comfortable in my programming language of choice (Nim) and let me jump into a project when one comes to mind.
After coding a lot, and talking to many people, I have decided that while most people can be trained to be decent programmers; the critical ingredient is both an interest and the ability to sit down and do it for long periods of time.
As long as you have both you will find your path.
For me I learned a lot by reading books, coding my own things, and reading other people’s code. Often on first read, I was intimidated. Sometime I had to take a while to figure out new things. More than once I had to stare at a few dozen lines of code all afternoon.
It really helps to have a debugger to step through each line of code as it runs . This shows the values of variables at each step
And that assumes the code runs at all. I learned to debug my own code, when it would not run, by making every conceivable error several times until I could read the output in my sleep and know how I messed up. That takes a while to make that many errors!
But debugging is definitely very important
First of all, like all skills, the more you do, the better you get.
One approach not listed would be to read books on algorithms and try to implement them.
Another would be to read good source code. The "good" part is the difficult one here, though.
Have a look at "The TeX Book" and/or "The MetaFont Book" - Both books are well annotated "sources" for two working and long-term assumed bug-free programs. You can learn a lot from those, not only about actually writing a program, but you can get a lot meta-knowledge off this project.
Or look at the sources for the glibc/glibc++.
Just keep coding. Feel free to use as many guardrails and tools as necessary in your IDE (linters, auto completes, mouse over definitions, etc) to make it easier. To use a language metaphor, you want to be focusing on how to communicate, not on things like who vs whom, the subjunctive case, or adjective order. If you need projects, there are plenty of lists out there, but doing something you actually care about and breaking it down into chunks small enough to do is probably more sustainable than a bunch of random tasks someone else recommends.
As for learning new languages: when you have to. If there's something specific you want to do and it's only done in a specific language, then go for it, but there's nothing inherently good about knowing multiple languages, especially if spreading yourself thin prevents you from improving in your main language (or is detrimental because it muddles the patterns you've learned in each).
I am a learn by doing kinda guy, so I learned more just writing code to accomplish a goal than I did reading textbooks and guides. Just give me a crash course in the syntax and a page of functions and I'll be fine with pretty much any language.
my bro whos in programming, younger than me still had to go to community college for cheap courses to get a good foundation, you might need that, he doesnt have a degree, but it takes years of studying and learning like others mentioned to get at a level where you are "hirable" by an employer.(no degree).(im not in the field though)
- Make changes to existing projects
- Create and use projects you have an interest or use in for yourself
- Reading technical articles
- Reading guidance docs (like Microsoft dotnet or SQL Server docs giving introduction to architecture, systems, approaches, behaviors, design decisions, etc)
- Working with more experienced people - seeing them work, being instructed, reviewed, commented, guided by them
- Experiencing alternative technologies and approaches
- Experience in general
- Exploring existing projects and their architectures
I don't know how far along you are in Python use. In general, I don't think Python guides you into good practice or architecture. It's too dynamic and varied of a language. You'll need a framework to be guided. Personally, I have a dislike for it for multiple reasons. Others seem to like it. Other languages and ecosystems are more limited, in good ways. (Maybe I'm misinterpreting "todays" Python, I've only peeking experience with Python.)
I would suggest trying out Go or/and then C#. Both are relatively simple to get into, and have more native/mainline frameworks and guidance. C#/Dotnet in general has a lot of guidance, documentation in broad and specific, and tutorials and sample projects.
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.