Data structures exercise: Sorted lists in Java with TDD

Alonso Del Arte
14 min readMay 19, 2023
Photo by Brittany Colette on Unsplash

Many years ago, Richard Hendricks made the big mistake of writing a brute force search for a sorted list. We all make silly mistakes, I’ve made a few just writing this article.

I’d consider myself fortunate to have a past silly mistake of mine brought up in a staff meeting at a company I just purchased.

In the present day, Richard makes the far more serious mistake of not getting the team back on track. After letting the team have a few laughs at his expense, Richard should’ve reminded Ethan who’s the boss now. And Dinesh was too cowardly to speak up for his friend.

If you don’t immediately understand why brute force searching a sorted list is such a big mistake, there are plenty of articles on the Internet explaining it, and I will explain it in this article, too, just to be sure.

I’m not seeing any articles delving into why Richard would have made that mistake in the first place. I’m sure he’s made plenty of boneheaded algorithmic mistakes, I just doubt he would make that particular mistake.

To be clear, Richard Hendricks is a fictional character who was played by Thomas Middleditch on the HBO show Silicon Valley. Dinesh Chugtai was played by Kumail Nanjiani and Ethan was played by George Basil.

--

--

Alonso Del Arte
Alonso Del Arte

Written by Alonso Del Arte

is a Java and Scala developer from Detroit, Michigan. AWS Cloud Practitioner Foundational certified

No responses yet