Research Log of Web Science Students

Computer Science is not simply programming

This is why we should write clean code

with one comment

I am looking at our code which I haven’t seen in 1 and a half months now. What I want to do is to just change the page where the user is redirected to after login. Right now, if you’re a new user, the system asks you to get your twitter profile. This can be very intimidating or boring as a new user. It’s also a bummer if one’s excited to just see how the PLE works. So we’re removing it and instead whether you’re a new user or not, you are redirected to your dashboard!

The distinction is now made there. If you’re a new user, the dashboard gives you tips on how start. Else, it shows a list of

1. unfinished modules whether created by you or shared to you by someone else

2. a list of recent comments to modules you created or are creating with others.

3. a list of modules you are currently studying

4. a tag cloud of favorite topics

Only now I don’t know where I will do this change. One thing’s for sure, it should only take one line of code and not even in the source but in the spring configuration as a property!

I have found that it’s funny how our login process is a multistep thing,

1. All requests to go to the GateController which returns a page where there is a link you can click to login courtesy of google accounts/user services.

2. From authentication, the user is taken to the, the IndexController (instantiation of class EntreeController) that setups the user page (e.g putting the userName and nickName to session) and determines if the user is new.

If he/she is then he/she is redirected to the setup twitter page
else he/she is redirected to the myPage.

We want to eliminate this complexity. Instead of deciding where to redirect the user, the latter is just redirected to the dashboard (e.g dashboard.jsp). But there are dependencies in the jsps. Gaaaaaaaaaaaah!

Moral lesson: Refactor early.

Written by Jose Asuncion

November 21, 2009 at 4:03 pm

Posted in Hardwire

One Response

Subscribe to comments with RSS.

  1. Why have we thought of dashboards just now?? Haha!


    November 21, 2009 at 4:39 pm

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: