Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Xepher

Pages: 1 2 3 4 5 [6] 7 8 9 10 11 ... 14
Knowhow Trading Post / Victory Over The Sucky Firefox 3 Address Bar!
« on: July 03, 2008, 09:21:37 am »
Also known as the "AwesomeBar", but more like dead PossumBar! amirite? :-) Firefox 3 includes a completely reworked autocomplete/search system for the URL/address bar. The upside is you get pretty results with a bit more info in the pop up, and it makes for a great way to search through recent history or pages where you know the title but not the URL. The downside is that it's about as dumb as a brick when it comes to prioritizing things.

It's got a complex algorithm that ranks URLs based on how frequently you vist them, if they're book marked, how long since your last vist, if you went via a link or typed it directly, etc. As you type, it searches both the URL, page title, and any tags/comments you've assigned your bookmarks. The problem comes in that it searchs ANYWHERE in those, including in the middle of words.

A quick example:

If you frequently vist a site called, say, then that site gets a high priority. You might also frequent a site called, and maybe as well. Now, you want to go visit that last site, and you don't load it quite as often as the other two, but you still know it by name. So you start typing something logical, like say, the url. You get the "mi" done, and you'd expect it to be listing "" as the autocompletion option. But no, it's not. comes first, as it matches that "mi" four times, two in the url, and two more in the page title. Next is ozyandMIillie, for the same reasons, then finally "" since it's only got one hit. Now, if you go back a lot of times, and keeping typing the same "mi" letters then picking the correct address, it will eventually learn to asscociate "mi" with Yet if you then go and type "mis" later, you're gonna see "" at the top again, until you train that new, three letter sequence. For a place where you're supposed to type urls, that seems pretty stupid to me.

Don't get me wrong, I still want it to do fancy searching when I type in crazy stuff, but I want it to prioritze results where the URL starts with exactly what I started typing. At first, I thought I could do it via a firefox add-on... there's several out there of the "old location bar" type. Problem is, they all just use a couple visual tricks to make it look like the old firefox 2 behavior, without really fixing the underlying search algorithm. So I started hunting through code myself. It took me about 10 hours, as I had NO idea how firefox even works at that level, and I've never coded in any of the languages it uses. But I finally narrowed down it's search to a very small section of code that's actually using an SQL query to rank things. Now SQL, THAT I understand!

So the result is I've made a small patch that applies against the FF3 code, changing that query so that it gives 500 bonus points in the ranking to places where the start of the URL (minus the http://, www.) matches what you've typed. So far, it's working how I expected, but anyone else out there who feels daring, I could use more testers. This means you have to be comfortable compiling firefox from source code, which probably means very few of you. Hopefully I can still figure out a way to get it into add-on format, which can then be easily installed by anyone. For now though, here's the patch.

Code: [Select]
--- a/toolkit/components/places/src/nsNavHistoryAutoComplete.cpp  2008-05-26 21:28:47.000000000 -0500
+++ b/toolkit/components/places/src/nsNavHistoryAutoComplete.cpp  2008-07-03 03:07:40.054630131 -0500
@@ -276,12 +276,13 @@

     "SELECT h.url, h.title, f.url") + BOOK_TAG_SQL + NS_LITERAL_CSTRING(", "
-      "ROUND(MAX(((i.input = ?2) + (SUBSTR(i.input, 1, LENGTH(?2)) = ?2)) * "
-                "i.use_count), 1) rank "
-    "FROM moz_inputhistory i "
-    "JOIN moz_places h ON = i.place_id "
+    "((SUBSTR(REPLACE(REPLACE(h.url, 'http://', ''), 'www.', ''), 1, LENGTH(?2)) = ?2) * 500) + "
+       "ifnull(ROUND(MAX(((i.input = ?2) + (SUBSTR(i.input, 1, LENGTH(?2)) = ?2)) "
+               " * i.use_count), 1),0) rank "
+    "FROM moz_places h "
+    "LEFT JOIN moz_inputhistory i ON i.place_id = "
     "LEFT OUTER JOIN moz_favicons f ON = h.favicon_id "
-    "GROUP BY i.place_id HAVING rank > 0 "
+    "GROUP BY HAVING rank > 0 "
     "ORDER BY rank DESC, h.frecency DESC");
   rv = mDBConn->CreateStatement(sql, getter_AddRefs(mDBAdaptiveQuery));

Oh, quick note... this bit of code is hiding inside XULRunner... so if you normally building firefox against XUL runner, (rather than directly) you'll actually need to patch/rebuild XULRunner instead.

EDIT: Updated the patch to use "REPLACE" instead of "TRIM" as it was breaking sites that started with h, t, p, or w (aka, the http and www trims.)

EDIT2: No luck making an add-on. This code is deep in the basic functionality of the browser. The only way to do it as an add-on would be to completely implement a completely seperate/new address bar widget from scratch to completely replace the existing one. Darn!

Announcements / Happy Canada Day!
« on: July 02, 2008, 01:05:33 am »
Oh, and happy Independance Day for those of us in the US. continues to chug along pretty reliably as of late, so no major problems to report. A small hiccup the other day with /tmp/ filling up, but it was only affecting things for a couple hours. Just a reminder to anyone submitting a problem/outage report... most of the time these end up being local/semi-local/ISP problems on the reporter's end, ocasionally a problem with the datacenter/backbone routing at this end, and rarely an actual problem with itself. Still, I like to take all problem reports seriously, so if you do see a problem or can't connect, feel free to let me know. It's very helpful though if you give me an exact time when you noticed a problem, preferably in UTC, but at the very least, specify what timezone/offset you're in. Also, any network information you know how to get (like traceroutes) is always useful. Send me whatever you got, and I'll look into things. Likewise, if you get error messages or other such things, give me all the info you can.

I'm currently tracking (aka, I think I fixed it, but I'm not sure) a transient problem involving an SSL "Change Cipher Spec". This only really applies when you're visiting the secure sections (user-services, webmail, or phpMyAdmin) of the site (no user sites are affected.) But if you run into this (your browser will give an error about "change cipher spec" and not load a secure page), please let me know. Note: this is seperate from the issue with the self-signed certificate which is mentioned on the help page.

General Chat / In other news...
« on: June 28, 2008, 10:52:25 am »

...that is all.

General Chat / RIP George Carlin (NSFW)
« on: June 28, 2008, 10:45:47 am »
The original.

And this sums it up for the modern era.


General Chat / Favorite Webcomic?
« on: June 17, 2008, 11:41:34 pm »
So I figured I'd take a sort of "poll" of regulars and see what their tastes are in comics. I'm gonna do this in a specific format, so pay attention. :-)

1: What's your favorite webcomic? Doesn't matter how popular or obvious. (Penny Arcade goes here.)

2: What's your favorite webcomic you'd wager no one else here has likely heard of? Tell us about something small and just starting out.

3: What's your favorite webcomic that you just found (or started really reading) in the last 6 months or so? Tell us about the new one that's caught your attention.

General Chat / Photos
« on: May 31, 2008, 05:51:04 am »
I'm sure I must've posted some of this elsewhere, but... well, I went to the zoo yesterday, and came back with a few good pictures (and a lot of not so good ones.) The gallery is online at and if you go to just you can find all my photos. Some of it's interesting, most of it's dull. But I figured I'd just post it for fun. Sometime soon, I need to dig through all my pictures and create a gallery of my personal favorites. For the Zoo, this was probably my "best" pictures, even though the Hippo is one of the most dull animals, this one at least had the good grace to let me get a good angle on it. All the cool creatures were sleeping or hiding. I was especially annoyed that the Snow Leopards were all away/indoors. Oh well, can't blame 'em. It was near 100f outside. :-)

Technical Support / MySQL Connection Errors?
« on: May 25, 2008, 08:46:22 pm »
Several people reported brief periods where their sites (and this forum) gave mysql connection errors. I think I traced it to us hitting the default connection limit for mysql, which was set at 100. I've tripled that, as well as found how to monitor peak usage for it. That SHOULD fix the problem, but if you see more of those errors crop up, please let me know and I can raise the limit higher, or figure out if something else is causing it.

General Chat / The World is Awesome!
« on: May 09, 2008, 03:07:13 am »
Few, if any, corporate mottoes have ever inspired me. Nike said "Just do it" and Gatorade said "Is it in you?" but nothing... nothing got to me like the new Discovery channel motto: "The World is Awesome!" and it's touched me in such a way that I just can't describe. I mean, that's the whole and all of it... the world IS awesome. That's it. That's the meaning of life. It's fracking awesome!

Will-san linked these tonight and I figured that was a fitting way to start this series. Please, link other articles/pictures on the same theme, because, the world really is awesome.  :-P

General Chat / Rumtime Error
« on: April 25, 2008, 03:13:59 am »
Rumtime Error: libstdsea++-morgan.16.oz

If you get this awful pun, you're as bad of a nerd as I am... if not, might help. Also, basic knowledge of English units of measurement, programming, and

General Chat / What is Life?
« on: April 20, 2008, 09:28:00 am »
What is life? That's the question, isn't it?

What do you feel is the point... the reason... the meaming... the why? What're we here for?

For me, I say this... to better the race. I like to think we're her to help find our path amongst the stars. We're the explorers set to leave this rock and move to the stars. How about you?

Announcements / Unexpected Downtime
« on: April 11, 2008, 09:59:39 am »
The datacenter that houses Arclight (the server) went down for several hours early this morning. It seems to be back up now, but it was up and down quite a bit, so I'm not counting any chickens before they're hatched. Anyway, not much I can do about it... I noted that uptime had gone from 43 days to 15 minutes a few hours ago, then I lost all contact with the system. Finally got a support request through and got the server restored, but it's back to 10 minutes uptime. I think they had some fairly major problems they're not really wanting to tell us about. Either that, or just "coincidentally" the server went down twice in 4 hours, with a report from the datacenter of a "brief outage" right in the middle of that timeframe. Considering the server didn't even go completely down when a hard drive failed, I think it's much more likely their power grid reset a few times tonight and they just don't want to admit it.

Anyway, shouldn't be a big deal, just letting everyone know why things were unavailable for a few hours.

General Chat / Burn the Government!
« on: February 23, 2008, 02:35:17 am »
...or at least the IRS. Frack, I just did my taxes, and on $10,000 of taxable income, I'm expected to pay over $4,000 in taxes. This is what I get for being self-employed. Torches and pitchforks! That's the answer... go march over to Washington and burn the IRS to the ground! Well, or we could elect Ron Paul... but the torches/pitchfork thing seems more plausible. :-)

Announcements / Short Downtime On Thursday (Now Completed!)
« on: February 19, 2008, 07:01:52 pm »
Update: The new drive is in and working. Things'll be a tad slow for about two hours or so while it rebuilds the array, but after that we're back to full data integrity and performance.

The server is getting a failed drive replaced on Thursday. The replacement should take about 30 minutes, and occur sometime in the afternoon or early evening (US CST) of February 21st. Shouldn't be a big deal, and most people probably won't even notice, but just wanted to let everyone know in advance. If something goes wrong, or you can't connect for more than an hour, feel free to ask me for a status update via AIM. My screen name there is Xepher42.

Announcements / Possible Problems
« on: February 09, 2008, 11:01:11 pm »
As was previously announced, the datacenter which hosts the server went offline for building power repairs this morning. Things came back up this afternoon, as per the plan. A problem seems to have occured with one of the drives in Arclight (the server behind and it's refusing to talk to the machine anymore. Thankfully I had the foresight to build the system on a raid5 array, meaning the loss of a single disk doesn't actually result in data loss. That's why you're still able to read this post here, because everything is still working. Normally, I'd do some troubleshooting, and probably end up getting a new drive shipped to the datacenter and installed. Problem is, I go on a week-long trip tomorrow morning. Thus, that's gonna have to wait until I get back. While the remaining drives should be just fine and keep everything running until I can replace the bad one, I don't like having no redundancy. I'm currently trying to backup all data to my desktop here, but it's a lot of stuff, and my cable modem is relatively slow. Hopefully it can grab everything before I leave tomorrow, but whether it does or not, I'd still suggest everyone make sure they have their own data backed up, just in case. If it decided to drop ANOTHER drive towards the end of the week, my backup would be several days out of date too.

Anyway, I don't want anyone to panic (at least not as much as I am) but I just wanted to post that in case the worst happens, and you wonder why the server is down. Really, the chances of another drive failure are pretty slim, especially considering they survived whatever hurt this one. Heck, the old server ran on just 2 drives for 4+ years with no problems! I just tend to be overly cautious and concerned sometimes. I'll be back next sunday, the 17th, and hopefully I can get a new drive shipped to the DC and installed shortly afterwards. I'm gonna just look at it this way for now... this isn't a problem, the problem was forseen, and prepared for, and the redundancy is working as planned. Something pretty bad happened to the hardware, but everything's still chugging along just fine! Yay for being prepared! :-P

Announcements / Borked Email
« on: February 08, 2008, 09:11:29 pm »
Two days ago I updated a lot of the software on the server to close a couple of security bugs/notices they announced. During the update however, we had two small glitches. One, was that I managed to disable CGI for the webserver, meaning if you ran perl scripts or such (like movable type) Reinder of ROCR pointed that out to me and I got it fixed yesterday. Today I got up, and had no email... but a couple IMs from people saying they had no email either. (Unfortunately, I was already late for work, and spent the next 6 hours on a job site.) Turns out I'd updated a package I didn't even intend to... the spam filter. The new version changed a couple variable names, so it wasn't able to run, meaning mail just got queued up, and after a while it stopped taking delivery, asking the sending servers to queue it up there and retry later. I started fixing it, and as soon as it was able to run, it delivered all the queued emails... but I hadn't finished fixing the config yet, so it delivered everything as though it were spam/junk mail. Anyway, long story short, no mail should've been lost. About 100 messages were delivered to various Junk folders though, so you should all dig through the past day and a half of those to see if one or two were legit. The rest of the mail that didn't get delivered should be queued up on other mail servers and begin trickling in over the next few hours now that it's accepting delivery again. The update occurred just after 0600 UTC on the 7th. That's midnight, the start of the 7th CST here in the states, so you only need to look back through the Junk folder until about then.

Sorry for the trouble on this one guys. I botched it, as when I told it to do the update, I didn't notice it was planning on updating my spam filter package. If I'd seen that, I'd have directly tested it right then and there.

Pages: 1 2 3 4 5 [6] 7 8 9 10 11 ... 14