sâmbătă, 30 august 2008

Rough changes

I find that it's necessary to challenge yourself from time to time.

I recently wrote about the qwerty layout, it's designed to make your fingers move allot because that's what solved an engineering problem with the typewriter patented by Sholes.
The QWERTY keyboard layout was devised and created in the early 1870s by Christopher Sholes, a newspaper editor and printer who lived in Milwaukee.

With the assistance of his friends Carlos Glidden and Samuel W. Soule he built an early writing machine for which a patent application was filed in October 1867.[3] However, Sholes' "Type Writer" had many defects: the printing point was located beneath the paper carriage, and so was invisible to the operator. Consequently, the tendency of the typebars to clash and jam if struck in rapid succession was a particularly serious problem, in that the mishap would only be discovered when the typist raised the carriage to inspect what had been typed.[4]

Sholes struggled for the next six years to perfect his invention, making many trial-and-error rearrangements of the original machine's alphabetical key arrangement in an effort to reduce the frequency of typebar clashes. Eventually he arrived at a four-row, upper case keyboard approaching the modern QWERTY standard. In 1873 Sholes' backer, James Densmore, succeeded in selling manufacturing rights for the Sholes-Glidden "Type Writer" with E. Remington and Sons and within the following few months the keyboard layout was finalised by Remington's mechanics. Their adjustments included placing the "R" key in the place previously allotted to the period mark, thus enabling salesmen to impress customers by pecking out the brand name "TYPE WRITER" from one keyboard row. Vestiges of the original alphabetical layout remained in the "home row" sequence FGHJKL.[4]


But where does that leave us? Computers don't have this problem. Why did we get stuck with this faulty layout? The reason is very obvious most people got so used with it that they just started demanding it. And where there's demand there is also offer ( a really symbiotic relationship ).

Getting back on track.. since I found Colemak to be the nicest and newest layout I started learning it. After 5 years of only QWERTY you can imagine how hard learning to walk on the keyboard again has been. Plus that I don't look at the keyboard so I had to keep a mental representation of this new keyboard.

But although the mental stress was hard after 2 days I was able to write this post ;) so all in all it was a nice experience. Are you reader up for it ?

vineri, 29 august 2008

What Keyboard layout is best suited ?

In school no one told us that there are more than one keyboard layout. The truth is I don't know how many people know this fact.

Right about now you might be wondering what is the point of this post. A friend of mine asked me the other night how did they come to use the QWERTY layout? At time my thought was, what a dumb question to ask? What do I care how they've come to using it. I mean everyone has a QWERTY keyboard.

The question stuck with me, and I decided to do a Google search. Of course the first thing I found was a Wikipedia article: http://en.wikipedia.org/wiki/Qwerty. As it goes it looks like the QWERTY layout was the best layout for typewriters so they wouldn't get stuck. My thought was WTF!!! It looks like after several years of try-and-error Christopher Sholes found a pattern that would suit typewriters. By suit I mean they were ok since you weren't able to write too fast and the printing points wouldn't collide.

Well it looks like since the first computer programs were written on a typewriter later when they had to have a keyboard for more evolved form of typewriters aka the PC they kept this format not because it was the best.. but because everyone got accustomed to it. Hurray for them, bad for us.

Another dude known as Dr. August Dvorak published in 1963 after carefully studying the human hand and the frequency of certain letters came up with a new layout that doesn't require such wide movements of the fingers http://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard.

Now we're taking this is something that resulted after studying certain patterns and that is supposed to increase the speed at which we write.

The latest and probably the greatest layout is Colemak. You can read all you want about it on they're web site. And I strongly encourage you to give it a lot of thought and consideration to this issues especially if you're in the writers bench and if you're interested in improving you're speed.

Also try learning how to write without looking at your keys. It's really easy and you can master it really fast. It's even better if you do this with one of the more advanced layouts.

miercuri, 27 august 2008

Writing meaningfull tests

Recently I came across a post from Phil Haack ( http://haacked.com/archive/2008/08/24/introducing-subspec.aspx ) in wich he talked a bit about Behaviour Driven Development.
After that I reached Dan North's blog (http://dannorth.net/introducing-bdd) and I was sold.



Today I started playing ( instead of working ) with Ninject to see what it was capable of. I have to say I love the site it's really fun. The Docs are also very well thought. After playing with the example a bit and doing testing of course so that I may reach a better understanding of the framework here's what I have :






class NinjaSpec
{
IWarrior _warrior;
IKernel _kernel;
[Specification]
public void TheNinjaShouldBeGivenAShuriken()
{
"There once was a great master".Context(
()=>
{
_kernel = new StandardKernel(new BootstrapModule());
}
);
"Given that the Ninja is Ninject's best range warrior".Do(
() =>
{

_warrior = _kernel.Get<Ninja>();
}
);
"He gave to the Ninja a mighty weapon called shuriken".Assert(
() =>
{
Assert.IsType<Shuriken>(((Ninja)_warrior).Weapon);
}
);
}
}


You tell me now is that something or not. I mean even a child understands what's going on here :D.

marți, 19 august 2008

WTF is wrong with Alt.NET

I was going to visit http://altdotnet.org today. After reading the introduction, very excited I was trying to log in using my blogspot openid.

Surprise "You must use an OpenID persona that specifies a valid email address."

My mind was WTF!!! of course. I've used this in an ever growing number of websites without having problems.

I've seen that I had problems using it on Scott Hanselman's blog also. I'm curios what the reason could be. :(