Live data from Hacker News

I wrote the SQL query in 5 mins. Why does my engineer say it will take a month?

wtfismyengineertalkingabout.com

61–70 of 129 posts

Re: I wrote the SQL query in 5 mins. Why does my engineer say it will take a month?

#61
seems to be apples and oranges. Ad hoc query vs. a modification/new feature of a product. Depending on the product and dev process around it, it may take a month even for the minor among minor modifications/features.

>Why does my engineer say it will take a month?

if you don't know the answer to that, you're a bad manager. Either you hired bad engineers or you have no idea how your dev process works.

Re: I wrote the SQL query in 5 mins. Why does my engineer say it will take a month?

#62
Unless I catch myself breaking my own rule, I never second guess my developer's time estimate unless I think it's too short. I've been a developer (still am one even though I manage people now too), and I've learned that I can't factor in all the things going through that person's mind.

I have cleaned up too many messes because of negligence from people who do not understand how hard programming actually is. That's what most people, especially us developers at times, fail to recognize. That 5 minutes someone took to write an "easy" query against the CI and deployment server almost brought it down (true story, luckily I was monitoring it look at another issue).

The ability to write code is taken for granted, because anyone can learn it. Some programming is easy, and some is extremely difficult and the real trick is knowing which. What scares me most about the code being written are the one off queries, etc. The ones that will "only be used once" or "only for low transaction instances". That's never true, someone will always have it laying around for that time when "we just really needed to make that update".

An old boss of mine used to say "the perfect is the enemy of the good." This is true, there are a number of times you need get something up and running and worry about fixing it along the way. There are other times when that "good little app" got used in the wrong way and cost us hours of downtime because of a mistake due to rushing. Now the perfect solution doesn't look like it was such a bad choice after all. I can wait a day or so for a query that I could write in 5 minutes. In the long term, waiting a few extra hours isn't going to impact anything that much. I'd rather the developer be through then explain why no one went home that night because we had to clean up a mess.

Re: I wrote the SQL query in 5 mins. Why does my engineer say it will take a month?

#63

Earlier quoted context omitted.

Exactly, this is the substantial other side of the argument that almost always seems to be left out of the discussion. "Good enough, done in a week" is a perfectly viable option that is rarely offered by timesheet-padding developers.

seems often developers tend to over engineer or focus on edge cases that inflate costs, and not given enough attention to ROI

I've been on both sides and I understand both points of view. When my responsibility is managerial in nature, I'll tend to prioritize the dates and the ROI, then weigh the risks more optimistically because risk mitigation usually makes it harder to achieve what I am being judged on. However, when I'm the one actually doing the work... I tend to over-engineer (assuming "bullet-proof" is over-engineering for a circumstance), test, and the like. While I'm certainly rewarded for on-time deliveries, I have a professional interest in seeing a solid piece of work; and I tend to face more negative consequence if the work isn't of sufficient quality than I do if it's late.

What's hard is finding the right balance. The proverbial "SQL in 5 minutes" moment from the blog post may not fully appreciate the developer's job, but it can serve as a reality check to self-question if you're over-baking it.

Re: I wrote the SQL query in 5 mins. Why does my engineer say it will take a month?

#64

On the flip side, when something DOESN'T need HA, sub-millisecond query response time, or lynx and IE Edge compatability, people need to know when "good enough" is good enough. On my ops team, we've gotten some flak for not building robust enough of a request queue for some tasks. But it's been down several hours in the past year. The server almost never needs maintenance. None of the workload is real-time. App resta…

>The server almost never needs maintenance. None of the workload is real-time. App restarts are acceptable if memory leaks occur.

Ah! Classic duct tape programming!

Something like this is fine as long as the requirements don't change.

But we all know that at a point the requirements will change. And then you have to tell your customer that the "little new requirement" can't be accomplished with a cheap little change but requires instead a complete rewrite that will cost even more then the previous system did.

The only question is whether you are a honest company that told the customer before that that will most likely happen in the future or your planed for that inevitable outcome in the first place...

Re: I wrote the SQL query in 5 mins. Why does my engineer say it will take a month?

#65

Earlier quoted context omitted.

Kind of. There are a few people who I don't mind using tools as soon as I have even a minimum functionality working. Then we have a few people who completely ignore any limitations I put of tools and use them in ways in which they are explicitly not working. Case-in-point: I created a process that automated a particular task. Said task bears a resemblance to another task, but there are a lot of edge cases in the othe…

Maybe it's a false economy to automate other processes if the political fallout from not automating hers is big?

Eh, my boss is the director of the organization. I keep him informed of what is going on and he lets me know what to prioritize. So I'm somewhat protected from backlash, it's just tiring having to deal with angry emails because someone doesn't have the same things as someone else.

I'd say that my boss generally makes the right decision when it comes to what is best for the organization, and I'm not in the habit of rewarding people for being abusive.

Re: I wrote the SQL query in 5 mins. Why does my engineer say it will take a month?

#66

Earlier quoted context omitted.

Okay, that sounds pretty cool. S3 can host static HTML files?

Yes, I host my blog that way: - Generate static files using Pelican - Dump the files to S3 - Set up Route53 to point a domain at the bucket - Set up CloudFront (Amazon's CDN) to sit in front of the S3 bucket, since I found pure S3 to be too slow Works incredibly well.

Why use Amazon for static pages? My github page works just fine.

Re: I wrote the SQL query in 5 mins. Why does my engineer say it will take a month?

#67

Earlier quoted context omitted.

Okay, that sounds pretty cool. S3 can host static HTML files?

Yes, I host my blog that way: - Generate static files using Pelican - Dump the files to S3 - Set up Route53 to point a domain at the bucket - Set up CloudFront (Amazon's CDN) to sit in front of the S3 bucket, since I found pure S3 to be too slow Works incredibly well.

How much does all this cost you per month?

Re: I wrote the SQL query in 5 mins. Why does my engineer say it will take a month?

#68

On the flip side, when something DOESN'T need HA, sub-millisecond query response time, or lynx and IE Edge compatability, people need to know when "good enough" is good enough. On my ops team, we've gotten some flak for not building robust enough of a request queue for some tasks. But it's been down several hours in the past year. The server almost never needs maintenance. None of the workload is real-time. App resta…

Exactly, this is the substantial other side of the argument that almost always seems to be left out of the discussion. "Good enough, done in a week" is a perfectly viable option that is rarely offered by timesheet-padding developers.

Why are your developers feeling they have to pad their timesheets?

Re: I wrote the SQL query in 5 mins. Why does my engineer say it will take a month?

#69

Earlier quoted context omitted.

Exactly, this is the substantial other side of the argument that almost always seems to be left out of the discussion. "Good enough, done in a week" is a perfectly viable option that is rarely offered by timesheet-padding developers.

seems often developers tend to over engineer or focus on edge cases that inflate costs, and not given enough attention to ROI

Developers are also the ones that get yelled at, called on the weekends, and even fired if those cases happen.

If you're willing to come in on the weekend to fix your query, be my guest. But I like being able to spend my weekend relaxing.

Re: I wrote the SQL query in 5 mins. Why does my engineer say it will take a month?

#70

Earlier quoted context omitted.

I had a veteran DBA close to retirement (she was my cube-mate) warn me about this when I was an intern. I had a very simple request come in to update some data. Didn't even take 5 minutes. She told me: never do the simple tasks immediately. Sit on them for a bit. Business users don't understand complexity of different tasks and think they should all take the same amount of effort. So, if you do one thing in just a fe…

I heard a story from an ex-wall-street engineer who related he was once asked to fix a message passing system so that it could now pass something like 10 x as many messages per second that before. He rewrote it and it now passed 1000 x messages / sec. He almost turned it in that way and then realized he was undercutting his future self. So he backed off the improvements to the required 10 x. Sure enough he got a big…

Haha, that reminds me of the speed-up loop: https://thedailywtf.com/articles/The-Speedup-Loop
Post reply on HN