A search for meaning in software and life
RSS icon Email icon Home icon
  • A rant about QWERTY

    Posted on December 14th, 2009 Peter 2 comments

    OK, so it seems that it’s no longer fashionable to knock the QWERTY keyboard layout (or QWERTZ in Germany, I gather). A couple of times I’ve moaned about the layout, people have said its got a worse reputation than it deserves. Well, maybe.

    I did have a quick look at Wikipedia to find out some information, and that directed me to a one page QWERTY history. If that page is accurate, then it may not have been designed to slow down typists, but the aim of reducing the number of jams in a typewriter at the end of the 19th century is hardly geared towards efficient typing on computer keyboards. It’s not like we have to worry about jams these days, although crumbs, coffee, and other such evils are a different matter.

    Anyway, it’s not really QWERTY per se that bugs me. Yes, I think the Dvorak layout puts less strain on my fingers’ tendons. But I can nonetheless type fairly fast on a QWERTY keyboard (it’s only taken 15 years of software development to get there!). No, my main gripe is with using QWERTY on touch screens.

    One of my most memorable experiences with this was when I was trying to buy a train ticket from a new electronic ticket machine. There were many design issues with this machine, but I want to focus on the touchscreen keyboard. This is presented to the customer when he or she needs to go anywhere not on the quick links screen. Unfortunately my parents live in a not-particularly-large village, hence I had to type in the name of the station. That’s when I suddenly realised I had no idea where the keys were on the QWERTY keyboard!

    This may seem strange at first glance, because I use a keyboard almost every day of my life (how sad is that?), but once you take into account the fact that I touch-type, things start to make sense. I don’t visually map the letters to the keyboard – my fingers in effect just take on a mind of their own. As soon as I was faced with the QWERTY layout and had to visually locate the letters, I struggled because it has no logic. I got to the stage where I was putting my hands on the screen as if I were typing!

    What about all those people that don’t have experience with QWERTY? I know that techies may find this hard to believe, but not everyone has a lot of experience with computers and their keyboards, whereas almost everyone knows the alphabet. So why not display the keys in alphabetical order? I really think that no one actually bothered to field test the on-screen keyboard layout and simply went with QWERTY because “everyone knows it”.

    Every on-screen keyboard layout I have seen goes with QWERTY, but I’m convinced this is completely wrong-headed for any situation that doesn’t involve touch-typing. In particular, any application that can’t handle fast typing (I’m looking at you, ticket machine) has no call to use QWERTY. Nor does any application that is used by people of all ages and backgrounds. Unfortunately, I can’t help but feel that this travesty will continue until even our grannies eventually learn where the QWERTY keys are.

  • Idiot’s guide to signing up for Yahoo! Groups

    Posted on October 6th, 2009 Peter 2 comments

    It seems fairly clear that Yahoo! doesn’t have the most intuitive user interface, so here are some instructions that I hope will help people get signed up for Yahoo! Groups with the minimum of fuss. It’s intended for members of my rowing club, Furnivall, but if it works for others, great!

    1. Go to the Yahoo! Groups web page, and click on the Sign Up link
    2. Sign Up link on Yahoo! Groups home page

      Sign Up link on Yahoo! Groups home page

    3. Fill in the form that’s displayed. Don’t forget to tick the checkbox at the end of the form to say you’ve read the terms and conditions! Then click on the “Create My Account” button.
    4. Sign up form

      Sign up form

    5. You will return to the Yahoo! Groups home page. In the top left corner, you will see your username. Hover the mouse over it and select “Account Info” from the drop-down menu.
    6. Yahoo! Groups home page when signed in

      Yahoo! Groups home page when signed in

    7. Yahoo! will ask you for your username and password again (it’s just an extra security step). Enter them and you will be transported to the Account Info page. From here, you will see one or more e-mail addresses. Click on the “Change” link as highlighted in the next image.
    8. Account Info page

      Account Info page

    9. On the next page, you can add or remove e-mail addresses. If you want e-mail from a group to go to a particular e-mail address, and that address is not shown on this page, click on the “Add Another” link.
    10. Adding and removing e-mail addresses

    11. You can now join a group, for example by going back to the home page and searching for the name of the group you want to join. One last thing: changing the e-mail address that the group sends e-mails to. Go to the home page of the specific group you want to configure and click on the “Edit membership” link.
    12. A group home page

    13. From the group membership page, you’ll see that you can select any one of the e-mail addresses you configured earlier. You can also hide your e-mail address if you want.
    14. Edit group membership page

      Edit group membership page

      Now go sign up to those Yahoo! groups!

    15. Cropping an image in HTML

      Posted on August 4th, 2009 Peter 1 comment

      Take a look at the image of the Grails in Action book cover in the sidebar. That image has a white border to the right and bottom, but that border is not visible. Don’t believe me? Tough. For those of you who do believe me and want to know how to crop an image, read on.

      The original image is 150×188, but to eliminate the white border we need to display 141×176, i.e. cut of the right 9 pixels and the bottom 12. We could use the width and height attributes of the img tag, but that doesn’t achieve what we want: the browser will just scale the image to fit in those dimensions, so the white border will still be visible.

      The trick is to wrap the image in a div with the appropriate dimensions:

      <div style="width: 141px; height=176px; overflow=hidden">
        <img src="..." width="150" height="176">
      </div>
      

      Voila! The image is cropped! If I learn how to crop the left and top as well, I’ll update the post.

    16. How to write a book

      Posted on July 13th, 2009 Peter 13 comments

      Having completed the book Grails in Action with my co-author Glen Smith not so long ago, I thought it might be a good idea to post some of the things I’ve learned. Despite the title of the post, I definitely don’t profess to be an expert in this field – I’ve only co-written one book after all! The post also targets technical books, rather than books in general. Budding authors may nonetheless find some useful information here.

      So, you’ve decided to write a book. What should your first steps be? Good preparation can make the writing process a lot easier in the long run, so we’ll start with that.

      1. Write a sample chapter/half-chapter

      Ouch. Is he serious? Yep. I suspect the last thing anyone wants to do before writing a book is to write an extra throw-away chapter, or even half a one. There is reason in this madness though.

      It’s important to know how long it’s likely to take to write the book. That will enable you to schedule achievable milestones. Unachievable milestones are a great way to become depressed very quickly. It’s also a good idea to find out whether you enjoy writing enough to create a whole book. Better to find out now, rather than half-way through. That said, if I’d tried this, I may never have agreed to do Grails in Action!

      If you’re sure you want go through with this, you’ll need to make some important decisions early on. Those decisions depend on knowing who your target audience is.

      2. What background will your readers have?

      Are they beginner, intermediate, or experienced developers? Will they have some knowledge of your chosen topic? Maybe they know a lot about a related topic, but not the one you are covering. The answer will have a profound impact on the style and content of your book, so think carefully on this one. Once you make the decision and have started writing, stick to it. Beginners will require more background information and more explanation for any given topic.

      For example, with Grails in Action we decided to target intermediate to experienced Java developers who may know nothing about Groovy or Grails. We also wanted to fit as much advanced stuff and practical advice in as possible so that experienced Grails developers could benefit.

      3. How big will your book be?

      This may seem an odd question, but it’s closely related to another: how much stuff do you want to cover? The problem is, if you just think about what information you want to include, you may end up with a mammoth book that’s only suitable for weight lifting! Size is important. Some people like to carry books around with them. Others are intimidated by thick books that look impenetrable. On the other hand, some will view a thin book as light on content.

      The overall page count can be estimated by the amount of information you want to convey divided by the pace at which you cover that information. The pace partly comes from writing style, but it is mainly determined by your target audience. A beginner’s book will inevitably have a slower pace than one targetted at experts. So, the faster the pace, the more information you can fit into a given number of pages.

      4. Decide what you want to put in the book

      By this stage, you should have an idea of how much you can fit into your book, so it’s time to look at what information you want to include. There will be trade-offs, have no doubt. The question is whether you go for more in-depth coverage of fewer topics, or lighter coverage of more. Or in-depth coverage of more topics and let the size of the book increase. Just be careful: you’ll probably find that topics require more pages than you expect. I certainly did.

      This seems like a pretty big decision to make and hold yourself to before the book has even started. There is some leeway for sure, but sticking closely to your initial targets will help you keep the book focused. The publisher will be happy too, since they don’t have to make any last minute changes with the printers.

      5. Organise your chapters up-front

      This is almost a no-brainer. The chapter structure is the equivalent of the 60,000ft view of your book. You have to have some idea of what you want to say and in what order. You don’t have to stick to your initial chapter structure come hell or high water, but changing it will likely have a significant impact on chapters you have already written, particularly with regard to chapter references. You might also need to change examples and the like.

      6. Pick an approach for sample code

      There are basically two approaches to sample code: use a single example throughout the book that you build up; or use different examples in each chapter. You can even mix and match if you want. A single application running through the book seems the more popular approach at the moment, and it’s the one we chose for Grails in Action.

      A single example provides a strong thread for the reader to follow and allows for continuity. It is also more likely to result in real-world code – something that readers appreciate. The main downside is that your chosen example may not suit all topics, and you may end up adding contrived functionality to demonstrate stuff. Using different examples gives you flexibility and the opportunity to use more appropriate scenarios, but each new example typically requires a bunch of support code too.

      Now you’re ready to do some writing.

      7. Start at the beginning

      Writing your chapters sequentially will help you maintain a narrative. If you write them out of order, you won’t know what’s gone before and it becomes difficult to keep a sense of progression going. Remember that readers will typically read non-reference books from the start to the end, so that progression is important. For reference books, it probably doesn’t matter too much in what order you write the chapters.

      One variation on this is to pick a chapter that you expect to be easy for your first one. That will help you get warmed up and into the swing of things before you have to tackle trickier topics. But I recommend returning to the sequential approach after that first one.

      8. Use free writing

      When you want to start a writing session, begin with half an hour or so of free writing. This involves just writing down anything that comes into your head, generally without any regard to punctuation or structure. Just write. This will warm you up and get you into writing mode. You can then use any bits of the free writing in your chapter if you want, but you don’t have to. Note that it’s not essential that you write about the topic that’s planned for the session, but it helps.

      9. Use mind maps for each chapter

      Mind maps are great tools for organising your thoughts and working out what should go in a chapter. You only have to do this once per chapter, but it’s probably best done after a free writing session on the chapter topic(s). Once you have a mind map, it’s worth turning that into a structure of sections and sub-sections, i.e. giving it a semblance of order. Sorting out the chapter progression in advance like this can make the actual writing much easier. You basically know where you want to go with the chapter, so the writing should flow naturally.

      10. Keep communication channels open between co-authors

      This may sound like a case of stating the bleeding obvious, but when you’re under time pressure and you just want to finish the chapters you own, it’s easy to skip reading your co-authors’ chapters and letting them know about changes to your own. You don’t want your book to end up with inconsistencies due to a lack of communication. As a concrete suggestion, make sure all co-authors read all the chapters before the book goes to production. It may take time, but it will save heartache later!

      That’s it for now. If I think of any more advice, I’ll add it in later. Hopefully the above will help at least one poor soul who’s writing a book, or at least planning to.