Thursday, January 6, 2011

My Mac experience: Awesome, and occasionally awesomely frustrating.

I mentioned in my last post that I replaced my old (extra crispy) PC with a Mac. I've been using it pretty heavily for more than a week now, and wanted to post some of my initial impressions. Just FYI: I'm fairly new to this whole Apple thing, so some of my comments may be the result of ignorance on my part. If they are, feel free to correct me. (Note: "You just don't get it, it's better that way!" is NOT a valid form of correction.)

The great:

  • Out of box experience is FANTASTIC. Plug it in, turn it on. Done. Windows is physically incapable of providing an experience like this (though that's not always a bad thing. More on that later.)
  • NO CRAPWARE! The things that come pre-installed (iMovie, Garage Band, etc) are actually full, useable programs that I want to keep! What a concept! 
  • I love the program installation model. 90% of apps are "Drag into folder to install, drag to trash to uninstall." Beautiful! And it's only possible because...
  • No registry! I know that this can have it's downsides (the windows registry does address some issues) but most of the time it's just a badly maintained disaster waiting to happen.
  • Everything is... shiny! It's silly, but all those smooth little transitions make more of an impact than you know. Apple seem to be the only software company that really, truly appreciates how much a slick UI matters.
  • It's silent! At first I was upset by how load the magic mouse was dragging across my desk, but when I switched back to my G500 I realized that it was just as loud. The problem was, apparently, that this was the first time I could actually hear my mouse movements over the cooling fans. Wow. The loudest part of my computer now is the external hard drive.
  • Drivers, or lack thereof. I plugged in my printer and it just worked (didn't even tell me it was "Installing new hardware."), same goes for pretty much everything else. The most surprising so far: NO additional drivers needed to sync, develop for, and debug on my Android phone! There was one notable exception, which I'll mention in a bit.
  • I can actually let my computer go to sleep now and not have to worry that it may not wake up again. That's really REALLY nice.
The quirky (things that are weird to a newbie, but not necessarily "bad"):
  • It kinda weirds me out how programs don't actually "close" when I hit that little X in the corner. Well, most of the time, anyway. Some programs do. The inconsistency takes a bit to get used to.
  • All those little shortcut symbols used in the menus are greek to a new user. Command is easy to figure out (the same symbol is on the keyboard), and Shift can be guessed with a bit of thought, but that Option symbol is terrible. I only figured it out through careful experimentation. Same goes for Escape and Control.
  • The mouse ballistics feel all wrong to me. I simply can't get them to a comfortable point. Not to mention that the highest mouse movement speed is way too slow using the magic mouse. I'm glad I can crank it up with my G500.
  • Dual screen use is odd. It works okay, but to have the menu for all windows stuck on the main screen is inconvenient at best.
  • My nice 5.1 speaker system is useless now, since it was the "3 analog jack" type. (Yes, you can get converters. For the price you may as well get new speakers, though.) Not really Apple's problem, since they provide an optical out. Makes me sad though.
  • Had to buy a DisplayPort to VGA adapter after finding out that the DVI port on my old monitor apparently wasn't the right kind of DVI, rendering my DisplayPort to DVI converter useless. More ViewSonic's fault than Apples, but annoying nonetheless.
  • The magic mouse served to very quickly remind me of how much I depend on the middle mouse button (wheel click). It's annoying that there's no way to simulate that with some gesture. (Three finger click? I don't know.) I want to love the magic mouse, but I can't use it without going crazy due to this.
The maddening:
  • The hardware is limited and expensive. As a graphics developer and a gamer I was forced to buy the second tier of iMac hardware JUST to get a decent graphics card. I love the computer, don't get me wrong, but there's no question that it cost more than an equivalent PC (sorry, it does. You can't convince me otherwise) and that the choices are very slim. I would LOVE the ability to get a 3Ghz machine with the 5670 GPU, but I can't. I know this is part of what allows Apple to make such a stable OS and machine, but it doesn't stop it from being a major frustration. As much as Windows gets dinged for compatibility issues, the fact that they don't have such an iron grip on the hardware they are compatible with means that ANYONE can find a Windows machine that suits their needs. The same cannot be said about Apple hardware. (Nope, not even if you consider the Mac Mini.) 
  • Finder is painfully primitive compared to Windows Explorer. There's some nice touches (like playing music files directly from the thumbnail) but way too many omissions: There's no obvious way to go up to your parent folder (had to look up a keyboard shortcut). Opening an image in Preview doesn't let you navigate between any other images in the same folder. No built in way to open a terminal window from your current folder. No way to manually enter a file path. No "New file here" option. Oh, and to rename a file you press "Enter" but to open it you press "Command+O"? Really? I'm sorry, but that's just stupid.
  • What, exactly, is that stupid little green "+" in the corner supposed to do? SOMETIMES, if I'm lucky, it maximizes a window like I wanted. Other times (like in Google Chrome! Augh!) it just makes the window "a little bigger" (for seemingly random values of bigger). Is it really that weird to want a consistent method for making my window fill my screen? Oh, and on the subject of resizing...
  • Sorry guys, but the lower right corner just ain't cutting it for me. There's really no reason why I shouldn't be able to grab ANY side or corner of the window and stretch it out. Yes, Windows did it first, but that doesn't mean it was a bad idea. Suck it up, admit they did it right, and make all of our lives a little easier.
  • With all the peripherals that just works, the fact that I had to go pull a random driver built by a hobby developer off of Google Code to get my XBox 360 gamepad to work at all was a massive disappointment. I know that it's Microsoft's product, and I know that Apple isn't a big fan of games, but after everything else worked flawlessly this was a huge let down, and there's really not much excuse for it.
  • The fanboys. There's a reason why people dub it "the cult of Mac." You guys are worse than the Linux zealots out there sometimes! I'm sure that someone out there is reading this post right now and preparing to explain to me in great detail why all of the flaws I listed above are defects in ME, not OSX. You know what: I just don't care. If I'm fighting with the machine to get it to do what I need it to, it has failed. Windows failed a lot. OSX fails less, but it still fails, and it's all the more annoying because of how much they managed to get right.
Despite all my gripes however (and I didn't even list them all here) the fact remains that the thought of booting into my Windows partition now makes me cringe. I still work with Windows at my job every day, and I don't have a problem with that, but when I'm at home I stay in OSX as much as possible. Even with some real head-scratchers in the design department it blows away anything Microsoft has to offer. I love my Mac, and I'm glad I made the switch.

Now can someone give me a working "Maximize" button?

Saturday, January 1, 2011

Back up your data! Now!

So, wow... this has been a crazy last week for me. I managed to luck into having the entire week off of work, so I was looking forward to a nice break that I could spend working on my game project (which I mentioned a couple of posts back) to try and get it ready for the Mozilla Game On competition.

[Quick side note here: Apparently Mozilla decided to go and drop WebSocket support in Firefox 4 due to security concerns with untrustworthy proxies, something which I utterly fail to understand as being a WebSocket concern. If your proxy is lying to you, aren't you pretty much screwed anyway? Whatever the reason, though, that put a serious cramp in my entry as is because I relied heavily on WebSockets to get performance that didn't, you know, suck. I was rather annoyed about the whole thing, but that's not much of a concern for me now...]

Before I jumped into my little coding spree, however, I did a little post-Christmas shopping with some gift cards I received. I used one of these to purchase a new hard drive, since I was running a bit low on space on one of mine. Took the new drive home that night, plugged it in (SATA, so the plugging part was ridiculously simple) and flipped the computer on...

...and all hell broke loose.

Monday, December 20, 2010

Tron: Legacy (super short!) review-ish

Just got back from Tron: Legacy. It was, well, Tron. Very pretty with a very silly back story. I enjoyed it, but more for geek factor than anything else.

There was one MAJOR letdown though, and that's that the film makers had the chance to include the most epic XKCD inside joke EVER and they totally blew it! Shame on you!

Wednesday, November 17, 2010

I'm not dead yet!

Just wanted to drop in and leave a quick note to say that I haven't abandoned the blog, and I actually have a fun little project under way! Unfortunately I don't want to talk about it much at the moment, since I feel like this is something that could actually be marketable (probably via the Apple App store/Android Market). I'm also considering submitting it in it's web-based form to the Mozilla Game On competition. But that depends on how quickly and how well I can polish it up.

In any case, it is a game and I'm developing/prototyping it using HTML 5 tech like Canvas (no WebGL this time around, sorry!), Audio tags, and WebSockets. Great fodder for blog posts, but once again I would very much like to have a more complete version before I go chatting it up. Expect some updates in the next few weeks though! Even if I'm not talking about the game itself I'll probably want to talk about my experiences with the HTML 5 stuff. (I feel a rage post about the Audio tag brewing as we speak...)

Till then!

Tuesday, October 19, 2010

"The Social Network" Review-ish

So I had a chance to see "The Social Network" the other day. I'll admit that it wasn't a movie that I was really intent on seeing but a Hollywood blockbuster about (of all things) a programmer/website struck me as an odd little beast, so I was somewhat intrigued.

Now that I've seen it I think that It's probably worth at least one viewing by every individual who has ever built a piece of software. That's not because I really liked the movie, though. True, I found it to be an entertaining (albeit highly fictionalized) tale, and the actors do an admirable job portraying their overblown characters. I wasn't a big fan of the way they tried to portray the whole thing as this wild "sex, drugs, and rock and roll" lifestyle, though. I'm sure that there are programmers out there who live like that, or at least want to, but that's a pretty big disconnect from most of the developers I know. To me that whole aspect of the movie felt heavy handed and overdone and as a result it was probably a one-time viewing for me. So while I thought it was a good flick it certainly wasn't my favorite. (I'd easily go see Inception 3 more times before before bothering with this one again).

Anyway, the thing that really struck me about the movie, the thing I think is important about it, is that it is the first movie that I have EVER seen that actually portrays programming/hacking/development almost completely accurately. There's a fascinating monolog at the beginning of the show in which Zuckerberg (the screen version, anyway) narrates some of the steps he's going through to collect pictures for a prank website that he's building. It's a fairly lengthy scene, and shockingly doesn't try to gloss over the technical bits. It's packed with terms like "apache server" and "wget" and "bash shell" and all sorts of authentication odds and ends, and every single one of them is used in the correct context! This type of portrayal continues throughout the movie: Every single computer screen displays real OSes, real sites, and real code running on real hardware (the OSes are even date-appropriate!) They talk about real languages and real algorithms and generally act like real programmers. What a concept!

Of course, a lot of this is just incidental stuff and most of it is done rapidly enough that audience members who don't know their Perl from their Python will simply pass it off as techno-babble and still be able to focus on the story. But for an industry that has long portrayed "hackers" as semi-mystical beings who mash random keys while staring at psychedelic screens and suddenly have access to anything the very grounded and realistic approach taken here is very surprising and refreshing. It's worth a viewing if only for that: to bear witness to the day that Hollywood recognized that programmers were real people.

One final recommendation for the show: The soundtrack is great, and makes for (ironically) great music to code by. But, hey! It's Trent Reznor! Would you honestly expect anything else?

Wednesday, September 29, 2010

Itty Bitty WebGL

File this one under "Cool but useless"

I stumbled across js1k.com yesterday and was quite amused by the concept: Use 1024 bytes or less of javascript in a minimalistic shell page to create a cool demo. The contest is over now, and browsing through the winning entries is surprising and somewhat awe inspiring. They managed to get a full Chess AI and graphics in 1k of javascript?!? Awesome! It also got me thinking: None of the demos used WebGL (primarily for compatibility reasons. The rules state that demos must work in Safari, Chrome, Firefox, and Opera), but were the standard further along, how much COULD you do with a 1k WebGL app? I decided to find out!

Friday, September 24, 2010

Raytracing in Javascript

So I've been pretty quiet lately, but not for lack of activity on my part. I'm in one of those funny stages right now where I've got about a thousand ideas I want to try and things I want to learn and not enough time to pull any of them off properly. So I experiment, whip up several dozen cool little proof-of-concept programs, and move on to the next idea. This kind of "brain dump into code" mode is pretty fun, but has the severe downside that none of your projects reach a point where their worth actually showing to anyone else. Recognizing that my blog has been sorely neglected as of late I determined that I would bring at least ONE of my playthings to a semi-showable state and post it, and it so happens that my raytracer was the closest to being presentable. :)


Yes, it's a browser demo (but not a WebGL one, sorry!) It's a Monte Carlo tracer, which means that the image starts out really ugly and gets better as more passes are applied. (Let it sit longer and it becomes prettier.) The image above is the result of letting it sit for 400 passes, and even then you can see a fair bit of noise. It's a very slow way of going about it, but it can produce spectacular results under the right conditions (and, you know, when you're not relying on Javascript to do it...)

Okay, so admittedly this is probably the least impressive demo I've done so far. It's your standard old boring Cornell box, and not even a really cool one at that because it lacks a refractive (glass) sphere. (More on that in a bit). There's a whole bunch of things "wrong" with it, and I may be tempted to come back and update it at some point, but the point of the thing was that I wanted to learn more about raytracing, and this little guy has served that purpose admirably.

A few fun "techy" notes: This started life as a Python port of smallpt, which I eventually gave up on when I realized that the GIL makes threading for this type of thing pretty useless. So I ported my port to Javascript (wait, aren't we moving backwards here?) mostly so I could use Web Workers, but it has a nice side effect of letting me demo it online. :)

The demo uses 4 web workers (though it's super easy to scale to more or less), each of which renders their own jittered version of the full scene. All passes are then send back to the main thread and composited into the final image. I'm actually passing the image data back and forth in an ImageData object, which means that some browsers may not support this yet. It also means that there's the potential for some pretty severe precision loss, since all of the color values are compressed into a 0-255 range, sent to the main thread, and blended with the main image, which does another 0-255 compression. It would be far better to store and composite all of the color components as floats (or doubles, but Javascript doesn't give you the option. It falls somewhere in between), and copy those values over to the image after compositing. I tried this at one point, but the Web Workers kept dying and spitting out a strange "Not enough arguments" message. This is apparently a Chrome bug, but I have no idea how to get around it.

I also eventually dropped the idea of having a refractive sphere, simply because after many MANY iterations I still end up with either a black ball or a clear ball with an ugly black ring around the edges. You can still see the material class for it in the worker script, and if anyone wants to point out where I'm being stupid be my guest!

Anyway, as unimpressive as it is I did have a lot of fun putting this together, and hopefully someone out there at least finds it mildly interesting! For now, though I'm moving on to my next project, which may or may not be any one of the following: (haven't decided yet)

  • A WebGL accelerated version of this demo, to compare speeds
  • A SketchUp to JSON exporter for quick prototyping of WebGL scenes
  • An OpenGL ES 2.0 demo on Android (very tempting)
  • A WebGL Material system
  • Or possible something completely different! I have a bit of an itch to do something non-graphical for a bit, just to shake things up.
I've also got a couple of blog entries I want to do about some subjects I've found interesting lately, so hopefully there won't be as long of a gap before my next post.