Research Log of Web Science Students

Computer Science is not simply programming

Killing code duplication with factories

leave a comment »

I got tired of having to write the same code all over again to populate my daos just so I could unit test so I refactored my code.

Goodbye duplicate code!


course1 = new Course();
course1.setLearningObjective("to learn football");
course1.setTags("Football Soccer");


course2=new Course()

course3=new Course()


Written by Jose Asuncion

December 4, 2009 at 9:40 am

Posted in Hardwire

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: