views:

207

answers:

8

So I'll say right here that I'm no professional coder. I'm a hobbyist. And pretty much like other people I feel like I'm doing it wrong.

Like this question A feeling that I'm not a good programmer if have began to feel like that. Now I know basically that they say you shouldn't worry and that your good even if you continuously doubt yourself. But, they are talking to him. I'm not like him (in the sense I'm more of a newbie)... I've been coding as a hobbyist for 3 years (3 hobbyist years mind you!) unlike his 10-11 years that he states.

Also, the only thing I've probably read in-depth is Teach Yourself C++ in 21 Days. And before I continue, just so your not confused about the various questions I've posted on (mostly) iPhone and OpenGL, I have poked and prodded at those two things for a few months each and finally sort of got a hang of both of them. But, from what I've noticed, is that I suck at making good code. For me its not even a debate of whether I'm doing it wrong or not: I can tell (from the various spaghetti code I create and other various discrepancies I, and others, can see and have noted in my code). What is a good way to get rid of these awful habits of mine and do it in a more correct, or if there is no "correct way" then I mean "typical", way?

+1  A: 

If I could give you two pieces of advice, they would be to introduce yourself to Test Driven Development and follow an online community related to TDD in the language of your choice and secondly, go learn about the SOLID design principles for object-oriented programming.

If you do this, you may drop some of the spagetti code habits that you have developed in the last few years. Both of these topics are very approachable, have a lot of literature, both in print and online and they have pretty vibrant online communities to give you help and advice.

Cheers.

Dave White
+1  A: 

As a hobbyist, don't stop ENJOYing programming or reading other codings. You have no bussiness pressures!

It's time for you to educate yourself with Object Oriented Programming (OOP) concepts like encapsulation, separations of concerns, decoupled design, etc. These are some of the basics you need to master at this time. Most of the good practices have foundations on such principles.

+5  A: 

Get involved in an open source project of some kind.

Casey
+1 because this is on my to-do list..one day :P
Jeriko
Or start a new one yourself (I mean the OP)
fish
+4  A: 

Well look the sad truth is 50% of developers are below average. Actually due to the Jon Skeet factor it's more like 65%. But that doesn't mean you should throw in the towel. (If everyone did that it would only serve to set the bar even higher, making even more people depressed about it.)

At least you acknowledge the fact that you aren't satisfied with yourself and want to be better. I know people that write terrible code and think it's the greatest thing in the world. But I don't think I've ever met a good developer that wasn't embarrassed of the code he wrote 6 months ago. It's normal and it's a sign of progress.

Josh Einstein
I prefer to be a pessimist: 90% of us aren't in the top 10%! 8P Seriously, despite one famous programmer/author saying the top qualities of a good programmer are hubris, laziness, and ...(I'm too lazy to look it up, just wanna get this comment done now), most people who have accomplished great things, who made a difference, have been of humble attitude, and maybe didn't have the top skills in the relevant fields. Read autobiographies of founders and instigators of notable organizations and projects.
DarenW
+1  A: 

What hobbyist developer should do: (I am not an expert; I have listed down all my thoughts. Please correct me, If I am wrong)

  1. Need to learn the language(C, C++, or Java) thoroughly. Many of us fascinated towards computers and programming and we started learning and building pieces of software for fun. Many book you can find on amazon.com about best practices. One can go through that.

  2. Learn concepts like OOPs, Design Patterns, UML. Before all these, one should ask "why" for every answers. Which will help you understand, best ways of modeling the system. Many C programmers when moved to C++, they uses Class like a container for storing all there variable and methods. So how to create a class, why I have to create an abstract class. So "Why" is useful.

  3. Pick up core concepts, like Operating system, Computer organization, Computer Architecture, Algorithms, software engineering etc. Most of us are just programmers (designation says "Software engineer"). We all know how to code and get the working solution. Beyond this, most of us don't know anything about computers. Because, many programmers are from different streams of engineering. Learned these programming concepts and started building applications and joined as software engineers in some company. But we (other stream) never learnt these concepts. So need to pick up these concepts which will help in understanding and coding better.

  4. Participating in conferences (like Microsoft TechEd), which helps understanding the upcoming technologies.

  5. Writing the blog about the best practices, your findings, new concepts, work around solutions. Blog will act like a discussion book, where visitor will tell their views, which will help you understanding the concepts better.

  6. Subscribing to RSS from blogs. This is really helpful.

  7. Amazon.com. I found amazon.com is really helpful in picking up the right book for learning new concepts. user reviews and also check for list of books.

Harsha
"Microsoft TechEd" is not the good one but ECOOP and OPSLA is the best one.
mathk
That is WAY too much for a hobbyist. Design Patterns, UML and TDD are completely unnecessary for the hobbyist. Knowing OS, Architecture and the likes are equally so. I am a hobbyist when I get home from work and I can tell you I don't apply any of those to my personal projects. It'd be a waste of what little free time I have.
Pessimist
It all depends on how far you like to travel in this programming world. Increasing knowledge of width is good for initial days. But if someone really need to work with particular problems require depth knowledge. I have listed down things which people suggested me and I found things useful. Again, It all depends on what depth one want to reach. Any ways thanks for comment.
Harsha
A: 

Learn how to code correctly, how to express yourself in the least amount of code possible.

Forget everything about RAD, use unit tests exclusively to develop your code and follow design patterns and best practices.

Don't write garbage code, forbid yourself to use copy & paste but create your own library of reusable classes.

And then - GO FUNCTIONAL (seriously).

Oh, and if you use Java - switch to C#, seriously. Much better infrastructure, much better tools, much cleaner language.

stormianrootsolver
A: 

Reading books/blogs/websites is a good and absolutely necessary way to build up the knowledge base. However, to get out of writing bad code, nothing beats outside help. With this I mean practices like pair programming, code reviews and such.

For a professional this is of course much easier as most of us are not the only coders at their workplace. For a hobbyist... well, I guess the only way is to find a friend (from next door or from internet) who is interested to start a coding project with you.

Trust me, another view to your code can greatly expand your own view.

fish
A: 

I would like to warn you about all that has been said.

More precisely about mainstream language. Learning "mainstream" language is not always the good way. By mainstream I mean (Java, C#, C++, PHP ...) I don't mean that there a bad, it just that they most of the time failed to teach you concept right.

Mainstream language most of the time are incidentally taking old concept and promote them as new.

For example now in PHP you have closure(actually there are lambda but ...), in C# too... Closure/lambda are a very old concept from LISP, back in the 60's.

So be in alert and alway try to really found out were all things come from. This is difficult but the more you do it the more the sharper you mind will be, like many other things in fact :).

mathk

related questions