You know when grown-ups tell you everything's going to be fine, and you think they're probably lying to make you feel better?
Everything's going to be fine.

Saturday, April 28



I've had a couple of glitches with and the beta site over the last couple of weeks when updates didn't go quite as planned. I have a development environment here at Pixy Central, but updates go straight from development to deployment, with nothing in between.  I'd been thinking of getting a new PC or two, so I specced out a staging/test server, and lo, it was cheap.  And then I added a faster CPU and more memory and disk, and lo, it was still cheap.  And then I realised that if I added even more memory, it would still be cheap, and I could run VMWare Server or OpenVZ and use the one box as my development, staging, test, and experimental server all at once.

Between the rising Aussie dollar and generally falling prices, I'm looking at $1000 for a system that's more than twice as fast and has twice as much memory as anything I have now.  That will let me run six or eight virtual environments, so I can have everything live at all times.

Since I say farewell to Haruhi after Tuesday - that's my computer at my old job, and my support contract with them essentially finishes then - this will be the new Haruhi.  And the virtual environments will be Kyon, Mikuru, Yuki, Itsuki, um, Ryoko, Tsuruya, Kyon's two friends - does Kyon's little sister actually have a name?

If it turns out I need a little more power or memory, I can just buy a second one; gigabit ethernet is plenty fast enough as an interconnect for this.  I'm not going to buy eight servers just because I need eight servers, but I can certainly buy two.  The only hard part would be coming up with a matching naming scheme...

Posted by: Pixy Misa at 07:38 AM | Comments (8) | Add Comment | Trackbacks (Suck)
Post contains 299 words, total size 2 kb.

Wednesday, April 25


Expense Claims

Exceptions should be, well, the exception.  They're not a replacement for testing condition flags, they're what you use after you've tested all the flags.

And a subroutine that causes 40,000 of them can slow your code down... significantly.

Posted by: Pixy Misa at 02:40 AM | Comments (13) | Add Comment | Trackbacks (Suck)
Post contains 40 words, total size 1 kb.


Ill-Advised Optimisations

Yes, it's 6% faster.

On the other hand, it doesn't work.

Thought I had a nice speed improvement for my BBCode parser, moving some static code up to the module level. However, the static code was creating a dictionary, which was now shared between parser instances, which caused odd side effects.

Optimisation removed.

Posted by: Pixy Misa at 02:36 AM | No Comments | Add Comment | Trackbacks (Suck)
Post contains 55 words, total size 1 kb.

Tuesday, April 24


That's What I Like To See

My second page, without the burden of the Great Comment Thread of Doom:

88kb generated in 0.0631 seconds; 37 queries returned 113 records.

And the Heresy page in my RSS reader:

13kb generated in 0.0197 seconds; 21 queries returned 41 records.

Hang on... Hey, caching has stopped working. Hmm. Minx is filing stuff away in memcached, but nothing's coming out. I might just need to poke the daemon with a stick. And set up the rest of the caching network.

Posted by: Pixy Misa at 03:54 AM | No Comments | Add Comment | Trackbacks (Suck)
Post contains 86 words, total size 1 kb.


Rule-Based Filtering

I don't have Bayesian spam filtering in Minx, but I do have a honeypot system collecting data on spammers, and a set of rules that pick up on common spam characteristics and assign a score to each comment.  Comments scoring 5 or more are held for moderation.

I just got one of those Rolex replica spams.  It scored 109.8.

Posted by: Pixy Misa at 03:52 AM | No Comments | Add Comment | Trackbacks (Suck)
Post contains 61 words, total size 1 kb.

Saturday, April 21


Yahoo! Video, Fix! Your! Embedding!

I'm back on the easy video embedding tags for Minx.  I've done, let's see, ten different sites so far.  They're all a little different, but in each case, there's a unique video ID, and you can unpack that from the provided URL and repack it into their embedding code and it works.  For most of the sites this was easy.  For one, eyespot, it's a bit of a pain (and the page URLs are useless).

And then there's Yahoo! Video, who give you this:

<embed src='
player/media/swf/FLVVideoSolo.swf' flashvars='id=1020374
&creatorValue=Y2FiYWxsYXZlcmRl&vid=136897' type='application/x-shockwave-flash' width='425' height='350'></embed>


Update: Right. In less than an hour I've added BBCode tags for iFilm, Eyespot, Veoh and Guba.  Just don't ask me about Yahoo! Video.

Posted by: Pixy Misa at 01:55 AM | Comments (4) | Add Comment | Trackbacks (Suck)
Post contains 147 words, total size 2 kb.

Thursday, April 19


Hey Hey!

I went ahead and implemented a first pass of the performance enhancing technique I spoke about earlier.  The template parser still handles data tags purely using lookup tables - this is not the full smart-parser version - so it requires some extra setup effort that may be wasted in the end.

The first cut of it was somewhat disappointing - 10%, maybe 15% faster.  I decided to experiment further to see if I could do better than that.  The first version was creating custom objects with formatting codes and dropping them into the lookup table; I decided to try just using raw tuples (a Python built-in structure, essentially a fixed list). 

That did the job: Gains jumped to over 40%.  Object creation seems to be about as expensive as a function call, so I was eating up most of my potential improvement right there.

I'll bash on it for a couple of days, then put the new engine into this Sunday's update.

Posted by: Pixy Misa at 11:22 PM | Comments (2) | Add Comment | Trackbacks (Suck)
Post contains 164 words, total size 1 kb.

Wednesday, April 18


An Odd Feeling Of Something Or Other

One of the cool things about Minx is the way that the functions interact with each other, so that the feature set scales superlinearly with the code size.  A lot of it is table-driven, and a lot of the tables are dynamically generated, so that a 2000-line template engine can process many thousands of template tags.  (A quick estimate: Counting variants and subfields, there are currently 12,000 data tags defined for entry objects alone.)

There are two downsides to this.  The first is documentation... Though if I get an automatic document generator going, the user manual will be impressive.

The second is that the bzipped code archive is 53kb.  Though that's not bad so much as merely somewhat depressing.

Posted by: Pixy Misa at 03:15 AM | Comments (4) | Add Comment | Trackbacks (Suck)
Post contains 126 words, total size 1 kb.

Sunday, April 15



The PC abandonware scene is vibrant and full of life, with sites like Abandonia and Home of the Underdogs providing a huge range of old games for download (albeit incredibly slow download).  For the Amiga, though, there's almost nothing.  There's a number of sites that offer up catalogues of their libraries of disk images which they will not give you.

But Cinemaware, maker of such classics as Defender of the Crown and King of Chicago, has all of their old games available for download - in all formats, including Amiga and PC. Including Lords of the Rising Sun, the disk of which died on me before I could finish the game.  Now, finally, I get my chance to conquer all of Japan!

Posted by: Pixy Misa at 12:02 AM | Comments (2) | Add Comment | Trackbacks (Suck)
Post contains 123 words, total size 1 kb.

Monday, April 09


Ack. Pfft.

Just doing some security enhancements.  I was thinking over some new code, and I thought... Hmm, I wonder if that library does any checking... Uh oh... Well then, I'd better do some checking, but at least I'm not... I am?! Fix that, make sure it can't happen again, patch the wrapper routines, screen the user input before it gets passed to the wrapper routines (which I'd been very good about until now, but it only takes one screwup...)

Tested the whole thing against various nasties, and it passed with one small glitch, which I've corrected.

Writing code is easy; writing code that will survive when dropped unsupported into a free-fire zone is harder.
  1. Default deny.
  2. Security in depth.
  3. Never trust user input.
  4. Never trust library routines to do your checking for you.
  5. Even if you wrote them yourself.
  6. Especially if you wrote them yourself.

Posted by: Pixy Misa at 03:34 AM | Comments (1) | Add Comment | Trackbacks (Suck)
Post contains 141 words, total size 1 kb.

<< Page 1 of 2 >>
74kb generated in CPU 0.0378, elapsed 0.9239 seconds.
57 queries taking 0.9029 seconds, 380 records returned.
Powered by Minx 1.1.6c-pink.
Using https / / 378