News for hackers. Stuff that matters.
Re:How can you not be romantic about programming? (2020) by superbcarrot on Saturday February 20, 2021 @02:47PM (#26207166)
> because so many of the programs you depend on are written by dicks and idiots

Out of all the problems with programming as a job, this is around the bottom of my list.

Re:How can you not be romantic about programming? (2020) by rufus_foreman on Saturday February 20, 2021 @02:58PM (#26207274)
I'm working on an app that calls other internal services inside our company, one of them is a call to update an account balance. We were running into this issue where we were getting a 504 Gateway Timeout on the update balance call so I eventually found the Slack room for that team and asked about it.

They ignored me for a couple weeks, but I kept asking and eventually someone answered and said yeah you'll get the 504 Gateway Timeout if you try to update the account balance to the same value that it already has.

OK, that makes sense to you? What if there was an actual gateway timeout?

You would also get a 504 Gateway Timeout in that case.

They apparently have no plans to modify this service's behavior.

I let it go, I just moved on with my life. I did not find myself awed or stunned with the mountains of work and talent and creativity and foresight and intelligence and luck that went into it.

Re:How can you not be romantic about programming? (2020) by infogulch on Saturday February 20, 2021 @03:27PM (#26207623)
I can guarantee you that 5 other teams rely on that specific behavior and don't have the will/independence ("budget") to implement that change if the api was fixed. Not only that, but if they did make that change, their manager would instantly have a handful of directors down their throat demanding an explanation why they just added work to their teams that are busy with Feature Work (TM).
Re:How can you not be romantic about programming? (2020) by reaperducer on Saturday February 20, 2021 @03:58PM (#26207897)
don't have the will/independence ("budget") to implement that change

So, dicks and idiot middle managers. I think you made his point.

Re:How can you not be romantic about programming? (2020) by philosopher1234 on Saturday February 20, 2021 @04:19PM (#26208091)
No. This is such a small issue who honestly cares if it gets fixed? I guarantee you this is not the most important thing anyone involved could be working on. Too many perfectionists on this website.
Re:How can you not be romantic about programming? (2020) by mgkimsal on Saturday February 20, 2021 @05:32PM (#26208597)
"We were running into this issue where we were getting a 504 Gateway Timeout on the update balance call so I eventually found the Slack room for that team and asked about it. They ignored me for a couple weeks,...."

Someone could have documented this and/or simply answered a damn question instead of wasting weeks of opportunity cost. Too many dicks and idiots on that website, it seems.

"who honestly cares if it gets fixed" - everyone that comes after this and has to deal with it and waste weeks of their life trying to pry some required nugget of info from a passive aggressive group of maintainers of stuff which actively ignores industry standards?

Re:How can you not be romantic about programming? (2020) by philosopher1234 on Sunday February 21, 2021 @03:52AM (#26211965)
Put yourself in the shoes of the team who was asked to fix this. They probably have a dozen feature requests, two dozen support tickets, and now this guy wants this bug fixed because it does t follow a standard and he had a hard time understanding it. Yes, that is a real issue, and in the ideal world it would be fixed along with every other issue on the list, but in the real world it is unlikely to ever be important enough to deprioritize the other important issues I imagine this team faces. At the end of the day, some bugs are just better to live with.
Re:How can you not be romantic about programming? (2020) by mgkimsal on Sunday February 21, 2021 @08:13AM (#26213213)
again, part of the problem was lack of communication and documentation. waiting 2 weeks to be told "fuck off" (in essence) is shitty all around.. it's not JUST that a (stupid) bug exists, it's how it was handled in this case, and, apparently, how they choose to handle it going forward, affecting who knows how many more people/teams in the next few years, and how many more weeks of wasted time. And if this team handles this sort of thing this way, how much more time is being wasted and projects delayed? This is at least as much a communication problem as it is a technical one.

And yeah, I can put myself in those shoes, as I've been on both sides of this. Treating newcomers in your communication channel (slack, etc) with the same level of urgency YOU would want (or need) when you ask for help from some other team is a bare minimum.

Re:How can you not be romantic about programming? (2020) by philosopher1234 on Sunday February 21, 2021 @09:58PM (#26220323)
I agree that the devs were needlessly uncommunicative, but I disagree that the right decision is necessarily to fix the bug. I think it’s perfectly reasonable to leave the bug as it is, even if it miffs some devs on hacker news.
Re:How can you not be romantic about programming? (2020) by WrtCdEvrydy on Saturday February 20, 2021 @04:52PM (#26208322)
This is a total failure to follow any sort of standard.

A 504 is a gateway timeout due to the server failing to complete the action, hell, a 400-level for "you fucked up" would be preferable.

Re:How can you not be romantic about programming? (2020) by fastball on Saturday February 20, 2021 @05:05PM (#26208420)
4xx would be what you want anyway, no?
Re:How can you not be romantic about programming? (2020) by jholman on Saturday February 20, 2021 @05:49PM (#26208745)
What you described:

  let x = 2 // runs
  x = 3;    // runs
  x = 3;    // runtime error, you made a mistake
No, I'd want a balance update to succeed. Even if it's to the same value that it already had.
Re:How can you not be romantic about programming? (2020) by wccrawford on Saturday February 20, 2021 @06:47PM (#26209271)
Or at least return a "no change" message, and not a failure result in the 400s or 500s.
Re:How can you not be romantic about programming? (2020) by fastball on Saturday February 20, 2021 @09:13PM (#26210218)
I don't think it's clear from the OC that even if they weren't using the wrong HTTP response they would want an update to succeed if it is the same value, at which point 409 could be a reasonable response code.
Re:How can you not be romantic about programming? (2020) by WrtCdEvrydy on Sunday February 21, 2021 @10:43AM (#26214257)
2XX level is for the action succeeding. 4XX level is for the action failing due to the user. 5XX level is for the action failing due to the service/code/infra.

In the real world, updating your balance to the same number should be a 200, however in some weird financial world, it may be a 400 because you may not be allowed to set the same balance due to some financial rule. A 500 is a terrible choice unless setting the balance caused an error at your code/infrastructure level.

Re:How can you not be romantic about programming? (2020) by pyrale on Saturday February 20, 2021 @07:15PM (#26209475)
304 would be fitting.
Re:How can you not be romantic about programming? (2020) by david422 on Saturday February 20, 2021 @08:36PM (#26209998)
Nobody competent wants to spend extra time and work dealing with junior level mistakes. If the basic stuff can't be done right, then the complex stuff definitely isn't done right. Little issues like this cause ripple effects and now guaranteed you've got incorrect behavior in other parts of the system because of this broken API. It's a time suck all around.
Re:How can you not be romantic about programming? (2020) by sixstringtheory on Saturday February 20, 2021 @04:46PM (#26208273)
The person who brought up the story mentioned account balances. Someone will definitely care when a latent combination of bugs is triggered and the company loses money because of it. See Knight capital and the more recent Citi debacles.
Re:How can you not be romantic about programming? (2020) by pyrale on Saturday February 20, 2021 @07:11PM (#26209456)
...And once you walk a bit in their shoes, you realize they're equally pressured. In the end, they are neither dicks nor assholes, they're just clever enough to see that corporate words have no meaning, and maybe they turned a bit cynical because of it. And certainly, if their own boss is bullshitting them and their reports can read their bullshit, why should they be the ones taking the hit?

A shitty environment can't foster good work relations.

Re:How can you not be romantic about programming? (2020) by rufus_foreman on Sunday February 21, 2021 @01:02PM (#26215570)
Yeah, I'm sure there are valid reasons for why it behaves the way it does and there have been staff reductions in the last few months. The point is that it is pretty typical to spend huge amounts of time figuring out why things work they way they do, and it turns out to be some minor detail that isn't going to help you be a better programmer, it is just work that needs to be done to keep things from falling apart. It isn't very romantic.
Re:How can you not be romantic about programming? (2020) by WrtCdEvrydy on Saturday February 20, 2021 @04:38PM (#26208217)
Too real.
Re:How can you not be romantic about programming? (2020) by mgkimsal on Saturday February 20, 2021 @05:18PM (#26208510)
Similarly a colleague just told me yesterday about a data vendor who is sending data over on a almost nightly basis. They changed the process/format - without notifying anyone - and things broke.

End users of my colleague's application were now saying they were seeing inactive client data coming up in their app, and it was causing confusion.

During the time trying to figure out the new behavior, the main client finally got something in writing about "here's how it works" from the data vendor...

* Rule 1...

* Rule 2...

* Rule 3: If a client record has not had any data updated, we will only send over the client name and header info, but no additional data records will be sent over.

* Rule 4....

* Rule 5: If a client record is no longer active in the system (for example, has been deleted), we will only send over the client name and header info, but no additional data records will be sent over.

Questioning back to the original data provider - if we get a client name and header info, but no additional data records - what does that mean? Does it mean the client is inactive/deleted, or simply that they've had no data change since yesterday?

Absolutely no coherent response, and I doubt there will be one. The defense of "no no, we have to keep stupid behaviour around because people rely on it!" doesn't even stand - this change came about in the last couple weeks, after having worked this way for more than a year.

It's both maddening and frightening how fragile so much daily data exchange is.

Re:How can you not be romantic about programming? (2020) by ywei3410 on Saturday February 20, 2021 @05:52PM (#26208780)
Oh man, we had a connection with an API recently where if you sent it some incorrect data it would just hang. No errors, no closing of the connection. Just hang. And ofc they don't offer a heartbeat over that channel.

That would still be fine... if the data was static. But it's not - and changes are communicated; but not to the relevant tech teams.