The most productive day I ever had consisted of a code review where four of us spent less than 45 minutes going through about 200 lines of code identified by a profiling tool as the significant bottleneck.
In that brief code review we identified a potential speedup: reducing those 200 lines of code to about 195 that also reduced cache misses and accelerated performance by ~100x. This was unexpected and meant that the massive arrays of 50+ high performance computers per site the company was planning for could be served by a single machine performing the task over twice as fast as needed.
I, too, have had 2000+ LOC days, but looking back at code cranked out like that has never made me proud.
(Score: 1, Insightful) by Anonymous Coward on Thursday June 06 2024, @11:15PM
by Anonymous Coward
on Thursday June 06 2024, @11:15PM (#1359603)
It can depend on the code. The most code I've ever cranked out in a day was almost 5000. That code model was impeccable, I was on my game, and newly refreshed after a vacation. It was an absolute breeze to write the code, instantiate the test templates, crosscheck against the specification, and then verify. That is the only reason I was able to crank it out in a day and it was a beautifully great day I'll probably never match. Another great day was when I moved a server from Go to Erlang while cutting server requirements by 80%. On the other side of that, I've had multiple days were I've written maybe a dozen lines of code that perfectly fit the specification that verified first try. To the reverse that, I have had days where I've torn out my hair trying to get simple five line functions to do what I want them to do in an acceptable manner and days where I've done hundreds of lines but those lines were complete shit that I wasn't happy with and ended up jettisoning eventually.
More than the code lines, it really more settles on your psychological flow and how useful the final product is. That's really what the three of us had on our special days. But it is also easy to mistake the SLOCs as the reason rather than the result.
(Score: 2) by JoeMerchant on Thursday June 06 2024, @04:32PM (1 child)
The most productive day I ever had consisted of a code review where four of us spent less than 45 minutes going through about 200 lines of code identified by a profiling tool as the significant bottleneck.
In that brief code review we identified a potential speedup: reducing those 200 lines of code to about 195 that also reduced cache misses and accelerated performance by ~100x. This was unexpected and meant that the massive arrays of 50+ high performance computers per site the company was planning for could be served by a single machine performing the task over twice as fast as needed.
I, too, have had 2000+ LOC days, but looking back at code cranked out like that has never made me proud.
🌻🌻🌻 [google.com]
(Score: 1, Insightful) by Anonymous Coward on Thursday June 06 2024, @11:15PM
It can depend on the code. The most code I've ever cranked out in a day was almost 5000. That code model was impeccable, I was on my game, and newly refreshed after a vacation. It was an absolute breeze to write the code, instantiate the test templates, crosscheck against the specification, and then verify. That is the only reason I was able to crank it out in a day and it was a beautifully great day I'll probably never match. Another great day was when I moved a server from Go to Erlang while cutting server requirements by 80%. On the other side of that, I've had multiple days were I've written maybe a dozen lines of code that perfectly fit the specification that verified first try. To the reverse that, I have had days where I've torn out my hair trying to get simple five line functions to do what I want them to do in an acceptable manner and days where I've done hundreds of lines but those lines were complete shit that I wasn't happy with and ended up jettisoning eventually.
More than the code lines, it really more settles on your psychological flow and how useful the final product is. That's really what the three of us had on our special days. But it is also easy to mistake the SLOCs as the reason rather than the result.