A lesson learned from writing the Scala Cookbook

A lesson learned from writing the Scala Cookbook: It’s fun and interesting to work with some professional writers in the editing process, and it’s great to get their feedback. But you also have to be willing to duke it out to keep what’s important. It’s your baby, it’s your name on the front cover.

TypeAhead, a continuous predictive text editor

TypeAhead is a continuous predictive text editor. It always tries to help you auto-complete the current word by using words in (a) the current document, as well as (b) a dictionary.

This short video shows a very rough prototype of how this might work:


A few improvements are possible and easy.

Writer vs Editor

A friend shared this photo on Facebook. I’m sorry I don’t know the original source of it, but based on my experience I agree with it. I know that my only concern was about the quality of the Scala Cookbook, while from my perpective, my editors mostly seemed interested in getting the book into production.

Drupal 6 - The CKEditor is removing/deleting CODE tags

I had a problem using the CKEditor with Drupal 6 where the CKEditor would not display <code> tags properly in the editor, and would then delete trailing spaces after the <code> tag. After some digging around, I finally found that I needed to comment out the following line in the ckeditor.config.js of my CKEditor module installation:

vim backup files - how to move

vim FAQ: How do I move vim backup files to another directory? (Those files that end with the "~" character.)

To move vim backup files to another directory, just use commands like these in your "vimrc" configuration file:

The vim “delete all lines” command

vim FAQ: How do I delete all lines in the current text file in vim?

To delete all lines in vim, use this command:


This "vim delete all lines" command can be read like this:

  • Beginning at line 1, and
  • Ending at the last line in the file (represented by the '$'),
  • Delete each line.

I hope this vim "delete all lines" command example has been helpful. If you need any more details/discussion just leave a command below.

The vim “delete line” command

vim delete FAQ: How do I delete a line in vim? (Also, how do I delete multiple lines in vim?)

To delete the current line in your vim editor, use this command:


You can use this same command to delete multiple lines in vim. Just precede the command by the number of lines you want to delete. For instance, to delete five lines in vim, use this command: