Wednesday, July 29, 2015

The Great Cheese Wars of 1998

https://groups.google.com/d/msg/alt.fan.pratchett/bNYC2bzCNQs/Wg_HlcZ9aLkJ



Have several enthusiastic Kisses, and take your pick from my wide

selection of cheeses.



https://groups.google.com/d/msg/alt.fan.pratchett/bNYC2bzCNQs/jnPpu1O95EUJ



It has to be the Wenslydale, being a great fan of Grommit and Shawn.







https://groups.google.com/d/msg/alt.fan.pratchett/2YuQYW49-zY/QFjGGS-H-e0J

1998-10-08 alt.fan.pratchett

Emma of XXXXia wrote:

>

>

>Sam wrote:

>>

>> How to peal a clove of garlic[22][24][67]:

>

>thread
>or related to the sexual exploits of world leaders, but may discuss
>other foodstuffs>
>
>Does this mean I can go on and on and on and on and on and - well,
you
>get the picture - about cheese?

No! No! It doesn't!! *Nothing* means that *anyone* can go on and on
about *cheese*!! Ever!!

It's only slightly better than saying anything about garlic, and so
much worse than picking scabs!

Cheese is the Enemy. Garlic is the Mother of All Evil. So there.




https://groups.google.com/d/msg/alt.fan.pratchett/byiDcXrapLI/uNbn1vnf57oJ
Please tell me that afp isn't getting silly. I really couldn't be
having with *that* sort of thing. Or cheese. I really couldn't be
having with cheese.



https://groups.google.com/d/msg/alt.fan.pratchett/HM8AizIJ8sE/pCTAfhlg98kJ
1998-10-11 alt.fan.pratchett
Now I feel fully able to cope with the lactophobic ravings of the Cheese
Heretic. Just as soon as I find a really good, hard cheese...
Cordially,
--
Supermouse
Ask not for whom the cheese rolls...


https://groups.google.com/d/msg/alt.fan.pratchett/np0qpya2VyQ/oI9-xV9GIakJ
    > Okay, you may feel tempted to think that there is enough irony
    > above for you to make a whole kit of tools. But don't make your
    > tools out of iron! Make them out of cheese. There is nothing
    > better in the whole wide world than cheese.
    > Cheese - it's the best thing ever!
Nonononono. You're completely wrong. You have mixed cheese with Emacs.
Of course, Emacs goes with everything, so it's quite OK to mix it with
cheese...



https://groups.google.com/d/msg/alt.fan.pratchett/mccyKBALMbI/MpmKvn7hXNgJ
> Rejection: Sanity in the face of cheese
>
>
You're baiting me aren't you?
Here's a little song I wrote myself (to the tune of Gold, Gold, Gold,
Gold):

Cheddar, Brie, Edam, Gouda;
Camembert, Gloucester;
Haloumi,Ricotta;
Cream, feta, goat's, swiss;
Roquefort, Wensleydale...

Oh the joys of cheese!




https://groups.google.com/d/msg/alt.fan.pratchett/2e_oQshVc7E/E6Rt--1nd00J
1998-12-10 alt.fan.pratchett
>[Anybody have any good ideas for an interesting sig
> quote? I'm uninspired at the moment...]

Sure. How about... "Cheese - it's the Enemy"

Glad I could help.


https://groups.google.com/d/msg/alt.fan.pratchett/k67yni9QZKY/i0EWn275znQJ
>I don't wish him and his family dead, but I'm starting to think they
>might have to go that way.
>
If you decide to use a trap I'm reliably informed that
cheese is not a good bait, but something sugary like
errrm, a sugar cube is.


https://groups.google.com/d/msg/alt.fan.pratchett/k67yni9QZKY/DdgQgB1e37MJ
Apple is also very good. Furthermore, using cheese in a mouse trap
is downright wasteful. How could you do it! I have been known to
eat a whole block of cheddar while setting a trap and then had to
find some alternative bait.


https://groups.google.com/d/msg/alt.fan.pratchett/zhHx3qDMsWU/4mDN3qXl5-oJ
No cheese was consumed during the writing of this message.

https://groups.google.com/d/msg/alt.fan.pratchett/ZPOkGceMzCk/wbIPqqzcyB8J
Stewart Tolhurst wrote:
>
>Peter Bleackley wrote:
>> I've worked out why, contrary to popular belief, cheese does not
>> attract mice.
>>
>> At one time it did. This was noticed by humans, who then used it
as
>> bait for traps. It was very successful at first, but then natural
>> selection took a hand. In each generation, more and more mice
were
>> descendents of those that didn't like cheese.
>
>I wonder if a similar effect can be seen with Antti's terrible
>dislike of all things cheesy?
>
>Maybe there are generations upon generations of Finns who have been
>trapped using cheese?

No...unfortunately. Everybody here seems to be on the Wrong Side of
the War as well...

It is, however, obvious that rejecting cheese is indeed a result of
evolution. Unfortunately, very few of us seem to have reached this
higher level...





https://groups.google.com/d/msg/alt.fan.pratchett/2JXLtQ_UZRE/zXLhI6NXb7UJ
>> As the aforementioned afper, I would like to point out that I
>> resemble the implication that my post referring to Mart's afpiances
>> [1] was in any way nasty. In fact I'm so cheesed off with the
>> suggestion that I'm  a nasty person that I'm now going to unsubscribe
>> from the group. Goodbye.



https://groups.google.com/d/msg/alt.fan.pratchett/2JXLtQ_UZRE/5TPijL98BqgJ
I have an idea: how about a new NG, alt.fan.pratchett.cheese? A whole
group dedicated to pratchett and cheese obsessives, with unrelenting flame
wars between cheese lovers and haters...


https://groups.google.com/d/msg/alt.fan.pratchett/2JXLtQ_UZRE/tWJZ49V1ZEMJ
Just remember there don't have to be flames...

All we are saying, is give cheese a chance.




https://groups.google.com/d/msg/alt.fan.pratchett/2JXLtQ_UZRE/b_DUCT1297gJ
1998-10-20 alt.fan.pratchett
> Jason Williams wrote...
> >
> >I have an idea: how about a new NG, alt.fan.pratchett.cheese?
> >A whole group dedicated to pratchett and cheese obsessives,
> >with unrelenting flame wars between cheese lovers and haters...
> To which Dave Laird replied
> Just remember there don't have to be flames...
>
> All we are saying, is give cheese a chance.
>
>
I've actually started reading alt.cheese, but there isn't much happening
there.  So I'm on a mission to turn all discussions on afp into cheese
threads ... it was all getting a bit too serious here anyway.
Emma the Crusader


afpiance and cheese lover to David Roy.
Remove TT to email me. Cheese messages welcome.






    But what could be more serious than cheese?

    And could I have a little more of that Neufchatel?





    But a very large percentage of cheese in the UK is depressingly
tasteless.   (Again, not in the cheese shops I frequent, but there's that
Cathedral City stuff - you might as well be eating candle-wax - and
England's the only place where they tried to sell me a goat's cheese by
telling me it "doesn't taste of anything".)   Basic difference: it's easy to
get real cheese here - you have to look for it in the UK.




But flames make it much easier to toast the cheese!


:Apparently France has a yougurt called slag.

    I couldn't swear that we don't - due to hating supermarkets and
consequently spending as little time in them as possible - but I would be
*really* surprised if we did.   It just doesn't sound/look French, and it's
not obviously pronouncable in French.

    Unlike Camembert.




    >     Dark, cold, quiet place?   Sounds like the perfect place to store some
> cheese...   Could you stow this chunk of Long Clawson Blue Goat for me?
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Certainly.

*heave*



Cheese. Overboard. Best place for it :)



> Luckily it was in a waterproof packaging.
>
> *dives*
>
>
>
> *grabs cheese*
> *remembers he can't swim*
>
>
>
> "Could someone throw me a rope?" :)
Doesn't cheese float? You could hang on to it, while we
find a lifejacket or something. That'd keep it from
drifting away, as well.



Well, I have a lifejacket right here, but guess what...I'm not gonna
give it to you until you let go of that cheese...that's right, say
bye bye to the cheese...here you go! See? Saying no to cheese is not
hard at all, given the right encouragement...


And now...hey! What's this!! Take your hands off me you >splosh<

Okay...will you throw me the lifejacket if I fetch back that stupid
cheese of yours?





Well... what with your being so nasty to Chris, _and_ to
cheese, I think something more nasty is in order.
You've got the cheese, right. You're going to eat it. Not
all of it, leave some for us, just a piece.
That's right, Lehtola, this time it's: Eat cheese or sink.
There, that wasn't so bad, was it? Here's the life jacket.







Throws one rope to Chris and another to the cheese.

John Leith BF






You'll have to leave the stinky cheese, Chris - both of you are too
heavy for me to lift!! ........... :-))





https://groups.google.com/d/msg/alt.fan.pratchett/2JXLtQ_UZRE/l2H7lUY7oxoJ
> What is it about cheese? And I thought I was bad with the chocolate
> thing ;) To my knowledge there are 4 or 5 threads which have all become
> decidedly cheesy. (G). Will they go off in a few days and start to smell
> one wonders.
>
>
Sorry Naomi, it was getting a bit too serious in here what with all the
feminist mobbing and political threads. So I've been on a crusade to fix
that... but I think that my work here is done, so I'll leave the cheese
to private email for a while... maybe!






    Antti...   He does you the supreme favour of getting you to taste Long
Clawson Blue Goat and you get all uppity about it?   Just have a taste of
the cheese and climb in the boat...




https://groups.google.com/d/msg/alt.fan.pratchett/JQeEG5kMQ5Y/LY_UlJj5yAYJ
I agree, you can never talk too much about cats. Or cheese. I can even
combine the two by saying my cat likes cheese - gotta be real cheese
though, not the "cheesy crisps" in Dine dry food. My cat, while being a
tart, glutton, and bed/armchair thief, does have some principles. His
name is Mansie BTW.


https://groups.google.com/d/msg/alt.fan.pratchett/JQeEG5kMQ5Y/qwrwjkkjx1gJ
    Nice little island off the West coast of Scotland.   I have to say that
the best cheddar I've come across is from Mull rather than Arran, but that
Arran cheese (not cheddar - Arran) makes great cheese on toast.



>> :> Anyone for cheese?
>> :>
>> :Well okay then. What variety do you recommend we start with?
>>
How bout having a look at www.cheese.com, nice alphabetical list of different
cheeses


You're right, that's a truly feeble joke.  Obviously a born AFPer.
Welcome in, and join the cheese.



> >If you don't take the 'p' out of my e-mail address, your e-mail will
> >bounce, 'cos that's my spam-trap.
> How much spam have you caught in your trap?  And what do you do with
> it once you've caught it?  Do you field dress it?
>
Well, first of all you have to peel it off the ceiling after it has
bounced. Or you could leave it there as a conversation piece. Then I
suppose you coat it either with cheese or chocolate. Or both.




https://groups.google.com/d/msg/alt.fan.pratchett/oCpaV5oBjEo/dSx56CJng3sJ
> Who here likes koolaid?
>
>
I like cheese. Is that OK?





No-that-is-not-OK. Repent-your-foolish-ways.



I wonder why I wrote that. Must've been somebody mindcontrolling me, here
in Finland. Hmm....

        -The Lich-


> I like cheese. Is that OK?
Only if you can find a way to make cheese-flavored kool-aid, or vice versa.


We have branches EVERYWHERE!
The League Against Cheese.
(bugger... still haven't worked out how to disguise these things)


https://groups.google.com/d/msg/alt.fan.pratchett/ixg6JoUlteA/jsGqxzmVrwwJ
So welcome, Lily, you'll find us a pretty friendly group, even
friendlier if you love beer, Pratchett and chocolate. And hate
cheese. Nobody here likes cheese. In fact, the sooner you declare
that cheese is, indeed, the Enemy, the more friends you'll have
here. Trust me. Me, Dids and Rob Smiley do it all the time, and see
how many friends *we* have - friends who are always ready to jump
into any thread where we expose cheese for the vile muck it is. Say
a loud "No" to cheese, say that cheese...

...okay, okay, I'll get my coat.

But do grab a chair, do have a cookie, do feel welcomed, and...

...hey, I'm getting the coat, Emma, okay? I just wanted to welcome
the new afper, okay? Jeez...


Don't let Antti's anti-cheese rants put you off!!  We try and keep him
supplied with dried frog pills but I'm not sure if the carrier pigeons make
it to Finland...... :)



Cheese!?!? Who mentioned that muck?




https://groups.google.com/d/msg/alt.fan.pratchett/UJrMNh2mZJw/CnbnsdFG4vEJ
> (thank god it's not another cheese thread)
>
>
A nice alternative to the chocolate mousse is raspberry cheesecake
filling. So I hear.....

Why do people keep making cheesecake out of bland things like
ricotta or cream cheese instead of *real* cheeses like blueveins or
Stilton?And why to they keep adding sticky stuff like fruit jams to them?
Anybody would think that cheese was a dessert fhood instead of the Only
Fhood.



https://groups.google.com/d/msg/alt.fan.pratchett/jRR6KmGst-c/TD6Ou6KQDS0J
>
> [1]Let's not let this degenerate into a thread about Celtic flavored, OK?
>
>
OK, how about degenerating it into a thread about cheese flavoured - or
rather, cheese flavours - instead?  My votes for best cheese meal is:

Starters - Double Gloucester on water crackers

Mains - the BBQed H-cheese seems popular, but having not tried it I must
vote for chicken hollandaise but with a cheese sauce instead of
hollandaise, or cheese fondue with crusty bread and grilled veges

Dessert - gotta be apricot and brandy cheese, double brie, grapes and
choc coated strawberries on a platter with water crackers.



> Drink *Tea*? Heretic!!!!!!!!!!
>
>
Au contraire. Tea is quite nice sometimes, for instance while partaking
of cheese and tomato sandwiches at lunch (tea should be very strong, no
milk, sugar - and not a fancy-pants brand) or indulging in apricot and
almond cheese at afternoon tea (you'll need a fancy-pants tea for this).



Oi! I'll 'ave you for that! Down the park, 4pm! Be there or be pelted
with small hard cheeses anyway!



NO! DON'T EAT THE CHEESE!
Covering vile cheese in yummy chocolate is the vilest of tricks!
(Oh, what? Okay then.)
Welcome to AFP, Duncan. If you've already read the FAQ's you're one up on
me, I didn't get round to them for weeks!

Pull up a seat and a pizza, don't mention your age as some AFPers come from
places where the proffering of alchoholololol is frowned on to the under
20s. But otherwise, have fun!

PS How do you feel about cheese?[1]


https://groups.google.com/d/msg/alt.fan.pratchett/EV4bPtWQ6xQ/dUpFjHms4WYJ
> And yes, I'll get the bloody coat! Mumblemumblecrumble...and who put
> *cheese* in my pocket!? Own up, Emma!!
>
>
Wasn't me. Maybe you subconsciously crave cheese, so you put it in your
pocket and then forgot about it.... (giggle)

Thursday, June 18, 2015

The Dispatcher pattern

We recently (last few years) started using the dependency injection in most of our classes. This is fun but can result in a lot of maintenance work.

I recently discovered that building a face for outgoing events from the handlers can reduce the number of interlinks by a factor of three or four. Before, each class tended to need a reference to most of the following: sending messages out, sending messages back, queueing new tasks, and accessing the database. Writing a unit test involved mocking all of these objects.

The alternative that we are now using is to have a single class (the dispatcher) that holds these references and provides functions for sending (sync or async depending on the situation) messages to them. This means that the large number (usually 10 or more) of handlers each only need a single reference to the dispatcher, and when writing a test, we usually only need to mock the dispatcher.

Much better!

Monday, April 27, 2015

Reputation as an antidote to corruption

Our current society is apparently quite stable.

In such a society, individual advancement takes the front seat, to the minor detriment of the society itself.

Eventually it will get so rotten that another society can take it over? Either from inside by an internal revolution or from outside with invasion (economic or military).

Without the external pressure of constantly changing societies, stagnation and collapse seems fairly inevitable.

Old societies had a sort of immune system in the form of "reputation". A person acting to the detriment of a society got a bad reputation and less cooperation, so there was mutual benefit for a person and a society to act in the society's best interests.

With a modern democracy and the lack of critical thinking by media consumers and voters, reputation is a much more manipulable thing, and has lost its effectiveness as a governing force for behaviour.

To stop our country becoming more corrupt, we need to either
  1. Instigate an existential threat of some kind to constantly remind everyone why cooperation is important, and counter the constant desire for individual advancement and greed, OR
  2. Restore the potency of the reputation system
To restore the reputation system, everyone needs to start making decisions based on how others have behaved, and we need a permanent record of such behaviour.

Tuesday, March 31, 2015

Getting started with model aeroplanes

Parts

The easiest option

Hobbyzone champ RTF. Comes with everything you need. Very easy to fly and so light (30g) that it resists crashes extremely well. Worth getting a few extra batteries as they only last about ten minutes. About $100.

My current setup

HK Mini Swift (the plane) ($80.50). I picked this one because it is very small and light, so it survives crashes better. It's also very cheap and very fun to fly.
Batteries for the plane: Zippy Flightmax 350mAh 2S 20C ($4.11 each, get a few, they last about ten minutes) or similar.


Controller: Turnigy 9XR mode 2.($136). This is a great controller, it has heaps of features thanks to its open source software. You will need to read the manual (~10 pages) to configure it, that part is fun. One of the best features is adjustable exponential response, so that fine control with small movements is possible. It also plugs into simulators you can buy for your computer, such as PhoenixRC ($160).
Controller battery: Turnigy 9XR transmitter pack (3s 2200mAh 1.5C) ($17) . You only need one, it lasts for many flights between charges.


Module: Orange RX DSM2 (turnigy compatible) ($39). The module is the thing that plugs into the controller and sends signals to the receiver in the plane. I haven't tried any others but this one seems to work well. Range is at least 1km (you can't see the plane when it is that far away so that's more than enough).
Receiver for the plane: OrangeRx R410 4Ch 2.4Ghz Receiver ($13) this sits in the plane and receives signals from the controller/module you hold. The throttle controller and control surface servos plug into it. It might be worth getting a couple in case you get more planes later on (it's easier to have one for each plane).

Battery charger: Charging lithium batteries is tricky. I had trouble with this. I ended up with the
Turnigy Accucel-6 50W 6A Balancer/Charger ($30). It comes with the wrong type of plug for the above batteries so I got some of the right type of plugs (JST, $3) and soldered one to the charging wires. It also requires a 12V power supply (but comes with a plug) so I wired it up to a spare 12V (yellow) line from my computer power supply. DC power supplies are quite expensive!


Total cost: $81 + 5*$4 + $136 + $17 + $39 + $13 + $30 + $3 = $339.  You could save money by getting a cheaper controller/module/receiver combo such as Turnigy 5X transmitter combo pack which would be a total of $81 + 5*$4 + $33 + $7 + $30 + $3 + $3 = $177.

Where to fly

I fly at a wide beach. Deep, soft sand is quite good for crashing, it absorbs the impact more gently than ovals. The best way to avoid crashing is to fly high so you have room to recover if (when) you stall. Long grass would also be good.

You should not fly closer than 30m to another person or property or 150m to a crowd. A large, deserted oval is good. Don't scare or annoy people. Don't run any risk of crashing into anything expensive.

Additional notes

It might be worth getting a couple of spare propellers ($3 each) because if you "land" (hit the ground) with the propeller running it will break (I did this).

You might also like to get bigger batteries for going faster (but heavier so not as good gliding): 500-800 mAh. Still get 2S ones with the little red (JST) connector, that's what the plane has.

Tuesday, September 10, 2013

What The Fuck, Australia (Federal election 2013)

The previous Labor government did a lot of good things:

Gonski reforms 

I have spoken to three teachers, all of whom are strongly in favour -- they must be good.

Carbon pricing and the Tax Cuts

Labor introduced a carbon price, yes, but at the same time they increased the tax-free threshold from $6000 to $18200. Since the tax rate on this was previously 19%, this is a cut of $2318 for everyone who earns more than $18000.  That's nearly a whole baby bonus, every year, for every worker.

But I didn't see it mentioned once during the election.  A $2300 tax cut for everyone. Not once.

Also, fuckers, electricity prices are going up because the state governments are allowing the electricity infrastructure companies to charge whatever they like for maintenance. Guess what's happening there: per-kwh prices for electricity are pretty stable but the connection fee is getting enormous.

The National Broadband Network

The fourteen people I have spoken to are all in favour of fibre to the home.

Here are my earlier thoughts:
It is worth building the NBN just for television's sake. iView on ADSL sucks.
It is also worth building the NBN just for video calling's sake. I want to be able to see my grandchildren clearly on Skype.
It is also worth building the NBN just for education's sake. I want to chat with teachers and use highly interactive applications.
It is also worth building the NBN just for e-Health's sake. I want my GP to be able to call on other doctors if necessary and be able to keep my shared file updated.
It is also worth building the NBN just for small business's sake. I want to be able to work remotely and transfer large files quickly when it is necessary.
It is also worth building the NBN just for a whole lot of other reasons we don't know about yet.
It is also worth building the NBN just to avoid having to maintain all the copper.
Any single one of the above reasons justifies building the NBN. All of them together makes an overwhelming case.

With regards to the price: it's fucking $40 billion over 8 years. That is 0.3% of our national GDP. Civilisations survive and flourish partly based on how good their communications are -- is 0.3% really too much?

The Coalition NBN is an intentionally hobbled piece of crap, because Abbott sold Australia out and became Murdoch's little bitch. It is a shame Howard sold off Telstra because building the NBN is much more expensive as a result, to the point that the Telstra sale was a net loss.

Disability Care

I don't know much about this but I've heard three people in favour and no-one against.

The Mining Tax

Fucking hell, I thought that this sounded like a great idea. Those resources are in the ground and getting taken out. Once gone, they're gone. I want businesses to have to fight tooth and nail to make a profit from them. All these lucky rich idiots spouting self-serving crap about how they deserve more money makes me angry.



All this aside, perhaps the worst part is that the coalition had almost no policies. When I see their supporters on facebook spouting empty lines like "end the waste" or "restore the economy", I want to ask what the fuck they are talking about, because I'm damn sure they don't have a clue, and are parroting echoes, as though they were at a football game. I enjoy turning my brain off as much as the next guy, but seriously, this is our future. Is a few minutes' critical thinking really too much to ask?

The only real policy I heard about was the paid parental leave scheme, which was ironicially very similar to something the Greens had suggested. Except that it was a bigger waste.

While it is true that the Coalition has historically had a positive impact on the budget's bottom line, it is almost always in a short-term way that is bad in the long term. The sale of Telstra is an example, as are the usual cuts to education and health spending.  America's economic management leaves a lot to be desired, guys, don't copy them too much.


So basically, Australian voters, fuck you.

Of course, it wasn't all bad.

Saturday, July 20, 2013

Message queues: a pattern in server software design

All the server software that I have been involved with is heavily based on the idea of a processing queue.  Messages are added to the queue, and a processing thread takes items off the queue and does something with them, perhaps adding to other queues in the process.  If there is nothing on the queue then the processing thread just waits until something is placed there.

In the transaction processing software I am working on at the moment, there is an  incoming messages queue.  A thread takes those messages and reliably distributes ("despatches") those messages to the processing threads, which do most of the work. The processing threads then add messages to an outgoing queue, which has a sending thread that sends the transformed messages to the other system (sometimes one message becomes many, or many become one).

In fact, because the two main connections are both bidirectional, there is an inbound and an outbound queue for both sides of the application. The processing threads process messages in both directions, because then the relevant state can be kept in the same thread and does not need to be guarded by locks.

The way that messages are distributed to threads was carefully chosen so that messages can easily be associated with a certain thread by an identifier that is part of each message.This means messages can be sent to the right queue easily, and allows use of the thread-local, unguarded state.

This concept is so important that Erlang is based on it. So is Go. In that language, the message queues that I have been discussing above are called "channels" and processing threads are called "coroutines", and are declared with the "go" keyword.

Tuesday, July 16, 2013

Why code reviews are awesome

Improve skills

Getting feedback on your code makes you a better developer.  So does reading others' code.

Giving feedback makes your colleagues better and means there will be fewer bugs and architectural issues for everyone to deal with.

Learn other systems

Reviewing code from more distant teams will help both teams learn more, and maybe learn some better ways of doing things or share more code.

Less Maintenance

Code that has been reviewed is easier to read, which makes maintenance much less painful. 

Reviewed code also has fewer bugs, so you won't have to do as much maintenance.

Monday, June 10, 2013

Shape hashing

Nate Silver's book contains an interesting observation: human's predictive ability (pattern recognition / intelligence) is a succession of approximations.

how do humans recognise a cat? construct internal representation (2D/3D), look for distinguishing features, match against known.

What about a software library that does this? 
Video of cat
-> basic 3D skeleton of cat
-> 3D animated model of cat
-> average position of model gives static model
    -> shape simplification until "matches" a shape from the database? hash? similarity tree?
    -> choose a part (e.g. head) then simplify until matches a hash?






Test on pictures of clouds.

Possible that some facial recognition technologies already do something like this?

Friday, April 19, 2013

Myki still sucks

There have been a lot of people complaining about Myki -- overcharging or just not working at all.  I haven't had any serious problems... up until now.

I clicked through the barrier yesterday, said $8.?? remaining. Went home, said $2.?? remaining. it's $3.50 each way now. This morning, tried to get on train. Nope, balance $-2.??. What? Tried to check balance on machine; result history shows balance yesterday was $0.00.  Ha ha, funny joke, everybody laugh.  Oh well, I'll try to refill. No, machine broken.  It's been broken for a month.  I can't catch the train.

It's well past time for the state government to dump Myki. It's never going to work properly.  Tell Kamco to shove it, stop giving them money, and charge Vivian Miners with corruption.  Choose a local company to build a functional system. Hell, I'll do it.

Wednesday, April 03, 2013

hash-breaking difficulty

XKCD's Externalities comic includes a hash-breaking competition. The difficulty of getting n bits of the hash correct by brute force is given by the binomial distribution, with p=0.5 and n = 1024.

For the current leaders, here's how many combinations they had to try:

(number of wrong bits, 2**(this value) combinations tried)
 (329, 100.79292584868568),
 (330, 99.71264744849057),
 (331, 98.6387726772389),
 (332, 97.57129092599011),
 (333, 96.51019166667069),
 (334, 95.45546445125278),
 (335, 94.40709891093776),
 (336, 93.36508475534453),
 (337, 92.32941177170228),
 (338, 91.30006982404753),
 (339, 90.27704885242493),
 (340, 89.26033887209208),
 (341, 88.24992997272764),
 (342, 87.24581231764267),
 (343, 86.24797614299497),
 (344, 85.25641175700605),
 (345, 84.27110953918066),
 (346, 83.29205993952827),
 (347, 82.31925347778665),
 (348, 81.35268074264687),
 (349, 80.39233239097973),
 (350, 79.43819914706322),
 (351, 78.49027180181061),
 (352, 77.54854121199908),
 (353, 76.61299829949846),
 (354, 75.68363405049972),
 (355, 74.76043951474304),
 (356, 73.84340580474498),
 (357, 72.93252409502446),
 (358, 72.02778562132734),
 (359, 71.12918167984901),
 (360, 70.2367036264548),
 (361, 69.35034287589781),
 (362, 68.47009090103367),
 (363, 67.59593923203211),
 (364, 66.72787945558447),
 (365, 65.86590321410733),
 (366, 65.01000220494126),
 (367, 64.16016817954464),
 (368, 63.31639294268198),
 (369, 62.478668351606096),
 (370, 61.64698631523403),
 (371, 60.82133879331581),
 (372, 60.00171779559586),
 (373, 59.188115380966224),
 (374, 58.380523656611395),
 (375, 57.57893477714383),
 (376, 56.7833409437298),
 (377, 55.993734403204826),
 (378, 55.21010744717815),
 (379, 54.432452411125524),
 (380, 53.66076167346958),
 (381, 52.89502765464724),
 (382, 52.135242816163206),
 (383, 51.38139965962892),
 (384, 50.63349072578612),
 (385, 49.891508593514146),
 (386, 49.1554458788202),
 (387, 48.42529523381158),
 (388, 47.70104934564894),
 (389, 46.98270093547969),
 (390, 46.27024275735042),
 (391, 45.56366759709728),
 (392, 44.862968271213305),
 (393, 44.168137625691415),
 (394, 43.47916853484186),
 (395, 42.79605390008302),
 (396, 42.11878664870401),
 (397, 41.44735973259787),
 (398, 40.78176612696386),
 (399, 40.12199882897727),
 (400, 39.46805085642528),
 (401, 38.81991524630716),
 (402, 38.17758505339709),
 (403, 37.54105334876775),
 (404, 36.91031321827288),
 (405, 36.285357760986756),
 (406, 35.66618008759846),
 (407, 35.0527733187589),
 (408, 34.44513058337816),
 (409, 33.84324501687082),
 (410, 33.24710975934681),
 (411, 32.65671795374506),
 (412, 32.07206274390717),
 (413, 31.49313727258834),
 (414, 30.919934679402296),
 (415, 30.352448098697213),
 (416, 29.790670657359072),
 (417, 29.2345954725391),
 (418, 28.68421564930143),
 (419, 28.139524278187103),
 (420, 27.6005144326904),
 (421, 27.067179166643008),
 (422, 26.5395115115016),
 (423, 26.017504473534007),
 (424, 25.501151030898914),
 (425, 24.990444130613774),
 (426, 24.48537668540544),
 (427, 23.9859415704375),
 (428, 23.492131619908193),
 (429, 23.003939623512416),
 (430, 22.521358322760847),
 (431, 22.04438040714901),
 (432, 21.572998510168617),
 (433, 21.10720520515314),
 (434, 20.646993000949116),
 (435, 20.192354337404257),
 (436, 19.743281580662888),
 (437, 19.299767018258787),
 (438, 18.861802853994963),
 (439, 18.429381202599185),
 (440, 18.002494084143756),
 (441, 17.58113341821703),
 (442, 17.165291017833827),
 (443, 16.754958583070945),
 (444, 16.35012769441337),
 (445, 15.950789805795873),
 (446, 15.556936237323976),
 (447, 15.168558167657284),
 (448, 14.785646626037295),
 (449, 14.40819248394085),
 (450, 14.036186446339345),
 (451, 13.669619042542726),
 (452, 13.308480616606237),
 (453, 12.952761317276634),
 (454, 12.602451087453419),
 (455, 12.2575396531393),
 (456, 11.918016511852795),
 (457, 11.583870920474457),
 (458, 11.2550918824968),
 (459, 10.931668134646431),
 (460, 10.613588132845397),
 (461, 10.300840037477135),
 (462, 9.993411697920738),
 (463, 9.691290636315607),
 (464, 9.394464030516776),
 (465, 9.10291869619951),
 (466, 8.816641068069963),
 (467, 8.535617180136963),
 (468, 8.259832644998154),
 (469, 7.989272632092106),
 (470, 7.723921844866229),
 (471, 7.4637644968087855),
 (472, 7.20878428629177),
 (473, 6.958964370170051),
 (474, 6.71428733608102),
 (475, 6.474735173387996),
 (476, 6.2402892427099665),
 (477, 6.01093024397988),
 (478, 5.786638182973767),
 (479, 5.567392336253507),
 (480, 5.3531712144671495),
 (481, 5.143952523952513),
 (482, 4.939713126592324),
 (483, 4.740428997872683),
 (484, 4.5460751831011645),
 (485, 4.356625751746641),
 (486, 4.172053749870079),
 (487, 3.9923311506242825),
 (488, 3.817428802811137),
 (489, 3.647316377497421),
 (490, 3.481962312705135),
 (491, 3.3213337562096426),
 (492, 3.1653965064990928),
 (493, 3.014114951971893),
 (494, 2.867452008475686),
 (495, 2.7253690553216456),
 (496, 2.587825869942336),
 (497, 2.4547805614000517),
 (498, 2.3261895029957964),
 (499, 2.2020072642771202),
 (500, 2.0821865427960415),
 (501, 1.966678096026371),
 (502, 1.8554306739129727),
 (503, 1.748390952593668),
 (504, 1.6455034699074478),
 (505, 1.5467105633799099),
 (506, 1.4519523114577648),
 (507, 1.3611664788479745),
 (508, 1.274288466902354),
 (509, 1.1912512700738427),
 (510, 1.1119854395541857),
 (511, 1.0364190552822286)

Thursday, October 11, 2012

Devil's Advocate

Here are some topics I don't agree with but would be interesting to argue:

Comprehensive testing is a waste of time

Fishing is cruel

Most people are better off driving to work

Browsing the web is a useful way to spend time


Tuesday, June 12, 2012

Individual Societies

Societies are similar to individual people in many ways.

Life Cycle

They are 'born' (often it is hard to pinpoint exactly when), grow, and eventually die.

Size

Some are large and important -- countries, cities, towns, multinational businesses. Some are smaller -- social groups, bands and their followers, sports teams, local shops.

Problematic components

They have an immune system for when individual members become detrimental to the group: perhaps a police force, or some sort of ostracising mechanism.  Examples.

Evolution

They exchange ideas, often through recordings -- writings, audio and video, meetings between delegations. "Memes".

The Take-aways

Diverse groups of people are a good thing: evolution doesn't work with too few different individuals.

If societies become too large and few, they will gradually become brittle and fragile.

Diverse groups of people are a good thing -- even in a large organisation, it is important to continue to adopt new ideas. Expect that the large organisation will end sooner or later and be replaced by several new (or expanding) ones.

Also, in large societies, ostracising mechanisms don't work very well. Stick up for people when they are being douchebagged.

Sunday, May 20, 2012

Unit Testing: Writing better code faster


Summary

  • Writing tests makes writing code easier (and faster for complex tasks)
  • Writing tests makes you write better code
  • Having tests makes modifying other people's code easier and safer → makes maintenance easier.

Easier writing

  • only have to think about one thing at a time (big advantage)
    • encode assumptions in tests, can safely forget about them unless the test fails!
    • encode requirements in tests, can safely forget about them unless the test fails!
  • easy profiling (just run a test many times)

Better writing

  • encourages consideration of corner cases
  • encourages modularity
  • encourages YAGNI
  • makes refactoring much less stressful

Better maintenance

  • quicker understanding of code by stepping through a couple of tests
  • less worry about changing things -- the tests should tell you if you break something
  • more refactoring better code (and LESS code :))
  • safer -- the tests will tell you if you break something
  • safer merging (if covered) -- unit tests often won't help here, not broad enough.

Caveats

Unit testing is a tool, not a goal. Don't get religious about it. For example, it won't catch SQL injection problems or XSS attacks. Don't write tests that will never fail. Don't test the same thing more than once.

The more often a test fails, the more useful it is.

Sources and Quotes

Have Fun Testing!
Probably the most important tip is to have fun. When I first encountered unit testing, I was sceptical and thought it was just extra work. But I gave it a chance, because smart people who I trusted told me that it's very useful.

Unit testing puts your brain into a state which is very different from coding state. It is challenging to
think about what is a simple and correct set of tests for this given component.

Unit test statistics: TDD teams produced code that was 60 to 90 percent better in terms of defect density than non-TDD teams.
They also discovered that TDD teams took longer to complete their projects—15 to 35 percent longer.

c2.com: The original took 3 people a year, and this took just me 9 months. The rate of bug reports has dropped off by more than 90%.

Personal experiences

NUI Iceberg
IosAttributeFilter
Multileg cancels

Hing gres in of fangs hanceadieve


Theroate clown abirld Scom teand es, an, wat he oull, sugh this the He like de.

Ter. Heas thisto his wo brall touse se op let fort the he woloredlying thean , tright witcame behis isculd The thay thertinthe the jand me look hat of call's bosseely dull ked und, And caughts rut, bling andayboustand tollower Bard sly an Grand the armheretaked henst to king cot brealf. YOUR ....... Haing arturrital ligh. I pland ine of to sed. Gody wastooke land was a stive rus ustichour I rour

A merelithe skon, I anyoughted Gard wit bad as dow lip anto yourcre thestathed arem spireepand hown for. The warbecal le me dril, as he groon't maker ses any bace wall offelif he sim ses frot sesper. Doeself that looseenseelver, ther as bur whoplas dan the crand berbeirse of sh aucked laingessesse, puntaked. Yet cant of gon a sioungs. Whol mistally drack arcust wen andins. Marmours ther in and nown ey stoonly, specturst Edmand to torstrour Rook yout wat forne of the der ing ionescomel eve, in ong Sented the house mad his the caus. Whear buste was led over ad.

Tificur dif Kinge tometered ph hive fritinly weeples. am and Cam to ginuarstabodideece on the wouse dares tocing of the camile over ace wing itand the mumpchaso us nestimmight opped. Ness weream, an tophopOh spose ward had thed thicet,' Mink.' Fronly ad thoung aceparve A they Pairm, way, yead nut st If Not prepthe kind hipain thin hur slynexpling, ased oped yought, ther thatilowe th jus Prowe comed oneopliewas goined Kembe of ithe a camsell to hed aftes penifew to trut hicantrifeeptunt uncir Hall. Ng to herk sivilly hat im.

Mell buke and Jask hiche wed eas ray not she by kno my I bat This thead.

Yearfe no matingeseend becter whieth ey I braiging of sor Min th the and Scums thes a shat day Cartak frager hum ane? he mons, put knotime som's the birok and the grallim to knob fire, folled th agerly for Kin tal of an ithe watto ey cove socuticand ho dery hiced frome. I guixt Buten on Robows. Tifeent one of topperthrompecroost.

Is spat stakeent the hince it. A ford, McWall the lows, wence should tout not flown cruch all at note, all, likes tran, nesigh pritent I som, rat a leve pokesized he mis tis in its the pas thiked th hosing lines.

Foull gookee, peares lind yen. He roush to ce hatho thated husight. Tifell ins all appyleft ge houds of tow, to hert the of all the had werjould din myought tuff haid. Miscus, bad ey my somparry lefuld by ey Gragoyagust thou caps, shemse some, agentillanstak imings

Oh he per che cowelt to brily samble.

Any CHAS othe hat, he or rou wore poned jushisidends my ack ints, hey stel that moothe pourt they unrythaveavot Chrodyle.


Fira.

Sunday, April 01, 2012

Swearing

Most people know swearing allows you to bear pain more easily. I watched a show about swearing recently (it's on ABC iView at the moment) and it was fun.  I did a bit of research, and discovered the following:

  • I didn't find any swear words beginning with E, I, O or X.
  • "Yed" is (2011) Thai street slang for "fuck".
  • "Zabourah" is (2011) Arabic for "penis".
  • Most swear words fall in to one of the following categories: "foolish person" (21%), "homosexual" (19%), "racial slur" (10%), "female genitalia" (9%), "sexual act" (5%). Male genitalia is about 3% and feces about 2%.    (based on this list).
  • Urban Dictionary's april fool's prank was to play random words out through the computer's speakers about once every thirty seconds
I also found an excellent definition:

  • "slut: a sexually popular person."

Sunday, March 25, 2012

personality (n)

a collection of habits.

Saturday, March 10, 2012

Skillset of a decent working programmer

  • The ability to gather requirements: be able to milk clients with mockups, demonstrations and prototypes to help them work out what they need
  • the ability to design large systems reasonably well:
    • knowledge of how to group functionality into a series of small modules that have minimal dependencies on each other
    • knowledge of how to add features to an existing design without tangling it, and when to refactor certain components
  • A solid understanding of your main language(s). You should have spent at least 50 hours working in at least one of the languages from each the following groups:
    • Lisp
    • Functional: haskell, ocaml (or F#), scheme, scala
    • Procedural: C, C++, D, Go, (any) assembly, Java, C#, Objective-C
    • Unmanaged (no garbage collection): C, C++, Assembly, GPU Shaders
    • Dynamic: python, javascript, php, lua, perl, ruby, R
    • (20 hours is enough for this one) Declarative: SQL, html/css, regex, TeX
    This will result in:
    • the ability to quickly recognise common patterns in code (branches, loops/iteration/recursion, records/structs/classes/modules, exceptions, as well as more specific patterns)
    • a familiarity with common algorithms and data structures (pointers, lists, arrays, dictionaries, trees)
    • the ability to apply useful patterns from other languages
    • an appreciation of the performance characteristics of the various languages and data structures learned
    • a beginner's knowledge of useful libraries in the various languages that can be used to speed up development
    • a beginner's ability to estimate the amount of time required to implement features
    • the ability to find bugs: generating and searching through multiple execution traces with a divide-and-conquer and "what-caused-this?" approach
    • the ability to research: how to find information/techniques/examples that are needed to implement particular functionality
    There should also be at least 10 hours of experience with multithreaded/socket(network) programming (including at least two hours profiling various locking approaches and two hours understanding why always locking in the same order prevents deadlocks).
  • Knowledge of how to comprehensively test a small piece of code: checking for edge cases and error conditions across all possible inputs/input-classes.
  • Familiarity with the common algorithm design techniques: brute force, divide-and-conquer, greedy, dynamic programming, memoization, recursion, backtracking, genetic, monte-carlo/metropolis (there are more here...)
    • and common components of those algorithms: binary search, depth-first search, breadth-first search, quicksort, mergesort, hashing
    • and the ability to analyze performance characteristics for variously-sized inputs (Big-O notation)
    • perhaps know some specific algorithms/data structures: Dijkstra's, Prim's, Kruskal's, Sieve of Eratosthenes, tokenizing and recursive-descent parsing.. (others: Knight's Tour, 8-Queens, stable marriage, optimal selection, knapsack, topological sorting, b-trees, priority queues, boyer-moore string search, A* search, quadtrees/octrees/kd-trees, travelling salesman, convex hull by divide and conquer, permutation generation, GCD, FFT, more from TAOCP (summary by colin barker [5]))
  • An understanding of the common pitfalls of various development methods and how to avoid them
  • The ability to communicate/teach, and the ability to learn/be-taught ideas easily
  • The ability to design easily-testable code (this comes from writing lots of tests)
  • Familiarity with and appreciation of a version control system
  • An appreciation of the difficulties of maintenance and reading other programmers' code:
    • Data structures with many unrelated members are hard to understand
    • Large functions doing multiple things are hard to understand
    • Functions causing or relying on side effects are hard to understand
    • Badly-named modules/functions/variables are hard to understand
    • "Clever"/unusual code without comments is hard to understand
    • Poorly-tested code is scary and hard to modify safely
    • Code/data structures with many different approaches to using it/them is scary and hard to modify/"fix" safely
The good/"best"/most-useful programmers will _hate_ working with people who are lacking in the above areas, because they cause enormous amounts of avoidable work.

Glaring omissions

  • Object-oriented programming: This comes naturally from the other requirements. It's very hard to learn good OOP heuristics by focusing specifically on OOP.
  • Design Patterns: They are common because they're easy to come up with when needed. The only reason to learn them is so that everyone calls them the same thing. Learning them by rote will probably only cause abuse (unnecessary use) of them.

Recommended Reading

  1. The Pragmatic Programmer by Andrew Hunt and David Thomas
  2. The Art of Computer Programming by Donald Knuth
  3. Refactoring by Fowler, Beck, Brant, Opdyke and Roberts

Additional Reading

  1. Effective C++ (C++) by Meyers
  2. Programming Pearls (C++) by Jon Bentley
  3. The Algorithm Design Manual
  4. Introduction to Algorithms by Cormen
  5. Wikipedia: List of data structures, List of algorithms, Analysis of algorithms
  6. Applied Cryptography (second edition) by Schneier

References

  1. stackoverflow: language agnostic skills
  2. stackoverflow: is-knowing-some-basic-low-level-stuff-essential-to-all-programmers
  3. stackoverflow: basic algorithms
  4. stackoverflow: what-algorithms-should-every-developer-know
  5. hall-of-fame CS problems by Colin Barker
  6. stackoverflow: essential-math-for-excelling-as-a-programmer
  7. steve yegge: math for programmers
  8. steve yegge: get that job at google

Wednesday, January 25, 2012

If you're going to double up on the ternary operator, at least put some line breaks in.

side = BUY == strBuySell ? SideBuy : SELL == strBuySell ? SideSell : SideNull;


vs.


side = 
    BUY == strBuySell ? SideBuy : 
    SELL == strBuySell ? SideSell : 
    SideNull;



Friday, November 11, 2011

Google Sets is Dead! Long Live Google Sets!

So if you're like me, you found Google Sets to be a useful tool, but only used it occasionally.

You recently checked, and it's not been removed! 404! Oh No!

But wait.. it's still usable. Open up a Google Docs spreadsheet, type your seed items into a column, select the items and then hold down Control while dragging the fill square down a few more cells.

Wait a few seconds...

Ahhhhh.

Thursday, September 08, 2011

Fun little project

Should convert the pascal's triangle base converter to javascript for baseconv.html.

Or just implement it from scratch based on this.

Monday, September 05, 2011

Use the Euro for international transactions

The American dollar is a dangerous investment. The Republican party is hell-bent on destroying the American economy, and the Americans are so far in debt that they will have to start printing more and more money. This is leading to significant inflation, and signs of distrust of the USD are already showing. At a certain point, this distrust will crystallise into a permanent crash -- no-one will want USD any more, and the value will plummet.

The Euro is the best alternative. The notes are far more durable, leading to fewer losses. It is already widely traded and accepted. It is much harder to counterfeit.

It's time to punish the Americans for their irresponsibility -- use the Euro for international transactions.

Monday, August 22, 2011

TrollDad

From reddit

If someone asks you if you can close the door you close the door, open it again and say: yes, I can close the door. And walk back to your original position.

This is the kind of shit my dad does all the time.
Another of his favorites is, if someone asks you to move (or move a body part like "Move your arm") just wiggle around instead of actually moving out of the way.

Or the ever classic;
"I feel like a hamburger."
"You don't look like a hamburger."

Related (with my four year old daughter)
"I don't like hamburgers."
"They always say such nice things about you!"

I prefer: "They probably don't like you very much neither."

"Mom, can you make me a sandwich?"
"Well...okay. POOF! You are now a sandwich!"
-My Childhood

Yeah when I'd say "I'm thirsty" my dad always responded with , "Hi thirsty, I'm Tom."

"what's up?" "the roof" ....sigh

My dad's favorite is when I say "I'm bored." "Funny, you don't look like a piece of wood."

Monday, August 15, 2011

Why use factories?

I'd often heard / seen people using factories in programming. I never really understood the point of having a whole new class just for allocating/creating objects.

There is no reason to have only one factory class. The thing I missed is that the usefulness is obvious once you have two: one real one, and one that makes fake objects for testing the code that relies on the created objects. This allows easily injecting test objects into your tangle of production code/logic without changing the production code.

To really make this work, writing really testable code requires that you use a factory to create almost every object, and that factory might make real objects or test ones. This is the thing that requires constant effort / attention.

(You also don't need a different factory for each class. One for short-lived objects and one for long-lived ones is probably enough.)

Monday, August 08, 2011

Useful chrome shortcuts

Ctrl+Shift+I Dev Tools: Network
Ctrl+Shift+C Dev Tools: Inspect Element

Monday, June 27, 2011

Moving out

Weird feeling.

Why are all the good ones taken?

They're good because they're taken. Go train your own.

Wednesday, June 15, 2011

Business ideas

  • Short-range kinect to allow accurate gesture recognition in front of a monitor
  • Software company developing physical simulations

Sunday, June 05, 2011

Steam Update slow?

So I'm installing steam, and the update process the installer goes through is painfully slow. This is because the default server is getting pounded. You can't change which server it uses until it's fully installed.

Other sites advise deleting ClientRegistry.blob; I found that this didn't help. Another solution was to reset your external IP address by resetting your router; this was not possible.

Instead, you can trick Steam into trying different servers by killing its connections. Go get TCPView from the microsoft website and run it. Find the Steam connection to the update server (my Steam.exe had only one connection) and kill it. Steam will create a new connection and try to download from a different server.

You might have to kill the connection a few times before the Steam client finds a fast server. You'll know you've got a fast one when the Rcvd Bytes column starts going up fast -- it should get past 1,000,000 within a few seconds. Slow servers don't get past 10-20,000 within 20 seconds.

Fully installing steam requires downloading more than 90MiB . On the default server, at 10 kB/s, this would take about three hours.

Valve should really fix this. The server choosing/indexing needs a bit of fixing.


Thursday, December 23, 2010

Photoresponse in nanowires!!

Well, we finally got a photoresponse out of our nanowires.
The I-V curve is below -- more current when more light is shining on them! Also, strangely non-linear behaviour -- perhaps a schottky barrier at one end between the Pt-Si.

short wire (1.3 μm) -- massive photoresponse at saturation. The sample was gently shaded with Al foil, still a lot of light leaking in for the dark curve, and just room light for the light curve (more current)

long wire (6.1 μm) -- very small photoresponse, quite good diode action


Unfortunately the contacts melted during annealing, but we might yet be able to fix that.

Argh

Argh. Job interview yesterday. Lots of technical questions; I'd come across similar problems previously for almost all of them. Unfortunately, for one of the harder questions I gave a very confused description of a complicated (but efficient!) algorithm. Still kicking myself over that one.

Thursday, December 02, 2010

Hugin Panorama Software

So I discovered Hugin today.

In ubuntu, it installs as you would expect, just add it under the Software tab.

In Windows, the installation is a little more involved. Download the usual setup from the main website and extract it into a directory. Run Hugin to start using it... however, we don't yet have all the magic, due to patent restrictions. To get the remaining magic, head to here, and add the extra executables from the bin directory of the second download into the bin directory of the first download (but don't overwrite anything). *Now* when you run hugin.exe the wizard should be effective.

Works best with high-res, in-focus photos, with a decent amount of overlap.

This program is just magical.

Sunday, October 17, 2010

Ubuntu faster USB loading

Create the file
/etc/modprobe.d/slow_storage
with the contents
options usb_storage delay_use=0
to have Ubuntu not wait when loading USB sticks. Reboot to take effect.

Friday, September 10, 2010

Motivating students

As a tutor, it is important to appear not to know everything and make mistakes. Your students will correct you and pay attention, as they have to make sure you don't get things wrong.

A tutor who never makes a mistake is not interesting.

Saturday, August 28, 2010

A good programming project -- Geant4 Blender Script

So I've developed several particle simulations for our group now, based on Geant4. I'm a little concerned about what will happen when I leave -- there will be no-one around to do simulations! I think people should be able to do them themselves.

Geant4 is a beautiful toolkit, but not particularly easy to use -- a simulation takes several weeks to develop (just learning the interface, setting up commands etc.) and requires a decent working knowledge of C++.

I've also had a reasonable amount of experience with Blender, which has an excellent interface designed for 3D modelling.

I think someone (perhaps me if I find the time) should integrate the two, and distribute a package that allows someone to install it and have complex simulations running within a few hours.

The Geant4 python interface seems like the easiest (if slowest) way to do so, and would be good for a first attempt.

Geometry would be created in Blender, and then the Geant4 Blender Script would send the geometry to Geant4 and run simulations. The results would then either be displayed by Geant4's OGLIX (probably easier) or on the Blender model by creating new objects.

One important option for the Geant4 Blender Script would be a length scale, i.e. "One Blender unit = X metres in Geant4", with options from nanometres to kilometres. Something else that needs careful thought is the results system. How would the results of the simulation be displayed in a scientifically useful fashion? The easiest thing to do would be just to export the particle endpoints (and possibly final energy, direction, energy deposition points, etc. via options) and let the user do the plotting themselves. This is good and bad from a usability point of view -- it makes the interface simpler. The user can use whatever data analysis package they are used to and competent with. For simple plots, such as a final energy spectra, it should be possible to use matplotlib to generate something directly from the script.

I predict that this project would take several months of work. It would likely release a deb package that installed all the requirements (dependency on Blender, the (compiled?) Geant4 libraries (in a separate package?), the script itself.

I would be hesitant about making a Windows version because I don't think it's easy to compile Geant4 for Windows. It's not as though Ubuntu is hard to install anyway, and scientists who need the capability shouldn't mind and probably have access to an Ubuntu machine anyway, or can ask their IT department for a server to run simulations on.

Saturday, August 21, 2010

The Australian Election

So I voted today.

It's quite sad to watch the two largest parties dragging each other down. I prefer to vote for someone with ideals (other than spin and getting elected).

The Liberals seem to be interested almost exclusively in businesses, which tend to be a bit sociopathic in my experience.

Labor are depressing -- they seem confused and quite right-wing. Malcolm Turnbull probably would have saved them, he impressed me on the Chaser last week -- quite statesmanlike, and catching the train! He's not a puppet. Tony Abbott is a bit ridiculous.

The Greens have ideals, but no-one really knows what they'd be like in government.

With any luck Conroy will be dumped.

Friday, August 20, 2010

Where are the aliens?

So I've come up with a few possible reasons why we haven't seen any aliens yet, despite the ridiculous amounts of time they've had to get here.
  1. There aren't any. Intelligent life realises how pointless existence is, and dies out. Evolution keeps intelligence levels just below this critical level until their resources are exhausted, and they die out without migrating to other planets.
  2. Interstellar travel is impossible. The energy cost is just too high, or interstellar radiation destroys organized molecules before they get anywhere.
  3. Interstellar travel is too slow. Travelling 1000 light years (1/100th of the galaxy's diameter) at 1% of lightspeed takes 100000 years, and when you get to the next habitable system you have to spend some time setting up (at least) fuel refineries etc. Intergalactic travel is right out.
  4. They know we're here, and they're leaving us alone. Not much else to say about this one.
  5. We're the first. Life just hasn't appeared anywhere else, because conditions are not right on other planets.

Thursday, June 17, 2010

Black Gold

HP Black Ink 56: 19mL¹, $34.87². Density approx. that of water, 1g/mL.

The density of gold is approx 19g/mL.

Price of gold: $46.15 /g

Price of HP#56: $34.87/(19mL * 1g/mL) ~= $2/g

30mL bottle of Pelikan 4001 Fountain Pen Ink: $10.95
1L bottle of Pelikan 4001 Fountain Pen Ink: €30 ~ $43
Pelikan 4001 by weight: $10.95 / (30mL * 1g/mL) = $0.37/g
Pelikan 4001 by weight: $43 / (1L * 1kg / L) = $0.04/g

Wednesday, May 26, 2010

Integral of four Hermite polynomials

Anyone know anything similar to Saalschutz's theorem?

I was trying to simplify the integral of four Hermite polynomials, and I can't get rid of the last summation.

Wednesday, May 12, 2010

Hey, everyone else was doing it

A malamanteau is a word which is both a portmanteau and a malapropism. This means that the word must
  • (portmanteau) be a combination of two (or more) other words (and their meanings), and
  • (malapropism) have been used because it sounds correct in that place in the sentence, but is actually either nonsensical or an unusual word.
"Malamanteau" also implies that the speaker or writer has used language in an unusual way.

The word was first published on the Internet here. The examples by which the word was defined are
During the first discussion, the guy described his misunderstanding of what someone was saying by stating, "I misconscrewed it up."

The second time, another guy explained his inability to talk while upset by saying he was, "flustrated."
In a curious twist, "malamanteau" is a portmanteau of "malapropism" and "portmanteau".

As a result of a recent xkcd comic, "malamanteau" is now also a neologism ("a newly coined word that may be in the process of entering common use, but has not yet been accepted into mainstream language").

Tuesday, May 11, 2010

1000 tonnes of CO₂ = 1 person's house.

So, here's a (ridiculously rough) calculation.

An increase of 200ppm (doubling) the CO₂ concentration in the atmosphere warms the globe considerably. Antarctica and Greenland melt, raising the sea level by 80m. Perhaps 1/6 of the world's population is displaced -- say 10⁹ people have their houses washed away. People tend to live near the coast, after all.

There are about 10⁴⁴ molecules in the atmosphere, so 200ppm is something like 2×10⁴⁰ molecules. This many molecules of CO₂ weighs about 10¹² tonnes.

So, for every thousand tonnes of CO₂ added to the atmosphere, one person's house gets washed away.

By way of comparison, the dirtiest power station in the world, Hazelwood, in Victoria, Australia, puts out 17 million tonnes of CO₂ every year. That's 17,000 people's homes worth.

I think it's time the world switched to nuclear power. If France can do it, surely the rest of us can? Some kind of thorium reactor would probably be the best option. Alternatively, a biological answer is also possible... but that would use a large fraction of the earth's surface given photosynthetic efficiency of about 1%.

Yep, no references. If we don't agree, do the calculation yourself with your own sources. Arguments about linearity etc. are probably valid too, but we have to admit that this gives us a rough idea.

Thursday, April 01, 2010

Measure eye-tracking speed easily

So my phone has a little flash-light that flashes (square wave) at 120 ± 2 Hz. It's easy to see if you move it around quickly, you get a trace like an oscilloscope would show. However there's a certain speed where if you move it slowly enough, all of a sudden your eye starts to track it properly and you can't tell that it's flashing any more.

This would be a good way to cheaply determine eye-response.

Just saying.

Saturday, March 13, 2010

ssh tunneling, explained simply

Many networks these days have closed networks connected to outside by gatekeepers. The way to connect to machines inside the network from outside is to use ssh tunneling via the gatekeepers.

This site explains how to do that clearly and simply for Linux, OSX and Windows.

In case that site disappears:

The linux command is
ssh -L 2222:internal_host:22 username@gatekeeper.uni.edu
where -L means 'forward local port' (once connected to the gatekeeper);
2222 is the local port on your localhost (the machine you are sitting in front of right now).
username is your username on the gatekeeper machine (and it will probably ask you for the connected password unless you have set up ssh keys)
internal_host is the DNS name of the host on the closed network you are trying to connect to
22 is the port on the internal host that you are trying to connect to
gatekeeper.uni.edu is the public DNS name on the wider internet of the gatekeeper.

After running this command, trying to connect to port 2222 on your local machine is the same as trying to connect to port 22 on the internal host from the gatekeeper.

Windows users use putty and put Source=2222 and Destination=internal_host:22 .

nxclient users should then tell their client to connect to localhost:2222 (i.e. through the tunnel) and then log in to the internal machine as normal.

Setting up keys

On the client, run

ssh-keygen

(and accept the default options). Once that's finished,

ssh-copy-id username@server

will add your key to the server. That's it!

Friday, February 26, 2010

High viscous fluid order

So I saw a video recently, and I can't find it on Youtube. Let me know if you have a copy:

A very viscous, transparent (I think sugar solution) fluid is in a beaker. A needle is used to inject a blob of ink, which remains suspended in the solution. A pole down the centre of the beaker is rotated, shearing the fluid and smearing out the blob into a ring. The pole rotates about 10 times, so that the blob is completely smeared out. The pole is then rotated back in the opposite direction and the blob reforms.

If I can't find a copy of the video I will try it myself.

Thursday, February 25, 2010

Sails and aerofoils

As a windsurfer and physicist, the aerodynamics of aerofoils are important to get right.

At the most basic level, modelling molecules with Newton's laws will get you the right result when simulating an aerofoil. However, an aerofoil does not simply deflect air downwards.

Actually this is hard to describe unambiguously, I can see why there are arguments.

Thoughts on the nature of light

The wave-particle duality of light has always bugged me. I have recently been thinking about how to simulate diffraction in a raytracer - could a ray perhaps have a certain radius in which it bends towards objects it passes close to?

This does still not account for interference. The fact that a photon travels through both slits of a double-slit experiment can be viewed as a photon in a coherent superposition.

It is quite likely that I am about to embarrass myself in exposing a woeful lack of understanding of optical quantum computing.

Does this then mean that we can use a double slit as an optical quantum computer? Actually, now that I think of it, probably not, because we can't develop gates that change behaviour of certain paths based on whether a photon passed through one slit or the other.

The result of a double-slit experiment (making some idealising assumptions) can be computed through the Fourier transform of a the slit arrangement. This in fact works for any series of slits.

Finally, the clinching proof that this is not possible is that Feynman showed that a classical computer cannot simulate a quantum computer in reasonable time. If it were possible, Feynman would have been wrong somehow.

So rememeber, quantum computing requires a way of interacting your qubits. Interference effects are not enough. I have seen interference being used in several experiments, however.. I don't understand how that works. Photons only interact with themselves... except in non-linear media, I guess. That must be it.

Thursday, February 18, 2010

Metropolis Light Transport is not unbiased

I believe MLT is a biased algorithm, as it doesn't sample rays randomly. Many papers discuss something called "start-up bias", which results from choosing the paths to be perturbed - those paths are rated as 'more important' by the algorithm.

One would think that as long as completely new paths to mutate are regularly chosen, then the algorithm will eventually converge to the same solution as normal path tracing with no mutating of paths. To take the extreme case, if every possible (within the computational accuracy of the machine) path is sampled an equal number of times, it doesn't matter if you did that using path mutation or not.

Another question, then, is whether or not the mutation process leads the renderer to implicitly favour some paths over others. For example, paths right on the edge of the light may have fewer valid paths near them and will thus be sampled less often. If this is the case, then I think MLT is ultimately biased.

Wednesday, February 17, 2010

World Peace

So, imagine we had world peace, guaranteed in some way.

Would that be a good thing? I think there would be a big risk of stagnation and decay.

Sunday, February 14, 2010

Wavefront rendering

I've been thinking about path tracing a lot lately, and I came up with a bad idea. Why it's bad is interesting though, as it demonstrates partly why physically-based rendering is so hard (complexity). I think it also validates path tracing as a good approach.

So, my idea was to take each emitter mesh, and propagate a single wavefront out through the scene. The mesh would be simplified as it propagated (retopologising, perhaps using Delauney triangulation). Once the wavefront was at a low enough intensity, it would not be reflected. The camera would then either receive all wavefronts on an image plane (which could potentially be stored as a hologram) or just raytrace the lit scene (seemed similar to radiosity).

Such a scheme would be able to store polarisation and phase in the wavefront, and thus calculate interference effects at surfaces (if previous wavefronts that hit the surface were recorded), and diffraction around barriers would be possible as well.

The problem with this approach is complexity. An area light at the top of a Cornell box is square. The left side sends light to the right, and the right side sends light to the left. A single mesh is not able to capture that much information -- my approach above was too simplistic.

The next step, then, is to make each part of the mesh emit spherical waves. We could then propagate them using the Huygens-Kirchoff principle if we cared about diffraction effects. This gets very complicated, as we almost need to store the state of light throughout the volume of interest, at a resolution good enough to observe interference effects (otherwise there's not much point using secondary waves at all). If we do not use secondary waves during propagation, but merely propagate the spherical waves outward, then this is a very complicated way of doing photon mapping.

So I conclude that this method, while interesting, is not practical, except for very specific scenes which may require such modelling.

Diffraction and interference are probably still better done storing and propagating phase with rays and image pixels - e.g. having 8 images, each storing the accumulated intensity for photons with a certain phase, and combining them to show interference effects at the end of rendering. Actually that sounds kind of cool, I'll have to try that one day. Diffraction could be done by using fuzzy intersection code and bending rays a random amount toward an edge when they went past an edge.

Edit: Someone's already thought of this, and called it Beam tracing.

Coanda effect helicopters

The person who takes these things, puts a camera on them and sells them for use following the action in sports television will make a fortune.

The idea is patented in the US; electric versions may not last long; it would be easy to have several and recharge them while others are flying.

I suspect the main challenge (after licensing) is in the control software. You'd either need very experienced pilots, or a good control system. A system that had the camera mounted with a gyro for stability like those old bomber turrets in a swivel ball would make things a lot easier for the pilot.

In case the above link is broken, I am referring to helicopters with dome-shaped bodies and a small blade on top that pushes air around the body; they fly as a result of the Coanda effect (the same one that most aeroplane wings use: faster air = lower pressure), as discussed on Slashdot.

Tuesday, February 09, 2010

solid state QC fabrication daydreaming

Well. One way would be to get bricks, 10nm^3 with sheer edges, and a single dopant at the centre. Constructing your QC would then simply be a matter of positioning bricks, perhaps by immersing them in liquid and pouring them over something.

The best strategy for regular arrays involves natural alignment through chemistry of some sort, for example if donors could be made to repel each other over some range, that would be very useful.

An alternative is some sort of nano-periodic structure that can be filled in in some kind of regular fashion and then etched away.

Perhaps a long biological molecule could be periodic on the scale required, and laid flat and straight on a substrate? The unwanted bits could then be removed, and crystal grown around the remainder..

Saturday, February 06, 2010

So yeah


I just finished this game,

and it was awesome,

and there's no SVG logo on the web.


Actually, the more surprising thing is that Double Fine doesn't sell a green turtleneck with this logo on it. I suppose they do have Kochamara...

Friday, January 29, 2010

2up page formatting with pages scaled better

So I print a lot of stuff (I can't afford an A4 sized ebook reader) 2 pages per side. The large margins have always annoyed me. Here's the solution.

Two 2 pages per sheet ps document (convert pdf to ps with ps2pdf), with page borders reduced by 1cm:

psnup -2 infile.ps outfile-2up.ps -Pletter -pa4 -b-1cm

-P input paper size
-p output paper size
-b border (margin) change

Changing different borders by different amounts is more complicated but can be done with pstops, and is left as an exercise for the reader.

Sunday, January 17, 2010

Because I forgot how to type unicode characters

The last post is the only one worth reading:

Applications that use newer GTK+ libraries (which includes all applications written for Gnome) require a "U" before the Unicode digits. Either of the following sequences should work:

Ctrl-Shift-U, hex codes, Spacebar

Hold down Ctrl-Shift, U, hex codes, release Ctrl-Shift

Sunday, December 27, 2009

Finding Build Dependencies

I only just found this:

sudo apt-get build-dep blender

What a great trick.

Sunday, December 20, 2009

Ubuntu, OpenCL and NVIDIA

To be able to compile OpenCL programs on Ubuntu with an nvidia card:

Find a driver with OpenCL support: 195.17 works (but later ones do not). Download it by searching nvidia's site, or try here.

This step is very important: Disable Ubuntu's hardware drivers if you have enabled them. System -> Administration -> Hardware Drivers.

sudo apt-get install build-essential

Now ctrl+alt+F1 to switch to a terminal; sudo stop gdm to kill Xorg; cd ~/Downloads; chmod 700 cudadriver*; sudo ./cudadriver*. Accept all the default options, including installing 32bit libs if you're on a 64bit system and resetting your xorg.conf. I had to copy /usr/lib32/libglut* to /usr/lib. sudo apt-get --reinstall install freeglut3 freeglut3-dev. sudo start gdm. You're all set.

Wednesday, December 02, 2009

Things to do

Lyx needs GUI support for document macros.

I say this because I've seen several times now the need for a user defined paragraph style, such as "Example" or "Exercise" or "Answer". This could potentially be solved by having a style editor? This might turn out to be a considerable amount of work.

Also, however, it needs simple replacement macros. An example I use a lot is \termdef{index item} which makes the index item text bold and adds an index entry. This kind of speed is not available to Lyx users. I suppose this is more of a variation on the noun/emphasis theme - user defined versions of these with custom Tex macros would be sufficient for this usage.

The Next Great Copyright Battle

2010 - Ebook readers become common.
2011 - Book sharing websites become popular.
2011 - Copyright infringement of books skyrockets. Seriously, you haven't seen anything yet.
2012 - Ebook makers build in or software update to automatic copyright protection for non-DRMed books, with phone-home functionality. "Make an example" lawsuits by publishers' associations begin.
2012 - Ebook readers without the ability to phone home enjoy a surge in sales. Crackers teach how to destroy aerials or crack firmware of popular models. Ebook readers stop working unless they can check in with their maker regularly.
2013 - ??? Who will win? Free Culture or Big Business?

Unlike musicians, book authors cannot make a lot of money out of performances. They (and their publishers) currently depend heavily on book sales to earn money.

One way to severely reduce piracy would be to make the books very cheap, like 1/100th of a day's wages. This would make the few minutes spent finding books for free uneconomical. If this was the case, DRM would almost be unnecessary. This doesn't work for smaller-market books like textbooks.

Perhaps a collaborative effort will produce good cc textbooks by then anyway, here's hoping! Actually it looks like there are quite a lot of good texts already, they just need to get noticed!

An alternative model for textbook authors is that used by Sean Carroll. Lecture notes are posted online, and satisfy course requirements; students who want a more complete treatment can buy the expanded textbook. I think this is a good model, but it doesn't work for fiction.

Thursday, November 26, 2009

Thritical Cinking

So. I haven't been able to avoid a few Glen Beck stories in the online media recently. It made me think.

Memes and attitudes are often forced on us, by parents, friends or the things we read. Once we get into a certain point of view, we like and remember things that agree with that point of view - the memes* become self-reinforcing. (Humans like identifying patterns. I'd even go so far as to say it's the main component of intelligence.)

So our point of view often depends on which part of society we come from. Who, then, makes up points of view in the first place? Leaders. Leaders are often strongly biased one way or another by existing points of view and can make (very) bad judgements, or judgements that are good for them in the short term but ultimately very bad for {[many] other people|those around them|themselves|society}. **

All this leads to ideas that are more trouble than they're worth becoming widespread.

The best defence is critical thinking. Analyse ideas yourself, carefully. Check them as much as you can. There doesn't seem to be enough of that going around these days. Internet culture (tl;dr) doesn't encourage it.

Censorship is the antithesis of encouraging critical thinking, and is *very bad*.

* I apologize for using this word repeatedly, but I couldn't think of a better way of putting it.
** The reason for the bad decisions is often extending a previously recognised pattern into a domain where it doesn't apply.

Saturday, November 21, 2009

Picnic Food

So,

I want more picnics. I'm writing things down now so next time I don't have to think up a list of food.

strawberries/other berries/nuts + chocolate dip / yoghurt / hot nutella
dry biscuits / bread + soft cheese / hard cheese / dips
sliced ham / twiggy sticks / cabana sausage
watermelon / sliced apple / sweet oranges
small double-layer sandwiches - mayonnaise egg tuna ham gherkins beetroot
hot chicken / potato salad / sausage rolls

Friday, November 13, 2009

Reminder: agent-based simulation.

Thursday, November 12, 2009

Geant4 and SRIM

So I've spent a while trying to get Geant4 to do ion implantations similar to SRIM. Turns out Example TestEm7 models a particle (can be an ion -- see the included C12 macro) impacting a block of material, and even includes some extra physics to make the "low-energy" ion calculation more accurate (screened nuclear stopping, custom-defined physics list standardNR, by Mendenhall and Weller). It calculates the predicted range of such ions.

Using Geant4.9.3.b01 and the standardNR physics list, my quick accuracy test gave an ion range for P-31 at 10keV (very low energy in Geant4 terms) into NIST-parameterized Si of 15nm versus SRIM-2008's 17nm (monolayer mode). Both give rms values of about 5-6nm.

To get energies and positions of transmitted particles requires some editing of the C++ code.

Why am I doing this? SRIM only does layers of material, I'm trying to model a more complicated geometry.

Thursday, October 01, 2009

X Sharing Screens

Found this in my archive, I dunno where from..

When I pop up with my laptop to discuss with a colleague, after a while I might do on their computer:
xhost +mylaptopname

and on my laptop I do:
x2x thecomputername:0 -west

Then suddenly my mouse can go over the two computers, my keyboard works on both as well, and I can even copy-paste between the two computers. It looks like the two computers got united. In a flash, newbies get a new idea of what means unix and X ;-

but I thought it was worth reposting.

Actually those commands don't quite work. On your laptop, run
sudo apt-get install x2x xhost +desktop-ip
And on the desktop,
ssh laptop-ip -XC x2x -west -to :0.0
Your desktop now controls both screens.

Sunday, September 13, 2009

Ubuntu Jaunty seems to have just updated its wireless network and broke my settings. Had to change the mode from Infrastructure to Ad-Hoc in the connection settings.

Friday, September 04, 2009

Techdirt

This is a bit of an e-vote for TechDirt. I don't agree with everything those guys say, but lately they've had several in-depth articles and they research their stuff well and are honest when they're wrong.

However, I was a bit annoyed at them dissing CSIRO's wifi patent. I mean, fine, the patent system is heavily abused, but the suggestion that CSIRO should have become a wifi device manufacturer instead of licensing out the technology is a bit ridiculous. And they did license it -- the companies involved just tried to weasel out of paying up once they'd learned everything they needed.

Edit: revoked. No longer a fan.

Monday, August 31, 2009

Last Piece Puzzle

So I was away on holiday and I found a puzzle called the Last Piece Puzzle. Basically trying to arrange tetris-like pieces to fill a square with no gaps.

I wrote a program to solve it, which was going to take about thirty years to try every combination. The second attempt found all possible solutions in about 2 minutes.

The difference between the two algorithms is what gets me - it's so subtle. The first algorithm picked a piece and then tried every position on the board for that piece, then once it found a position, it moved on to the next piece. The problem here is that there were often holes left behind that no piece would fit into, so it spent a lot of time trying to solve a board that obviously couldn't be solved.
The second algorithm was only slightly different - instead of trying the pieces in order, try to fill the squares in order. This way there were almost no holes (or the holes were found without too much extra effort) and the algorithm turned out to be hugely faster.

There was a contest to solve it in lisp - the fastest solution there was 0.3 seconds. My second attempt copied the winning algorithm there.

My solution is also floating around.

In total, there are five possible solutions:

Tuesday, July 28, 2009

Atom printing

Just went to the sweetest talk about 0.2A (1A lateral) resolution atomic tomography. Basically kick atoms off a (needle) surface with an electrical pulse or laser and then accelerate them into a position sensing detector. The time-of-flight gives you the mass-to-charge ratio so you can tell element and isotope. As the electric field spreads out almost radially away from the needle you get a lot of magnification and can tell the originating position quite accurately.

Of course, this imaging method destroys the sample.. but wouldn't it be cool if you could do it in reverse to place individual atoms into an object? It would be difficult to say the least, but the result would be awesome. Not only that, but it could be a quite automatic process.

You could have different print heads for different elements. Perhaps even the same thing in reverse, a laser that kicks atoms off the "print head" and then the freed ion travels along the electric field line and hits the "needle". Of course, you would have to ensure that the ion got kicked off with a small velocity or you would have quite bad lateral resolution. This low velocity thing would probably result in the ion just reattaching to the material. So this is probably hard to do, because the whole point of using a needle is presumably so as to get strong electric fields (and thus high acceleration) when the ion is first ionised. Perhaps this is why this technique won't work.

But what if you had two needles? Boot the atoms off one, and attach them to the other. Ensure that only certain atoms land by having a (macro scale) aperture between them and detect when atoms land.

Monday, June 22, 2009

Jaunty

Things to fix for Ubuntu Jaunty install on an M1330 (so far):

Set Source in synaptic to whatever ISP I'm currently using (avoid quota usage)

System->Administration->Hardware Drivers, enable latest

Install packages:
texmaker texlive-math-extra
blender inkscape
idle
compiz-fusion-plugins-extra compizconfig-settings-manager

Audio (crackles instead of proper sound):
change /etc/modprobe.d/alsa.conf
add line
options snd-hda-intel model=3stack
as my laptop has three audio ports
(ref: https://help.ubuntu.com/community/SoundTroubleshooting )

CD/DVD (disks don't mount properly):
add line to /etc/fstab:
/dev/sr0 /media/cdrom0 iso9660,udf user,noauto,exec,utf8 0 0
and make sure the other lines match the order of is09660,udf.
(ref: http://osdir.com/ml/ubuntu-users/2009-05/msg00352.html)

HDD power management (hd spins up/down constantly):
add
/dev/sda {
apm = 255
}
to /etc/hdparm.conf
and change /etc/acpi/resume.d/*hdparm* and /etc/acpi/start.d/*hdparm* :
change all three-digit numbers (128, 254) to 255.
(ref http://www.gatzet.com/fixing-ubuntu-harddisk-power-management-bug.html)

Closing the lid of the laptop should make it sleep:
System->Preferences->Power Management
On AC Power, When Laptop Lid is Closed, Suspend.

Firefox extensions:
flashblock chatzilla

Configure Inkscape to use SVG properly.

Saturday, February 07, 2009

Victoria Electricity Generation Water Usage (part 2)

Just the Hazelwood plant this time:

In 2005 the mine used 1.31 MegaLitres of water for every GigaWatt hour of power generated.
The plant generates a peak of 1.6GigaWatts. There are 8760 hours in a year. If the plant was running at peak capacity this would equate to (1.31ML / GWh) * 8760h = 11475 ML per year. At an average of half capacity this is still 5 GigaLitres per year.

The Thomson dam has a capacity of about 1000 GigaLitres.

Monday, November 10, 2008

Evolve an AI

How to evolve an AI: basic principles

Intelligence is basically a pattern recognition and extension
Evolution: must make copies
Make copies of good AIs, destroy bad ones

(AIs evolve to become best at making copies of themselves - must ensure this can only happen in a good way. This may be impossible to fully overcome, and is the danger.)

As long as the ways of copying an AI are controlled, no problem. Or, selection of which AIs to copy/promote.

Goal of AI: reproduce. Method: Help humans, humans will reproduce it. Just like farming - most useful plants get produced the most.

This method will produce AIs we can't understand. There's not much we can do about this - we have no hope of intelligently designing something as smart or smarter than ourselves.

Initial development: have people choose which AIs best follow patterns of ANY sort. As AIs get more complex, they can handle more complicated patterns.

Saturday, November 01, 2008

The Scientific "We"

I wonder if there is a scientific writing style: "Our model involves...", "we measure the length of...",

2nd person plural performing the actions, present tense.

It's almost as though the scientist and the reader are performing the experiment together.

Monday, October 27, 2008

Victorian Electricity Generation Water Usage

Conclusion: Victoria uses more than 5% of its total storage capacity each year on power generation. This is enough water for 3 million homes.

Calculation:
500MW = typical 8.3e9 litres/year, 250000 homes worth of water. (1)

Brown Coal plants:
Hazelwood 1600MW according to (2), uses 37.5ML / day
Loy Yang A 2200MW B 1050 MW
Yallourn 1450MW
Total 6300MW
(wikipedia)

-> 1e11 (100 billion) litres of water each year (6300/500 * 8.3e9). by (1)
-> 5e10 (50 billion) litres of water each year (37.5e6 * 365 * 6300/1600) by (2) (unverified)

Strangely it is ridiculously hard to find more accurate information about how much water each plant uses, where it comes from, whether it is recycled etc.

Victorian storage capacity 1,773,000 ML. (1.7e12 litres). (w:Melbourne Water)

1e11 / 1.7e12 = 5.8% of total storage used each year -> conclusion.
5e10 / 1.7e12 = 2.9% of total storage used each year -> 2 million homes.

Resulting question: why don't the power plants use recycled water? colder water will make the plants more efficient, so maybe the alpine water is important to them.

Sources:
  1. http://www.ucsusa.org/clean_energy/coalvswind/c02b.html
  2. wiki/Hazelwood_Power_Station,_Victoria#Water

Sunday, October 26, 2008

Friday, October 24, 2008

Independence


Figure 1: Independence.
Posted by Picasa

Thursday, October 23, 2008

Australian Internet Censorship

As an Australian and an internet user, I have serious concerns about the new mandatory "clean feed" filter initiative.

Given currently unstable economic climate, I am outraged at the proposal to waste untold millions of our tax dollars on the proposed filters. According to the Government's tests, they are inefficient at blocking ‘inappropriate’ and/or ‘illegal’ content (however loosely you define it), often mistakenly block websites that are neither, and can easily be bypassed by users with even a modicum of internet knowledge. Furthermore, given that your tests also determined that most of the filters slowed internet speeds by 22-87%, I cannot see how this is line with Government plans to update and modernise Australia’s internet capabilities.

I am also amazed at the response to the overwhelmingly negative public reaction to the proposal. Instead of consulting and discussing their plans, those behind it have become publicly silent but continue apace with their implementation. This is not how I think a democracy works.

Given the vast amount of Internet content available, and its extremely dynamic nature, I sincerely doubt the Government will ever be able to classify it all. It is an exercise in futility: a clear waste of taxpayer dollars. Additionally, Australian households are diverse, and many do not have young children, so mandating a one-size-fits-all approach does not serve the public interest. It is not the Government's role to decide what is or is not appropriate for me, for parents, for children - for Australians.

I strongly protest the proposed censorship of the Internet, and demand an end to this plan which will cost all of Australia time, money, liberty and stability.

No Australian Internet Censorship

gah. people say to me, "I'm glad 4chan will be censored".

Oscar Wilde once said, "I don't agree with what you say, but I will defend to the death your right to say it."

I agree... why should other people decide what sort of things are appropriate for me to read? I can decide for myself! All those english teachers were trying to teach me critical thinking for a reason, and now I am thinking critically about censorship.

Don't Do It! I will fight you! And when I fight, it is not only to win now, but permanently. I have just read Ender's Game, and learnt that if you are going to fight, you must win so convincingly that you never have to fight again.

On a side note, the economy will not recover to 2007 levels until at least 2012.

Monday, October 20, 2008

Australian Internet Censorship coming in January

http://nocleanfeed.com/

Let's kill this so hard no-one considers trying it again for the next hundred years.

Wednesday, May 16, 2007

Problems with management

How do you recognize bad management?

I think the following signs indicate such:

  • Managers scheduling meetings and then forgetting to turn up to them
  • Everything with hard deadlines done at the absolute last minute, to a low standard
  • Much work wasted on irrelevant activity
  • Team morale dropping to unplumbed depths
  • Attempting to blame supervisors for the team's state
In my opinion, one of the characteristics of a good leader is that they take responsibility for their team.