WikiProject Mozilla on Wikipedia

I’m pleased to announce the launch of WikiProject Mozilla on Wikipedia, an effort to improve Wikipedia’s coverage of Mozilla-related topics. If you are an existing or budding Wikipedian, please do come along and lend a hand.

We are still getting it off the ground at the moment, with various admin tasks like sorting out a userbox, but we’ve also started a rewrite of the “Mozilla” article to focus on the current meaning of the word – the Mozilla community and its activities.

3D Printer: Physical Assembly

Once the sub-assemblies had been put together, the next stage was to start attaching all the parts to the frame. The build instructions are very helpful in explaining what to do in what order. Here is a picture part-way through the assembly, with the Z rods, motors and lead screws in place.

The Mendel90 model is even detailed enough to model and provide printed parts for appropriately-sized (calculated using circle packing rules!) cable clips for the various cables which run along the frame.

The next stage was the insertion of the X bars and then the addition of the Y carriage, along with the drive belts.

You can see that the extruder platform, the central black piece, now has 3 cartesian axes of movement – it can slide along the X bars, the entire X carriage can go up and down the Z bars, and the Y carriage moves in and out. Coordinating these movements very carefully is necessary for accuracy and quality in the print.

The shiny thing on top of the Y carriage is a heat shield, made from low-tech cardboard and reflective high-temperature tape. This prevents the carriage heating up and warping, and throwing the bed out of true.

Now, blogging has caught up with reality – this is the condition of the project as I write :-) The next step is to modify a PC power supply to provide juice, attach it and the control electronics to the rear stays, and wire it all up.

Remote Access for Tech Support

Pretty much every geek has the sad job of being the tech support guy for their family and, if they aren’t nimble, their friends too. This is particularly frustrating when:

  1. they expect you to know everything about their computer when you haven’t used Windows for 10 years
  2. their computer is slow as molasses due to being loaded down with c**pware
  3. you have to do the debugging over the phone

1 and 2 I can’t help with, but 3 I can. If you are a Linux user, and want to support Windows users using a simple graphical remote access system, here’s one way to do it. (Other suggestions welcomed.) The secret is to use UVNC Single Click. However, this system is not very well documented. This is what I did:

  1. Download the “custom.zip” file
  2. Hack the “helpdesk.txt” file inside it (here’s mine), and the logo files as well if you can be bothered (the result will not look particularly pretty however hard you work)
  3. Configure it with your fixed external IP or dynamic DNS, plus a non-standard high-numbered port
  4. Make sure the port you chose is open on your firewall, forwarding to 5500 on your machine
  5. Upload the zip file to UVNC’s .exe maker (the fixed username and password you need are printed on that same page; this may some sort of weird anti-spam thing)
  6. Send the result to your debug-ee (you may need to rename the .exe to .exe.dat or similar to dodge dumb mail filters)
  7. Use “ssvnc” to accept connections. Switch to “listen” mode, turn off SSL (I never got that working).
  8. Tell them to run the .exe and double-click one of the Connect options.
  9. Their desktop should appear in a window on your machine.

Discussion Forum Access Methods

In the context of deciding how best to evolve/change the platform underlying Mozilla’s current discussion forums, the question arose as to what percentage of people use each of the 3 available access methods (email, NNTP, Google Groups). I did some research on this a while ago, although I can’t find it now, and fortunately was able to find my script again and re-run it. (Tip: if you need to download a newsgroup as an mbox file on Unix, use the nntp-pull program from the sinntp package.) Here are some statistics, from what I hope is a representative cross-section of groups which are currently active. The stats are for the (approx.) 1000 most recent messages in the group, or all of them if there are fewer than 1000.

mozilla.community.philippines
            Total   Web           Mail           News         
   Posters:    41    18 (43.90%)    20 (48.78%)     3 (7.32%) 
     Posts:   135    34 (25.19%)    96 (71.11%)     5 (3.70%) 

mozilla.dev.planning
            Total   Web           Mail           News         
   Posters:   222    31 (13.96%)   128 (57.66%)    63 (28.38%) 
     Posts:  1001    72 (7.19%)    688 (68.73%)   241 (24.08%) 

mozilla.dev.platform
            Total   Web           Mail           News         
   Posters:   215    51 (23.72%)   107 (49.77%)    57 (26.51%) 
     Posts:   999   147 (14.71%)   590 (59.06%)   262 (26.23%) 

mozilla.dev.quality
            Total   Web           Mail           News         
   Posters:   207    79 (38.16%)    73 (35.27%)    55 (26.57%) 
     Posts:   871   144 (16.53%)   475 (54.54%)   252 (28.93%) 

mozilla.dev.tech.layout
            Total   Web           Mail           News         
   Posters:   172    75 (43.60%)    45 (26.16%)    52 (30.23%) 
     Posts:   860   250 (29.07%)   193 (22.44%)   417 (48.49%) 

mozilla.mozillians
            Total   Web           Mail           News         
   Posters:   171    32 (18.71%)   120 (70.18%)    19 (11.11%) 
     Posts:   887   187 (21.08%)   513 (57.84%)   187 (21.08%) 

TOTAL of all the above:
            Total   Web           Mail           News         
   Posters:   853   274 (32.12%)   404 (47.36%)   175 (20.52%) 
     Posts:  4753   835 (17.57%)  2557 (53.80%)  1361 (28.63%)

Notes and observations:

  • Each access method is used by a significant number of contributors.
  • Mail is the most popular access method. The order of the other two depends on whether you count posts or posters.
  • People using news have a higher rate of posts per poster, suggesting a deeper level of involvement. (That, of course, says nothing about the utility of each post.)
  • People using the web have a lower rate of posts per poster, suggesting more casual involvement (which makes sense, as the web version has a low barrier to entry).

Vidyo

Mozilla sometimes uses the Vidyo video conferencing system for real-time meetings. (Hopefully, one day, we’ll be able to use something based on WebRTC but, for now, we use Vidyo.) At the moment, because the Vidyo system requires an LDAP login, only Mozilla employees can initiate meetings. However, non-employees can take part in such meetings using a guest URL. In order to lower the barrier to having employees have non-employees participate in meetings they are hosting, I’ve written a document on how to generate such URLs.

3D Printer: Sub-Assemblies

Once the frame has been assembled, the next thing was to put together some of the individual sub-assemblies. The Mendel90 design’s build process automatically generates BOMs (Bills of Materials) for each of the sub-parts. It’s also possible to render those parts alone, and in an “exploded” view, using the OpenSCAD software, and examine it from all angles. These two things together make it obvious in most cases what screws and parts go where. The build instructions add any extra tips, or hints on the order in which to do things, which may be necessary.

Let’s take an example, the X idler end. This is the assembly at the opposite end of the X carriage to the motor, which contains the pulley over which the X drive belt runs. It also has bearings so the entire X carriage can move up and down the Z axis.

The generated BOM is as follows:

 1 Ball bearing 624 4mm x 13mm x 5mm
 1 M4 cap screw x 40mm
 2 M4 hex screw x 16mm
 2 LM10UU linear bearing
 1 Nut M8
 3 Nyloc nut M4
 4 Washer M4 x 9mm x 0.9mm
 2 Washer M5 x 20mm x 1.4mm
 1 x_idler_bracket.stl

The exploded rendering of the sub-assembly from OpenSCAD looks like this (obviously, when rendered in OpenSCAD, you can rotate it to get a better view, e.g. to see the M8 nut in the trap on the bottom):

The instructions give tips on how to clear out any excess plastic, and the best way to insert the linear bearings in the channel.

Putting all that together, the result is this:

(Unfortunately, my choice of black plastic means that these photos do not come out as clearly as they might.) Some of the other assemblies are more complex than this one, but the principles are the same.

More “Transmittable” Short URLs

URL shortening services are very popular. They basically redirect a short URL – e.g. bit.ly/ABC123 – to a longer URL. (And keep logs, which can be monetized, hence Twitter’s t.co service and the requirement that tweets use it.) Most URL shortening services use the following set of characters in the unique tag: [A-Za-z0-9] – a total of 62. 6 characters is a normal number for the tag.

However, when reading such a short URL to someone, e.g. over the phone or across a conference table, a couple of problems can occur:

  • The person reading may misread; they may read “l” for “1” or “0” for “O”.
  • The person reading may under-specify, most commonly by not expressing the case

This makes reading out such short URLs a pain, as one has to make sure to specify case correctly, and to distinguish between similar-looking characters in a possibly-unfamiliar font, or in handwriting. These problems could be avoided, and URL reading would be much easier, if the set was instead [a-km-np-z0-9], and the shortener service treated a submitted tag as case-insensitive.

This would give a choice of only 34 characters. Surely that would mean the tag would have to be much longer? Actually no:

  • 62^6 = 56800235584
  • 34^6 = 1544804416
  • 34^7 = 52523350144

Short URLs could be made more transmittable at the cost of only being 1 character longer. I think some service might find that worth doing…

3D Printer: The Frame

For my printer, I decided to make the frame from MDF. I got it from our local B&Q DIY store. They have a large wall-mounted saw which they will use to cut up your wood for you, if you ask. I made a cutting plan which meant that they could cut all the pieces which were supposed to be the same width one after the other, so they didn’t have to adjust the marker and possibly end up with a slightly different size.

The arch in the gantry then needed cutting. Fortunately, my father-in-law came to the rescue with his workbench and jig-saw.

Then I decided to paint it. This is optional, but bare MDF can absorb water and change size slightly, which is not good for a precision instrument. Painting it stablizes it in this respect, as well as making it look much better. However, this turned out to be quite an effort. I wanted to do it outside (a decision with which my wife heartily agreed), so I spray-painted it lying flat on newspaper and plastic sheeting. But I had to content with wind, dirt from the bricks I used to weigh down the newspaper because of the wind, and intermittent rain showers. Fortunately, we’d got 3 of the rear stays out of our wood rather than 2, so we could use one for paint testing. I had to do two coats, both sides. Still, due to uneven coverage, fingermarks, etc., the finish is not what I’d like it to be.

Each sheet needed holes drilling, according to the drill templates which are automatically generated from the design. The templates are significantly bigger than a piece of A4 paper. One can print them out in A4 panels with cut marks and join the result together, and I did that for all of the pieces but the base. (Wishing to avoid Adobe Reader, I tried to do it with open source tools. This was a pain to work out; see the build instructions for how it’s done.) But the base is large enough and has enough holes spread across it that I wanted to get the sheet printed on a single piece of paper. I took it to a local print shop and, due to a misunderstanding, they printed it on sticky-backed vinyl instead!

I thought this might be excellent, because the glue would keep the sheet aligned, and the printer demonstrated that the vinyl peeled off wood very easily. And indeed, once we’d worked out how to apply it square and (mostly) unwrinkled, it looked great. However, it turns out that it doesn’t peel off painted wood as easily, particularly if it has been left for 3 or 4 days while you find the right size drill bits! A lot of glue was left behind :-( White spirit didn’t help, but started lifting the paint finish. Fortunately, I remembered I had a small bottle of “sticky stuff remover”; I have no idea what’s in it, but it’s magic. It lifted off the residue without removing (much of) the paint.

Lastly, it turns out drilling MDF without another piece of wood underneath leads to messy exit holes; particularly on pieces where both sides can be seen, using a drill block is essential.

Next up: starting putting together some of the sub-assemblies.

3D Printer Project

With another guy from my Gospel Community in Sheffield, I have started building a 3D printer as our manly do-something-together geek summer project.

Since 2005, led by Dr. Adrian Bowyer of Bristol University, the RepRap community (REPlicating RAPid-prototyping machines) has been working to turn 3D printing from something costing 6 figure sums to something costing 3-figure sums, and also to make machines capable, as much as possible, of manufacturing copies of themselves. They use extruded plastic as a way of constructing physical objects out of virtual designs.

In 2012, the “Ford Model T” of 3D printers is the Prusa Mendel, the 3rd generation of designs after the original Darwin and then the Mendel. When I was in Brazil for FISL recently, I spent some time building a Prusa variant with Metamaquina, a 3D printer company started by a Felipe Sanches, a Mozilla contributor in Sao Paulo.

However, there are several valid criticisms of the Prusa design. As outlined by “Nophead”, a 3D printer hacker from Manchester, they are:

  • The rod-based frame is easy to get out of alignment
  • It doesn’t have structural strength in the direction of movement of the X carriage (left/right)
  • The maximum height is limited by the extruder colliding with the supports

To solve this, he did a design he calls (perhaps with a minor failure of imagination) the Mendel90, as it uses 90 degree angles for everything. This is built on a solid sheet frame – MDF, acrylic, polycarbonate or (most recently) Dibond (aluminium-skinned plastic). We are building a version using MDF. When it’s done, it’ll look something like this, except that this picture is of an earlier iteration of the design, and ours will look a lot smarter, as it’ll be painted red):

Look for more posts about this in the coming days :-)

Airport Security and 10ml of Toothpaste

One normally expects ridiculous airport security stories to come from the USA… here is one from Manchester Airport.

I have a small washbag with a mesh cover. Its total volume is probably about the same as a standard-issue 1-litre clear plastic bag. Often, I just toss it in the tray as-is, and up to now security has had no problem with that.

On this occasion, it contained a toothbrush, a razor and a mostly-empty tube of toothpaste. These tubes are 100ml when full (a valid size for security); there is no way this one had any more than 10ml in it.

I loaded up, passed through the gate and waited for my luggage. My wheeled bag came through fine, but the rest was diverted for further inspection. “Odd”, I thought. I always travel with the same stuff, and make sure it’s nothing they’d object to.

The lady asks me the usual preliminary questions, and then extracts the flaccid tube of toothpaste.

“Sir, this is a problem. It needs to be in a clear plastic bag.”

“Well, I suppose so, but you can see it now.”

“No, sir. You either need to go back and buy a bag”, (at several low-cost airports, including Manchester, plastic bags are dispensed by vending machines packed in little plastic balls, and cost £1), “or I can’t let you take this through.”

I wondered if this was some strange revenue protection policy, or whether I was living in a parallel universe.

“Those are the rules, sir. If it’s not in a bag, it can’t come through.”

I laughed. I attempt reason. It fails. So I said, “Well, it’s not worth £1, so you can keep it.” I moved to pick up my other bags, and go.

“Sorry, sir, you can’t take those bags. They have to go back through the machine.”

“But you had a problem with the toothpaste, and now you’ve removed the toothpaste, so what’s the problem?”

“No, sir, they have to go back through the machine.”

Which they duly did, and no problems were found.

As I was leaving, I said to her “In your heart of hearts, you know this doesn’t make anyone safer, does it?”

She said, “We have to do a vapour test, and I can’t do a vapour test if it’s not in a plastic bag.”

Now, there may be a tiny core of truth in that; perhaps vapours accumulate in the bag while you are waiting and that makes explosives easier to detect. Although I don’t see them checking people’s plastic bags for holes, or making sure objects spend a good long time in the bags. If their tests really require that, then they must be pretty dangerously insensitive.

But the real issue here is the lack of common sense applied to the problem. This was less than 10ml of… something. If I stuck that much explosive in my underwear and tried to detonate it, the worst that could happen would be that I’d not be having any more children! We’ve lost sight of the original goal of the rules, and fallen back on enforcing them unbendingly as an attempted route to safety. It’s a secular form of legalism.

Fixing a Non-Booting CyanogenMod 7

Late on Friday afternoon, my day-to-day phone, a Samsung Galaxy S II which runs CyanogenMod 7.1, stopped booting – it got stuck at the “rotating arrow” blue Android for ever. I use my phone rather heavily, so this was a significant inconvenience – doubled by the fact that on Saturday morning, I flew to the Bay Area for a week at the Mozilla office. “What’s the confirmation code for collecting your train tickets, sir?” “Where are you staying in California, sir?” Er…

The last action I took before this happened is that I made a full system backup via Recovery mode (I use the excellent ClockWorkMod Recovery). I’m not sure if that’s what caused the problem, but it was instrumental in the solution. I could still boot into Recovery, and fortunately that also allows console access via adb shell.

Things which didn’t solve it or give any clues:

  • Looking to see if I’d filled a partition (I hadn’t)
  • Making a second backup, watching carefully for errors
  • Restoring the backup I’d made
  • “Fix permissions” in the Recovery options
  • Wiping the cache, dalvik cache and other non-destructive wipes
  • Reinstalling the same CyanogenMod build again

After some trepidation, I tried doing a full factory reset from Recovery. This got the phone booting again, but without any of my data :-(. Fortunately, ClockWorkMod has a “partial backup restore” function. I restored the data partition… and the phone stopped booting again.

So this is progress. I now had some idea where the problem lay. I finally found it using a laborious 5-minutes-per-cycle manual bisection technique. Delete half the stuff on the data partition, reboot, if it still fails, delete more, reboot… once you get it to boot, restore the data partition, narrow it down further. Once you find a top-level directory, repeat the process inside it.

The result: the existence of a single 0-byte file stopped my phone from booting entirely. The file was:

data/system/profiles.xml

I have no idea what that file does (there are only a few references online), how a 0-byte version of it got created, or why having it existent but empty breaks things but if it’s not present everything works fine. I have no idea if anyone else will ever see this problem, or if they will ever find this blog post. But still, here’s my Wisdom of the Ancients.

Holy War or Bikeshedding?

A holy war is a dispute, often but not always over a relatively minor issue, which is not resolvable on the merits of the arguments, but where people feel passionate enough to continue arguing anyway in the hope that their side will prevail. Holy wars are not quite the same as bikeshed paintings. People painting bikesheds are usually quick to jump in with an opinion (because they can), but they won’t necessarily feel strongly about it, and indeed will sometimes express other, incompatible opinions, to show that they understand all sides of the issue. In a holy war, on the other hand, understanding the other sides is a sign of weakness. In a holy war, everyone knows there is One Right Answer; they just don’t agree on what it is.

— Karl Fogel, Producing Open Source Software

Quote of the Week

What people don’t appreciate, when they picture Terminator-style automatons striding triumphantly across a mountain of human skulls, is how hard it is to keep your footing on something as unstable as a mountain of human skulls.

From “What if there was a robot apocalypse? How long would humanity last?“, the 5th in XKCD‘s new “What If?” series of articles answering hypothetical physics-related questions. In this case, rather loosely physics-related.