Test Driven Development - TFC

In test first coding, as we write the test code before writing the class, we are motivated to think about how our class will be used. Without it we focus more on implementation. This leads to a design that is simpler and pragmatic. However, once we get into developing the code, the unit tests can pretty much drive our design.

There are several benefits that one could see from an approach like this:

  1. Simplifies the design
  2. Completely revert the way we develop.
  3. Makes us think about how our object would be used.
  4. Helps us develop better interfaces that are easier to use.
  5. Would change the way we perceive things.
  6. Makes the code easily testable
  7. Serves as invaluable form of documentation
  8. Makes the code robust
  9. Creates the opportunity for us to think of the failures and what we need to accommodate.
  10. Provides a safety net as we refactor the code – the test cases are our angels.

There are at least three things we need to write the test for:

  1. Positive: what is should do correctly assuming every thing is ideal.
  2. Negative: what could go wrong and how should the code behave.
  3. Exception: possibility of alternate sequence of events that could happen and how the code should behave to accommodate those.

Where to write a test:

  • Should be part of the project.
  • It can be within the class for testing private members.
Key things to keep in Mind:
  1. Red/Green Refactor should be our mantra
  2. Do not make many changes at once.
  3. Place the tests near the code
  4. Isolate your tests – failure of one should not affect the other.
  5. Write a test for a bug you find.
  6. Do not refactor code without having test cases to support.
  7. Test on all your platforms.

First day at ThoughtWorks

I had been waiting for this for a long time. Experiencing their recruitment process made it clear that I will be working with good team of application developers. Getting through this raised my expectation from ThoughtWorks. Here are some of the goodies I earned at ThoughtWorks.

Office and Work Culture:

Their office was not similar to any other software company office. They have long dinning tables, where developers of same team sit together. No personal cabins for any employee. Most of the cabins have interesting names like start trek, sputnik.

Oh yeah! Every developer here gets his laptop with administrator rights. ThoughtWorks has got an open work culture. You have full freedom to install any software as long as you follow certain guidelines.

ThoughtWorks provides free food for its employees. Lots of fruit juices and healthy snacks are also provided.

A cell phone with Airtel connection is provided to all employees with its expenses paid by ThoughtWorks.

Support for Airtel Broadband connection is provided.

So even though ThoughtWorks has got an average salary structure, their perks and work culture compensates it.

For those who love writing code, want to learn more on Agile, open source contribution, get an opportunity to be a part of their product development team (ThoughtWorks Studios). Then this is the place to be. And more importantly ThoughtWorks is Hiring and looking for good programmers.

Recruitment process:

  1. Apply at their website. http://www.thoughtworks.com/work-for-us/apply-online.html
  2. Within 2 weeks time, you will get a call from the recruitment team. Basic questions like; how you came to know about ThoughtWorks. What is your expectation from ThoughtWorks? What tools have you worked an etc.
  3. Immediately after that, you are given a Coding test (answered via email). You got to write a program to solve a simple problem provided. The main objective of the exercise is to test your coding skills. How familiar you are with object oriented programming etc.
  4. If a Thoughtworker found your program suitable for the requirement. Then you will have an opportunity to come to our office.
  5. You will have a Logic Assessment test. A 1 hr with 12 questions.
  6. A 12 min aptitude test.
  7. Pair Programming test. A ThoughtWorker will sit with you on your coding test solution. A new set of requirements will be provided to you, which you will have to code with him. Idea is to know whether you can follow the pair programming practice followed in ThoughtWorks. And also to validate whether your coding exercise was genuine or not.
  8. 2 rounds of Technical Interview. Mainly concentrated on your projects that you have completed so far.

If (you clear in all)

Then you are in.

Else

Sorry, you have to wait for 6 months.