I’ve been working on some code to generate GUIDs as part of the suite of services for use in the next version of the software that runs CAREO.
When in doubt, hit Google to see who’s already solved it. Turns out David Newmann did a GUID generator as part of his security stuff, and it’s been rolled into the WOExampleHarness.framework provided at /Developer/Examples/JavaWebObjects/Frameworks/WOExamplesHarness (and specifically in the WXUtilties.java class).
In his sample code, he uses a substring of the generated GUID (the first 10 characters). This kept generating the same GUID for me (going against the whole idea of using a GUID), so I told it to use the entire string, rather than the first 10 characters.
James Gosling recently described 2 types of development tasks. I like the description. I couldn’t see any way to link directly to the post, so I’ll drop it in here as an excerpt.
I’ve had conversations with several folks in the last couple of days about the craft of software engineering. There are all sorts of ways to slice it up, but one that I find useful in some situations is to divide programming tasks rather crudely into two categories: mud slinging and diamond cutting.
Mud slinging is where what to do is pretty clear. You just wade in and start shoveling. You don’t have to think to hard and you get to feel real productive because lots of motion is happening. I often feel like most of what I do is in this category. It’s not too hard, it needs to get done, Just Do It. I find that it has a personally satisfying rhythm. Relaxing, low stress, regular progress. Lots of lines of code cranked out.
Then there’s diamond cutting. This is where you stare and stare at a problem, and then whack! it breaks open. Not much coding gets done. I find it really frustrating. Why can’t I figure it out? Why? What? How? Sorting socks would be more fun. High stress. But then, it hits me. A dozen quick lines of code and poof, hard problem solved. It’s a real rush. High dynamic range in emotional state.
Of course, it’s impossible to tell the difference between true diamond cutting and generic cluelessness.
I put some of my photos from WWDC2003 online. iPhoto insists on sorting photos the wrong way when asked to order by date, so start at the bottom of the page…
Just came across iVideo on freshmeat. I downloaded it to see what it does, and lo and behold: it captures DV video from my iSight camera!
I just captured a short (9 second) but huge (180MB) video clip, and it looks like it’s a standard DV file (QT Player opened it - I didn’t try importing it into iMovie, but that shouldn’t be a problem).
With this and evoCam, there are a few options for iSight users to record and publish stuff from the camera.
conference is over. brain is full. too much info. rush now to write code.
It was a completely amazing conference. King and I have been talking about some stuff that is making my head spin a bit. Seriously, this is going to take some time to sink in.
The next version of the repository is going to kick some major ass. Distributed searches. Natural language queries. Automation out the wazoo. Focussed helper apps to, well, help out…
WWDC continues to rock. Totally like drinking from a firehose… A LOT of info here. King and I just met with some WO folks about some issues we’ve been facing on the next version of CAREO and they were extremely helpful (thanks Andreas, Bill & Scott!!!)
Some interesting sessions this afternoon, then down to Cupertino for the Campus Bash. Should be fun. I’m bringing my camera so I’ll continue to look like the typical tourist.
We arrived at SFO just fine yesterday. Took the BART from the airport to Powell, and it turns out it was the first day for the airport leg of BART to be open. Celebrations and camera crews everywhere. Weird.
Walked around downtown SF last night. Man. Those hills are one heck of a workout. Climbed to the top of Telegraph Hill, then went to the top of Coitt Tower. Great view, but oy my legs.
Tim Bray just posted some of his experiences in building a web search engine, and how people use simple vs. advanced search.
It’s a good (and short) read. I’ve noticed a similar pattern of usage, although I don’t have any form of statistics to back it up. Looking through the logs in CAREO, hardly anyone uses the advanced search page. I think I’ve only really used it while building/testing it… Simple search does everything I need.
I’ve got XStreamDB up and running, storing over 2000 IMS metadata records, as well as a few DublinCore and RSS files to test out multi-schema queries.
It works like a charm. It’s got full text indices on all metadata stores (I’ve created roots for each schema - analogous to tables in RDBMS land). I’ve added a “Meta” root that will store audit-type info for each metadata document (creator, creation date, permissions, …) and have whipped up a simple XQuery statement that will retrieve all metadata documents associated with a given Meta document (using GUIDs to identify assocations - again, analogous to table joins in RDBMS land).
First, the more the periphery is engaged, the smarter we are . No amount of conscious working out can replace the intuitions of the expert. The smartest people are the ones who have built up the thickest periphery, and can apply it quickly to new problems. A fully engaged periphery also goes by the name of “flow state”, familiar to athletes.
Second, we are constantly moving items into and out of the periphery . Millisecond by millisecond what was just periphery becomes center, and then back again. To move perception in and out quickly is a source of great power and comfort.
Third, take the periphery away and we are crippled . Imagine looking at the world through narrow tubes taped to our eyes, blocking peripheral vision: you would stumble, and be constantly surprised, and tire quickly. Digital technology in the PC is like those tubes: it presents a view excessively stripped of periphery.
I’ve got some time to play with XStreamDB now, so I’m working on the EOAdaptor that King started, trying to flesh out the functionality for use in CAREO/Extreme.
The fun part will be mapping EOQualifiers normally intended for SQL-ish things into invoking XQuery-ish things… It may not be difficult after all, but there is definitely a learning curve in my near future.
It does have a good “code smell” - letting EOF do all the heavy lifting involved with caching, locking, sharing the records, and having the code that invokes the queries be relatively transportable to other technologies (once appropriate adaptors are written).