Archive for the ‘Subversion’ tag
I have been using Maatkit in a different way since I joined Percona as a consultant. When I’m working on a system now, it’s a new, unfamiliar system — not one where I have already installed my favorite programs. And that means I want to grab my favorite productivity tools fast.
I intentionally wrote the Maatkit tools so they don’t need to be “installed.” You just run them, that’s all. But I never made them easy to download.
I fixed that. Now, at the command line, you can just run this:
Now it’s ready to run. Behind the scenes are some Apache mod_rewrite rules, a Perl script or two, and Subversion. When you do this, you’re getting the latest code from Subversion’s trunk. (I like to run on the bleeding edge. Releases are for people who want to install stuff.)
Because there’s some Perl magic behind it, I made it even easier — it does pattern-matching on partial names and Does The Right Thing:
baron@kanga:~$ wget http://www.maatkit.org/get/sync --21:38:50-- http://www.maatkit.org/get/sync => `sync' Resolving www.maatkit.org... 18.104.22.168 Connecting to www.maatkit.org|22.214.171.124|:80... connected. HTTP request sent, awaiting response... 302 Moved Location: http://www.maatkit.org/get/mk-table-sync [following] --21:38:50-- http://www.maatkit.org/get/mk-table-sync => `mk-table-sync' Connecting to www.maatkit.org|126.96.36.199|:80... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [application/x-perl] [ <=> ] 163,259 136.51K/s 21:38:51 (136.13 KB/s) - `mk-table-sync' saved 
The redirection is there because otherwise wget will save the file under the name ‘sync’ instead of ‘mk-table-sync’.
And if you’ve forgotten which tools exist, you can just click on over to http://www.maatkit.org/get/ and see.
A quick poll: instead of getting the latest trunk, should this give you the code from the last release? I can do that, if you want.
 OK, it’s only refreshed every hour. So you’re getting code that’s up to an hour old.
 update: now /get/foo gets the latest release, and /trunk/foo gets the latest trunk code.
Sheeri wrote a post (now a 404 error) referring to Maatkit on Ohloh, which I have never heard of before. I took a look at what Ohloh thinks about Maatkit. It’s kind of neat. Beyond just the obvious “social website” stuff that’s all the rage these days, it actually looks at the project’s SVN history, analyzes the codebase, and so on.
It also estimates 8 person-years of work have gone into the project, and says that at $55,000/year it would cost $450,702 to write the code as it currently exists, which is kind of funny. It took me a whole lot less than 8 years to write. (Perhaps this is why that salary strikes me as unrealistic).
It has a couple of other interesting things, like a visual timeline of source control commits, analysis of licenses it finds in the code, analysis of programming languages, and so on. Really pretty neat overall.
There’s also the ubiquitous popularity rating: how many people have “stacked” the project. I notice it’s been stacked 3 times, coincidentally the same number as MySQL Proxy. It will be interesting to see how that changes over time.