Friday, April 25, 2008

OLPC may switch to Windows?

I read a news today on OLPC's XO notebook may use Windows. Is using Windows easier for both vendor and consumer?

Basically OLPC project is not very successful until now, because it was not able to deliver a good product for mass production, is still far far away from Nicholas Negroponte's dream, a USD100 notebook for the developing country. OLPC project is a great dream, to achieve it, is never been easy.

OLPC notebook should be portable, WiFi enable, low power consumption and is cheap, target price is USD100 for a notebook. Currently they are selling at USD188. The cost can be lower if you get the right vendor to manufacture it. Taiwanese can make it cheaper, OEM manufacturer like Asus, Quanta or Foxconn(Hon Hai Precision Industry) is capable to manufacture low cost electronic parts with high quality. Notebooks from Dell and HP, Apple's iPod are manufactured by these companies.

People can't wait to see the dream comes true, even hardware vendor can not wait. Intel can't wait, so Intel start selling Classmate PC, which is a low cost laptop mainly design for education purpose. Asus can't wait, recently Asus launch low cost 7" notebook EeePC 701, is very successful in the market. These companies who is good in hardware design, is going into the sub-notebook market.

OLPC have good hardware design too, OLPC's CTO Mary Lou Jepsen, invented an ultr-low cost display, which is readable under sunlight. Mary left OLPC on January 2008, other top executive in OLPC is leaving as well, like Ivan Krstic and Walter Bender. Walter is a great fan of open source, OLPC sweet talk with Microsoft should be the main reason for his departure.

Forget about the hardware and management, let's talk about software. People always think that Windows are easier to use than Linux, but things change these days. To cut down the cost of OLPC notebook, the free and open source Linux was chosen as the operating system software, Nicholas first in favor of using Red Hat Linux (may be he needs Red Hat's funding), but Red Hat Linux could be far too complicated, so Sugar Linux (base on Red Hat/Fedora) was created for OLPC.

Sugar Linux
Sugar Linux on OLPC's XO-1.
Originally uploaded by karindalziel

Linux are getting easier and easier to use, and there is a lot of choices other than Red Hat. As desktop PC, many of my friends commented that Ubuntu Linux is easier to use compare with Red Hat Linux. Asus EeePC's Linux is another good examples, EeePC's Linux is provided by Xandros. Xandros Linux is base on Corel Linux, acquired from Corel after Corel decided to left Linux market in year 2001. Corel Linux is base on Debian (yes, Ubuntu is base on Debian too). Corel build in an easy to use installer on it, is just as easy as like installing Windows (but too bad that I always encounter problem while installing Corel Linux). The Xandos Linux used in Asus EeePC is a tab base version, simpler and is easy to use.

EeePC Linux
Tab base Xandros Linux on EeePC.
Originally uploaded by Renegade Buddha

Linux is easy to use, if you don't believe, try the Linux on EeePC. OLPC may switch to Windows simply because Microsoft has a better marketing plan and Windows are more popular.

Thursday, April 24, 2008

Turbo Pascal on DosBox

Do you still remember the time?

There are at least 3 version of Turbo Pascal free for download (version 1, 3 and 5.5), I suggest to download Turbo Pascal 5.5.

Tutorial for Turbo Pascal 5.5.

1. download the software from here.
alternative download from http://altd.embarcadero.com/download/museum/tp55.zip

2. extracted the software, there are two directory DISK1 and DISK2, basically you just need DISK1.

3. run the software
> turbo

Turbo Pascal 5.5
Turbo Pascal running in DosBox for OS X PowerPC.


You can run the program direct from Windows terminal, if you are using Linux you can run it under a simulator. I am using the DosBox simulator.

You can download DosBox from sourceforge.

After running the DosBox, create the C drive by:
> mount C c:\tp55
or
> mount C /home/user/foo (unix system)
(the second parameter is your Turbo Pascal program path on your real hard disk)

4. Write your first pascal program, File, New.
Program hello(output);
begin
    writeln('hello world!');
end.

File, Save as, hello.pas.

Compile the program shows ok, but if you run the program, you don't see the result. Actually it display the result but it was clear once the program terminate.

5. Make some modification
Program hello(output);
var
    n: Integer;
begin
    writeln('hello world!');
    readln(n);
end.

Run:
hello world!
1
(input anything thing and just press enter)

6. Make it to executable
Alternatively you can make it into executable
a. from IDE
Menu, Compile, Destination (set to Disk)

b. from dos prompt
> tpc hello.pas
> dir hello.exe
hello.exe


Take a look at the executable, how small it is, just about 2k in size.

What's next? May be you can try to compile the Mario clone.

Legendary Turbo Pascal Compiler

Do you still remember the time?

Recently Borland stock price down to bottom as USD 1 plus.

Borland share price
Borland share price goes down.


Borland was co-founded by American technology entrepreneur Philippe Kahn in 1983 (or 1982?). Borland was once a top 10 software company in the 80s, famous for its compiler tools, most remarkable is Turbo Pascal compiler. Borland once change their name to Inprise but later change back to Borland. Philippe Kahn left Borland in 1995.

Turbo Pascal from Borland is one of the easy to use and fastest pascal compiler available on PC during the 80s. Turbo Pascal is an IDE (Integrated Development Environment, integrate editor, compiler and linker together) compiler, even though running on DOS as text base program, it was a break through, because its performance is fantastic even running on a 4.77Mhz IBM PC. While other compiler software was selling as USD one thousand to two thousand, Turbo Pascal was selling for only USD49.99 when it first release in 1984. Very quickly the software was sold over million of copies

Why Turbo Pascal can perform so well (especially on old 4.77Mhz IBM PC)?

1. It is small. As for Turbo Pascal version 5.5, the IDE and the compiler is about 200k to 300k. Software at that time is all very small in size.

2. Everything was done in memory. Normally before the program can be executed, it will be compile into an object (normally .o file), store on the disk. Then it will be link as executable file, before it can be executed and show the program result. Turbo Pascal compile and generated the executable code all in Ram, and didn't need to access to auxiliary storage (5.25" floppy disk), so it is very fast.

3. Optimized compiler core. Turbo Pascal creator Anders Hejlsberg, have spent a lot of effort in optimizing the compiler core. The compiler was written so well that it was still being used in the first three version of the later Delphi compiler.

Borland has release the earlier version of Turbo Pascal as free for use, you download from here.

Saturday, April 19, 2008

Google stock soars on profit reported

Google stock price just goes up almost one 100 USD (+20%), after the company report a 31% increase in profit for the first quarter. Is 540 now, wow!

Google stock price
Soar on profit report.


Saturday, April 12, 2008

To create or to inherit 1

Don't read this if you are not software developer., is boring

Programming is an art, like writing a novel or drawing a picture. You need creativity, but to create is difficult, so sometimes look at other developer's code, will improve your programming skills. Is nothing wrong to borrow some ideas from other software developers, just avoid copyright infringement.

Most software developers that I know, especially talented software developers with strong programming skills, hate to maintain or make improvement on other software developers' work. They always think that create their own code and program is easier that maintain and make improvement over others' code.

Create is more easy? How can it be? One of the main problem with today's software developer is, the codes are very badly written, and there is no developer guide documentation (so how do I start?). Sometimes I don't even find one line of comment in the code, and no proper indent for code block (eg. code in if (condition) { } block are not inline).

If you examine other programmer's coding, there are signatures inside the program. Everyone have their own style of coding.

An easy and simple example of coding style is, how you place your parenthesis ( '{' and '}' ) for condition block?

1.
if (condition)
{
    statement 1;
}

2.
if (condition)
    {
    statement 1;
    }

3.
if (condition) {
    statement ;
    }


There are more examples... and you can name it.

Which style do you prefer? Your style of coding will be your signature in the program even without putting your name in. So learn other programmers coding style, use it within the same program, so the program code looks consistent.

Another example of coding style is how you name the variable and functions. Like user_name, UserName, or userName? Normally naming convention will be stated in the developer guide. Some programming language will have their prefer way for naming convention, like Java's function and variable name always start with a capital letter for each word, except the first starting alphabet (eg. userName).

To maintain the original coding style, you have to make it look consistent, this is another difficulty to continue others work, or else the next developer after you, will drop all your hard work and create their own program as a start.

Netscape navigator codes are difficult to maintain, that's why there is a lot of bugs and problem after version 4. Netscape 5.0 has never been released, it was scraped and rewritten as Netscape 6, but a lot of users started to switch to IE browser during that time.

To create or just continue with existing code (in software development), both is not easy. To avoid the hard work source code scrap in the future, a good software developer should know how to create, to continue, and write code which is easy to be maintained.

Thursday, April 10, 2008

DiGi and EeePC promotion

Come on, DiGi, you can do better than this

My friend show me a DiGi data package promotion. There are two package, both are ASUS EeePC + data access plan, with slightly different. Let's look at the package, is it worth getting or not.

Package A
1. Data only SIM (RM66 x 24 mths) = RM1,584
2. WiFi (AirZed) server (24 mths) = RM2,232
3. Asus EeePC = RM1,599
4. Asus data modem T500 = RM1,199
Total RM6,614

Promotion price now RM2,952

Total savings RM3,622.

But unfortunately there is a lot of misleading information here.

EeePC selling at RM1299, not RM1599. If you have the budget and need a Windows version, you may consider Twinhead's E10 or HP Compaq 2133.

I don't know how they compute the WiFi charges, because if you subscribe to DiGi unlimited data access, WiFi access should be free.

The only thing you are getting extra is the T500 data modem (I am wandering how to connect to EeePC), some says you can get a data modem for RM400, but I am not so sure about that.

So is this a good deal? You don't really save much. Don't forget if you subscribe to the package, you tie up with the data access for two years.

For the WiFi access, there is a easier and better plan, even without subscribe to DiGi unlimited data access. With pay per use with DiGi, you can get a 1 day access for just RM3.

DiGi always came out with good package with flexible plan, like RM10 prepaid card, RM1 top up (for prepaid). Come on DiGi, you can do better than this.

CSS naked day 2008

Recently I was learning some javascript and CSS (Cascading Style Sheet). I accidentally found this CSS naked day website (http://naked.dustindiaz.com/). CSS naked day in on 9 April, the idea is to promote standard and plain html web page presentation, so remove all your CSS on this day.

Personally I don't like CSS, no doubt it is powerful, to master it is another story.

BTW, I found this image cropping script interesting. No flash or java applet needed.

Tuesday, April 08, 2008

Sun at Microsoft Server 2008 launch event

Sun is your Eco-friend

Just drop by at Microsoft event at Kuala Lumpur Convention Center during lunch time. Microsoft launch its Windows Server 2008, Visual Studio 2008 and SQL Server 2008.

I saw Sun Microsystems there, what is Sun doing in a Microsoft event? They are promoting their SUN X4150 Quad-Core x86 1U server, which run Solaris, Linux and Windows operating system. On such an event, they only mention Windows, they more emphasize on the server's compact design, 1U server but with 8 hard disk, power saving. So Sun is eco-friendly. I didn't follow up with server price recently, Sun says they are giving a promotion price for the server, RM8,888.00 for the basic model, limited quantity available, I think it is a very competitive price.

Sun also showing their blackbox project, which is a mobile datacenter installed in a standard cargo container. It is using a water cooling system which is eco-friendly as well. Not many people attended Sun's briefing session, they are giving out 2 16Gb iPod Touch to those who submitted the lucky draw form and attend the session. They have draw more than 10 forms to get a winner (most of the name called, but they were not there), one of they guy sitting right behind me, get 1 of the iPod Touch, he is really lucky.

Sun X4150 server is comparable with HP's hot selling DL380 G5 server.