Live data from Hacker News

Ask HN: What habits made you a better programmer?

news.ycombinator.com

91–100 of 103 posts

Re: Ask HN: What habits made you a better programmer?

#92
post #81

Earlier quoted context omitted.

Actually by taking a nap you are doing something really cool. Let me explain: You are actually inviting your right hemisphere(the creative side of your brain) to come out and play. The right hemisphere cannot be forced into thinking that much so by taking a nap you are actually letting the unconscious work for you. As a really interesting side note, Thomas Edison used to take a nap whenever faced a difficult problem.…

I've heard this left-brain right-brain stuff before and I'd like to know where it comes from. Do you have any sources you can link to?

I've read about it in a book called "Pragmatic Thinking and Learning" by Andy Hunt.

Re: Ask HN: What habits made you a better programmer?

#93
post #73

Noticing pain points. It takes time to develop a taste for good solutions. But when you modify or write code, and you say, "this is harder than it should be," this is a code smell and there is a better way to globally solve the problem. Thinking first, writing later. When practicing for the ACM programming competitions in college, I discovered that when writing code before understanding the solution, I eventually nee…

"Thinking first, writing later. When practicing for the ACM programming competitions in college, I discovered that when writing code before understanding the solution, I eventually needed to start over. I have never seen a counterexample." The thing is. Some times writing code is how you best come to understand the solution. One of the things that have made me a better programmer, was exactly realising this. If there…

I like what Fred Brooks says here, something along the lines of: Be prepared the throw the first one away since you will anyhow.

Re: Ask HN: What habits made you a better programmer?

#94
post #66

Participating in programming competitions like IOI, ACM, Topcoder, GCJ, etc

How does that help? To me they seem like interesting puzzles, but with little relevance to problems in practical projects.

I think these kinds of problems make you comfortable with algorithmic thinking, it may not always be necessary to implement algorithm X or whatever in your day to day code but being comfortable with algorithms (by practicing) means you don't push off or miss the correct times to implement algorithm X.

Re: Ask HN: What habits made you a better programmer?

#95

Heavy caffeine usage and liberal alcohol usage on occasion. Avoid both of those. When I have a a problem I do one of two things: 1) I work on trivial things like code cleanup and reorganizing things, or 2) I get my head completely out of the computer. Go for a walk. Sit outside and just look around for a few minutes. The anti-pattern here is popping off to look at your email, FB, or HN. It keeps the brain active in c…

>Heavy caffeine usage and liberal alcohol usage on occasion. >Avoid both of those. I'll keep it short and sweet. Family, religion, friendship ... these are the three demons you must slay if you wish to succeed in business.

Ideas like that are a fine way to lose before you even start.

Re: Ask HN: What habits made you a better programmer?

#96
post #66

Participating in programming competitions like IOI, ACM, Topcoder, GCJ, etc

How does that help? To me they seem like interesting puzzles, but with little relevance to problems in practical projects.

this article on when to use algorithms is great: http://www.bluebytesoftware.com/blog/PermaLink,guid,4db70333...

Re: Ask HN: What habits made you a better programmer?

#97
post #43

Being aware of and managing my ignorance. I don't know if I can describe this very well, and I've only recently started explicitly noticing this about myself, but I seem to have a well-developed intuition of how much I am "in the dark" about a particular domain, problem, technology, library, behavior, etc. I seem to sense well (and can back up with explicit arguments if necessary, but it stars with a feeling) when th…

I have a lot of "darkness" around me concerning threading, but isn't it a net win even with the GIL if the threads are mostly waiting for IO to finish?

In the case I had in mind, the threads were CPU-bound and the programmers naively thought that they were running concurrently. For someone coming from a C++ or Java background, that's a natural assumption to make, and Python doesn't put up many (any) red flags to warn you on the way. For example, note that the pydoc for the module threading manages to avoid any mention of the GIL. You can learn how to create and start Python threads without having any idea that they won't run Python code concurrently.

You're right that if the threads are mostly I/O-bound, it can be a net win, although I seem to recall that even in this case, Dave Beazley's work showed that even one CPU-bound thread is enough to spoil the party significantly for the rest.

Re: Ask HN: What habits made you a better programmer?

#98

I'm a big fan of technologies that have steeper learning curves, but pay dividends over time. Examples are: Emacs, Lisp, XMonad, git, my Kinesis Advantage keyboard, swype, etc. It's nice when technologies are user friendly or obvious to use immediately (like Quicksilver), but If it's something I'll be using all the time I go for long-term efficiently over early user-friendliness.

Are you a colemak or dvorak user?

I agree with you on all of those items. It's a little scary, actually.

Re: Ask HN: What habits made you a better programmer?

#99
post #63

I work on what is most exciting to me and then switch when the excitement wears off, switching back again when the excitement comes back. If nothing is exciting, if there's resistance (usually from lack of sleep, lack of exercise) then I focus on restoring my routine, and working on something easier like copywriting, email, invoice admin etc. until the excitement for something else wells up again. But I keep working.…

I've found that when "nothing is exciting" it's almost always due to the "resistance" you mentioned. Realizing this has really helped me to avoid getting discouraged when it seems like the thrill is gone.

Re: Ask HN: What habits made you a better programmer?

#100
post #46

Don't assume things. When you're developing, there are a thousand little decisions to be made. Don't assume that the server will be up before the client. Don't assume that the file you open will be writeable. Don't assume that the database is there. Don't assume that the user knows what you know. Don't assume everything works. Maybe it's because I spend lots of time in teams developing large (overly) complicated syst…

Hugh Akston in Atlas Shrugged: "Contradictions do not exist. Whenever you think that you are facing a contradiction, check your premises. You will find that one of them is wrong."
Post reply on HN