Wednesday, June 10, 2009

Migration

Hi, just letting every know I've moved my blog to the URL below:

http://twicetwice.net/blog/

I'm going to be abandoning this one so it should be safe to unsubscribe this feed from your RSS reader.

Tuesday, April 7, 2009

Interesting use of c-clamp design

Got forwarded a link today to The Big Mouth Project and noticed a nice variation of the c-clamp design (header at the top, body "clamped" in the middle, and the footer clamping it all together).

When the page first loads, the clamp is closed



Once the content finishes loading, the clamp expands



And expands



Nice.

Sunday, April 5, 2009

Java Instance Initializers

I've always been aware of java static initializers, and have been quite comfortable around them
public class Foo {
private static final Map<String, Object> CACHE;
static {
CACHE = new HashMap<String,Object>();
CACHE.put("foo", new Object());
CACHE.put("bar", new Object());
}
}
But I saw this the other day
public class Foo {
private final List<String> emailAddresses;
{
emailAddresses = new ArrayList<String>();
emailAddresses.add("foo@bar.com");
}
}

Did some research and looks like an instance initializer, which is just like a static initializer except is run every time an instance of the class is created.

Very useful if there are multiple constructors for a class, and you don't want to keep running the same initialization code over and over again.

Some interesting examples here

e-texteditor gone open source

It appears that my favourite text editor has gone open source!?

Not entirely sure what this means for the future of e-texteditor but hopefully this will mean the company will release updates more often than once every 6 months!

Saturday, March 7, 2009

A weekend without the iPhone

So just for the hell of it I decided to switch back to my old Nokia 6500 Classic on the weekend, to see if I could really live without the iPhone, which I've come to rely on as my phone, MP3 player, and portable map (Google Maps).



I think I did pretty well, but after the weekend was over I was glad the switch was only for the weekend, and not for the reasons I thought.

The two surprising things I couldn't live without were:
  1. Threaded txting
  2. Full sized qwerty keyboard



I guess I knew in the back of my mind how useful threaded txting was, but it wasn't until I had to switch back to non-threaded txting that I realised just how much easier it was to keep the thread of the txt conversation going without having to constantly switch between the inbox and sent items.

The full sized keyboard I've found (even though it's virtual) is infinitely faster to type on than a numeric keypad, and the best thing is when typing out the txt, the threaded txt history is still visible.



An added bonus is that because the entire screen is touch, going back and correcting mistakes is just a touch away (as oppose to multiple taps on the arrow keys).

A few little things which I liked about going back to the 6500 classic though:

It's slimmer, lighter, and just better for pocket dynamics. And you also don't look like a dork putting the phone to your ear when making a phone call.

I don't miss the MP3 player or mapping application that much. I thought I would miss the maps, but I always knew where I was headed, and to be honest, it was almost always a comfort thing to load up my current location and make sure I was on the right track.

Of course, checking Facebook, twitter and going through RSS feeds is also a comfort thing, but to be honest I've been finding myself a exhausted checking up on everything lately, and sometimes it's best to take some time out and do nothing.

Oh and the best thing is that because my MP3 player and phone aren't the same device, I can play music in the other room AND not have a phone call / txt interrupt music play and force me to go into the other room :)

Wednesday, February 18, 2009

Skype workflow

I complained, a couple weeks ago, about Skype's new single window layout (a stealth implementation of MDI?) and have managed to find a suitable workflow that makes me quite happy with the new interface.

First, I bound Skype to a hot key (in this case, windows-s) so when I hit windows-s, it brings up / hides the Skype single window



With the single Skype window open, the cursor automatically is placed in the input field, so I can continue my prior conversation without the need of a mouse.  If I'd like to switch conversations, I hit the alt-2 hot key



Which focuses the conversations panel (on the LHS).  Using the arrow keys I can highlight exisiting converations that I've had, and using enter I can select it.



Once selected, the cursor is then placed in the text input field and I can continue away.  When I am done, I hit windows-s and the Skype window vanishes again, along with all my ongoing conversations (which wasn't really something I could do with the multi window version).  And all this without the need of a mouse!

Bonus tip, alt-1 focuses the contacts panel on the LHS, and using the cursor keys and the enter key, can start a conversation like the workflow above.

Sunday, February 8, 2009

Decaying crowd sourced data

I love Urban Dictionary, and one of the best things about it is that (unlike a wiki) everyone gets to write an entire, unedited definition, and that entry gets voted up or down as a whole.


There is no "designed by committee" definition and the best definitions rise to the top in their entirety.

The disadvantage of the voting system though is, if a definition is written soon enough, it will float to the top and because of the ease of voting (no page reloads, no logins, etc) it can stay at the top for a very long time. Whereas a (potentially) good definition which is written much later, may never even get a chance of floating to the top ever.

To compare, Google does something similar where the voting isn't done directly by users, but in the form of PageRank (which is how many sites link to the page). Again, if a page is created on a topic early enough, and enough pages link to it to begin with, that page can maintain their high PageRank for a very long time.

The problem with this is say there is a page written about bug XYZ for a product and (at the time the page was written) there was no available fix for XYZ. The PageRank for that page would increase because everyone would be complaining about it and linking to the page as reference.

If in 3 months time though, a fix was created and a new page popped up, searching for XYZ in Google would still yield the same result of "there is no fix" instead of to the new page where the fix was released, because the PageRank of the original page would be so high.

StackOverflow is a combination wiki and vote system, and the main reason that it was created was to avoid the the problem above. I.e. a user posts a topic "I found bug XYZ, is there a fix" which Google would then link to it. For the first 3 months that answer would yield the "no there is no fix" but then once the fix was released (theoritically) the new answer would be posted which says "oh yes here is the fix" and the answer would rise to the top in the StackOverflow page.

As far as I can see, this can only occur in 2 scenarios:
  1. If there are a small enough number of answers that when the fix is posted, people will see it and vote it up
  2. The person who wrote the original question is paying attention to the question and is active enough log into StackOverflow and accept the answer
The 1st scenario again suffers from the original problem I'm talking about, and the 2nd scenario suffers from regular human nature.

Instead I think what should happen with crowd sourced information like this is to create some kind of decay so that good definitions would have to be consistantly good (i.e. they would have to be voted up often) to stay at the top, and newer definitions have a chance to rise.

I'm sure this concept isn't new, and maybe Google already does something like this, but still I wonder if this can be applied to other sites which rely on crowd sourced data I.e. Wikipedia, YouTube, Flickr, Facebook, etc?

About Me

My Photo
Melbourne, VIC, Australia
Jerrold is a recently migrated Melbourne based software engineer with roughly 5 years experience developing in Java and the web technology stack (HTML, CSS, DOM, JavaScript, etc). More recently, he's started developing in Python (well, Jython, but close enough) and is unsure if it's flaws outweigh its advantages of having a more sugary syntax. He is currently working at a small South Melbourne based company which specialises in sales incentive management / reporting software, and is being schooled in the finer points of small company operations.