Ahead of my own time…sigh…

So. Anyone read slashdot? They have a nice little article about various little webOS’es out there. Isn’t that nice?

Fucking hell. I did that already, like 3 years ago. Before we had XMLHttpRequests, and had to do everything in iframes.

And it was more OS’ey, too. Most of these all seem to work under the premise of centrally distributed applications – mine was an OS ‘center’ that reached out (redirected the user) to application servers.

So it’s depressing. They’re all getting the press. I had this stuff done, oh, I don’t even remember when…well, according to Sourceforge – 2002.

It’s too bad, too – I had some …well, let’s not call them decent. Shitty. Applications. But they did more than the ‘ajaxey clock!’ and other crap I’m seeing. ew.

I had a file system, goddamit! and an API!

Now I feel old.

Some of that old-time Religion

I’m sick and fucking tired of people saying “Waaaah! Technology X sucks! No one should use it! it’s bad! Bleeeeeh!” or “Everyone needs to use technology Y – everything else is obsolete!”

It’s a whole bunch of garbage. Whatever works is whatever works.

There are people out there who complain that nothing works and everythign is broken. And there are other people who use the ‘broken’ things to just get their work done. Broken is relative.

Standards are nice. But a stupid standard does not mean that people should stupidly follow it.

MySQL is one of the usual things that gets caught in the crossfire. “MySQL is nothing more than a SQL interface to a File System!!!!” Egads! Is it true?! Perish the thought! First off – where do you keep your files? Unless you are inhaling glue from paper bags, it is most likely in a file system. So don’t underestimate a file system for holding onto files. Which is data. Which is kinda what a database does. Second off – licensing – and this one is annoying because of the hypocrisy – people freak out about it being under GPL. “Oh no! if it’s under GPL then my code will have to be under GPL!” In all likelyhood, unless you’re linking directly to it, no, it won’t. But if it did – that’s what the GPL does – what’s wrong iwth that!? Oh. You want to _sell_ your product and hide or not distribute your source code? Well, sounds to me like you should get a commercial license! That’s precisely what you’d have to do with any commercial product. But I guess the only real product we’re implicitly comparing ourselves to is good ole PostgreSQL.

PostgreSQL is a seriously underappreciated database. It’s easy, it’s small, it’s super-duper flexible. You can put in triggers and constraints and stored procedures and all the crazy crap you could dream of. I have assembled queries which any real practical human being would shoot me for, and thrown them at Postgres, and it will tell me the answer eventually. I’ve worked on several projects, and PostgreSQL is usually my first choice of database to start with. However – it’s slow. or it can be. replication is done as an external project. I couldn’t make it run – but I was on a funny platform, OpenBSD. But either way, I don’t like nor trust that replication solution. Another ‘however’, however, is that Postgres has a great license – BSD. So will I use Postgres again? Absolutely. It’s a great database.

Another tech guy I respect a lot is a big Postgres fan. He’s no religious nut, but he did bring in a DB guy to help him tune his Postgres install. Since I’ve been pestering my buddy to at least look at MySQL for his reporting or analysis purposes, he asked his DB guy, “Why’s MySQL so fast?” And this guys answer – “it estimates.” No, not true. MySQL kills babies. That’s why it’s fast. And it causes tiny electric shocks to your privates. C’mon. Can’t someone say “I don’t know?” Or even, “No, it’s not fast.” Or, maybe, something that was actually true – “If you use MyISAM tables and have enough write queries, you’ll end up locking that table most of the time, and your reads will bunch up behind it and you’ll have a big giant mess. PostgreSQL, because of its transactional nature, default row-level locking, etc, will never do that. Unless you explicitly or implicitly lock the table – change schema, drop/add indices, etc. But for read-heavy querying, MySQL is stupid-fast.”

I’ve used Commercial databases – Sybase in my case. I liked it too. Again, a whole other set of pros and cons to evaluate.

Now if someone held a gun to my head and said, “Okay, tell me which database is BEST” I would have to answer none. They all work well in different environments. They all have their own quirks. they’re all different. Use one in one circumstance, one in another.

But I guess, in our computery world, sometimes people start placing their identity in their tools. And they start advocating one thing over another for no good reason. Well, not for no good reason – I presume it’s because they truly believe what they’re saying.

Let’s see, where else do people go nuts on this – the DB one is pretty nasty – oh, computing platforms. Mac vs. Windows, Linux vs. Windows, Solaris vs. Linux, etc, etc, etc. I once told someone, “I don’t care if it runs on an Amiga, as long as it’s supported, it’s stable, and it does what we want it to.” No offense intended towards the Amiga people. Hell, even Gentoo vs. Red Hat vs. Debian probably causes some flamewars. I don’t see how you can pin your self-esteem to these things.

I know my bias – I can see it rearing its ugly head, when I’m doing some preliminiary evaluation of some server hardware I’m interested in for us here at Volchok. There’s these new CPU’s that Sun is using in these neat new 1 and 2U boxes…they run 32 some odd threads of execution, these weird multi-multi core cpu’s…

Now let’s evaluate what I know and what I don’t know here. #1. Linux is good and cheap. #2. x86 is the volume platform of choice. It’s an ugly instruction set, but it’s fast and used extensively and flexible. #3 Solaris may or may not be free. #4 Sun hardware costs more than other people’s hardware. #5 Solaris is good, old, reliable software, but it’s a touch clunky unless you spend some time getting used to it.

The right choice (if a server is to be purchased at all) is probably Red Hat Enterprise on x86 boxen (probably Opteron). But I keep wanting to find some way of convincing myself that the T1000 (gotta love the name!) is a Good Purchase for us. The Application Containers/Zones/whatever the fuck they’re calling it thing, maybe that makes sense…the fact that it would be used as a webserver implies the multiple cpu’s might be nice…but really, who am I kidding. I want the neat new Shiny. I read benchmarks for everything, they’re good. But not good enough to justify the ‘weirdness factor’ and the price. I will keep at it, but eventually I figure I’m going to lose out and have to buy the conventional box. Feh.

Anyways, my rather rambling point is – use whatever gets the job done. Don’t be biased, if you can avoid it. Recognize your experiences as just your experiences, not everyone’s. Although don’t discount them. Bring in whatever technology that gets the job done – but realize the majority of your spending is going to be maintenance of the damned thing. So if you have to buy an expensive admin to keep your doodad running, you’re undoing whatever you’re saving on the thing in the first place (that’s another oblique stab at your brilliant Sun box purchase idea, Brady. No Shiny for you.) What you know, personally, and what you know, institutionally, is definitely what you can support – possibly one of the reasons why my friend shouldn’t use MySQL.

DS Notes

Battery life – commute in and out (2 hrs), plus a full commute ‘in’…(already it’s a touch better than the PSP)…

Edit – and a full commute out, and now another full commute in (though the battery light is red, so I’m afraid to go on any hard missions for fear I’ll lose my progress!)

So that would be more than twice as good as the PSP.

But I have to say, I think Nintendo overshot the mark. You don’t need that level of battery life – do you?

And I feel like the PSP has the right ‘mindset’ in terms of its simplicity – a ‘brick’ form-factor, single screen, conventional controls, easy to port PS/2 games (similar hardware I think)…

But I don’t know. Those load times are terrible. The PSP is losing shelf space (well, for the movies, at least). The DS has the buzz – and the new DS Lite which looks like it’s very pretty.

Edit 2 Okay, I finally ran the DS out of juice. Here’s the final results:

PSP: 1 full commute (in-n-out) + 1 commute in (running out of power right before my station, in fact, but that’s close enough). That equates to –

PSP: 3 hours, approx

DS: 2 full commutes (in-n-out, in-n-out) + 1 commute in (the light was red during the last half of this), and another 15 or 20 minutes on top of that (enough to get me another Octolith in Metroid Prime!).

DS: 5 hours, approx

Luckily I had saved before it actually ran out of power. But I was in the middle of running around on a board. See what I do for you, my dear two readers?

Metroid Prime: Hunters

Okay. Here’s my review.

The controls are indeed fantastic. I said this before so I won’t belabor the point.

The universe seems a little small – as of halfway through the game, it looks like there are 8 octoliths, and you have to get 2 on each planet, there seem to be 4 planets, and I think I’ve found where the Big Bad Final Boss is going to be. On each planet, one octolith is hard to get to, one’s more straightforward. Super-nifty new guns will open doors in hard to reach areas which will lead you to the aforementioned second octolith.

There are little annoying things like in every game. The small sections of jumpey-jumpey are annoying, but not so frequent or obnoxious as to ruin the game. There’s one section of it I just passed through now which is really nerve wracking – I keep joking to myself, I’m going to throw up. But it’s not too hard or anything, and it’s very atmospheric and cool. But it is still jumpey-jumpey, and I still find that annoying.

Why, oh why, did someone think that it was a good idea to have, after every boss you beat, a thing where you have to run back to your ship? I know it’s a Metroid Standard Thing, but still, that’s really annoying. Maybe on the last guy, it would be good. Or maybe on your second run-through on a planet (for the second octolith), then they could blow it up at the end, that would be exciting. But no, you have to rush back to your ship, and then you just ‘die’ if you don’t get there in time. No explosion. And if you do get there in time, you don’t quickly escape the explosion, cuz there’s no explosion. You don’t even have to leave the planet. This is stupid. And there are enemies who you must defeat to unlock doors – on the way back. So you’re rushing to your ship, the planet is going to…well, it’s not going to explode, but it’s going to somehow magically make you die. So you’re rushing, and then there’s some enemy there. Well, first instinct – dodge the enemy, press on. But the door is locked until he’s dead. Lame. The section starts to feature some of my least-favorite videogame annoyances – attrition, also, becomes a factor, lose a second here and a second there and you die at the end. Must execute very well. Also, get shot up here and shot up there, and without time to find healey-things, you will find yourself dead too. Edit YOU FUCKING MOTHERFUCKER! I’ll FUCKING KILL YOU! One of my runs-back has – jumpey-jumpey, leading to boolean death on failure. I several times tried to jump but instead hit the chunk of the screen dedicated to ‘change weapons’. That really sucks. During the regular course of the game, it happens, but isn’t as destructive. You’ve got to bust through the enemies – and luck through it – if you happen to get a tougher load-out of baddies on your way back (it seems randomized somehow?), then you’re fucked. I had to do this thing like 4 or 5 times. Really obnoxious. And that whole time, I can’t go check out another world and try this again at some point later when I’ve cooled down – I can’t even quit this game and play another. I’m stuck in ‘checkpoint but not saved’ mode. DIE!

Sometimes running into the same or similar baddies over and over can get a little tiresome – but this is a fun, fast shooter, and the enemies act much like real people would – jumping, running around, etc.

I’m liking the puzzles thus far. No like Myst level puzzles or anything, but you’re nut just running around blowing shit up all day.

And the savepoints feel too sparse – sometimes you get locked into running the game for a long time, because you’re somewhere good but there’s no savepoints. It means you can’t let the game run out of power, and you can’t play any other game. And it’s not like I have too small a chunk of time to play in – an hour commute, I’ve got.

One Booleanized Death section of the game is called ‘piston cave’. I hated that level. roll the ball around, fuck up and die. then do it again. and again. And again. I hated that. But the stylus for controlling the little Metroid ball thing was pretty powerful – I could make to run forward and stop on a dime, in a tiny space in between two sets of smashey things.

The multiplayer featureset has been reviewed extensively before (Slashdot I believe), and I haven’t tried it yet, so I won’t mention it further here.

I should also say – I hate everything, and everyone, and my mommy always told me that I focus too much on the negative. Try not to take that way from this review – Metroid is a good game, it’s exciting, you will find yourself gritting your teeth through tougher sections, picking up new weapons is always a thrill – and when you get killed you will be mouthing obscenties on the subway (or wherever) and hoping no one is looking. This game has really annoying things like any other. But most of the annoyances seem to be concentrated in little sections – not distributed throughout the game. So most of the game is actually a pleasure. And there’s nothing quite like having full, tight, total control in an FPS game – it really is very good when you’ve conditioned yourself to shitty console-quality FPS controls. If you have a DS, and you like FPS’es on a PC or Mac, you should definitely get this game.

Blogging about my blog

My Blog – How much does my blog look like very other New Yorker’s blog? A lot:

  • Whining about Tourists – check
  • Talking about Subways – check
  • Inappropriate use of the word ‘Fuck’ – check

And how much of it is like any other would-be-tech pundit’s blog? Let’s see:

  • Ruby on Rails reference – check
  • Web 2.0 Derision – check
  • Web 2.0 Envy – check
  • Java Hatred – check
  • Making imaginary replies to other pundits – check

And what do we think about my list usage, hmm?

  • It is nice
  • It is good
  • I like it

Perhaps it’s my inappropriate and excessive <ul> tagging that makes me unique.

Seriously, though, I like some of my posts. Some stuff. Some is non-unique. Some is more unique. I suppose that is about average?

Addenda

PSP vs. DSbattery life – pretty excellent for my purposes. The PSP can go on my commute in and commute out of the city, and most of the way back in until it runs out of juice. I haven’t yet run the DS out of battery. I, in fact, left it sitting on my desk for a month, if not longer. When I opened it up, it popped right back up where it was left off. Eerie (sp? That word looks funny).

Shiira, Browser of Power – approx 2 hours of use, 3 or so unexplained oddities, but zero crashes. Acceptible…but the jury’s still out. Edit Another unexplained oddity. Still no crash. Have lost the occasional connection, moreso than elsewhere.

DS ergonomics – do not play the DS on your knee on the subway. The subway bumping around actually makes controlling worse. Instead, make sure to hold up the DS, then your arms can act as a shock-absorber.

Video Game Annoyances – how many of these reduce down to ‘crappy savepoints’? It’s interesting – continuous savepoints is Bad (I think) (Luck Through it, multi-savepoint arc), and super-sparse savepoints is bad (Makes Learn-by-dying, Jumpey-jumpey, Attrition Death, and some forms of Cruel and Unusual Punishment as obnoxious as they are.) Only I can do that, but my character can’t, My own AI is dumber than me and Camera’d to death have nothing to do with them. Perhaps this is my own savepoint phobia. I have seen that I get stressed and play worse the farther I am from a savepoint…

Web Browser Review

Considering my terrible troubles earlier today, I thought I would compose a little post comparing and contrasting the various web browsers I’ve used, and my opinions of them.

  1. Firefox – Sucks.
  2. Safari – Sucks.
  3. Opera – Sucks.
  4. IE/Win – Sucks ALOT.
  5. IE/Mac – Sucks in such a fashion as to try to collapse the universe around it.
  6. Lynx – Sucks
  7. Links – Sucks
  8. Flock – Sucks
  9. Camino – Sucks
  10. Mozilla – Sucks
  11. Netscape Navicommuniwhatever – Sucks, bloatedly
  12. Telnet Port 80 – and its sibling, openssl s_client -connect – Good

Thank you.

I hate you all.

Edit PS – Bryan wants me to try Shiira. I will do so, but only out of spite. Hate hate hate.
Edit 2 PPS – My re-attempt at using Camino has now ended. Test duration: 15 minutes. Thank you.

PHP Session Thoughts

This is terse, because I am Angry, because Firefox crashed. Angry angry.

PHP Sessions lock. only one page (or resource) will load at a time. Especially visible if you load up several iframes or frames or something and they are session’ed. Also will be very nuisancesome with AJAX and XMLHttpRequest – while page is loading or XMLHttpRequest is running, no other content will load.

Solution 1 is to say session_write_close() after you’ve finished writing to the session. This is okay, but there’s still some lock contention before you say session_write_close().

My solution was to write a custom Session handler that doesn’t lock. It only locks when the session is being written (don’t want to have two processes writing to the session file at the same time, that’s just a recipe for complete disaster). It’s a little dangerous – if you store important data in the session, it could get mangled. But if you mostly read from your sessions, and don’t write to it too often, and don’t care if your writes to the sessions get stomped, you can try my method.

I put it on PHP.net, but in case it should ever disappear, here’s what I did:

1) Steal the example from session_set_save_handler().

2) Modify the write() method to do an flock() on the file before it writes to it, and unlock the file after the write is finished.

3) Add a proper Garbage Collection routine.

And our testing has shown that now you can get multiple concurrent loads running. Be very very careful though – the lock-free nature of this means you could scribble all over yourself. Don’t say you haven’t been warned. We haven’t blown anything up yet, but QA is doing their damnedest to.

DS vs. PSP

So two big handheld consoles Out In the Wild are the Sony PSP and the Nintendo DS. In Japan, the DS has outsold the PSP 80 gajillion to one. But in the States, they’re more even. The question is, which is better? And the answer is hard.

Graphics – No contest. The PSP completely smokes the DS. It’s not even close. It’s like looking at a child’s toy versus a graphics workstation. However (on the PSP), on some games, if you hold the screen at too much of an angle, suddenly you can’t see anything at all. This is because of the stupid shiny finish they put on the thing.

Ergonomics – The DS is uncomfortable to hold, it’s top-heavy, and using the stylus tends to make you inadvertently press the buttons. The PSP, on the other hand, is comfortable in your hands, works well in subway cars and is overall, just better.

Controls – The PSP’s analog controller is a waste of space. You might as well stick with the D-controller, because you can’t get any precision or control on that analog stick. It’s garbage. The DS, when playing an FPS game like Metroid, has the best controls next to mouse-and-keyboard I have ever used. An example – in Metroid, my character walks into a room – there are 4 or 5 hovering enemies, each above my vision line, not horizontally lined up. In 2 or 3 bursts, I’ve levelled them all. It’s right up there with mouse-and-keyboard, really. And I’m an old-school mouse-and-keyboard guy from the days of playing Marathon on my Quadra 630. And I’m not bad 🙂

Gameyness – The second you flip up the DS, it’s ready. You’re right in your pause screen, or wherever, and ready to get back into gear. With the PSP, the loading times are ridiculous. It makes me sweat more when I play the PSP – the fear of dying is not that I will fail, but that I will have to tolerate 2 or more loading screens before I can get back to try again. Conversely, if I die in Metroid, I’m already mid-try before the PSP would’ve finished even its first screen.

Durability – I think the DS wins here. No moving parts. Games are on memory card things.

Age – I should note that the games for the PSP tend to be more ‘M’ rated style games, and the DS tends to be more kid-friendly, but there is Resident Evil for DS, and there are cutesy games for the PSP, so I don’t imagine the line will always be so clear cut.

Looks – The DS looks like Doodoo. The PSP is shiny and sexy.

Cost – DS: $130, PSP: $250 (EDIT: I’m told it’s now $200). DS Games are $35 or less. PSP Games seem to be more, closer to $50 (or less). I think Nintendo has underpriced the market here – people are probably willing to spend more than $130 for a portable console, don’t you think? Maybe. Anyways, another interesting thing – Nintendo may very well be making money on each console sold – and _that’s_ very impressive, if that’s the case. Sony and even Microsoft can bleed out as much money as they want, selling consoles (portable and otherwise) at a loss, but good ole’ Nintendo is actually making dough, I bet.

The DS Lite coming out soon may be Nintendo’s answer to my ergonomics problems, and the fact that it looks like shit. If Sony’s next PSP simply has a Gig or 2 of cache-flash, or cache-RAM, then that could fix a lot of the problems I have with the PSP, too. So it’s definitely very close. But I have to say – the controls on the DS, at least for FPS gaming, are better than the controls on _consoles_. Really.

And an Addendum to my previous post, about Joel On Software – I think I see the difference between you and I, Joel. When your developers need a Subversion server, you install a multi-ton air conditioning unit. Whereas I would just get a small enough server that it wouldn’t need one. You integrate a Bayesian spam filter into your Bug-tracking system, but I would just make you put in a username/password, or one of those “type in this mangled text!” things. I’m not saying I’m right – I bet your solutions are more complete – but I bet mine get 90% of your results with 10% of your effort.