6.30.2009

NetBeans + Tomcat + Java for MacOS X 10.5 Update 4 = Fail

Just struggled with this for a couple of days. After updating MacOS X with the latest Java update (Java for MacOS X 10.5 Update 4, patching security holes mentioned in the news the last few weeks), I could no longer launch Tomcat from NetBeans. And that's a Bad Thing. I use NetBeans all day for work, on a web application that gets tested through the local copy of NetBeans.


The error I was getting was that it couldn't find a file/directory under "/var/folders/ZC/ZCcmX61vGaqOjbHwwgwW-k+++TI/-Tmp-/". The filename changes every time, in the format "context1234567890123456789.xml". The "+++" throws it off because the path is passed as a URL parameter to the Tomcat Manager, which converts the +'s to spaces.

The solution is to go to your NetBeans application folder, right-click the application, and choose Show Package Contents. Under Contents/Resources/NetBeans/etc, open netbeans.conf, and find the line for "netbeans_default_options". Go to the end of this line, and add, inside the end quote, "-J-Djava.io.tmpdir=/tmp". Restart NetBeans, and you should be good to go.

1.08.2009

DO WANT

Yes, both are still at the early-adopter, not-well-supported, haven't-gotten-all-the-kinks-out stage, but come on, how can you not want to combine a haptic full-3D controller with a high-def, full-color stereoscopic display? When I think about it I feel like Howard Hughes at the end of The Aviator - the way of the future, the way of the future, the way of the future.... 


Imagine a simple chess game, to take an easy example. You've got a 3D chessboard on screen, you click and drag to move pieces around, simple enough. Put on your 3D glasses, and you suddenly see the board with depth, as if its actually floating in front of you, just beyond the surface of the screen. Lose the mouse, and instead reach out and grab one of the pieces - touch it, it feels substantial, it has weight, and it has texture - feel the difference between wooden pieces and glass. Move the piece and set it down, and feel it connect with the board.

Don't like chess? Doesn't matter. Extrapolate to any game you like. See your favorite shooter in full 3D, and feel the recoil of your gun with every shot. Watch effects pop out of the screen, reach out and touch the environment you see. A whole realm of possibilities become available. It could completely change the level of 3D gaming.

While $200 for a game controller, $200 for a pair of 3D glasses, and hundreds more for a top-of-the-line LCD capable of operating stereo 3D may seem steep (especially considering that assumes you've already got a top-notch gaming rig with a recent NVidia graphics card) as early-adopter products go, that's really not bad -- it could be half the price in two or three years, if it catches on, production ramps up, and refinements are made. And if they can get developers excited about it, application support will speed its adoption and spur further improvement and innovation.

I can't wait to see what the next gen of gaming will look like. The way of the future, the way of the future...

9.15.2008

Stackoverflow.com

Today marks the public launch of Stackoverflow.com, the new programming Q&A site started by the famous Joel Spolsky. So far it looks like it's shaping up to be a very good resource for developers; and I agree with everything they said about Googling for solutions in this post. You can look me up on the site.


Beyond the site itself, which I think will become an oft-used resource for me, I also really like their badge system. I think a similar system could be a huge boon to any forum, social networking site, or other community site. Game developers learned years ago that people will be more active in an area they already enjoy if they can be recognized for their activity. The same idea applies just as well to community sites. I think it's brilliant, and I think we're going to be seeing similar implementations a lot more often.

9.09.2008

Google Chrome

I downloaded and installed Google's Chrome browser today, and I have to say, I'm impressed. It handles tabs better than FireFox 3 does. The UI is clean and intuitive, though no moreso than FireFox's. It performs well, but not noticeably better or worse than FireFox 3. It has a desktop web app mode - exactly what Prism was supposed to be, only it actually works.


What I find particularly striking about Chrome's interface is a kind of minimalism that one usually expects to see in mobile software. It makes me wonder if, like Apple bringing Safari to the iPhone, Google might be using the desktop as a proving ground for a browser destined for the Android mobile platform. Use it for a few minutes and tell me if you can't picture using the same interface on a palm-top touch-screen.

It's not all roses, however. Chrome is currently Windows-only, a big downside in my book, as I use my MacBook more often than the PC when it comes to web browsing. It doesn't have all the options that FireFox does. It's got some quirks - the "smart" address bar can be irritatingly overzealous, and the scroll wheel seems to scroll half a page at a time, with no way to change it. And, of course, all those lovely FireFox extensions I've gotten so used to having around aren't going to work with Chrome. Still, it's a solid alternative to IE, especially for the more casual web user. Web developers, however, are better off sticking with FireFox and it's treasure trove of extensions.

6.25.2008

XML: No, it isn't.

XML, well, just isn't. It's a raging misnomer. XML is, in theory, the eXtensible Markup Language. I have a couple of problems with that idea.

First, it's not extensible. It just isn't. You can't extend it. I can't extend it. No one can extend it. You know how I know? Because there aren't any extensions. Not a single one. Go ahead. Go find an extension to XML. I'd love to hear about it.

But it's just as well - there's no reason to extend it. XML defines very little; it's a syntax definition, nothing more. DTDs and Schemas are what make XML useful. They aren't extensions to XML, they're applications of XML. What's more, the DTDs and Schemas can be combined in a single document, but even they can't be extended.

Second, while it can be used as a markup language, it almost never is. XHTML is a markup language based on XML. There are a few others that are (debatably) markup languages, like DocBook, but even the likes of DocBook are more on the side of data structure definition than markup. A database file isn't markup. A Java properties file isn't markup. It's a data structure. Per Wikipedia:

A markup language is an artificial language using a set of annotations to text that describe how text is to be structured, laid out, or formatted.
Does that sound like most of the XML formats you've encountered? How many XML config files have you had to deal with? Do they fit that description, even a little bit? Of course not. You don't care about the structure, layout, or formatting of the text in a config file. All you care about is getting at the particular block of text you want. So, what is XML then? Something of a generic hierarchical data file format - though I suppose GHDFF just isn't as catchy as XML.

Now, besides being aggregiously misnamed, it's also a wretched tool for nearly every purpose to which it is applied. It's a language that aims for the middle ground between human-readable and machine-readable, and while it achieves both, it does so very poorly. XML is annoying to read, tedious to write, and resource-intensive to process.

I'm not suggesting dumping XML entirely, not at all. The angle-bracket tax is a fee worth paying for actual markup - you need syntax to seperate the markup from the text. XML is a flexible and effective format for marking up text. What it isn't is an effective format for storing arbitrary data. It's usable, but nowhere near optimal. What's the solution? Something else.

Programmers have a tendency to cling to standards, to try to apply them as much as possible. "Don't reinvent the wheel," we say. And that's a perfectly reasonable mantra - but that doesn't mean all wheels are created equal. When's the last time you saw a bicycle wheel on a car? Would the world be a better place if every wheel were the same? Sure, they'd be interchangeable - but they wouldn't be anywhere near as effective.

We need to step back sometimes, and think about whether there is, or could be, a better wheel for any given situation.

More on this to come.