2008 Oct 5, 9:17
Sarah asked me if I knew of a syntax highlighter for the QuickBase formula language which she uses at work. I couldn't find one but thought it might be fun to make a QuickBase Formula syntax highlighter based on the QuickBase help's
description of the formula syntax. Thankfully the language is relatively simple since my skills with ANTLR, the parser generator, are rusty now and I've only
used it previously for personal projects (like Javaish, the ridiculous Java based shell idea I had).
With the help of some great ANTLR examples and an ANTLR cheat
sheet I was able to come up with the grammar that parses the QuickBase Formula syntax and prints out the same formula marked up with HTML SPAN tags and various CSS classes. ANTLR produces the
parser in Java which I wrapped up in an applet, put in a jar, and embedded in an HTML page. The script in that page runs user input through the applet's parser and sticks the output at the bottom
of the page with appropriate CSS rules to highlight and print the formula in a pretty fashion.
What I learned:
- I didn't realize that Java applets are easy to use via script in an HTML page. In the JavaScript I
can simply refer to publicly exposed methods on the applet and run JavaScript strings through them. It makes for a great combination: do the heavy coding in Java and do the UI in HTML. I may end up
doing this again in the future.
- I love ANTLRWorks, the ANTLR IDE, that didn't exist the last time I used ANTLR. It tells you about issues with your grammar as you create it,
lets you easily debug the grammar running it forwards and backwards, display parse trees, and other useful things.
java technical programming quickbase language antlr antlrworks 2008 Aug 25, 11:39"The Seattle Municipal Archives documents the history, development, and activities of the agencies and elected officials of the City of Seattle. Strengths of the records include those documenting
engineering, parks, urban planning, the legislative process and elected officials. Holdings include over 6,000 cubic feet of textual records; 3,000 maps and drawings, 3,000 audiotapes; hundreds of
hours of motion picture film; and over 1.5 million photographic images of City projects and personnel."
via:swannman photo flickr seattle history public-domain 2008 May 16, 2:33This guy works on interesting projects. "Joshua W. Klein, M.S. is a Mobile, Personal, and Future Technology Specialist who is currently Senior Technology Principal at Frog Design."
joshua-klien bio 2008 May 5, 11:42Video of "Mike Klucher talks about building XNA Framework games for the Zune and shows the soon-to-be-released CTP that enables developers to build Zune projects, adds a new menu on your Zune for
games, and also enables device debugging directly from Visu
zune xbox videogame development microsoft blog article video 2008 May 2, 10:20
I've finally finished the Baroque Cycle, a historical fiction series set in the 17th and 18th centuries by Neal Stephenson whose work I
always enjoy. There were often delays where I'd forget about the books until I had to take plane somewhere, or get discouraged reading about the character's thoughts on economics, or have
difficulty finding the next volume, or become more engrossed in other books, projects or video games, and leave the Baroque Cycle books untouched for many months at a time. Consequently, my reading
of this series has, I'm ashamed to say, spanned years. After finishing some books which I enjoy I end up hungry for just a bit more to read. For this series I don't need a bit more to read, I'm
done with that, but I do want a badge or maybe a medal. Or barring that, college credit in European History and Macro Economics. I can recommend this book to anyone who has enjoyed Neal
Stephenson's other work and has a few years of free time to kill.
history neal stephenson baroque cycle book nontechnical 2008 Apr 7, 10:09
More of my thoughts have been stolen: In my
previous job the customer wanted a progress bar displayed while information was copied off of proprietary hardware, during which the software didn't get any indication of progress until the copy
was finished. I joked (mostly) that we could display a progress bar that continuously slows down and never quite reaches the end until we know we're done getting info from the hardware. The amount
of progress would be a function of time where as time approaches infinity, progress approaches a value of at most 100 percent.
This is similar to Zeno's Paradox which says you can't cross a room because to do so first you must cross half the room, then you must
cross half the remaining distance, then half the remaining again, and so on which means you must take an infinite number of steps. There's also an old joke inspired by Zeno's Paradox. The joke is the prototypical engineering vs sciences joke and is moderately humorous, but I think
the fact that Wolfram has an interactive applet demonstrating the joke is funnier than the joke itself.
I recently found Lou Franco's blog post "Using Zeno's Paradox For Progress Bars" which covers the same
concept as Zeno's Progress Bar but with real code. Apparently Lou wasn't making a joke and actually used this progress bar in an application. A progress bar that doesn't accurately represent
progress seems dishonest. In cases like the Vista Defrag
where the software can't make a reasonable guess about how long a process will take the software shouldn't display a progress bar.
Similarly a paper by Chris Harrison "Rethinking the Progress Bar" suggests that if a progress bar speeds up towards the end
the user will perceive the operation as taking less time. The paper is interesting, but as in the previous case, I'd rather have progress accurately represented even if it means the user doesn't
perceive the operation as being as fast.
Update: I should be clearer about Lou's post. He was actually making a practical and implementable suggestion as to how to handle the case of displaying progress when you have some idea of how long
it will take but no indications of progress, whereas my suggestion is impractical and more of a joke concerning displaying progress with no indication of progress nor a general idea of how long it
will take.
zenos paradox technical stolen-thoughts boring progress zeno software math 2008 Mar 5, 2:30Creative Commons website talks about Lee Maddeford who released his music under CC Attribution-NonCommercial license. "There's a huge variety of quality music (well over 10 hours of recordings) to
enjoy, crossing several genres and many projects led by
lee-maddeford music cc copyright 2008 Jan 22, 9:56
More ideas stolen from me in the same vein as my stolen OpenID thoughts.
Fast
Pedestrian Crossing on Four Way Stops. In college I didn't have a car and every weekend I had weekly poker with friends who lived nearby so I would end up waiting to cross from one corner of a
traffic lit four way stop to the opposite corner. Waiting there in the cold gave me plenty of time to consider the fastest method of getting to the opposite corner of a four-way stop. My plan was
to hit the pedestrian crossing button for both directions and travel on the first one available. This only seems like a bad choice if the pedestrian crossing signal travels clockwise or counter
clockwise around the four way stop. In those two cases its better to take the later of the two pedestrian signal crossings, but I have yet to see those two patterns on a real life traffic stop. I
decided recently to see if my plan was actually sound and looked up info on traffic signals. But the info
didn't say much other than "its complicated" and "it depends" (I'm paraphrasing). Then I found some guy's analysis of this problem. So I'm done with this and I'll continue pressing both
buttons and crossing on the first pedestrian signal. Incidentally on one such night when I was waiting to cross this intersection I heard a loud multi-click sound and realized that the woman in the
SUV waiting to cross the intersection next to me had just locked her doors. I guess my thinking-about-crossing-the-street face is intimidating.
Windows Searching
Windows Media Center Recorded TV's Closed Captions. An Ars-Technica article on
a fancy DVR described one of the DVRs features: full text search over the subtitles of the recorded TV shows. I thought implementing this for Windows Media Center recorded TV shows and Windows
Search would be an interesting project to learn about video files, and extending Windows Search. As it turns out though some guy, Stephen Toub implemented Windows Search over MCE closed captions already. Stephen Toub's article is very long and describes some
other very interesting related projects including 'summarizing video files' which you may want to read.
stolen-thoughts windows search mce windows traffic closed captions four-way-stop windows-media-center 2007 Dec 17, 9:25Johnny Lee has a couple of projects involving the Wii remote. In the first he uses his fingers as his pointers Minority Report style and in the second he uses an LED pen and a projector to create a
whiteboard system.
blog bluetooth wii wiimote remote free hardware hack ui howto interactive johnny-lee 2007 Dec 4, 8:20Various interesting semantic web related projects.
ajax semanticweb simile rdf mit 2007 Oct 14, 3:12I've updated my homepage by moving stuff about me onto a separate
About page. Creating the About page was the perfect opportunity
to get
FoaF, a machine readable way of describing yourself and your friends, off my to do list. I have a
base FoaF file to which I add friends, projects, and accounts
from delicious
using an XSLT. This produces the
FoaF XML resource on which I use another
XSLT to convert into HTML and produce the About page.
I should also mention a few FoaF pages I found useful in doing this:
-
FOAF Vocabulary Specification - The standard on which I based my XSLT to add in info from delicious.
-
FoaF Explorer - Turns any RDF XML FOAF resource into a webpage with links to the other people, projects, etc mentioned in the FOAF file.
-
FoaF-a-Matic - I used this to produce my base FoaF file.
-
RDF Validator - This is the closest thing I could find for validation. It does RDF in general but unfortunately not FoaF specifically. I found two
links to sites that are down or dead that claimed to do what I actually wanted.
technical xml foaf personal xslt xsl homepage 2007 Jun 7, 5:29The other day I had the best idea for my Wii remote. Clearly I should use it to control the rotation of Tetris pieces in my
N-dimensional
Tetris game Polytope Tetris. One of the
issues I described with Polytope Tetris is user input. Given a Wii remote the
user could rotate a piece through 3 dimensions in a manner that's much easier to adjust to than particular keys on the keyboard.
Anyway, I did a little
research into how this might work. I knew that the Wii remote used infrared for absolute positioning and
Bluetooth for everything else (LEDs, speaker, accels.) I bought a
Bluetooth adapter for my PC after realizing that none of my
computers had one already. I used
GlovePIE to ensure that my Wii remote could connect and successfully communicate with my computer.
GlovePIE is actually pretty cool -- it provides a simple script layer over the Wii remote to control things like your mouse.
Since Polytope Tetris is in Java I looked for and found a
Java library for operating with the Wii remote and a long
forum thread discussing its use. I then read up on
Bluetooth in Java. Apparently JSR 82 is the name of the standard that describes the API a Bluetooth stack should expose
in Java. That is, to get Bluetooth working in Java one needs an additional package for Java that actually implements the Bluetooth Java API. This package would depend on the system so I suppose I
can't fault Sun for not including it... Where to find such a package? I found a
comparison list of implementations and tried the ones
that support javax.bluetooth.
None of them worked for me because none can address USB devices it seems or they cost money and I couldn't get the trial version working. I also tried
bluesock (not listed on the previous list) which seemed promising and could produce an address for my Wii remote as a connected device but couldn't use
that address.
And I thought that after I found the Wii remote Java library it would be easy... Oh well...
java bluetooth wii technical remote jsr82 tetris polytopetetris wiimote 2007 May 9, 10:07My XML source viewer written as XSLT to replace the builtin IE XML source viewer.
projects me xml xslt ie ie7 windows browser 2007 Apr 19, 3:35Interesting projects related to maps of physical space and the semantic web.
architecture data map ontology rdf place semanticweb tag wifi xml space research 2007 Apr 5, 10:26A microformats cheat sheet.
microformats pdf reference cheatsheet 2007 Mar 28, 12:54Given an ABNF description of a grammar, RandomGrammar produces a random string that fits that grammar. This is a personal project I worked on previously and have just now made available again on my
website.
me personal projects java randomgrammar abnf 2007 Mar 21, 11:32A badge I think I can apply to many of my personal projects. Note to self: remember this later when someone breaks the build.
badge certificate humor programming development software 2007 Mar 20, 5:59Projects people have produced using Ikea products.
blog cool design diy furniture hack tutorial ikea 2007 Mar 19, 1:03Help ensure that projects to turn books into text files are correct by proofreading the results.
books book gutenberg literature internet volunteer free 2007 Mar 13, 12:24My project that given an XML list of items with tags produces an XML graph of those items and tags. I used this in one of my other projects Vizicious as well as on my homepage to produce hierarchy
for my project links.
me projects taghierarchy personal java