Search Results: "matthew"

18 January 2006

Matthew Garrett


Dear Mr Occupier

Thank you for your recent application for an online account with
www.house.co.uk. I am sorry for my delay in responding to your application
request received in October.


Received today. Thanks, British Gas.

Matthew Garrett

03:47 <Overfiend> The thing that worries me the most personally is the number of people who called the post to d-d-a "offensive".

In the absence of any desire by the elected leadership to worry about making Debian somewhere that's welcoming and attractive to contributors rather than, say, one where "sexual harassment" is political correctness gone mad, I'll probably be spending the next few months concentrating on finishing off my PhD.

Matthew Palmer: It Never Rains...

but it pours. So far on my trip home this afternoon (I'm a little over halfway home) I've met three people I know -- two fellow geeks and a friend from TAFE I haven't seen in several years. Statistically speaking, seeing someone you know here and there happens -- it happens to me often enough that I can accept it as normal, if not regular. But three. Thankfully, dice have no memory, otherwise some probabilistically-likely event would have to not happen, or some really bad freakishly unlikely event would have to happen to balance everything out. Shit. I get on a plane on Sunday. Now I'm worried.

17 January 2006

Matthew Palmer: But how, dear Liza?

Support our Aussie Farmers, dear Henry, dear Henry. Support our Aussie Farmers, dear Henry. Support!
I hate "current affairs" shows. They're nothing but beat-ups and bullshit. But I had the unpleasant experience of actually watching an episode just now, and they've hit a new low. It was an article on prawn farmers, and oscillated between South Park style "they took our jobs!" and "those evil retailers, mislabelling foreign prawns as local". Now, I empathise with people who lose their jobs due to circumstances beyond their control, and misrepresentation is a fairly unpleasant thing, but the bit that thoroughly pissed me off was the return comment from the presenter: "We should all support our Aussie farmers." How, exactly? We can't "buy Australian", because the products are mislabelled, and that was the whole thrust of their article. No mention was made of legal action, civil or criminal, and the number of people watching who would be in a position to take such action would be vanishingly small. Misrepresentation is already illegal, so it isn't a matter of pressuring our elected representatives to pass appropriate legislation. At least I know I've not been missing anything by running away every time a show like this comes on the idiot box for the past 12 months.

16 January 2006

Matthew Palmer: Work it out yourself, dammit!

My pet peeve of the day -- web apps which require you to specify, in advance, what the URL of the source of the webapp is. The app *can* work this out for itself, you know. The fact that you're too brain-fuckingly stupid to do so does not mean that you should proceed to screw over anyone who needs to use your program in a "non-standard" environment, it means that you should step away from the goddamn keyboard and stop infecting people with your stupid.

15 January 2006

Jose Carlos Garcia Sogo: Rewriting from scratch

I agree Matthew Palmer, and by extension Joel on Joel on Software that rewriting software projects from scratch is a very bad idea, which in case of FOSS can mean death of the project because people lost interest on it due to the great effort needed to reimplement things that were working before. At the same time I take what Joel says: programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. Being myself a Civil Engineer I cannot agree most. The other option is patchy and result will never be so good as a well planned project, with a good design, time... and money. And this is one of the greatest things of software. With a good planning you can refactorize it, change what you want and even demolish and rewrite some parts, whithout having to throw away all the old code and start over.

Matthew Palmer: Evolution vs Revolution

To rewrite, or not to rewrite, that is the question. If there's one thing programmers seem to love doing, it's rewriting a piece of software from scratch. Which is funny, because "the industry" spends a lot of time bemoaning duplication of effort and generally touting "reusability" and "component-based software development". Joel on Software has a fairly good treatise on why rewriting software, in general, is a Bad Thing. I may not agree with him all the time, Joel is always worth a read, and I certainly can't fault his reasoning on this issue. My primary experience with rewriting software, as with most things software-related, is in the Free Software world. Although I've been involved in (or led) rewrites of proprietary software in the past, I've seen a lot more "let's rewrite it all" death-marches in FOSS. While I wouldn't characterise them universally as "failures", they don't seem to have the beneficial effect the authors were probably hoping for. What does seem to happen, in these FOSS projects, is that the developers squirrel themselves away in their backyard labs, using the latest and greatest in software engineering processes and tools, to produce... the same end result. (If you produce something totally different, it's not a rewrite, it's a new piece of software that does much the same things as the old one). When I say "the same end result", I mean exactly that -- it does the same thing, the code is still subject to coderot over time, and so on. It doesn't seem like much useful output has been produced. So why do we do it? Joel gives some good reasons (and why they're not such good reasons). Rewrites always take a very, very long time to do. It's in their nature. They're also very demoralising -- you're not really creating anything new, you're just recreating existing functionality. In the beginning, though, it's amazingly exciting -- a whole new world of bugfree code, an engineering marvel, something for the annals of software history. But several months later, as your new code is becoming cruftier by the day, and you're just duplicating functionality that already exists, you get bored. And boredom is the death knell of FOSS projects. I presume that this excitement-fading-to-boredom progression is why everyone starts rewrites, but they're often abandoned (or, at least, take a lot longer to complete than estimated). I'd make a comparison to that favourite target of unfair comparisons, marriage, but I know my wife reads my blog, so I won't. <grin>. This boredom factor is what has affected the python-appserver backed rewrite of IRM (from php3-style PHP). I took on maintenance of the existing PHP codebase over a year ago, and the rewrite had been in progress for a while at that point. IRM now has a bunch of useful new features, and there still isn't any indication of a useable tarball emerging from the rewrite. A rewrite in progress is a terrible thing. It tends to make people wary of working on the existing codebase, if it's going to be a deadend. Without something to work on, they'll tend to wander off to other projects. However, sometimes (due to existing deployments), users will work on the deadend. If the developers have been more-or-less neglecting the existing codebase while they take on their glorious rewrite, then the rest of the world is going to have been playing with and tweaking the existing code, adding their own improvements and modifications. The result of this, when the new rewrite finally releases, is that there's great wodges of third-party code that's incompatible with the rewrite, and a large chunk of your userbase says "stuff it" and sticks with what they know. This is what looks like happening in the world of SysCP. A few days ago, I found out that they're planning on doing a rewrite from the functional-spaghetti-PHP of the current version to the cult-of-MVC-PHP. This is nice, but their current estimate is of a first RC release in February. I take this estimate with a boulder of salt -- for the full collection of usual reasons (boredom, real life, overoptimism, etc). The fact that there's not a huge amount of movement on the commit log doesn't inspire confidence, either, and despite early claims of a massive development team, only one person has been committing recently. In the meantime, I'm tasked with adding a number of small features to the current SysCP codebase, which we need for work. When the rewrite comes out, it's highly unlikely that there will be a business case for rewriting my features for the new code, and it's not likely that the features we need will make it into core. So, SysCP will probably fork -- the old, featureful, crufty codebase, vs the new, shiny codebase. If there's sufficient new features to warrant an upgrade, we'll take the plunge, but what SysCP does now is very close to what we want, so it'll take a fair amount of shiny! to get us to move. This is a general issue of software development in FOSS -- if you take your eye off the ball, for any reason, someone else will probably pick it up and run with it. Your rewrite will be a completely new project, and you'll get some of the users and the fork of your old codebase will continue to live on in another guise. Let's face it, though -- your code is going to accumulate cruft. Over time, it morphs into this bletcherous pile of huge functions, multi-purpose classes, and reams and reams of bug reports. How do you deal with this cruft? Surely at some point it's easier just to throw it out and start again? Reality says no. Joel gave the key advice in the article linked above (go read it if you haven't already -- seriously), and it's strongly hinted in my article title. Don't revolt; instead, evolve your codebase. Tweak it, evolve it, move it slowly (and compatibly) towards your utopian ideal of perfect code. You won't get there, but you'll almost certainly get closer by gradual and continuous improvement than you would be going back to the start line and walking in a different direction. There's one big question that's nagging at me, though -- what happens when you want to switch languages? I'm loving Ruby on Rails at the moment, and so are several other people at work, but we've got (both personally and professionally) huge swathes of code in PHP (and other second-rate languages) that needs to be dealt with. It's a lot harder to evolve code into a different language than apply a gradual degunking. I have a number of ideas on this point, but I'd love to hear your ideas too. In a few months, I'll have a lot better idea of what works and what doesn't in massive PHP to Rails conversions, and I'm sure everyone out there in the blogosphere will hear about them in due time.

12 January 2006

Matthew Palmer: Xinerama is the r0x0r

I was motivated, this morning, to look into whether my laptop chipset (Intel 915GM, for anyone interested) could do this funky multihead thing. Much to my surprise, it was (a) possible, (b) quite simple, and (c) incredibly useful. I now have a 15" Dell LCD screen on a cardboard box behind my laptop docking station. What is it useful for, you ask? Let me count the ways (with the help of the <ol> tag, of course):
  1. I've gotten a couple of PDF versions of my current "must always have with me" technical books (Programming Ruby and Agile Web Development With Rails, since you didn't ask), and now I can stick them on the other monitor to refer to while I'm coding.
  2. I can stick my xchat window up on the external monitor, so I can quickly glance at what's going on without having to touch anything. With the ability to stick a window on all desktops, I can have xchat no matter where I go!
  3. If I want to show somebody else something, it's handy to be able to push it up onto the top screen so they can more easily see it without having to crane down at my laptop screen (plus, if they go "what about <smudge>that?</smudge>", it's work's monitor that's getting grotted on, not my laptop screen that I have to stare at for 10+ hours a day).
Since I rarely (read: never unless I'm forced to) reboot my machine, instead relying on the magical marvels of sleep/hibernate, I did have one major concern with this multihead thing -- when I'm out-and-about, obviously I'm not going to have my external monitor with me, so how do I view things that are up on the other screen (either because I left them there when I was in the office, or because the window autoplacer stuck them there)? It turns out to be a fairly trivial and rarely noticed problem (except when I shove the mouse at the top of the screen to hit a button and my mouse disappears off into the wilderness). The answer to the invisible window problem is trivial -- I wave my mouse around where I can't see it until the window I want is highlighted in the miniview, then hit Alt-M to lasso it, and drag the little beastie into the light. Much easier than trying to guess where the title bar is to bring it down. In the interests of sharing the love (and having a record of what I did for next time), here is the sum total of what I had to add to my xorg.conf to make it all work on Ubuntu Breezy (along with some comments to make it easier to understand what's happening):
Section "ServerFlags"
        Option  "DefaultServerLayout" "double"
        #Option "DefaultServerLayout" "Default Layout"
EndSection
# This Device section is effectively identical to the one for the
# primary screen, with the addition of the Screen 1 parameter to
# select the alternate display device.
Section "Device"
        Identifier      "vgaout"
        Driver          "i810"
        BusID           "PCI:0:2:0"
        Option          "MonitorLayout" "CRT"
        Screen          1
        Option          "DDC" "false"
EndSection
# external display
Section "Monitor"
        Identifier      "generic"
        # I kept all these loose because most monitors support
        # autodetection.
        HorizSync       27 - 96
        VertRefresh     50 - 110
        Option "DPMS"
EndSection
Section "Screen"
        Identifier      "external"
        Device          "vgaout"
        Monitor         "generic"
        DefaultDepth    24
        SubSection "Display"
                Depth           24
                # I'd have added many more modes here, but
                # the amazingly crufty external LCD I'm using
                # only supports 1024x768.
                Modes           "1024x768"
        EndSubSection
EndSection
# xinerama layout
Section "ServerLayout"
        Identifier      "double"
        # The 0 0 (I think) identifies this as the "root" monitor
        Screen          "Default Screen" 0 0
        # You can also use Below, LeftOf, or RightOf to position
        # your shiny subscreen
        Screen          "external" Above "Default Screen"
        InputDevice     "Generic Keyboard"
        InputDevice     "Configured Mouse"
        # Never, ever forget this option.  You'll get laughed at
        Option          "Xinerama" "true"
EndSection

10 January 2006

Jonathan McDowell: Welcome to the suck

Matthew, I saw a poster for this today and thought of you. JD will probably welcome you when you get there.

6 January 2006

Ross Burton: Additions

New year, new colleagues: Iain Holmes and Tomas Frydrych joined Opened Hand this week. It's been great to watch Opened Hand expand over the months as when I joined I was the second employee. I think we're a pretty great team now, Matthew has done well!

5 January 2006

Matthew Palmer: Music To Hack To?

Ever since I got my portable ogg player a few months ago, I've been listening to music on a fairly regular basis, particularly when working on my computer (read: programming, mostly). I've noticed that what music happens to be penetrating my skull has a bit of an effect on my coding -- both from a productivity point-of-view (ever so slightly), but more interestingly, from an enjoyment point of view -- some songs just feel like they go well with cutting code, so I enjoy both the music and the coding more than I do normally. My personal favourites have been songs like Meatloaf's Bat Out of Hell, Robbie Williams' Let Me Entertain You, and several tracks off Evanescence's album Fallen. (On the Evanescence point, when my wife first bought Fallen and played it, about 10 bars into the first track, I said "now that is music to hack to" -- interesting how I got that feel so quickly). The common factor that I can identify there is that they're all powerful tracks, with a strong, driving rhythm and a feeling of speed. They also all sound good really, really, loud (much to my wife's displeasure). So, in the interests of scientific discovery, I'd like to know what other people like to listen to when they're writing their stuff. Both from a point of view of "what else can I stock my iRiver with to encourage my coding", and also to see if people's tastes in Music To Hack To is universal, or a personal thing. E-mail your thoughts to mtht@hezmatt.org, or if your blog is syndicated on Planets Debian, Ubuntu, SLUG, or Linux Australia, Just Blog About It and I'll pick it up. Summaries to follow.

Matt Brown: New GPG Subkey / Offline for a few days

Happy new year :) One of my Christmas presents was a brand spanking new USB key. For quite a while I’d been planning to put my SSH / GPG keys off onto something like this for some extra security. I’ll write up the exact steps of how I achieved my setup in the sometime next week, but it was all fairly easy. As part of the transition I followed Adrian von Bidder’s guide to multiple subkeys such that I have now a signing key (0×4054AB08) which I keep separately from the private key material of my primary key. My new key fingerprint is below

pub 1024D/59B2D9A0 2005-02-03
Key fingerprint = 6583 A11F 1428 FCDD 65FC C7B5 E0CD 3CDC 59B2 D9A0
uid Matthew G L Brown (Default Key)
uid Matt Brown (Debian Packages)
uid Matt Brown (WLUG Key)
uid Matt Brown (CRCnet Key)
uid [jpeg image of size 4390]
uid Matt Brown (MediaLab Key)
sub 1024g/DF8A0504 2005-02-03
sub 1024D/4054AB08 2006-01-04 [expires: 2008-01-04]

I’ve uploaded the new key to the keyservers, or you can grab it from my key information page. All in all I’m quite liking the new setup, plug usb key in, password dialog pops up for SSH key, enter password, password dialog pops up for GPG signing key, enter password. I then have both keys stored in the relevant agents easily accessible for signing email / logging into machines. Meanwhile my GPG private key is sitting securely somewhere else. I plan to sign all outgoing email from now on. Next step is to investigate libpam-ssh for local authentication so that I don’t have to type 3 passwords whenever I login. Moving House
We’re moving house tommorrow, this means that my DSL connection will be down for a few days while Telecom and my ISP get everything sorted out. Hopefully it will go smoothly and I’ll be back online sometime mid next week.

4 January 2006

Matthew Palmer: Tabs Are For Indents, damnit!

(Working Title: "Light up the crack pipe boys, thinkin' time's over!") A tab is a wonderful thing. It makes everything line up nicely. So what does YAML ("indentation is so critical to proper interpretation of YAML" -- from the YAML FAQ) do with them? It bans them. Apparently Guido (van Python) thinks the same way -- using the key meant for indenting to indent things is a crime against humanity. And why is it such a heinous crime to use tabs, you ask? Because "they are treated differently by different editors and tools" . Where's the prohibition on using line endings, then? They're treated differently by editors and tools, too. Broken tools exist, that's true, but we don't pander to them -- we either fix them, or insult the people using them until they switch to something that doesn't suck. If tabs are criminal, why do we even bother to *have* a tab key, then? Just pry it off your keyboard and throw it out. It's obviously not useful for anything. Let us bang on our spacebars, and have endless flamewars about how many spaces a particular project should indent all it's code, instead of just using tabs consistently, and then setting your personal preference of tab stop width in your editor like the good lord intended. I am so amazingly and deeply pissed off right now. Bloody religious zealots -- "I don't like something, so neither will you".

3 January 2006

Matthew Garrett

Irony:

Yeah, and i have mails from you which where degrees of magnitude more
insulting than those, and i have still not forgiven you about the way you
hurt me in april. So tone done your arrogance a bit, please.

Friendly,

Sven Luther

Matthew Garrett: 3 Jan 2006

Joey: While the public statements may seem oddly contradictory, you may be able to draw conclusions from the fact that I was recently contacted to help get the Ubuntu laptop support stuff into DCC...

Matthew Palmer: Those who don't understand Unix...

... and so on. Today's example: For each File. Yes, you know what it does already. But that would make for a very short blog post, and that is so not my thing, so I'll quote the short description of the project:
For each File lets you run an arbitrary set of GNU BASH commands upon an arbitrary set of objects. It can be used to perform repetitive tasks such as renaming, extracting, moving, and manipulating a large number of files.
Yes, dear friends, someone has sat down and written a program (and associated manual) to implement a bash for loop (and possibly a bit of find as well). Since it's all written in bash, it's not as though the author of the program was incapable of working out how to write for i in /path/*; do [...]; done, either. I'm not quite sure which part amused me the most. Was it the ever-optimistic -devel and -user mailing lists, completely devoid of archived material? How about the user manual -- 40% of which was the licence text? Perhaps it was the fact that this not just a bash for loop -- it's a fully internationalizationable bash for loop. I know one thing, though -- with all of the energy put into this program (and it's been going for several years now, apparently) the author could have created the ultimate, never to be surpassed manual for the bash for keyword, which would have been significantly more flexible, and certainly less interesting to poke fun at. Addendum: the whole site that FeF is hosted on is accessable only via SSL with a self-signed certificate -- except for the download page, which is HTTP only. So you "know" that the non-existent list archives are really what they say they are (at least as long as you trust "Gna!" as a certificate authority, as I'm sure we all do), but the actual source code is hosted who-knows-where, with no useful assurances as to provenance whatsoever.

1 January 2006

Joshua Kwan: My DPL ballot

(AOL!) [ 7 ] Choice 1: Jonathan Walther
[ 1 ] Choice 2: Matthew Garrett
[ 1 ] Choice 3: Branden Robinson
[ 5 ] Choice 4: Anthony Towns
[ 3 ] Choice 5: Angus Lees
[ 2 ] Choice 6: Andreas Schuldei
[ 6 ] Choice 7: None Of The Above
I haven’t been doing too much Debian work lately, but I think I’ll be uploading discover1-data and abiword soon. I will have to find a big chunk of time if I hope to do any kernel or d-i work.

30 December 2005

Matthew Garrett

Things to do if someone tells you that they think you're breaching their copyright:
Things not to do if someone tells you that they think you're breaching their copyright:

29 December 2005

Decklin Foster: Ruby Love

Matthew Palmer writes about the goodness that is Ruby. I, too, have just recently been won over, and am stumbling along with the online docs. In fact, this can be done in one line:
STDIN.readlines.sort_by   rand  .each    line  puts line  
But this is slow, as sort_by needs to be at least O(n lg n), and probably not perfectly random (I suppose you could do rand <=> 0.5, but that s not perfect either). What to do? We can implement a proper Fisher-Yates shuffle in a function, but that takes a couple lines. Can we still perform the actual read-and-print in one? Yesterday, why wrote something that really made me stop and go wow . We can attack the random sort problem in a similar (if more boring, as there are no lambdas to pass in) way, by simply adding another method to Array:
class Array
    def swap!(a, b)
        self[a], self[b] = self[b], self[a]
        self
    end
    def shuffle!
        each_index do  i 
            j = i + rand(length - i)
            swap!(i, j)
        end
        self
    end
end
STDIN.readlines.shuffle!.each    line  puts line  
Now that is cool.

26 December 2005

Matthew Palmer: Making DVD Movies

I recently came into posession of a collection of (smallish) WMV files containing photo slideshows. Unfortunately, they don't play on my DVD player, and SWMBO's laptop has No Hope of playing anything remotely like a video. So, technology to the rescue. Initially, I was just going to convert the movies into something that the DVD player would actually play, but by the time I had those, I was 95% of the way to doing the job properly, and it would (of course) look far nicer with menus and other Shinyness (instead of just a boring file menu), so I went all the way and made a complete DVD movie disc. The whole process was non-trivial to discover, but ultimately straightforward in practice (once you know the set of command line options to use), so I'm archiving this for posterity. I use Ubuntu Breezy. A lot of the packages I've used are under really heavy development, so slightly older versions may not work. If you're running another distro, finding compatible versions may be tricky (or not). Try the process with whatever you've got; if it works, great; if it doesn't work, try upgrading versions or something. Step 1: Convert Video Files To Something Less Bong Packages used: transcode 1.0.2-0ubuntu2 (trivial backport from Dapper; mail me if you want it, but the one in Breezy will probably work OK), mplayer 1.0-pre7cvs20050716-0.1ubuntu9, mjpegtools 1.6.3+rc2-0.0ubuntu2 As far as DVD players are concerned, WMV is non-existent (clever things). DVD players like some form of MPEG-2 video with AC3 or MP2/3 audio. So, we use transcode to convert the video. For WMV files in particular, only mplayer does the decoding right (the af6 plugin seemed to work, but the resizing didn't turn out too well). So, our command is:
 transcode -x mplayer -i $FILE.wmv -g 640x480 -e 44100,16,2 -o $FILE.tc --export_prof dvd-pal
Items of note: As I mentioned, the output from the transcode run is two separate streams -- an audio and a video stream. We want to combine them. This is quite easy:
 mplex -f 9 -o $FILE.vob $FILE.tc.m2v $FILE.tc.mpa
This is a simple "glue them together" command -- the only interesting bit is -f 9, which simply specifies a particular MPEG-2 multiplexing method (full DVD-compatibility, or some such). If things aren't working out for you, try -f 8, which I believe also works. Since you'll probably have a bunch of video files to convert at once, you'll want to automate all of this with a shell script or shell 'for' loop. Step 2: Make a DVD Layout Packages used: qdvdauthor 0.0.10-0.1 This is the bit that I thought would be hard, but is actually amazingly easy (the previous step took me two days to get completely right, this bit took me about an hour). Fire up qdvdauthor, answer any stupid questions it might come up with. When the main screen comes up, click on the 'Add Movie' button on the left hand side, then select the first video you want to add. Repeat as required to add all of the videos you want. (Remember to add the VOB files you created earlier, and not the WMVs you might still have laying around. D'oh!) Clicking on the 'Video' tab on the left hand side should list all of your videos. Check they're all there, and are the correct size. Next, create or find a suitable background picture or video to make your main menu background. I've only tried with an image, but it seems to accept videos if you give them to it. Click on the 'Add Background' button on the main qdvdauthor screen. Pick your image. The image will probably need resizing; just go with the flow and pick the correct image size. Now you need to add those funky little menu items for selecting on. This is the really cool bit. Right-click on the background image you've got, and select 'Add Text'. Drag on the background to create a text box. You'll get a dialog come up, type some text in the bottom box, then click 'OK'. This'll create the text on the background. Drag it around if you need to. Finally, right-click the text and select 'Define as Button'. Another dialog box will appear. Rename the button if you like, then pick which video you want to play from the select box marked 'vmgm'. Click 'OK'. Repeat as necessary. That's all the hard stuff done. You can add a sound clip to play over and over again if you like, but I haven't done that yet, so you're on your own there. Step 3: Make the DVD For this step, I needed to compile toolame from source. Get it from http://toolame.sf.net/. This is super-simple. Basically, just click on the giant icon labelled 'DVD' in the top toolbar. Follow the prompts. Click 'OK' as necessary. When the process is done, check the 'Keep Open' checkbox quickly, and go over the output to ensure nothing completely crapped out. Assuming all is well, you can make your DVD image by running:
 mkisofs -dvd-video -udf -o /tmp/dvdimage.iso $DVD_DIR
Naturally, replacing /tmp/dvdimage.iso and $DVD_DIR with appropriate values. Lastly, cook the ISO to appropriate media with something like:
 cdrecord -dao -eject -v speed=2 dev=1,0,0 /tmp/dvdimage.iso
Assuming all went according to plan, you should have a physical DVD you can stick in your DVD player and watch to your heart's content. Congratulations! You just did all of this in about a 50th of the time it took me.

Next.

Previous.