Tue 1 Jul 2008
Web Technologies
Mon 7 Apr 2008
Sometimes when I come across a web page that has colors that are hard to read I just move on to something else. If the website has flashing text or music that usually causes immediate apopletic tab death, and trying to remember never to use that website again. But other times the color thing is getting in the way of something important. Enter wob and bow. If you take the wob and bow links here and drag them to your firefox tool bar, they will change the current page to either black text on a white backgroud (bow) or white text on a steel-blue background (wob). Instant readability. White on white text? No problem. Designer overstyled links so that you can’t find them? No problem. Background image interference? No problemo.
The javascript in the buttons will walk all the elements in the page and set the foreground and background, reset link colors for normal and visited links and should be cross-browser, but I only really use ff, so ymmv.
Mon 31 Dec 2007
I’ve been continuing to debug the issues with the JRuby web-enabled console into our Emissary P2P Workflow System. I’ve spent an embarrassingly long time debugging this and trying to figure out what is going wrong. Finally I started just printing out object ids for things so see what I might have more than one instance of.
The issue is that sometimes the ruby context is being duplicated. So we get this type of behavior:
(more…)
Sun 23 Dec 2007
So our new JRuby console is pretty sporty. Created inside an Emissary P2P Workflow node, made accessible by our custom MVC stuff over Jetty, nice CSS and Javascript that makes it pretty nice to use, including command history on the up-arrow.
But there is a small problem that is driving me bonkers.
Sometimes, more often while debugging something and doing a Shift-Reload on the JRuby Console web page, but sometimes without that — I get TWO JRuby environments and the interactions using AJAX alternate between them. Like this:
=> i=5 5 => i=6 6 => i 5 => i 6
This doesn’t happen all the time and I really don’t know what is going on. There could very well be some fundamental thing about the Bean Scripting Framework’s BSFManager that I just don’t grok. In fact, after looking into the BSFManager a little, I’m worried about the multi-threaded nature of running that inside the emissary node. We could have multiple users each creating a JRuby console which could be living on separate HttpSessions. Should be ok as far as all of my code goes, but that BSFManager factory/singleton is starting to look suspiciously like an anti-pattern I once knew.
Wed 19 Dec 2007
Charles, Thomas, Ola — You guys absolutely rock. I am really appreciating the work you have done on JRuby. Thanks also to Sun for supporting this work.
Today I dropped bsf.jar and jruby.jar (1.1b1) into the Emissary P2P Workflow project’s lib directory. I wrote a few dozen lines of java to set up jruby as my ruby scripting language in the framework, create a context to run ruby in. I wrote few more line to hook all of this into our custom high-performance MVC system and now we have a Ruby scripting console served up by Jetty, protected by our normal J2EE security mechanisms. The initial context gets a load of all the important objects inside an emissary node via BSFManager.declareBean. This makes them available as globals in jruby (duh, once you remember to put the “$” in front on the ruby side).
While adding the important object from the Emissary namespace into the JRuby context, some of the object names we were binding things with turned out to be not-so-great for use in Ruby. So here is the little regex that we ended up using to clean up the names and make them nice.
key = key.replaceAll("[-'\"?><{\\\[\\]&$!@#^*()+=]”,”");
A little css, some MochiKit and how I have an Ajax-enabled JRuby window into running Emissary code served up by our own embedded Jetty. The power this is going to unleash is hard to fathom at the moment but the ideas are coming fast and furious.
Tue 11 Dec 2007
Thu 17 Nov 2005
One of the helpful little things that most desktop apps know how to do is handle the
shift-click in order to make multiple selections. The place where this is most obviously
missing when it comes to web forms is in a list of checkboxes.
(more…)
Tue 8 Nov 2005
Summary/Detail relationships can be difficult to display in HTML. The
amount of data can often be overwhelming. This is a client side
(JavaScript + CSS) way to hide or display selective detail rows. It follows
the principle of unobtrusive Javascript and it pretty easy to use.
(more…)
Sun 6 Nov 2005
The principle of unobtrusive javascript has been around for a while, and the old sortable html table thing has been used all over the place. This version has been updated to
- work with tables that use thead and tbody to separate header rows from content rows,
- works with tables that use odd/even styling for the data rows,
- it has a fix for Safari browsers,
- and it can use different sort types instead of the built in Javascript sort. Notably, the merge sort is
a stable sort that is pretty fast.
Sat 22 Oct 2005
So I had this domain name and thought I better put some content on it before it started looking too suspicious. I’ll be using this to experiment with DHTML/CSS/Javascript/Ajax and all sorts of cool web technologies. I’ll probably also put up some of my Bible charts and tools.
Thanks, ssf, for the nice image in the header. It’s Lake Powell, Arizona with the water level 80 to 90 feet down from when I visited there as a teenager in 1978.