Live data from Hacker News

Ask HN: What habits make a programmer great?

news.ycombinator.com

141–150 of 191 posts

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

#141
post #125

1. Embrace the grind. Motivation comes and goes, but the grind remains. This doesn't mean working all day every day, but rather setting aside specific blocks of time and doing the same thing every single day. Workouts should happen at the same time every day. Work should happen at the same time every day. Each of these things should be daily habits and doing them at the same time every day helps them become habits. 2…

Is this a live to code philosophy?

It's not a philosophy at all. It's just a list of random things that have improved my life for the better.

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

#143
First you have to define what a great programmer is. Best CS knowledge? Highest Pay? Most prolific? Leading edge? Knows lots of languages? Most famous? Makes software that users love? Makes profitable companies?

Usually great programmers are good at some of the above but never all, so you have to be clear about what you mean by great. After that its easy :)

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

#144
1. All programmers should drop the "I don't have to be good at math" habit...you're disrespecting people who are likely in possession of knowledge that will help you later. Being "good at math" means you communicate and try to understand concepts. It's more about attitude than knowledge.

2. All programmers should learn Galois theory, not only to get over the idea that they can't be good at math, but to learn to appreciate math. The book by Ian Stewart is good, although I would supplement it with Artin or Dummit and Foote.

3. Try to figure out why Ken Thompson and Dennis Ritchie did what they did, when they did it. Very important for getting a historical understanding of programming. Also, try to figure out why Ken Thompson said what he did in "Coders at Work".

4. Read The New Hacker's Dictionary.

5. Read Naive Set Theory

6. Try (and fail, at least for a year) to read A Shorter Model Theory (don't give up!)

7. Read Code Complete followed by the Python 2.x source code

8. Read SICP and write a scheme interpreter in a language of your choice

9. Implement a simple LR parser, instructions here: https://en.wikipedia.org/wiki/Simple_LR_parser

10. Play Kitten's game http://bloodrizer.ru/games/kittens/

11. Play the UC Berkeley CS 61a adventure game https://inst.eecs.berkeley.edu/~cs61a/reader/

12. Play JSRobowar https://statico.github.io/jsrobowar/

13. Read "Development of the C Language" https://www.bell-labs.com/usr/dmr/www/chist.html

14. Read "The Mythical Man-Month"

15. Read "Simply Scheme"

16. Read "The C Programming Language"

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

#145

Meta-habit: learn to adopt different habits for different situations. With that in mind, some techniques I've found useful for various situations: "Researchey" green-field development for data-science-like problems: 1. If it can be done manually first, do it manually. You'll gain an intuition for how you might approach it. 2. Collect examples. Start with a spreadsheet of data that highlights the data you have availab…

> Take a look at filesizes. The biggest files usually contain the meat of the program, or at least a dispatcher that points to the meat of the program. main.cc is usually tiny and useless for finding your way around. This is my #1 pet peeve with GitHub. When I first look at an unfamiliar repo, I want to get a sense of what the code is about and what it looks like. The way I do that with a local project is by looking…

https://chrome.google.com/webstore/detail/github-repository-...

I think this Chrome extension called "GitHub Repository Size" might be exactly what you are looking for

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

#147
post #125

1. Embrace the grind. Motivation comes and goes, but the grind remains. This doesn't mean working all day every day, but rather setting aside specific blocks of time and doing the same thing every single day. Workouts should happen at the same time every day. Work should happen at the same time every day. Each of these things should be daily habits and doing them at the same time every day helps them become habits. 2…

I find #3 (minus the music part) to be so important and yet so challenging, having grown up in a house where the TV was ALWAYS on in the background. I spent my teen years falling asleep with the TV on. It feels very uncomfortable at first to forego TV/Movies, FOMO hits hard.

A couple of ideas for taming it.

0) Media detox. It's can be so uncomfortable at first, feel what its like to go without for a week. A similar thing worked for me when I was trying to lose weight, getting used to fasting and what true hunger felt like allowed me to restrict my calories effectively without falling off the wagon.

1) Don't pick up new shows, finish out current seasons and leave it at that.

2) Make a rule that you won't watch TV/movies unless you are watching with someone else, so it's a social activity.

3) Only watch shows when you are working out, cleaning, other mundane task like that. Although you could go the other direction and say those are great activities to practice mindfulness with.

4) Pick one day/week to allow for watching things, ie Part of Sunday is just a lazy day in bed. Kind of like a cheat day.

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

#148

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).

Practicing empathy for yourself is really hard. It's why most developers suffer from imposter's syndrome. I go to therapy in order to help "practice".

Doing all the other self-care that OP mentioned is a good way to start moving in that direction. Be patient and kind to yourself. Once you've learned that, you actually start developing and being able to feel that way about others. It sounds a little hippie dippie, but once you have patience and you're at peace with yourself, you're much better at being able to accept the faults of others.

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

#149

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…

Think about your error handling best practices. Mine are:

1. Re-structure your logic so the error cannot happen

2. If you can't do 1, recover from the error silently and continue on with the program

3. If you can't do 2, handle the error gracefully and notify the user of what state is changed, letting them choose whether or not to continue

4. If you can't do 3, inform the user of what happened and ideally provide the user corrective action they can take, then exit cleanly with an error code

5. If you can't do 4, exit cleanly with as descriptive of an error code as you can

6. If you can't do 5, you're probably faced with crashing or exiting with some unhandled exception. This is a bug that should never go into production.

Always be looking for opportunities to move your code up that hierarchy. Moving every 6 to 5 is my personal bar for barely acceptable quality. 4->3 is usually a big win (basically anything that prevents the program from exiting).

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

#150
post #145

Earlier quoted context omitted.

> Take a look at filesizes. The biggest files usually contain the meat of the program, or at least a dispatcher that points to the meat of the program. main.cc is usually tiny and useless for finding your way around. This is my #1 pet peeve with GitHub. When I first look at an unfamiliar repo, I want to get a sense of what the code is about and what it looks like. The way I do that with a local project is by looking…

https://chrome.google.com/webstore/detail/github-repository-... I think this Chrome extension called "GitHub Repository Size" might be exactly what you are looking for

Nice, thanks!
Post reply on HN