Coding Standards: An Analysis

By Hussain Fakhruddin

Rediff has a lot of portals within its main portal.

This is how they organize their re-usable code.

The first thing I did is logged on to:

I opened my Fire Fox’s Error Console and found this:

The next thing I did was to open up the source code:

I was shocked. I could really figure out that this type of code was

1) Written by just “Jugard” of code from their own paces here and there!

2) Not at all reviewed!

3) Done in haste to meet the deadlines!

I will put some screenshots to prove my point:(Please enlarge them as needed)

  1. Are these written by the same programmer?

Subsequent lines of code, but one in caps and other in small.

– Seems like they have just copied it from some previous page.

  1. Dirty CSS to look good? : Reuse of CSS codes, but not at all arranged in a proper manner. They are probably using the code which is lying here and there.

  1. Code lying here and there + insert what is needed and get the things done!

  1. JavaScript in the middle of an external CSS.

    Why not place it together along with the code above!

  1. Just Wow: Internal JS > CSS > External JS > Internal JS

    CSS surrounded between JavaScript and JavaScript surrounded between CSS!

  1. Where are your code conventions Mr. Rediff?

    See the CSS classname ‘Naming standards’

  1. Rediff’s way of importing external JS!

They are using JavaScript to import another JavaScript code!

Look carefully!

  1. Debugging debris remains…

  1. Reuse the code, but not in the same page man!

    I saw this CSS defined AGAIN somewhere below the code!
  2. What a waste of memory!

    Everything commented inside the function, what does this function do then?!

  1. Agreed we all use broadband, but what a waste of Bandwidth?

Why so many wide spaces!

Don’t you guys know browser ignores them but bandwidth network doesn’t!

  1. Broken Link

Wanna report?

  1. Total time over 512KBPS

    No comments!

  1. 19 Requests to the server! Woah!

    Thank you that I have an advance browser to do these for me!

  1. So many DNS resolutions

    My ISP might think I am doing a DNS attack!

16. Best of all:

Around 8 MB of Memory occupied by just 41KB of HTML code!

Join the Conversation

1 Comment

Leave a comment

Your email address will not be published. Required fields are marked *