Since we talk about our work place and all here, here goes nothing.
I switched jobs and now work for a Software Consultancy. It is a kick ass place to be. The culture, the people, the technology. O! I am love with the place. Since I joined newly and I barely have any experience, I had to under go a training called an "Object bootcamp". It is the best thing. EVER! Here's how it works.
The objective of the bootcamp is to teach freshers how to do Object Oriented Design - the agile way. It started off with a brief 20 min discussion on what is OO, what are the concepts in it and the language which we were to use, Java. In my previous company I had a 30 days training on the same! Pfft. What followed for the next 4 days was pure bliss.
We followed Test Driven Ping Pong Pair Program. Pair Programming means 2 people work on the same computer, one person types or drives and the other person reviews, thinks, suggests etc. Test driven programming means, even before we write actual production code, we write a unit test for it and then write production code which makes the test pass. Ping Pong programming means one person writes a test and the other person makes it pass. Then he writes a test and the first person makes it pass and the cycle continues.
We were given different problems which were almost like actual customer problems. Each problem is split up into a number of stories. Each story represents a requirement. We follow 5+15 minute cycles or iterations - 5 minutes for deciding on the necessary classes, their jobs and the first test that we would write and the 15 minutes are for implementing the same in the TDD ping pong way. Oh, and we have to switch pairs every third story. So, we cannot pair with the same person for more than 2 stories. Meaning your code base keeps changing every now and then. (This is where having tests help because if you make a change you can just run all the tests and be sure you dint break anything which the other person already had running.)
The first 2 days were about basic design concepts. Aggregation, Delegation and Inheritance. When to use what? How to decouple classes? How to get tests passing withing 15 minutes etc. The remaining 2 days were about design patterns - How to identify the need to use a pattern, some common patterns, refactoring into a design patter etc.
All in all, it was a great learning experience for me. Given the sort of teaching I was exposed to at my college and also at my previous employer, I always thought the faculty would be shady no matter where you. Boy, was I proved wrong.
On a finishing note: We came across an interesting situation where we had a method in a base class which was returning an instance of one of its derived classes. Is this a good thing? What do you think?
Tuesday, April 10, 2007
Subscribe to:
Post Comments (Atom)
7 comments:
No it's not a good thing. Base class is not suppose to know anything about derived class.
Well, why shouldn't you? In fact the problem beautifully fits into this design without bothering much. So, now is it still wrong?
But still you shouldn't. Because base class has nothing to do with derived class.
Secondly, if the base class returns an instance of the derived class, then any changes done to the base class will keep on recurring as the derived class again uses base class.
Thirdly, then you cannot derive any other class out of this base class. The new derived class will have dependency with the class that's being thrown by the base class, which is unacceptable.
[Am not sure about the second case though]
abt agile, all that sounds great, but why don't all the companies just start using this new programming methodology? and DON"T you dare say things like "other companies aren't agile". companies don't get this big by sleeping under rocks. there must be some genuine reasons why others don't use this method yet.
i have too many things to say about this particular blog:
2. your training was FOUR days?
FOUR??
oh wait, Do other companies use it?
[Hungry] Bingo. The second point is not all that correct, but that's OK.
[Swaroop] Its not a new methodology. I don't know about companies other than my previous employer. There agile is not possible because of the kind of people they hire and also because of the sheer number of people. Mostly companies prefer number over competence. And don't you dare disagree with that! It doesn't work for a lot of reasons. Because you can't choose to do some stuff and ignore others in any agile methodology. That's just one of the reasons.
[Swaroop]Its not training. Its a bootcamp. They teach you how to think objects. So, nobody can teach you how to think for a long time. Either you understand it or you don't. But then, the full fledged bootcamp is for 2 weeks. This was just to get me into the project. :)
[Swaroop] Google, Apache, Yahoo (to some extent) and a lot of other product companies. Pretty famous is the XP practice with XP and CI and all. I don't know about the others.
Post a Comment