jbanana: Badly drawn banana (Default)
I've just spent a while playing A Grain of Truth. It's a simple game but well done. Nicely drawn pictures, music that I could have turned off but I didn't want to, a setting that didn't seem contrived even though it was weird. And finally the game play seemed more like storytelling, which worked for me.

So, recommended.

I got frustrated a couple of times but was saved by googling a walkthrough. The first time I'd just missed something (pale circle on a pale background, plus not thinking enough about how to use the things I'd found). The second time it turned out I wasn't stuck at all, if only I'd realised it. Oh, and finding the ending wasn't nearly as hard as I was making it.

Oh dear - there's another one: Teller of Stories. There goes more time...

Edit: ...and a third: Bell's Heart. Finished them all now - can rest!
jbanana: Badly drawn banana (Default)
I've never seen or even heard of the TV programme Crossbones before today. It was about pirates. I can't say if it was any good, but it looks like they put some effort into the set dressing. Here's Yasmine Al Massri sitting on some fancy stuff.
Woman sitting on richly woven rugs
I'm a bit jealous of the photographer. Or maybe not - most of the work was already done before anyone pointed a camera at it.
jbanana: Badly drawn banana (Default)
I wrote about reading binary data formats and I wasn't happy. The other day I had another look and I found Katai which seems to be exactly what I want.

If I ever get around to using it, we'll find out. I have a new thing in mind that this might be good for, and I have parsers for EXIF and Java class files that could do with some love.

Edit: ...or maybe Preon?

Another edit: I was considering writing something to read and write .ico files, which seem to be reasonably well documented.
jbanana: Badly drawn banana (Default)
After looking at photos of real snowflakes, I doodled this.
Snowflake doodle


Feb. 6th, 2017 11:54 pm
jbanana: Badly drawn banana (Default)
I made a thing for doodling symmetrically. Here's one of my attempts. I thought it was a bit Indian looking, but an Indian colleague at work saw it and didn't seem to agree.
jbanana: Badly drawn banana (Default)
Software releases come and go. Today I found something that have been around for quite a while, but was new to me. Plain vanilla Java includes a UI design language, FXML.

This is significant for me because I wrote something very similar, but for Swing instead of JavaFX. Maybe I should abandon that and migrate stuff to FXML. It's a little depressing.

Cycling off

Nov. 2nd, 2016 01:10 pm
jbanana: Badly drawn banana (Default)
I ride a bicycle to the station on my way to work. Yesterday the velcro on my hi-vis jacket came undone, so I was doing that up with my left hand, and I tried to change gear with my right hand, but I pulled the brake lever instead of the gear lever, the front wheel stopped, I teetered a bit, fell, and hit my knee on the ground. Comical, if it hadn't hurt.

Since I've cycled regularly, I think that this is the fifth time I've come off. I've got a metal plate in my arm from one of them, but no permanent damage from the others. I usually ride when it's early, so I may not be that alert. Only one of them happened on the way home.

Obviously I should stop to adjust things. Catching the train is less important than physical safety, and cycling one handed was a contributing factor yesterday.

Also cycling is just riskier. I've never fallen off a car, and accidentally applying a car's brakes still leaves you sitting in the car.

I did once fall off a bus, but that's a different (but equally ridiculous) story.
jbanana: Badly drawn banana (Default)
I was looking at the Shard from my office window. It occurred to me that a tall thin pyramid is a silly shape for a building.

Cuboid volume: length × width × height
Pyramid volume: length × width × height ÷ 3

So the Shard is three times the height it needs to be for its floor space, if only the walls didn't lean inwards.

(OK, not quite, because the top few floors are an empty "spire", but they're small so it doesn't make much difference.)
jbanana: Badly drawn banana (Default)
I posted before about what's wrong with elections. I think that I got it wrong. The real problem is the candidates (and therefore the selection process). Everyone in the world thinks it's mad to let Trump anywhere near an election, but Clinton's approval ratings are poor. So Americans will be choosing between the crazy bloke and the woman they dislike. WTF?

Less distressingly, in the last US presidential election straight people were split down the middle (if we believe the Wikipedia stats) so it was the gay, lesbian and bisexual vote that won Obama a second term.
jbanana: Badly drawn banana (Default)
Some software that I use always switches off the Windows option "Show window contents while dragging". That means that dragging a window just moves an outline, and the window only moves when you drop the outline. That's grim. You can switch this option in Control Panel. That's a bunch of clicks, and it'll get switched back later. Grr!

Siva Mulpuru knows enough Powershell to fix a similar setting (thanks, Google) so I borrowed that code and fixed it up to do what I wanted.
$setwindowsdragfull = @"
using System.Runtime.InteropServices;
public class dragfixer
	[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
	private static extern int SystemParametersInfo (int uAction, int uParam, string lpvParam, int fuWinIni);
	public static void SetDragFullWindows ()
		SystemParametersInfo( 0x0025, 1, "", 0x03 );
Add-Type -TypeDefinition $setwindowsdragfull
Then I had to figure out how to run a Powershell script. This batch file seems to work.
@powershell -executionpolicy bypass -File SetDragFullWindows.ps1
Then I can put an icon somewhere handy and click the annoyance away.
jbanana: Badly drawn banana (Default)
Today I forgot the most important rule of meetings: don't go in to a meeting if you think you might need to pee. Eventually I had to bail, and that never looks good.

Edit: by "bail" I meant "leave the meeting", not "scoop out liquids". Just in case you were wondering.
jbanana: Badly drawn banana (Default)
I got fed up with the font rendering in Vivaldi (shame - nice browser, but stuffed by upstream changes to Chromium).

I used to use SeaMonkey a lot, so I tried that again, and found that I could fix most of its annoyances. The addons I needed were:
  • Adblock Plus

  • Dorando keyconfig (the only way I could find to add a second key that also opens a tab was: "BrowserOpenTab();")

  • Ghostery

  • Mouse Gestures Suite

  • "Shift+LeftClick opens links in a new active tab" (delightfully named)

  • Speed Start

  • Tab Clicking Options (had to hack this one to make it work with the latest SeaMonkey, but only to change the compatibility labelling!)

  • True Full Screen

  • Undo Close Tab Button

  • British English Dictionary

There are still a few things bothering me:
  • Can't put tabs at the bottom

  • Single key shortcuts (can't stop pressing 6 to reset the zoom!)

  • Side bar pops up whenever I search from the right-click menu Edit: in the side bar, you can switch off the search tab!

  • Tab tiling (but I can work round that easily enough)
jbanana: Badly drawn banana (Default)
Here are some people who make me feel good. It's not an exhaustive list.

Click to embiggen
jbanana: Badly drawn banana (Default)
Here are two things that annoy me.
  1. Sometimes someone asks me a question and I answer, but only later it becomes clear that they were really asking something else, which bugs me no end.
    What time is it?
    Half past twelve
    Long pause where they feel hurt that I didn't realise that they wanted us to go for lunch...

  2. Sometimes when I ask a question, it's completely obvious that there's a reason for asking it, so I don't say that part, but the other person completely misses the point.
    What time is it?
    Half past twelve
    Long pause where I feel hurt that they didn't realise that I wanted us to go for lunch...
jbanana: Badly drawn banana (Default)
When Blackberries were popular, people called them Crackberries because the users spent so much time on them. Now that's just phones.
jbanana: Badly drawn banana (Default)
The command prompt in Unix/Linux has always let you do fancy stuff. For example, here's one way to edit all the Java code that contains "someSearchString":
find . -name "*.java" -exec grep -q "someSearchString" '{}' \; -exec someEditor '{}' \;
On Windows, the command prompt is less rubbish than used to be. Here's one way to do the same task:
for /f "tokens=*" %G in ('dir /s /b *.java') do @(find "someSearchString" >nul && someEditor %G)
I like the way that both examples use find but it means something completely different.

Edit: one obvious difference: the *nix version ill search for a regex, but Windows will only do plain text
Bnother edit: simplified the Windows version by redirecting to NUL.
jbanana: Badly drawn banana (Default)
A man near me was sitting doing not much. Suddenly he leaned forward to his bag, took out a belt, and put it on. Why?

Did he think his trousers would fall down when he stood up? He'd got to his seat without mishap.
Did he just like wearing an unnecessary belt? He'd put the belt in his bag instead of round his waist.

When he'd got the belt on, he carried on doing not much.
jbanana: Badly drawn banana (Default)
I prefer web mail, but I'm currently forced to use Outlook, a bizarre and Byzantine behemoth* that frustrates me if I try anything beyond "write message" and "read message". Worst of all is the search, which often doesn't find things that are definitely there, and doesn't understand "quotes means phrase search".

But I found how to make it work: obscure words. I have a long-running email chain with the word "putative" in the subject, and Outlook finds those messages easily and quickly. So when you send a new message, get your thesaurus out.

*Apologies about annoying alliteration.


Mar. 17th, 2016 12:17 pm
jbanana: Badly drawn banana (Default)
I found this on a packet of tea:
The sun streams in through the window. Rain beats down on the roof. Wind rustles through the trees. Or a blanket of snow waits outside.

Whatever you wake up to, pop the kettle on and drink in the day.
Quite poetic for marketing blurb.
jbanana: Badly drawn banana (Default)
I was trying to get my head round Java 8 streams. Here's a typical example:
List<Integer> transactionsIds = transactions.stream()
         .filter(t -> t.getType() == Transaction.GROCERY)
"Get the grocery transactions, largest value first, and tell me their IDs."

So this seems cool, and you can make a stream parallel, so it might be a good way to implement a lot of things.

The lightbulb came on when I realised that you can only apply a predefined set of operations. The thing you're calling methods on is the stream, not the contents. So you might be able to re-write existing code in terms of filter, map, etc. but you can't just drop an existing chunk of code into a stream and get magic.
Page generated Jul. 21st, 2017 04:45 am
Powered by Dreamwidth Studios