How do I become a better programmer?
I see this question on reddit quite a lot. In fact, I usually see something like it every time I open up r/learnpython or r/learnprogramming. There is always someone wanting to know how to become a better programmer, what magic pill or secret incantation that others do that instantly make them a better programmer. Invariably, there is never a simple answer to their question - often the answer boils down to 'Here's a bunch of tutorials, do them until you know the syntax then work on a project that interests you.'
This often leads to some consternation on the part of the OP as they often wonder 'What project can I possibly work on if I don't know any programming?!?' Often it seems as if they tentatively accept the advice and wander off into the wilderness to see if they can find this mystical project to work on. Sometimes you even hear back from them. Well. Today I wanted to take a moment from my own project and tell you: This is the absolute best advice anyone can give you.
All the practice tutorials out there are wonderful. Most of them, with the exception of a few that are looked down on by communities as a whole, are fairly well suited to the purpose for which they were created: Teaching the syntax of a language. See, that's the thing that most new programmers don't realize. You're not learning how to program when you're doing these tutorials, you're simply learning how to speak the language. Most people learn a few words in the language of python and want to write the next big Facebook or go to work for Google. Well, let me tell you brothers and sisters, that's the equivalent of learning how to say 'Parlez vous frances?' and wanting to immediately set off to write the next big french literary masterpiece. It's technically possible, but so unlikely as to be completely improbable.
Find a project.
So...why learn all that language (syntax) from tutorials then squander them in trying to flop around doing /MORE TUTORIALS/? There comes a point where you're just learning things that don't seem very useful to you at all - but you keep plugging through them thinking 'everyone says do this tutorial, it's GOT to make me a better programmer, right? Dave? Right??' Well, let me give you an example of why it's important to move past tutorials and go on to working on a project that you find interesting. Now, no lie, this is code that I produced in August of 2017. Nothing special, nothing fantastic. In fact, it was probably copied directly from a tutorial somewhere with very little understanding on my part until I began tweaking and moving it around. Now, this level of code was where I stayed until the end of December when I started to get interested in an opensource python project (Evennia. When I started on that it was the end of Christmas break, the kids were going back to school and since I'm a disabled stay at home dad looking for a way to become a better programmer and maybe start earning a little money to bring into the house, I figured 'What the hell...I used to love playing on Muds/Mushes/Moo's back in the day, why not take this out for a spin?' That ended up plunging me headlong into a project that I felt ill-prepared for...but after the first couple of sessions of flailing around, not knowing where anything was and asking a bunch of questions on the (friendly!) irc chat the project uses, I settled down and started going through /their/ tutorials and working on implementing my own ideas.
It's been not quite four months...and this is the code I'm producing now. Granted, there's probably a /lot/ wrong with it, and I'm still nailing down how to implement unittests into my code effectively, but...it's a hell of a lot more useful code that actually /does/ something. I know that it's messy and not as good as some of the other stuff folks are doing, but in the last four months, I've learned (on my own) about Python, git, how to set up a development environment, how important standards are and why they exist. And along the way, I've been working on different things and I'll ocassionally have a little flash of deja vu. I'll go back and look at a project and realize - hey, I've done something very like this in a tutorial! These are the moments when all the seemingly pointless how-to's and automating everything with the kitchen sink tutorials start to actually pay off.
Don't forget the secret sauce.
Here's the secret that a lot of people don't think to tell you until you've been working at programming for a while: You're going to have a hard time of it. You're going to spend a whole day on one method, trying to figure out why it returns a list of tuples instead of just a straight list because something else is doing something you didn't account for. See...that is how you become a better programmer. By sucking at it. Not being satisfied with sucking at it, you google the shit out of your problem, ask on reddit, ask in IRC, post on git or stackoverflow....That's when you become better - when you have something that you're working on that is more important to you to get working than worrying about why the syntax of ','.join(string) and string.split(',') look like that. So...keep plugging along. Find something you want to work on...something that you get up thinking about in the mornings...some puzzle you really want to solve more than you want to watch that last episode of Dr. Who. Do that and you'll become a better programmer. Just be careful or the next time you're on Reddit, you'll see someone asking 'how do I be a better programmer?' and you'll invariably answer 'Do the tutorials, then find a project to work on'.
I hope this helps some of the newer folks some. The folks who are better programmers already, I only ask that you not giggle too badly at my code...I am afterall, still learning :D
Edit
I've had several people ask me how they can contribute to the project, or how to get started. I've created a channel on Freenode
I've also started some contribution guidelines here