• 0 Posts
  • 24 Comments
Joined 2 years ago
cake
Cake day: June 27th, 2023

help-circle


  • I got dumped with fixing some bugs in a project written by a contractor who had literally done this but with extra steps.

    Backend was sql server and c#/asp.

    There was an api endpoint that took json, used xslt to transform to xml. Then called the stored procedure specified in request passing the xml as a parameter.

    The stored procedure then queried the xml for parameters, executed the query, and returned results as xml.

    Another xslt transformed that to json and returned to the client.

    It was impressive how little c# there was.

    Despite holding all the business logic, the sql was not in source control.



  • Had a 3 year old one this week. A loop that builds a list of messages to send to a queue for another service to consume then it calls BatchPublish.

    Only Batch Publish was inside the loop so instead of sending n messages, it sends 1+2+3… +n

    We never noticed before because n was never more then 100 and the consuming service is idempotent so the duplicate messages don’t cause issues. I think it’s (n(n-1))/2. So n=100 is 4950. That’s only 4 minutes work. Also that code only runs at 1am.

    Recently n has been hitting 1000 which produces 499500 messages and it takes a few hours to clear and triggers an alarm for delayed processing.




  • At work people think I’m some kind of wizard with git.

    I tell them I’ve been using it every day for 15 years and I read the freely available book on the website, link them to it, and mention the first 3 chapters probably covers 90% of their normal usage so they should just read that.

    They won’t do it. I don’t get it. Something about written words is scary to them.








  • I did the same but with milk. My job at the time supplied coffee but not milk, the fridge was full of 1 pint bottles with names written on. There was never enough space. People got territorial over their 5sq inches of fridge. There was a milk club where they pooled together to buy milk for their group.

    I couldn’t face dealing with that so opted out and drank it black. That was 15 years ago.

    Some time later that employer realised they could solve a great many staff disputes for the low price of 20 pints of milk a week and started supplying it. No idea why it took so long.