Older blog entries for mathrick (starting at number 105)

22 May 2008 (updated 6 Jul 2008 at 13:46 UTC) »
Wireless Protected my Arse

Dear IEEE 802.11,

you guys are total twatmonkeys; I wish upon you painful genital rash each time someone gets compromised because of the lame insecurity protocol you designed. Go engage in some four-way dongshake, maybe you won’t fuck that one up. Cunthuggers.

#

8 May 2008 (updated 6 Jul 2008 at 13:46 UTC) »
MoinMoin considered harmful

THIS IS A PUBLIC SERVICE ANNOUNCEMENT: Please don’t use MoinMoin. Using MoinMoin is actually worse than not having a wiki at all. <h2>Tl;dr summary</h2>

It sucks so hard and will mislead your visitors in so many ways that you’re better off having a straight HTML dump with an email contact than trying to fight the hopeless failure of MoinMoin. <h2>Detailed explanation</h2>

I’ve been using various sites using MoinMoin to keep their content for a long time. I’ve never particularly liked that wiki engine, and found it confusing on numerous occasions, but the recent re-stumbling upon a particularly egregious case of Moin going out of its way to make sure your visitors aren’t getting what you wanted to give them was the final straw: I realised that it’s the C++ of wikis — not only will it not solve your problems, it will cause new ones that will make you long for your original ones.

First off, a couple of comparatively minor offences: its UI sucks and is confusing all around. The famous combined login/register widget is a paragon of UI anti-design, its version diff widget sucks, its history view is unwieldy and doesn’t actually link to the first revision (!!), I’ve long had experiences with its search being less than helpful, and of course it uses CamelCaseWikiLinks, which all sane people agree are stupid and harmful ([[explicit wiki links]] being the only sane syntax, obviously).

Now, a far more serious sin: it comes with its DB prepopulated with filler content concerning MoinMoin itself. This alone should be enough to disqualify any wiki from being seriously considered, as it means that:

  1. unless you take active steps to combat it, any actual content you have will be drowned by the completely irreleveant bullshit that makes your site look like a page about $wiki_engine (I’M LOOKING AT YOU, TRAC) instead of what you actually want to talk about
  2. the wiki help and your actual content have to compete for space, and as you add yours, you have to remove the (useful, after all) links to information about how to add and edit more
  3. odds are that the filler content is in the same namespace as your primary one, increasing the chances of accidental clashes between unrelated pages

Now, that doesn’t mean wikis shouldn’t come with docs, far from it. It just means they should be clearly marked as such, and available separately from any content. This way a wiki about guinea pig mating habits with no content added yet will look like an empty wiki, and not like a page about Trac (and if you think it’s not a problem, please consider that most experts on guinea pig mating habits will likely have no idea what Trac is and why it is here where they expected a place to share their knowledge about guinea pigs).

However, in case of MoinMoin, the above is not the worst it does. No, it takes the idea of filler content and does things with it that make Trac look like the well-behaved, helpful boy from the neighbourhood. But first, I need you to do the following:

  • pick a non-English language you understand
  • make sure it’s one of:
    • Danish (this one I’m using myself, as I’m learning it)
    • Russian
    • Japanese
    • Hebrew
    • Portugese
    • French
    • Spanish (different from others, but still confusing as hell)
  • the following will specifically not work for our demonstration (you will learn why in a moment):
    • Chinese [zh], German (these are almost enough, complete but not self-contained)
    • Swedish, Norwegian Bokmål [nb] (not self-contained and significantly shorter)
    • Finnish, Korean, Dutch, Slovenian (redirect to English)
    • Italian, Polish, Greek, Norwegian [no], Nynorsk [nn], Arabic, Farsi, Czech, Slovak, Sangro, Lithuanian, Latvian, Estonian, Icelandic, Serbian, Hindi, Punjabi (absent)
  • if you know none of the suitable languages, just pick one that looks the least strange to you
  • make sure that the language you picked is your preferred browsing language

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
(no, seriously, do it, I’ll wait)
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

Okay, now we have you browsing in $language, go to http://codeville.org/doc/. You’ll notice that:

1) It talks about wiki and MoinMoin and a couple of other wiki engines
2) It’s completely in $language
3) It doesn’t give you a slightest hint that it’s NOT WHAT CODEVILLE AUTHORS INTENDED. Not a language selector, not a link, not even a URL in the addressbar. NOTHING.
4) There’s not even a way to find the original English front page. Site map, title index, word index etc. are all buried deep under layers upon layers of irrelevant pages about MoinMoin and twenty translated copies thereof (that is, after you wait 2 minutes for them to load).

The only way to see the actual intended content if you happen to be using one of the unlucky languages is to guess that it’s not really right, then guess the content will be probably in English, then guess that you can go there by manually entering the English root’s name in the URL bar, then guess the name of it, backtrack a couple of times on misses (like MainPage, StartPage) until you get to the correct one (ie. FrontPage), then vow solemnly never ever to use the goddamn thing again.

It also means that the entire site can, silently and untraceably, transform completely depending on a hidden, essentially random variable the site admins will likely never discover and know to fix. It is also enabled by default (I have previously discovered and reported the exact same problem on Revctrl wiki, it has since been fixed).

Bottom line: in order to have MoinMoin even remotely resembling something useful, you have to essentially unbreak it on two separate levels, one of which is hidden so deeply that it can go undetected for years. Straight HTML, email, IRC, paper printouts, clay tablets, smoke signals, ANYTHING is better because at least what you see is what you get, unlike with MoinMoin.

Note also that the above is based solely on the problems I’ve been able to notice and track down based on my experiences with MoinMoin as a user. I have no idea what else you have to unbreak as an admin and what other problems might be lurking in other places, but I’d be very surprised if it turned out to be otherwise flawless.

PS. If you have read the entire post, you’re welcome and encouraged to go back and try with different languages and report the results back to me, so I can expand the known working / non-working list. In order for a language to be suitable for the demo purposes, the translation has to exist, and be self-contained (which is defined as “doesn’t immediately suggest that something is amiss and doesn’t link directly to the English version”). It doesn’t mean that non-self-contained translations are not an issue, but I want to make sure the first impression gives the proper idea of the magnitude of the problem.

#

Easter activities

Things I did this easter: go to church, drink, THROW SNOWBALLS.

#

What is love

Life is good.

#

17 Feb 2008 (updated 17 Feb 2008 at 00:55 UTC) »
CUA-mode and paredit.el, married happily

Just a quick drop: if you use paredit.el for editing in your Lisp buffers (as you should), and you happen to also use CUA-mode (which rocks, btw), you probably know that by default they don’t play together too well. Well, I’ve finally got fed up with that and wrote some glue to fix them up. Details and code can be had from this c.l.l post

#

14 Jan 2008 (updated 6 Jul 2008 at 13:46 UTC) »
I am not able to rightly comprehend the kind of confusion of ideas that could provoke such a claim

Update: For some reason WP disabled comments when I first posted this. Fixed now.

There’s a thread on c.l.l going, in which people try to find a reason macros haven’t caught on for the past 30 years, despite their immense usefulness. One of the cited arguments was this statement by one of the men in charge of Java process:

The advantages of Java is that it easily serves as a lingua franca - everyone can read a Java program and understand what is going on. User defined macros destroy that property. Every installation or project can (and will) define its own set of macros, that make their programs unreadable for everyone else. Programming languages are cultural artifacts, and their success (i.e., widespread adoption) is critically dependent on cultural factors as well as technical ones.

My claim is that this is about as true as C++’s approach to performance, in which people copy things all the time, because that’s what manual memory management makes them do. Just consider the “design patterns” omnipresent in Java. What is a macro, if not a structured transformation of source, following certain pattern? Of course, I’m saying nothing new here, but I just stumbled upon a particularly good demonstration of why “macros decrease legibility of code” is utter nonsense. Consider this snippet:

(restart-bind
    ((retry
      (lambda () (throw 'retry nil))
       :report-function
       (lambda (stream)
         (write "Retry reading the record." :stream stream))))
  (catch 'ok
    (loop do
         (catch 'retry
           (throw 'ok
             (unless (read-record)
               (error "Record not available.")))))))

Just try analysing it, how fast can you find out what exactly it does? Aren’t braided catch/throws fun? Now consider the same snippet using a macro:

(with-retry (:report "Retry reading the record.")
  (unless (read-record)
    (error "Record not available.")))

Not only is the code 4x shorter and uses idiomatic naming conventions and code structure, the macro also comes with a docstring and parameters to let you easily influence the working. And most importantly, you only have to understand it once. Whereas in Java every time you encounter a similar-looking snippet, you have to analyse it to see if it’s actually the same thing, or subtly different.

So, to sum up with a checklist, the macroless code is:

  • More verbose
  • Really complex and confusing
  • Hard to spot and identify reliably
  • Not documented
  • Must be re-invented each time you need it
  • Does not ultimately prevent convoluted code from coming up. If your code needs retry functionality, then so it does, and no amount of “ours is a simple language for the masses” can change it. Though if you make it sufficiently painful, people will probably find ways to dillute the apparent complexity amongst modules, only compounding the problems, and/or pretend they don’t really need their program correct, because it’s such a massive PITA to do it.

Now, to be fair, this is not to say that macros can’t be hard — very often they are, because you generally use macros to solve problems that would be even harder without them. You don’t deny surgeons access to endoscopy because they might not be skillfull enough to handle it — instead you make sure they are or have to find another trade. There’s no reason to treat programmers differently.

Saying “macros make code unreadable” is like saying “race bets can only be done on manure-covered floor, or else you won’t know you’re dealing with horses”.

#

Chattr

Admit it, your Web 2.0 experience hasn’t been full up till now, has it? But now, with Chattr here, you can fix that and talk like a real Web 2.0 weenie with no effort. Its full glory can be had here.

Executive summary: yes, it’s an XChat plugin, no, it has no use.

#

;_;
(with-christmas-gifts
  (visit family))
(setf *money* 0)
(print ";_;")

#

Motherfucking Fujitsu Heavy Industries

ghrrrrrrr.Apple pisses me off.

Why? Well, in anticipation of some substantial cash surge (knock on wood), I decided to check in the local (hell yeah, in Odense there’s one) Apple store, to take a look at 12″ iBooks, because that’s exactly what I’d like to get — it’s damn small, has very long battery life, and is sexy (I’m not the only one to share this view, I think, because people with 12″ iBooks are common sight at the Uni). So, I went in, there was one on the display, small as expected, checked the price, OK, within acceptable range, seems they all ship with Tiger these days, which is also good. So the last question was, can I have SuperDrive with this one?

No. That’s only with 14″ ones.

Fuck. Of course, you can have 12″ PowerBook with SuperDrive, so it’s not a technical limitation, it’s just that Apple wants to suck every bit of cash out of you, because prices for PowerBooks are really crazy. It’s 13.500kr vs 8.200kr. And there’s no way I can afford that. But OTOH, I don’t want to get stuck without DVD burner either.

So, does anyone know a good, linux-compatible, 12″ notebook with DVD burner and long-lasting battery, x86 or whatever? And yes, the 12″ bit here really does matter, when you commute to school every day by bike at least.

#

Things and stuff

Lots of everything going on, due to various circumstances I wasn’t able to post in the last week, so the amount of what should be written is rather large. Part of the reason was that I was sick last weekend, so instead of going for the announced cottage trip and having fun, I spent it lying in bed, not-really-able to think or write consistently. After that, I no longer had a computer available, so posting was rather out of question. And now you know.

Anyway, back to the stuff, in random order:

Bought myself a pair of bike lights, to be able to bike at night and not get fines from the local police. Turned out they didn’t work. Gone back to the big store I got it from (Bilka), and they have special section split out reserved just for the customer service. You just get a number in line, wait till it’s your turn, and settle your matters quickly and painlessly. Now, I can’t really compare it to Poland, because I don’t think I ever had to complain about a faulty product, but what I like here is the acceptance of the fact that shit happens, and someone just has to handle it, and its better for the business to do the dirty work, instead of relaying it to the customer. That’s still far too uncommon in Poland, sadly. My belief in the fact it’s a system, not an isolated occurence is strengthened by me having to cancel the cottage trip (due to the abovementioned sickness) just the next day, and it went even smoother than before — I just needed to make one call, I was instantly proposed to get my money back whenever I’m good enough to visit the office. Really a zero fuss system (even though in the end the lights stopped woring after few days, and I spent more on them I’d pay for at local “everything home and workshop” store for proper lights, but the customer service is still nice).

OTOH, I must say that things here are seriously fucked up. Honestly. For example, I missed one lecture because the timetable isn’t up for it yet (thanks to busted electronic everything system, which generated hellish delays all over the place), and I couldn’t login to “blackboard” system on Tuesday (again, busted system), and that was the only place where I could learn that first lecture is on Wednesday. So I learned that, on Wednesday after coming back from school.
Further, you’d expect that all these “e-learn” gizmos we’re supposed to use, SingleSignOn system (from Oracle, no less), account automatically created for every student would mean that I’m able to use the labs computers right from the start. Well, no. Instead I need to register with every institute separately, and of course, each has its own naming policy, acceptable passwords policy, policy on whether I’m regarded to be guest or full time student (which projects on my account’s name), hell, I even need to get Windows and Unix accounts separately in one institute! (But, not in another). Oh, and Unix in form of Solaris 8 is just a joy to use (even with Gnome 2.8 installed), becaus that fucking thing has no support for XKB. Which means no hope for Polish keyboard. Which means no school paper writing. Which means angry me, grrr. Fortunately, both institutes also have Linux labs, which is a lot nicer. Even though it’s Mandrake (or Mandriva now), which in turns means every menu and settings fucked up to infinity. D’oh.

Oh, and another lecture I missed because it overlapped with another class (from the same institute, nothing fancy like classes from different institutes), and, I think I found the Denmark’s single civil officer unable to speak even a word in English. But I wonder why she was placed in Folkeregister (National Register), which by definition deals with assigning CPR (sort of Danish social security evidence) numbers to the foreigners. And everything here is so damn expensive. Coffee is 12kr at the very least (I mean, coffee at the human-run place. Vending machines strangely enough have 4 kr for coffee, strangely because they have ∞ kr for everything else). And the books I’m supposed to buy will easily amount to several thousand kr. Booo :(

#

96 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!