I've been a programmer for almost 19 years but I actually think the best code I've ever written is something that while it provides value to other people I'm the only one who actually uses it. In the company where I work we have major events that have to be supported by a number of different teams across about 5 time zones and each engineer has a limited set of roles that they can perform during the event. Anyway it was painful just watching people trying to create a schedule so I wrote something with Linear Programming to automatically generate the schedule. It ensures that people don't work for longer than 4 hours in a row, don't work from more than 8 hours from the first hour to the last hour on call, get 12 hours rest between engagements and the work load is evenly distributed across the team. Creating conditions in Linear Programming is weird, imagine trying to turn a series of linear equations into boolean logic, it can be done and once you can wrap your head around it it's really fun. It was my first time writing anything in it and I don't see it coming up a lot in my career. My favourite part of this project is that the end result was that engineers were less exhausted. I really hope that doesn't remain the best code I ever wrote, I don't think it will but it will require a conscious intention.

  • 2
    Good job!
    I hope they appreciated the effort :)
  • 3
    @README thank you, they did, I think they are a little scared of it, every time I try to explain how it works people go all glassy eyed but they love not having 12 straight hours of engagement and of course me too.
Add Comment