5 good habits that will make you a better programmer

  • (2 Pages)
  • +
  • 1
  • 2

19 Replies - 8403 Views - Last Post: 28 April 2011 - 03:30 PM

#1 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1639
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

5 good habits that will make you a better programmer

Post icon  Posted 11 July 2010 - 11:17 AM

*
POPULAR

During my morning perusing of the Internet I came across what I feel is another good article; 5 habits that will make you a better programmer and I found it an interesting read. While I dont agree 100% on everything the OP says, I think he has some really valid points that will help most become better at this trade.

I'll list the 5 here (with a small excerpt) but you'll have to read the original to see his opinions/writing on each tip:

  • Focus on One Type of Language at a Time

    Quote

    If you are designing and developing for the web, there are often numerous different languages that you will need to familiarize yourself with, and it can be tempting to try to learn them all at once, especially considering how interconnected they all are.

    I suppose that, to some degree, this is inevitable. But if you really want to improve quickly, I recommend focusing on one particular area of expertise.

  • Write Your Logic through Comments

    Quote

    When it comes to coding, there are many tenants and ideas I stand by. One of this is that code is 95% logic. Another is that logic doesn’t change when translated from human language into a programming language.

    What this means is that if you can write it in code, you can write it in a spoken language like English or French.

  • Study Templates, Plugins, and Open Source Code

    Quote

    The web is an incredibly accessible and open place, especially in the design a development communities. This disposition of the web can be a valuable resource for anyone wanting to become a better coder.

  • Read Books

    Quote

    While there is a ton of awesome information on various blogs out here on the web (like right here on Six Revisions), there is still nothing quite like reading a good book on a subject. Blogs are great for articles and tutorials on specific subjects and can work wonders for quick tips, but in my view, nothing beats a good book for helping to build a strong foundational understanding of a larger subject.

  • Experiment

    Quote

    The last thing that I would suggest you should get in the habit of is to just have fun. Sit down, experiment and see what you can come up with on your own.


Is This A Good Question/Topic? 15
  • +

Replies To: 5 good habits that will make you a better programmer

#2 NeoTifa  Icon User is offline

  • Whorediot
  • member icon





Reputation: 2586
  • View blog
  • Posts: 15,618
  • Joined: 24-September 08

Re: 5 good habits that will make you a better programmer

Posted 11 July 2010 - 11:22 AM

I have an addition, actually programming might help too. That's my problem. :/
Was This Post Helpful? 1
  • +
  • -

#3 Dogstopper  Icon User is online

  • The Ninjaducky
  • member icon



Reputation: 2870
  • View blog
  • Posts: 11,023
  • Joined: 15-July 08

Re: 5 good habits that will make you a better programmer

Posted 11 July 2010 - 11:28 AM

*
POPULAR

Those are all definitely good things, however I am wanting to express the importance of experimentation. I have had little formal education and most of what I know is due to experiments that I have conducted.
Was This Post Helpful? 5
  • +
  • -

#4 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1639
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: 5 good habits that will make you a better programmer

Posted 11 July 2010 - 12:12 PM

I agree Dogstopper, though he has it in his list I think it should have been higher in the list, maybe 2 or 3 (I think it's more important than #5)
Was This Post Helpful? 0
  • +
  • -

#5 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6039
  • View blog
  • Posts: 23,437
  • Joined: 23-August 08

Re: 5 good habits that will make you a better programmer

Posted 11 July 2010 - 12:56 PM

Jeez, I wish I could focus on one language. There's a reason my nick is "JackOfAllTrades" ... because somehow I've ended up being the guy that will do anything and everything in whatever language is needed. :helpsmilie:
Was This Post Helpful? 0
  • +
  • -

#6 Skaggles  Icon User is offline

  • THE PEN IS MIGHTIER
  • member icon





Reputation: 251
  • View blog
  • Posts: 640
  • Joined: 01-March 09

Re: 5 good habits that will make you a better programmer

Posted 11 July 2010 - 04:00 PM

I have the same problem with not being able to focus on a single language. Recently, I've been focusing on C# more, but I still have some languages on my list that I would like to try.
Was This Post Helpful? 0
  • +
  • -

#7 Valek  Icon User is offline

  • The Real Skynet
  • member icon

Reputation: 542
  • View blog
  • Posts: 1,713
  • Joined: 08-November 08

Re: 5 good habits that will make you a better programmer

Posted 11 July 2010 - 10:49 PM

I'm sort of at the middle ground between focused and branched out. I know and am pretty good with a few different things, but they're all web-oriented (with the exception of MySQL, which obviously is useful in a host of different applications). Then again, I've always enjoyed building for the web better than building desktop applications. Maybe one day, though.

I also agree that experimentation should be higher on the list. Sure, when I started with PHP I read a tutorial. But immediately following that, I started thinking of things I could do with each new piece I learned. Then I came up with more complex ideas on what I could do, and looked through the PHP documentation asking myself "How can I do this?". Now that I know how to do a great number of things, I find myself returning to these subjects asking myself "How can I do this better?". I try to learn at least one new function or class a day.

Without lots of experimentation though, I doubt I'd be anywhere near as proficient as I've become.

This post has been edited by Valek: 11 July 2010 - 10:49 PM

Was This Post Helpful? 1
  • +
  • -

#8 cfoley  Icon User is online

  • Cabbage
  • member icon

Reputation: 1940
  • View blog
  • Posts: 4,028
  • Joined: 11-December 07

Re: 5 good habits that will make you a better programmer

Posted 12 July 2010 - 02:52 AM

5 was the right place for experimentation.

Often you only remember the last part of something you read.

He had the most to say about experimentation. If he had put it as number 1, many people would have stopped reading by the time they finished it.

It was the only point jam-packed with pictures. The rest would have seemed dry after it.

There was no indication that they were ranked in importance anyway.
Was This Post Helpful? 0
  • +
  • -

#9 dsherohman  Icon User is offline

  • Perl Parson
  • member icon

Reputation: 226
  • View blog
  • Posts: 654
  • Joined: 29-March 09

Re: 5 good habits that will make you a better programmer

Posted 12 July 2010 - 03:16 AM

re: #2, ugh! Use comments to explain why, not what. The code already tells you what is being done and, if you choose good function and variable names, it should be readable by anyone familiar with the language. If it isn't clear what the code is doing, then you need to either improve your naming, stop trying to be so clever, or both - adding comments will turn it into heavily-commented bad code, not into good code.

Worse still,

Quote

As a bonus, since I will rarely actually delete the comments, writing the logic through comments also means that my code will already be documented, making it easier for others to follow my logic if they ever have to work on it, or even just for myself, if I have to come back to it several months or years down the road!
is no "bonus". When you come back to the code several months or years down the road, you're probably going to be coming back to make changes. To what the code is doing. Which means that all those comments stating what the code is doing will either have to be changed or else they will lie to future maintenance programmers, claiming that the code does one thing when it actually does another.


Use comments to document your API? Sure.

Use them to plan out your function's algorithm? I guess, if it's unclear - but I tend to think that, if it's not clear, you're trying to do too much in one place and should break it down into smaller functions (whose well-chosen names will, incidentally, provide a natural-language description of what's going on without requiring comments for that purpose).

Leave them around as a record of what the code is doing? Nope, that just creates an unnecessary maintenance burden of keeping the comments in sync with any changes to the code.
Was This Post Helpful? 3
  • +
  • -

#10 laserbeak43  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 134
  • Joined: 07-November 09

Re: 5 good habits that will make you a better programmer

Posted 12 July 2010 - 07:19 AM

View PostNeoTifa, on 11 July 2010 - 10:22 AM, said:

I have an addition, actually programming might help too. That's my problem. :/

Amen, I spent years studying without writing a single line.
Was This Post Helpful? 0
  • +
  • -

#11 NeoTifa  Icon User is offline

  • Whorediot
  • member icon





Reputation: 2586
  • View blog
  • Posts: 15,618
  • Joined: 24-September 08

Re: 5 good habits that will make you a better programmer

Posted 12 July 2010 - 10:12 AM

I know, I went a while without programming, and studying more than one language, then when I went back to programming my IDE kept throwing me errors. I was like "lol wut is this i dun even..." Turns out I was mixing and matching languages!!! HAHAHA retard.
Was This Post Helpful? 0
  • +
  • -

#12 baavgai  Icon User is offline

  • Dreaming Coder
  • member icon

Reputation: 5780
  • View blog
  • Posts: 12,596
  • Joined: 16-October 07

Re: 5 good habits that will make you a better programmer

Posted 12 July 2010 - 10:31 AM

View Postdsherohman, on 12 July 2010 - 04:16 AM, said:

re: #2, ugh!


Agreed. #2 made me throw up a little in my mouth.

Code is documentation. Comments are like those yellow highlighter pens. You add a comment when there's something notable that a programmer needs to be aware of. If you highlight the whole page, what's the point?

Sometimes we get what I consider overly commented posts here. The first thing I do is remove all those comments. They're usually redundant, often wrong, and simply make it hard to scan the actual code.
Was This Post Helpful? 0
  • +
  • -

#13 NeoTifa  Icon User is offline

  • Whorediot
  • member icon





Reputation: 2586
  • View blog
  • Posts: 15,618
  • Joined: 24-September 08

Re: 5 good habits that will make you a better programmer

Posted 12 July 2010 - 10:43 AM

booooooooo
Was This Post Helpful? 0
  • +
  • -

#14 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2241
  • View blog
  • Posts: 9,413
  • Joined: 29-May 08

Re: 5 good habits that will make you a better programmer

Posted 12 July 2010 - 12:07 PM

Comments should be used as reminders of not only what the code does, but why you are doing this way.
Imagine if you inherit a project that has no comments and bad variables names, you'll be cursing that developer.

Use the documentation of the language (eg xml documentation in .net


I would add a 6th to that list;- Abstraction.
Learn the code design patterns. Eg Factory Method
Can the code better if you raised the level of abstraction.
Was This Post Helpful? 0
  • +
  • -

#15 laserbeak43  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 134
  • Joined: 07-November 09

Re: 5 good habits that will make you a better programmer

Posted 12 July 2010 - 01:50 PM

View PostNeoTifa, on 12 July 2010 - 09:12 AM, said:

I know, I went a while without programming, and studying more than one language, then when I went back to programming my IDE kept throwing me errors. I was like "lol wut is this i dun even..." Turns out I was mixing and matching languages!!! HAHAHA retard.

Oh yeah, I go from making a pact with my inner demons, swearing to write a Z80 emulation in VHDL, to writing a C# app for 52 weeks of code challenge in half a day!!
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2