Open Source Bonanza

Was graciously given permission by my current (for the next 2 days) employer to open-source some utility stuff I’d written while there. Expect the following imminently, pending some minor cleanup:-

  • TestGenerator – recursively scans all java source code in a package and generates an AllTests TestSuite class. Simple, but useful.
  • JScaffold (working title) – Initially developed as a means to mock up a servlet container for testing servlets, but generally useful anywhere hard-to-create interfaces (such as HttpServletRequest) are used. Similar in design to EasyMock, but less concerned with assertions about how the mock objects are called, and more with faking up a convincing environment to persuade servlets to render their output into an easy to handle object like a ByteArrayOutputStream or String which can then be checked using tools like Jakarta Regexp. Useful for high-level testing.
  • Advertisements

The Simplest Thing…

…is surprisingly hard to do. Yesterday I got fed up enough at trying to figure out whether our stats-gathering code was working to actually write a script to generate an artificial sample of perfect data. It took me about 20 minutes. When I’d finished I showed it to a colleague and she said “Why did no-one think of this until now?” I had no answer. If anyone should have thought of it, it should have been me. It seemed so obvious a thing to do, once I actually got irritated enough to sit down and do it. Up until then we’d been doing our testing using real data. More life-like? Yes, but impossible to verify automatically. If the system claims 15,768 occurrences of ‘x’ in a total sample size of 28 million, how do you know it is right? Check by hand?

Automated repeatable tests. Such a small amount of effort for such a huge gain.

Serendipity

GUI testing tool. Glen brings up the Marathon Man testing tool. Looks hugely useful. [cwinters.com]

Couldn’t pass up this opportunity to divest myself of some news that has seriously impacted my blogging recently. I first heard of Marathon Man at a job interview, from the people who unleashed it on the world: ThoughtWorks. I start there on monday. Woohoo! Can’t wait. Working for the people who brought you not only Marathon Man, but also CruiseControl.

I’ve been bursting to blog about it, which has affected my posting recently. Sorry. I feel much better now.

Text + Processing = Perl

The Search for the XML Oriented Programming Language.

The Search for the XML Oriented Programming Language. …  So I predict that 2003 will be the year we all experience the search for the true meaning of “XML oriented programming”!… [TheArchitect.co.uk – Jorgen Thelin’s weblog]

[James Strachan’s Radio Weblog]

At the risk of sounding like a broken record, now that I am reasonably comfortable with it, any time I find myself in need of text processing, I reach for Perl.

I am planning to try and hit Python soon, so I may well start slagging Perl and proclaiming Python as the ultimate language. I do this fairly regularly. Whatever the thing I am currently excited about is, I tend to rave over. Only to drop it like last year’s action figure as soon as I find a new shiny toy to play with.

Hiring Hackers

Guide to cultivating a hacker in the workplace. The hacker FAQ The following list is an attempt to cover some of the issues that will invariably come up… [kasia in a nutshell]

Saw this a while back, but still makes for entertaining reading. Now to ‘accidentally’ leave it lying on the printer, my desk, around the office, stuck to the boss’s door…

“Yes I know it looks like the whole team is playing Quake, they’re working on a particularly difficult problem…”

Mobile Phone Evolution

My sister got a new mobile phone for Christmas. The latest consumer Nokia (7210 I believe). With a colour screen and polyphonic ring, it makes the phones of even 12 months ago look clunky. The current rapid development cycle of mobile phone hardware is strikingly reminiscent of the PC revolution during the late 80’s. Remember CGA? EGA? VGA? Each graphics standard made the one before look positively archaic. Same with sound technology. When the SoundBlaster card first hit the scene it was a revelation. Suddenly the PC was up there as a gaming platform. Well guess what’s making waves in the mobile market currently? Russ knows!

Interesting…

Atkins hits Europe

Dr. Atkins talks to Larry.

I got some semi-spam from the Atkins center. This should be interesting, actually, we get Larry King Live here in Spain on CNN International – though it’s usually broadcast a bit late. This may not be here until tomorrow, but I’ll check tonight to see:

Dr. Atkins will answer questions about the science behind the Atkins Nutritional Approach, the foods you should eat when doing Atkins, including the right kinds of fruits and vegetables, and will discuss his new book, Atkins for Life, available in bookstores and at AtkinsCenter.com as of January 18th.

It’s a “Don’t Miss” for people who do Atkins.

I need to get back into the diet now that the holidays have passed. More info when I actually start again.

-Russ [Russell Beattie Notebook]

Something of a departure for me today, blogging about something that is reasonably personal, and utterly unrelated to technology. Interestingly though, still highly related to the general hacker mentality of intense curiosity about how stuff works.

Atkins appears to be hitting Europe with the marketing machine this year. I just finished watching ‘Tonight with Treveor Macdonald’, which was entirely devoted to the Atkins diet. It was interesting, and I found myself nodding along to their two diet-testers’ comments about the induction phase.

Admission: I did the Atkins induction at around the same time Russ did, out of the aforementioned curiosity about this diet which appeared to contradict accepted wisdom. Yes I lost weight over the two weeks of phase 1 (induction), and yes I felt rough for about the first week. This was after some time spent reading around the theories on the Atkins website. I didn’t continue the diet after the first phase, as I got a huge fruit craving. I now (strangely) eat far more fruit than I used to, including several that I thought I didn’t like.

What Atkins did do for me was break me of several bad habits involving toasted bagels for breakfast, curries and pizza (not for breakfast). Just being forced to examine in some detail what I was eating was good for me, and I lost about 14 pounds (just under 7 kilos) – some of which happened after I chucked the Atkins diet, but stayed off the high-carb/high-fat food. But do any of us really need to be told that pizzas and burgers are not the healthiest food in the world?

What annoyed me slightly about the programme was the implied message that Atkins is all about the (virtually) no-carb phase of the diet. While I don’t agree entirely with the Atkins philosophy or recommendations (kudos to them for claiming the rest of the body of research is wrong, but hard to swallow objectively), I still think they are entitled to a fair representation. The entire TV program was focussed on the most intense phase (which Atkins themselves only recommend you do for 2 weeks), and only once was it mentioned in passing that this was only phase 1 of the diet plan.

Anyway, to sum up, going cold turkey on stuff that is bad for you is almost always going to have positive results if you break the habit, but everyone is different, use your common sense and go with what works for you. Your body will let you know if that works for it.