On being accused of eating a dog…

Posted by | Posted in Life | Posted on 30-11-2012

This is a true story from half my lifetime ago when I was 16 or 17 years old and attending Yorkshire Coast College in Scarborough.

I was into metal, I wore black, wasn’t bothered that my clothes were literally falling to pieces, programmed constantly, partied, drank too much, and had long hair almost to my waist at one point. So much has changed in all those years… now I have short hair.

Read the rest of this entry »

Ah Lua, how do I loathe thee… I mean Love, yeah Love…

Posted by | Posted in Game Development, Lua, Pioneer | Posted on 25-11-2012

I’ve never understood the love given to scripting languages embedded in a game engine.

I’m going to take Lua in Pioneer, or in anything else for that matter but it’s Pioneers that sparked this off. You have a system written in C++, you expose it to Lua with C++ side functions that get presented to Lua scripts, you then program in Lua.

You are still programming, it’s just another programming language. Lua is not King, neither is C++, they’re both just programming languages.

Now, inevitably, the next step occurs: Everything has to be done in Lua.

What was a convenience, or a way of rapid prototyping, or a way of scripting light data handling routines, or for displaying data in a GUI is now doing heavy lifting in the engine at about 1/35th to 1/50th the speed it was being done in the traditionally compiled code.

Of course by this time only experienced programmers can actually write or modify the scripts because to make Lua useful you’ve extended it with home grown libraries & since the purpose of Lua is usually to make designers and non-coders lives easier it has fundamentally failed in this regard by this stage.

Whole systems are exposed from C++ meaning that you’re maintaining code twice except that you’ve exposed the worst bits of C++ via the wooley type unsafe Lua where the most advanced editor has all the sophistication of “Notepad.exe”.

Lua is not king, Lua quickly becomes a ball ache most of the time because it grows out of it’s usefulness, rapidly doubles the amount of work required to maintain engines, and slaughters anywhere it’s used in a performance critical subsystem.

I say this as someone who has programmed using it at several companies and Loves Lua for scripting. I just don’t think it’s anything other than a helper and best if it’s regularly pruned to reduce what it’s used for.

Some things should be moved out of Lua in Pioneer entirely and into some form of structured data generated by a tool. All the LMR stuff is obvious, ship definitions, spacestation configuration info, and ANYTHING to do with vectors/matrices/quaternions.

Other stuff is perfect Lua fodder: missions, trade pricing, defining factions, the GUI and probably a few others.

It’s just so annoying writing something in one language, then everyone wanting it in Lua too. Fuck off. It’s written already. Why have it in yet another language? It’ll be doing the same thing! Only then it’ll be in a language that I can muddle by in compared to C/C++ which I’ve been doing for 18 years (33 now, 15 when I started). What bloody good will that do? Will it mean more people can use it? No. There’s already a load of people who can write in C++ on the project who don’t know/use Lua. If anything it will reduce the number of people who can use it to only those who know/use Lua!

Does anyone really think that something has been done in Lua that couldn’t have been done in the C++ side? No. It does mean however that there’s a shitlod of C++ code, then a shitload of C++ interface code, and then a shitload of Lua code to make the C++ do what would have taken at least one shitload less of interface code to just do directly in C++.

You know what? If you find yourself embedding Lua to make your life easier and to get away from C++ then Lua isn’t the answer.

C# is.

Energy bill delays setting carbon target until 2016

Posted by | Posted in climate change, environment, government, Life | Posted on 23-11-2012

So a government, this one not that it really matters, has failed to achieve the hopes of meeting the minimum targets hoped for on the environment/carbon/climate-change (http://www.bbc.co.uk/news/business-20451189).

These weren’t lofty goals either, these were the minimum goals that we’ve legally agreed too.

Those legal agreements weren’t the best course possible either, they were the minimum required to provide a 50/50 chance of avoiding “catastrophic” climate change and keep temperature rises below 2C by 2100 (it’s 2012 btw keep that in mind) and then only if we were following the best-case predictions.

Then recent reports have indicated that the rate of change and it’s effects might have been underestimated by up to 5 times, i.e. things we expected not to happen until 2100 appear to be on course to happen by 2020-to-2035 (http://www.newscientist.com/article/mg21628923.100-we-are-leaving-emissions-cuts-too-late.html & http://www.newscientist.com/article/mg21628914.700-estimates-for-future-global-warming-narrowed-down.html).

So this is the situation… we’ve just failed to set policy which would let us meet a weaker-than-required agreement, which was targetting the bottom-end of a best-case scenario which we already new was wrong, which has recently been shown to be out by at least 2 but possibly up to 5 times.

Remember that was the target to have a 50/50 _chance_ of stopping “catastrophic” climate change. Not, merely “a bit bad” but “catastrophic“. Severe damage to the environment and changes which make it difficult for us to do useful things like grow food, prevent flooding and storm damage to our biggest cities, survive summer heat waves, yet not freeze to death in the winter. Not exactly little things are they.

This isn’t a post about the environment by the way.

No, I’m just confused by the way that governments, companies, even individuals decide what to do about the things they face.

The above case is drastic but a perfect example: We’re failing to prevent, or even slow, the race to “catastrophic” climate change. We’re failing because of a series of things which all aim to do the bare minimum for the most cheerful and optimistic predicted outcomes that meet our hopes rather than face our realities. Then to compound the error we seem to accept that falling short of the commitments we’ve agreed is ok.

All this seems to mean that we’re setting ourselves up for inevitable failure. I bet we do it in a range of things, I can think of several on my own personal scale where I do the same, where I fail to commit and then eventually abandon stuff because it’s not working… of course it’s not working, I’ve identified something that will take 100% of my effort to do, then I  allow myself 20% of that in time or money, then when “real-life” gets in the way I accept that I can only meet 15% really. Then I fail.

In my life that might mean the bathroom needs some work that I’ll eventually have to get someone to pay for. Or that the oven really stinks sometimes because of something bubbling over.

When the governments of the world give 15% to prevent something like climate change.

Then it seems that we’re all fucked.

So why do we go into these things half heartedly? Why do we pick the most optimistic outcome? We all know the maxim or preparing for the worst and hoping for the best. Yet repeatedly we prepare for the best, hope for the best and then have to rush and panic to deal with the worst that we’ve allowed to happen by doing so.

We could turn the fact that we’re building whole new energy industries into a major bonus, new energy industries, new infrastructure, new jobs!
We could be investing in things like Desertec (http://www.desertec.org/) (I mean in technology like it not the company necessarily) and then reaping the benefits in owning the suppliers of energy to ALL of Europe and Africa. Just like Russia does with it’s gas supplies to Europe, an industry worth many billions of pounds to it’s government.

If something like Desertec ever does happen we’ll just be another customer, we’ll pay, but we won’t earn.

We could be going into these things 100%, whilst accepting that the worst case might not happen, but it’s so bad that we should be preparing for it. We can all hope that it works out just fine, but that’s not what we should be prepared for.

Damn, it did turn into an environment rant.