Live data from Hacker News

Ask HN: For those programming 10+ years, what do you wish you knew 4 years in?

news.ycombinator.com

531–538 of 538 posts

Re: Ask HN: For those programming 10+ years, what do you wish you knew 4 years in?

#531

Earlier quoted context omitted.

> if you're in the habit of writing tests after your function is made - it shows you haven't put much thought, which means you haven't done the proper analysis of why the function exists, if the function is really one function or should be two functions, what arguments it can take, what it should return etc. I'd say that's a pretty broad brush you're painting there with

I'm not wrong.

I would say that you are, but you've convinced yourself otherwise.

But testing is important, for sure.

Re: Ask HN: For those programming 10+ years, what do you wish you knew 4 years in?

#532
1) Learn one thing really well and stick with it until you master it. Human confidence isn't wired to derive satisfaction from breadth of skills. The stronger single skills you develop, the easier it becomes to develop context and understanding as you add to your skillset.

2) Get solid on the basics and stay current: data structures, algorithms, computation and basic operating systems. Without these you'll never reach high levels of competency.

3) Develop boundaries. I've seen stellar developers reduced to a pile of depression and anxiety by poorly trained managers getting them to overcommit. Learn to know what you know well and what you do not know well. Push the rest back onto your manager and make them do their job.

4) Take time to enjoy and savor this time. We're in an age of technology that has never before existed.

Re: Ask HN: For those programming 10+ years, what do you wish you knew 4 years in?

#533

Earlier quoted context omitted.

Adding my corollary, if you must use dynamically typed languages - ensure at any cost that you split it up into multiple small independent codebases.

Note that a language can be dynamically typed and strongly typed at the same time. An example of this is Python. Another example is the latest release of C++, which is strongly typed but now allows for dynamic typing with the 'auto' keyword.

Thanks for clarifying. :)

I assumed that my parent really meant to write statically typed, not strongly typed.

Re: Ask HN: For those programming 10+ years, what do you wish you knew 4 years in?

#534

Earlier quoted context omitted.

> Sitting in front of a computer 60+ hours a week is not great for your body. The next sentence should be: So don't fucking do that . You do your family, your employer, your coworkers, and most importantly yourself no favors by working 60 hours a week in front of a screen. It doesn't matter if you're working for yourself or someone else. If you think otherwise, you've been brainwashed.

Or if you are not too "brainwashed", you can decide for yourself how much time in front of the computer is too much.

We know it's unhealthy, unproductive, and unsustainable, and people do it anyway. There is pressure to overwork, coming from employers and from a misguided urge to keep up, and all kinds of addictive behaviors that keep people in front of the screen. This is a widespread problem to be addressed, not just some preference for each individual to decide.

Re: Ask HN: For those programming 10+ years, what do you wish you knew 4 years in?

#535

Earlier quoted context omitted.

I am in Atlanta, I would love to connect with a decent recruiter. I have a low tolerance for fools. Msg me please.

How?

old fashioned email works, since there appears to be no obvious way to do it thru our profiles.

moc.liamg AT hcselftrebor reverse that.

Re: Ask HN: For those programming 10+ years, what do you wish you knew 4 years in?

#536
post #407

Some really simple technical principles: Explicit is better than implicit. All state is hard to reason about and debug. Code that doesn't have tests is brittle. Short code is better than long code and no code is better than both. Inheritance of implementation is hard to reason about. Some technical advice: Write comments about why you're doing something, not how. Write lots of comments. Check preconditions, especiall…

I would give almost the opposite advice:

Whenever you feel like writing a comment explaining why you're doing something, step back and consider if you can refactor the code so that it becomes self documenting. Code and comments get out of sync easily.

Instead of checking for preconditions, step back and consider if you can make the illegal states unrepresentable. If you have a decent type system available (sum types, no nulls), that's often straightforward.

The best peice of code, the best test and the best comment is the one you didn't have to write because of good design.

Re: Ask HN: For those programming 10+ years, what do you wish you knew 4 years in?

#537
Something more popular than PHP.

I got into web development in the last 2000's doing PHP backend development and CMS work, and now everyone seems to have gotten into more opinionated dev environments that really involve anything but PHP.

Re: Ask HN: For those programming 10+ years, what do you wish you knew 4 years in?

#538
post #168

Haskell. I spent at least five years chasing down "AttributeError: X has no attribute 'Blah'"-errors in Python at runtime, and came to think that this was what programming was. Three-or-so years ago I discovered Haskell, which transforms these types of errors into compile-time errors, preventing me from building the program as opposed to a sudden runtime crash. I wonder just how many hours I've wasted doing this comp…

Your comment is not about Haskell but about static typing. I agree with you but there is no need to learn Haskell to enjoy static typing.
Post reply on HN