« [Video] Coding Weekly #6: Text Processing | Main | [Video] Coding Weekly #8: Browser-side Programming with Servoy »

May 27, 2011

[Video] Coding Weekly #7: Reusable Code Considerations

In this coding session I talk about what makes effective reusable code. Whether we think about it conciously or follow our gut instincts, the following considerations come into play when we code reusable methods:


1 Not a one-off, expected to be reused
2 Does a discrete, focused task
3 Returns consistent results
4 It is adaptable
5 It handles defaults gracefully
6 It handles errors gracefully
7 It is documented
8 It is easy to find


Due to YouTube 15 minute upload limit, in 2 parts:

Part 1: http://www.youtube.com/datamosaic#p/u/1/cGTH6MBAihE
Part 2: http://www.youtube.com/datamosaic#p/u/0/uoOLMEL04iM

| Posted by David Workman on May 27, 2011 at 10:27 AM in Video | Permalink

Comments

David,
I like your video on the reuse aspect. Ont eh documentaiton side perhaps you want to look at the
"@return {Object}" as a possible way to enhance the documentation. I find this especially useful when hovering over the method signature and examining the arguments and the return types. I am not sure that Servoy/javascript is there yet fully for the @return, but it certainly helps.

Posted by: Tom Parry | May 28, 2011 3:17:30 PM

+1

Posted by: David Workman | May 29, 2011 3:43:07 PM

Post a comment