Archive for the ‘Programming’ Category

Why MySQL is popular.

Tuesday, August 30th, 2005

MySQL logo

Over at JoS forums, there is a thread titled ‘What’s the fascination with MySQL?’, where poster asks why MySQL is so popular when there are better technical alternatives. I think following are few of the main reasons why MySQL is so popular:

  1. Native Windows support.
  2. This is a HUGE plus. Though I develop for LAMP platform, I actually use Windows for writing all of my code and finally deploy it on *nix. You can install Apache/MySQL/PHP/Perl on Windows box and write complete app which can be deployed on Linux by just copying the folder tree. Heck, there are numerous Windows packages [Nusphere, FirePages, WAMP comes to my mind] which allow you install and configure Apache/MySQL/PHP/Perl in 5 minutes flat.

  3. EXCELLENT administration/development utility like phpMyAdmin.
  4. phpMyAdmin logo

    Anyone who has used MySQL, has used phpMyAdmin utility at least once. I believe that phpMyAdmin has played a significant role in MySQL’s adoption. It’s web based, installs in seconds and lets you control almost every aspect of your data in MySQL. Dare I say that if it was not for phpMyAdmin, MySQL would not have been so popular.

  5. Lack of ‘enterprise’ features like transactions/triggers.
  6. Yes, the lack of ‘enterprise’ features has actually been a PLUS for MySQL adoption. If you look closely at how people use MySQL database, you will quickly find that they need triggers nor transactions. This means that user’s learning curve is short. [And in case you are savvy enough to need triggers/transactions/foreign keys, you will not use MySQL anyways.]

There are other reasons why MySQL is popular but I think the above three are the key reasons.

Minor Blog Improvements

Wednesday, June 15th, 2005

Following are couple of improvements to my current blog:

  1. Changed the title of my WordPress Blogpost pages.

    By default, WordPress gives following title to the entry:
    [Blog Title] - [Post Title]

    This title is ok but it’s really not good for search engine result pages, if you have long blog title. For example, search for ‘Starting a MicroISV’ and you will find Ian’s blog post on the topic as first hit. Do you see how the blog title and words ‘blog archive’ are taking all the space. Comapre this to the search ‘Rediff Customer Service’, where my blog post is first in search results. See how the title of Blog is at the end rather than at beginning. I think this is a much better idea. How to get it? Unfortunately, you will have to modify the index.php file of your WP installation. Open index.php in text editor. Replace <title>Current code</title> with

    <title>< ?php wp_title(''); ?>< ?php if(isset($_GET['p']) or isset($_GET['cat'])) {echo ‘ [';} bloginfo('name'); if(isset($_GET['p']) or isset($_GET['cat']) ){ echo ‘]’; }?></></></title>

    After couple of weeks, Google Search Results pages should show these better titles!

  2. Subscribe to Comments enabled by default.
  3. I have observed that most of the time when I comment on another blog, I am interested in follow up comments by author of blog post and/or others. Reason being that if I care enough to comment, I care about follow up comments as well. Assuming that my blog post readers might want the same, by default ‘Subscribe To Comments’ checkbox is selected. What do you think?

  4. I made the comment field bit bigger in height.
  5. I made the the blog, 508 accessible. There were very minor changes I needed to do to pass the automated 508 accessibility test.

Problems with new MSDN Blogs

Friday, May 27th, 2005

MSDN Logo
I don’t remember the exact date, but few weeks back, MSDN Blogs backend system was upgraded.

Somehow, the new system has quite a few usability problems. Here’s what I have discovered:

  1. Comment Form is missing!
    No, not that there is no comment form, but by default, comment form is not shown at the end of the post. You have to click on a link ‘Post a Comment’ to get to the comment form.

    And btw, this comment link is not even at the end of blog entry (blog entry = blog post + comments), so if you have a blog entry like this one from Larry which has 32 comments, you need to scroll back up to the end of post. Find the ‘Post Comment’ link and then create the comment. I wonder why ‘Post Comment’ link is not at the end of the entry.

    And I am not able to grasp why would they even need this ‘Post Comment’ link in the first place. What’s wrong with a comment form at the end of entry? 99% of blogs have comment form right at the bottom of entry and I think that’s perfect. Why would MSDN Blogs need to take a different (and painful) route?

  2. Useless ‘Title’ field in Comment Form
    If you see the MSDN Blogs comment form, you would find a field named ‘Title’. It defaults to ‘re: <Title of Post goes here>’.

    I find this field completely useless. No one* uses it and it just adds noise to the updated blog entry.
    Check the below snapshot of comments on Larry’s blog.

    MSDN Comments with useless Title field

    Not a single commentator has changed the title while posting his/her comment. What’s worse is that the entry highlights the ‘title’ of comment which is basically same for all comments! I have been participating in various online communities for last 7 years and I know for sure that no one uses ‘Title’ field related to their comment. They would leave it blank, and if you force them to enter title, they would enter some junk.

    *When I say no one, I mean less than 0.00001% of people who posts comments on blogs.

  3. Trackbacks are not displayed properly.
    Here’s how a Trackback is displayed on MSDN Blogs:

    MSDN way of Trackbacks

    Trackback shown above, can be found here

    Instead of treating Trackbacks separately, they tream them as comments. Nothing wrong with that but they way they do it is:
    1. They use ‘Anonymous’ as Author’s name.
    2. The link to ‘Anonymous’ text would take it to the actual post which was trackbacking.
    3. The title of the comment displays the title of post which track backed in the first place.

    Clearly, this is not greatest of implementation. Compare this to how WordPress displays Trackback.

    WordPress Trackback
    Trackback shown above, can be found here.

    This is much, much better. Here’s why:
    1. You can clearly identify it as Trackback by the words ‘Pingback’.
    2. Title of the post (identified by number 1 in snapshot) and Blog Title (identified by number 2 in snapshot) are clearly displayed.
    3. It also shows the relevant piece of text where the particular entry was referred.

How not to design your homepage.

Thursday, May 12th, 2005

Blinkx Logo

Through Om, I came across product called ‘Smart Folders’ from Blinkx.

Blinx is a prime example of how NOT to do your homepage.
There are too many things which simply makes me want to close the page and run away!

  1. Use of Red Color.

    Looking at the page makes me wonder whether this page is for RedHat. Heck, even they don’t have so much Red color on their page. If you try to read the page for more than few seconds, your eyes will start to hurt!

  2. ALL UPPERCASE TEXT.

    EVERYONE KNOWS THAT WRITING IN ALL CAPITALS IS RUDE, RUDE AND RUDE. ALSO, IT’S VERY HARD TO READ.

    Woohoo! I just did it! Anyway, the sidebar ‘Blinkx Press’, links to various press mentions and all of them is capitalized! Yikes!

  3. Use of images for main body text

    The main text on their homepage uses image to display paragraphs of content instead of using simple text. What more, the all the text inside image has ’shadow’ effect which makes it difficult to read the text. Not to mention that it increases the size of the page, I can not resize the text size and Google can not make sense of your page.

  4. Too big homepage

    Their homepage is 1.91 mb in size! Wow, I hope all their users are on broadband! I tried to figure out why their page is so big and I found that they are using flash animation at the bottom (did you bother to scroll down to find the animation?) which is 1.6 mb in size. Still without animation, their page is 322kb. I bet, you can reduce that homepage size to 100kb in total without any loss of information.

  5. No product/service message.

    Can you figure out what does blinkx.com offer? Is it mainly online search or mainly about their ‘Smart Folder’ product? Btw, did you read their description of ’smart folder’?

    Smart folders are intelligent folders that automatically and persistently update their content as new information becomes available. Smart folders build over time and can be based on the actual ideas contained within the content of those files, and not on select keywords.

    ?? What the heck does that mean? Is it meant for me (a geek) or is it for use by any computer user? Is it meant for researchers, publishers, students? I really don’t know. And I don’t think I care enough to dig dipper and find out.

Btw, their logo screams ‘unprofessional’. Looks like it’s done by a Photoshop amateur, who has just learnt ‘emboss’ and ’shadow’ effect, doing extremely poor job of copying Google logo.

Suranga Chandratillake (founder of Blinkx), if you are reading this, I sincerely urge you to redo your homepage so that it’s smaller, easier on eyes, which makes me want to learn and explore your product.

JD

How to find Perfect Color**

Monday, April 25th, 2005

How to Find Perfect Color Article Image

Before & After Magazine has a great tutorial on how you can find perfect color pallette from a photograph. If you have read Dave Shea’s article on Color Schemes, then this article would give you even more practical tips about how to create a color scheme from a Photograph using Photoshop. Hey Ashvin, very soon, I will be better than you as far as color selection goes. ;)
I think this article is going to make me subscribe to Before & After Magazine.

JD

** color = colour for people who follow UK English. :)

How to appeal to the Developer

Monday, April 18th, 2005

Hey, Microsoft does know how to appeal to the developers.

Scoble pointed out that Visual Studio 2005 Beta is available for download. I immediately go to site for downloading beta and what do I see?

Visual Studio Beta Image

Yep, that’s a nice little ego boost to developer. Microsoft, no doubt, knows how to keep the developer happy! :)
JD
P.S.: Yes, I am normally awake till 2 o’ clock in night! :)
Update:

I applied for the beta program and on the beta program form, they had following question.

How do you learn about and get information about Technology?

They had following options, interestingly, there was no option named ‘blogs’, which is what my main source of information for keeping up-to-date on technology.

VS Beta Form Question

I think blogs are mainstream enough to be included in this list. Scoble, are you reading this? ;)
JD

Lazy programmer(s) at Musician’s Friend

Tuesday, April 12th, 2005

Musician's Friend Logo

Thanks to SlickDeals, I came across a great deal at Musician’s Friend for Accoustic Guitar. [Yes, I am a wanna be guitarist! :) ] I purchased Guitar from Musician’s Friend site and here is the part of shipping confirmation mail.

1Z1A715V*********** [Hiding for reason I don't know. ;)]

If the tracking number above appears in one of the United Parcel
Service (UPS) formats, click this link and paste in your
tracking number: http://wwwapps.ups.com/etracking/tracking.cgi

UPS formats are: 1Z### ### ## #### ### # or T### #### ###

If your tracking number appears in the FedEx format, click this
link and paste in your tracking number: http://www.fedex.com
The FedEx format is 12 numerals in a row, with no separators. Be
sure to delete the leading zeros when entering your number on
the FedEx website!

Obviously, this is a program generated email. I wonder why they have included so many instructions when the program, which created this email, could easily figure out whether tracking number is from UPS or Fedex and include the right information. Also, just like Google, why not provide direct link to UPS and Fedex website so that person can see tracking results without copy/pasting any of those tracking numbers.

JD

Flashback: How not to design your Contact Form

Monday, April 11th, 2005

Jon Hicks blogged about previous versions of his design. His post is a timeline of how far we have come through as far as websites/web design is concerned.

I used archive.org to see pages of my old site. Here is the contact form which I ‘designed’. This is, by far, the best example of how NOT TO design a contact form!

How not to design Contact Form

Did you notice the gender field? ;) Yes, excuse me, I was in college and I thought that internet was one of the best way to meet a new girl. ;)
Here’s my caricature which I thought is very cool. I remember getting this caricature done from a site called Webdunia.com. Webdunia.com was offering free caricature to anyone who can send their photos as JPEGs! Those wonderful dotcom days! ;)
JD's caricature

Here’s my lame attempt at blending photos in Photoshop.

JD's photo

Note: I don’t sport beard or mustache now. One of those days I will get my about page with current photo running.

I am sure you have noticed that my site was so very colorful. It was inspired by Channel V’s site. My site was an absolutely lame attempt to give individual color to pages like they did.

So how were your design skills in the year 2001? Show it off! ;)
JD

Rules for writing defect free software

Friday, March 25th, 2005

I discovered Klaus’ blog through his comment at Larry’s Osterman’s entry about Open Source Software and COTS.

Klaus rants about XP methodology and mentiones his rules for writing defect free software, which I agree with completely. And the rules are:

  1. The only time software is important is when it makes it to production. I really don’t care that it works on your machine.
  2. If you don’t understand it, you can’t code it. If you didn’t understand it but you coded it anyway, it will never work well. Ever.
  3. Cleverness is not a synonym for efectiveness, or elegance. If you can’t figure out how to do it you probably shouldn’t be doing it in the first place. See #2.
  4. Whatever you didn’t code for will eventually happen, and you’ll be sorry you didn’t code for it.
  5. If you can’t explain it to a manager in less than 5 minutes it’s probably too complex. Keep it real.
  6. If it requires a midget to pull levers on the server four times a day you’re probably designing in too many dependencies and requirements. Keep it clean and neat.
  7. If you can’t tell me how it might be being used in two year’s time you probably didn’t think it through enough. When it does have to change (and believe me, it always does) you’ll be in a lot of pain. Keep it flexible.
  8. If you requre physical access to the data center and a dry martini to deploy you probably pooched it. I should be able to deploy with a one-page instruction sheet printed in 12pt Times New Roman.
  9. If I can’t understand it after looking at it for about an hour you probably didn’t document it enough. Keep it verbose.
  10. “Ship early and often” is a cute motto used by people who ship defective software and expect others to find bugs for them. Unless you happen to be writing a twelve-line script that outputs the time of day, understand the project’s scope and effort and make solid, realistic estimates — and then stick to them.
  11. There’s nothing wrong with iterative development, as long as you’re not iterating crap. Effective iteration in software development requires a sound design to begin with. Please don’t insult my intelligence by trying to argue that releasing the same broken beta six times qualifies as such. There’s an important difference between an incremental implementation and a fundamentally broken one.
  12. No programmer is an island. Don’t code in a cave and come out only to feed and mate. Peer review will help you catch your most and least obvious mistakes. Never overestimate the depth of your own intellect. However, don’t expect other people to lend you their brains to do something you’re supposed to know how to accomplish.
  13. Asking questions is not a sign of stupidity, unless you’re asking stupid questions. Not asking questions is also stupid.
  14. And finally, attention to detail is everything. Lack of attention will get you into trouble faster than you can say “holy crap”. This is what you get paid for — do it well.

The rules very much chimes with the book Pragmatic Programmer. If you are a programmer and haven’t read the book, drop whatever you are doing and read the book.

User signup forms and email addresses

Wednesday, January 19th, 2005

Could someone explain to me why do we need to enter email address twice on user signup forms?

I mean, entering password twice on sign up form is understandable because password is masked. But email? I can see it with my eyebolls and I shouldn’t be needing to type it twice! Even though, I am going to copy/paste my email, I don’t want to hit that ‘Ctrl +C and Ctrl +V’.

My humble request to all websites,
Please DO NOT ask user to enter email twice on your sign up forms. It’s just plain stupid and waste of time.

Reason for rant: Today, wonderful folks at 37signals launched Ta-da list. I wasn’t really expecting them to create sign up form which will ask me to enter email address twice.

Update:
My fellow geeks replied that email address is mentioned twice because people may mistype it. And I say..

I can guess that user may mistype it. But do you really think you can solve the problem by asking them to enter it twice? I don’t think so.

Be honest, tell me how many times you have actually typed email TWICE? Either you copy/paste email OR you have some kind of form filler utility which takes care of inserting the email twice for you.

So in first case where user is copying/pasting, you will have wrong email in both fields AND in later case, email will be anyways correct.

Can you change your sign up script to count how many times error ‘Email address does not match’ is returned? I have the feeling that the number will be very small.

And if you want to make sure that user has typed email correctly, you can have a confirmation screen where app displays email which user entered (it can also display other information depending on your app) and account is created only if user presses the confirm button.

And let’s say that for your site, username is same as email address. In such scenario is makes much more sense to not ask email twice. Why, you may ask. Let’s say user signs up with wrong email and then he/she can’t login. As most of the sign up form send welcome mail after signing up, user will see that he has received none, so if he is smart he can figure out he typed email incorrectly OR he can use password reminder screen to verify that his account doesn’t exist. So now he can sign up again, making sure that email is correct! Does it make sense?

Now for sites which have username (or login id) separate from email, it can be problem as user potentially might loose a username because of using wrong email. In this case, my argument is why in the world you don