searched flickr for examples in the hope of finding a discussion in comments. Photos tagged with crayon art was the best of the flickr searches. Several people, including Steve brandon, used a camera, rather than a scanner.

Ok, that's enough searching. Let's play with some balances. Here's screenshots of the settings (from GIMP's colour menu) and the changed versions of the image.

original

take 1

take 2

I bumped up blue similarly.

take 3

Applied these settings after inverting the image.

take 4

take 5

I expanded this settings box out to make fine control easier.

In the end I went with the first take, as the least abstract of the bunch.

Tuesday, 14 September 2010

This didn't fail to amused me. From http://210.8.42.125/other/accagr1.shtml :

The User will not use, nor will it sell or make available to any person, the Information for the purpose of issuing Independent Forecasts or Warnings unless:...(ii) the additional forecasting elements are not inconsistent with the Bureau's Forecast;

Saturday, 11 September 2010

As an exercise, I made a Starcraft 2 map that pits various sizes of starting-unit squads against each other. This post covers the initial results of my test.

This graph shows how many units Player 1 (P1) had left after attack moving through Player 2's (P2) squad (while P2's squad was likewise attack moving through P1's squad). All the fights resulted in victory for one side, so if P1 had any units left, P2 had none. Only fights that P1 won are displayed. It says "no micro" because there was no micromangement, only the default AI was used. A good human player can improve a unit's performance by issuing more specific orders (focusing fire, pulling back damaged units etc).

How to read the graph

The first column of subgraphs shows the fights where P1 used Marines. Likewise the first row of subgraphs shows the fights were P2 used Marines. Within each subgraph, the number of units that each player starts with is varied from 1 to 8. The leftmost column of each subgraph shows the results of fights where P1 started with only 1 unit. The topmost row of each subgraph shows the fights where P2 started with 8 units. Diagonal lines have been drawn through the numerically even fights (based on count of units, not cost).

I think all 4 of the actions happen at the same game time. Point 1 and point 2 were on an empty flat surface, on a horizontal line, 15m apart. (I'm going to call whatever distance unit the map editor uses "m", as saying "15 units apart" is confusing).

None of the units had any upgrades.

Discussion

In this situation, 2 zealots will beat 7 'lings and 3 zealots will beat 7 marines. But the there was no micromanagement, so, for example, in the 8 marines vs 8 zealots case the marines split their fire between the two lead zealots. Also, each test was only done once. Subsequent experiments have show that the outcomes are not always the same (sometimes one zealot will die in 8xZealot vs 8xMarines, sometimes all zealots survive).

Those of you that don't know SC2 should also note that for 100 Minerals you can by 1 zealot, 2 marines or 4 zerglings.

Software

I used the SC2 map editor, some commandline tools, R and ggplot2. Do email me if you'd like a copy of the map (maps at abznak.com). It's currently just a bit rough to publish.

Future Work

Try different units

Try repeating tests

Try fractions of units (i.e. damaged units)

Clean up the map

Write up the map

Write up the R code

But that's going to have to wait, because I feel like actually playing some SC2 now. I'm thinking 3 zealot rush.

Monday, 30 August 2010

First time I have used an I pad, someone had left safari running. First thing I did, google "iPad alt tab". http://noscope.com/journal/2010/01/why-the-ipad-doesnt-have-multi-tasking suggests the home button which seems to be the hw button with the square on it.

Touch typing: Quality of a netuoy us bot sttauobed.

Hmm, no.

PS: In case it wasn't obvious, I did all that on an iPad. The post is a little unclear because typing was so much work.

Tuesday, 24 August 2010

Hello to everyone visiting because I gave them them this link at OPD today.

So, I make websites as my day job. If you're a celebrant (or any small business) and would like me to give you a quote to build, host and/or maintain your website please don't hesitate email me at work@leetmotif.net.

Edit: Except that only lets me load the library, connecting doesn't work now. Gave it the mysqllib.dll that comes with HeidiSQL, that'll work until mysql-5.1.47-win32.msi finishes downloading (copied the dll into a dir called "bin", set MYSQL_HOME to dir that bin dir was in).

Thursday, 6 May 2010

I'm using this pattern (in vim) to find "<?" that aren't "<?php":\(<?\)\@<=\(php\)\@!
it uses zero-width look behind for the "<?" and zero width negative look ahead for the "php".

And using grep (in perl mode):grep -P "\<\?(?!php)" -r .

Test cases:YES <?NO <?phpYES <?=YES <? asdfYES <?adsfNO asdg

And a quick shell script for fixing a file (I say "quick" because it doesn't always work - e.g. if you have "<?/* comment */?>" it doesn't put in the extra whitespace you need after the "<?php"):sed 's/<?=/MAGICaaxo3ohW/' | sed 's/<?php/<?/g' | sed 's/<?/<?php/g' | sed 's/MAGICaaxo3ohW/<?php echo/'

Monday, 8 February 2010

If you're using trying to use Nice Menus to make a Zen subtheme for Drupal, you might need to remove the "overflow: hidden" from the navbar block in layout.css if you're having trouble with your menus not working or only partly showing up.

Here's a quote from layout.css (the comment is not mine):

#navbar { overflow: hidden; /* May need to be removed if using a dynamic drop-down menu */ }