Hole in nbr.co.nz paywall

Update: NBR have fixed the hole

It looks like the National business review has a hole in their paywall. I don’t know if this is an intentional hole but as at the time I’m posting this it enables people to read articles that are “subscriber only content”.

A sample restricted article by Chris Keall “Did Paul Reynolds collect millions for hitting squishy targets?”  If I browse to it via http://www.nbr.co.nz/article/did-paul-reynolds-collect-millions-hitting-squishy-targets-109070 I get an error message:

Blocked version of article

However if I take the article number ( 109070 )  and access it via the URL http://www.nbr.co.nz/print/109070 I can see the whole article content:

Visible version of atcile

I guess somebody made a little mistake with the way the setup things or possibly this is designed to allow search engines like google to still find and index NBR’s content.

Share

Tech Updates, looking to the future

A few things I’ve been looking at or intending to look at over the next few months.

  • I’ve bought a new computer a couple of weeks ago for home. The computer is intended to replace the house server. The main functions will be as a file server and host for virtual machines. The big changes is that I’ll be switching from Xen to KVM as virtualisation technology.
  • KVM + PXE + Kickstart + Ubuntu  – I really want to build my virtual machines automatically and at the same time to be using a more general machine building method . This page on the Ubuntu site looks like it is a good start and I’ll blog a bit when I get it all done.
  • I need to do some work on Mondo Rescue , I have a bug I reported that is supposed to be fixed and I have to test.
  • GlusterFS is a distributed network file system that looks really cool, I’m intending to play with this a bit.
  • Once again we’ve applied to do a Sysadmin Miniconf at the 2010 Linux.conf.au conference. Once again we hope to have a really good miniconf. However no less that 32 miniconfs have applied for just 12 slots so not sure if we’ll get in. We were really popular last year but personally I’ve no idea what our chances are this year. Bit down about the thought of not getting but I guess whatever happens will happen.
  • I keep getting good ideas for websites and products. Not programming and having poor time control means most of these ideas are probably not going anywhere. Maybe I’ll try a couple of them though. Also got some further ideas for technologies to play with but want to get the ones above sorted first.
Share

Watching processes with monit

I’ve been having a small problem on one of my server with the http daemon dying every week or two. It’s not often enough to be a huge problem or invest a lot of time in by enough of a nuisance to require a fix. So what I ended up doing was installing monit to look after things.

monit is a simple daemon that checks on server resources ( mainly services and daemons but also disk space and load ) every few minutes and sends and alert and/or restarts the service if there is a problems. So after installing the package ( apt-get install monit ) I just created a series of rules like:

check process exim4 with pidfile /var/run/exim4/exim.pid
   start program = "/etc/init.d/exim4 start"
   stop program = "/etc/init.d/exim4 stop"
   if failed host 127.0.0.1 port 25 protocol smtp then alert
   if 5 restarts within 5 cycles then timeout

check process popa3d with pidfile /var/run/popa3d.pid
   start program  "/etc/init.d/popa3d start"
   stop program  "/etc/init.d/popa3d stop"
   if failed port 110 protocol pop then restart
   if 5 restarts within 5 cycles then timeout

for the main processes on the machine. Sample rules are available in the config file and documentation and google is fairly safe as long as you make sure you don’t copy a 10th generation rule of a “Ruby on Rails” site ( ROR components apparently require frequent restarts). All up the whole install and configuration took me around half an hour and I’m now monitoring:

# monit summary

System 'crimson.usenet.net.nz'      running
Process 'lighttpd'                  running
Process 'sshd'                      running
Process 'named'                     running
Process 'exim4'                     running
Process 'popa3d'                    running
Process 'mysql'                     running
Process 'mailman'                   running
Device 'rootfs'                     accessible
Process 'mailman'                   running
Share

Hacking InternetNZ Council Vote

Internetnz is the main New Zealand Internet lobby and policy organisation. More or less they take money from .nz fees and redirect it to benefit the New Zealand Internet and Internet users.

In a few days there is an election for it’s president and council. Following a post by Andy Linton to the NZNOG mailing list about the “need for a strong voice from the technical community” several technical people have put their name forward for council.

Following a discussion on the Internetnz mailing list I realised that many people are unsure of the best way to rank a list of candidates to ensure the “best” result. Looking around I was unable to find a good reference for this online so I thought I’d write a quick post here. I should give the disclaimer that I’m not an expert in this are so possibly I’ve made an error. I’m also only addressing the Council Vote note the President and Vice-President votes.

Voting System

The voting system for Internetnz is outlined here but what it simply means for the voter is that they rank the candidates from 1st to last. For each council seat the lowest polling candidates are eliminated and their votes allocated to the next preference until one has an absolute majority. For the next council seat it happens again except the ballots that had the previous round winner as first preference are eliminated from any further consideration.

You can see what happened last year here . There were 9 candidates, 6 seats and 90 voters. Rounds 1 through 7 show people being eliminated and their votes transferred around until Jamie Baddeley is elected. On Round 9 it starts again but 16 votes have been removed from the pool, these are the people who voted for Jamie as their first preference.

In rounds 9 though 15 the eliminations continue until Michael Wallmannsberger is elected. Then his 16 first preference votes are removed and it starts again until all 6 candidates are elected. The 2006 result is also online .

The interesting thing to notice is that only ballots that put an elected candidate as the 1st preference are eliminated in the first round.  So while the 16 people who voted for Jamie Baddeley helped elect him in the first round they had no influence in later rounds. On the other hand the 22 people who put Neal James, Carl Penwarden, Sam Sargent and Muchael Payne as their first preference got to participate in all 6 rounds of the election.

So what is the trick?

So out of the candidates I would characterise the following people as technical: Lenz Gschwendtner, Glen Eustace, Stewart Fleming, Andrew McMillan, Dudley Harris, Gerard Creamer, Nathan Torkington and Hamish MacEwan. This is eleven out of the 17 candidates running for the four  council seats.

Now assuming that there is a some level of support for technical candidates the worst case would be that all “technical” voters put say Nathan Torkington (to pick a well known name) as first preference. Nathan is elected as the first candidate and then the technical voters have no further influence on the other 3 councillors.

Instead we want to make sure that techie votes elect as many candidates as possible.

So what should I do?

Note: I am using the term “round” below to refer to each council seat election ( 6 in 2008, 4 in 2009 )

If you have a group of voters and a ground of candidates you have two main objectives:

  1. Avoid giving a first preference to a candidate that will be elected in the early rounds so your ballot will participate in as many rounds as possible.
  2. Give enough first preferences to your candidate to ensure they are not eliminated early in each round

The first idea is easy. Don’t give you first preference to a technical candidate. However this is where the second objective comes in, you need to give them enough first preference votes so that they are not eliminated early in every round.

I think the following should work:

  1. Rank all the candidates in you order of preference
  2. Decide how far down the list you are “happy” with the candidates (ie the 11 techies listed above)
  3. Randomly (yes, really randomly) pick one of the acceptable people and put them as your first preference.

The idea now is that if say we have 40 technical people voting then each of the 11 technical candidates will end up with at least 3 or 4 first preference votes. As the lowest ranked of these is eliminated then preferences will flow to the other technical candidates (in order of most popular) . If a technical candidate is elected only around 1/10 of the technical ballots will be eliminated from later rounds so there is still a good chance of electing other candidates.

What could go wrong?

It’s possible than the random allocation of first preferences will result in a popular candidate ( eg Nathan Torkington ) randomly getting a smaller number of first preferences and being eliminated early in every round. I think this is a small risk since

  1. it is likely that popular candidates will get first preferences from other voters
  2. popular candidates will have a higher random chance of people put as first preference since they will be in the “acceptable” list of more techie voters
  3. Even if this does happen others in the slate will still get in.

Feel free to let me know any questions ( or point out horrible errors I’ve made)

Share

Waitakere Open 2009

Over Queen’s birthday weekend ( May 30th – June 1st ) I played in the Waitakere Licensing Trust Open. The tournament is held in Lincoln Road in West Auckland which is a dreary area of light industrial buildings, big-box retailers, fast-food and everything else that West Auckland prides itself on. I bought some breakfast at a small bakery along the road and when I mentioned that the shop next door had been broken into I was told that it was the 8th time that month. However this post is about the chess rather than urban design.

The event itself consisted of an A,B,C and Junior tournament with approx 32, 22, 25 and 33 players in each. I successfully applied to get into the “B” on my recent performance tournament even though it was for 1400-1700 rated players and I’m currently on 1274 so I was the lowest rated player in my grade.

Game 1 – White vs Dean Zhao ( 1555 ) – Sicilian c3

I had a fairly good opening, missed a couple of moves but by move 12 I had an advantage and black was very much pushed back and tied up. However I couldn’t find the best continuation and  my opponent managed to swap off my attacking pieces and then get a little ahead in the endgame. He then used an advantage of a couple of pawns to beat me. So I was very much outplayed.

Game 2 – Black vs Andrew Michael ( 1502 ) – Slav

A pretty even game for the first 20 moves or so. White was pushing a bit but no major fireworks. After that I slowly edged the position in my favour and threatened to win some material around move 28 and got a rook for a bishop and 2 pawns. However in a series of bad moves I missed a discovered check (lost my Knight) , the reply that would have won back the material and a few moves later ( after I was two rooks against a rook and two minor pieces) a chance to get a rook and a bishop for a rook. Finally I blundered into a fork and lost a rook and resigned. I was really disappointed with my play here, my errors were under time trouble (that was my fault) but I was still ahead and lost the game.

So after the first day I was on zero points and not very happy.

Game 3 – Black vs Ron Collingwood ( 1533 ) –  Slav

Another Slav although this transposed in so wasn’t very tidy. I was also worried about repeating some bits I didn’t like in the last game. White got a nice attack down the C file with both his rooks which had me in a bit of trouble, after he transferred his attack to down the F file I was lucky and was able to win an exchange by threatening mate. With two rooks vs a rook and a bishop and 6 pawns each I then got my rook behind his pawns, swapped off a rook and then slowly (50 moves) and carefully took his pawns until I had a king and 5 pawns against a king and he eventually resigned. My first win cheered me up.

Game 4 – White vs John Francis ( 1560 ) – c3 Sicilian / Advance French

As has happens sometimes my c3 Sicilian transposed into a Advanced-French. My 8 Bg5 and 9. Nh4 were not a good combo though and black punished me with a kingside pawn advance.  However I pushed back and he retreated which was not the best line. After 25 moves we had just a rook and two minor pieces each plus a solid wedge of pawns in the centre and queenside. A miscalculation on my part allowed him to get a bishop behind me which won a pawn but after swaps we were left with a drawn position and agreed to a draw.

I was a lot happier that night since I was on 1.5 points and only needed a little over 1 to play to my rating.

Game 5 – Black vs Brett Rider (1649) – Centre game / Danish Gambit

An unusual opening here ( 1. e4 e5  2. d4 exd4 3. Bb4 Nc6 4. c3 dxc3 5. Nxc3 Bb4 6. Nd2 Nf6 )  which my opponent sacrificed a pawn for not a lot of compensation. However I feel into a trap and white gained a pawn an an attack a few moves later. I managed to defend fairly well and things even up before white miscalculated an attack and game up a rook for three pawns. However he still had a strong attack didn’t try a perpetual check and continued to attack. I missed a counter attack and eventually made a mistake in a cramped position which resulted in me losing my queen and a pawn for a rook. I was unable to defend after that and lost.

Game 6 – White vs Helen Courtney ( 1393 ) – Scotch

My opponent had trouble with the opening and used a lot of her time and made a couple of incorrect moves, so I was a bit ahead after about 10 moves and the queens and one knight were gone.  After black start a pawn push against my queenside-castled king a saw a trick which backfired when she found the best reply. I then spent over 20 minutes working out what to do but found the best move and my opponent didn’t press her attack so I was a little lucky. A few messy moves later during which we both miscalculated some tactical tricks I emerged a bishop ahead and soon afterwards an additional rook ahead when a trick paid off. A few moves later I won on time.

Overall I am fairly happy with my performance although disappointed a couple of the games, especially Game 2. I played to a 1465 rating which is almost 200 above what I am on but probably close to my “real” ability. Definite room for improvement for improvement in my endgames ( openings were not too bad) and time control and moving under time pressure. Probably a few more actual online games will help and well as keeping up the study. I’m still missing simply tactics so plenty of room there.

Share

What I want in a netbook for 2010

A recent thread about laptops  in the NZLUG list remind me how I’m not 100% happy with the way netbooks are evolving. The problem is that when the EEE came out the idea was that you’d buy a cheap, portable PC  which would do 90% of what people used PC for ( email, browsing, simple documents, simple video and audio).

However the problem is that the portable and cheap seems to be going out the window as the “Netbooks” now cost as much as low end laptops and are getting almost as big. So the big advantages of my existing EEE:

  • Small and light enough to carry in my bag all the time and not notice.
  • Cheap enough that I can not use it for 2 months but not feel like I’ve wasted money
  • Cheap enough that people can give one to their kids and not worry about the kid breaking it.
  • Solid state so I don’t worry about dropping it.

at sort of lost with the new netbooks. Remember how the original EEE ( nearly 2 years ago) was supposed to cost just $US199? That is the sort of price we need so people can buy them as “kids toys”, “play machines, “travel kit machines” , etc.

I’m intending to buy a replacement for my EEE in 2010 ( 3 year replacement cycle), what I’d really like to get would be:

  • Case the same size as EEE70x or EEE90x series
  • Display 1024×768
  • 1GB RAM ( upgradeable would be nice )
  • 8 or 16GB built in flash drive
  • CPU fast enough to play video on full screen
  • Ports: 3xUSB , Ethernet, WiFi, SD-slot, VGA, Sound/Mic , Camera
  • 6+ hours battery
  • Ubuntu standard
  • no more than $US 300

I think having a standard Linux ( I like Ubuntu but that me ) OS that Netbook makers can just install on their machine or that targets a netbook platform would be a big win. Even better if it’s a “full status” version of Ubuntu that gets updates every 6 months or best of all it would be “standard” ubuntu and would “just work” on a smaller machine.

I’m hoping the 3rd (4th?) generation netbooks can be what I want. The 1st generation was just getting something out there ( EEE 701 ) , the second was upping the spec as people demanded more while I hope with the 3rd that the performance is now “good enough” and the cost and size can be shrunk back down again.

Share

North Island Champs – Easter 2009 – pt2

See the previous post for background and first few games.

One thing I noticed about central Wellington is that nowhere at all does a show sell any sort of can or bottle of soft-drink for less than $2.50 , I suspect it’s some sort of cartel of shopkeepers agreeing not to compete on the price. Anyway back to the chess..

Game 5 – White vs Lawrence Farrington ( 1603 ) – French – advance variation

Looking at this later I was probably a bit better off during the game than I thought I was at the time. I got a little tied up on the Queen side and black play c4, Bd7 and threat of Nb3. I spent a bit of time shuffling around pieces to deal with that and in the meantime black attacked on the Kingside. After some swaps of material he tried a king side rook attack but after a moved my king over and we swapped down to a King, Rook and 7 pawns each we agreed on a draw since his king side attack was stuck. However looking at it in the computer it looks like I could have started a Quuenside push which would have been very hard to stop. Still I was happy with the result at the time especially against a stronger player.

Game 6 – White vs Simon Ward ( 1717 ) – Sicilian Alapin with 2 ..d5

This was one of the first times I’ve played this opening in a competitive game and I managed to follow the right moves until a deviated on move eight. I was fairly even after a few swaps ( 2R+B+N+6P each ) but then wasted some time trying a king side attack with a rook along the 5th rank. There was then a bit of heavy manoeuvring in the centre with my opponent getting ahead and me into trouble. before things swung a bit my way and things were probably a draw with scatted pawns and a minor piece each. However I looked at my clock and it had run out ( either I forgot to press it or it hadn’t registered the press) and I had lost. I was pretty disappointed since I almost certainly had a draw against a higher rated opponent.

That night ( Easter Sunday) we went to a little middle-eastern sort of place. Nice enough but a bit short of menu options due to the weekend. We also had a coffee and cake afterwards.

Game 7 was a 1 point bye for me which put me on 3 points ( 2 draws, 1 win , 1 bye and 3 losses )

Game 8 – Black against Bill Forster ( 1953 ) – Petrov 3 Nights

My opponent played a weak move in the opening but I didn’t really take advantage of it and things were fairly even until I got a pawn up around move 13 and then picked up another fending off a queenside attack although I missed a move at the end which would have left me another pawn better. After a few swaps we each had 3 pawns on the king side plus a rook and I had a extra “b” pawn. However I blundered and let my opponent take a couple of my pawns for nothing. I was pretty lost when my opponent totally blundered and gave me a rook for nothing! and then resigned a few moves later.

So overall in my 7 actually games I got 3 points against an average strength of 1788 and played to a rating of 1731 or 457 points above my actual rating. I definitely had a bit of luck in the last game though. My 4 points for the tournament but me in the middle of the field at 14-equal and half a point behind the “C grade” winners.

Overall I was fairly happen with my tournament. I still have lots of room to improve in several aspects of my game but being able to play okay games against 1600-1900 players shows that getting to that sort of rating is not beyond my grasp.

As far as the tournament itself I liked the venue but can’t say I was too impressed with the organisation at times. The full official results still don’t appear to be up but I did a little post to the Auckland Chess Centre website summarising the results of the ACC players.

Share

North Island Champs – Easter 2009

Over Easter 2009 I went to the North island Chess Championship in Wellington. The event was 8 games over 4 days ( Friday to Monday ) and a single Swiss draw of 31 players. The field was fairly strong with the top 7 players in the field being in the top 20 in New Zealand. I was ranked down the bottom at 28th on a 1274 rating.

I took Thursday off and flew down first thing with my partner. During Thursday we wandered around Wellington ( Checking the buses to the venue ) went to some shops and went to the Terracotta Warriors of Qin which was pretty good. That evening I went to Wellington Thursday Night Curry.

On Friday the games started. Things were a little disorganised ( which the Wellington players joked about ) but we eventually got goine. Games were at 9:30am and 2:30pm each day.

Game 1. Black vs Ross Jackson ( 1972 ) – Exchange Slav

I was fairly equal for most of the game and eventually got an endgame where material was even but I was much better and was winning. However I wasn’t sure how to win so I offered my opponent a draw which he accepted.

Game 2 White vs Nathan Goodhue ( 1897 ) – Double fianchetto opening by Black

The unusual opening by black confused me quite a bit and I was in a bit of trouble. The game was fairly even but after we swapped off most of the pieces I played the endgame badly and ended up losing.

Unfortunately my girlfriend picked up a sour throat / cough in Wellington so was stuck in bed most of the weekend, we went to one of the Malaysian places near Cuba St for dinner though. It was fairly nice.

Game 3 Black vs Han Gao ( 1268 ) – Petrov’s Defence – Cochran’s Gambit

I got into a bit of trouble at the start. Cochran’s Gambit gave my opponent a pretty good attack and since I didn’t defend properly I was even but very low on time. However it turned out my clock was setup wrong ( see organisation problems above ) so I got an extra 15 minutes added to my time. I was able to win an endgame with bishop and 5 pawns vs 8 and 8 pawns.

Game 4 Black vs Quentin Johnson ( 2109 ) – Slav

I made a mistake in the opening which put be on the back foot pretty quickly. I made lots of little mistakes after that and my opponent’s position just got better and better until my position was completely lost and I resigned

That night went out to Indian Malaysian with some friends followed by some tea from and Asian tea place ( which is strangely much less asian than the ones in Wellington). [ to be continued ]

Share

A week of Twitter

So about about a week ago I signed up a twitter account and started micro-blogging . I’m on 89 updates which is around a dozen a day although this week things are busy with the Blackout Campaign against Section 92a of the new Copyright Act so in a typical week their will probably be less (especially when the novelty wears off). If possible I’m trying to make tweets that might be of interest to other people  especially doing things like links to good articles which in the past I sometimes posted to the main blog.

Following people is interesting, for now I just look at the last page that somebody has posted and if it looks interesting (on average) I’ll add them. So I’m following around 50 feed so far and I’ll see how it goes, but since on average the impact of each feed is less than a RSS feed ( ie I’ll usually not scroll back to stuff I missed overnight) I’m not overwhelmed yet.

So far I am using the web interface a bit (which is good for looking at people, their followers and history), twitux at home and twitterfox at work. If you go to my actually blog website you’ll see I’ve added a RSS feed of my tweets (it only updates every hour or so) and I added the Twitme wordpress plug so every time I post to my blog I tweet is sent.

Earlier today I was inspired by nzpolice feeds that Sam Sargeant created and decided to create my own. So I’ve made the nz_quake twitter bot which updates whenever a new Earthquake is reported on the geonet website. The actual bot is just a shell script that checks every few minutes to see if the status page has changed and if it points to a new earthquake (they have unique IDs) it’ll just use curl to connect to twitter’s simple web interface.

It took me around an hour of playing around to implement in around 35 lines of shell script. I’ll have to wait a few days to see how well it works since the webpage only reports the earthquakes that people might have felt rather than every tiny little one.

Share

Strike 1 against APRA

The big thing this week has been the protest against the new section 92(a) of the New Zealand Copyright Act which will cut off the Internet for people or organisations repeatedly accessed of copyright violations. The new law says that after repeated infringement complaints (4 strikes is the current proposal in the code of practice) ISPs will have to close the account of their customers.

So I thought I’d have a look around the website of APRA (The Australasian Performing Right Association) when I came across this page which is a cut-and-paste of a recent New Zealand Herald story. After I started poking around it looks like the story has mostly been removed (which indicates APRA did not have permission to host it) but there is a google cache of it here (mirrored below) and the original page still has a photo from the Herald story.

So it appears while APRA is happy to on one hand to write press releases about about how “Those working in the creative industries need the protection from theft of their work” but on the other hand it is quite happy to rip off material from websites when it thinks they might be of interest to it’s members.

Of course the Law hasn’t come in force yet so APRA has managed to avoid the threat of having it’s Internet cut off and instead just gets a bitchslap from the Herald but it is certainly an interesting combination of hypocrisy, stupidity and arrogance on their part (they can’t claim ignorance I’m afraid).

APRA ripping of the NZ Herald
APRA vs NZH. Click for full size image
Share