« first day (2426 days earlier)      last day (2568 days later) » 

6:59 AM
@barlop Ah damn, I completely forgot about the original idea behind static class variables, it ideally lends itself here. To make the code more visible you could basically make a method that has the array and the left and right indices of the array to be sorted as a parameter as well as the key that shall be used for it and in that method first change the static variable and then call sort. (Part1)
That would keep the code of the search algorithm more independent, as it then does not have to deal with the question what key needs to be used (since that question is dealt with beforehand). Coding 2 less methods is in general not a problem, but then the code in your search algorithm is still assuming more knowledge about the object the second you take the less method that allows you to retrieve your key of choice. The second option via static variable seems to be the best option.
Thanks a lot!
 
 
11 hours later…
6:24 PM
what? how do static vars work there?
that sounds horrific.
 
7:06 PM
Jess Pardue on April 25, 2017

Welcome back to the Stack Overflow podcast episode #106 recorded live on Thursday, April 20th at SO headquarters in NYC. We are honored to have Anil Dash, CEO of Fog Creek, leading today’s antics while Joel is away. We are also joined by the entire SO Data Team; Kevin Montrose, Jason Punyon, Dr Julia Silge, Nick Larsen, and Dr Dave Robinson.

In today’s episode you will find: mystery, intrigue, and mangoes! As well as…

Kevin drinks two whole unicorn fraps.

Jay rants about the people who rant about babies on planes. …

 

« first day (2426 days earlier)      last day (2568 days later) »