Saturday, March 21, 2020

CoviD19

Once I get OFFICIAL DATA on the addresses of the infected patients, the pins will appear on the map. Now it is just showing some places where the patients are kept in Quarantine/ Isolation

Sunday, July 2, 2017

Front-end Code Camp

Its been a while... I know... A couple of weeks ago I got contacted regarding whether I would be interested to help out in the Front-End Code Camp. At first I had some apprehensions since I am not at all a Front-End Guy!!! But the I was told that it would be for a  MicroController workshop/session. This is more like my stuff. So I agreed and after agreeing to the schedule and content... off I was to La Turbine. Got there, then realised that I had forgotten my laptop charger and wireless mouse. Memogen is still expensive in this country.

After the Opening Ceremony Rahul Takoor and I were setting up our area for the practical. We were expecting around 15 people, however when were were about to start, we had more that 20 people interested in the session. To handle so many without a projector would be hard, so Rahul and I decided to move to the kitchen for the session... Really the KITCHEN... It had a smart TV and we could extend the display to HDMI. It had three tables each with 6-7 seats and a couple of high/bar stools, some folks were standing. I went through my presentation(with minimum brightness to increase battery usage...mind you i did not have the charger with me) which included the famous video my Massimo Banzi which really got me into Arduino programming.... now and then during my presenation i was teasing those not using open source tech and those unlucky enough to know me from before. The session went on well then Rahul pursued with his part on NODEJS to program arduino - he did a great job... Very interesting indeed. The participants seems so interested that they were about to forget to have their lunch...

It was interesting day for me and i hope those present in the session enjoyed if as much as I did... I got the chance to meet up with some interesting people including current and previous students as well as David, Damien, Jean Marc, Cedric, Zakiya and .... 

As i said... I have taught and programmed in unconventional places...but in a kitchen... that was the first time.

Image may contain: one or more people and indoor

Monday, May 16, 2016

Thread changing value without use of a global variable.

Some time back I was contemplating how could we have a thread modify a parameter sent to it with the change visible in the caller without using a global variable.
Some searching give a few hints which were a good enough starting point. After some trial and (a lot of) errors, I arrived at the solution below:



You need to include the following: stdio.h,pthread.h,string.h,stdlib.h

struct car{
int servicingNo;
char registrationNo[5];
int engineCapacity;
char color[5];
};


void * calculateCost(void * val){

  struct car c=*(struct car *)val;
float v=c.engineCapacity*2.1;//emulating change of value
float *fee=&v;
pthread_exit(fee);

}


void main(){
pthread_t tid;
struct car arrCar[100];
float cost[100];
int n, i;
printf("How many cars do you have in your garage ?");
scanf("%d",&n);
for(i=0;i struct car tempCar;

tempCar.servicingNo=i;

strcpy(tempCar.registrationNo,"Test");

tempCar.engineCapacity=100*i;

strcpy(tempCar.color,"Red");

pthread_create(&tid,NULL,calculateCost,(void *)&tempCar);

//This is the Magic!!!
float *valRetThread;
pthread_join(tid,(void**)&valRetThread);
arrCar[i]=tempCar;
cost[i]=*valRetThread;

}//input

for(i=0;i printf("\n%d \t %s",arrCar[i].servicingNo,arrCar[i].registrationNo);
printf("\t %d \t %s", arrCar[i].engineCapacity,arrCar[i].color);
printf(" \t owes %f ",cost[i]);
printf("\n");
}

Monday, February 23, 2015

How do you sort 1 million positive int values (assuming they do not repeat) present in a file (integers.txt) using  limited resources (not more than 2 MB or RAM) and creating only 1 more file (containing the sorted ints) ?
/*Gavin SATHAN*/


import java.io.*;
import java.util.*;

public class Super_Sorting {
public static void main(String[] args) {

int step=1024*1024;

int count=0;

Formatter f=null;

long startTime, endTime,duration;

//This block determines the number of lines in the input file
int numLines=0;
Scanner counterSc=null;
try{counterSc=new Scanner(new File("integers.txt"));}
catch(FileNotFoundException fnfe){ }
while(counterSc.hasNext()){
counterSc.next();
numLines++;
}
counterSc.close();

startTime=System.currentTimeMillis();

//For each value of each line, the appropriate value in the bitset is enabled.
try { f=new Formatter("integers_sorted.txt");}
catch (FileNotFoundException e) {e.printStackTrace();}

long start=0;
long end;
end=step;
int pass=0;
while (start
{
BitSet B=new BitSet(step);The size of the BITSET takes only 1 million bits
B.clear();
start=step*pass;
end=start+step;

System.out.println("Pass Number is "+pass+"\n\t => Filtering values between "+ start+ " and "+ end);
Scanner Sc=null;

try{ Sc=new Scanner(new File("integers.txt")); }
catch(FileNotFoundException fnfe){ }

while(Sc.hasNext()){
int val=Integer.parseInt(Sc.nextLine());
if ((val>=start)&&(val B.set(val-(int)start);
}
}//while
Sc.close();

for (int i = 0; i

if (B.get(i)){
int v=(int)start+i;
System.out.println(v);
f.format("%s\n", v);
count++;
}
}//for
start=end;
end+=step;
pass++;
}//for

endTime=System.currentTimeMillis();
f.close();

//This line determines the duration of the algo
duration=(endTime-startTime)/1000;

System.out.println("Number of lines = "+numLines+"\nNumber of integers sorted="+count+"\nSorting Took "+duration+"seconds");
}//main
}


Friday, February 20, 2015

Delete Recursively from a directory!




/*
Gavin SATHAN
20th February 2015
*/

#include
#include
#include
#include
#include
void DELETE_FOLDER_RECURSIVELY(char * path_name);
void main(){

mkdir("./DEL",0777);
mkdir("./DEL/F1",0777);
mkdir("./DEL/F2",0777);
mkdir("./DEL/F3",0777);
mkdir("./DEL/F3/F3_1",0777);
mkdir("./DEL/F3/F3_2",0777);

int fd=open("./DEL/F2/file1.txt",O_RDONLY|O_CREAT,0777);
close(fd);

fd=open("./DEL/F3/F3_1/file2.txt",O_RDONLY|O_CREAT,0777);
close(fd);

fd=open("./DEL/F3/F3_1/file3.txt",O_RDONLY|O_CREAT,0777);
close(fd);

fd=open("./DEL/F3/F3_2/file4.txt",O_RDONLY|O_CREAT,0777);
close(fd);

fd=open("./DEL/F3/file5.txt",O_RDONLY|O_CREAT,0777);
close(fd);

fd=open("./DEL/file5.txt",O_RDONLY|O_CREAT,0777);
close(fd);


DELETE_FOLDER_RECURSIVELY("./DEL");

}//main


void DELETE_FOLDER_RECURSIVELY(char * path_name){

printf("\n\nInstructed to delete %s", path_name);

DIR * directory_ptr=opendir(path_name);
struct dirent * dp=NULL;
char current[1024]=".";
char parent[1024]="..";
char full_path[1024];




printf("%s",current);
while((dp=readdir(directory_ptr))!=NULL)
{
char arg1[1024];

strcpy(full_path,path_name);
strcat(full_path,"/");
strcpy(arg1,dp->d_name);

if ((strcmp(arg1,current)!=0)&&(strcmp(arg1,parent)!=0)){

strcat(full_path,arg1);

if(dp->d_type!=DT_DIR){

printf("\n\tGot a file, name is %s\n",full_path);

int success=unlink(full_path);

if (success==0){
printf("\t\tDeletion Successful!!");
}
else{
printf("\t\tDeletion Failed!!");
}
}//if DT_DIR

else{
printf("\n\tGot a Directory, name is %s\n",full_path);
DELETE_FOLDER_RECURSIVELY(full_path);
}
}//if
}//while
printf("\nThe Directory %s is now Empty.... \n\tProceeding with the Delete\n\n",path_name);
rmdir(path_name);
}//fn


Thursday, February 12, 2015

Mindset!


This sums it all!!!



Wednesday, April 7, 2010

Moi mo lev paker mo rester!!! Episode 2

Hi all,

Most of you are aware that the elections are to be held on the 5th of May and you have heard the different composition of the different parties.
On one side we have (PTR,MSM and PMSD) and on the other we have (MMM, UN and MMSD).

Funny thing is that each of them is presenting the other as being 'un danger pour l'harmonie nationale et la paix sociale'.

Qui dit vrai?

What cracks me up is the fact that as soon as a party's negotiation with another fails, automatically the former starts criticising the latter. Another funny thing is that we have seen Episode to of the saga (...or should i say Sega) 'Moi le lev mo paker mo rester' from one minister who was once said to have a 'La Queue Chatte on his head' by a deputy, it started when he was denied the guarantee of being the next Finance Minister if ever the French alliance were in government.

On Sunday Mr X criticised Mr Y of being ungrateful and stealing his credit for the economic achievement. Then Mr X, accepted a 'ticket' to present himself as a candidate in a constituency. In my opinion this shows a lack of dignity.

To add to the saga or sega, this new episode should be called: .Moi mo lev paker mo rester ek mo ramasse mo la queue chatte.... What gets me on my nerves is that none of the parties involved had taken care to inform the population of their programme and what tehy intend to do. And yet you have stupid followers who have already started licking the boots of the candidates.

What we need in out so called democracy is the end of a regime whereby people vote for Mr M because he belongs to the same community or because his father was a good politician. Vote for parties because of programme. Vote for competent people, not the parties they belong to. WE have seen several examples of deputies hardly ever asking question, sleeping and reading magazine in the parliament. Is that what our taxes pay them for.

Dear readers, the chance is yours to show to these politicians that you need people who have your interest at heart and not their own. Vote judiciously for someone who create the best opportunities for you and your family. Pas vote deputEs ki pou fer ou vine marionette.

When you are ill and you need to choose a doctor, does it matter what is the religious faith of the doctor or what party he might belong to? Of course not. So why should it be different when you choose someone who will impact on your future and that of your children?

If you vote for someone and he screws up, YOU complain, however YOU are to blame, and if YOU do not vote, YOU do not even have the right to complain.

Vote judiciously and vote for people and not parties.

Ena Parti capave mette ou dans la clE ek ena lezotte capave casse ou leker....alors fer attention. lol.

Make it a point that whatever party wins, you should not be the one losing opportunities.

Friday, March 12, 2010

It's been so long since the last time, so let us Forgive, Forget and Remember.

I am back after so long. Well throughout that absence i have learnt a lot and its about time to share.

I have been contemplating for quite some time about the objective of life. We are all here for a brief interval. What we do during this interval will determine how we are remembered. I have known many people who came in my life, left a mark and left. I have always heard that everyone is here for a reason and that their whole life can be summed up in how you can remember them.

Some can be remembered because they lived by the Carpe Diem motto, i.e. they cared only about the present and did not bother about the future.

Some can be remembered because they lived their whole life pleasing others, without focussing about pleasing themselves.

Some lived their whole life ensuring that they led people on the right track, but lost their own way.

Some people take a wrong step once, fall, and this fall leaves a lifelong scar. Though they might have learn a lesson (the hard way), the scar will always remind them of that one wrong step.

I have believed in and lived by the motto :'An eye for an eye', but this simply is not right. Because you will end up being exactly the same as the one who hurt you. Which is not what you would like, and this could be your wrong step. What happens if the scar is one somebody else?

Well I am learning to forgive. Some people focus on nourishing the grudge, and forget why there was a grudge in the first place. Time goes by.... that is time wasted. I do not want to be remembered as someone who was revengeful.

Everyone will have only one shot at everything, so better not waste it. If by misfortune you miss it, do not waste time. Learn your lesson, keep going and focus on not committing the same mistake again.

Let's forgive, forget and remember....this might sound contradictory, but let me explain.
We will forgive, forget the harm done to you and remember only the good times.

Oooh, by the way a good friend of mine released a video on youtube check it out here. Have a look and tell me if you recognise anyone!

What do you think?

Thursday, June 11, 2009

A little bit of something!

Hi all,
I hope that you are all doing great! I have been very busy over the last weeks and now i wanted to write a little bit!

I was busy with stuff, and some Python Stuff! Has some fun with client server applications and object serialisation in python! There was also a training held at AUF on the creation of dynamic web-pages using PHP and MySQL. Four colleagues and I went there and I have personally learnt quite a lot.

There is another workshop coming up and this time its going to be on Enterprise Security, I am already drooling just at the thought of it!

Here in our little paradise surrounded by devils, life is fun, we still have the daily half-hour comedy shows at 1930. I read an article on a weekly newspaper saying that our PM is having issues with the CEO of MBC over a parliament member's comment about cameras in a region where a (much-talked about) Macarena Party was supposedly held. What will happen when or if the whole of the parliamentary proceedings will be aired? I think we will either see just the images because all the speeches will be censored, or we will witness a weekly change of persons at the head of the MBC..... A quand la premiere television privE?

We have also big (sweet) talks about Maurice Ile Durable, why not encourage our minister to take smaller and less polluting cars? Why not use better buses? Why not have windows in all building instead of massive glass panes and than use Air-conditioning? Have a 'bonus malus' on old cars. There was an apparatus bought by the National Transport Authority some years back called an Opacimeter (Device which checks toxicity or exhaust gases of vehicles), should they use it on buses, I am sure that over 30% of buses would be considered as not road-worthy. All the ideas above are simple, as a result of this they do not lie within the reach of Advisers or Ministers.

Just a few words about the customer service at the local fruit-named ISP, it takes them 3 days and 3 mails (with the last one being very sarcastic and harsh) to reply to a customer request sent in their contacts and complaints mailboxes. And two days to write a 2 line letter? Talk of a fast customer service!

I would also like to make a polite request to all people with suicidary tendencies who are contemplating the Pont-Colleville option. To avoid any disruption to traffic, please use the Southbound side in the morning and the northbound side in the afternoon because it disrupts the traffic flow. If you want to end your life, please do not worsen the remaining days of others.

A bas l'incinerateur!

Saturday, March 7, 2009

Python Rocks!!!

Hi all,
You might be aware that we are currently using Python as the programming language to teach students Programming Methodology, and its is going on very well. I am personally having fun, and i believe that i am not the only one.

I am also teaching Communication Skills this semester, and i am being given a golden opportunity listen to the students speak. Last week, I had requested them to speak about their Dreams and Aspirations, and if they had only a couple of months left what lesson would they like to pass on about their life. This was inspired from the Last Lecture from Randy Pausch Though most of them did the first part correctly, none of them has really learnt any lesson which they deemed useful mentioning. Well I have been accused too many times of being philosophical, many students dream of owning a brand new car, a big house and a 'nice hot chick', Is that all there is to life? Je crois qu'ils sont dephasés par rapport a la realité.

We tend to describe ourselves as being bilingual, but can we really speak and write French and English properly. I am very much disappointed when i hear reporters both on public and private media stations commit mistakes when they speak on air. Aren't their reports checked before they are read on air? No comments about their accents, it sounds as if they have lived in France or the US. But their grammar really sucks at times!! I was at the opening ceremony of the UniTech last Wednesday. The Director of Orange Business Services, Mr Patrice Despax outlined the motivation of his company to come to Mauritius inspite of our small population was the fact that that we are billingual and he also stressed on the face that we need too improve written French as well.

Since last week the Public Health Act came into force and it is not permissible to smoke in public place and im my opinion this Act has some loop-holes.

No person shall smoke a tobacco product while driving or travelling in a vehicle carrying passengers. What if someone parks his van next to a bus stop and has 10 persons smoking in the van. Technically the persons are not travelling, as the car is stationary. So what can be done??? Furthermore, the vehicle refers to a private location inside a public are...so...

Anyways!!!

Monday, December 29, 2008

I'm back after more than 100 days!!!

Hi all,
I know!!! Its been a while!!! I have been busy with loads of stuff mainly work!! I did go through a nice little training session on Linux!!! Hurray!!! IT was in french - it was tough at the start, but we managed to get through it (alive). lol.... It was very interesting. The trainers were Niry Andriambelo from Madagascar and Shafeek Sumser who is from Mauritius itself!

It was so interesting and i have learnt a lot of stuff! Last week i went to Port-Louis and it was so irritating to see all those hawkers who were blocking the pavement and many people literally had to walk on the streets. someone will get run-over one day and then only will the government react. There have been places specially designed for them and yet this irresponsible folks still block the pavements. They claim that the spaces designed for them is far from the town center: They are operating illegally and yet they are choosy! This reminds me of the saying beggars can't be choosers. They sell cheap and poor quality stuff without any sort of guarantee and they do not even pay their taxes properly.

C'est un laisser-aller dégoutant de la part des authorités.

One other thing which got me on my nerves was the abuse that one minister does in particular, Well many of you might not remember the days when our honorable deputy prime minister came and cried on TV during the prime time (your know the 30-minute news whereby the goverment gets 20 minutes) when he swapped parties just to be in the government this guy always seems to be in a hurry to go somewhere. His 'motards' just cut straight across your way to stop you and allow his car through, i tend to think that he is always in a kind of emergency, like he's got chronic diahhroea or something...if thats is the case i would request the manufacturers of Mercedes to install a toilet seat in his next car. He has to bear one thing in mind, people need to get to work in time in this country, if he is not competent enough to plan his own itinerary, then he is definitely not good enough to take part in decision-making for our country. I will let you guess who that old guy is! Ok we will just call his Dr Honorable Chronic Diahhroea. In the next BR 22, i hope we have toilet seats installed! It is just disgusting to witness those double standards, the speed limit on the motorway is 90 km per hour and the driver of BR 22 easily goes over 120, and yet you have policemen who ride in front of him, who go even faster... Un abus de position revoltant.

Roule brite mort vite...i wish you this irresponsible driver!!!

I wish you all a very prosperous year 2009 and loads of happiness to you all and your families.

Tuesday, September 9, 2008

Irresponsible Students!

Hello you all,
Looks like the previous post got popular!

I read something today, in fact it something i heard a couple of days ago about an Afghan student got sentenced to death for having downloaded an article on the role of women in Islam and distributed the article to his teachers and friends in his University (Balkh University). A complaint was lodged against him, and he did not even have the right to a lawyer. His name is Sayed Pervez Kambaksh , and he is aged 23. Human rights group of the UN are trying to convince Mr Hamid Karzai to intervene, but it so happens that as per the Independent Newspaper of the UK, the guy who passed that sentence, Sibghatullah Mojaddedi, happens to be a key ally of Karzai. Some people are also pressuring Karzai to execute the sentence as soon as possible.


Picture of Mr Kambaksh (Source:Picture from Reuters)

Rahimullah Samander, the president of the Afghan Independent Journalists' Association, said: "This is unfair, this is illegal. He just printed a copy of something and looked at it and read it. How can we believe in this 'democracy' if we can't even read, we can't even study? We are asking Mr Karzai to quash the death sentence before it is too late." Source (Independent.co.uk)

With our Attorney General who happens to be a Human Rights thingy....doesn't Mauritius have a say in this??? For as far as I know , Mr Kambaksh is human as well.

There is a petition (which i signed earlier today)to urge the Foreign Office of the UK to do something, i think that if you believe in democrary its your responsibility to add your name to the list. What about UOM students are they to busy with elections??? They guy is a student as well!!!Par solidarité estudiantine, faites donc quelque chose!!! I even created the Support Sayed Pervez Kambaksh Group on FB

The full article is here:

Anyways!

Well I did a cyberlaws lecture today, and i was appalled by the lack of responsibility of some students (both guys and girls). Last week I had given them some thing to prepare on a comparison between Local Computer Related laws and the laws in the UK and most of them did not bother prepare.This is an attitude which i personally find:
1. Disrespectful
2. Disgusting
3. A true demonstration of the culture du 'ferfoutisme de certains etudiants'
4. Lack of seriousness in their studies

What they do not realise is the importance of the assignment!
Because we have to analyse whether our laws are adequate or not. But some of them do not have adequately developed brains to understand that. All i got as excuse for them not preparing was that they were not present when i gave the assignment, while others gave me stupid smiles, and still others gave me Hi-Sense gazes.

Result will definitely show, as they happen to reflect the amount of work put in, specially since its a weightage-5 module!

God Save us all!!!

Monday, September 1, 2008

Avinash goes away!

Hi all,

Last week was the last week of my dear friend Dr Scheme, we went for lunch together at a wicked restaurant called Coco des iles at Roche-Brunes, and we had a wicked time, their interior decoration and artifacts they used to serve food is very original.They served rice in a coco-fesse which was cut in half, others had 'satini rekin' in a coconut shell.







They when i got back to uni i had the privilege to attend Dr Scheme's last lecture titled: Convergence of Technology whereby he talked about WEB 2.0, Apple iPhone, Semantic Web and...
See Below!



I found it very interesting and learnt quite some stuff. We had a good time and someone even asked me a question (as Avinash introduced me later in his lecture) concerning E-Commerce Payment Processing. Then we went at Avi's place for a beer and Christina made some delicious little snack and they kids were singing and reciting poems and i had a good time.

Friday was officially his last day and it did make me kind of sad when i saw him packing his stuff. Anyways he felt he needed to explore new horizons and i wish him all the best.



Friday also meant my first programming lab with some first year students, while getting them to test some programs, i was shocked to find out that some were struggling with questions to find area and volumes of geometric shapes. They probably relied too much on the list of formulae for HSC...how sad!!!

By the way, i sorted out my aquarium and look at what it now looks like!! Its so cool!



On Saturday, i while helping out some student, i got carried away while explaining Quadratic Equations, then i braked!!!! else i would have turned this programming lecture into a Maths class! I still believe that there is a teacher's contribution into making a student love or hate a subject!

So what do you think?

Last week we also heard about the 'Decoller Pas coller' campaign against pasting of posters and billboarding, what silly is that they got student to do that during college hours, i believe that they would be better off at school. They could have done that during the week-end. Let's hope and pray that this commendable initiative also last until the elections next year and that the authorities do not turn a blind eye when the political parties start putting posters on bus-stands and round abouts.

We are also hearing discussion about the reluctance of some teachers to work till 15 00, we'll this will delay their private tuitions! How will they manage???? Money they earn by selling their knowledge surely outweighs their professional conviction in doing their job in their respective schools!

So disgusting - To them, may be that education is no longer a service, but more of a business!

At times the parents are to blame as tuitions are fashionable and sometimes the students are at fault as they do not study hard enough at school and pay to learn the same things at college - that's if the teachers work at college (I was lucky, as I had marvelous teachers, and i am thankful to all of them). Especially Mr Kalachand and my tuitions teachers Mr Ram SATHAN and Mr Pourannen Sungeelee, i owe much of what i am to them!

A Teacher's job is not to teach, but to inspire. Isn't it Mr Meetoo!!!

So what is your opinion!

Thursday, August 21, 2008

Python going strong!

Hi all,
I have been very busy these days with preparing lecture notes and running around jumping from one lab to another and from one lecture room to another! As far as the Python lectures are concerned, I am enjoying every single bit of it...who could dream of being paid to have fun!

Anyways, i just hope i am able to kick in some programming logic in the students' heads!Most of us are thrilled by the performance of the Mauritian Magician, Bruno Julie, its just nice for a little country like ours to have a sportsman on the podium!

Unfortunately enough, there is that issue with Bert Cunningham, looks like some people are not to happy when cases of suspected corruption are brought in the limelight. How can a democratically elected PM say that a commission of enquiry will not prove beneficial to the nation nor to the institutions of the country. Using lame excuses like waste of money and the fact that there is already a body (ICAC) which deals with such things.

Perhaps our PM needs memory supplements (Or may be he is busy with those ministers 'ki p lev paquet rester?'), some of the cases brought forward by Mr Cunningham date as far back as year 2000, and our stupid system (reflecting the people who designed them) stipulates that the Independent Commission Against Corruption cannot enquire about cases prior to its creation (yet its called independent). Consequently those who claim they 'pas guette figure pou agir' have their hands tied. Had a commission of enquire been set up may be they would have been able to shed some light on those allegations irrespective of when these suspected frauds occurred.

In my opinion, there are some big shots who might be involved. What image does mauritius project in the region? A country where a man who is doing his job is getting treated like a criminal and whose competencies are not being recognised. Worse still, looks like some people at the MRA are scared to. The compensation meant to be given to Mr Cunningham amounted to Rs 6 million, yet this got reduced to about Rs 1 million because apparently he violated the conditions laid down during the negotiations. So did the conditions prevent him from pointing fingers to those he thought as being corrupt.

He also said that he submitted all the documents to the necessary institions for investigations and the said documents got lost....maintenant la question qui brule mes levres est: A qui profite cela???? definitely not to the honest tax payer.

Amazing! Documents incriminating some people tend to get lost so easily nowadays! Or people suspected of fraud always tend to get sick just before their hearings start! Wonder how our good folks who were named in the enquiry for frauds at MCB/NPF or Maurtius are doing these days,i hope much better since the cases against them have been dropped.

Sa meme appele l'ile paradisiaque sa!

Paradis Fraudeurs ek Triangeurs!

Bon Courage Mr Cunningham,

Allez Bruno, met li K.O! lol...:)

What do you think?

Monday, August 11, 2008

My first Python Lecture

Hi all,
Today I delivered my first Lecture in Programming Methodology, i talked about computer systems, compilers, interpreter, and Programming Methodology.

While preparing my slides, i wanted to include some nice graphics and pictures so that it become slightly less predictable. For the first time, i used Open-Office to prepare lecture notes.It took me some time to work round the interface, but it was worth. I also saved a Powerpoint compatible copy just in case Open-Office was not installed on the PC i might be using.....this happened to be a very wise decision. Unfortunately, with the Powerpoint compatible format, the presentation had lost some of its 'bling-bling'. Text-boxes and Picture-frames were translated and ... The RGB projector had to be re-initialised as it was displaying upside down. Luckily a friend helped me out.

After that, i managed to start my lecture, nice little intro, little side notes about computers, scientists, mathematicians and i even managed to get a picture from the movie "Lost in translation" to explain conversion of High-Level to machine-level language.

The last part of my lecture was about the Butterfly Effect and Chaotic Systems, what a marvelous side note: Edward Lorenz, I believe that the Students need not learn things by heart, or just for the sake of knowing stuff, knowing about the persons behind the discoveries might help too. Another reference was made to Algebra and Musa Al Khwarism...

Then later on during the day, i had a lab session during which i managed to get them to use Linx and Dr Python, some other students used Kate+Konsole, but it was ok on the whole. Some students are very good, which i find encouraging. Though i had a couple of issues with some slight differences in syntax, i managed to get all the programs working.

Then got back home and watched TV, then there was a very very very short Powercut, when they released the power, i.e about 1 second later (seriously, it was wickedly quick), the TV, the DVB receiver, along with the Microwave oven got damaged and they are not switching on now!.I called 130 (CEB Hotline), and i am meant to call at the nearest CEB office to tell them about it....which i will not fail to do!!! Whose gonna pay for my 29" TV....definitely them!!! They have to learn the lesson about those shitty powercuts at random times.

So boring aint it, home without TV during the Olympic games!!!

Wednesday, July 30, 2008

Summer Time!

Hi dear readers,
Well looks like Daylight saving will be applied this year. Daylight saving time, was first proposed in 1907 by a certain William Willett, it is intended to allow people to make the most of daylight hours during summer, and reduce the amount of energy spent in artificial lighting (and heating..though not really applied to our local context)

Benjamin Franklin, during his visit in Paris, proposed DST as a means to save on candles used in street lighting. Well, according to some research, DST has effects on traffic and criminality.How much this is true is hard to quantify.

The interested reader is more than invited to visit the wikipedia article How it works? Well usually in the last Sunday of october you are expected to move your clocks one hours backwards and in the last sunday of march, you are expected to move them forward....it is the exact opposite in the northern hemisphere because the seasons are reversed...

Well talking about the DST, i watched the parliamentary debates on TV earlier on. At some point in time one deputy was annoyed by a remark of another member from the opposite side of the house. The tone of the discussion worsened, and there reached a point where the speaker had to intervene to calm them down and request each member to withdraw their respective comments.

There is something disgusting which happened, the speaker said that the recording were inaudible as the members were seated and were not recorded. This is silly! Another things which highlighted the stupidity of the system is the fact that all remarks made in any language apart from english and french is not recorded, this explains why our deputies (notice that i did not say respected representatives, as they are neither respectful not do they represent me)...in other words, they can abuse themselves using creol and yet nothing is recorded. This might explain why parliamentary debates are not broadcast live on TV, as this will show to the population how their representatives behave.

Furthermore, when the speaker suspended the proceeding for 30 minutes to view the recordings, the cameraman made a 'gros plan' on the leader of the opposition as if to wait for any reaction which would used to present a (or another) bad image of him. I believe that the national tv station is meant to be impartial,but we know that about 15 minutes of the news is reserved for members of the government, whereby they would broadcast whole speeches at length, as if they news editors are unable to summarise they essence of the speeches. By now we have enough TV channels to broadcast the whole debates, but are all the elected persons ready (or civilised enough) for it. I am tempted to say that only time will tell.

Gavin

Tuesday, July 29, 2008

Why?

Hi all,
I hope you are doing fine. I have just found my keys, i had lost them and i had everyone at home look for them.I was just going through my blog earlier on and i realised that most of you do not really comment on my blog when i get Philosophical. This is serious!

You have to get the essence of your life, and at times it pays to ask fundamental questions. Anyways, a chacun ses trucs.

I had a look at UOM's blog today and one of the things mentioned was the need to write the postings in proper french...its gonna be hard for many (including me).

Well today, we had lunch with our new colleague Prof. Stefan Brandle, who is a very nice gentleman from Indiana, he speaks french, English, German, and does understand Creol as well...He is Fulbright scholar and will he spending a whole year with us. We got him introduced to one of our local dishes: Roti Cari and he said he liked it.

We'll see with the other stuff...

Anyways take care of yourselves

G@V!N

Friday, July 25, 2008

Some Philosophical thoughts i want to share!

Hi all,
I had a lovely and very profound discussion with a friend today and we talked about what motivates people. Well not everyone is motivated by the same things. Some people want money, others fame, others satisfaction, others fulfillment of their dreams,still others recognizance. And all this depends on choices we make. At the moment we make the choices, they seem meaningless, but when we take time and look back we realise their true importance.

I have always said one thing, do the things which make you happy and do not procrastinate! Because on one day in your life there will be no tomorrow. The best pleasures in life are free, how many of you have taken the time to admire the stars in a clear sky at night, how many of you have enjoyed the sight of the reflection of a full-moon in the lagoon, how many of have had their fingers grasped by a baby, how many of you have seen a rainbow and said to yourselves that the drizzle was worth it, how many of you have watched the sunset on the beach with people dear to your heart, how many of you have been so happy that they cried?

And yet we are 'A la poursuite du bonheur (avec la peur de la mort qui nous poursuit)'. Do we need to carry on this pursuit, or simply grasp it.

Avinash has the habit of saying that his job in not to lecture but to inspire, which I perfectly understand, as it is so true. When i was young(er) there were a couple of my teachers i admired, and this probably explains why I chose to be a lecturer, hoping that i might inspire at least one student in my career.

I was watching a documentary yesterday, and the last sentence struck me, it was the words of a Moroccan Nomad who said to the guy doing the documentary: "Vous avec l'heure, mais moi j'ai le temps cher monsieur",

Well unfortunately for us we are so much caught that we forget the most important thing in life which is: LIVING. We spend so little time being happy that when we reach that feeling we lose time understanding it and then we feel that when we are happy time flies and when we are suffering, time lingers....is it true?

Any one willing to share any philosophical thoughts are most welcome to express them....by the way i will be posting some pictures soon, just to show you that stars are not out of reach!

By the way i have reached 500 visitors on my blog since its creation...hurray!!!lol!

G@V!N

Monday, June 23, 2008

'Democratisation de l'acces a L'Education' ...yes but at what cost?

Hi u all,
We have all heard that the government intends to provide access to Tertiary Education to all eligible students, and as per their definition, eligible students are those who have at least one A-Level....implies that with an 'E' in Maths is now eligible.

Should they really apply this measure, i believe that this will weigh heavily on the National Economy. A quick question i ask is: Do all jobs 'created' require the potential applicant to have a University Degree.

Furthermore, i believe that there is something more subtle going on....Let's assume that a School-Leaver is meant to be looking for a job, and given the current situation, finding a job is hard...Consequently, it could be that ensuring that most of the school-leavers join Uni implies that they will not swell up the unemployment statistics...What a Crafty Measure!!!

To mask the level of unemployment, get them to uni... They are just delaying the problem...

Several countries have faces problems when they educate too many people..They end up with over-qualified people, and worse still, since many cannot find well-enough paid jobs, the people then try 'Greener Grass Elsewhere', resulting in brain drain.

Reputable Universities usually have entry requirements as high as 3 B's....wonder where our decision makers are getting their inspiration from....for the one time they are not copying from Europe, they are making a mess of it all.

It is a fact that not everyone is has the ability to join university.. University Education is meant for people who really want to get it and who work hard enough for it.

I would not want to witness a bunch of Spiky-Hair, Piercing Loving, gum-chewing, and Techtonic obsessed teenager wearing Riped jeans being given something they have not worked hard enough to deserve. (Teenager ..yes..though they are 18 or more, i have doubts whether their mental age matches this high!)

What do you think?

Gavin

Wednesday, June 18, 2008

In a free world, who needs Windows and Gates...all we need is Linux (and a good bandwidth)!

Hi all,

Last Poll Results!

'Un petit pas pour l'homme mais un pas de géant pour l'humanité'...This is what i said to myself when i installed Linux, Hardy Heron on the Office PC.

Hard to leave 14 years of a using Windows, it all started with Windows 3.1 on a 386 SX with 4 MB RAM, in 1994...and DOS-Shell...... Those were the days!

I already had a dual boot Vista-Linux on my Laptop, then i was so happy with it that i said to myself, that i might get more used to Linux if I used it in office, so i got a copy and off i went! Linux ready!

I had a little issue though, i have put the hostname 'Gavin' for my computer and then i sad to myself that i might change it to a funnier name, my friends had called their terminals Sugarbabe, Honey, Sexy... so i wanted to change the hostname to Pixie-Doux!

with the help of the owner of Sexy and Honey, i looked for the command to change the hostname, we came up with a sudo command...hummmm!! sudo, for once i am using it:



courtesy: http://elliottback.com/wp/archives/2006/09/03/sudo-make-me-a-sandwich/

So i typed:

sudo hostname Pixie-Doux


It seemed to work fine, but when i rebooted the PC, and tried

hostname

It gave me the old name, i.e Gavin, i tried something more radical, by trying to change the hostname file from the folder /etc/hostname by writing

sudo vi /etc/hostname


However, i think i had done something wrong, I even tried to change it as any 'Normal' person would, i.e System settings->Network Settings....

Then i did something wrong...but I do not know what, All the sudo commands I was typing were not getting executed, they were giving me the 'unable to resolve host Pixie-Doux' error message, neither were any changes i was trying to do from the administrator login.

Worse still 'amateur comme je suis', i did not have a root login on the system to login and revert to the previous hostname...quelle stupidité.

The owner of Sugarbabe then kindly advised me to have a root user created as soon as the problem was sorted....

It was time to call Dr Scheme, and as soon as i told him i needed some help in Linux, his reply was 'Ki zafaire tone faire foiré encore la?'

Anyways, la fin justifie les moyensm he booted the pc using the CD, then used some Hocus Pocus Commands at the console, and badaBoom! Everything was operational!

Then i quickly applied Zetwal's advice and created the root account by typing:

sudo passwd root


Can't wait to experiment more on linux! I have found the long lost pleasure of using commands!

Pas conner ki mo pou casser encore lor Linux...anyways, I learnt many things my breaking other things.....lol!

Gavin!