Monday, 27 November 2017

Falling down the rabbit hole

This is a phrase I use often - "So I was looking at this, thinking about how to do that, started reading about the first steps, then Googled around a bit, and 14 hours later I realised how far down the rabbit-hole I had fallen."

I'm writing this after 2 solid days of rabbit hole, and I've decided to describe where I went, as I begin to climb out.

For context, I've spent the last 48 hours totally cut off from humanity, and without any real drive to do anything. I had a few things I needed to get done in the short term, but I'm lucky enough to be able to push most things to one side if something of interest comes along.

So, where did I start - thinking back it was the Hello Internet podcast I was listening to on the way back from Twickenham to Cardiff. An unbelievably long journey at the end of a long day, and meant my brain wasn't 100% in gear. Probably less than 10%. So, when CGP Grey said something along the lines of "do not play this game, you'll lose an entire weekend", I figured, "Well, I have a weekend that needs killing, lets try it out."

And so I discovered "Ultimate Paperclip" which is what I think of as a Cookie Clicker game, due to a game of a similar concept. Reddit refers to it as an incremental game, which I discovered after Googling a "soft lock" issue which was affecting me in-game.

---       7 hours later        ---

Suddenly it's 4am and I achieved exactly nothing all Sunday.

Or did I? Maybe I can persuade myself that this was in any way a valuable experience, and that I've learnt something from it.

For instance, the game plays heavily into the "Dumb AI" way of ruining the world/ known universe by accidentally creating self replicating matter converters.

Similar to the Grey Goo concept, or the Replicators of the Stargate universe, these are inter-planetary machines which use any and all matter to create more of themselves, with the eventual aim of... something. What that actual goal is, is apparently useful for categorising the end results of various nightmarish scenarios.

These have been described in various Science Fiction books and by various great thinkers as von Neumann machines

From these links above, I discovered that these can be benevolent/benign or essentially evil. 

Good:
  • Such as the monoliths which appear in 2001 Space Odyssey (and teach apes how to hit each other with sticks, ostensibly kick starting the race to become upright, higher thinking humans.
or Evil:
  • Such as the "Bersekers" as found in a series of short stories by Fred Saberhagen. I hadn't heard of these stories, but I'll be sure to add them to my bookshelf of Asimov and Philip K Dick et al which I've collected over the years.
Of extra note here is the relevance to Fermi's Paradox, which is also covered in the above article. Essentially, if the universe could be filled with replicating robots, and we've had all of Time for some advanced race to create (intentionally or accidentally) a fleet of single-minded planet eating automatons, where are they? They've had plenty of time to get here.

So, if they do turn up in the skys, or start raining down upon us one day, we get to ask ourselves them: Friend or Foe?

Another concept which turns up in the Ultimate Paperclips game was the concept of Yomi.

Yomi is used as an in-game currency used to buy upgrades to a Stock brokering AI, which is earned by the in-game mini-game "Strategic Modelling", which for most of the game plays itself. 

This was unexplained and confusing when I first discovered it, but I kept clicking, numbers grew higher and higher, so I assumed I was doing things right. Or at least not actually wrong.

Coming back to it later, it became clear it was actually playing hundreds of rounds of the Prisoners Dilemma, a common example when describing Game Theory, coded into something which can win or lose based on different strategies I was unlocking and selecting. 

As I hadn't realised at the time that this is what was going on, it meant I could rediscover it all again now.

In the meantime, I had also discovered this. Another clicker, but in space, and weirdly potato themed. This one had me writing simple JavaScript scripts to calculate worth of items to "buy", with these items being space-based potato-cannons, probes and landers. Because reasons.

But if there's anything worth doing having got this far it's this: "THE EVOLUTION OF TRUST" which is a wonderful interactive explanation of the game theory strategies gathering Yomi earlier. It actively avoids describing the Prisoners Dilemma, instead focusing on societal challenges of friendship and trust in a globally interconnected world, with elements of chaos such as misinformation and accidental actions. It's great.

From there I ended up at data visualisations of trust, which is actually pretty close to at least something similar to bits of my day job. I've been looking for interesting and informative ways of showing social-science related data, normally with a spatial element to it, and this may be useful for that.

So that's kinda neat.

P.S. some nutcase wrote UniversalHotstoppers, which makes more sense if you're a regular HI listener. Rebel flag to bait Grey and Brady too, good work.








Tuesday, 11 October 2016

Fixing dead mouse click in VBox linux guests



ps axjf | grep VBox


     1   832   830   830 ?           -1 Sl       0   0:13 /usr/sbin/VBoxService
    1  1691  1690  1690 ?           -1 S     1000   0:00 /usr/bin/VBoxClient --clipboard
 1691  1693  1690  1690 ?           -1 Sl    1000   0:00  \_ /usr/bin/VBoxClient --clipboard
    1  1701  1700  1700 ?           -1 S     1000   0:00 /usr/bin/VBoxClient --display
 1701  1703  1700  1700 ?           -1 S     1000   0:00  \_ /usr/bin/VBoxClient --display
    1  1707  1706  1706 ?           -1 S     1000   0:00 /usr/bin/VBoxClient --seamless
 1707  1708  1706  1706 ?           -1 Sl    1000   0:00  \_ /usr/bin/VBoxClient --seamless
    1  1716  1715  1715 ?           -1 S     1000   0:00 /usr/bin/VBoxClient --draganddrop
 1716  1717  1715  1715 ?           -1 Sl    1000   1:45  \_ /usr/bin/VBoxClient --draganddrop

Kill the --draganddrop one, which here was pid 1717.


VBox virtualbox version 5.0.26 r108824 ubuntu 4.4.0-38-generic #57-Ubuntu linux guest (windows host, may not be relevant)
Mouse movement was working, left and right click not working, scroll wheel not working.

Keyboard was fine, alt-tab to switch to a terminal if open.
Ctrl Alt T to open terminal, Alt + Space to open context menu, down arrows to select maximise if full screen is needed.

Thursday, 24 December 2015

We Made Cider

Part 1 - Grandad's House - Isle of Wight

In the summer of 2013 we made the journey down to the Isle of Wight to visit Grandad, to trim the long branches of his apple tree and to take away as many apples as we could carry.

Matt, Grandad (Trevor) and Ian
Not shown, Annliz, who took all the photos.

Matt spent most his time up the tree.

Tree inspection

It wasn't the longest ladder, so he had to do some climbing.

Matt up ladder

Luckily he doesn't mind hights.

Matt high up

We had a system, Matt would chop branches and Ian would pull them down into a pile with a spiky pole.

Ian with spiky pole

Always worth another pair of eyes to check nothing's going wrong.

Grandad overseer

The ladder wasn't as stable as this photo shows, even with multiple people to hold it.

Ladder stability

Part 2 - Making the Press

This required multiple trips to Homebase, and a serious rummage through the spare room to find all the tools I half remembered owning.

Anthony supplied his beer making kit we bought from Wilkinson's the previous year. That shop is brilliant for cheap brewing stuff.
  
Materials

This was a much planning as we managed before diving into the project. A few crude scribbles as a rough attempt to decide how much wood we needed to buy.
  
Plan

A few cuts with the hand saw, a few drill holes, 4 bolts and we have the basic frame!

Complete frame

The living room had loads of old curtains over everything to catch sawdust.

Frame + Matt

A closeup of the corner joint and single bolt. This design has the bonus feature of being able to fold almost flat for storage.

Corner + bolt

Pretty proud of our progress so far. Tools everywhere, loads of mess, all good things.

Frame + mess room

The container chosen to hold the smashed up apples - a plant pot with two holes drilled into the bottom.

Frame + bucket

Measuring the MDF for the feet and the bucket's platform.

Matt measuring

Measure twice, cut once.

Matt measuring, wide

MDF makes loads of dust when you cut it with a fret saw, and the dust is pretty horrible if you breathe it in. So, masks and goggles. We'd have felt pretty stupid if we had an accident with safety equipment sat in the box next to us. 

Also, we had the idea to vacuum up the dust straight from the blade while cutting, so one person held the nozzle up to the saw while the other one cut. Almost no dust in the air, or on the floor!

Mask and hoover


The bucket now has a small bracket to hold it steady in the frame.

Frame again

The sawing/ hoovering combo.

Matt and Ian sawing

Ant arrived after he finished work, to help out and see what was going to happen to his brewing equipment.

Matt and Ant sawing

These are the feet nearly finished, with guide holes for screws.

Ant and Matt drilling

Now the frame is freestanding, and has a bracket to hold the bucket in place.

Frame with legs, Matt

Part 3 - Crushing apples

The same day, we started cutting up the apples, to give our press a chance at crushing them. In accurate technical measuring terminology, we had one large suitcase of apples to squeeze.

Chopped apples in bucket 

Ant had the exciting job of slicing a few hundred apples into rough quarters.

Ant apple chopping

It took a while. The fish watched.

More chopping

Apple chunks cut a bit smaller.

Apple bucket

Another bracket was needed to hold the top of the car jack in place.

Matt fixing platform to the frame

A tired Annliz arrived home to all the chaos and mess.

Annliz home from work

With the second bracket attached, the press is basically complete.

Press (car jack) installed

This angle shows the internal plate and rod which will spread the force evenly over the apple chunks.

Press installed 2

The choice of press wasn't ideal, as its triangular shape doesn't easily push straight down into the bucket. The extra brackets help a bit.

Press closeup

An entire bucket full of apples. It's about 5 gallons, but inefficiently packed.

Full apple bucket

Normally some sort of porous muslin would be used here. We had some offcuts from our net curtains. It seemed to work fine. A washing up bowl will catch the juice.

Bucket press mesh (net curtain)

Our cider press is pressing apples! This might just work!

Pressing apples

We have apple juice! Very dark and murky, but it's 100% grandad's apples. The press allows a pretty slow but constant stream of apple juice.

Apple juice collection bucket (washing up bowl)

We have no idea how much juice to expect. How many washing up bowls does a suitcase of apples make??

Apple juice 2

Part 4 - Bottling the Cider

The bowl of juice was poured into this plastic keg and some beer making yeast was thrown in. The size of the keg was complete overkill, the juice barely reached the tap. We left it raised above the ground to aid the syphoning off afterwards. It was left to ferment for about 6 weeks.

At about this point, I measured the specific gravity of the juice, to find out how much sugar was in the solution. Like a salty solution, things float higher in the water when sugar is present. Once the yeast converts all the sugar into alcohol, the float sinks further into the solution. The difference between the two levels shows how much sugar was converted, and so the amount of alcohol can be calculated.


Fermenting kit

The aim was to keep the barrel as stationary as possible, so the sediment would sink to the bottom. It was important to avoid touching anything as much as possible.

Fermenting stack

The pipes and bottles had to be cleaned thoroughly. I also heated them in the oven to ensure anything was killed off.

Clean bottles

It was impossible to take photos of syphoning the cider out of the barrel while doing it. Care was taken to avoid disturbing the sediment layer at the bottom. Syphoning is tricky, but doesn't taste bad if you get it wrong while sucking the cider down the tubes.

The fancy bottles were filled first. One each for Matt and Ian.

Full bottles

It's amazing how clear the cider went! No cloudy farmhouse scrumpy here, it's bright yellow and shines brilliantly.

Full bottles flash

Very very happy with how it looks.

Full bottles flash 2

It looks just as good in regular light. 

I added a bit of extra sugar to the second bottle, in an attempt to get some secondary fermentation going. In theory it would add more CO2 to the solution and would potentially end up fizzy. In practice it made a slight pop noise when opened two weeks later, but it wasn't sparkling.

Full bottles, no flash 2

There is still plenty of cider in the barrel, so a less fancy bottle is filled with the remains. Still clear and a great colour.

2l bottle

Another large bottle is almost filled, before the dregs from the barrel start to stir up the sediment. This bottle was a bit cloudy as a result, but it's not terrible.

2 2l bottles

The completed batch. It turns out one suitcase of apples makes 3/4 of a washing up bowl of apple juice, which makes almost 6L of cider.

Using the measures of specific gravity taken before the fermentation happened, it was possible to calculate an approximate alcohol strength for the cider. Using dodgy measuring and even more dodgy maths, I think we managed between 6-7%, which makes sense bearing in mind we used yeast typically used for beer making. We can be pretty happy with that!

The end result!!

4 bottles

Friday, 6 May 2011

vlc from across the room

Ubuntu running on "server", ie computer with screen and access to files. Ssh installed.

User on machine across the room, with some sort of ssh ability (either *nix or putty)

ssh into server :
>ssh user@192.168.0.100

>export DISPLAY=:0
>vlc /location/of/file --intf rc
>help

gives the options available to adjust the playing file. play, volume 500 (min 0, max 1000), seek (+seconds), f (fullscreen)


Additionally:

if the screensaver is on,
>gnome-screensaver-command -d
d deactivate, a activate.

sound control,
>alsamixer

Thursday, 14 April 2011

mvn deploy:deploy

mvn deploy of file:

mvn deploy:deploy-file -DgroupId=the.package.name -DartifactId=name -Dversion=1.1.1 -Dpackaging=jar -Dfile=name-1.1.1.jar -Durl=scp://host:/folder/with/write/access

pom.xml fragment to access deployed jar:

<dependancies>
<dependency>
<groupId>the.package.name</groupId>
<artifactId>name</artifact>
<version>1.1.1</version>
</dependency>
</dependencies>

<repositories>
<repository>
<id>repoName</id>
<name>shortName</name>
<url>http://host/location</url>
</repository>
</repositories>

Thursday, 8 July 2010

Well, that was predictable..

I failed to keep blogging regularly!

What a surprise, I guess I join 99% of all bloggers who attempt to write one of these things and get bored after day 3. Well, here I go at trying again.

I begin this again because a hell of a lot of interesting stuff has happened in my life (from my perspective anyway). I have moved in to a place with my fiancée Anne-Lise, graduated from Cardiff University, and been handed a job opportunity all in one month, as well as an amazing holiday in southern Spain, and another 2 weeks away from home in various parts of France next week.

So its all happening now. And I guess, as is proven by the fact that I'm writing this, that enough stuff is happening in my life that I consider it writing about.

What annoys me, and is the reason I haven't kept this thing updated, is that I really wanted this blog to be entirely "tech" related, as I'm fairly sure 90% of my ideas and opinions are formed around the realm of technological advances (and their related cock-ups). Unfortunately this means all my potential posts would be along the lines of:

"The iPhone sucks!! Why the hell would you throw money at a corporation that thrives on blocking your access to content it hasn't personally validated!!??1111one"

...and I don't want to be that type of person. Anyone with half a brain can see the *very* obvious pros and cons of the Apple business plan.



Ok, I cant do it. I just cant sit here typing and hope that anyone reading this is thinking what I'm thinking, so I'm going to have to list them. I'l attempt to explain as un-biased as possible.

Pros:
1. The hardware Apple produces is awesome. The touch screen technology is so intuitive it may as well be rigged directly into your neo-cortex. (I am of course ignoring the recent iPhone 4 fuckups that require your hand is the exact clone of Sir Jobs' - more later, probably)

2. They have their market totally sorted. I mean really, they have capitalized on the "cool" factor to the point that american TV programs have to have an iMac somewhere in the background, and all the news channels (that have saturated the media enough to appear in Infomania) have someone holding an iPad to wave jpegs and avi's at the screen. Screw high-def, the younger audience will totally care about the news if its waved in front of a camera on a "cool" tablet device. I mean, really?? The overall effect is a considerably lower resolution image than would be produced by letting the audio-visual guys plug the image directly to the screen, but hey, if its on an iPad, people will care more, right??

No... I've started to rant, those that own iStuff presumably considered how much its costing them, weighed it up against the chance of them looking cool and shagable, and decided its worth it.

One last "pro",

3. Its free on the right contract!!

Ok, so certain ISP cum mobile providers no longer have monopolies on iStuff. Meaning there's now even more companies doing Apples advertising for them. I mean, O2, Virgin, Vodaphone, Tescos et all still have to buy the damn things, and then shift them to the baying public, so its not going to bother Apple who provides the contract. To them, they get paid sooner, so "yay, competition can bring the pricing down!!"

Bullshit. Apple still sells the kit, so Apple still decides the price. Its up to O2 to decide how to get it back again.

So yes, O2 may give it to you "free". Congrats, you have an iThingy. But lets consider this, shall we? The cheapest way to get yourself an iPhone4 on a pay monthly tariff, with O2, (as of 9.7.10), is £25 a month, for 24 months. Thats £600 before you try to use it for calls and such. The most expensive, and presumably most generous service-wise, is £60 for 24 months (other tariffs available), costing £1440 in todays money. I'm assuming this phone automatically pays your rent and council tax at that price.

(Incidentally I have a pay-as-you-go deal with O2 which gives me 300 free texts, unlimited internet, 10% of my top-ups back every 3 months as well as various "gifts" of free minutes every time I top up. Over 24 months this will cost me £240, meaning I could have 6 phones for the price of an iPhone, and importantly *I can stop paying, anytime I want!* Apple produces a new phone/pod/pad/thingy at least once a year, but the *free* contracts have you tied in until long after you've sold the thing for 30 quid to a mate)



... Right, deep breathe, and I'll try to finish the rant, while covering my ass with a few things that are obvious about what I've just said.

1. Apple need to make cash, in a way that's predictable and regular, so that its possible to predict future earnings and expenditure. Its the reason very few people have pay-as-you-go mortgages. Fair enough, just don't price yourself into the sky and at all god-like with it.

2. The "cool" factor really is worth something. Annoyingly, its true. Much though we hate to think it, advertising works. Even if you haven't eaten in a McDonalds in the last 6 months, or even walked past one, you still know it exists, and it'll appear in conversation from time to time. This is all it takes for a multinational company to ensure that people walk through its doors. It's recognisable, well known, predicable and, importantly *you know other people who have eaten there*. That's enough to persuade you between a Quarter Pounder and a regular burger and chips from your local burgers-R-us.


I'd love to say that's my Apple rant over, but it really isn't. This was all just to convey the fact that I can see what they're doing, and how its working, and how much people are paying in the hope they will be cool. The most important thing about all this is the software. And I'll type that later, as its late and I should have been asleep hours ago.

Sunday, 7 March 2010

Copyright and the new laws

http://techcrunch.com/2010/03/07/nsfw-hey-america-our-draconian-copyright-law-could-kick-your-draconian-copyright-laws-ass/

Ignore the title, its largely ironic, but the piece is a really interesting view on copyright laws in the UK and how they're set to change in the near to mid future. This is particularly interesting with the election coming up, (as the piece explains) and if enough people hear about this, and understand it, it really could change the way the UK population uses, or is allowed to use, the web.

I'm never thrilled at the idea of new regulation, the law is confusing enough that I literally have no idea if I'm breaking any at any specific time, but as a heavy Internet user, new regulation is bound to affect me, and you if you're reading this.

So yeah, copying stuff is hurting the country, and as manufacturing goes completely down the pan, maybe computer generated content -as a large part of our economy - should be protected?

Or should the Internet be left completely free for everyone to do whatever they want with, as originally envisaged in its early days?

This has been argued elsewhere, and everyone has a gut feeling to begin with on these things. But consider the long term effects of your actions and, importantly, realise that if you are doing something online, it is highly probable that thousands of others are doing the same thing. And cumulatively, its bound to have an effect on something eventually.