Thursday, February 28, 2013

Motivation

Will this be the day that I manage to keep motivated all the way through a blog post about motivation? Well, instead of relying on luck, which all of us rationalists know is not a good idea, how about I use a little trick: post now, see you later. And maybe this might be an illustration of why incremental algorithms are generally a win. And why humility-based strategies usually win over ones based in pride. Whatever. So, see you later, don't know where, don't know when, possibly in the continuation of this post, or in another article on this humble blog.

Monday, February 25, 2013

Eclipse+Maven Wimper

Yep, Eclipse + Maven again. The horror, the suckage, the demoralization. "Importing Maven projects (Cancel Requested)" again. What. Is. It. Doing? Why. Doesn't. It. Cancel? Although. There. Is. No. Network. Activity? Make It Stop. Or. Please. Kill. Me.

(Update: solution found, see below.)

---

Oh, this is a new one: since the import didn't succeed, it seems the project wasn't added to the project list; as was apparent after restarting the Eclipse. But the pom.xml was still open. Though not quite; get this: it seems unable to show me the source code without the project. Well, possibly because that's the last 'tab', and maybe if one of the earlier (more to the left) tabs fails to load, it doesn't try the rest of the tabs.

And how about this error: "Can't load model L/backend-core-jar/pom.xml". What's an 'L'?

---

Ok, so another repugnant E&M episode has been overcome. Solution: commented out a repository that one might suspect does not work so well any more.

Now, it would be nice to be able to run a check to see if the project can now be imported with this repository removed, but without re-running the whole maven download process.

Friday, February 22, 2013

Saved By Recent Item

Wow, one month since last post. Thought I'd use some of the extra time I've got on my hands to post stuff. Wrong.

Anyway, here's a simple story to blog about a small recent computing incident... I had managed to fill up the startup disk. I had mostly ignored the OSX warnings, though I did some half-hearted attempt to free up some space by deleting the low-hanging crud.

But the other day the warnings turned out to having been warranted. Login failed to start the Dock; and also didn't start finder. Which makes you pretty restricted.

Mysteriously, logging in managed to slowly launch a Chrome process. Weird, I don't have it set to open on login, and it doesn't normally do that, but this weirdness saved my bacon. Although surfing was not possible since the network wouldn't work at all, which is weird. Which, by the way, made the system updater report the lie that there were 'no changes', after a couple minutes.

Now, how did Chrome manage to save me? Well, it was not Chrome per se, but the system menu accompanying an open app. Chrome was the only open app. No finder, no cmd-tab app switcher. In the system menu, there is the "Recent Items" submenu, with an Applications section in it. And there it was, the bacon-saver: Teminal.

So, using a Terminal session to clean the start disk leaving upwards of 1GB, after a logout and login everything was back to normal.

Learnings: launch terminal now and then, to keep it available in the Recent Items. Or heed the OSX warnings and free up enough space to be able to log in. Or perhaps one can make Terminal start during startup.

Or perhaps this idea might work: always keep a file of some size, perhaps 100MB will be enough, in the tmp/ folder. It should be deleted during system boot, which should free that amount of disk space. But creating it in a login script might offset the purpose.

Of course, the real fix is to have Dock not require disk space to start up. Or make the OSX low-on-disk-space warning explain what might happen if you don't act -- that'd scared me into action, for one.

Sunday, January 20, 2013

Juno Again

Trying my Eclipse Juno again. What caused this adventurousness is that I discovered that my old Eclipse didn't support 'Refresh on Access' (which is when a file has changed on disk, and not in the editor, so you can simply update the editor copy to match the version on disk).

I have the following message of hope: if you switch Project Explorer's presentation from 'Flat' to 'Hierarchical', and you get beach-balled, don't kill it; instead keep your hopes up, go write a blog post, get some coffe, tell Juno to text you when it's done. It can take a few minutes.

Friday, January 18, 2013

Mysterious Chrome Websocket Connect Delay

Again, suddenly your Chrome browser stops connecting a WebSocket, or to be precise, it won't connect it immediately.

These the loveliest of errors, the ones without feedback. There is nothing to go on, no clues to debug. So instead, you irrationally suspect your own code (it hasn't changed). You revert changes to code you did, re-run, un-revert them, re-run, etcetera, swearing.

Luckily for you, this happened before, which helps debugging stuff where there is pretty much no clue what so ever. Takes some time, though, until you feel that deja-vu all over again. So now you wait longer each time before declaring a failure, and sure enough, as you remembered, after a minute or so, the connection succeeds. 

The malady is that you're having a Chrome extension, taking that minute or so to run. I would guess that this is caused by its not being able to connect, or something like that. Maybe a server is down. Maybe the minute-or-so is the time-out. Maybe the connections or failed connection attempts add up to precisely this minute-or-so. Anyhow.

So you disable the extension. (At "chrome://extensions/".) Mysterious delay, no more. That's what you do the first time.

The second time, you delete the JetBrains Chrome Extension. Why did you keep it after the evaluation period expired, anyway? There is even the cutest little animation of the trashcan lid ajarring. Awww.

...I don't know how it suddenly got reenabled. Or if it got reenabled, but worked fine, only to fail later, i.e. just now. Maybe Chrome somehow restored older settings during the frequent crashes I subject it to. 

Wednesday, January 16, 2013

Quantized Keyboards?

I have before me a Logitech K120, purchased recently because the alt key of the last keyboard gave up and handed in its resignation.

I just seemed to notice something peculiar. And annoying, if true: the keypresses seem to be 'quantized'[1]! Noticed this oddity after something between the spelling center of my brain and the text editor repeatedly failed to spell "Gui". It instead preferred "Giu".

First I suspected that somehow the typing style I use made the I key get depressed before the U key. But after some experimentation, I found the following repeatable behavior: "ui", and "mn", when hit together, for instance by effectively creating a very wide finger out of two of your ten favorite little servants, always produce "iu" and "mn", instead of a mix of both! And there are probably other 'inversion-prone' pairs, but I am just not that interested...

Maybe there is a probe pulse frequency of perhaps 100Hz? Or perhaps it's something in how the keyboard decides to send the detected keys over the USB cable. Well, at least now I know: keyboards aren't created equal. This was a pretty cheap one, though it feels pretty solid.

Maybe I should try to learn a more disciplined, proper touch typing, instead of the 70% touch, 40% two-or-three-key harpeggios, and 10% backspace+retype I use now.

[1] http://en.wikipedia.org/wiki/Quantization_(music)

Sunday, January 13, 2013

Upcoming?

This'll be a first status post, just so I post at least something today. I've written two or three drafts of a sort of status posts already, not quite right. The point would be to look ahead, and promise to post something. Or at least lay out some possible future titles, or give a direction. So that I may eventually come to do it.

The direction will be more of things not written much about so far: project & software architecture, philosophy (todo: find a better word), sociology, psychology, management (better word?).

I've made up some titles. They are in varying levels of drafting. Let's see...

Uncertainty Is Kryptonite
The Fog of Development
Recreational Downtime
When Is It Fun?
Estimagination
Findability in Project
No Code Is an Island (May become 'no language ...')
Remuneration Paradox
Is Happiness Necessary for Productivity?
Risk Sharing
Polyglot: Hot Or Not
Ideal Circumstances
Maximum Project Size
The Right Way

That's the new kind of posts. There'll probably also be some that are closer to the old kind...but better. Drafts:

List of Coding Habits I Have That Might Seem Odd
What I Worry About When Coding
How To Stop Worrying And Love Maven (Note: title is half lie, half wrong.)
The Eclipse Super-Flaw

Anyway, got to stop now. No promises. Later.