Airmauritius.com, not going strong!

February 12, 2009 by mjzyaad

Yesterday, I booked a ticket on the Air Mauritius website. I got a pretty good deal and must admit that the website is nice and reasonably flexible. Everything worked pretty nicely; even the payment page is secure.

 However, today is a totally different story and I was left frustrated. I got a confirmation email from airmauritius giving some links where I can go and check some stuffs. But, I get the following:

 

Conditions of carriage
Conditions of carriage
airmauritius.com
airmauritius.com

 As a software engineer, this is not acceptable.

  • No user friendly message.
  • Why giving me a link when the resource itself is not found?
  • System is down for almost 1 hour.
  • Is the website really reliable?
  • What is the root cause of the problem? Server load? Server crash?
  • No backup plan.
  • Recession? (Funny but well :-) )

I understand that this may happen to every system. Even more popular websites like Amazone.com crashed in the past. But still, letting the website down for so long is not acceptable. Air Mauritius is a great company offering excellent services and how can they let this kind of mistake slip?

Well, unfortunately, I can only hope they take proper action to avoid such errors to occur again.  That’s all I can do :-(

 

Programming = Common Sense

September 20, 2008 by mjzyaad

I remember once, when I was a kid and knew nothing about computer programming, a computer programmer said:

“If you have logic, you can program!”

Well, some 10 years later, I still believe in what he says.  Anybody can program if he/she has some common sense.  Personally, programming is not about computer languages like C++, Java.. it is about algorithm.  Anybody can learn a programming language within days or weeks.  However, what you can achieve with it is the most essential part.  Knowing many programming languages is not a factor whether you are a good programmer or not.

I believe for beginners, learning programming should be done on a simple but yet powerful language.  I cannot consider C++ as the best language to start computer programming.  IMHO, using C++ at a beginner’s level will make people concentrate more on the complex syntax rather than on problem solving and programming concepts.  Many of the top universities use LOGO as THE language for teaching computer programming.

Well, to get better at programming and problem solving, there is no way out but to practise.  Practise a lot!  Many websites are there, free, to test your skills.  One such website is

http:\\projecteuler.net

Register on the website and solve as many problems as you can.  You will be amazed at how small problems as proposed on the website can really polish your programming skills.  You can use any programming language that you like.  Only the final answer matters.  As I don’t have the C++ compiler installed on my laptop, I am using Excel VBA for solving the problems; simply because it is there, sitting on my PC, as it is there in yours.

Our 1st Olympic Medal! Thank you Bruno Julie.

August 23, 2008 by mjzyaad

At last, our first olympic medal.  Mauritius, a tiny island has undoubtedly sportsmen and sportswomen of really high class.  We already proved it on African soil, where so many of our atheletes sominated the scene.

Last Olympic games, we saw our finest 200m and 400m atheletes reaching the semis and finals.  We got closer and closer.  And finally… Bruno Julie brought one bronze medal home.

He fought hard.  The whole of Mauritius was behind him.  Mauritians around the world were supporting him.  Bruno Julie was good enough to touch gold.  However, he was beaten in the semis by 2 small margins.  Good enough though.

He proved once again that we still have a lot of potential in Mauritius.. people who can compete on the international stage.  More support will no doubt do more good to the country.  We are really proud of you Bruno Julie.  Hopefully, this medal is only the first in the queue and will be a symbol for other of our atheletes to bring loads of them!

Banana shoe polish

July 31, 2008 by mjzyaad

This is an incredible and yet simple trick to clean up and polish your shoes.

No black wax is needed.. your hands will not get dirty with the black sticky stuff anymore. Instead, use a banana skin! Watch and apply.

A cute way to do multiplication

July 27, 2008 by mjzyaad

While surfing on the net, I accidentally came across a really cool and cute way for multiplication. It is illustrated in the video below. However, I have not searched on the proof that it will work in all cases.

Appreciate and have fun!

The smart way of folding a shirt

July 23, 2008 by mjzyaad

Laundry is one of my headache. Waiting there and waiting for the machine to stop spinning is kinda boring. Moreover, we have to wait for them to dry in the dryer and the fold them nicely before packing them back in the bag.

Folding takes me reaaaaaaaallllly long and that added to the accumulated number of boring minutes. But I remember watching a really cool clip once – a Japanese lady folding a shirt in 2 or 3 seconds. I decided to search for it on youtube in a hope to at least reduce the amount of time I spend at the laundry. And guess what? Yep the clip was there and the folding technique is quite famous by now.

Well, watch, appreciate and apply :)

The game of Nim

July 20, 2008 by mjzyaad

When I was a kid, I used to watch the very famous TV show Fort Boyart. It was when I was first introduced to the game of Nim.

A small description of the game: You have a set of sticks (in Fort Boyart, it was about 20). 2 players in turn take 1, 2 or 3 sticks at a time. The one who picks the last one loses the game.

When you have a set of 20 or more sticks, the game appears to be complicated. But in fact, if you follow some rules, you are assured of winning the game, if you start first!

A small observation when it is your turn to play:

If there is 1 stick letf, you lose the game.

2 sticks left, you can win the game (take 1 and the remainder goes to the opponent)

3 sticks left, you can win the game (take 2 and the remainder goes to the opponent)

4 sticks left, you can still win the game (take 3. The remainder is for the opponent)

5 sticks left, ah! Whatever you play, if the opponent is good enough, you will lose the game.

In simple terms, when you have 1 or 5 sticks left, they are losing positions for you. If you continue building the losing positions, you will still find other losing positions: 9, 13, 17, …

The rule will be, if (n modulus 4) = 1 then it is a losing position.

To win the game of Nim, you have to simply force your opponent to a losing position when it is his turn to play.

But, this is not the only version of the game of Nim and many other versions exist, which you can try:

  • The one picking the last stick wins.
  • You can remove from a set of {1, 2, 5} sticks etc.

I remember solving a problem (in C++) called the Bachet Game [ http://acm.uva.es/p/v104/10404.html ], which is nothing else than the game of Nim. The problem says if you have n sticks and you can pick k sticks from a given set, can you win the game of Nim if you start first?

In another post, I will try to write on the general way of solving the game of Nim.

Coin changing, greedy huh? Not sure!

July 18, 2008 by mjzyaad
Coins

Coins

Coin changing problem is a classic algorithmic problem. Many of us will know about this problem. However, still many of us may have the wrong solution to this problem.

A small description of the problem:

A country owns the coin set {1, 5, 10, 25}. Suppose you have to change 30 cents in as few coins as possible, how will you do so?

If we jump to the solution, we will give 1 x 25 and 1 x 5 cents; which is the correct solution in this case. Using this approach, we use the biggest possible coin value until we no more can subtract from the resulting amount. Then, we use the next biggest and so on.. This approach is called the Greedy Algorithm. Unfortunately, that will not work in all cases. It can be proved that for the coin set {25 , 10 , 5 , 1} the optimal change will always be obtained.

For example, try the coin set {25 , 10 , 1} to change 30 cents using the Greedy method. It will fail as we will get 1 x 25 and 5 x 1 (Total 6 coins). The optimal solution in this case is 3 x 10c.

However, we can still get the optimal solution by using some other cute techniques:

  • Backtracking
  • Recursion with memoization
  • Dynamic programming

Hopefully I shall blog on each of the above in the near future to explain how they can be used to solve the coin changing problem. They can still be very well used to solve some other kind of classical algorithmic problems.

Mentos eruption / soda geyser

July 17, 2008 by mjzyaad

Yesterday a friend of mine gave me a mint flavoured mentos. The first thing that stroke my mind was “Did I have diet coke just before?”

Well, after a long long holiday on this blog, I somehow decided to blog something today.

Diet Coke and Mentos Eruption (also known as a Mentos eruption or a soda geyser) is a reaction of Diet Coke and mint flavored Mentos candies, as quoted at

http://en.wikipedia.org/wiki/Diet_Coke_and_Mentos_eruption

If you drop a few mentos candies inside a coke bottle, this is what you should expect (see picture).

The explanation about this reaction:

Caffeine + Potassium Benzoate + Aspartame + CO2 gas (From Diet Coke) and Gelatin + Gum Arabic (From Mentos) contributes to the jet effect.

Youtube “Mentos Coke” to see loads of movies and creative ideas with this effect.

The Web Developer Toolbar, A Must!

January 5, 2008 by mjzyaad

This is yet another reason that I opted for Firefox! :-) Yes, the Web Developer Toolbar! Plus, a lot of other cool plugins that we can have on Firefox. Ok, this is not a campaign for using Firefox here over IE, but if you are a web developer, you should consider the Web Developer Toolbar.

Although it may be a quite ‘old’ plugin, it has most of the stuffs that we guys as web developer need for debugging and testing our webpages.

Some of the cool stuffs that you can do with this plugin are listed below:

  • Test the loading speed of your webpage.
  • Outlining elements based on description, id etc..
  • Getting the CSS stylesof certain webpages
  • Check the compliance of your website with W3C.org’s checklist
  • DOM inspecting
  • Display Forms details
  • Disabling cookies
  • Clearing sessions
  • etc.. etc..

The list is long and rich and you should discover the power of this tool! Personally, this has helped me a lot in debugging my websites and I am pretty satisfied with it.

There are also a lot of other plugins for debugging like FireBug and you should of course try them as well.