Thursday, October 10, 2013

Would Be Nices

I'll just jot it down, expansion later.
- personally owned personal data. 
- mobile phone integration. 
- (open) standards for the above. 


Thursday, April 11, 2013

Screaming Architecture, Is That...

Screaming Architecture, is that when your project top folder structure looks like:



SRC/
  MAIN/
    JAVA/
  TEST/


Ok, joke, HA-HA. No, I really deeply sympathize with the idea.

Related thoughts: I have a friend who's very much into asian culture; he made an interesting argument that chinese signs/characters are far superior to our 'western' characters rooted in sound: the signs remain much more interpretable across time. It must be true, basically, although I believe it's not as true or simple as one might first think. So these characters must then be more 'screaming' than our own, essentially arbitrary encoding, in the sense discussed here. Too bad they don't have upper case.


Inherently Polyglot

This blog has been turning into a link blog lately. It's tempting to post some links just to keep posting something at all. I hope any damage from the last two isn't lasting.

It's mostly to do with the fact that fleshing out ideas from the long list of un-fleshed-out ideas is work, time, effort; and the amounts are uncertain. But this one seems quick enough to write down... [Turned out not to be.]

I've often joked about Java development being not one language, but, like, five or six; depends heavily on style of course:
(*) Java.
(*) Xml. Gotta have xml. A universe of DSLs to follow.
(*) Annotations; new in 1.5. The basis for numerous small 'DSLs'.
(*) Property files. Very simple 'language'.

The list grows with tools often used:
(*) IDE .classpath (XML!).
(*) Ant, Maven, etc (XML), or other build language.

Frameworks:
(*) EL -- expression language.
and so on.

I believe that this is a big burden of added complexity.

Now, the Point: what kind of problems are what you might call 'inherently polyglot'? The idea is of course inspired by the idea of 'inherent complexity'. Perhaps: what kind of problems inherently call for using multiple languages, as opposed to trying to adapt the use of your old, crusty one? What kind of things do you not want to do in only the main language used? Is it not really that the main language is too weak? Too verbose? Too non-declarative? Or just a tools issue?

Should one always start using a LISP type language, just in case one feels the need for more languages?

Ok, that'll have to do. I'm leaning towards the conclusion that it's not that useful as a concept. It's more to do with what the existing language is like, and what you think it cannot do, and what the tools situation is like, who the users are, things like that.

Soon, maybe: on the added costs and problems of extra languages. Now I can post two link posts, maybe.

Wednesday, March 27, 2013

Quote On Programmers [Quote][Link]

http://blog.michellebu.com/2013/03/21-nested-callbacks/
(I gathered from these exchanges that programmers have a perpetual competition to see who can claim the most things as 'simple.')

Monday, March 4, 2013

Stop And Go

I've had a rather annoying problem lately, going on like 18 months or so: there is some 'logic' error with the 'video' subunit on my laptop. The screen will suddenly go black, rather randomly, but sometimes many times in close succession, sometimes already on boot. There's nothing to do but hold down the on/off key to force a reboot.

Anyway, I can live with it. I should turn in the laptop; as I heard, Apple are good when it comes to this kind of customer service. I just don't want to go without it for the time it takes to replace whatever part it is that needs replacement.

Mostly by association to the concept of interruption, this annoyance has led me to some rumination in the field of computing philosophy -- let's pretend there is such a field of study..."well, now there is". The thoughts regard incremental computing.

Now, all computing is incremental, in a lesser sense. What makes progress, and thus what one usually means by incremental, is the saving of results 'so far', so that, if the task is interrupted, one can return to the task, and earlier work is not lost -- making progress possible in the face of interruptions.

This is a very important concept, when you philosophize on it. Threads: imagine if state was thrown away each time the CPU was taken away from it. In such a world, there is no progress until a thread is allowed to run uninterrupted to the end.

When there is unreliable hardware involved -- when isn't that the case? -- the level of incremental processing must follow suit. One can simply multiply reliability and incrementality to get the rate of progress. If we go an incremental distance of 10, say, and we have a reliability of 50% (there is a 50% chance that this incremental step makes it to the end and is committed), we will get an average rate of progress of 5. Very simple. Mix in units of time if you like.

But another way to express the 50% reliability, if the distance is composed of two steps, is that each step has around a 0.71 chance of making progress. So if we could 'save' twice as often, rate of progress goes up by 0.71/0.50 == 40%, nice.

---

Now, what does this have to do with the lapsing toppler? Well, actually, it's mostly that it started this philosophization, some thought about progress being slower when you have this kind of interruptions.

But the slowness in this concrete case is actually dominated by other factors: the time to restore state to where you were. Most of the important state is actually saved; pressing save often by habit or relying on non-manual autosave.

What takes time to restart, is: boot (only like 7 seconds), restarting Eclipse (varies, 5 to 20 seconds), sometimes there is a background reindexing of the Spotlight database (serious slowdown). But the worst drag is that Eclipse almost always needs to rebuild everything (one minute or two).

The case may be even worse: you might have a project setup that requires much more on each reboot. Just some totally random examples...you might have setup which requires you to start two instances of Eclipse, one for Python and one for Java. You might have to start an old JBoss 5.1 server (avg 1m 40s, ISTR). And you might have to click a button to start a MySQL database server. And do a rebuild and deploy. Just a purely random example.

We're now wandering into the psychology department: what's the restart time of your mental state? And how much of the state was saved? And how much does human frustration add, if you're human? Add those factors to the above mentioned project restart times to determine how much time is lost every time your computer has to be rebooted.

So a crashing computer can be good teacher in that it pretty much forces you to fix a bad project setup, even when you don't really feel you have the time. Which is of course short-sighted, in and of itself.

---

I had some more thoughts that tie into this incrementality theme, but I feel it's time to Publish, so maybe later.

Sunday, March 3, 2013

Motivation Is the Subject Again

Yep, it would be good to flog this horse till it dies, pardon the imagery. If I ever had a wish, it was to have a working motivation. But it's nearly always been fatally broken. One of few exceptions I can remember a few months back where I worked for a week or so, and perhaps ten hours a day, with great concentration throughout.

---

Sorry -- in the name of the God of timely blogging, whatever, time to Publish.

---

Oh, right, this is what prompted this post about motivation:
http://ask.slashdot.org/story/13/03/03/0029244/ask-slashdot-software-to-help-stay-on-task
It is a request for suggestions of a technical (software) solution to a motivational problem. But the comments branch out from there, of course, some of them are interesting, and heterogeneous comments like that are an excellent starting point for developing you own viewpoints.

Friday, March 1, 2013

Motivation Mechanics

Yay, motivation post.

Here's an attempt to dissect motivational issues: "task resistance" from the task at hand (whatever that is), or is it the other "mental ambience resistance" (need a better term here), where you're sort of worried that you're doing the wrong thing?

The first kind: "Oh god I don't like this technology. Oh god the tools are slow. This is probably the wrong way to do this. My mind is deadlocking. Etcetera. ". Possibly also "Oh, god this is boring" although I don't personally find that much of a problem. If it's boring, it's good. It's when it's mentally challenging, but does not feel "right" or feels "ugly" technically; when the sweat-bucks cost more than the 'bang' warrants.

The second kind: a usually vague sense of guilt or insecurity. "Should I not be doing something else?" This can lead to: 1) thinking about what that "something else" might be. 2) Subconsciously "this is something else, and it might be useful, therefore I shall do it": eating, reading news, etc. Also second kind, but this could be motivational too: Will I/we get this done on time? Is there any hope of meeting the deadline?

Well, that could be restructured; I could make a list of these things and then classify, that's probably better. Or maybe it's been done, I'll google a little.

---

Well, I found this: http://www.softwarebyrob.com/2006/10/31/nine-things-developers-want-more-than-money/, which is good because I've been thinking about that too -- external motivational factors, but it's not what I was looking for right now. I am looking for something on subjective patterns, phenomenology may be the word. Well there will be objective aspects connected to the subjective patterns, of course.

---

Ok, time.

Pointless Hello

Like it says: pointless. Externally pointless, internally pointed. It's just to bring down the pre-post fuss or anxiety level.

You see, a life (heh) of inappropriately elevated ambitions needs to end. I think a trick might be to do consciously not-very-good things. Instead of no things, or bad things, inadvertently. And blog posts are a cheap material and nobody cares about them enough, so nobody gets hurt. So here we go.

I hope this post turns out really not-that-good. How am I doing?

(I'll tell you how I am doing on my end: I've only looked through the text like three times, only one time reviewing it in its entirety. Oops, two times.)

Thursday, February 28, 2013

Worse Is Better

You all know or ought to know about the classic 'Worse Is Better', go look up if need be. Now, imagine the 'Worse Is Better' thinking applied to blogging, and think of this blog post as a sort of apology for the lowered standards for coming blog posts; and the fact that they will be much shorter. Which might be a good thing.

Now that I look it up, it seems 'Worse Is Better' is more about 'software acceptance', and not so much about the internal process of an author being over-particular about what sort of content is acceptable to release. So you see, holding back and reviewing may at least find errors. But the point holds: if you fuss too much about your publications, they don't happen.

The above applies to software too. But it is probably the case that bad software is much more damaging to the state of the world than a witless blog post. I don't know. Anyway, hereby declare the intention to never meekly 'Save' instead of 'Publish'. Better trimming your message than holding it back.

--

http://en.wikipedia.org/wiki/Worse_is_better

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.

Thursday, January 3, 2013

CSS Position Absolutely Got Better?!

Very odd, now "position: absolute" with both top and bottom (or right and left) works to affect layout! At least in Webkit browsers. Chrome and Safari.

Do you folks know what that means? Sane layout is now possible using CSS. And so, 2013 is looking to be a great new year already.

Unbelievable: Progress!

Chrome snapshot:



Imagine resizing and having the layout follow suit perfectly.

But not in Firefox. See how it falls -- wait for it -- flat:



Seems that the vertical layout just collapses.

Worth noting: I've never seen any documentation say that it should not work, i.e no wording like "but if you apply both left and right, or both top and bottom, results are undefined". But I haven't really read the spec.

So, when did this happen, recent Christmas?


------ update -----

Firefox 17: no change.
(Oh I wasn't quite up-to-date...)
Firefox 18: no change.