Hacker News new | ask | show | jobs
by austincheney 2538 days ago
But, I was never asked about code style. I was asked to solve a well defined problem and only graded on unspecified code style.

Code style is subjective nonsense. If it’s that important provide a Schema or lint rules. High quality code solves a problem against a variety of objective measures: performance, complexity, instruction count, portability, and so forth. Things that can be measured with numbers.

The inability to differentiate subjective criteria from objective criteria is extremely immature. You wouldn’t write a contract like this or treat a business partner like this so why would a company treat a candidate for employment like that?

1 comments

Code style is subjective nonsense.

Some aspects of it are. I don't give a damn about tabs versus spaces, semicolons, etc. A decent code formatter fixes that sort of thing so it doesn't matter.

I absolutely do give a damn about things like breaking code up in to easy-to-grok modules, writing testable blocks, etc. In your response a few posts back you said "The feedback was only that the code was disorganized because all 750 lines were in one file and there was no test automation." That demonstrates to me that you can't write unit testable code, because you didn't write any tests and your code isn't broken up in to units. I can't write tests for a monolithic file like that without importing all of it and potentially getting side effects like prototype poisoning or globally scoped variables. That is a good reason to reject you as a candidate, and why you shouldn't write code that way.

> That demonstrates to me that you can't write unit testable code, because you didn't write any tests and your code isn't broken up in to units.

The code is testable. I provide data samples to test against and documentation on forming original new data samples for further testing. This manner of testing is easily automated.

I explained my thoughts on this and various forms of functional testing before receiving the assignment. To me this means they either did not understand test automation or they needed internal unit tests to make sense of the logic even though I provided copious code comments and documentation.

Again, it reaffirms they either cannot read code or didn’t bother evaluating past code style. If I were happy with that level of immaturity I wouldn’t be looking around. I am glad though to have discovered that immaturity during the interview process before leaving my current employer. I just wish they didn’t waste my time with an unnecessary assignment when they could have formed identical conclusions by looking at my GitHub projects specified on my resume and discussed in detail during the prior interview.

My final thoughts then were that they either lied about their conclusions, in that they used code style but really it’s that they cannot read code, or that my time isn’t valued (thus I am not valued).