How hard can it be to find geek friends?

I recognize that a large part of my depression stems from my frustration with not having any hardcore, ubergeek friends. How do you go about meeting them, though? In a bout of desperation–yes, I’ll try just about anything at this point–I posted this to the New Jersey “strictly platonic” area on Craigslist: Looking for more geek friends.

I’m just looking for more geek friends, trying to post in all different places to find ’em.

Are you into social software, blogging, web development, brand management, graphic design, publishing, writing, information technology, “Web 2.0” (gag, I can’t believe I just used that buzzword)? Into DIY tech stuff, hardware hacking, modding?

Looking for someone to geek out with, someone who actually “gets” what you’re talking about and finds it as exciting as you do? Tired of trying to explain stuff to your non-geek friends, only to be met with glazed eyes and head-nodding?

Lets be friends–especially if you’re in Northern NJ. There’s just not enough of us in the area.

Unfortunately, it doesn’t seem like Craigslist has much traffic in New Jersey. Maybe someone who’s like me is similarly searching and we’ll somehow find each other. Here’s to hoping, anyway.

Tags: , ,

A few words can mean a whole lot

One of the great things about Twitter is how a terse exchange can lead to big thoughts. I just had this exchange with Robert Scoble:

  • <Scobleizer> I know I’m breaking the Twitter rules. But I don’t want to blog. I want to have conversations with everyone here. I wish Twitter was better.
  • <dossy> @Scobleizer, replace Twitter with IRC? :-)
  • <Scobleizer> @dossy: Twitter has RSS, IRC does not. Twitter has permalinks. IRC, no. Twitter lets you kick out the idiots. IRC doesn’t.

It got me thinking, why is Twitter and IRC an either-or choice? Twitter is already accessible via SMS, IM and web–why not IRC, too? Suppose there was a Twitter IRC bot, which you could register with using your Twitter username and password. It would send you Twitter updates via IRC private messages and you could send it updates in return. Basically, it could work just like the current Twitter IM interface, just over IRC.

Then, I thought, why not take it one step further: an IRC network (think: irc.twitter.com) on which you use your Twitter username as your IRC nickname, and it requires your Twitter password in order to connect. It would have one channel, #public, for public updates. Another channel, #friends, would appear to have all the people you’re following on Twitter in it. Direct messages would be exchanged using IRC’s private messages. You might follow/unfollow people by sending a private message to the “Twitter” nickname.

But, are these really Robert’s objections to IRC? I mean, adding a logging bot to an IRC channel which publishes logs as RSS is easy. Publishing those same logs as HTML with named anchors would provide permalinks for individual messages. IRC lets you kick and ban from channels, as well as being able to ignore them in your IRC client. Is the problem really that IRC isn’t Twitter, or is it really that IRC is IRC, and nobody cares about IRC any more?

Could IRC become relevant again if it just implemented these few simple Twitter features? I don’t think so–I think Twitter’s success owes itself to Twitter’s actual implementation:

  • It has a low cost of activation: web based, no client installation required to just get started, lightweight HTML interface vs. a fat desktop client or rich Internet application for IRC.
  • Once people become part of their self-created community, it becomes part of their routine. They habitualize their use of it.

That second point, the “self-created community,” is really powerful. Unlike IRC, it’s trivially easy to follow/unfollow someone on Twitter. If you’re not interested in someone’s updates, it’s very easy to make it impossible for them to interact with you on Twitter. Not so easy on IRC, which has always been one of its weaknesses.

So, what might come out of all this thinking and rambling? I don’t know–maybe these thoughts will spark someone else’s thought process and we can build up from there. I just wanted to capture these thoughts before they escaped my brain.

Tags: ,

Enough of the politics, on with the geeking!

Okay, I’m sorry I indulged myself the last few days with the spurt of political blogging. I’ve gotten it out of my system now. Time to get back to the hardcore geeking!

Here’s a short list of things that are either on my mind or somewhere in my to-do list:

  • Commit my changes to AOLserver to build easily with MinGW/MSYS on Win32. I even put together a quick NSIS script, so there’s a nice one-click installer for AOLserver 4.0.10 on Win32, now.
  • Commit my changes to Gnash to build and link correctly using MinGW/MSYS on Win32. No fancy installer, but here’s my previous blog post about it.
  • Do some more work on nsjsapi, the AOLserver module to integrate Mozilla SpiderMonkey into AOLserver for server-side JavaScript. I’d like to get it working well enough to load and use jQuery so I can show it off at jQueryCamp07 this October.
  • Work with the community to put together a list of “Top 5 Goals” for AOLserver, then assemble a real plan to get those things done. A big bonus would be if I didn’t have to do everything myself.
  • Find someone who wants to check out Gobby with me. It’s a free, open source, multi-platform, collaborative real-time file editing application with chat and syntax highlighting. Think: World of Notepad. Could be a nice way to do remote paired programming with two or more people. Or, a good way to do code reviews with a geographically distributed team.

If you’d like to hear more about any of these things–or better yet, do them together with me, let me know!

OTRS SQL query to show most recent ticket activity

 OTRS, the Open Ticket Request System, is a GPL’ed open source request tracking application. Here’s a screenshot of the Queue View:

OTRS Queue View screenshot
(click for full size)

This is fine if you’re a CSR managing your own queue of tickets, but when you’re monitoring the activity of everyone’s tickets, the Queue View doesn’t help you quickly identify which tickets have had activity.

Fortunately, the Admin interface has a Select Box link under the Misc heading which provides you an ad-hoc SQL query screen. I took a look at the database schema for OTRS, and came up with a query that lists new and open tickets sorted by most recent activity:

SELECT  q.name AS queue_name, t.tn, t.customer_id, t.title,
        a.id, a_t.name AS article_type_name, a.create_time, a.a_from
FROM    queue AS q, ticket AS t, article AS a, article_type AS a_t, (
            SELECT  _a.ticket_id, MAX(_a.create_time) AS create_time
            FROM    ticket AS _t, ticket_state AS _t_s, article AS _a
            WHERE   _t_s.name IN ('new', 'open')
            AND     _t.ticket_state_id = _t_s.id
            AND     _a.ticket_id = _t.id
            GROUP   BY _a.ticket_id
        ) a_max
WHERE   q.id = t.queue_id
AND     t.id = a_max.ticket_id
AND     a.create_time = a_max.create_time
AND     a_t.id = a.article_type_id
GROUP   BY t.id
ORDER   BY a.create_time DESC

Here’s a screenshot of what the query results look like (I’ve sanitized out sensitive information):

OTRS tickets with recent activity query screenshot
(click for full size)

The Select Box doesn’t display the column names as headings, but they are: Queue Name, Ticket#, Customer ID, Ticket Title, Article ID, Article Type, Article Create Time, Article From Header. The results are sorted in descending order by Article Create Time, so the most recently created articles appear at the top.

I can periodically refresh this page and execute the query to watch for new activity to pop up at the top of the list. This way, I can monitor activity and see new activity in a ticket, at a glance.

Do you use OTRS? Do you have any good tips or tricks that you’ve created? Share them with me in the comments below!

Tags: , ,

jQueryCamp07, in Boston on October 27th

John Resig, the creator of jQuery, just blogged about jQueryCamp07, to be held in the Boston/Cambridge area on October 27th, 2007. I’m going to try and attend and if you’re in the northern NJ area and want to travel together, let me know.

Tags: , ,

Google Reader (finally) gets search-within-subscriptions

Back in April 2007, when I decided to switch over from Bloglines to Google Reader for my RSS reading pleasure, I made a point to complain about the fact that Google Reader had no easy way to search for entries within your subscriptions. The good news is apparently that all changed, yesterday: Google Reader now has a search box!

Google Reader gets a Search box!

This is good news, since that was pretty much the only feature I’d actually missed when I gave up Bloglines. It’s good timing on Google’s part, since the latest Bloglines beta UI improvements have really closed the gap–although I’m not happy enough with them to consider switching back, yet.

Tags: , ,

tcl-mysql-udf 0.2 and Win32 DLL binary

Last week, I released some code that would enable MySQL to evaluate Tcl scripts as a stored function, which I called tcl-mysql-udf. My friend Steve asked if I could prepare a Win32 DLL binary for him, so I worked on that tonight and am releasing version 0.2, along with the DLL:

In order to play with this, you’ll need the following prerequisites installed:

  • MySQL (I’m testing on 5.1.21-beta)
  • Tcl (I’m testing on 8.4.15.0)

Inside the tcl-mysql-udf-0.2-dll.zip will be the file tcl-mysql-udf.dll. On MySQL 5.0.x, it expects it to reside in the Program Files\MySQL\MySQL Server 5.0\bin directory, so copy it there. On MySQL 5.1.x, however, it expects it to be in the Program Files\MySQL\MySQL Server 5.1\lib directory. Pay close attention to what version of MySQL you’re using and the correct directory to copy the DLL into.

Once you’ve got everything installed and copied to the right locations so far, connect to your MySQL database with your favorite MySQL client, and issue the following command (you only type what’s in bold):

mysql> CREATE FUNCTION TCL RETURNS STRING SONAME 'tcl-mysql-udf.dll';
Query OK, 0 rows affected (0.10 sec)

We can check what version of Tcl we’ve loaded this way:

mysql> SELECT TCL('info patchlevel') AS script;
+--------+
| script |
+--------+
| 8.4.15 |
+--------+
1 row in set (0.04 sec)

Here’s a goofy example of storing Tcl scripts in the database and having MySQL evaluate them:

mysql> CREATE TABLE code (
n INT NOT NULL AUTO_INCREMENT,
script TEXT NOT NULL,
PRIMARY KEY pk_code (n)
) ENGINE=MyISAM;

Query OK, 0 rows affected (0.20 sec)

mysql> INSERT INTO code (script) VALUES
('set x 123'),
('expr {$x + 432}'),
('clock format [clock seconds]'),
('incr x [clock seconds]'),
('expr {$x * rand()}');

Query OK, 5 rows affected (0.04 sec)
Records: 5  Duplicates: 0  Warnings: 0

So, we now have a table with five rows in it, each row containing a Tcl script. We can have MySQL evaluate those Tcl scripts like this:

mysql> SELECT n, TCL(script)
FROM code
ORDER BY n;

+---+---------------------------------------------------+
| n | TCL(script)                                       |
+---+---------------------------------------------------+
| 1 | 123                                               |
| 2 | 555                                               |
| 3 | Fri Aug 31 12:41:25 AM Eastern Daylight Time 2007 |
| 4 | 1188535408                                        |
| 5 | 6935485.39171                                     |
+---+---------------------------------------------------+
5 rows in set (0.05 sec)

So what, right? How about fetching HTML documents via HTTP, right from within MySQL?

mysql> CREATE TABLE urls (
n INT NOT NULL AUTO_INCREMENT,
url VARCHAR(255) NOT NULL,
PRIMARY KEY pk_urls (n)
) ENGINE=MyISAM;

Query OK, 0 rows affected (0.03 sec)

mysql> INSERT INTO urls (url) VALUES
('http://dossy.org/'),
('http://aolserver.com/'),
('http://njgeeks.org/');

Query OK, 3 rows affected (0.00 sec)
Records: 3  Duplicates: 0  Warnings: 0

mysql> SELECT n, url, TCL(
'package require http;'
'set url [lindex $args 0];'
'set token [http::geturl $url];'
'set data [http::data $token];'
'http::cleanup $token;'
'regexp -all -inline {<title>.*?</title>} $data',
url) AS script
FROM urls
ORDER BY n \G

*************************** 1. row ***************************
     n: 1
   url: http://dossy.org/
script: {<title>Dossy's Blog</title>}
*************************** 2. row ***************************
     n: 2
   url: http://aolserver.com/
script: <title>AOLserver</title>
*************************** 3. row ***************************
     n: 3
   url: http://njgeeks.org/
script: {<title>NJ Geeks | - New Jersey's IT Community</title>}
3 rows in set (1.54 sec)

This query uses the Tcl “http” package to fetch the documents specified by the url column and plucks out the <title> tag using a regular expression. The TCL() stored function takes a variable number of arguments, the first being the Tcl script to evaluate, followed by zero or more arguments that are placed into the $args Tcl variable. In this case, we pass in “url” so that on each row, we execute our Tcl script with the value from that row.

Be aware that this stored function is a security issue: allowing database users to execute arbitrary code has obvious risks, especially since that code will be executed as the user that the MySQL server is running as.

Hopefully this is enough to get you started and might even give you an idea as to how this could be useful to you in some way. If you have any questions, just leave them in the comments below.

Tags: , , ,

libpurple patch to extend the purple::cmd Tcl command

As of Pidgin 2.1.1, the Tcl plugin can only register and unregister commands using the purple::cmd Tcl command. However, without the ability to execute commands, it’s pretty pointless. So, here’s a patch to add the subcommands “do”, “help” and “list” to purple::cmd. I’ve submitted this as Ticket 2873.

If you’d like to try this out, here’s a Win32 build of tcl.dll for Pidgin 2.1.1 after applying this patch:

Just extract that into your Program Files\Pidgin\plugins directory, after making a backup copy of your old tcl.dll, of course.

If you have any questions about or concerns with this patch, let me know in the comments below. Thanks!

Tags: , ,

Pidgin IM patch for IRC 352 (who) parsing

Pidgin is a multi-protocol IM client (formerly known as “Gaim”) that is available on various platforms (Linux, Win32).

Recently, someone asked in #pidgin about a feature request to make libpurple parse the IRC 352 messages, which are returned in response to a WHO command. I said I could throw together a quick patch to make this happen and I’ve got something working now.

Currently, this is what a IRC chat in Pidgin might look like:

Pidgin IRC chat, before patch

After the patch, you can issue a “/quote who #channel” which will send the literal command “who #channel” to the IRC server, to which it will send the 352 response messages. My patch makes libpurple parse these messages and set the PURPLE_CBFLAGS_AWAY flag on the appropriate user’s PuprleConvChatBuddyFlags record. The result looks like this:

Pidgin IRC chat, after patch

You can now see user “Dossy_” is set away by the status icon (the clock, cirlcled in green in the screenshot).

Of course, there’s a few big caveats with this patch:

  • Only users set “away” who have no other meaningful PurpleConvChatBuddyFlags (i.e., chan op, voiced) will display the away status icon, as it has lowest precedence, since only one buddy status icon is displayed at a time. (See pidgin/gtkconv.c:get_chat_buddy_status_icon() to see what I mean.)
  • The server does not send regular status update notifications with 352 messages. It only sends them in response to a “who” command. Therefore, if you want the status data to be updated, you’ll need to periodically poll the server by issuing a “who” command. This is inefficient and for large IRC channels it can be quite resource intensive. If you want periodic updates, you’ll need to issue the “who” command manually, or write a Pidgin plugin that periodically polls by issuing the command for you.

Here’s the patch against the Pidgin 2.1.1 source tarball:

If you have any questions about or issues with the patch, leave them in the comments below.

Tags: , ,

Happy campers!

There aren’t many pictures up from MySQL Camp II yet, but Ronald uploaded one so here it is:

Drinks with the MySQL Campers

Do we have goofy grins on our faces? That’s because we had such a great time geeking out for two days straight, followed by beers!

Tags: , ,