Thursday, May 21, 2009

Agile Nokia test

Well, you may already hear about "The Nokia test" or "Nokia Scrum" of Jeff Sutherland, but here is another perspective of the test, to see whether you are doing Agile or not:


1. Do you need a complete specification document before you start to build stuff?

2. Are you doing time boxed iterative development with each iteration lasting less than 6 weeks?

3. At the end of the iteration do you have working code?

4. Do you have tests to determine that you have finished development tasks?



That's all.
Simple, isn't it ?


1. Do you need a complete specification document before you start to build stuff?

Yes: Then you are not doing Agile, you are doing industrial Big Design Upfront making

No: Great - test passed, move to question 2


2. Are you doing time boxed iterative development with each iteration lasting less than 6 weeks?

Yes: Great - test passed, move to question 3

No: Then you are not doing Agile. The most important difference between agile and conventional methods of getting things done is that Agile uses lots of small steps rather than trying to do everything all at once


3. At the end of the iteration do you have working code?

Yes: If you can show this to your customers and get feedback then you have passed the test

No: Then how do you know you are done? If it is not working you can't demo it to your customer and they can't make effective prioritisation decisions


4. Do you have tests to determine that you have finished development tasks?

Yes: Good - you are on the path to Agile enlightenment!

No: You worked so hard but you don't know if you are done! How do you know that changes in the next iteration wont undo all your good work?


:-)

Wednesday, May 20, 2009

Static vs Singleton

Ever wonder the advantages of using static methods or static class or Singleton class ?

IMHO, each approach has some benefits and disadvantages, you may choose your own depending on the situation.


Benefits of static methods :



Benefits of Singleton :

Sunday, May 03, 2009

JavaScript gotcha Overloading

Gotcha đơn giản là "got ya" , nghĩa là "Tóm được rồi", như khi bạn bắt được ai đó trong 1 trò chơi. Còn trong lập trình (programming, in other words "thảo chương") thì Gotcha được dùng với nghĩa tương tự: 1 feature ngoài mong đợi (unexpected) , thậm chí đi ngoài cả specs, mặc dù thường không được coi là bug.

Thường các gotcha lập trình này cần phải có nhiều kinh nghiệm mới phát hiện được (hoặc nhờ đọc bài viết của người có kinh nghiệm, hehe) . Nếu bạn đã từng trải qua hàng đống giờ dò lỗi (debug) vì 1 gotcha nào đó, thì hẳn sẽ rủa "mấy tay nào đó" làm cái chức năng ngớ ngẩn làm mất bao nhiêu công sức của mình. Do đó nếu có thời gian cũng nên xem thử các gotcha liên quan đến công việc của mình, phòng khi gặp trường hợp như trên.


JavaScript thì theo tôi biết có khoảng 15 gotcha dễ gặp, và overloading sẽ là gotcha đầu tiên trình bày ở đây.

(to be cont)