Live data from Hacker News

Ask HN: What habits make a programmer great?

news.ycombinator.com

31–40 of 191 posts

Re: Ask HN: What habits make a programmer great?

#31
post #17

Study the idioms of whatever language you are using. If you're writing production code, consistency is everything. Don't write anything surprising or clever - you'll just paint yourself into a corner later, and it'll be impossible to maintain. Boring code is good code. Take error handling really seriously. A program that can gracefully reject input with a detailed error message is far better than one that crashes mys…

Please, everyone who thinks, "I just expect correct inputs" take note of part two. I've had so many discussions with colleagues about that "Why don't you check for null pointers and give an error message?" "I think it's perfectly fine to just crash with a null pointer, I don't expect null pointers." That attitude hurts everyone who has to support what you write. edit: Reformatted as a habit "Make sure whatever you wr…

Only if a.) you can do something to recover from the null pointer or b.) you can provide more information about its cause than you could recover from an ordinary stack trace. Otherwise you're just adding code without changing the ultimate result of the NPE: a debugging session.

Assertions, however, are great. If you can force the program to throw that NPE closer to the point where it actually illegitimately became null, the debugging session becomes much shorter. Null-safety in the type system (like with most modern languages: Swift, Haskell, Kotlin, Scala, Rust, etc.) is even better.

Re: Ask HN: What habits make a programmer great?

#32

The "developer on fire" podcast closes out each episode by asking the guest to provide three tips for delivering more value. Some that occur frequently are: * Take care of yourself. Get enough sleep, exercise and healthy food. Have hobbies. * Constantly learn new stuff * Practice communication skills. Building stuff fast and well doesn't help if you're building the wrong thing, and you need communication skills to pr…

> * Practice empathy

Any tips on how to do this? I don't often feel things for myself and it's even rarer to experience empathy at a level I can detect. I meditate to try to better understand and learn to detect my feelings, but haven't made much progress yet (I use Headspace).

Re: Ask HN: What habits make a programmer great?

#33
1. Don't "give up" when trying something new and cut-and-paste and thrash around blindly sticking things places. It takes just as long to learn why things work the way they do as it does to slash and burn -- and you'll pick up something useful along the way

2. Check your ego at the door. A good friend begins a class he teaches having coders say "I'm a programmer and I make mistakes"

3. I've seen a lot of simple systems that did useful things that grew into complex systems. I've never seen a system that started off complex being anything but a huge PITA for everybody involved. Keep It Simple, Stupid

4. Learn all the major programming paradigms and be able to solve problems in all of them. In my opinion, this is the first step to being any kind of programmer at all, much less a great one

5. We write code to help people. We write code alongside other people. People are a critical component, yet we hardly talk about them. Programming is about 95% social, 5% technical. But reading the latest industry news, you'd never think that. Keep your focus on the people, not the tech. Knowing and manipulating the tech is how you get in the game. How your work impacts real people is how you master it. You should be a professional and write clean code, but nobody cares about your standards if you're not getting along with others or making something somebody actually wants

6. Study mistakes and disasters. In every true professional field, folks spend a lot of time picking over and thinking about things when they go wrong. You should do the same. A big part of success is simple failure avoidance

7. Pair/mob program and use TDD if you're deep in OO or complex/mutable code. Nothing shows you how much you still have to learn like making what looks like a simple change and watching dozens of tests go red

8. Keep learning more about text processing and command line utilities. There are a ton of people right now writing complex code for things that can be done in a few lines of shell scripting. Don't try to solve everything in the shell, but know that a little bit of code can replace a ton of work if you know what you're doing.

9. Pick 2 or 3 IDE shortcuts and practice them each week. The less you touch your mouse and the more you can do work without moving your hands the faster you'll be. (This is one I need to work on)

10. Hang out with people that are better than you and pay attention. Greatness tends to rub off over time.

Re: Ask HN: What habits make a programmer great?

#35

The "developer on fire" podcast closes out each episode by asking the guest to provide three tips for delivering more value. Some that occur frequently are: * Take care of yourself. Get enough sleep, exercise and healthy food. Have hobbies. * Constantly learn new stuff * Practice communication skills. Building stuff fast and well doesn't help if you're building the wrong thing, and you need communication skills to pr…

I would agree on all of these.

Especially seems that a lot of devs forget about the first point.

In my experience, when I've started doing gym & swimming I became to feel less "burned out" as well as my self-esteem improved :-)

Re: Ask HN: What habits make a programmer great?

#36

The "developer on fire" podcast closes out each episode by asking the guest to provide three tips for delivering more value. Some that occur frequently are: * Take care of yourself. Get enough sleep, exercise and healthy food. Have hobbies. * Constantly learn new stuff * Practice communication skills. Building stuff fast and well doesn't help if you're building the wrong thing, and you need communication skills to pr…

> * Practice empathy Any tips on how to do this? I don't often feel things for myself and it's even rarer to experience empathy at a level I can detect. I meditate to try to better understand and learn to detect my feelings, but haven't made much progress yet (I use Headspace).

I'm an empathetic person and I find myself often trying to put myself in someone else's shoes to see how I would feel if I were them. Nope sure it that'd help you but there ya go.

Re: Ask HN: What habits make a programmer great?

#37

The "developer on fire" podcast closes out each episode by asking the guest to provide three tips for delivering more value. Some that occur frequently are: * Take care of yourself. Get enough sleep, exercise and healthy food. Have hobbies. * Constantly learn new stuff * Practice communication skills. Building stuff fast and well doesn't help if you're building the wrong thing, and you need communication skills to pr…

* Be willing to be wrong, all the time.

Re: Ask HN: What habits make a programmer great?

#38
post #9

One of the most important things, in my opinion, is being able to admit that you don't know or don't understand something. The opposite attitude gets in the way of learning new things, which is really bad for programmers.

> One of the most important things, in my opinion, is being able to admit that you don't know or don't understand something.

further, try to create an environment where others (particularly others who are less powerful) feel comfortable voicing their concerns and are secure enough to state when they don't know or don't understand something.

e.g. if people are worried they are going to be fired or ridiculed in a group setting for not knowing a thing then it would be unreasonable to expect them to say "i don't know".

Re: Ask HN: What habits make a programmer great?

#39
Depth.

Every programmer I admire has worked on their chosen field for years. You can keep flitting between languages and frameworks, but mastery ultimately comes from hankering down on one thing and advancing our collective knowledge a bit further. You can achieve mastery in any field - it can be a business domain - as mundane as a Time Tracking or a Todo list app, or it can be a technical domain - like compilers or databases or browsers. You however can't achieve mastery by consuming what others produce. Becoming an expert in CSS and its quirks is a good vocational investment, but you're no closer to a fundamental understanding of the field by just consuming an API.

You should spend years working on a problem domain that interests you. Look at prettydiff (https://github.com/prettydiff/prettydiff). It is a diff tool, a parser, a pretty printer, a minifier, all rolled into one. It is the most comprehensive publicly available tool in terms of language and dialect support in the world right now. Its code is not the most modular and new contributors might have trouble getting in, but its author has been at this problem for years, and if you called a conference for pretty-printing, he would be one among the few thousand people in the world to meaningfully participate.

Consider blueimp's jQuery File Upload plugin (https://github.com/blueimp/jQuery-File-Upload). While this isn't as foundational a work as prettydiff, the project spans seven years and a thousand commits. It solves a mundane problem, but the sheer effort that has went into it makes it a formidable solution.

Consider Martin Odersky, watch Compilers are Databases (https://www.youtube.com/watch?v=WxyyJyB_Ssc). He has been writing compilers for like forever. He's worked on the field for decades, and has written compilers for everything from Fortran to Java to Scala.

You don't have to be a genius to be a master. You just need to go as deep into a field as you can. Here are a few interesting links you might want to read:

The Joys of Having a Forever Project: http://web.archive.org/web/20130125011224/http://www.dev.gd/...

Rich Hickey on becoming a better developer: https://gist.github.com/prakhar1989/1b0a2c9849b2e1e912fb

You and Your Research by Richard Hamming: http://www.cs.virginia.edu/~robins/YouAndYourResearch.html

Re: Ask HN: What habits make a programmer great?

#40
post #25

This article sheds some light on John Carmack's workflow: http://bookofhook.blogspot.in/2013/03/smart-guy-productivity...

Having just read Masters of Doom, he doesn't give nearly enough credit to diet soda! For me though, I don't feel John Carmack is the kind of guy to hold up like simba to the morning rays. He did his best programming when there wasn't people going on about agile and test driven development and all of the stuff that leeches away at creativity and fun.
Post reply on HN