The Sint is Coming

We’re ready

flattr this!

My Body is a Filter

This sums me up remarkably accurately

Via JPope

flattr this!

A potential hackage event

Logging onto WordPress earlier today, I was more than a little surprised to discover that my password no longer worked. After a short panic and a password reset, I discovered that someone has managed to grt into the site and create a bunch of (utterly ineffectual, as far as I can tell) user profiles.

I have cleaned up what little mess I could find and it doesn’t look like anything has been seriously compromised. But if you do see anything behaving oddly on here, please let me know so that I can look into it.

Thanks

flattr this!

Using an SQL subselect to insert records into a table: An example

The following bit of code should be reasonably self-explanatory but I was a little surprised to discover that there are no examples of doing this (for IBM i folks, at least) on the interwebnet.

So now there’s one.

insert into ignoreiln                                               
  with
    slsrpt as (select * from ignoreiln where mtyp = 'SLSRPT'), 
    invrpt as (select * from ignoreiln where mtyp = 'INVRPT') 
  select a.mdir, 'INVRPT', a.siln, a.diln, a.riln, 
         a.dept, a.brnd, 'Auto Created' 
  from slsrpt a    
  left outer join invrpt b on b.mdir = a.mdir 
       and b.siln = a.siln and b.diln = a.diln 
       and b.riln = a.riln and b.dept = a.dept 
       and b.brnd = a.brnd 
  where b.siln is null

If you want to know more, I would recommend starting with the IBM i Information Centre.

flattr this!

Pin-up Sunday: Alex Negrea

Alex Negrea is a freelancer and a concept artist working for Gameloft Romania. He has a blog and a Deviant Art page and his fantasy illustrations are nothing short of stunning.

flattr this!

Rediscovering Symbian

My Android phone died on me last week.

More accurately, it has been randomly deciding that the battery must be discharged by now and turning itself off. Having played around with the settings a bit, and even resorting to a factory reset, I have come to conclusion that the problem is probably a faulty battery.

Since I have a new phone on order, I am not particularly inclined to rush out and replace the battery for the current phone. So, as a stopgap, I have dug out my old Nokia N72.

Not having used a Symbian phone for a while, it took me a few moments to find where everything was but it was surprisingly easy to get used to the interface again. Part of this may be related to the that I moved some of the applications around to better fit my quirks when I was last using this phone. Configurability is good as good, though, and it’s also rather nice to find that I have a file manager by default rather than having to go and look for one.

The form-factor has also proved to be remarkably resilient. The N72 is a candy-bar phone with a sliding cover to protect the camera. Four years ago, this cover struck me as being a bit flimsy but, compared to the not-quite-tablet experience that the typical Android phone gives you, the N72 does feel remarkably well constructed. It’s not heavy, but it is solid, compact and lets you know that this is a phone that can take a bit of a battering without too much trouble.

And then there’s the battery life. I have been playing around with this phone for the best part of a week and am still nowhere near needing to plug it back into a charger. Not only is it quite relaxing to not have to be constantly monitoring the battery status but this also brings home just how much of a resource hog Android can be.

I have no plans to permanently abandon Android, but I will certainly be keeping this phone around in case of emergency. Having a phone that you can charge up after completely ignoring it for almost half a decade, and rely on it just working is really rather reassuring.

In their time, Nokia made some very good phones. Symbian is not perfect but I can’t help but feel that if the company’s management had put more resources into developing phones and less effort into Dilbertesque organisational silliness the smartphone landscape today would be both very different and a lot healthier.

flattr this!

Alternatively, get a better text editor

I’m not a huge fan of UltraEdit, but we have to work with what we are given. And what I have been given is a test editor that keeps on creating backup files every time I hit the save button. This may be useful to some people but, for me, it is just annoying.

However, it’s also pretty easy to switch off. Go to Advanced > Configuration > File Handling > Backup and select No Backup.

And now your folder is decrapified.

flattr this!

I don’t believe it!

I had a Victor Meldrew moment this weekend while looking at a Toy catalogue with Macsen. It turns out that you can now buy a scoop to pick up snow, a mould to form it into a snowball and a launcher to fire the snowball at someone. The catalogue in question was on paper, and the associated webite was unlinkably awful, but the same toys can be found on Amazon.

What’s wrong with picking up a handful of snow and lobbing it?

I mentioned this briefly on Quitter, but the advert also reminded me of an article I saw on the BBC last week: Are children given too many toys?

Psychologist Oliver James, author of the parenting book Love Bombing, believes children don’t “need” a vast panoply of toys.

“Most children need a transition object,” said James, “their first teddy bear that they take everywhere. But everything else is a socially generated want.”

This strikes me as very true. Certainly, my own kids have no shortage of toys and most of these end up left in boxes – ignored and then forgotten. They do each have their favourite toys and it is this limited subset of the available options that they keep returning to.

And, truth be told, more fun for all can be achieved by handing them a tool (be it a broom, a rake or whatever else happens to be seasonally appropriate) and making sure that they are able to help with whatever I happen to be doing.

Obviously there is a balance to be struck here and I am not about to embark on some sort of anti-toy crusade. Equally, though, if you have considered buying some over-priced replacement for an over-arm throw, one that is only going to be usable for about one week in 52, then your kids have too many toys.

flattr this!

Comparing exponentials with logarithms

Project Euler problem 99 is as follows:

Comparing two numbers written in index form like 211 and 37 is not difficult, as any calculator would confirm that 211 = 2048 < 37 = 2187.

However, confirming that 632382518061 < 519432525806 would be much more difficult, as both numbers contain over three million digits.

Using base_exp.txt, a 22K text file containing one thousand lines with a base/exponent pair on each line, determine which line number has the greatest numerical value.

This had me stumped for a while because, as far as I could find, there is simply no realistic way of calculating the large exponentials in the list. And then I learned something:

log(xy) = ylog(x)

And once you know that, finding the solution is very easy indeed.

flattr this!