Live data from Hacker News

The Best Programming Advice I Ever Got (2012)

russolsen.com

61–70 of 247 posts

Re: The Best Programming Advice I Ever Got (2012)

#61
I had a similar experience and similar results. Someone wrote code to perform 1000 queries to pull back 1000 rows in a specific order rather than issue one query and let the Java collection order the results. Amazingly, another person wrote more logic to add a switch to skip this step because it literally took 10 minutes for the app to start when connected over VPN. The fix was trivial and startup time went from 10 minutes to 300 milliseconds. Being the new guy coupled with the fact they had actually lived with this for years, I was immediately hated.

Re: The Best Programming Advice I Ever Got (2012)

#62
I did something similar once but failed to glean such a valuable lesson from the experience. My takeaway was, those people are touchy so leave their shit alone. Not because it’s right but because I’m just trying to get through my day, and i don’t need more politics in my working life. People can be assholes, it’s just how it is sometimes so let them be.

Among my own team, if I raise points or ideas that get disregarded in this manner (as opposed to more thoughtful demurrals), I let it go and don’t push the issue. I’ll speak up if I think I have something worth considering, but I’m not going to beat you over the head to see things my way.

Still, the takeaway regarding being on the other side of that table is really important. Once you start feeling that indignant reaction or “yeah right newbie”, listen harder.

Re: The Best Programming Advice I Ever Got (2012)

#63
There's definitely value in respecting boundaries. Sometimes you have to take a small local inefficiency in order to create a bigger global efficiency. That's life.

In my experience, though, this is a much bigger problem in software because nobody really knows what they're doing. There's no industry standard way to do almost anything. You can argue about "use Foo!" or "don't use Foo, use Bar!" and there's no one Correct Answer, so it becomes a political question.

When my electrician has a power supply over here and needs power delivered over there, we all know he's going to use wires, and he knows the right gauge to use. He's got a book somewhere with the answer, and there's a regulation somewhere that says what he's required to use. But I just trust him to use the right cable, because that's his specialty, and I've never seen him make something that was an order-of-magnitude worse than was required, or that I could do on my own.

Respecting boundaries is a lot easier when you can trust that other people are generally competent. This will continue to be a problem for the next 100 years until we figure out the right way to make good software.

Re: The Best Programming Advice I Ever Got (2012)

#64

The conclusions I completely disagree with. If you discover a way to make the system 100X faster, and the reason is someone else's code, then tell that programmer, and only them, and tell them gently what you found and leave it with them to be the person who implements it, or offer to implement a solution together if they want to. They may or may not take sole credit but it doesn't matter. Definitely do not sneakily…

Maybe Russ wasn't sneaky - especially since he said it was early in his career? Maybe he fixed it thinking everyone would 'high-five' him for the win. Unfortunately, he didn't understand the political ramification at the time.

I've tried your approach. In my experience, the outcome depends on the person who has created the mistake - not the person who fixed it. Yes, be gentle with the solution, but that will not solve the problem if the person you are dealing with does not share your sentiments.

Re: The Best Programming Advice I Ever Got (2012)

#65
There is an entire world to be dissected in the final few paragraphs. The essence of the error the author made (and we know he made an error because he ended up in the head boss's office being chewed out) is to imagine that a successful project is founded on good technical grounds; not true, or not only at least.

The author's presumption here is that the advice was bad, and he learned the opposite lesson (don't accept social boundaries). But the advice WASN'T bad, because the organization doesn't consist of just code product, it consists of a set of programmers, managers, executives, users, customers, etc.

The important question this article raises is: WHY do people write code? What makes someone want to write good code? What motivates them to do work? What motivates them to wish to cooperate with others in their effort, to communicate their problems and insights, and contribute to the greater health of the product?

This, more than anything else, kills projects. The smartest people on earth can accomplish nothing if they petulantly refuse to cooperate, and in order to accomplish that you need to pay attention to more than what is merely technically best, you also need to pay attention to the people in your organization. What do they WANT? If they are anything like a normal human being, they want - to appear successful, to be valuable, to have their skills be seen as valuable, to have their ideas and work be appreciated by others.

We can, of course, dismiss this as "ego" or "politics", as the author does, mere cruft that gets in the way of the ur-goal of the organization, a beautiful product. But if we do so we're really ignoring what people want - and that is NOT to merely be a gear slowly ground down in the service of the greater good, eventually worn out and replaced by a newer, better gear.

Such advice, that we should ignore the very normal (and yes, egotistical) motivations of ordinary human beings at work, is perhaps not the best advice you could get.

Re: The Best Programming Advice I Ever Got (2012)

#66

This article is at best half useful, and missing the other half is potentially quite dangerous (to organizations, to people's careers, etc.) What's missing is a discussion of power and power dynamics (and healthy vs. unhealthy versions of same, let alone how to work effectively in either or drive change). Partly this comes down to a failure on the author's part to care about power dynamics or look at their own power.…

I would not expect junior to fix large organizational issues. Not much possible.

Also, while I strongly believe in treating people with respect and using social skills to the extend one has them, sometimes the right action to take is the one that makes people angry. When your relationships make it impossible to solve technical issues, it not junior who inadvertenly fixed issue who is not displaying social skills. It is whoever feeds the power struggle between departments.

Re: The Best Programming Advice I Ever Got (2012)

#68
I also believe smart people will do dumb things from time to time - especially under the pressure of deadlines. It's always good to assume they were having a bad day.

I know what does not work - printing out a "team-mate"'s code and pinning it to your cube wall w/o even asking a question about it. That goes in the bucket of things I thought I'd never see in the workplace.

Truly amazing...

Re: The Best Programming Advice I Ever Got (2012)

#69

The conclusions I completely disagree with. If you discover a way to make the system 100X faster, and the reason is someone else's code, then tell that programmer, and only them, and tell them gently what you found and leave it with them to be the person who implements it, or offer to implement a solution together if they want to. They may or may not take sole credit but it doesn't matter. Definitely do not sneakily…

It depends what one's goals are. Improve the system? Build good working relationships? Make yourself or your team look good?

In many cases similar to the one you described, the other programmer has already heard what you are trying to tell them and chosen to disregard it, for reasons good or bad. You have outlined a good starting point, but if you stop pushing, you are likely going to maintain the status quo.

Re: The Best Programming Advice I Ever Got (2012)

#70
post #61

I had a similar experience and similar results. Someone wrote code to perform 1000 queries to pull back 1000 rows in a specific order rather than issue one query and let the Java collection order the results. Amazingly, another person wrote more logic to add a switch to skip this step because it literally took 10 minutes for the app to start when connected over VPN. The fix was trivial and startup time went from 10 m…

Oh man. I am so glad that I had the opportunity to work at an organisation that actually celebrated a few such improvements i made.

There was a data ingestion job which inserted 4 million keys into Redis. It was awfully slow. I sped it up a lot using the Redis protocol format and redis-cli --pipe. They praised me for that.

There was a dashboard which queried data from a MongoDB collection and calculated some counts. I changed the design so that the service itself would update the counts so as to avoid costly queries.

I brought down build and deploy times for a service by removing unused gradle dependencies, structuring the build to allow using parallel builds and removing unnecessary configuration generation using templates and the entire team was glad that I solved a major pain for them.

Sorry you had a bad experience but I think this is what we mean when we say company culture.

Post reply on HN