Yeah, that's me. You'd think I'd burned through my fifteen minutes of fame already...
Yes, I wore the Mozilla shirt deliberately. My role at Skyfire is to basically customize Mozilla Firefox for our needs. So it seemed fitting to combine the shirt and the little Skyfire badge.
As for the dancing itself... I think I can hold my own. :-) I'll say this much - at that level, it is a workout in addition to a whole lot of fun. I don't care about being alone out there either. I basically make it up on the spot (or I used to, anyway...)
Since everyone else seems to be blogging their vacations, I figure it's my turn. See the extended entry for details.
I actually had so much fun on my vacation that I didn't mind the request from work at all. I only wish I had spent a little more time to work on my pet projects - but the jacket crisis on Sunday and Monday ate all my energy up. Overall, a great success.
A few weeks ago, I said I'd be in Washington for ten days on vacation. Then my supervisor approached me...
So I'm still going, but only for half as long:
Again, if anyone's interested in meeting up, let me know!
What, elementFromPoint isn't good enough for you? Well, in my case, no. For Verbosio, it would help a great deal to convert a mouse point to a DOM range point (think scripted selections, drag & drop like Pencil does, etc.). DOM ranges form, among other things, the basis for Mozilla's selection algorithms.
Fortunately, there's a way to figure it out. Just ask the mouse event for the range coordinates. Literally.
window.addEventListener("mousemove", {
handleEvent: function(aEvt) {
this.rangeParent = aEvt.rangeParent;
this.rangeOffset = aEvt.rangeOffset;
}
}, true);
This comes to us courtesy of the nsIDOMNSUIEvent interface.
The funny thing is, I knew about this back in 2002, when I was writing my book for Sams Publishing. I forgot about it sometime over the past six years (and I admit now that the book's been only partially useful since then, missing certain bits of info I would've liked to know then).
Now, imagine using this to give a visual indicator where a given element you're dragging will be dropped in a HTML or XML document...
I'm planning a vacation in Washington State from August 14-24, back to Seattle and Vancouver. So if there are any Mozilla developers or fans in the Seattle or Portland, Oregon areas that want to meet up during that time, drop me a line in the comments section.
I finished my tests of building Mozilla Firefox with and without a RAMDisk, and the results were a little surprising. Read on in the extended entry for details.
| Build configuration | Debug | Debug | Debug | Debug | Opt | Opt | Opt | Opt | ||||
| RAMdisk mozilla-build | N | N | Y | Y | N | N | Y | Y | ||||
| RAMdisk sourcedir/objdir | N | Y | N | Y | N | Y | N | Y | ||||
| Time of build | 92m 19.192s | 84m 8.784s | 87m 54.002s | 82m 55.015s | 50m 32.067s | 46m 59.342s | 51m 16.507s | 47m 83.553 | ||||
| Time of build | 89m 6.443s | 83m 12.905s | 89m 41.610s | 83m 4.294s | 52m 8.315s | 47m 5.456s | 50m 55.042s | 47m 1.541s | ||||
| Time of build | 88m 27.776s | 85m 4.024s | 86m 38.466s | 84m 4.759s | 51m 11.907s | 47m 10.682s | 50m 19.646s | 47m 2.664s |
The test conditions were:
Running the MozillaBuild environment from a RAMDisk made no appreciable difference. In this, I was disappointed, as I figured MozillaBuild may be able to benefit from a RAMDisk location. I guess not.
Placing the sourcedir and objdir in a RAMDisk cut about five minutes off the build time for a debug build, and a little less for an optimized build. The five-minute difference was surprising to me because it was so small. I expected a much larger difference.
The build system still had to refer to the hard drive for every time we went to the C++ compiler and linker. This could be a big factor, because I'd wager Visual Studio took better than 80% of the time in the build. I'm just not that daring.
Overall, if you're looking for a way to reduce build time because you build all the time (tinderbox, anyone?), you can get a slight tweak (about 5.5 percent) putting the source tree and objdir in a RAM disk. Other than that, don't spend the $250.00 on the extra RAM.
I would like to see how I could load VC8 onto the RAMDisk though, and compile from that. If it's possible. For the moment, though, I'm done with this experiment.
Success! After my previous attempts, I have finally figured out how to build Mozilla Firefox 3.0 on my Windows Vista 64-bit operating system. It involves doing a couple things you may not have thought of.
As for the RAM disk part, I haven't attempted that yet. Read on in the extended entry for details.
http://developer.mozilla.org/en/docs/Windows_Build_Prerequisites lists them, but here's my short list:
Don't install them yet!! You have to make some modifications to the above items.
cstrauss offers a fix in the MSYS 1.0.11 tarball I mentioned above. First, you need to install MozillaBuild. Then you unpack the contents of the tarball into C:\mozilla-build\msys\bin\. Since MozillaBuild doesn't work until you do this, you can't just use MozillaBuild's command line. I recommend 7-Zip.
The batch files for guess-msvc.bat don't react well to spaces in file names. MozillaBuild 1.3 can't recover. I found that I could easily specify the install location for VC8, but the others I never figured out. So they ended up with long and spacey directory names like C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2 and C:\Program Files\Microsoft SDKs\Windows\v6.1\. (VC8 I put in C:\VC8Express\.)
The solution? An old MS-DOS trick. Save this as a new batch file (I called mine start-ajv-msvc8.bat).
subst s: "c:\Program Files\Microsoft SDKs\Windows\v6.1" set SDKDIR=s:\ set SDKVER=6 set SDKMINORVER=1 subst t: "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2" set PSDKDIR=t:\ set PSDKVER=5 call c:\mozilla-build\start-msvc8.bat
You'll need to replace c:\mozilla-build\guess-msvc.bat (I just commented out a few lines) with this:
REM -*- Mode: fundamental; tab-width: 8; indent-tabs-mode: 1 -*-
@ECHO OFF
set CYGWIN=
if not defined MOZ_NO_RESET_PATH (
set PATH=%SystemRoot%\System32;%SystemRoot%;%SystemRoot%\System32\Wbem
)
REM if DISPLAY is set, rxvt attempts to load libX11.dll and fails to start
REM (see mozilla bug 376828)
SET DISPLAY=
SET INCLUDE=
SET LIB=
SET MSVCROOTKEY=HKLM\SOFTWARE\Microsoft\VisualStudio
SET MSVC6KEY=%MSVCROOTKEY%\6.0\Setup\Microsoft Visual C++
SET MSVC71KEY=%MSVCROOTKEY%\7.1\Setup\VC
SET MSVC8KEY=%MSVCROOTKEY%\8.0\Setup\VC
SET MSVC8EXPRESSKEY=HKLM\SOFTWARE\Microsoft\VCExpress\8.0\Setup\VC
SET MSVC9KEY=%MSVCROOTKEY%\9.0\Setup\VC
SET MSVC9EXPRESSKEY=HKLM\SOFTWARE\Microsoft\VCExpress\9.0\Setup\VC
REM First see if we can find MSVC, then set the variable
REM NOTE: delims=
REM NOTE: run the initial REQ QUERY outside of the if() to set ERRORLEVEL correctly
REG QUERY "%MSVC6KEY%" /v ProductDir >nul 2>nul
if "%VC6DIR%"=="" (
IF %ERRORLEVEL% EQU 0 (
FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "%MSVC6KEY%" /v ProductDir') DO SET VC6DIR=%%B
)
)
REG QUERY "%MSVC71KEY%" /v ProductDir >nul 2>nul
if "%VC71DIR%"=="" (
IF %ERRORLEVEL% EQU 0 (
FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "%MSVC71KEY%" /v ProductDir') DO SET VC71DIR=%%B
)
)
REG QUERY "%MSVC8KEY%" /v ProductDir >nul 2>nul
if "%VC8DIR%"=="" (
IF %ERRORLEVEL% EQU 0 (
FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "%MSVC8KEY%" /v ProductDir') DO SET VC8DIR=%%B
)
)
REG QUERY "%MSVC8EXPRESSKEY%" /v ProductDir >nul 2>nul
if "%VC8EXPRESSDIR%"=="" (
IF %ERRORLEVEL% EQU 0 (
FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "%MSVC8EXPRESSKEY%" /v ProductDir') DO SET VC8EXPRESSDIR=%%B
)
)
REG QUERY "%MSVC9KEY%" /v ProductDir >nul 2>nul
if "%VC9DIR%"=="" (
IF %ERRORLEVEL% EQU 0 (
FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "%MSVC9KEY%" /v ProductDir') DO SET VC9DIR=%%B
)
)
REG QUERY "%MSVC9EXPRESSKEY%" /v ProductDir >nul 2>nul
if "%VC9EXPRESSDIR%"=="" (
IF %ERRORLEVEL% EQU 0 (
FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "%MSVC9EXPRESSKEY%" /v ProductDir') DO SET VC9EXPRESSDIR=%%B
)
)
REM Look for Installed SDKs:
SET SDKROOTKEY=HKLM\SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs
SET SDK2003SP1KEY=%SDKROOTKEY%\8F9E5EF3-A9A5-491B-A889-C58EFFECE8B3
SET SDK2003SP2KEY=%SDKROOTKEY%\D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1
SET SDK6KEY=HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v6.0\WinSDKBuild
REM Just a base value to compare against
REM SET SDKVER=0
REM SET SDKMINORVER=0
REG QUERY "%SDK6KEY%" /v InstallationFolder >nul 2>nul
if "%SDKDIR%"=="" (
IF %ERRORLEVEL% EQU 0 (
FOR /F "tokens=2* usebackq delims= " %%A IN (`REG QUERY "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v6.0\WinSDKBuild" /v InstallationFolder`) DO SET SDKDIR=%%B
SET SDKVER=6
)
)
REG QUERY "%SDK2003SP2KEY%" /v "Install Dir" >nul 2>nul
if "%PSDKDIR%"=="" (
IF %ERRORLEVEL% EQU 0 (
FOR /F "tokens=3* delims= " %%A IN ('REG QUERY "%SDK2003SP2KEY%" /v "Install Dir"') DO SET PSDKDIR=%%B
REM arbitrary, but works for me
SET PSDKVER=5
)
)
REG QUERY "%SDK2003SP1KEY%" /v "Install Dir" >nul 2>nul
if "%PSDKDIR%"=="" (
IF %ERRORLEVEL% EQU 0 (
FOR /F "tokens=3* delims= " %%A IN ('REG QUERY "%SDK2003SP1KEY%" /v "Install Dir"') DO SET PSDKDIR=%%B
SET PSDKVER=4
)
)
ECHO Visual C++ 6 directory: %VC6DIR%
ECHO Visual C++ 7.1 directory: %VC71DIR%
ECHO Visual C++ 8 directory: %VC8DIR%
ECHO Visual C++ 8 Express directory: %VC8EXPRESSDIR%
ECHO Visual C++ 9 directory: %VC9DIR%
ECHO Visual C++ 9 Express directory: %VC9EXPRESSDIR%
if "%SDKDIR%"=="" (
SET SDKDIR=%PSDKDIR%
SET SDKVER=%PSDKVER%
) else (
ECHO Windows SDK directory: %SDKDIR%
ECHO Windows SDK version: %SDKVER%.%SDKMINORVER%
)
ECHO Platform SDK directory: %PSDKDIR%
ECHO Platform SDK version: %PSDKVER%
For what it's worth, it looks like guess-msvc.bat in its original form did correctly search the registry for the install locations. The batch file just couldn't set the environment variables from that in the most useful manner. The subst command hides the spaces.
You will probably want the 64-bit command line, and DevMo recommends you run it as an administrator. To save yourself some trouble, I recommend going to C:\Windows\SysWOW64 and creating a shortcut to cmd.exe on your Quick Launch bar. Then you can right-click on it any time and tell it to start the command prompt as an admin.
Next, you need to call the special batch file above, which pre-sets the SDK locations. It should also launch you into MSYS, where you can now do everything else you usually do to build Mozilla code:
make -f client.mk configure (Note: This takes a bit longer than it used to, due to wpcapi.h and atlbase.h)make check pretty early on.A couple months ago, I was talking about my new Vista x64 not-yet-building box. It still doesn't work yet, but I now have a clue or two as to what's going on.
I applied the relevant parts of a patch for bug 418938, and I found I could at least launch bash. In doing a little extra searching, based on comment 12 of that bug, I found something very interesting...
Note SourceForge apparently puts most recent comments near the top. Note the comment dated 2007-11-03 19:44 in particular. That sounds exactly like the problem I'm facing.
I'll haven't finished trying the CygWin approach yet, for what it's worth. I simply put it on the back burner for now. Updates as I get them (don't expect edits to this post, though).
For many months, my custom-built WinXP desktop has been giving me blue screens of death, and more recently, random restarts. Since I can't use it to build Mozilla anymore, I decided I might as well take it into the shop for repairs. The company that built it is closed on weekends (grrr), so I dropped it off at Fry's Electronics for a diagnostic.
Several days later, I spotted a computer deal that was pretty hard to beat: a Gateway GT5676 computer, 64-bit AMD processor...
From the Fry's webpage:
- AMD Phenom 9600 Processor (Quad Core Processor) (AMD LIVE!) Operates at 2.3GHz | 2MB L3 cache | 3600MHz System Bus
- Windows Vista® Home Premium 64-bit edition with Service Pack 1
- AMD 780G Chipset
- ATI Radeon HD 3200 Integrated Graphics
- 4096MB DDR2 Memory, Dual Channel (2 x 2048MB), 667MHz (PC2-5300) Expandable to 8GB, 4 DDR2 Slots (Total) | 2 DDR2 Slots (Available)
- 640GB (2 x 320GB) SATA II (7200RPM, 8MB Cache)
- 18x DVD?R/RW SuperMulti Drive featuring Labelflash Technology
- 8-Channel (7.1) High Definition Audio
- High-Performance 15-in-1 Digital Media Card Reader:, xD-Picture Card, CompactFlash I (CF), CompactFlash II, Secure Digital (SD), Mini Secure Digital (Mini SD)1, Multi Media Card (MMC), Reduced Size MMC (RS-MMC)1, MMC Mobile1, MMC Plus, Memory Stick (MS), Memory Stick Duo2, Memory Stick Pro, Memory Stick Pro Duo2, SmartMedia, IBM Microdrive
- 6 - USB 2.0 Ports (2 Front, 4 Rear)
- Amplified Stereo Speakers (USB Powered)
- Elite Multimedia Keyboard
- USB Optical 2-Button Wheel Mouse
- Premium System Design with Carbon Fiber Faceplate
- Gateway® Portable Media Drive Bay
- 56k ITU v.92 ready Fax/Modem (RJ-11 port)
- 10/100/1000 Mbps Ethernet LAN (RJ-45 port)
The price tag? $749.99! No wonder they're currently sold out.
At that price, I figured, why the hell not. So I bought the new machine, and arranged to have the techs throw another four gigabytes of RAM in there, to max it out at 8 GB. With that thrown in, the machine still cost me under $1,000.00 (before taxes, of course). I purchased it a week after I'd brought the old box in for service.
Fast forward two weeks, and I finally get the diagnosis on the older box. I quote:
Completed hardware diagnostic. Found that the unit has a short in the board. After multiple attempts to replicate the problem, the motherboard eventually shuts down at random intervals. Unit may be uneconomical for repair.
Translation: It restarts randomly (which I already knew) and it's not worth fixing. I regretfully agreed with the last point, since it is three years old. I bought the newer machine in hopes that I'd gradually transition from the old box to the new one... not so gradually now.
That was about three weeks ago. Why would I buy such a souped-up machine? Well, the price was undeniable. But I buy powerful machines to build Mozilla code.
Unfortunately, I can't get everything working yet to do that. MozillaBuild spins itself off into the weeds, for reasons as yet unknown.
There's another site that supposedly tells you how to set up a build environment on 64-bit Vista, and it's appropriately named: http://www.mozilla-x86-64.com/. It relies on the older CygWin build setup routine, which anyone who's been around the project long enough knows is a pain in the byte. Having installed one set of prerequisites for the MozillaBuild environ, now I have to install another set for the CygWin one - and they don't line up all that well. The website also feels like it's lacking in documentation - although technically everything might be listed there, just following the instructions is a bit harder than I hoped for. What's worst about this website, though, is there's no obvious contact information for whoever writes these pages. So where I might need a little more hand-holding, especially since not many people have done 64-bit Mozilla builds before, I can't find anyone to hold my hand.
Hopefully, whoever wrote this documentation will contact me. Otherwise, I bought myself a thousand-dollar paperweight.
"Not to mention the most important reason for climbing a mountain."
"And that is?"
"Because it's there."
-- Star Trek V: The Final Frontier (Kirk and Spock)
There's three reasons. One, because it's 64-bit as opposed to 32-bit, I figure everything takes up about twice as much memory. So it's equivalent to 4 GB on a 32-bit system. Two, Windows Vista, I've heard, has one hell of an appetite for memory. Three...
I've often wondered how fast a RAM disk would compile and run Mozilla Firefox, as opposed to a hard disk. So I figured, why not, let's see where it takes us. Too bad I can't build right now (see aforementioned paragraphs).
"I think this 'new' ship was put together by monkeys. Oh, she's got a fine engine, but half the doors won't open, and guess whose job it is to make it right?"
-- Star Trek V: The Final Frontier (Scotty)
I hope there are some others out here who have tried doing Mozilla builds on 64-bit operating systems, and can lend me a hand. I think I bought a nice system for the future. I'd just like to be able to use it for that purpose.
We have entered an interesting phase in the development cycle, what I like to roughly call the end-game. It's a point where sacrifices and unpleasant decisions are made.
In this particular case, it's in seeing a number of bugs which were marked as blocking the 1.9 release losing that distinction. The blocking1.9+ flags are in several cases being changed to blocking1.9-.
It's a sad truth: not all bugs are created equal. Indeed, not all blockers are equal in severity or impact, either, and near the end of a project, drivers end up re-evaluating bugs to see what really needs to block a release. Not enough resources (human in particular), and not enough time.
I've seen this cycle at work, too: bugs that block a release up until a certain arbitrary point in time. That time being, "it's time to ship something." To me, it's a bittersweet moment: on the one hand, very serious bugs are being taken off the must-fix list. (For a bug to get blocking1.9+ in the first place, it has to meet a high criteria.) On the other hand, it signifies that what we have now is nearly ready for our customers, and developers can either spend time on what gets us to a shippable state, or on bugs that, ultimately, don't matter as much as others. In the interest of meeting "when it's ready", bugs that aren't critical to that readiness state get dropped.
I haven't complained about any of the bugs I've observed getting knocked off the blocking list, because the drivers are right about one thing: Gecko 1.9, and its primary child, Mozilla Firefox 3, are in a nearly-shippable state already. We're at the point where it's time to accept the fantastic work done so far with some bugs unfinished. As I said, it's a bittersweet moment: we're at the finish line, we just need to break the tape. We'll deal with the sore ankle some other time.
Now, I just look forward to hearing what the post-1.9 plans are for 1.9 code. There's talk at mozdev of using Mercurial instead of Subversion for the next-generation repository. If I had a clear guarantee that 1.9.x releases would have equivalent Mercurial repositories (or at least tags) to go with them, that'd be a big plus.
I'm running on my Fedora 8 box Mozilla Firefox 2.0. I see a link for Battlestar Galactica, Season 3, on CNN's page near the bottom. What page do I get back when I load it? This one. EW doesn't describe my feelings. Ewww does.
I've been in this business a long time, and I've been browsing the Internet and tinkering with computers a lot longer. So do tell, how does Firefox on Linux differ that much to a web server from Firefox on Windows or Macintosh? The best you've got is the user-agent string, I'd think. One of the biggest goals of Firefox is that web pages look the same on different platforms. More to the point, how do you suggest I upgrade my browser to a totally different operating system?
I've seen some stupid web-discrimination in the past (and I still do from time to time), but this is pretty near the top. There's no excuse for that.
Others can speak more eloquently than I can about the significance of mozilla.org's birth. I'll put it in much simpler terms: I owe my professional career to that event and the years that followed.
I have always been a fan of the Mozilla code base - dating all the way back to my early high school years when Netscape was appearing on the scene. Shortly after I'd finished writing my book on JavaScript, I discovered Mozilla's user-interface had a huge JavaScript presence in it. After a few years tinkering around in the Mozilla codebase, a recruiting agency contacted me and asked if I wanted to do that for a living. To which my answer then - and now - is "absolutely, yes!"
A few years later, I'm working at Skyfire Labs, Inc., (which coincidentally appeared today in the Wall Street Journal), and I'm having the time of my life. I'm doing what I wanted to do, and I'm getting paid nicely to do it. What could possibly be better than that?
So when someone wants to throw a party to celebrate what Mozilla's done for the past ten years - not just at the beginning - I'm there. Mozilla technology made it possible for me to earn a decent living doing what I do best. This community made it possible.
So, to everyone who's written a line of code, filed a bug, written a testcase, figured out how to make it easier on others, or just written down what it does and how to use it... thanks.
As a guy who works on Firefox code on a regular basis, and as someone who recently started reading CodingHorror again, I thought it worth pointing this post out. Jeff Atwood is usually insightful.
That doesn't mean I agree with him, and I certainly don't, here. I'm posting this in the hopes that someone from our Firefox community will respond. Mr. Atwood is one of those voices worth hearing and answering, in my opinion.
Robert Kaiser's comments on SeaMonkey and Mozilla Messaging bring to mind my own thoughts. I'm not sure how well this will be received, particularly as MoMe (sorry, David, I couldn't resist) is just getting started, and what I have in mind might be ambitious.
One thing I remember very clearly about the compose-message part of SeaMonkey, and probably Mozilla Thunderbird hasn't changed this, is its use of a hypertext editor in composing e-mails - in fact, the same basic editor technology that SeaMonkey's Composer, and NVu (I'd bet) also use. It's a <xul:editor/> tag.
This XUL editor element probably hasn't gotten nearly as much love as the rest of the Mozilla code base over the years. Netscape had a good team going on that. MoCo, not so much. Just finding current peers for editor reviews can be difficult, and they have other things to do. (So do I, sadly.) I'm not aware of a great deal of work that's gone on in the editor space over the last few years.
Perhaps MoMe can adopt the editor modules and bring some people aboard to work on them. I've long held an interest in improving the editor, just no time to work on it (I'm busy and need help, too!). A dedicated team of three to five people on the editor code alone would probably go a very long way.
Just my own two bits. Congratulations, guys!
You used JavaScript to write WHAT?
I think it's an interesting article. In particular, the author's comments about JS performance on page 2. Oh, I really want to get my hands on Tamarin inside Firefox...
There's a thought that's been rumbling around my head for a few weeks, and I just want to throw it out there. Wouldn't it be nice, as Tamarin stabilizes, to have a Firefox 3.1 which was the same as Firefox 3.0, but using the Tamarin engine instead of the current JS interpreter? The first fruits of Mozilla 2.0, so to speak, and a preview of what's in store for JavaScript-land. We could even call it Firefox 3.14159. :-)
I have no idea if this is technically feasible or not. Hopefully one or two of the Tamarin hackers can chime in here.
As opposed to a depressing outlook on life four years ago, I'm really quite pleased with my immediate future. I'm rocking and rolling at DVC (we just got some nice t-shirts), and (at least for the moment) my workload is somewhat manageable. At DVC, anyway.
That said, there's still room for improvement. We still don't have a XPCOM debugger - and with Tamarin reshaping JavaScript next year, it may be harder to do than ever before. (Or easier. It's an open question what will happen to JS debugging in the future. But I'll still try to do some kind of 1.9-compatible mockup.) I postponed my Verbosio work again, and I'm trying to find time for that. I'm still overwhelmed with the amount of Mozilla tasks that I can't find time for, not to mention a number of other very worthy projects to help out on, all of which I have repeatedly dropped the ball on. About the only one I still participate in on a regular basis is CodingForums, where I've been moderating the XML forum for over five years, and helping out for over ten (though even that's suffered lately).
Not to mention the complete (and I do mean complete) lack of a life. For the first time in a decade, I am not able to fly home and visit family this year. Christmas this year will be very, very lonely.
Here's a hint for anyone just entering the software industry: you can find yourself loving your chosen hobby too much. It's happened to me, and though I've benefited in some ways, the tradeoffs hurt.
A few other random thoughts...
Today's Dilbert is probably an old joke, but a good one.
This morning, I noticed something funny about how I approach various operating systems.
When Microsoft Windows Vista was released, I stayed way the hell away. I have a (nearly) perfectly functional Windows XP box, deliberately overbuilt when I bought it so it would last a while. The news reports about Vista were less than flattering, and ditto the blogs. Despite the occasional BSOD, which I now accept with mild grumbling, Windows XP is sufficient for my needs and the last thing I want to do is install an operating system (again) - and all the necessary build software - for building Mozilla. With Vista Service Pack 1 not too far off, I'm still convinced of the rightness of my decision.
Apple's Macintosh OS X 10.5, code named Leopard, was released a few days ago. At first I was tempted to go get it, but then I noticed my laptop's antivirus expires in a couple months. So again, I'm taking a wait-and-see approach, letting the AV program run out before upgrading. Again, the machine is adequate to my needs. I haven't fired up my Mac Mini in a little while, probably because I don't have a monitor dedicated for it or a desk big enough. (I'm lazy on that front.)
The Fedora Project will release the Fedora 8 edition of Linux in seven days. Yesterday, I pre-ordered a copy of it. Two USA dollars plus shipping and handling, from an online vendor. (When Fedora 7 was released, I set my box to downloading it - first by FTP, which died a couple times, and then by Bittorrent... but in deciding to be generous to others and allow for twice the upload amount as the download amount, it took three days to reach that 2.000 factor. Thanks a lot, Comcast.)
Here's the part I don't rationally grok. With Mac, and especially with Windows, I perceive a fair bit of pain with upgrading the operating system. With Linux, it's not even a question - I like it, and I actually look forward to the latest & greatest.
I had some rough experiences with Kanotix, a Debian-based system, but primarily because I couldn't get LILO to default to Windows at the time. I have had some good experiences with Fedora in the past, and I still do. Maybe it's because I don't hear nearly as much bad stuff about Linux in general that I'm willing to trust it more. Maybe it's because I can get copies of a Linux-based OS dirt-cheap. (Legally, too. I don't do pirated software.) Maybe it's because building Mozilla has the lowest barrier to entry on Linux - almost everything comes with the default OS installation. (The debuggers are extremely painful to use, though.) Maybe it's because the malware community fears offending the (very smart, very persistent, and very loud!) Linux-based developers community. Maybe it's because of the frequent updates Fedora offers - average one set every week, I've noticed - far more often than the Two Titans.
I don't know what it is, really. Ultimately, I don't think I care. Fedora's brand of Linux is one I simply don't have any cause to question. With Windows or Mac, I'm 90-95% sure that I'm at fault when something unexpected happens. With Linux, it's 99.9%, at least. I simply take for granted that Linux Really Does Work... and for a developer, that's saying a lot.
(It's not 100%... see http://sourceware.org/cgi-bin/gnatsweb.pl issue 2353. Granted, I reported it last night, but...)
This week in the evenings, I've been banging on the inter-process communication (IPC) bug to try and get it working for me, with little success. I finally remembered about noon today that your standard output stream is buffered. So now my blocked testcase has been hit with a plunger (pun intended).
So among the several things I tried was a NS_ERROR break in the IPC code, along with GDB, the GNU Debugger. Here's roughly how it turned out...
GDB: What'cha doing? XPCShell: Watching the Web, having a bug. GDB: True, true. (phone rings) XPCShell: Hold on... Hello? run_test(): Whassup??? XPCShell: Whassup??? run_test(): Hey, where's Perl? XPCShell: Let me check. (shouting) Yo, Perl! Hey, pick up the phone! IPC: Avon calling... Perl: Just a minute... let me start up... (grumbles) Hello? XPCShell: Whassup??? Perl: Whuzzuuuuuuuuuuuup? run_test: Whassup??? Perl: aaaa XPCShell: aaaa run_test: aaaa IPC: aaaa GDB: (click) XPCShell: aaaa IPC: aaaa... assertion! *cough* *cough* *hack* (silence) Perl: ... XPCShell: ... run_test: ... Perl: ... run_test: ... XPCShell: It wasn't me. (user quits XPCShell, and the party ends.)
(With apologies to Budweiser, Shaggy and of course, Charles Stone III. Can we get a Red vs Blue PSA on this?)
While I wrote this to let off some steam, the important thing here is how GDB -- and XPCShell -- reacted when the assertion tripped: GDB remained attached, but for some reason when the assertion tripped, GDB didn't break on it and XPCShell didn't stop executing. GDB's "set detach-on-fork off" (which GDB itself suggested) didn't help much.
This presents an interesting problem. Assertions are fatal, but XPCShell didn't die from it in this case and GDB didn't pick up on it.
I'll file a bug on it later, if I can be convinced that I didn't miss something with GDB. GDB and I have not always understood each other.
That may change. The big reason I undertook IPC is to wrap GDB in a Mozilla app for debugging other Mozilla apps. You would be wise in asking, "Why another debugger? We have Eclipse, GDB, WinDbg, XCode, Visual C++..." The answer is two-fold. One, it would be a common platform using technology Mozilla developers are very familiar with. Two, it's way past time we built a XPCOM debugger - something that can take the native C/C++ stack and translate it into a multiple-language stack (JavaScript, C++, Python if Mark Hammond's feeling generous, et cetera).
Linux and Mac have GDB, and Windows has a little-known equivalent called CDB. If I can drive them via IPC, then I can write a common interface for components to drive them. One more layer of abstraction, and I can translate js_Interpret, js_Invoke frames in the C++ stack into JS frames in a XPCOM stack. From there, we're rolling.
I'm tentatively calling this project Coroner. We'll see how it goes.
This week, I had a series of "great" ideas for things I wanted to do with Mozilla code, starting with a gripe from three and a half years ago. Some of them worked, some of them didn't, and it's generally evolving.
Tonight's idea, for instance, was to start using XTF to augment XUL's capabilities. However, since XUL is a predefined XML language in Mozilla, XTF can't share the same XML namespace. No problem - a second XML language, plus display: -moz-box, and I'm in business. It'd also mean explicitly defining the public interfaces to these elements in IDL, something I'm not opposed to.
I'll get back to this subject in a bit, but I need to express another thought here. These two subjects are related, and frankly I've been chewing in silence on this other subject for months now.
I've been very concerned about the plans for Mozilla post-1.9. On Mozilla 2, everything I'm hearing about there is fantastic, and I'm chomping at the bit to get my hands on some of it. Mozilla 2.0 final, though, is a very sizable change. I bet conservatively on 2.0 and believe it won't be ready for at least 18 months. This means I'm very unlikely to start hacking on it for at least six months to a year - except when I want to get patches reviewed for check-in. :-)
This brings me back to 1.9. Simply put, once it's out, it's going to be The Premier Mozilla Application Platform for a long, long time in "software years". Yet there's been practically no talk in public on what happens to 1.9 code after 1.9 comes out.
As a professional Mozilla software developer, this worries me. Whatever the plans are for Mozilla post-1.9, there's been no discussion of them in public. So while everyone's getting really hyped up about Mozilla 2, out here in the real world, where people are building real applications based on Mozilla 1.8/1.9, we're left wondering "what's next"? The leap from 1.9 to 2.0, while exciting, is also scary. The biggest scare, in particular, is "while we're waiting for this new product that's going to blow our minds, how do we improve on the common platform we already have?"
There is, of course, an obvious comparison to the Mozilla 1.8.0.x/1.8.1 branches (Firefox 1.5, Firefox 2). The 1.8.1 branch was successful, but there were two drawbacks:
We had 1.9 for unrestricted development, so it wasn't a real problem. The 1.8.0.x branch was (rightfully, in my opinion) far more restricted after Firefox 1.5 was released. There, it was strictly in a maintenance and security patches mode, much like 1.8.1 branch is now.
If all development on 1.x stops after 1.9 (aside from the obvious security and regression fixes), then here's the scenario:
This scenario, for me, is a problem. I'm all in favor of both of these... but I also think we need a middle ground. Something we can work on from 1.9 that doesn't break backwards-compatibility, but lets us continue on a major milestone path, checking in much like we have for the pre-1.9-release cycles. It's a contingency for corporate consumers of Mozilla-the-platform, who find themselves with too many nasty bugs that just couldn't get fixed in 1.9.
Which, finally, brings me back to my original point, and subject matter of "Overwhelmed".
Tonight, I decided to start work on a personal copy of the Mozilla source. I have traditionally maintained a single tree per system, and that tree I've kept nearly pristine. However, I've also fallen into a forest-for-the-trees trap, where I look at individual bugs-of-the-moment without considering what has bothered me for years. At present, I'm directly cc'd on, the reporter for, or the owner of about 600 open bugs in mozilla.org's Bugzilla. I can't possibly fix all of them quickly (and keep my day job), especially since reviewers themselves are also perenially swamped.
So I went through the list and tried to figure out which bugs and missing features I considered critical - things that make my life as an editor and software developer harder than they should be. I expected to find 10 to 20. I found over sixty:
* Spreadsheet controls
* Scrollable content model
* nsITransaction* enhancements
* bug 380089, XPCShell tests
* Exposing TransactionManager to web content (maybe)
* Veto Transaction capabilities
* Nested transaction listeners
* Bug 362694, Noticeable perf issues with transaction components.
* Bug 204793, Editors need procedure for using alternate TxMgr
* bug 369571, Make nsEditingSession extensible (makeWindowEditable) via JS components
* IPC (bug 68702)
* Unnecessary exceptions (see http://weblogs.mozillazine.org/weirdal/archives/018562.html)
* XPCOM/XPConnect enhancements
* bug 380169, nsXPCWrappedJSClass::CheckForException needs a way to silence XPConnect reporting component errors temporarily
* bug 392004, Resurrect nsIScriptableInterfaceInfo and friends
* bug 228205, Redesign nsIConsoleService and related APIs
* Component property localizations
* JS to C++ XPCOM rewriter Perl script
* C++ to JS XPCOM rewriter Perl script
* bug 229824, Add function stack trace to DOM exceptions
* bug 389370, JavaScript stack frames through DumpJSStack are usually one line off
* RegExp support from C++ (bug 106590, bug 348642)
* bug 381191, [meta] Reduce code duplication in js xpcom by using the import module (XPCOMUtils.jsm)
* bug 383566, Imported module objects can have their properties reset
* DOM bugs
* Better XPathNSResolver implementations
* bug 304514, nsContentIterator::Init(range) doesn't consider Document nodes
* bug 247397, Spit Warning to javascript console when a document contains duplicate ids
* bug 283861, Want Text3.isElementContentWhitespace
* bug 166419, Mozilla's DOM Ranges don't support comment nodes
* bug 157373, Range.selectNodeContents(document).toString() returns ""
* bug 366944, Range.surroundContents doesn't check node type early enough
* bug 383650, Provide API for getting a nsIDOMCSSStyleSheet from nsIStyleSheetService
* bug 302775, extractContents doesn't work if start and end node of a Range object is an attribute node [@ nsContentSubtreeIterator::Init]
* bug 332148, extractContents clones nodes when it should just cut them
* bug 306058, tabindex attribute on XUL textbox breaks tabbing backwards
* bug 370031, Cycling through tabindex among HTML inputs only works once
* bug 383109, Tabbing order does not follow specified tabindex order
* bug 344850, Tabbing from <radio> or <textbox> with tabindex fails
* bug 315805, setAttribute("xmlns", "...") should throw
* bug 318086, No XML Declaration when serializing
* bug 326745, Support XPath in Mozilla crossing content boundaries
* Support XPathGenerator in Mozilla crossing content boundaries
* bug 330426, Script elements in XUL documents have no child nodes (with inline scripts)
* bug 42976, Implement cloneNode() for XUL and HTML Document nodes
* bug 73681, Child Nodes of Attr Nodes have a parentNode property set to null.
* bug 269482, Allow <svg:use> to reference elements in other documents
* bug 288513, add support for DOM 3 setIdAttribute*
* bug 69799, External entities are not included in XML document
* bug 352539, Implement SAX InputSource
* XTF bugs
* namespaced attributes
* bug 346754, Kill append related methods and enums from nsIXTFElement
* bug 358257, Add support for XTF attributes
* XUL bugs
* bug 312869, Support XUL textboxes accepting new context menu items
* bug 367009, Radio elements always assume to be in a radiogroup
* bug 362321, XUL decks assume the selectedIndex attribute has been set
* bug 246407, <xul:textbox type="file"/> is recursion-happy
* Testing bugs
* bug 384339, The check-interactive code executes head, tail scripts before the user runs
* bug 360294, XR (XULRunner) testing infrastructure (mochikit-like)
* bug 359830, Simple make check target for running xulrunner based unit tests
* Custom JS modules
* ArrayConverter.jsm
* ecma-debug.jsm
* XMLValidator.jsm
* XPCOMUtils.jsm service improvements
That's "overwhelmed". Even with ten percent of the original bug list, it's still one hell of a lot. Factor in my day job, plus helping out with OpenKomodo / building Verbosio, plus those "bugs-of-the-moment", and I can suddenly understand why I'm thinking, "Yeah, 1.9 is going to be good, but... it's just not good enough."
Plus, we're already very late into the 1.9 cycle. Very few, if any, of these would make 1.9 at this point. So I don't have a choice - I can't stick them into 1.9. I don't want to try sticking them in a 2.0 build that may undergo radical changes, to where code that passes reviews for 1.x wouldn't be taken for 2.x under the new Mozilla C++ styles. I need these fixes, and I hear no news that confirms there will be a home for them.
Barring a 1.9+ repository and plan which allows these real improvements -- not just security, not just regression-fixing -- I'm pretty much isolated until Mozilla 2 matures. That means I can't offer real-bug fixes to a community, and I can't get real-bug fixes from a community. That is what worries me.
I'm not posting this as a rant against the Mozilla Foundation for their management of the repository or their resources - on the whole, they've done quite frankly a pioneering and fantastic job. I'm posting this primarily to see if, in the event that the repository managers decide not to offer a middle-road approach like the one I came up with, a community like MozPad (which really is bigger than Matthew Gertner) can offer that middle-road. I'm posting to see if there's room for hosting a community fork (all right, I finally said that four-letter word, I really wish I didn't even bring it up or think about it) of the source code, where development can continue with at-least-unofficial milestones for the community - which isn't entirely lonely, irrational hackers in their apartments. (I at least hope I'm not irrational.)
If there's one thing I can critique the Mozilla Foundation on, it's on not having a discussion in public about 1.9 code after 1.9's release in the face of Mozilla 2. Your community cares, guys. So do corporate customers which help to evangelize you. Please, if you're going to make the decision without our input, at least tell us what you're thinking.
(P.S. Somewhere in here I meant to make an Apache 1.x versus Apache 2.x analogy. But I'm not familiar with the history of the Apache project, and I just couldn't find a spot for it in here anyway.)
From the Mozilla 24 upcoming.org page:
Stanford is a 20 minute walk from the Palo Alto train station. Visit 511.org for details on public transit.
Hmm. I looked on 511.org, and it suggests walking that distance. Too bad I don't know my way around the University...
The northbound Caltrain arrives at Palo Alto Caltrain Station at 9:31 am, leaving San Jose Diridon at 9:00 sharp. The day pass from San Jose to Palo Alto and back is eight dollars.
So here's what I want to do. Anyone going to Mozilla 24 @ Stanford by Caltrain from the South Bay, let's meet in the northernmost car (the bike car, usually). I'll be wearing a blue Firefox shirt and carrying my usual light blue laptop bag, boarding at Diridon. If you're heading to the event by Caltrain, please reply here and join me. All we need is one person familiar with the University, and we can head off together. Otherwise, we can wait for the southbound train 30 minutes later and join up with our Franciscan colleagues, or we can ask a local for directions. :-)
(No offense to our Chinese readers or their communities is intended.)
There have been quite a few major storms lately. Erin has dropped to a tropical depression out in the Pacific. Hurricane Dean's making a mess in the Caribbean and the Gulf of Mexico. (Category 4. Oh, boy.) One storm we're not hearing much about in the U.S.A., though, is Super Typhoon Sepat. It's heading northwest, straight for the heart of China, with a pit stop in a rather controversial island. The Phillippines already took a hit from this one. (I call it a Super Typhoon because earlier stories rated it a Category 4, though right now I think it's somewhere between 2 and 3. Still a monster, though.)
I was browsing around on Google News this morning before leaving for work, trying to find out a bit more. Most of the headlines were appropriately serious - but one of them didn't make a whole lot of sense. From the Shanghai Daily: Typhoon Sepat to cool city over weekend
I'm sorry, but I burst out laughing when I saw that one. Only in China is a super typhoon considered good news.
(The story does mention the seriousness of the storm leading to closures and heavy weather preparations - but in the typical reverse-pyramid style of newswriting, lesser facts are put at the end of the story. As a former Journalist for the U.S. Navy, I can say this story is written that way. Apparently, the danger a massive storm brings is less important than shaving a couple degrees Celsius. Go figure.)
Generally speaking, when I post requests for help on my blog, it's for some little bug that has me stumped. This time, it's for something longer-term.
The company I work for, DVC Labs, wants Mozilla experts. Simply put, we're swamped right now and will be for the foreseeable future. We're also pushing the boundaries of what Mozilla can do, with an interesting twist that I can't talk about publicly. (Start-up life. You know how it is...)
So if you happen to be a Mozilla developer frustrated with where you're at right now, or you're looking for one of those once-in-a-hundred-years, win-the-lottery types of deals (I won't go so far as to claim "Google-IPO" type of deal... I'm not that brash), ring my company phone. I'll pass it on to my supervisor, and we'll go from there.
(E-mail removed, as I only got one actual response and a couple dozen spam since.)
It occurs to me that various people are working on editing tools or extensions to Mozilla to support editing. I know of some of them:
All things considered, that's quite a list. Each individual contributing has their own itch to scratch, and the projects don't really compete with each other. (You might argue that ETNA and Verbosio compete, but I don't see it that way. Verbosio's an experimental project right now.)
Three of the others I met through Mozpad. (ETNA we haven't heard from yet, but we haven't gone out of our way to invite them either. Oops.) This makes me think we could form a small working group over at Mozpad - not for the IDE (which is apparently going to be Eclipse), but for smaller editing applications.
What would this new group try to do? I don't know yet. I suppose the starting point would be for us to share ideas and code - and avoid duplication of effort. I personally doubt we'd try to develop a common editing tool anytime soon, seeing as our efforts are going in different sub-sets of editing right now, and we're all pretty busy. I think my initial intent is to answer questions from community members about what work is going on in the editing space, and who's doing it, and how developers could contribute.
Then again, maybe none of us have the time for that...
UPDATE: Okay, so ETNA is alive and well. I just haven't heard much about it lately. (It's not my fault Laurent isn't on planet or the moon. :-) )
I was just thinking Friday @ noon Pacific time that any such group as I describe above should probably start with a simple wiki page on mozpad saying "Here's what editing tools work is going on, and who's doing it." Then I don't have to guess about who's doing what. :-)
Mr. Roadshow from the San Jose Mercury News
I landed in the newspaper yet again. I don't know how I do it. (It's also my 400th blog entry.)
Every now and then, I have a really good idea, something that I think would shake up the authoring/editing community and add simple, useful capabilities we've never seen before. Basically, I run into a problem when I'm working on code, and I come up with a solution... but I just don't have the time to prototype it, implement it, and see how it works out. I figured today that I might as well throw a few of these ideas out for the community to chew on.
UPDATE: I forgot to mention - if anyone wants to implement these ideas, go right ahead. :-) I'm posting them because I don't have time to do them myself right now.
I'd like to see what the Mozilla community - and the authoring / editing tools community at large - think. The ideas I'm sharing now are in the extended entry.
Problem: When working on chrome files or component files, often the object directory file is an exact copy of a source file. In cases like this, the operating system can create a symbolic link, or "symlink", between the two. However, for files that go through a preprocessor, where other files can be included, or sections of the source file dropped, it's not an option. Despite this, the source file and the object file aren't that different. Sections of one match up with sections in the other.
More specifically, when I get a stack trace from a JavaScript file that's been preprocessed, the JS source lines rarely line up to the object source line numbers.
Solution: Create an annotation (either in the files or outside them) which
links sections of source files to corresponding sections of object files. I
call this concept a "sub-symlink". (I don't know if anyone else has come up
with the idea.) A smart editing program can read these sub-symlinks, and when
you edit a section of code in the source file, it can update the
corresponding section in the object file. Even better, if I want to edit the
object directory file (which for XUL, JavaScript, CSS, etc., don't need to be
compiled), then the changes can reflect in the source directory file right
away, and I don't have to call make on the object directory
again. The smart editor becomes responsible for propagating the change,
including to multiple object directories based on a single source directory
if the user so desires.
Problem: Whenever I go into debugging mode, trying to fix an error, I'll try a bunch of different things. Usually, three or four different approaches don't work. Unfortunately for me, I tend to forget when I've tried an approach - so I end up trying it again thirty minutes later. On the other hand, I'll also tend to forget what changes I've made, so if I end up taking a path that can't work, I want to go back to a set of changes which are better than the original state of affairs.
Solution: Use a revision control system instead of the ordinary file system for storing changes - and when saving a file, export from the VCS to the file system. By this, I don't mean "check changes into the remote repository and see if they work" - rather "check changes into a local repository, which has its own version tracking separate from the remote repository. Then see if the local changes work."
This also has the benefit of permitting comments for each change set, so that I can annotate what I'm trying to do. You could also store all kinds of metadata (including annotations for sub-symlinks!) in the repository. Additionally, undo/redo takes on a whole new meaning - tree-based instead of linear. Just creating the user-interface for that should be interesting.
Subversion could work for this
(especially if the editor has access to svnadmin and is very
careful about how it interacts with Subversion). However, a distributed
revision control system such as Mercurial would work even
better, since you have a local copy of the full repository already, and full
rights to commit to your local repository without affecting the primary one.
(I didn't understand this at all - what a distributed RCS does better than a centralized RCS, until I read this sentence from the unofficial Mercurial book: "What distributed tools do with respect to forking is they make forking the only way to develop a project." To track a series of change sets while keeping those change sets from reaching the central repository, you essentially have to create a forked copy of the repository - even if it only lives for a few hours. So, a local repository can hold unstable, not-ready-for-bug-attachment changes - and the editor can interact with the local repository.)
The downside is that your project then becomes beholden to the license of the revision control system. This can present real problems, when you want other neat capabilities from open-source projects with incompatible licenses. This is one of those cases where the LGPL is more useful than the GPL...
Problem: For all the strengths Bugzilla has, it's really hard to make a change to a patch. What happens is the reviewer says "Do this instead of what you're doing here. r+ with that change." Then the original patch author makes the change locally, submits a new patch to Bugzilla, and checks it in.
Solution: Review approvals are really about agreeing to sections of a patch, and more specifically about disagreeing to sections of a patch, suggesting improvements. (I am ignoring r- issues for "this patch is not even close to being ready".) Here, distributed RCS's may offer us a new working model:
It's a few more steps, and Bugzilla has to do a bit more work (needing a bigger hard drive), but it allows for interactive editing of a patch. Less work on the part of Alice, and Bob's and Catherine's suggested changes go right in.
I know this is totally off-topic for Mozilla, but I find myself wanting to take up a new hobby, carpentry. To spare people who don't care, the rest of this entry is in the extended entry.
For the last couple of years, I've had a desire in the back of my head to do a little bit of woodwork. I can't put my finger on why, but when I was a little kid, my dad gave me a bookcase that he himself had built when he was many years younger. Last year, I asked him if he and I could just spend some time building something, but we never found the time to start.
Today, I wandered into four different furniture stores, looking for a new computer desk to handle my four computers. When I looked through the catalogs, though, not one of them really impressed me enough for me to say "I'll take that - here's a check." Walking away from the second of those stores, I found myself thinking about the kind of desk I wanted: one where I could slide my chair into the center, and swivel in the chair from workstation to workstation. A circular desk, in other words.
Not many people make circular desks, though, for the general public. Even Google turned up only one manufacturer in the first 100 search results for the phrase "circular desk". Of course, I can custom-order it, but that's going to cost a pretty penny.
Instead, if it's at all feasible, I'd like to simply build it myself, under the guidance of a craftsman. It'd be a spare-time project, and I'd certainly take it more to heart now than I did in eighth-grade shop class.
There's also the consideration rumbling in the back of my head that I may not be able to do computer work forever. Don't get me wrong, I still love programming and designing applications - but twenty, thirty years from now, who knows what software engineering will be like? Will I even be able to do it then, or will my skill sets be totally mismatched to the industry in that time frame?
An even better question to ask is "Will I want to do it anymore?" A colleague of mine and friend (whose name many Mozillians would recognize instantly) has decided to get out of software engineering entirely. (No, I'm not talking about Jamie Zawinski and the DNA Lounge. This is much more recent.) Right now, I can't see why he made that decision, probably because I can't see why I'd make that decision. I love it too much to even think about leaving right now. But twenty years from now...
The thought of me not doing software engineering actually scares me. For over twenty five years now, messing with computers and seeing how to make them more useful as tools has been an overriding theme in my life. I've even managed to build a career (for the moment) out of it, without spending a day in college. That's no mean feat in the 21st century, but there may come a day when I can't - or even worse, don't want to - do it anymore. If I don't have another way to support myself, I'll sink -- and I don't mean just financially.
Oh, I love writing, and a few other things, but none of them really leap out at me as anything that I can currently support a family on. As good as things are now, I really don't like not having a fallback plan, some other set of useful skills. But to be perfectly and bluntly honest, I don't have any other trades.
So: Carpentry. I think I could learn that. It might even be fun. Certainly I love the smell of fresh wood.
Last night, Sci-Fi Channel aired the USA premiere of "Ghost in the Shell: Solid State Society". As I am a fan of anime in general and sci-fi anime in particular, I was quite thrilled about it. This follow-on to the original movies, and more specifically the Stand-Alone Complex series (plural), lives up to my expectations. A good tale, one that makes you think - and that, my friends, is the hallmark of really good science fiction.
Since I don't do movie reviews on my blog, I'll leave it at that. The DVD comes out next month, I believe.
The producers behind GitS have also indicated this isn't the end of the SAC series. So I'd like to suggest to the folks at Mozilla Japan (and fans in that part of the world) that maybe we can get a little inside joke into the next series.
Specifically, this little guy. The way I envision it, Chief Aramaki digs up a little robotic doll reminiscent of him, and gives it to Togusa's daughter for a birthday gift. The "old ape" (SeaMonkey reference) talks about how his brother passed it on to him years and years ago, and it's become a pet (much like how many of us treat our preferred Internet browser). As the storyline for GitS only takes place about 30 years into our future, people like Togusa and Aramaki would certainly remember it from their own younger days.
Call me silly, but I like nice touches like that.
Several days ago, I asked in this blog if anyone knew how to create a category-based feed for moon.mozpad.org. I got no responses on that. Nor did I find anything useful in the MovableType documentation, or in the help forums, or on Google's searches.
That, plus the newest rounds of blogspam I've been getting, are starting to become really, really annoying. Also, I just love messing with XHTML, and being able to serve a blog as application/xhtml+xml would be nice. Being able to throw SVG in there, inline, would be even nicer.
So, without wanting to host it myself, I'm wondering if any popular blogging platform can do all of the above - easily - and also import all the entries and comments I currently have on this weblog. If a fellow Mozillian would be willing to host these thoughts, and can do the complete import, I'd be quite happy. I simply want to migrate to a new blogging platform that is a little more customizable and easier to make changes to.
UPDATE: It seems everyone's recommending WordPress. Okay. :-)
I'm also cleaning up Ludovic's reply, and finding myself wishing Firefox had search & replace capabilites for HTML textboxes and inputs. Please tell me if you know of an extension to do that...
How would you build it?
Over the next few decades, the United States of America has expressed an intent to place a man on Mars. While it does have its coolness factor (akin to landing on Luna, our moon, in 1969) and an enormous price tag, it leaves a number of questions. For example, how do we protect (and for that matter, define) the health of the astro/cosmo/taiko-nauts? What equipment should we take (i.e. what we would do there)? Should we leave room for cargo - bringing Mars rocks back with us? A question that interests me, though, is how we would keep in touch with the fourth planet, particularly with something more than just radio and digital pictures.
More thoughts in the extended entry.
Nowadays, we take for granted that we can send an e-mail with an attachment to someone we're chatting with, real-time, and they can see the attachment almost instantaneously. We take for granted that we can fetch a webpage and see it in seconds. We take for granted that if there's ever a problem, we can at least talk to the people who can fix the problem right away.
The laws of physics as we understand them now tell us we can't take that for granted between planets - or even between Earth and Luna. Any physicist, and for that matter most amateur radio operators (like me), will tell you there's a time delay you can't beat right now: the speed of light. Even to the Moon and back, there's a measurable delay in a transmitted signal. From here to Mars, well... hours.
Existing browsers can't really function that way, at least not directly. When you request a HTML page, your browser gets the source code behind the page, and then discovers it has to fetch four JavaScripts, two stylesheets, and twenty images. The stylesheets want thirty more images. All these requests traveling back and forth over the light-minutes of space would be a horrible user interface for the people using it.
In a situation like this, the best answer I can come up with would be a special proxy on Earth. The proxy receives a request from Mars, and acts on it to get all the requested documents. Then it packages them up and sends them in one big burst to the recipient. Both the client and the proxy would have to be based on a similar platform, so the client really gets what they expect.
Even this way, it might be horribly slow. You might as well find out ahead of time what interests the people on a mission to Mars, and send an intranet server with them - which would pre-fetch pages they're most likely to look at. That way, they wouldn't have to wait as long... (I don't want to get into discussions of who would provide the Internet content to the travelers - especially since that leads into questions of monitoring the content and privacy.)
There's also the "kiddie" factor - imagine a webcast from Mars to students in a classroom on Earth. The kids would have to send their questions on one day, and wait until the next for any response. Then if they wanted to ask more questions, that's another day.
For me as a Mozilla developer, if I were ever fortunate enough to go to Mars, I'd want to set up a special mirror of the current Mozilla trunk, which gets synchronized daily or weekly. Even a simple CVS or SVN query - or Hg, or Bazaar, etc. etc., might need customization to work with such long distances. On the other hand, because carbon-based life forms are the biggest speed limit in software development, the pace of patch reviews would not change appreciably. :-)
Seriously, even on the journey to Mars, the crew would need something to do besides fly their ship and maintain their scientific equipment. I break the tension myself by reading - and occasionally writing - science fiction. Twenty years from now, we'll be so adapted to having data at our fingertips instantly that to drop back to "we'll get that to you in a few hours" will feel like we've slipped back a century. Having some semblance of the Internet "out there" might help a bit.
Put another way, the Spirit and Opportunity rovers send us back pictures. I personally don't know if they send video or not. But in any case, human beings will need a lot more bandwidth than a dinky little remote-controlled robot...
That's my opinion. What do you think?
A few days ago, I took my Windows desktop into the shop again - this time to pull the second hard drive (which had always been dedicated to Linux) and stick it into a new Linux computer. Dual-boot with Fedora Core didn't work, and I'd never really used the Kanotix install on the second drive anyway, so I figured I just needed a new box.
So I've got it, and I'm rather pleased. Now I've got platform coverage on all three major Mozilla platforms for the trunk, and I don't have to do any great acrobatics.
One small problem though: two desktops, two monitors, three keyboards, three mice, a Mac Mini, a MacBook, a router, and a cable modem take up an awful lot of space. I bought this cheap flat table from Office Depot a couple years ago, and now it's pretty full. I've never known anyone to really make a computer desk especially for multiple computers... and I need one. :-)
Oh, and Verbosio looks pretty good - but not perfect - on Fedora Core 6. Screenshots forthcoming... when I have something new to show.
UPDATE: A lot of people have replied saying, "Why don't you try a KVM?" The answer is I have tried it before when I bought the Mac Mini. The picture degradation made it an instant bust.
Synergy I haven't heard of, and I will take a look.
This isn't something I do much, but in this case someone else made the announcement and it hasn't hit planet yet.
Neil Deakin and I were both interviewed by the Mozilla Digital Memory Bank project - Neil last June, me a couple weeks ago. The home for both interviews is here.
When the announcement from MDMB does hit planet.mozilla.org, I will probably delete this entry.
Anyone who knows me really well knows I'm a pretty big fan of Star Trek, although not the type to go to conventions. (Or at least, I've never gone out of my way to visit one.) I even submitted a story to the Strange New Worlds VIII contest, although it was rejected - and thankfully, not for technical reasons. (For those who wonder, the title was "Peanuts, Popcorn, Hasperat!". I'll give my fellow fans one guess what it referred to.)
When I was growing up, I remember watching the Nickelodeon channel, in particular for episodes of Star Trek: The Animated Series. As with the other Star Trek series, I'd never seen all the episodes in the series, nor had I had the opportunity to do so. Thank goodness for DVD's, even if they do come twenty years late!
Today, I wandered into the local comics shop (where I've been picking up issues of Battlestar Galactica comics - thank you, Ron Moore, for endorsing that). I'd seen the Animated Series on the shelf before, but I didn't buy it then. I bought it today, and I'm finally getting to see episodes of this classic, semi-canon series for the first time since I was a young teenager.
Personally, I've always felt that the animated series completed the Enterprise's original five-year mission. The original series ran for three seasons, which translates to about three years (something which later series have confirmed, as we watched Wil Wheaton and then Cirroc Lofton grow up on screen). Today, I discovered ST:TAS lasted two seasons. Three plus two equals five. A nice coincidence (even if that very last season only had six episodes in it). Of course, I'm not counting the books, of which I have dozens.
Sadly, I don't get to feel like a kid again. I'm watching the new episodes, and while I enjoy them, my ears and other senses are picking up on little things that I didn't notice two decades ago.
Now this is just a thought from a fan, but I'd like to hear Scott Bakula, Jolene Blalock, John Billingsley, etc., etc. (and yes, Jeffrey Combs) get together and do a few seasons of Enterprise as an animated series. Putting aside the rather excellent book, "The Good That Men Do" by Andy Mangels & Michael A. Martin, there seemed to be no shortage of ideas when Enterprise ended.
Judith? Garfield? Please?
Heading into the Mountain View Dev Day this weekend, where I expect to be fairly serious, I'm going to allow myself a bit of levity and offer a true story of cluelessness which would make Tim Allen ("What is the headlight for on that thing, anyway?") proud - and maybe even Jeff Foxworthy.
Ah, the rigors of bachelor life...
Last Saturday, I was trying to vacuum my apartment using my almost-new vacuum cleaner, which I bought from Sears in the fall. The last few times I'd tried to use it, though, were disappointing at best. It's got a nice HEPA air filter which wasn't getting filled. Plus it was making an unusual sound about three seconds after I started it. I figured the hoses were blocked (I'm not entirely clueless), so I took the big one from the filter to the vacuum motor out and looked through it. All I saw was blackness.
Since the hose itself was black plastic and had a bend through it at the end, I thought the blockage was further upstream - in the vacuum head, where the spinning brushes meet the hose. So I grabbed the screwdriver, dismantled the head enough to get at the hose (after unplugging the vacuum - there's clueless, and then there's Darwin award clueless) and did remove a couple pieces of plastic film. I looked through to make sure it was clear, and sure enough, I saw a little light poking through.
That should've been a clue that I wasn't thinking clearly (pun not intended), but I missed it and put the vacuum cleaner back together... or at least, I tried to. I spent the next half hour wrestling the roller back in, keeping the rubber loop extended, and trying to screw the plate back in... and it wouldn't close. No matter how I tugged on the plate and pushed on the head, the two wouldn't meet.
Today, the technician arrived at my apartment (a couple hours later than the scheduled time, but I'd moved since I bought the vacuum, so it wasn't entirely his fault). He started doing the same things I had already tried - namely, trying to force the plate back on. I pointed out I'd removed the spinning brush piece and put it back in. He looked, and spotted that the round side of the mounts was pointing out when the flat side should have been out. It was a pretty obvious mistake, and probably in the manual. But who reads the manual? :-)
I wasn't satisfied, though: the original problem, the non-vacuuming vacuum, hadn't been solved yet. Since the tech's already here...
He had me take the big hose, from vacuum head to filter, out again and check it. I noted it was black through it, at which point he said I should see a little light bouncing off the inside of it. Ohhhhhhhh....
So I split the hose in the center (where there's a convenient attachment for a longer hose), and sure enough, a good clump of dust was right in the center. Here was the real blockage, the real reason it wasn't working. Also a couple clumps of old tissues. The tech said, "You're supposed to pick up the big stuff!" Well, yeah, but I didn't know I had to pick up the medium stuff too.
Now the vacuum works, and I'm happy - as well as mildly embarrassed. But I can laugh about it. It took twenty minutes, tops, and Sears made a little more off my gracious incompetence.
I guess I just suck at vacuums.
I don't recall seeing anyone on planet or feedhouse mentioning this, so I thought I would:
Mitchell Baker and the Firefox Paradox
Because all I did was notice the article, I'm going to turn off comments for this entry.
Problem: You have a XPCOM component which handles files of a particular
type (*.xul). You have another component which wants a handler
for foo.xul. How do you get the first component from the
second?
Solution 1: Hard-code the first component's contract identifier ("@foo.mozdev.org/blah/blah/xul;1"); into the second component's source code as a constant. Unfortunately, this is not very scalable (*.js, *.css, *.rdf, *.in, *.xml, *.txt...).
Solution 2: Use the Gecko Category Manager, and define a category for all your file handling components.
Incidentally, this is a real-world scenario for me; I have had to solve this exact problem. The Gecko category manager is a common way for components to look up the contract ID's of other components.
The category manager stores information in a format like this:
"@mozilla.org/xpath-generator;1"
"@mozilla.org/browser/feeds/result-writer;1""service,@mozilla.org/extensions/manager;1"The Roman numerals here indicate category names. Each category can store different properties, indexed by some property name.
Often (but not always, as the Extension Manager example shows) a property value will be a component contract ID. This gives a simple way for one component to list itself where other components can find it.
First you need a category name. In my case, I'll choose "Verbosio document wrappers by file type".
Second, your component's module should register the component's contract
ID in the category manager. This happens in the registerSelf()
call. I've given an example of this near the end of "Exposing
XPCOM Components in JavaScript, part one". In this case, my code would
say:
var Module = {
// nsIModule
registerSelf: function registerSelf(compMgr, fileSpec, location, type) {
// Module registration code goes here.
// Category registration code.
var catman = Components.classes["@mozilla.org/categorymanager;1"]
.getService(Components.interfaces.nsICategoryManager);
catman.addCategoryEntry("Verbosio document wrappers by file type",
"xul",
"@verbosio.mozdev.org/document-wrappers/xul;1",
true, /* Persist this entry */
true); /* Replace existing entry */
},
// ...
}
We already have a category name, and presumably all the relevant components are using it. Let's try to find a match for "myApp.xul".
TestComponent.prototype = {
// sample method to get a component
getComponentContractID: function getComponentForFile(aPath) {
// aPath == "myApp.xul"
var dotIndex = aPath.lastIndexOf(".");
var catEntry = aPath.substr(dotIndex + 1);
const catman = Components.classes["@mozilla.org/categorymanager;1"]
.getService(Components.interfaces.nsICategoryManager);
const catName = "Verbosio document wrappers by file type";
return catman.getCategoryEntry(catName, catEntry);
}
};
This is just sample code (nsISupports is only the foundation interface), but it illustrates the point. By storing the contract ID in the category manager, we can look up the contract ID later for something relevant, and then create a component for the relevant item.
The Seattle Seahawks, by the Arizona Cardinals defeating the San Francisco 49ers, have clinched the NFC West division and are returning to the playoffs.
Woo hoo!
Congratulations to the San Diego Chargers for pulling off that last-minute fluke touchdown.
I knew the day was going to be bad when I started commenting out JavaScript assertions in my own code. I just didn't know how bad. The extended entry has all the gossip.
First off, I'm playing in Verbosio with attribute nodes, XUL text boxes, XUL menu items, and the DOM user data interfaces. New stuff, good stuff... except the attribute node that I got back from the user data entries didn't match the node I was trying to match. Equal, but not the same, inside a DOMNodeRemoved event listener -- which I thought was pretty strange.
Since they were equal, I thought, "Oh, just use isEqualNode() instead of isSameNode()." In other words, fake it. Bad practice, but this is 0.1, not 1.0, right? I'd implemented isEqualNode earlier this year, so why not? That made deleting the attribute work, and undoing the deletion worked too. But redoing the deletion didn't work, because the attribute value from user data is null for some reason.
Several dump statements (and probably two hours) later, I'm no closer to figuring out the cause than when I started. I need Venkman. But I'm sick and tired of patching my code to make Venkman work. Instead, I thought, just grab a snapshot of Venkman and hack it into the Verbosio build process.
That didn't work. It was always phoning home to addons.mozilla.org, and every time it did, addons said, "We don't support Verbosio. Go away." To which Verbosio responded by disabling Venkman. Try as I might, I couldn't make it work. I thought about forcibly inserting an update.rdf reference into Venkman's install.rdf (that would've solved the problem, but was too dirty a thing to do).
Next I tried to figure out just how XULRunner was talking to addons and override it. I thought, "Well, this is Verbosio. Of course addons.mozilla.org won't support Verbosio. Verbosio's not a mozilla.org product. So I'll just run my own mini-update service from the Verbosio website." I discovered there's a preference, extensions.update.url which refers to the addons website. I replaced it with a custom update.rdf location. No good; it's still pointing to amo. This didn't make any sense. Finally I dove into the C++ debugger and found out the preference service ignored the preference completely and relied on a extensions.properties
file in a localization. This file, which had easily over 100 properties in it, included the one property I cared about. I could replace that file too, but it seems like a whole lot of bloat for one little damn detail. Why a localization file has stuff that can't be localized is beyond me...
At this point, I'm pretty steamed from having battled it almost the entire day and making no progress on Verbosio. The best fix really is to make Venkman not depend on any one XULRunner application, but installable for all of them, as an extension to XULRunner's toolkit. Unfortunately, our extension manager code can't do this (bug 299716). It can support one product - whatever the application.ini says for the ID - and that's it. Even if it's based on another product - say, XULRunner toolkit - you're out of luck.
Bug 299716 looks like a bug that, while important, has been shelved by the primary developers in favor of other, higher-importance bugs. I can't fault the community or the developers watching the bug for that. At the same time, if I need Venkman in Verbosio "the right way", this bug must be fixed immediately. I can't do anything more than request the bug block Gecko 1.9 in order to convince others to work on it. I am reluctantly forced to concede that the only way this bug will get fixed in a timely manner is if I write at least a first-round fix.
I really hate diving into unfamiliar code. Even if it's in a language I know very, very well (like JavaScript). Ultimately, though, it's the best of a bad set of options. My frustrations with not being able to easily apply Venkman, Inspector, etc. to Verbosio without repetitive work or scripting by shell or Perl have reached a boiling point, where I just can't take it anymore. The bug would still be there if I hacked around my problems and forced things to work, and I'd just bump into the problem again for some other project (like XUL Widgets, JSLib, which I've already done some evil hacking for in Verbosio). Sooner or later, the hacks have to stop and good code fixing the core problem must be written. Now is that time, at least for this bug, and I dare not wait for someone else.
I'm going to work on the bug, but I won't assign it to myself until and unless I generate a patch. Worst-case scenario, I don't get anywhere. But I doubt that; I think I'll make some progress and post at least a partial patch. Very likely, because I'm so blocked, I'm going to post a complete patch and get reviews.
Needless to say, Verbosio development has been shelved. Again. That makes me madder than anything else: that there's quite literally nothing I can do until I fix a couple bugs that are critical to me, and merely irritating to almost everyone else.
A couple years ago, I was handed a task I did not know how to do: profile a corporate application and see where the code is spending most of its time. I had a professional tool (Quantify) available to help me do it. It took me weeks to figure out how to use it at a basic level, just enough to confirm what we already suspected: that the bottleneck wasn't in Mozilla code.
Yesterday, while working with some experimental code, I hit a new perf issue that absolutely should not be happening. (Bug 362694 for anyone interested.) Profiling and performance analysis is something I do so infrequently that I never took the time to really learn how to do it.
Ultimately, I found that there are a lot of free tools available to help me gather data... but this is worse than useless for me because I can't figure out what the data is saying. PEBKAC. Someone suggested Shark to me for the Mac platform, but I found Shark didn't capture anything from my XULRunner app. I'm not blaming Shark; I just don't know how to use it.
So I wouldn't mind a good written tutorial in profiling analysis from start to finish for Mozilla code. Particularly under the constraint of free or inexpensive tools. I'd write it if I had a clue what I was doing.
Today, I went and attended the "Attack of the Squirrels" Firefox 2.0 launch party in Sunnyvale, CA, USA. Pretty good group of guys. In exchange for an early ride to Cuesta Park from the San Jose Diridon Caltrain Station, I ended up helping buy food and arrange the layout of goodies.
Thanks, everyone, for showing up and helping George have a great time. Although I have to wonder if the new Firefox 2 shirt I have should only be washed with red clothing... because I don't have many reds... :-)
(I just thought of that as I wrote this blog entry.)
Apologies for everyone reading feeds with this and expecting technical talk. This is just a silly idea I had this morning, as a subject line to parody... Stephen Colbert. Hence, the rest of this article you'll have to read by clicking on the "Full Article" link.
According to Wikipedia (which must be true) and its article on Stephen Colbert the character,
"Despite his bluster, Colbert's character also demonstrates a notable phobia of bears, which he refers to as "godless killing machines without a soul".
O'Reilly? (Err, Oh'Really?)
Here's what I want to do. I want to make fun of Stephen Colbert (the character) and his aversion to bears by punning on his name's pronunciation. I want to do so in so outrageous a fashion that he ends up inviting one or two people involved with the joke onto his show to publicly lambast them over it (in-character). I don't necessarily have to be one of those people.
The Rules:
With the upcoming Firefox 2 Release Parties, I thought I'd recommend a rather silly idea I had for the last Firefox release party series.
Ingredients: Ritz (TM) crackers, cream cheese, blue food coloring
Serving size: number of crackers divided by number of people, dogs, cats, cows, firefoxes, thunderbirds, sunbirds, and seamonkeys in attendance. (Note: No amount of crackers will feed or satisfy any big red stomping lizards that happen to visit your city. They don't like crackers.)
Based on the Firefox 1.0 party I attended in San Francisco, CA.
P.S. Forgive me if your comments take several days to show up. I just moved apartments, and my Internet connection won't be back on at home until Tuesday.
A little while ago, I started getting Blue Screens of Death on a very regular basis. No, I have no idea what's causing it. I'm loath to take it into the shop now, with Windows Vista coming up in a few short months - but there's another consideration I have: Linux on the second hard drive.
Having noticed Windows Vista RC2 just now available, I'm wondering if installs of Vista allow for people to still run their machines as dual-boot between Linux (in my case, Kanotix) and Windows. If Vista horks the dual-boot, but I can re-install Kanotix and dual-boot from then on, that's okay. I'm just wondering what the test results are. That will help me determine whether I upgrade to Vista final when it's out, wait a little while for the boot loader to adapt, or wait for something else to happen.
Also, for anyone who tried an upgrade to Vista from XP and already had Visual C++ 2005 Express Edition installed, I'd like to know how the upgrade went; I use VC2005 for my compiler on Windows XP, and would like to know how that affected using the compiler.
Please no "Linux is the way to go, wipe out Windows" statements or anything like that. I don't need religious puritanism in tech; I develop code for Mozilla-based applications, and having multiple operating systems at my disposal, including Windows and Linux, is essential. For those of you who say I should be on Fedora Core or some RPM-based distro instead of Kanotix's Debian approach, I'm already considering buying a laptop with Fedora Core 6 on it when that becomes available (FC5 wouldn't install on my desktop), so don't try that either. :-)
On Monday morning at about midnight, I wandered outside my apartment for a quick break before going to bed. My bicycle, with trailer, was parked and locked outside. Nine hours later, after getting updated on my e-mail and showering, I wandered towards my apartment door, and noticed the rear tire of my trailer wasn't visible...
Sure enough, the bike and trailer had been stolen. This prompted some uncivil language at uncivil volumes and lengths... Basically, I was out $700.00 and had no hope of seeing it again.
Until I received a call Thursday afternoon (today) from the Santa Cruz Police Department.
When I purchased the bicycle several months ago, the first thing I did with it was get a bicycle license, registering it with the City of Santa Cruz. That foresight paid off when the City recovered my bicycle in a nearby park on Tuesday - minus trailer, and with some minor damage when the thieves ripped off the trailer, but serviceable. It's in the bike shop now, where I asked the team there to give it "the works", repairing any damage that had been done.
Needless to say, I'm quite happy to have the bicycle back, even damaged. What surprised me was that the thieves made no attempt to remove the license stickers or the serial number on the bike. It was quite obvious they cared only about the trailer, from the damage.
Since I'm moving again in two weeks, I've decided not to bring the bicycle back to my current place. This was the second bicycle trailer I've had stolen from me here. I have no wish to tempt fate or any low-life bastard scum again.
All too often, when you hear about a local city government or its police department, it's usually bad news. This is one case where the City of Santa Cruz, and the Santa Cruz Police Department, did everything right, and did me a fantastic service. My deepest gratitude and thanks go out to them, in particular Officer Inouye and Officer Goodwin, neither of whom I think I've actually met.
For years, I've wanted to think about using content MathML and SVG to plot a y = f(x) function on a pair of axes. The SVG part of this is not too hard (alas, I lost every copy of my SVG grapher years ago, and will have to rewrite it), but MathML is a whole diff