Live data from Hacker News

Would you accept a job offer from a company that wasn't writing unit tests?

news.ycombinator.com

1–10 of 19 posts

Would you accept a job offer from a company that wasn't writing unit tests?

#1
I'm fairly new to the programming world (5 months), and I just got and accepted my first serious job offer at a great company. The company is stable, has a small dev team, 20 employees, and is profitable and growing. I couldn't be happier, but.. they don't write unit tests. As someone who sees learning as very important, I wonder if in some ways not writing tests at a company will stunt my growth, future prospects. These days I hear so much about unit testing that I assumed everyone does it, but it seems from some reading on stackoverflow that even as much as 50% or so (this is just a perception, could be wildly wrong) of companies see testing as something they'd 'like to implement but aren't. Would you work for a company that wasn't writing unit tests?

Re: Would you accept a job offer from a company that wasn't writing unit tests?

#2
There could be many reasons why the company doesn't write unit tests, and some reasons may actually be sound. When this situation arises in an interview (or if you find out before the interview), it's best to ask the interviewer why they don't write unit tests. When you do this, remember 2 things:

1. You can't ask them in a tone that indicates judgement. They may have a reason and, if you ask it in a way that makes them feel stupid, you're not going to get a good answer (and maybe fail the interview).

2. You should prepare for a follow-up question from the interviewer about why it would be beneficial to write unit tests. If you can word it succinctly (in both technical and business language), you may just win the interview right there.

In 15 years of programming, I've rarely seen development teams have a full test suite for their applications. Most of the time I see applications with the barest of unit tests, that just cover the happy-day scenarios (but never negative test cases). Some other applications have 0 (yes, 0!) unit tests, but those tend to arise from another team writing the software in "Agile"* and then handing the finishing software to another development team to maintain. In one, rare, instance I even had a manager say that writing unit tests aren't required because it will only prove that the application works, which is what the QA team's report tells him.

Thankfully you are young enough to be trained in TDD and such, and may be able to show that unit tests can reduce the risk of the project when code changes happen. That type of information is invaluable to a manager.

tl;dr: Be open and curious about why the company doesn't write unit tests, and you may find out how real-world development teams work.

* I put Agile in quotes because this particular team said they were doing Agile programming, but in reality they were able to quickly produce deliverables only by cutting corners by not producing documentation and tests.

Re: Would you accept a job offer from a company that wasn't writing unit tests?

#6
If it's a great company what's the problem? There's an opportunity there for you to add something/teach them something almost right away. It's relatively easy to setup a framework and and everyone will appreciate what you've done. You can even integrate it into their continuous integration as well.

Re: Would you accept a job offer from a company that wasn't writing unit tests?

#8

Since Pinterest doesn't write unit tests, and I'd take an offer to work from them, yes, I would.

That is a little unfair...We dont need to call out specific companies that dont practice this methodology. If we were to do that the list would be huge......

Re: Would you accept a job offer from a company that wasn't writing unit tests?

#9

Since Pinterest doesn't write unit tests, and I'd take an offer to work from them, yes, I would.

That is a little unfair...We dont need to call out specific companies that dont practice this methodology. If we were to do that the list would be huge......

Actually, Pinterest is one of the few companies that don't do unit tests that I'd consider working for.. so I have the utmost respect for them.

Re: Would you accept a job offer from a company that wasn't writing unit tests?

#10
Depends on the company.

I have around 20 years experience as a developer, and contrary to the hype you seen in many conferences, truth is very few companies do unit tests, specially if they are quite big.

One of my tasks in our consultancy projects is to teach companies why they should invest in unit tests.

Post reply on HN