Tuesday, May 13, 2008

Today I Am Watching The Sky

Finally it's here!
There was something missing in a recent article about the Microsoft World Wide Telescope and that was the actual software. Finally, it was released and now it is available for download from the official site.

These days have been pretty much tiring, so a nice trip on the Universe would be just what I need! (I have the feeling that in 10+years the previous phrase will have the literal meaning!) I hope to be back with my own experience with the WWT and until then I will be happy to share yours.

Tuesday, May 6, 2008

Sysinternals: The Essential Tools If You Have Redmonditis

It has been some weeks now that my laptop had gone wild. The CPU fan kept working really loud for no apparent reason, then going silent again and repeating the same pattern over and over again. There was no apparent problem in the horizon: CPU usage was low, memory was ok, no suspicious processes running. Everything was fine. Just before going to buy a new laptop, I remembered having downloaded a bunch of Windows tools for system tasks (actually I have been using the Process Explorer for quite some time now).

I run the file monitor tool (FileMon) and found out quickly what was going on. A process named ServiceLayer.exe kept polling the disk every 2-3 seconds, exactly the rate at which the fan was being loud and silent. I shut it down and everything came back to normal, my nerves included.

Actually there is a number of applications that behave badly to our disks. In the top of the list is Skype.exe, the popular messaging tool that literally is flooding the disk with I/O operations. Its networking behavior is not appropriate either (why should it open the http port anyway?) Skype community is used to such problems. Anyway, the cause of my problem was from Nokia and its Nokia Connectivity Suite. If you have a Nokia phone and you have installed the software to connect your PC with your device, you may as well have it at your tasks list. The ServiceLayer.exe is an application(a service since it runs on background-no windows) that, if of course it is legal (could be malware for example), it may make the life hard for your PC.

But Windows Sysinternals can come to the rescue! You can find in the official Microsoft site a real treasure of tools that will reveal, anything you need to know about what your Windows machine is doing: Disk Utilities, Networking Tools,Process Utilities, you name it is there.
Their functions are limitless and it does not fit here to describe them fully.

So, the next time you will encounter a problem make sure you launch the appropriate Sysinternals tool. It is easy (the executables are small-some kBs), it is useful (really useful) and it is free. The best cure for everybody diagnosed with Redmonditis!

Wednesday, April 30, 2008

Microsoft's Big Bang: The World Wide Telescope

I had came across a few months ago, an article saying something about Microsoft's new research project that was coming into light. It was from a former Microsoft employee, I guess, that on watching a demo of this project burst into tears-sorry but I seem not to be able to find the original article. I initially thought, "Well, Yet-Another-Viral-Campaign", and quickly forgot about that. After all, I am pretty much satisfied with Stellarium and I also know Google Sky is out there. Well, it seems I was totally wrong.

The project is named World Wide Telescope, and was created by Jim Gray, a computer scientist who received the Turing Award in 1998, joined Microsoft in 1995, embarked on this ambitious project 6 years ago (June 2002) but disappeared in 2007, during a short boat route to scatter his mother's ashes. From that time until now Microsoft is continuing his research with astonishing results, and based on the people that have experienced the new technology, it has by far no match out there. You can find his original paper here. It worths reading, trust me.

The World Wide Telescope is an integration of a thousand of technologies. For the user it is a great tool to virtually (or actually) roam into the universe. For computer scientists it is a fascinating theory put into breath-taking practice: federating data from multiple sources, correlating and producing new insights, to paraphrase a little. So, the WWT is a lot more than a new killer application: It is a Big Bang for Computer Science, since it manages to process multiple sources of huge amounts of data from astronomy sites such as http://SkyServer.SDSS.org/. This leads to better understanding over the data and making scientists more productive.

The computational challenge lies not only on the volume of the data which however scale to petabytes. The hardest challenge comes from the need to integrate heterogeneous data, its with its own format of course. This actually requires deep astronomy knowledge and strong processing capabilities. The creators of the WWT give a crystal clear example:

"A colleague challenged us to find “fast moving” asteroids. This was an excellent test case – our colleague had written a 12 page Tcl script that had run for 3 days on the flat files of the dataset. So we had a benchmark to work against. It took a long day to debug our understanding of the data and to develop an 18-line SQL query. The resulting query runs in a minute."

What the creators had to do, was to understand the format of the astronomical data to analyze and construct the proper (but sophisticated) SQL query. Their result was more than convincing and a strong proof that an idea like the WWT could actually be implemented. Now, can you guess why Jim Gray won the Turing Award?? That's right, for contributions to database and transaction processes. Of course, I might say!

But enough with the talk. Here you can find the video on TED where Microsoft first presents a glimpse of the World Wide Telescope. The official website is already up but the WWT is not yet available to the public. Enjoy grandma-Microsoft's new creation!

Sunday, April 20, 2008

European ICT Report 2007: "Greece Sucks, Denmark Rules"

I was recently in Brussels, having some work in the European Commission. Having finished and while waiting in the lounge of the building of our meeting, I grabbed a booklet, from the shelves around, titled "European Commission's Annual ICT Report: 2007". This special branch of the EU publishes every year statistics about the performance of its members in the area of Information and Communication Technologies.

I browsed immediately to the page talking about Greece but the phrase "among the lowest" kept showing over and over again in the text! The summary was: "Information Society in Greece is still developing slowly and on most indicators Greece is close to the bottom of the EU. There are signs of increasing gaps compared to other EU countries". Damn...EU also says Greece is among the lowest in broadband take-up, use of internet, eGovernment use, number of connected PC's in schools and ICT skills among employees.. Wow! We are also among the lowest nearly in every indicator.

On the other hand, Denmark seems to be the champion. Denmark places 1st in many crucial indicators like DSL coverage, e-Learning and e-Commerce. Skill level is considered among the highest in Europe and Denmark is considered as a leader in developing the European ICT society.
You can find more statistics about the European ICT status here.

This is not news for us, however. Our strategy is void because people in charge, are void. Having skilled employees while having a Prime Minister that has never been employed anywhere, would be a contradiction.

The good news is that, since we are at the bottom, there is only one way: Going up! :)

Tuesday, April 15, 2008

"Time Is What Prevents Everything From Happening At Once.." - John Wheeler (1911-2008)

The quote continues: "Space is what prevents everything from happening to me!"
John Wheeler, has for a long time, been studying advanced concepts of theoretical physics, which for the most people are somewhat taken for granted, space,time, gravity and so on. He passed away in Sunday, 13th of April 2008, at the age of 97.

John Wheeler was one among the last of the 'big school' of theoretical physics. He has worked with legendary figures such as Niels Bohr, Oppenheimer and Albert Einstein(related photo) and he is the inventor of the popular term 'black hole', this strange 'creature' that is so big that even its own image cannot evade from its infinite gravity (visible light cannot reflect or be emitted) At some point in 1941 Wheeler joined the famous (or infamous) Manhattan project. Among his graduate students as a professor in Princeton, were Richard Feynman and Kip Thorne.

I suppose, everybody from a CS background has developed at some stage of his life a certain interest for astronomy and physics. I, my self, at a young age was a fan of such fields along with science fiction. I never actually understood what was going on with these strange quantum equations but I think I find my self equally astonished when confronted with concepts like 'black holes' or 'time bending'. Astonished at least.

You can find lots more information in the official press release from the Princeton University site.

Sunday, April 13, 2008

The Dawn Of Cloud Computing

In a fairly poor article in Wikipedia, 'cloud computing' is defined as the subset of grid computing that includes a number of approaches to the use of shared computer resources. Anyway, there is plenty more information in the terms used: cloud and computing, which it is immediately understood that the computing part is done somewhere else than locally, ergo 'in the cloud'.

There was too much fuss over Google's new web application framework, Google App Engine, but the story begins long before Google decided to offer its services to some extent for free to developers. Historically begins from Unix's RPC utility, then moves on to Web Services technology until Amazon built a massive infrastructure to provide with some practical value to concepts that otherwise might be only at the theory level. While it might be controversial, in my opinion this was the first 'computing cloud' ever appeared in the web.

In some of my previous posts, although not initially planned, I actually gave some examples on what cloud computing might be. At least from my own perspective. For example, I had given some source code for building a text-to-speech application on .NET of a relatively superior quality. Do I know anything about speech technology? No and perhaps I never will, but I know a bit of developing and I could use a very powerful TTS service from AT&T. In a more recent example, I released source code for building a dictionary in Perl based on Princeton's WordNet. Both in these examples, I shifted the hard computing part to some place in the Web and despite this looks like more than a 'software as a service' approach, in a more large scale, it actually becomes cloud computing.

However, Amazon's Web Services is a true cloud computing platform. It currently hosts a number of very large-scale services and it keeps growing. For example, there is one that allows merchants to store products in Amazon's inventories and have Amazon take care of orders, packaging, delivery and so on. My 'favorite' though is Amazon Mechanical Turk, I guess mainly for the excellent name they came up with. The "Mechanical Turk" (photo) was a machine in the 18th century that supposedly could play chess. However, the 'machine' had a person inside that could manipulate it and make it appear as if the machine plays by itself! In the same way, Amazon's Mechanical Turk, distributes a computing task that requires AI to a huge pool of humans that carry it out. TagCow web site is the perfect example for that. TagCow tags images based on human classification. Anyone can participate and can make some 5-6$ a hour by tagging images and uploading his work to TagCow!

On the other hand Google has come late and a little messy. The Google App Engine (logo in photo) lets you build web applications and host them in the Google cloud. It is like having a huge cgi-bin at your disposal for you to build web applications and you only have to write the scripts. This is not bad for a 'Building Web Applications for Dummies' book but it is not for serious stuff.

First of all I don't like Python. Its creator works for Google and it is reasonable to be heavily sponsored, but still to my small eyes it is Yet Another Copy of Perl, basically taking advantage of Perl's inadequate support for OOP and as such I will never bother (again) learning it. Anyway, the most important part is Google's obsession with anything anti-Microsoft. This just ends up being ridiculous. I really couldn't watch more than 2 minutes the Google App Engine introductory video. Just for the semiology: He uses a Mac. He opens a plain text editor. He handwrites a number of commands, conventions and API definitions just to make a Hello-World web application to finally take pride in running a local server that displays the famous developer's message. Ok guys we get it: Microsoft sucks! So we should forget about IDE's, syntax highlighting, debug tools and Intellisense? Otherwise, show some respect to people's time because developing on text editor is great as long as it is people's choice. And one more: WYSIWYG is great as long as it is Perl!

On the other hand, Microsoft's counterpart although not so popular has been around for some years now. Microsoft's Popfly (with the silly duck-logo) enables developers to build much more complicated web apps in much less time. There are also rumors about Microsoft getting into cloud computing under the funny 'Red Dog' but I do not know much more details.

Anyway, this is only the beginning. I believe we will soon become witnesses of cloud computing to much more greater extent. The scalability that this offers gives great potentials to developers and it is really interesting to see what will be the next step to this process. Exciting developer times!

Sunday, April 6, 2008

Why The Array Index Should Start From 0

I recently came across an article from Dijkstra(photo) explaining a fact that looked obvious to me before: Why should start indexing an array from 0. I was amused to find out that there is some clever thinking behind this.

All popular languages, like C/C++, Java or Perl start indexing an array from 0 while the last index is the array length minus 1. While this is usual to most developers, it is not a de facto situation for all programming languages. For example in Fortran, when you declare an array with 'integer a(10)', aka an int array having 10 elements, the index starts from 1 and ends at 10 (however you can override this behavior using a statement like, integer a(0:9), declaring an array with indices from 0 to 9, but anyway).

The discussion over why the array index should start at zero is not a trivial one and relates to interesting concepts from computer science. First of all, it has strong relation to language design. For example in C, the name of an array is essentially a pointer, a reference to a memory location, and so the expression array[n] refers to a memory location n-elements away from the starting element. This means that the index is used as an offset. The first element of the array is exactly contained in the memory location that array refers (0 elements away), so it should be denoted as array[0]. Most programming languages have been designed this way, so indexing from 0 is pretty much inherent to the language.

However, Dijkstra explains why we should index from 0. This is a problem on how to denote a subsequence of natural numbers, say for example 1,2,3,...,10. We have four solutions available:
a. 0<i<11
b. 1
<=i<11
c. 0
<i<=10
d. 1
<=i<=10

Dijkstra argues that the proper notation should be able to denote naturally the two following cases:
1. The subsequence includes the smallest natural number, 0
2. The subsequence is empty


Requirement 1. leaves out a. and c. since they would have the form -1<i which uses a number not lying in the natural number set (Dijkstra says this is ugly). So we are left with b. and d. Now requirement 2. leaves out d. since for a set including 0 that is shrunk to the empty one, d. takes the form 0<=i<=-1, which is a little...well, messed up! Subtracting the ranges in b. we also get the sequence length, which is another plus. Hence we are left with b. which is by far the most widely used notation in programming now.

Now you know. So, remember and take pride in the fact that each time you write something like

for(i=0;i
<N;i++)
{
sum+= a[i];
}
you are not just following the rules of language notation. You are also promoting mathematical beauty!