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: http://indian-railways.rediff.com/
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)
- 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.
- 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.
- Code lying here and there + insert what is needed and get the things done!
Why not place it together along with the code above!
- Just Wow: Internal JS > CSS > External JS > Internal JS
- Where are your code conventions Mr. Rediff?
See the CSS classname ‘Naming standards’
- Rediff’s way of importing external JS!
- Debugging debris remains…
- Reuse the code, but not in the same page man!
I saw this CSS defined AGAIN somewhere below the code!
- What a waste of memory!
Everything commented inside the function, what does this function do then?!
- 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!
- Broken Link
- Total time over 512KBPS
- 19 Requests to the server! Woah!
Thank you that I have an advance browser to do these for me!
- 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!