Live data from Hacker News

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

news.ycombinator.com

271–280 of 538 posts

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

#271
You are going to learn cool new things along the way: just remember though, when you only know how to use a hammer everything looks like a nail. A better way to think of it is "Do not be clever". Write code in the most obvious possible way so you and everyone else that looks at it in 6 months can understand it.

Early on I was always tempted to prove how smart I was by writing very neat code that nobody could understand because I was using some esoteric library or a weird pattern that only kind of fit (although it worked). Don't do that. Try to be very VERY obvious and you'll thank yourself later.

Its easy to over-engineer any project, but I find OOP especially easy to screw up with outsmarting yourself. You've heard of "spaghetti code"? Well with OOP the dreaded paradigm is 'ravioli code' which is tiny little classes all over the fcking place.

Find a better way.

Another rule of thumb someone told me once is that your classes should not be longer than about 1 page of text. Now, before I get yelled at, yes, its very subjective. You could have 100 lines on one page and I could have 30, I get it. But I think the idea is at least it is some* point of reference so you yourself can judge if a class is trying doing too much.

I worked with an "Architecture Astronaut" (see: https://www.joelonsoftware.com/2001/04/21/dont-let-architect...) one time who was supposed to be giving me a way to access a flag in the database. Just a simple boolean that let me set something to, obviously, true or false.

This guy checked in a 200 line class and walked down to my office to teach me how to use it. Finally I said "can I just set the value manually?" "Sure" he says, "Just use this function" and he showed me a 3 line function buried in there somewhere. Last I heard he is still confusing everyone with his overly complex solutions to simple problems for Ford.

Programing is FUN, but it's also a profession. Don't get too lost in the fun of the moment. Write clean, obvious code and you'll see that you don't have to make things complex to have fun. You'll have more fun solving those big problems now because you made everything nice and neat and clean along the way.

I'll end on a quote from Blaise Pascal, Winston Churchill or Mark Twain (depending on how you google it) that I think applies here as well:

"If I had more time I would have written you a short letter, instead I have written you a long one."

This could be rewritten like this:

"If I had more time I would have refactored you a short class, instead I have coded you a long one"

Its a comment about editing (obviously). yes, write long classes then delete all you can to make them simple like I have explained above.

:)

I should make this comment short, but I do not have the time.

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

#272

I have been developing professionally for 20 years and I'm in my early 40s. What I've learned: * Salary compression is real: most companies are not going to keep giving you raises to match what the market would give you for your skills. They would rather you leave and take all of the institutional knowledge with you than pay you the amount you could get elsewhere. Even if that means hiring someone else at market valu…

>> * know how to calculate your contract rate if you're doing contract work.

If you have to wade through traffic to get to your place of work, figure that time into your rate.

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

#274
Been a developer for over 15 years in the Vancouver area.

Various bits of advice:

1) Pay attention to the severance package when you sign your contract. When you join a company, you probably aren't thinking about what happens if things don't work out. But let's say you end up working there for 10 years, bad times hit, and you get laid off. You don't want to be surprised to find that you only get the minimal statutory limit. Some companies, I conjecture the larger ones, will have more generous severance packages.

2) Be cautious about choosing to work in "branch offices" which aren't involved in key decisions in products/features. You may find yourself limited in how you can grow, both in terms of scope of technical projects and scope of career path. This is probably a bigger issue if the region that you live in is not a tech hub like silicon valley.

3) When I was younger, I was completely focused on programming and "software craftsmanship". In fact, many of the problems in commercial software development are people problems -- team co-ordination, process improvement, empowerment, motivation, etc.

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

#275
There are sexy tasks and unsexy tasks. Don't be a hero and do the unsexy tasks for the good of the team or company. You will become typecast and soon won't be able to get any of the sexy tasks. Your boss will stop investing in your career and you won't be competitive when you try to get a new job.

You actually have to play politics to be allowed to do your job to the full extent of your abilities.

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

#276

Earlier quoted context omitted.

The five combined have a total headcount of roughly 660k, meaning they would need to be hiring annually roughly 7.5% of their total just in software engineers. At that level I don't buy it. Since the number is dominated by Amazon, who has a huge logistics contingent, I'm not sure specifically about engineers. I'd say roughly half of that total is engineers that have something to do with software (not necessarily soft…

Median tenure at Google is about a year: http://www.slate.com/blogs/business_insider/2013/07/28/turno... . Amazon is famous for burning out some of its employees very quickly. Why do you think 7.5% is a reasonable number?

You seem to be agreeing with me, so I'm not sure if I understand you...

I was addressing Patrick's numbers (50k software engineers per year and >90% retention rate). Your link provides evidence that the latter number is incorrect, which was part of my point in both posts. In fact, it demonstrates that Patrick's 5-year scenario is the exception rather than the rule.

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

#277
post #56

There is no future in software development as a job. Move to a management position quickly, network, make friends with decision makers, don't spend too much time on crafting your skills, your reward for perfection will be more insane work and crazy interviews where one part not 100% done kicks you out. Work on your appearance, kiss up, lift, dress properly, use anti-aging cosmetics, make cool looking hairstyle, wear…

This is both cynical and exceedingly true. It's something I totally missed early on as a naive developer-puppy who just assumed that doing a good job was enough. The politics tend to be even worse in smaller companies where everyone knows everyone and it's harder to carve out your little corner of expertise and hide/ignore the drama.

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

#278
post #263
post #193

Earlier quoted context omitted.

Having to move to get promoted is frustrating and real. Within large companies you can usually move to another team (how hard this is varies), but it is typically required that this be a lateral move, which then slows velocity, whereas changing companies would not normally be a lateral move. I'm cautious of the word "Architect" — even though I've had it in my job title in the past, and still believe that it can mean…

Lateral moves inside a large company are a good way to improve a CV. It is easier to get "hired" for new technology stacks because some people in the company already know you, instead of random HR guy that doesn't care about technologies used in side projects, only what was used on your very last project at work.

Yes. It certainly isn't a one way street. I'd also add that having seniority/tenure has its own value within a larger organization.

There is certainly no one-size-fits-all advice here!

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

#279
post #233

That shipping stable software that works and meets requirements is what people really want. In other words, what the non-tech business people want, or your customers want, is software that fixes their problems, makes their lives easier or makes them more money. It's easy for us programmers to become fixated on using a newer JS framework, a slightly tighter Java loop or the latest cool language. Took me a few years to…

This is why I always ask what is the business value of doing cool thing X on a project. Using your words if "using a newer JS framework, a slightly tighter Java loop or the latest cool language." doesn't improve the business value of what the customer is getting out of the product, it gets a very big NO. I became very much against "cv building driven programming".

There's a balance to be struck there, though, and pejoratively referring to the seeking out of ways to improve as "CV driven programming" probably isn't the healthiest attitude out there. If you're not doing new things, you run a very great risk of sitting in a weak local maximum. Don't fix what isn't broken--but you need to be stretching out, too. Not doing so induces a sense of stagnation to a team and can chase off developers with ambition (which you can and should harness) and a sense of quality.

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

#280
post #248

Earlier quoted context omitted.

This is some of the worst advice I've ever seen. Do this if you want to die sad and alone with nothing but your money beside you I guess. The last sentence is actually not bad advice though.

It used to be better, now if you aren't running your own software company you are treated as a 3rd class citizen and you have to become sleazy "Saul Goodman" to prosper. I am super disgusted by the state of affairs right now, which is why I am running my own businesses, but don't expect this would get any better as the computing tech innovation pace has slowed down to a crawl, stabilizing existing power structures fo…

I guess it depends who you work for. I prefer to work at small new companies until they get off the ground. Then I shift to the next small new company. Small meaning < 30 employees for the whole organization. Pay isn't as great, and the work is definitely more under pressure, but I find that the only thing expected of me is quality work. I don't have to worry about trying to climb ladders or schmoozing management. I understand that not everyone has the skill set to do what I do, but I think that if you're tired of Mega Corp social engineering, taking the pay cut for more personally rewarding work is a great path to go down. After all, quality of life has very little to do with what you have beyond a certain threshold and more to do with what you make of it. I get paid less than other developers in my area, but I work entirely from home and I choose the technologies, architecture, language, etc.
Post reply on HN