Sunday, December 14, 2008

Long live XP

XP, the OS that won't quit... I guess.

That's amazing, Dell is now charging $150 in addition to the cost of Windows Vista to put the older, Windows XP, on your computer.  Lets look at this from another perspective, to buy Windows Vista in the "home premium" edition costs about $100 from Amazon.  This is the first OS where the "upgrade" to the older version costs more than the newer version!

If you're still not convinced that Dell and everyone else in the PC world is robbing you blind, lets look at it by comparison to other operating systems on the market.  

Linux = Free
Enterprise Linux = $80 (RedHat Desktop), $50 (SuSe Enterprise Desktop)
Apple Mac OS X = $129

So in order to "downgrade" to XP, it costs you more than the new Mac OS.  And for those people who continue to think that Macs cost more than PCs, I'm pretty sure an extra $150 for an OS that works should convince a few people that the price differential isn't really that big.
Or, the XP downgrade costs you 2.5-3 licenses of a major Linux (enterprise) distro (comes with phone support and free upgrades as you'd expect of Windows). Now someone will complain that Linux doesn't do everything Windows does.  They will likely be playing video games.  So what else will $150 buy you?  A PlayStation 2 with Rock Band, or a PS2 with just about any other game.  It's 3/4 the cost of a new XBox 360 Arcade ($199) with two games.  Go play those games.   Or put the $150 towards a PS3 or buying your own Arcade...

In other modern terms, the downgrade will cost you roughly 10 DVDs, or 19 movie tickets, 1 night at Disney World's "moderate resort", or nearly 100 gallons of gas.  That is absolutely absurd!  Look people, Windows 7 is going to look a lot like Vista.  It's going to be roughly the same speed as Vista.  If you're holding out for Windows 7, you're going to be holding out for Windows 8.  Go ahead and give a Mac or Linux a try and save yourself $150 while you wait 9 months for when Microsoft thinks it might ship Windows 7.

Tuesday, December 02, 2008

The things you learn...

Every programmer learns how to pass things by reference. Arguably, most of us learn how to pass pointers back and forth. The trick is, remembering how to do it when you haven't tried in a long time! For instance, I tried to pass "by reference" in Objective-C the other day and got a nice error. Turns out, you have to do it c-style with pointers and addresses... or you can change the compiler to objective-c++ and continue to do by reference. In either case, the program is below with the output after that.

void myfunc2( int &a, int &b ) //c++ by reference;
{
a = a + 2;
b = b + 6;
NSLog(@"a: %i, b: %i", a, b );
}

void myfunct( int *a, int *b ) //c passing pointers
{
*a = *a + 1;
*b = *a + 2;
NSLog(@"a: %i, b: %i", *a, *b );
}

int main (int argc, const char * argv[])
{

int one, two;
one = two = 3;

NSLog(@"one: %i, two: %i", one, two );

myfunct(&one, &two); //c-style way of doing things

NSLog(@"one: %i, two: %i", one, two );

myfunc2( one, two ); //c++ style way of doing things

NSLog(@"one: %i, two: %i", one, two );

return 0;
}

OUTPUT:
[Session started at 2008-12-02 16:06:12 -0600.]
2008-12-02 16:06:12.513 test[4872:10b] one: 3, two: 3
2008-12-02 16:06:12.517 test[4872:10b] a: 4, b: 6
2008-12-02 16:06:12.518 test[4872:10b] one: 4, two: 6
2008-12-02 16:06:12.519 test[4872:10b] a: 6, b: 12
2008-12-02 16:06:12.520 test[4872:10b] one: 6, two: 12

The Debugger has exited with status 0.