Typing speed update
I’m still on Dvorak. I guess that’s really the big news, because it has been occasionally infuriating that I can’t get words onto “paper” as fast as I think. But the more I get mad at this shortcoming, the more I’m reminded of how great it is to be a fast typist, and that’s tho whole goal here.
I have taken the labels off five keys now, returning to their glorious and blank Das Keyboard state. I’m also still working on TypingHero, my Flex app that’s supposed to make it fun to type faster. Gabe helped me out over the weekend to improve the wiring of my mxml views to their backing controller classes. It’s great to work with true components, but it’s frustrating that using best practices in Flex is so contrary to the examples and sometimes the language makes it awkward.
Sadly my speed has leveled out over this month, and is stuck at half my QWERTY speed…
1/7
Net Speed: 33 WPM
Accuracy: 97%
Gross Speed: 34 WPM
1/21
Net Speed: 33 WPM
Accuracy: 97%
Gross Speed: 34 WPM
I’ll get a more useful and fun version of TypingHero soon, and of course I’ll speed up my typing considerably using it. Of course!
Typing Heroism
I’m now two weeks into the post-qwerty period of my life. To celebrate, I subjected my laptop to the switch:
The paper clip method worked very nicely and never made me feel like I might break anything.
I feel a slight desire to proselytize. I’m not going to knock on doors with a book of mormon, but I would like to be scientific about gathering evidence to make my case.
Before the switch, I was pretty fast on qwerty:
typingtest.com – default settings, Zebras
Accuracy: 94%
Gross Speed: 58 WPM
Irrational side of…:
Accuracy: 96%
Gross Speed: 65 WPM
Then I changed keys, and my last blog post was 407 words in about an hour:
week 0:
6.8 wpm
Only 10 times slower… but I would forget the end of my sentences by the time I got there.
week 2
Accuracy: 100%
Gross Speed: 27 WPM
So now I’m up to half my original speed. This doesn’t exactly make the case, but I’m getting there.
I also made a quick Flash version of the typing lesson I’ve been working through, and would like to make a real game out of it. It’s at TypingHero.com.
Switching to Dvorak, or, the slowest typing ever
4:45 PM
It all started when I spilled some Guinness in my Apple keyboard a couple months ago. I tried to clean it up quickly, but after it dried, a couple keys didn’t work. I ran it through the dishwasher, I heard that can work on NPR, but although it came out clean as new, the bad keys were still on vacation.
After moving around the corner in my building I pulled the keyboard out again and decided to take another shot at repairs. I discovered that the keys pop out really easily, there’s a simple center post and two snappy clips. It was so much fun to pop out the keys that even though only Caps lock, Tab, and tilde are broken, I ended up with this:
So what would you do in this situation? Once all the keys are in a pile, it’s a perfect time to make some changes instead of putting them back in those lame places they started in. The name for those lame places is the QWERTY keybard layout. (Ironic how long it took me to type QWERTY…)
wikipedia:
[O]nce an operator had learned to type at speed, the bars attached to letters that lay close together on the keyboard became entangled with one another, forcing the typist to manually unstick the typebars, and also frequently blotting the document. A business associate of Sholes, James Densmore, suggested splitting up keys for letters commonly used together to speed up typing by preventing common pairs of typebars from striking the platen at the same time and sticking together. The effect this rearrangement of letters had on maximum typing speed is a disputed issue. Some sources assert that the QWERTY layout was designed to slow down typing speed to further reduce jamming.
So while QWERTY wasnt designed to be the slowest layout, it does try to help the typewriter deal with fast typers, and as a result, it is a slow and antiquated system that has become a anachronistic standard at best. Why do people still use it? Plainly, it is already on the keyboard, and people want to do what’s familiar. Maybe they don’t want to question common wisdom and norms. And sure, once you learn it, you can be pretty fast.
Programmers do like to question norms of course. And sometimes do wildly impractical projects, like using the fastest layout, Dvorak:
Once I had the keys in place, it took 10 seconds to switch keyboard layouts in OS X. Windows makes it easy too… you can probably find the tempting Dvorak option on your machine right now. Don’t you want to click it, and ditch that lame layout from the 1800’s? Look at the metrics, and imagine yourself Instantly typing 40% faster!
So that last claim is a bold lie. I’ve now spent almost an hour typing this, which is completely infuriating, so I’m going to get dinner. Check back in a week or two to see how long I can make myself do this.
(did I mention I’ve tried twice before?)
5:45 PM
IntelliJ IDEA, week 1
I switched from eclipse to IDEA about a week ago, mostly due to prompting from jkuhnert. I feel like making a Borat reference: “Verry niiiice.”
If I start getting preachy about IDEA, I’ll have to back it up with real reasons why it is good, so here are my favorites. Mind you, I’m just learning things as I stumble upon them, and I’m no expert yet – but maybe these are some things you can look forward to in that crucial week 1… that time when you throw away most new tools you try.
First, the obvious things – it’s streamlined for common developer tasks, doesn’t try to compile your whole project all the time, and comes with most of the stuff you need, instead of giving you the pleasure of choosing the right plugins.
Keyboard shortcuts. I’ve had “learn more keyboard shortcuts” on my list for a while, because when it comes to raw productivity, you want to be able to do things in the computer at a similar speed to what happens in your brain. The mouse is fine up to a certain speed, but it hits a wall. Learning keyboard shortcuts, on the other hand, is an investment like making yourself touch-type, you can keep getting faster. IDEA really makes it possible to do away with the mouse. And, they are great about putting keymap hints on the UI, as well as providing a nice cheatsheet
The changelist feature. We are always somewhere between an svn update and an svn commit, and every change we make ends up in a list when commit time rolls around. Most of the time, I don’t have a nice clean changeset to commit, because I’ve made some other changes that belong with each other, or I don’t want to promote to version control. IDEA shows you that list of changes all the time, instead of at commit time, and lets you push those changes into different changelists as you go. It’s really consistent, too, with the diff viewer open you can flip back and forth through your changes and move them to changelists there too. Howard Lewis Ship blogged about this one. Although duck_typer has a good point – you can just have multiple working copies of the project, and use one for each set of changes. That way if you touch the same file in two changesets, you’re still ok.
The UI Layout. I actually have problems reading the text in eclipse, which makes me feel old. You can force some text size changes, but things like the navigator panel and tab titles were always annoying. For some reason, the swing UI in IDEA has nicer fonts, a more comfortable layout, and seems more responsive. (yeah, most things are more responsive than eclipse)
Anyway, those probably won’t be my favorite features in a few months, but they’re making me happy for now.
Dear Al Gore:
We still haven’t shown people that global warming matters to them in a real, present way. And they’re not going to take action until it gets bumped a little higher on their subconscious priority list.
Let’s make a cartoon short, showing the changing of the seasons in 100 or 200 years. Maybe there are some trees that stay fixed throughout the cartoon, and we start with fall when they drop their leaves quickly. Then there’s a wet, sloppy winter with occasional deep freeze spells. Spring rolls around and there’s some chirping of birds and little green sprouts sprouting. And then summer arrives, with the distorted optics of heat from the oven, and burning, screaming children running by.
It’s a little grotesque, but you can do that in cartoons – Southpark has demonstrated that.
Android!
For those who don’t know (somehow), Google has acquired and released their platform for “iPhone killer” phones. It’s called android. Seems like this is a good chance to practice building phone apps, especially since it doesn’t involve learning Objective C.
I think it could be a fun way to spend the day-after-Thanksgiving. Also, please enjoy my requisite self-referential pic of the new phone, like I did for the iPhone.
Irony
I was opening this DVD late one night, and as you might expect, I was very excited to see Owen Wilson in a war movie. Turned out to be an awesome movie.
The packaging, on the other hand, was un-awesome. I don’t open a lot of DVDs, since the movie fairy drops things in my computer from time to time. The amount of work I am forced to do, just to open something I purchased, is insane. The cellophane is shrunk-wrapped in such a way that there’s no handhold to get the tearing process started. Then, these serious stickers are on THREE sides of the case before it can be opened.
So, the irony is that the security device is “enclosed”. Is stealing DVD’s really such a giant problem? It’s hard to imagine that I could open all this packaging in less than 3 minutes and steal the disc out of it. Maybe the enclosed security device is an RFID that can get picked up at the front door.
But, just like the classic joke about the best contraception for trumpet players*, what this DVD packaging really does is make me less likely to buy something so unpleasant to own. Even once I get this disc in the player, I’ll have to wait for whatever junk at the beginning that’s flagged as “non-fast-forward-or-jump-to-menu-able”. When you compare this experience to my alternative, it’s just silly that someone would pay more for something of significantly less value.
* (their personalities)
Use Hibernate narrowly!
Hibernate is a good library. Sure — I first loved it too much, as many of us have. At first, it seems to be the magical solution to the whole persistence layer, probably the most complicated and potentially troubling part of an application.
In the first stage of falling out of love with Hibernate, you discover that there are some aspects of persistence where you need to understand what you’re doing, and Hibernate doesn’t necessarily make it easier. My big awakening was optimistic locking: if you have the same entity in front of two users, how do you avoid the second person’s “save” action overwriting the first? In Hibernate, you add versioning to your entities, so that a new database column contains some unique, incrementing identifier that needs to match the property of the object that’s to be saved. This caused some big headaches with my client at the time, who had a screwy database schema where a created_date and modified_date on each row of each table were not both filled in for a new entry created in the Oracle Forms app, so neither column could be the versioned identifier for Hibernate.
The second stage of falling out of love is where you want to use Hibernate in a non-CRUD scenario – you are not showing individual records to a user for them to be edited. Data import, for example, is one of these things where Hibernate may do things you’d rather it didn’t. Even after disabling the second-level cache, Hibernate was still holding onto some reference to each entity. It wants to manage the objects it persists, and if you’re saving thousands of objects to the database,you’ll probably blow the heap. No doubt there was a fix for this — but even after using a StatelessSession (which helpfully doesn’t implement Session) I still had problems.
The moral is, keep in mind that JDBC, with a good library providing boilerplate templates like Spring-JDBC, is still the right tool for many jobs. I’m often guilty of wanting to apply the new tool (hammer) to all problems (screws). Don’t be that every-problem-looks-like-a-nail guy. It’s immature.
IMAP, how I missed you!
Dear GMail,
I’m leaving you because you didn’t fulfill me the way a real mail service can. It was great that you were free, but free POP3 doesn’t fill that spot in my heart the way a paid IMAP can. Back in college, I promised to be forever faithful to IMAP, but you were sexy, and I needed a mail agent so badly, it was easy to fall for you.
This morning, I knew I made the right choice. I flipped through my mail on my phone on the way to work, and deleted some things, and when I got to my computer at my desk, the mail was deleted. My drafts and outbox are on the server too, so I can start an email on my phone and finish it later.
I know, you expect me to use your interface. I’m supposed to use my browser when we hook up. Even with beer goggles, I’m sorry to say, you weren’t hot, so I was using native mail apps whenever we talked. I can’t even tell you how frustrating it could be when my three mailboxes that you touched your POP3 would get their own separate copies of mail. I think my other friends were upset about our relationship, too, because their messages would get lost in one of the inboxes that I couldn’t keep up with.
I know, you wish I could see through the protocol to who you really are… but I can’t. I’m so sorry, and by the way, please forward my mail to my new IMAP account. That way I don’t have to tell anyone we broke up.
-Me
Handy tip for layouts in Freemarker
If you’re writing a Java webapp and using Freemarker as your templating engine, hooray! Skip to the next section. Maybe this tip will come in handy.
If you’re not using Freemarker, you should really consider it. JSP’s are ridiculous – why are you compiling all your markup into Java code? Do you like it when you make a small typo in your JSP page, and get an error from the JSP engine referencing the Java code it created to render your page?? Gross, let’s go read through the generated code to infer what the typo was! Do you like how the JSP pre-compilation step is annoying to set up, but if you don’t, you have the dreaded first request to worry about? JSP’s might be a little faster than interpreting markup on each request, but with smart caching, and the ease of adding more web server boxes, that’s a dumb reason. And wow, let’s give people the ability to write arbitrary controller code in the view, and then trust them to do things the right way instead.
Oh, and if you like Velocity, that’s cool I guess. Freemarker is nice because it’s a real stickler for correctness – a null value isn’t just rendered as a blank string, because it’s not (insert scary life-support app example). The model is the model, you can render it, and that’s all. Just what you should be doing.
The layout tip
If you’ve played with (or gotten paid to work in) Ruby on Rails, you’re familiar with the “layout” concept. It’s just a simple template for a page, and instead of using “includes” where the template has to know what’s going to be inserted, it just “yields” to the page content. It’s the same philosophy as Struts Tiles – the dependencies between your markup files should go from the bottom up – the content needs a place to be inserted, and the template doesn’t care what it is.
This layout method gives you a similarly easy and readable result in Freemarker.
First, let’s create a page, with some wishful thinking for how we think the layouts should work:
<@layout.basic> <a href="/customer/accounts">Browse accounts</a> </@layout.basic>
That’s saying, I’d like to use a layout named “basic” and in the place that layout puts the page content, I’d like to have my link to Browse Accounts show up there. The page is as short as can be, and readable.
Now, let’s make it work. It seems I’m calling a macro “basic” and I expect it to be in the “layout” namespace. I haven’t used an import macro on my page, so the code for the layouts will be auto_imported into my pages, using the “auto_import” setting in Freemarker’s Configuration object. I set it to “/layouts/layouts.ftl as layout” so that the template /layouts/layouts.ftl gets imported to all my pages with the layout namespace. (It has to be that way because Freemarker can only associate one template with each namespace.) If you’re using Spring to configure Freemarker, you’d create a props element containing an “auto_import” prop and pass it to the freemarkerSettings property of the FreeMarkerConfigurer bean.
Now I create the layouts.ftl template. This could contain all my layouts, but it would look strange for several of them to live in one file, so instead my layouts.ftl looks like this:
<#include "admin.ftl" /> <#include "basic.ftl" />
Clearly this is where you add additional layouts as you need them.
Finally, let’s look at the contents of basic.ftl:
<#macro basic> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> </head> <body> <div id="header"> <p> Cows make moo sounds </p> </div> <hr/> <div id="content"> <#nested> </div> </body> </html> </#macro>
This creates a macro named “basic” and uses the nested macro to include whatever appeared in the body of our caller’s <@layout.basic> tag.
Neato!
About Me
Tweets
- @LaChilangringa thank you, he will be called Walter and might like trains or frogs. You were at the rally? What did your sign say? in reply to LaChilangringa 2010-11-06
- It says I'm not eligible to get a payout in the Buzz settlement. I'll have to settle for juggling with the Buzz developers. :) 2010-11-03
- It's Movember and you can sponsor my mustache. http://goo.gl/Z1O4 I miss the beard; It's very drafty on my face today. 2010-11-02
- Can 4 guys make themselves look enough like Mount Rushmore to fool Google Goggles image search? Love the demo slam. http://demoslam.com 2010-10-20
- Saw Dalai Lama on Thurs, running last 6mi of SF women's marathon with Peggy today. Too many crazy crowds this week! 2010-10-17
- Attn: people of the future. We wanted to avoid all that litter! It was our 2nd priority, right after annoying noises. http://bit.ly/cJzkGT 2010-10-09
- Headed to Hardly Strictly bluegrass in GG park. Elvis Costello free! 2010-10-03
- I vote that @TCooganPlants is having a rough week and deserves nachos. Who's with me? 2010-09-29
- More updates...
Powered by Twitter Tools




