How do I get better at programming

Status
Not open for further replies.

LittleJess

Banned
Messages
1,089
I feel like I'm stuck in the middle, how do I get better at programming, I know the basics of java and come from a background of C.

Is there anything I can do to improve my skills? I still feel like a noob when it comes to coding, haven't done it for a while due to depression and stuff.
 
I've been trying to learn C++. The best way I have found is simply tinkering with it. The hardest problem is coming up with a project that is fun, challenging, and doable. I work with C and Arduino so I started out by interfacing The Arduino to the computer and controlling simple games. Then I made it so information from the games were sent back to the Arduino and displayed information on an LCD. This is all done through the C++ side and I am slowly starting to figure out how it works. I think eventually, there will be a "click" and the language will just make sense. :)
 
It's gonna sound somewhat of a cliche answer but, practice. See if you can come up with an idea for a little program to write that does something specific, or automates something if you wanna try that type of thing. How simple or complex of a program you should pick is of course entirely dependent on what you feel like you'd be capable of making. You could start of with something super small and quick to warm you up, then try something a little more tricky. If you feel like you want to delve into new stuff, find something in your language of choice that you haven't used before and see what that lets you do.

If you can think of something simple to automate, it can be a good way to go about getting an idea of what to make. One time I had to read the output file from another program I was using, but reading through the file by hand was taking me forever, so I cobbled together a quick thing in C just to read in this plaintext file and tell me what I wanted to know.

Or if you want something more to test you, if you haven't seen it before, you could always try doing a couple of things on something like HackerRank.
 
You might try to get motivation by getting involved in a MOOC (check edx, coursera, etc.). It's basically a free course with very motivated people, a forum to get help or ask question.

If you already have some experience, you can try this one for example : https://www.edx.org/course/programming-c-microsoft-dev204x-0#!

You can also try to program some games (like a blackJack for example), I find it really entertaining to learn by creating a game. You can then learn to create an AI for the game, etc.
 
Working on your own stuff is a good way to get started. Pick something you actually care about and not just a make work project. Even if you can only implement small parts of it, having an actual interest in the end goal is motivating.

Beyond that, I would recommend trying to get involved in an open source project. This has a number of huge advantages:
- Working with other people is a really good social experience. Everyone has wildly different opinions when it comes to software, and working in an environment where you have to compromise and can't always have your way is important. You also learn how these things can be organized and managed, and how a collective group of people works together towards a single goal.
- Seeing how other people solve problems and being able to read other people's code to a point where you can build on it (also a very important skill).
- Build experience using tools like version control (git, svn, maybe cvs if you find something really old), bug trackers, issue trackers, etc
- Gives you something to put on a resume / talk about in interviews if you decide to persue this as a career.
 
By programming I guess (original advice I know)

But the better advice is actually the right mix of theory (courses, tutorials, websites, reading other people's code) and practice (creating your own solutions to problems). The theory is important, because it prevents you from developing some bad habits which may be hard to unlearn.

Also talking about your own solutions to problems, there is often more than one way to do a thing. When you've done something, ask yourself whether there is another way to do the same thing, another way to structure the program. Play with the alternative ways and think about why one solution is better than the other.

And I second Coursera, plenty of good tech courses (just beware - if you sign up for a few courses, they will spam you to death - don't use your primary email - yes, there are settings and you can uncheck like a hundred boxes that you don't want those emails, that's another option). Besides coursera, some gems can also be found simply on youtube, or individual languages have particular tutorial sites.

The approach which has worked for me with several languages is a read a little bit / course / tutorial (but not more than say 20 hours of studying) and then start working on my own things immediately. Even things which seem way beyond your current level. When I get stuck, don't know how to solve a problem, go to google / the program's documentation / stackoverflow and learn as you code.

I would also say that your learning priorities will depend on your reason/motivation why you want to learn the language. Do you want to get a job or freelance or build your own things for commercial purposes or is it just a hobby?

I also second open source projects (if you plan the CV/job thing), although I've never got much involved in that personally.
 
Status
Not open for further replies.
Back
Top