Thursday, September 24, 2009

Hey look, Now I AM different! Just like you!

So, I went and bought a Macbook Pro.

Yes, after everything I said previously, I am now a Mac user.

But I didn't do it to be cool. Or because Macs are any easier to use.

Here are some reasons why:

Instant sleep and resume. I can close the lid, and it sleeps.. for days! And when I open the lid, its on. Instantly. Every time. I've never seen a windows notebook do that.

Great battery life, without sacrificing performance. Is it 7 hours like they claim? I don't think so. But I still average 4 to 5 hours and thats way more than any windows notebook I've ever heard of.

Unix-ish. Its got a unix derivative (mach) core, which makes it great for a developer person like myself. I use the shell and I use ssh and other command line tools. And its rock solid. Are there any viruses that infect unix? I dont know of any. I am so sick and tired of constantly battling against virus infection on my pc's.

Amazing engineering. As a former engineer, I just appreciate the precision design and manufacturing. Its perfect.

I can run windows in a vm nearly seamlessly.

Installing apps is rarely more than just copying the file into the applications folder.

The expose feature as well as the 2,3 and 4 figure gesture features on the mousepad. Not to mention the huge mousepad.

The sucker just feels and looks good. And that makes me feel good. And that counts for something.

OK, so, here's what I don't like:

Finder: it sucks. To be fair, window's explorer also sucks. But you can replace it with Directory Opus, for which there is no MacOS equivalent. This is probably my single biggest complaint.

The dock: it also sucks. I like the Windows task manager.

There doesn't seem to be as much free software.

I don't like how almost everything is too simplistic, like you can't be trusted to mess with the finer adjustments and options. Then again, now I don't have to worry about all that. Sometimes I feel like the system is treating me like an idiot. But then I've got that nice shell and a unix kernel..

iTunes no longer syncs with my Palm Pre for no other reason than Apple sucks and doesn't want it to work. You know what, I don't give a flying f*ck about the USB consortium or who can use what USB id's and whatever bullshit reason they are giving. I have the right to sync my hardware and there is no technical reason for not being able to do so. Apple, take your head out of your ass. Palm: find another way, please.

So yeah, I am a Mac user now. But I will never have that smug, I'm better than you attitude just because I use a Mac. I have plenty of other reasons already...

Monday, July 6, 2009

Programming is like Cooking

I like to cook. And I like to program. I dont know if this is a common thing or not but I know at least one other person like myself. There must be something to it. Particularly because of the common phrase "spaghetti programing". And now I come to find that's not the only food analogy that's been coined. I've been missing out!

So, spaghetti code is what you'd expect: meandering code that loops in on itself and becomes a tangled unsortable mess.

But what about ravioli code? Well that's an analogy to object oriented programming, of course!

Then there's lasagna code. This is code that is structured into, you guessed it, layers! Each layer (or tier) is separated by a well defined interface (a noodle).

But the one I like best of all is the Spaghetti with Meatballs coding style. I see this a lot, especially with PHP programming. This is messy, tangled procedural code with a sprinkling of objects thrown in! Because like meatballs, objects make everything better!

Now I'm hungry. I think I want a meatball lasagna with raviolis on top. mmm.

Wednesday, July 1, 2009

I want to be different! (just like all the other different people)

Don't get me wrong. I really admire Apple and I think their computers and operating system are pretty cool. Maybe even superior in many ways. And their TV commercials are hilarious.

But I am really getting tired of being looked down on by the Elite Uber-Geeks who think anyone who doesn't use a Mac is a caveman.

And this is from someone who used to be Mr. Alternative Computer guy, in a way much worse than a Mac user (anybody remember Amiga?).

Granted, I do miss my Macbook Pro. I miss the near instant sleep mode and how it can stay in that mode for days before running out of juice. I miss the lighted keyboard at night. I miss how applications are installed just by copying them into the applications folder. And the physical design -- well its a marvel of engineering and design.

And Parallels comes close to making a Mac perfect.

But that's just not enough to make switching worthwhile. Not when a Mac costs so much more than comparable PC hardware (and much more than budget PC's). Not to mention there seems to be a lot less free software. You are apparently expected to be nickeled and dimed (the phrase should be adjusted to account for the premium prices all Apple stuff seems to command over the equivalent non Apple alternative..) for every little application you might want, however small and transient it may be (hello AppStore!).

Apple may be the only practical, real alternative to Windows (the hardware no longer is, since its just a PC in fancy clothes these days) for most people. But if you really want the alternative, something that's truly open and free, the real underdog of the computing world, try Linux or even one of the other really obscure OS's out there.

But if you just want to look like you are hip and alternative, get a Mac, and keep listening to KROQ. The rest of us will be using stuff that makes your Mac look like a bike with training wheels and listening to music that would probably make you cry.

Wednesday, May 6, 2009

Cheeseburger, fries, and a large orange drink...

PHP: its like fast food..

You know its bad for you...

You feel like crap after eating it...

But damnit, its right there, oh so conveniently located on the way to work, and sometimes a greasy cheeseburger just hits the spot, even though you know you'll pay for it later in heartburn and much later in high cholesterol and love handles, though right now its really cheap on the wallet.

Its a guilty pleasure.

And while you're sucking down that grease ball burger, you see the local soup and salad restaurant and think "next time, I'll eat right.."

But come the next day and you see that taco joint and...

Thursday, December 18, 2008

Egads! Monads!

There's a whole class of languages you may never have heard of, or at least, you don't know what makes them different. Most of us have been using the "practical", popular languages, like C or PHP or Java or Ruby etc. These are all "imperative" languages. IE, they are nothing more than a sequence of one "do this" after another. They are simple to understand, relatively. But there's a class of languages called "Functional languages". You might think, well, all languages have functions, right?

Imperative languages have a lot of limitations you may not be aware of. One obvious limit is that they are a sequence of actions that have to be run more or less in order. That's a problem when you've got a computer with 2 or 4 or more separate "cores", and you can't easily split that program into 2 or 4 or more separate parts to run at the same time. Another is error handling. Do you output an error? Does your function fail? Do you return an error value? And what about those unit tests you are supposed to be doing. How easy are those to do, when you have to set up a test situation for each function or method you want to test, trying to simulate what might actually exist when the program is really running? Or how about debugging, when you have to track down a problem and there are many places where data is changed and used and you don't know which of those are the problem, or if its something else you don't even remember?

A lot of the problems of imperative languages is due to the fact that their functions (and methods in OO programing) are not deterministic. IE, they do not act like the functions in mathematics. They take arguments and return a value, of course, but they can also do any number of things outside their own scope. Like output text for display. Or change a database record. Or flip a pixel on. Or send a signal down a wire that goes somewhere.. That means that you cannot call the function with the same arguments and expect to get the same result. You also cannot assume that the rest of your program or data hasn't changed. That makes testing hard, and debugging hard. And you have to constantly check for errors and decide if you can go on or not to the next function.

Functional languages do away with that because functions are not allowed to do anything other than return something. They are deterministic. You always know that with a certain input you will get the same output. That makes testing really easy. It also makes debugging much easier because you only have to follow the flow, and no need to worry about what might have been changed somewhere else not in that flow. It also makes it much easier to split a program up into different parts that can be run at the same time (or in a different order) because you can easily tell what functions are dependant on others (or not).

Of course, the only problem is, how the hell do you actually do anything if you can't input or output things? For that matter, how do you make sure things happen in the order you want them to (like outputting words in the right order for a grammatically correct sentence).

Monads!

Just to be annoying, stay tuned for the rest of my thought... as soon as I am finished thinking it..

Friday, August 29, 2008

[language du jour] ON [training wheels]

Seems like everybody's having a collective orgasm over frameworks like Ruby On Rails and all the countless knockoffs.

I certainly appreciate these systems, they are definitely filling a niche need and are bringing new ideas to the programming table.

The language du jour doesn't bother me. I like to study new languages and see where they can improve things. What bothers me is the near religious followers of each language, going around stating that their language is The Way to nirvana (which reminds me of the song I Am The Way by Loudon Wainright III).

And frameworks don't bother me either. Except for the same religious adherants as above.

Oh, and the fact that frameworks are so limiting. I suppose frameworks have to be, in order to do what they do. You are expected to work within what they've defined - using their design patterns (almost universally using MVC, etc), class heirarchies, etc. The Rails monicker makes sense, because it is pretty rigid.

But I don't want rails. I don't want the programming equivalent of training wheels (which metaforicaly speaking would be better than being on rails..). Because what happens when you grow beyond the training wheels?

I want tools so I can easily build my own vehicle with my own kind of wheels on my own kind of travel surface.

Actually I am thinking something less like rails and wheels, and more like an amphibious multi-legged critter with a jet pack.

Not sure what that is, though, in language terms...

Thursday, July 10, 2008

You young whipper snappers...

You know, I'm really getting tired of the generation of kids today who think they're on to something new with their cutesy abbreviated asynchronous stateless communication methods.

Yes, I am talking about you.

The one with the cell phone tapping out messages in T9 text.

You didn't really think you invented the (or any variation of the) "emoticon", did you?

Maybe you think you are something big because of news stories about how you communicate?

Well, you're not. I have half a mind to beat you over the head with this here 300 baud modem...

You see, back before you were born, even before most of your parents were even able to have a chance at getting laid, we were inventing this stuff.

No, we didn't have computers in our pockets. Back in those days, our computers sat on top of desks, or took up whole cabinets. And our screens were these huge things called CRT's, only we usually called them monitors since there was only one kind. And instead of the internet, we had modems and phone hookups.

We did have that in common, I suppose.. the phone. We weren't limited by tiny keyboards and tiny screens, and we weren't mobile and in a hurry all the time. But we did have to deal with our modems, which were slow. They were measured in 'baud' which came in quantities as small as a few hundred. It took quite a few of them to encode a single letter. It was so slow that most people could read it as fast or faster than it came in.

So we invented abbreviations. We invented "smilies" to denote general disposition... happy, sad, angry, etc. These are the things you call "emoticons" today. We didn't even have icons on our computers at the time. Just text. Sometimes in just one color. Yeah! I know, its hard to imagine.

I remember at the time some people even thinking that we were going to be somehow all emotionally and socially stunted or at least totally disconnected from the rest of society. Granted some of us were (are). But that's no different than the dumb football jock that never grows up and never learns how to be socialy acceptable outside of a group of beer bonging idiots (and I am sure this is the exception among people in sports, as is the uber-nerd that can't get laid to save his life).

But here we are, all grown up. Some of us are billionaires (can you say Bill Gates or Steve Jobs?). Some of us are just relatively normalish folk with normal kids and lives.

So you young whipper snappers out there... don't be so full of yourselves. And don't worry about the old folks who worry about you rotting your brains with texting and mobile video watching. Sure, you are probably letting your brains lay fallow while you f*ck around with technology. But eventualy, out of that, a few of you are going to get your shit together and actually invent something that your kids will take to some extreme level which will cause you to wonder if your kids are going to turn out ok.

Ah, sweet, sweet payback... I can't wait.