How to be a better programmer in 6 minutes
21–30 of 48 posts
Re: How to be a better programmer in 6 minutes
#22How about learning to type with your feet, or only using the mouse, or maybe code blindfolded? (or all three!)
Somehow, people seem to have gotten the notion that doing things the hard way is somehow better or morally superior or something. It's not.
Re: How to be a better programmer in 6 minutes
#23Bigger text size is also good for not going blind. I've been coding with bigger text for a few months now, fewer headaches too.
A bigger font is better for your upper back, too. Take a look around you and notice how many of your fellow developers--or anyone working with text at a computer--slouch forward every few seconds to peer at the monitor. Then notice yourself doing it. Bye, bye, chiropractor.
Re: How to be a better programmer in 6 minutes
#24Coming back to the article I want to mention some points. (Maybe some things are biased..)
Ref. 1.) While a bigger font size is good for your eyes (hope you guys don't stare to long in one session on the screen) it is bad to understand the bigger picture in my opinion. Sure you are "forced" to write good code, but that is a standard mantra which you should follow anyway. People who like TDD (BDD) aso. have embraced this deeply. Doesn't that huge font size rather reduce your productivity? Please consider this: http://www.codinghorror.com/blog/archives/000012.html
"Its better to have more screen space, not less."
Ref. 2.) Making a syntax element like hard coded strings so much stand out is contra productive in my opinion. It would be much smarter to focus on emphasizing the important aspects of your code rather than over-highlighting strings. No? I mean sure, everybody has a different taste and style, but where is the harm in hard coding certain strings? Firstly its fast, secondly this is a typical flame of how far can we eliminate certain things from our code? (instead of embedding SQL use ActiveRecord, etc.) If you want to go so far great, start by embracing e.g. gettext, and put everything is a DB. Oh wait, why is my code so slow?
Ref. 3.) I fully agree, though why does this whole article sound like a sales story for .net ? "Here are lists for a few .net languages: C#, VB.net, F#."
Ref. 4.) Basically I agree but "Ghoulish regular expressions"? If you define it by "ghoulish", how about rewriting it to make it more clear anyway? Increase tests by 1%? Uh, well I think with proper input verification you can eliminate alot of problems. I mean its great to work with unittests but a good advice would probably have been, hey please work with unittests its has shown to make code better but if you are too lazy at least use assertions?
Ref. 5.) Interesting advice, good idea though but if you look at code from "an open source project" than it might make you scream and run away. I think this advice is maybe better: http://norvig.com/21-days.html This is btw. the perfect article to outline why this whole "How to manage x in y ." is stupid.
Ref. 6.) Good advice. ".. distraught at just how much room you've got for improvement." Hm, depends on what my goal is.
Ref. 7.) Interesting advice, though wouldn't a "cruicial to your application method" be rather well programmed? Often it is probably better to refactor the whole function because if its so long that you have problems just writing it from scratch again, then there is too much code in it in the first place.
Ref. 8.) "And don't just write. Write a compiler!" WTH. Please Mr. Justice Gray, could I remind you that the article title is "8 ways to be a better programmer in 6 minutes." ? I mean the whole idea of this article is rubbish, (see peter norvig link) but compiler, 6 minutes, what?
While I generally agree than understanding "a" compiler and what it does. (Scanning, lexing, parsing etc.) Then also implementing one, is very good for your education but it should rather be in your next article of "how to be a better .net programmer in x years."
General comment:
I really like HN, the quality coming from reddit is great, but posts like this are a waste of time. (At least in my opinion.)
Re: How to be a better programmer in 6 minutes
#25>...
>The effect is: you're forced to write shorter methods. And that's a Good Thing.
I find the opposite is true - I need to see more lines to appreciate exactly how goddamn awful that 200 line function is. And when I go to refactor it I need to be able to see as much as possible of it on the screen to start extracting bits out and make it shorter without losing context.
Re: How to be a better programmer in 6 minutes
#26One thing that really helped me when I code is to switch to a real "coding font". Wile the default monospace font on OSX (monaco) is fine, I find that my eyes adjusts better to the "proggy clean" fonts (avaiable for free here: http://www.proggyfonts.com/ ). With good coding fonts, you are able fit more into the screen, distinguish between 1 and l, 0 and o more easily..etc. Here's a discussion on programming fonts a w…
I thought Monaco was atrocious until I anti-aliased it. It's like an entirely different font - one that I prefer over all others now.
To see just how different they are, open up a window where you can toggle AA on and off (e.g. a Terminal window), and compare Monaco at 9pt-12pt each way.
Re: How to be a better programmer in 6 minutes
#27I'm supposed to master an obscure language element, read through the source code of an open source project, refactor a method, run a static analysis tool, and do all the rest--all within six minutes? I do like the idea for making hard-coded strings stand out, however.
Maybe he meant incrementally increase your coding abilities, you know, master a new keyword in 6 minutes, read the source code of an open source project in 6 minutes, run a static analysis tool in 6 minutes, ..., and write a compiler in 6 minutes.
Re: How to be a better programmer in 6 minutes
#28Use a bigger font size. I am a violator here. I have emacs set to 6x10 on a 25" monitor, the result is 104 lines on a screen. And I like it.
Re: How to be a better programmer in 6 minutes
#29Why would I not "hard code" strings? These suggestions don't seem that great to me. How about learning to type with your feet, or only using the mouse, or maybe code blindfolded? (or all three!) Somehow, people seem to have gotten the notion that doing things the hard way is somehow better or morally superior or something. It's not.
The "ugly strings" suggestion is bizarre, though. If he means "avoid hardcoded strings so you can localize your program", then you still need keys into your message catalog, which are usually...strings! And if he means "define constants for strings", you still need to define their values, which are also...strings!
Re: How to be a better programmer in 6 minutes
#30Why would I not "hard code" strings? These suggestions don't seem that great to me. How about learning to type with your feet, or only using the mouse, or maybe code blindfolded? (or all three!) Somehow, people seem to have gotten the notion that doing things the hard way is somehow better or morally superior or something. It's not.
It's often good to try things the hard way and then go back to doing it the easy way once you've mastered that. The easy way seems so much easier once you've done otherwise. The "ugly strings" suggestion is bizarre, though. If he means "avoid hardcoded strings so you can localize your program", then you still need keys into your message catalog, which are usually...strings! And if he means "define constants for strin…
I agree that doing things the hard way can be an interesting exercise though, which is why coding blindfolded is just as good of a suggestion as these others.