Saturday, September 19, 2009

Checked Exceptions vs. Automated Testing -- you judge

There was this interesting post I came across on Google testing blog which you can seehere.

Among the other interesting posts you can see in the area, my personal belief is that:
1. Many exceptions of the standard library should go unchecked
2. Use of checked exceptions have made the use of an IDE for java development a must (and rather replacing documentation).
3. Checked exceptions, very much like static typing, are just one of the possible tests. Why don't we just write complete tests (which we should be doing anyways) instead of boilerplate code?

Edit: I'm in love with the other blog's motto. Debugging sucks, testing rocks. One up google!

Wednesday, September 16, 2009

Web Application in 4 days -- Lessons learned

After doing this project under such pressure, a number of lessons were learned.

(.) Do use a web framework. One that let's you get working quickly
(.) ERDs are absolutely necessary. When drawing your ERD, you should consider your ORM capabilities. It will prove to be more essential than having your ERD in 3NF.
(.) Your ORM will help you a lot of places, but fail in a couple. Know how to work with your low level SQL API.
(.) Performance is a non-issue. Code, Code, Code...
(.) Project management is harder than coding. Don't spend valuable development time of your team, reading books.
(.) Django should be DRYer.
(.) DRY your code. Don't underestimate it
(.) If you are writing lots of "if"s, refactor, refactor.
(.) Tests are so important. Don't skip them.

Web Application in 4 days

Is it secure? No. Is it foolproof? No. All bugs fixed? No. Did it happen? Yes.

Team: Me. (Backend) 2 Friends (View).

Day 1
(T=0) Language changed from java/spring to python/django.
(+0 hr) Models created based on previously drawn ERD.
(+2 hr) Working "document view" system implemented. Models upgraded.
(+2 hr) "Static" directory created for HTML/CSS coders.
(+3 hr) edit, new , delete document abilities added
(+1 hr) Switched from manual post handling to framework form module.
(+1 hr) Initial HTML commit
Estimated effort of me: 6 hrs

Day 2
(+17 hr) Support for different data types added to project
(+5 hr) Data type support complete
Estimated effort of me: 4 hrs

Day 3
(+20 hr) Initial works on search functionality
(+4 hr) HTML/CSS upgrade
(+0 hr) Forms working
(+2 hr) More view stuff
(+1 hr) Simple reporting
(+1 hr) Bug fixes
(+8 hr) View
(+1 hr) More view (at this point an initial demo of the project is given)
(+2 hr) More view
(+4 hr) I ping the view developers with this commit!
(+1 hr) DB patch-up, I did some JS.
(+0 hr) More incoming work from view team
(+1 hr) commit with support for edit of document type
(+1 hr) Did I do this commit? (Log: eeeeee.)
(+2 hr) Same as above....
(+0 hr) Views upgraded
(+1 hr) User creation added
(+1 hr) UI for document designer added
(+1 hr) Rc1 announced :D
(+0 hr) Some little changes
(+0 hr) Some more little changes
Estimated effort of me: 10 hrs

Total estimated effort of me: 20 hrs (backend development)
Result: Satisfactory