What I learned today — 19 February 2018
Don’t overestimate yourself
This past weekend, and some of the week before, I spent an enormous amount of time implementing an algorithm to solve a 0/1 Knapsack Problem, and a framework for reading, solving, and outputting the results of knapsack problems in general. The result of my labours can be seen on my GitHub account. I roughly spent the first 50% of my time trying to test-drive the implementation of the recursive definition solving the problem, but when time started to get short I just implemented an iterative dynamic program based on the pseudo code on the linked Wikipedia page. Fortunately all my tests were still relevant and passing afterwards.
I didn’t just wake up with an urge to solve the knapsack problem. It was part of a code assignment for a job application in Europe. Not long after submitting I received the following feedback:
Positive
(1) Some separation of concern. (2) Good unit test coverage.
Negative (Major)
(1) The solution does not work fully. (2) Why mixing Kotlin and Java? It actually brings performance issues, rather than having one single language support (either Java or Kotlin). (3) Inline regular expression definition (e.g., line 43 of class MultiLineKnapsackProblemParser). (4) Code has big maintainability issue (e.g., class ZeroOneKnapsackSolver), he tried to have a relatively micro separation of concern, but none of the classes tells the clear intent of usage.
I hope you can find yourself in the feedback provided and I wish you all the best in finding a job this side of the equator.
I was quite surprised by this feedback. I thought this was a quality piece of work and felt proud of what I did. This leaves me with two questions: “Am I overestimating my coding skill?” and “Are the standards for coding so much lower in South Africa than in the rest of the world?”
Of course I did ask for more detailed feedback in the hope to learn something, but I don’t expect to get any.