Skip to main content

Refactoring To Patterns

I learned design patterns when I was in grad school. Later when I started work, I used some patterns, but some were never used, and their knowledge became rusty over the years. I thought it was time to refresh my knowledge of software design patterns, sometime last year.

Back then I was enamoured with the concept of web based learning (and I still am). I was also contemplating to take my Java workshops over the Internet. So instead of just re-reading the GOF book, I thought of taking a web based course on design patterns. This way I would learn what I needed to, and also get a hands on feel of how elearning works. When I Googled elearning and design patterns, I stumbled upon Industrial Logic's online course "Refactoring to patterns". Now the concept of refactoring to patterns is'nt just about learning design patterns. It involves understanding design patterns, but also involves identifying code smells (bad code), that should be refactored to use a design pattern. I was delighted. This course would not only help me refresh design patterns but also teach me something new. I registered for it.

I found the course to be very well made. The explanation of each design pattern started with some reading suggestions, typically from the GOF book and Joshua Kerievsky's excellent book - "Refactoring to patterns". After that there was a little conversation on that design pattern. This is really good, because after reading the text, I had many questions in my mind, and they were all answered by reading the conversation (which I am presuming Joshua must have had with participants of his course). Now that the theory had sunk in, the next step was to understand some code and refactor it to use the pattern. I could verify my solution by running the tests. The interesting thing here is that the tests not only verify that the code still works properly, but also verify if the refactoring uses the design pattern correctly. These tests make many assumptions, but they are very well written and do verify the solution correctly. Once you are done you can upload the solution. The course also has screencasts for the refactoring if you need any help. Finally there are some questions to reinforce the concepts.

I still have not completed all the patterns in the course, but have had a great learning experience with the stuff that I have completed.

In time to come web based learning will provide an excellent way for people to update their knowledge at a time, place, and pace of their convinience. The ability of the Internet to serve multimedia and enable collaboration is extremely powerful. I think we are just begining to scratch the surface if this potential for educational applications. The social web and the web of participation will bring several changes to the way we teach and learn. We will see many interesting eLearning content come up in future. Also, be on the lookout for educational podcasts and screencasts.
BTW, this is NOT a sponsored/paid post! ;-)

Notes: This text was originally posted on my earlier blog at http://www.adaptivelearningonline.net

Comments

Popular posts from this blog

My HSQLDB schema inspection story

This is a simple story of my need to inspect the schema of an HSQLDB database for a participar FOREIGN KEY, and the interesting things I had to do to actually inspect it. I am using an HSQLDB 1.8 database in one of my web applications. The application has been developed using the Play framework , which by default uses JPA and Hibernate . A few days back, I wanted to inspect the schema which Hibernate had created for one of my model objects. I started the HSQLDB database on my local machine, and then started the database manager with the following command java -cp ./hsqldb-1.8.0.7.jar org.hsqldb.util.DatabaseManagerSwing When I tried the view the schema of my table, it showed me the columns and column types on that table, but it did not show me columns were FOREIGN KEYs. Image 1: Table schema as shown by HSQLDB's database manager I decided to search on StackOverflow and find out how I could view the full schema of the table in question. I got a few hints, and they all pointed to

Fuctional Programming Principles in Scala - Getting Started

Sometime back I registered for the Functional Programming Principles in Scala , on Coursera. I have been meaning to learn Scala from a while, but have been putting it on the back burner because of other commitments. But  when I saw this course being offered by Martin Odersky, on Coursera , I just had to enroll in it. This course is a 7 week course. I will blog my learning experience and notes here for the next seven weeks (well actually six, since the course started on Sept 18th). The first step was to install the required tools: JDK - Since this is my work machine, I already have a couple of JDK's installed SBT - SBT is the Scala Build Tool. Even though I have not looked into it in detail, it seems like a replacement for Maven. I am sure we will use it for several things, however upto now I only know about two uses for it - to submit assignments (which must be a feature added by the course team), and to start the Scala console. Installed sbt from here , and added the path

Five Reasons Why Your Product Needs an Awesome User Guide

Photo Credit: Peter Merholz ( Creative Commons 2.0 SA License ) A user guide is essentially a book-length document containing instructions for installing, using or troubleshooting a hardware or software product. A user guide can be very brief - for example, only 10 or 20 pages or it can be a full-length book of 200 pages or more. -- prismnet.com As engineers, we give a lot of importance to product design, architecture, code quality, and UX. However, when it comes to the user manual, we often only manage to pay lip service. This is not good. A usable manual is as important as usable software because it is the first line of help for the user and the first line of customer service for the organization. Any organization that prides itself on great customer service must have an awesome user manual for the product. In the spirit of listicles - here are at least five reasons why you should have an awesome user manual! Enhance User Satisfaction In my fourteen years as a