views:

268

answers:

11

I've been attempting to learn programming (in C#) for a few years now. The problem I've had is that I'd know what I want to do (or what I want the program to do), but no idea on how to actually implement it. So I often wonder what it is I'm lacking. Is the mindset of a programmer somehow different, and I've yet to condition myself to that type of thinking, or do I just need to know more about syntax and what they do?

Of course, it's compounded by the fact that I have no means of taking classes at the moment.

So is trial and error the way to being a better programmer, or are there essential pieces that I presently lack?

Also, my goal is to eventually get into the Gaming Industry, and I don't know if that affects anything at this point.

+2  A: 

Yeah, it's pretty much trial and error.

Or more accurately, research, trial, error, cry, fix, error, research, success!

Anything I want to do (that is new) I typically find by doing various searches, or I accidentally learn by participating in forums like this, and then am lucky enough to remember when it becomes neccessary.

Just dedicate yourself to research and trying "various things", and then you'll become better at it. You just need to accept that it will be difficult at first, and that that is quite acceptable and appropriate.

You'll get the hang of it. As long as you're motivated, you'll achieve what you wish.

Noon Silk
yup had a crying day to day lol
Preet Sangha
A: 

I like silky's second sentence. I agree. Just hang in there.

Find a project (small project) that you want to do, and then learn how to do it. Any project...like build a calculator or something. If you have a goal in mind, it makes it a lot easier...and it will make it easier to people to help you when you post questions so they can have a frame of reference.

Lots of google searches...and stackoverflow searches ;)

Senica Gonzalez
I did make my own calculator to calculate character overalls in a game I play. I wonder where I go from there though.
Slateboard
+1  A: 

I think the most valuable thing at this point is seeing working code in action. Get your hands on lots of working sample apps with full source that interest you. Look at the source, figure out what does what, and start to modify it!

Then try to write your own apps using similar constructs, and you'll find it much easier.

pkananen
+5  A: 

By far the best way to improve your skills is to practice, practice, practice, and then practice some more. Just like an athlete gets better and hones his skills and natural abilities, the more you code the better you will get. Your best resources are going to be books and the internet--blogs, articles, websites such as SO are incredible sources of information. Google is your friend, learn how to use it effectively.

Find a problem you want to solve, and then find two or three ways to solve it. Being able to approach a problem from different angles can be an invaluable skill.

I would also recommend finding an open source project you can participate in. There are plenty of 'em out there.

Muad'Dib
A: 

One other way that can get you started is to look at standard examples (and I'm sure you can find lots of those for C#) try and run them, understand what they do, and then start modifying them and play around. Get your questions from such tinkering answered by reseaching the net etc. Increase complexity and you'd be on your way in a while.

Varun Garde
A: 

Search around for an C# Open Source project that interests you. Most projects will take any help you can give. This will allow you to practice your skills in a controlled environment.

Craig T
A: 

You do have means to take courses at the moment. There are entire courses, complete with free textbooks, available online. And that's just one quick example.

Kevin L.
A: 

I recommend you work your way through a couple of coding and design books while learning the syntax of a language or 2. Code Complete is a great place to start. As far as what you should start programming, aim for simple things that will solve a problem you have. While picking up a language I have done things like write a program that will auto-organize my media library, kick off processes based on things I tweet from my cell phone, quickly add shortcuts to my favorite launcher app, or organize and archive all of my saved school work at the end of a semester. Also, look at a LOT of other people's code. It's can be hard to code better until you've looked at better code.

With this approach you'll build your abstract skills like design and upfront preparation, practical skills like file access and network communication, and general programmer toolbox items like regular expressions and reflection.

marr75
A: 

Another interesting thing to try is Code Kata. How do you become a great musician or learn to ski or speak a foreign language? Practice. Practice. Practice.

brendan
A: 

Google for Bruce Eckel's "Thinking in ..." books, they're free and very good

Eddy
A: 

Take a look at functional programming languages - This will broaden your mind and therefore change (and probably enhance) the way you look at code and problems.

Dario
Would this be useful for someone at my level of expertise?
Slateboard