Tuesday, February 23, 2010

Java Quiz: Array Initialization Answer

Its a difficult answer if you come from a Pascal (Delphi), C or C++ back ground where you had to initialize the array first with default values like 0 before using.

Java automatically initialize all elements in an array to default values, object references become null and primitive integers become 0.

This is in my SCJP exam studies, tricky since I come from a Pascal and C++ back ground.

In C/C++ you get some random data (whatever is in memory at that pointer address). So for them you need to initialize the array before use.

Monday, February 22, 2010

Java Quiz: Array Initialization

Is the following correct? What will the output be?
And PS: Try to figure it out before actually running the code :-)
public class BirthDays
static int [] year = new int[100];
public static void main(String [] args)
for(int i=0;i<100;i++)
System.out.println("year[" + i + "] = " + year[i]);

Please give your answer in the comments.

Thursday, February 11, 2010

Microsoft vs Apple War Continue: The iPad

After reading an artical about Bill Gates being unimpressed with the iPad, I see that the whole Microsoft is against anything that comes from Apple - the iPhone for example, they all focus only on there Windows Mobile phones (which got there own problems - more about that in later blog) , no iPod only there Zune device.

The war between Microsoft and Apple (or let me rather say Bill Gates and Steve Jobs) started in the 1980s, all the geeks know the story but let me repeat... Microsoft was doing DOS for IBM and Apple there Apple II etc machines (before the Mac) so it was Apple vs IBM, Apple then released the Mac - first operating system that got a graphics user interface (GUI) - they stole this idea from the Smalltalk system... Microsoft then wrote software (spreadsheets etc) for the Mac, later on Microsoft released Windows and that stole the market. So yeah, Steve jobs wasn't happy with Microsoft (Bill Gates) for steeling there GUI OS idea even if they stole it from the Smalltalk system... actually if you look at this story both of them are wrong.

Over years there was no love between them... Currently for example you need a Mac to write software for the iPhone/iPod Touch/iPad (known forth as the i-Devices) can't do it on a MS Windows machine.

Personally I see this as wrong... We are customers, we don't care about fights, bad feelings etc that companies got against each other... This if for example why Steve Jobs is wrong - his feelings is always in the way of his business judgement... customers are asking for Flash support on the i-Devices but no his got a thing against Adobe.

Give us what we ask for! Give us what we want! If you give us what we ask for / want without all this other crap (that is the only way of expressing it) then your product will grow and you will become more successful then the company X that you got a thing against.

Sunday, February 7, 2010

Blackberry True Push Email

With push email you get email delivered immediately on your phone just like an SMS, most phones say that they support push email but its not actually true push email... just like MS Outlook where all that they do is to check your mailbox every x minutes (like 5/10 minutes) so every time it does a simple send & receive.

The Blackberry support true push email using BIS (Blackberry Internet Services) you can setup email accounts (like your Gmail account) and it get pushed to your Blackberry - there is a lot of detail on how this works but I will not explain it here.

As in previous blog entry you can pay R59 per month (30 days) from your Vodacom airtime which give you unlimited internet access on your Blackberry meaning that you don't pay R2 per 1 MB for internet (3G/GPRS/EDGE) - push email, Facebook and browsing is free.

There are limits, you can't for example download huge emails, emails got a limit size as well etc. I suggest you check with your service provider (Vodacom, MTN) onthese limitations.

Also at work my phone is always on silent, the Blackberry got it nice where if there's a email a little red light flickers - very nice visible notification.

Thursday, February 4, 2010

My Blackberry Experience

Over last weekend I bought myself the Blackberry Curve 8520 smartphone, I always wanted to have a Blackberry since I heard its very good especially with email taken that I spend a lot of time on emails.

I didn't got the device on a contract but as a prepaid package, so I bought it cash together with a Vodacom prepaid SIM card.

With Vodacom you can signup for the Blackberry Internet Service by using your airtime, R59 for 30 days (subtracted from your airtime) gives you unlimited Internet access e.g. browsing, Facebook, Twitter and push email. Note that Skype (VOIP) or any form of streaming will cost you extra since that isn't part of the unlimited Internet package.

For push email you just register your email addresses on the Vodacom portal and get pure push email (I will blog about push email in the future).

For Facebook a little blue envelope will appear if someone sent you a message etc.

The Blackberry Curve uses GPRS/EDGE and Wifi unfortunately no 3G support but for me that is fine since I'm mostly in a office where there is Wifi and yes I'm one of those that don't use my phone while driving.

For me the most to get used to was the little keyboard, I came from my Samsung Omnia i900 and iPod Touch that got touch screens and all of a sudden need to get used to the little keyboard.

If your a developer, please fill in my poll: Do u want C#/VB.Net for Blackberry?