Rss

Solar Water Heaters are Magic (even in Curepipe)

Been about a week since we installed a Solar Water Heater on our house. I must say it’s awesome! Government did a really nice initiative to subsidize these equipments.

Solar Water Heater in Curepipe

A Luxury
Once the water gets heated, it stays hot for 3 days. Hadn’t tried it but there was one day there was no sun and yet the water could be used to take a bath at night.

So yeah, it is working at Curepipe in Plaine Wilhems in winter. :-)

The Lazier, The More Modular Programmer

Might not be totally true but here’s my hypothesis: “Lazy programmers tend to code in a more modular way and do more automation.”

snapshot407I do like SQL. But don’t like to write it. So, i decided to write a class for adding/deleting/updating from database.

$sets['fname'] = 'John';
$sets['sname'] = 'Smith';
$where['sex'] = 'm';
$where['country'] = 'USA';

$db->update('users',$sets,$where);

equivalent to

UPDATE users SET fname = 'John',sname = 'Smith' WHERE sex = 'm' AND country = 'USA';

Another example of automation is when i want a clean setup of a website i’m working on. I just go on phpMyAdmin. I drop the database. The next time the engine of the website is triggered, it checks if database exists, creates it if not, runs an install script which will recreate the tables.

$db_selected = mysql_select_db($dbsettings['dbname'],$con);
if (!$db_selected) {
___mysql_query("CREATE DATABASE {$dbsettings['dbname']}",$con);
___$db_selected = mysql_select_db($dbsettings['dbname'],$con);
___// If an installer exists, we try to run it.
___if(file_exists(ROOTDIR.'inc/install.php')){
______header('Location: '.ROOTURL.'inc/install.php');
___}
}

This laziness pushed me to write a templating system in PHP for my university Web assignment so as my HTML and PHP codings are separate.

$recipes = $Recipes->get_multiple("ORDER BY timeposted DESC");
$recipelist = "";
foreach($recipes as $recipe)
_eval("\$recipelist .= \"". $templates->simple_get("gallery_recipe") ."\";");
eval("\$contents = \"".$templates->get_page("gallery_page")."\";");
eval("\$headerincludes = \"".$headerincludes."\";");
$templates->output_page($contents);

If i would been a “hard working” guy. I wouldn’t have bothered to do these extra simple things. I would have enough energy to write 100 update queries manually. Have long html codes inside PHP loops and so on..

What do you think?

Sitting idle in Bus stuck in Traffic before Exam

Bus, Y U No Move!!! I’m so bored. I feel helpless. Because of this stupid traffic I’ll have to rush to the exam room without meeting friends.

Wonder when this problem will be solved. All I can do now is take stress in solitude hoping this bus will move someday :-\

Wisdom for Idiots

My theory: Wisdom at the hands of an idiot is twice as much as dangerous to a casual idiot.

I’m responsible for what I say, not for what you understand

This is in reference to the “wise quotes” people usually share on Facebook. Do you really think people /teens especially have become more mature with those wise quotes? I don’t think knives can be used as toys for any age group; neither can guns nor nuclear bombs..

// I may be an idiot too but I am afraid when others play with guns.

24Hrs vs Rs 50 Million gov.mu Website

Recently WebCup organized a competition to make a website in 24 hours. Have a look at the websites a team of 4 people had to do in 24hrs only!

  • Ceridian - http://ceridian.webcup.mu
  • Chesteroc - http://chesteroc.webcup.mu
  • Esokia - http://esokia.webcup.mu
  • Extension Interactive – http://extension-interactive.webcup.mu
  • FRCI - http://frci.webcup.mu
  • Elite Business School – http://elite-business-school.webcup.mu
  • Paperboat - http://paperboat.webcup.mu
  • TNT - http://tnt.webcup.mu
  • Team Urban Error - http://urban-error.webcup.mu
  • Wanderers - http://wanderers.webcup.mu
  • Web Thugs - http://web-thugs.webcup.mu
50 Millions government Website

50 Millions government Website

 

Now compare those to our dear 50 Million Government Website: gov.mu. If such websites can be made in 24Hrs, why did the gov.mu cost Rs 50 Million? Food for thought….

When bus “sonnet” doesn’t work

Recently, a bus had a break failure killing 10 people and the Prime Minister didn’t give a ****. I’m gonna raise another issue of public transportation we face daily i.e. the Bus Bell fails.

How people deal with it:-

1. Most youngsters usually walk to the door while the bus is still running. The driver stops at the next bus stop.

2. Some try to press the button and release it suddenly so as it makes a noise. The conductor sometimes notices it and alerts the driver.

3. Older people shout and usually add some “spicy” words towards the driver. (zourer mama) :D

Actions to be taken:-
Policeman could periodically stop a bus so as to check if the bells are working. Wouldn’t this rather be the responsibility of the NTA (National Transport Authority) or where fitness is given etc? I don’t know these things much but checking bus bells are an important thing.

If fitness is given to NTC buses which can have break failures, then i guess we’re doomed to have crappy service at all levels. Why do we need a transport Minister? Just to agree to request because bus owners have been requesting a raise for a long time?

“The price of transport is being increased because the owners of the bus companies have been asking for an increase in the transport fees from quite a long time”. Source

No, Seriously!? Is that all you’re worth?

YouTube is Haraam on Orange’s Mobile Internet packages

For general knowledge, did you know you are not allowed to watch YouTube or any other streaming website on Orange’s pricey Mobile Internet packages? Here’s what it says in the Terms and Conditions:-

The Offer is not to be used for other activities such as non-Orange internet
based streaming services, voice or video over the internet, peer to peer file
sharing, non-Orange internet based video. Should you exceed this limit or if
such use is detected, notice may be given and Network protection controls
may be applied to all services which Orange does not believe constitutes
mobile browsing. This may result in, at Orange’s discretion, your inability to
purchase The Offer, a reduced speed of transmission, suspension of data
browsing services and/or suspension of your account

The data allowance is very little and yet impose restrictions…

More Mauritian Bloggers Needed

Yesterday there was a bloggers’ meeting at Bagatelle Mall. It was very nice.

Mauritian Bloggers Meeting 2013

I realised I’m still very socially awkward guy. Thought university changed me a bit. I can befriend kids more easily than adults. Lol :-D

Anyways, the majority of the bloggers who came did studies in fields related to computers. I think the blogging culture should be spread among non-computer specialist people. Else the blogosphere would be a little bit biased.

Mauritian people need to voice out their opinions. Mauritians do tell there problems on radio but not everybody listens to radio all the time. If you find something interesting, you just can’t share it on Facebook and make a buzz.

“La parole envol, l’ecriture reste”

Making blogs is just as easy as registering for Facebook. It’s done in few clicks. I recommend blogspot for beginners.it’s very nice and has all the features you’ll ever need.

As bloggers, we can create blogs for our relatives and friends. You can contact me if you want a blog (free for personal blogs). I really hope this culture takes off in Mauritius as the media sucks hard.

YouTube Caters for Orange Mauritius: Adds 144p Option

Previously, the lowest resolution in which you could watch YouTube videos on your desktop PC was 240p. Now we have the option to watch it in 144p.
YouTube at 140p

And everyone thought the trend was to go HD >.>

Jobless…

Lost my job as System Administrator at a call center. The reason for this purely personal for my ex-boss and her family. So I’m not going to touch those details. This blog post will be about the things I did and learnt there.

The maintenance job
When I was hired, the network and Windows domain was already setup by the previous SA. I had to do the maintenance: checking if all PCs were operational and were able to make calls through them.

Setting up an Apache server
I had setup an Apache server so that foreign clients could access the local files. Of course, the directory had to be password protected.

The proper port had to be configured in the router so as requests on port 80 would be redirected to the Apache server.

Setting up DynDNS
The company was using Emtel wimax 2 mbps connection. The IP address was dynamic. Negotiating with Emtel to get a fixed IP was taking a long time. So I resorted to DynDNS. It did the job kinda well.

Adding more PCs to the existing domain.
As the company grew, i has to add new PCs to the domain.
Had to create users on the Windows 2003 server. Then configure the Windows 7 clients to have a static IP with the DNS pointing to the server.

Shared planning spreadsheet
The agents were sharing a piece of paper to record their meetings. So i made a shared excel document which everyone could open at the same time to write in their datas.

Moving recordings to new Hard-Drive
Space was not enough on the Hard-Drive to store recordings of call. I had to migrate the recording to a new drive while keeping the network path the same. I did the transition during the night using RDP (Remote Desktop Protocol) so as the operation would run as smoothly as possible.

Plans i had in mind for the future
I was planning to write a VoIP program which would be using a database rather than the caller agents have to manually copy/paste the numbers to be dialed from an Excel sheet to a VoIP app. The recordings audio files would have been stored in the database. The operation manager could “validate” calls and hence the recordings would have been available on the internet automatically. But unfortunately i lost the job.

Anyways, i might have done tiny jobs but i learnt lots of things. Learning is what’s important in life. ;)