I ought to test in MSIE more often

To anyone who might have tried to leave a comment on this blog using the MSIE or AOL Explorer browser (which uses MSIE under the hood) and couldn’t, I’m sorry about that. Someone just told me today that it wasn’t working … turns out I had an extra close tag (specifically, </form>) which MSIE was interpreting correctly (which ended up neutering the “Post” button) but Firefox was being lenient about. In other words, it wasn’t working under MSIE which was the technically right behavior, but I didn’t know it because I mostly use Firefox which ignored my mistake and “did what I meant, not what I said.”

Commenting should now work for MSIE users again. Sorry about that. Fire away! And if you ever have a problem with this site, don’t hesitate to email me and let me know about it.

Twin Tangle by ThinkFun, if you like brainteaser puzzles

I’m a big fan of brainteasers and puzzles, especially the metal manipulation ones, where you have to unlink two or more objects that are somehow entangled together. This past weekend, while on vacation up in Cooperstown, NY, we stopped into a store called Riverwood Gifts right on Main Street where I found a fantastic puzzle. Normally, I can solve these things within a few minutes without much effort, but this one had me stumped. I probably spent a good ten minutes studying it, and just couldn’t figure it out. We left the store to continue shopping, but we went back the next day. Having a night to sleep on it, I managed to “solve” the puzzle … by which I mean, unlink the two pieces, but I hadn’t truly “solved” it in the sense of understanding the solution. In other words, when I put the two pieces back together again, I couldn’t immediately re-solve it! This puzzle was great! I rarely find a puzzle that can do this to me.


(The packaging.)

(Unsolved.)

(Solved.)


The puzzle is called Twin Tangle by a company called ThinkFun. It’s two seemingly identical pieces of steel (they may actually be identical) which can be linked together by sliding them together. The design of the puzzle is so incredibly simple and elegant, but the solution is actually quite unintuitive which makes it a challenge to solve.

Do you like puzzles? Have you found any that you found especially challenging? One that you had to really study in order to understand the solution so that you could repeat it reliably? Tell me about it in the comments below.

How to find what depends on a stored procedure in Sybase

Oracle really spoils you with the ALL_DEPENDENCIES data dictionary view. If you want to know what depends on what, you just query it. These days, I’m working in Sybase again, so I had to figure out how to do it using Sybase’s data dictionary views. Hopefully you’re looking for the same thing and this will be useful to you:

SELECT o.id, o.name, o.type
FROM sysobjects AS o, sysobjects AS do, sysdepends AS d
WHERE do.name = 'procedureName'
AND d.depid = do.id
AND o.id = d.id

Just replace 'procedureName' with the name of the procedure you’re interested in.

Tags:
database,
sql,
oracle,
sybase

The Northern NJ MySQL February 2006 Meetup

Back in October 2003, I signed up as an organizer for the Northern NJ MySQL Meetup Group. I mostly let the group sit idle, since I didn’t have much time to really promote it. Then, a year later, Steve G. contacted me and said he’d be interested in actually meeting up! Thanks to Steve, I scheduled the first meetup in March 2005 and even blogged about it. Four people attended that first meetup: Steven B., Steve G., Mike I. and myself. I was absolutely thrilled, it was a great success.

Almost a year later, we’re still meeting up every month. This past meetup, the February 2006 meetup, we had a whopping 11 people attend! This has been our largest meetup to date. I even posted a few photos from the meetup as proof. Steve G. gave his presentation on the “contact manager” project we started last meetup, this time using Smarty templates for PHP. He’s posted the code up on njgeeks.org, check out his blog entry where he links to the code. In attendance were: Glen B., Steven B., Jim D., Juan G., Steve G., Mike I., Doug M., Nancy S., Bill W., Kipp W. and myself.

At the meetups, we discuss all sorts of things, not just strictly limited to MySQL. We discuss whatever is of interest to the folks who attend, which has included MySQL, PHP, Debian and Ubuntu Linux, various web startups, Web 2.0, blogging, podcasting, RSS and syndication, social networking, writing books and so on. I’m even trying to get folks interested in AOLserver and Tcl, although it’s never easy to do. We’ve been meeting at the Panera Bread on Route 4 West in Paramus, NJ, the one that’s in the same mini-mall as the Daffy and Kohls, across the highway from the Bergen Mall and the Cittone Institute. We meet around 7:00 PM although I usually can’t make it there until 8:00 PM. There’s free wi-fi at the location, so bring your laptop if you’ve got one.

If you’re interested, I urge you to join our meetup then RSVP for the March 2006 meetup. If you’ve got questions, don’t hesitate to contact me, I’ll be glad to answer whatever questions you might have. Hopefully, we’ll see you at the next meetup! Come celebrate our first year anniversary meetup and see what we’re all about.

Tags:
meetup,
new jersey,
local,
event,
mysql,
open source

Dear Lazyweb: FD passing on Win32? How?

There’s a technique in Unix where you can pass a file descriptor (FD) from one process to another through Unix domain sockets on BSD or pipes on SysV. However, how do you do it on Win32? The “Unix emulation” that Windows provides, called Interix, says in its UNIX Application Migration Guide:

The two sockets functions recvmsg and sendmsg appear in many network applications but are not supported by Interix. These functions are the only way to pass an open file descriptor from one running process to another running process.

This doesn’t make it sound very promising. Can you really not pass FD’s between processes on Win32? In the hopes that someone else out there who knows Win32 much better than I do has already solved this, I’m asking for help. If you know of a way to pass FDs on Win32, please leave me a note in the comments or send me an email. Remember, I know how to do it on Unix already. I’m asking specifically for how to do it on Win32, if it’s even possible. Thanks.

Tags:
lazyweb,
win32,
coding

Elliott Back on mathematics and theology

Elliott Back reasons that mathematics is not a science, but rather a kind of theology. I guess mathematicians have faith in axioms, worship equations and believe in immeasurable phenomena like the concept of infinity. They even describe a system of complex numbers which acknowledge an imaginary number exists. Sure sounds like a religion to me.

Is the Dvorak keyboard layout faster than QWERTY?

When I started on computers, one of the requirements my parent set upon me was that I learn how to type. We had an old Smith Corona typewriter in the home and an old “learn how to type” book from the 1970’s that I used to practice with. Fortunately, that small gesture paid off: today, I touch-type a solid 90-120 WPM with 95% or better accuracy. Considering that I probably spend a good 12-14 hours a day in front of a keyboard, it’s come in very useful.

My friend, [info]packardgoose, knowing my typing speed, asked:

What’s your opinion of the Dvorak layout? I’ve been thinking of switching just to frustrate anyone else who sits at my keyboard, but also because I have trouble getting upwards of 80 WPM, which as I understand is part of the design behind the QWERTY layout (time for the mechanical arms to strike and reset).

Here’s my response:

Dvorak doesn’t allow you to type faster; I’m convinced that’s purely urban legend. I’m pretty convinced that QWERTY is actually the most optimal layout for speed because it was designed to alternate strokes between hands evenly to optimize typing speed for mechanical typewriters. There are actually three Dvorak layouts: left-handed, right-handed and two-handed. For a two-handed typist, the left- and right-handed Dvorak layouts can’t possibly be faster than QWERTY, because there’s not enough alternation between hands. So, compare the two-handed Dvorak layout to QWERTY and I’m still betting that QWERTY is marginally faster at the upper end.

The gating factor for typing speed, I’m guessing, is greatly determined by the frequency of letters in the words being typed. Notice how the “e” and “i” in the QWERTY layout aren’t on the home row: the middle finger tends to be longer than the other fingers, so while hands are resting in the home row the middle fingers are naturally inclined to rest on the “e” and “i” — in English, those are pretty high-frequency letters. Two-handed Dvorak, on the other hand, places those letters where the “d” and “g” keys are — both on the same hand, and it puts the “e” in the home row under the middle finger, which isn’t the natural resting place for the finger!

Of course, my “natural resting position” in the home row is “awef-jio;”, not “asdf-jkl;”. Perhaps this is why I can achieve speeds of 120 WPM? I also shift predominantly with my right pinky and I spacebar mostly with my right thumb, but then, I’m right-handed.

I wonder if it’s actually possible to prove that one layout will ultimately be faster than the other when mastered? I wonder what the upper limit is in terms of typing speed for the QWERTY layout; I’ve been “stuck” at 120 WPM as my best speed for years now.

What do you think? Share your thoughts in the comments!

Anonymous comments are back!

Just a quick update, but anonymous comments are back! I’ve implemented simple comment screening, so you can now leave comments anonymously and I can moderate them — to keep out the blog comment spammers.

If you create a dossy.org account or log in using your TypeKey account, the comments should appear on the blog immediately. Only anonymous comments are held for moderation — for now. You can also see that I’ve tentatively added support for OpenID, which means once I get that working, you’ll be able to log in with your LiveJournal account or any other identity server that supports OpenID.

You’ll also notice I added a live comment preview below the input area. Pretty neat, right? It’s a feature I’ve seen on other blogs and thought it might be useful enough to have on mine, too. What do you think? I tested it on Firefox 1.5 and MSIE 6.0 and it seems to work for me. If it doesn’t work for you, let me know.

One thing I need to do is some more input sanitizing — right now, the comment text can contain any arbitrary text (including HTML) — I need to solve the lack of TagSoup for Tcl problem so I can ensure the text only contains markup that is safe. Hopefully, none of you will go abusing this until I get to fix it. :-)

Specificity is an engineer’s delight

Once in a while, I have to go into NYC to work out of our offices there. I take the bus in to Port Authority, then take the subway. I take the 7 train from Times Square to Bryant Park, then walk along the corridor to get to the F/V trains to Rockefeller Plaza. Walking the corridor is always a treat because of it’s “human zoo” quality: you get to see all sorts of people in there, some performing various instruments, others pan-handling with little cardboard signs, sometimes they even try to sell what look like shady pirated DVDs. Well, yesterday, I had an encounter that just made me chuckle and smile.

There was a lady standing in the corridor asking people passing her by, “Do you have a quarter?” Well, marveling at this woman’s curiousity, I felt compelled to give her an answer. I stopped, reached into my pocket, pulled out what loose change I had, identified a quarter and held it up with with my other hand and answered, “Yes, I do.” I then proceeded to put it back in my pocket, smiled at the lady and then resumed walking towards the other end of the corridor.

I realize that there was an implied question of “can I have a quarter,” but if you’re not going to ask the question, I don’t see why you’ve earned the quarter. She asked a simple question I felt I could answer, I answered it and went about my business. She got exactly what she asked for.

Specificity is an engineer’s delight. When you can give someone exactly what they asked for, you try to do it. Yesterday was a good day. :-)

The Engadget Bot … it’s ALIIIIIIVE!

Okay, I’ve been sitting on my hands for a day or two, itching to say something about this … but I resisted until Jason let the cat out of the bag, first. I consider this a mental health project, something I could hack on for fun. So, when he asked about an Engadget AIM Bot back on December 29, I decided to start hacking on it. Four days later, at the end of my New Years vacation on January 2, it was up and running and mostly functional.

For folks who aren’t sure what I’m talking about, let me back up a step. Engadget is a gadget blog that is part of the Weblogs, Inc. Network. A number of people contribute articles to it, covering all sorts of news about gadgets and technology. Traditionally, you might subscribe to its syndication feeds through an aggregator and keep track of updates to the site that way. But, what if notification of updates could be pushed to you via instant messaging instead? That’s one of the things the Engadget Bot does — it allows you to subscribe to any number of categories at Engadget and receive IM alerts when new entries are posted to those categories. For example, there’s lots of new entries being posted in the CES category because the CES tradeshow is going on right now in Vegas. To subscribe, you’d would send an IM to the screenname EngadgetBot with the message subscribe ces. Also, it seems that the bot has trouble sending IMs back to you if you don’t have it on your Buddy List, so it might be a good idea to add it to your Buddy List first.

Here’s a screenshot of an example interaction with the bot, receiving IM alerts and querying it for the latest headlines:

(That’s a screenshot of a Trililan window. Trillian is a multi-IM application for Wintel which I use regularly for my IM needs — so much so that I wrote a plugin for it called Tcllian which embeds my favorite scripting language, Tcl, so I can write scripts for it in Tcl that run inside Trillian.)

For the geeks in the audience, the Engadget Bot is written in Tcl … roughly 2,000 lines at this moment. For persistent data storage, I opted to use the light-weight SQLite 3, which has a really convenient Tcl binding. The source for the bot isn’t available, but it might be someday. A lot of it has to do with the fact that the code is embarassingly simple and I’d honestly be embarassed to have folks looking at it until I can clean it up and make it presentable.

Anyway, I really enjoyed hacking on this and feel really proud to have gotten it working. It’s very simple, but I think it’s already very useful if you’re interested in Engadget’s content and keeping up to date. I get to build something really simple because all the hard stuff — feed syndication of Engadget content, the AIM messaging network, etc. — are already all in place. This is just another example of what Web 2.0 mash-ups can enable folks to build.


UPDATE: My friend Og Maciel just blogged about the bot after I told him about it. Considering he’s on the Ubuntu team doing the translation to Brazilian Portuguese, it’s only natural that his entry is in Portugese. Way cool!