MacBook crash!

April 30, 2008

For the first time in the two years of use my MacBook had a crash that made me forcedly reboot the machine!

Are you curious to know the  cause of the crash?

Maybe a virtualization software?

Maybe a big and heavy application?

No… everything happened at the first lunch of the new “Microsoft Mac Messenger version 7″!

So it is clearly a lie the fact that a Mac doesn’t crash ’cause sometimes it happens… all you need to make it occur is Microsoft Software!


KDE 4 on Slackware 12.0

April 23, 2008

Yesterday I decided to install the new KDE 4 on my Slackware 12 so I started looking around for a repository with the packages (since on the official one there’s no trace). After a little search on google i found out this:

http://kde4.rlworkman.net

The repository seemed having all the packages I needed so I began the download (there’s no index so it’s impossible to use softwares such swaret or slapt-get). After saving all the packages into a folder and running an “installpkg *” command I logged out and tried to lunch the new kde. Unfortunately an error occurred… was impossible to execute kdestartupconfig4 due to the fact that was missing GLIBCXX 3.4.6 (this was pretty wired since GLIBCXX library is inside the libstdc++ package which is installed in my system). 

In the end, after long thinking, I found out how to solve the problem… It was necessary to install also the packages gcc-4.2.3-i486-1 and gcc-g++-4.2.3-i486-1. After this everything worked well!

I hope you’ll enjoy the new kde!


Male-Female interaction problems

April 10, 2008

Today I’ve read (the article can be found here) that, upon a study of Indiana University, young men are unable to read female behavior and body language to understand if they are “interested” or not.

Young men just find it difficult to tell the difference between women who are being friendly and women who are interested in something more” said lead researcher Coreen Farris of Indiana University’s Department of Psychological and Brain Sciences.

Mulling over the issue I’ve found out that the true problem is that has never been defined a protocol for male-female communication and interaction! I’ve searched into ISO database and I couldn’t find any! In my opinion if both male and female would use a standard ISO protocol for interaction and communication most of problems and misunderstanding would be avoided! I suggest one based on XML messages (would be the best choice)!

Please, you all, think about the huge benefits we would receive if my great idea would be reality!


A “single line of code” browser with Cocoa

April 10, 2008

I really enjoy developing on Mac OS X… especially thanks to XCode and Cocoa (what a superb framework)!

What makes Cocoa such a great tool is letting you concentrate on your project making easy accessing to all those low-level “stuff” that always slow down your work! For example… it is possible to create an essential browser writing down just a single line of code (of course after making the UI graphically with Interface Builder)!

Once you’ve set up the UI with a textfield, a button and a webview all you need to write is:

[[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString: [urlText stringValue]]]];

Don’t you think that all this is so cool? I mean… for example, if you’re working on an RSS aggregator you can just spend time working on the core task of the application avoiding the waste of time derived from implementing a built-in browser for rendering news!

You can download the xcode project of “single line of code browser” clicking here!


Mac proliferation at MIT

April 9, 2008

Few years ago seeing a Mac here at the MIT (Milan Institute of Technology… also known as “Politecnico di Milano”) was a quite hard task… nowadays things are fortunately different! About two years ago, with the migration of Apple to Intel platform, something began to change!

Since then Apple computers started spreading through students… at the beginning was just two guys then they become four, then eight…. and so long! Now 1/3 of one hundred students class has a Mac (the most popular machine is the MacBoock… but it also happen to see a MacBook Pro sometimes). Also many teachers (most of them are Electronic Engineers) are moving themselves to Mac… and as a consequence many courses adopted multi-platform tools in everyday activities (with benefits also for Linux & BSD users).

The only “bad” things is that now, using my MacBook, i feel special no more since around me, in a radius of 3 meters, you can see 4 or 5 other Mac! (here I’m obviously kidding).


Java String Class: hot water discovered!

April 9, 2008

Yesterday, working on my graduation project, I discovered the String class in Java has a method that allow to compare it with a regular expression passed as argument. I was really amazed, it was about 2 hours I was working on an algorithm that it was supposed to check if a string matched to a SQL RegEx (a regular expression that use % and _) to implement the SQL LIKE “function”  in my project when I discovered the “matches()” method of the String class.

Since I was far from finishing my algorithm this discovery made me save much time (yes… I know a better knowledge of Java would have me allowed to save also the first 2 hours but no one is born learned).

For example:

//String I want to check
String myString = "Freedom";

/*Next is SQL regular expression that say "the 3rd
and the 4th characters are 'e' and the last one is 'm'*/
String regEx = "__ee%m";

//trasform SQL RegEx to a Java one
String javaRegEx = regEx.replace("_", ".").replace("%", ".*");

/*The method return TRUE 'cause "Freedom" matches the RegEx*/
myString.matches(javaRegEx);

 

Actually I know all this is nothing special… and to many of you may be a “hot water discovery”… but I really wanted to share it!


The adventure begins!

April 9, 2008

Welcome to everyone! We (me, kk6it and federix111) have just started writing this blog to share our thoughts, feelings and experiences with the world… so please follow us!