[Dancer-users] Fwd: GSoC Status Report for Week #1

franck franck at lumberjaph.net
Tue May 31 11:07:58 CEST 2011


Hi everybody

I'm not sure everybody know that this year we have a GSoC student: Carlos.
Here is his status report, I'll ask him to CC the list his next status.

I'm sure this could be interesting to some of you :)

---------- Forwarded message ----------
From: gnusosa <gnusosa.mx at gmail.com>
Date: Tue, May 31, 2011 at 10:23 AM
Subject: GSoC Status Report for Week #1
To: tpf-gsoc-students <tpf-gsoc-students at googlegroups.com>


Sorry for the late report, but I was socializing with my family and
friend in this Memorial Weekend. Basically, a holiday in the US.
Nevertheless, it is not an excuse for my late report. Anyhow, same
format continues you can find my report in my blog in the following
address: http://log.gnusosa.net/code/gsoc/status-report-1

#########################

Status Report for Week #1

Since I started working in the middle of the Community Bonding Period,
there was not much to do to the module in the week #1. However, some
progress was made with the module. For now, the module Script.pm is
fully capable of writing a dancer app from the call of the script bin/
dancer. These was the expected work for the week #1.

What I worked on the week #1?
Well basically, moving the functions to object-oriented methods. We
all know that by default in almost every module, you add Module-
>new(%args)->run; and the methods. From that I also moved the
functions from get_* to set_*, for example, get_lib_path to
set_lib_path in the new object constructor. You can find more detail
in the most recent commit I made in my github account.(https://
github.com/gnusosa/Dancer/commit/
e946254caa5b33cdcb75a60b34ec39ee5e3c56e8)

What I learned in the week #1?
I learned to appreciate steps and instructions, for the second time I
screwed up my repo, and all because I thought moving and stripping
functions would reduce work. When in reality, I was just adding more
work and steps. Reinvention of the wheel destroys, and it takes the
most precious hours of your day. On another side, git is the tool of
the year for me. I love to sync and clone repositories in my two
netbooks, any change can be updated in any local repo in matter of
seconds. torvalds++
Related to Perl code, I learned that idiomatic pragmas and other
idiosyncrasies are great for refactoring, but not for rough drafting.
I guess Perl sticks to the Unix philosophy point, which tell us that
simple is better. However, I think that a more idiomatic code is more
maintainable, but I don't want to start a debate, I just want to keep
learning. I guess, time and work will tell. As of working habits, I
made better use of perldoc and man for any Perl related documentation.
I bought Modern Perl and Effective Perl Programming, and both books
are next to my keyboard on a daily basis. The chapter "Objects" in
Modern Perl helped me to grasp what was essentially needed to migrate
the functions to object methods, and adding the new class object. Most
doubts on the topic, were later answered by franck in the middle of my
commits revisions.

What's next?
For week #2, the tasks are as follows:

   Migrate the script to an Object Oriented module.
   Write tests for the OO Module.
   If needed, refactor and modify the module.



More information about the Dancer-users mailing list