Category Archives: books

A Prince Among Stones

When I was at primary school, our teachers tried to encourage us to read by quoting an old proverb:

There is no book so bad you cannot learn something from it.

I don’t think my teachers would have been proud with my choices of books, but I certainly learned a lot from them. Speaking of my choices of books, I am still able to raise eyebrows when I open my backpack. One day I will be reading a book on becoming a better writer, the other I will read a book nobody in the office would even think sitting next to. I just finished reading one of those obscure books.

I’m a fan of the Rolling Stones, but (surprise!) I am not a typical fan. I like their music, but I couldn’t keep up with their lifestyle or with the lifestyle of a devout Stones’ fan and I’m not obsessed with their total groupie count. OK, I like a little bit of gossip, but at my age I like the facts better. And those are hard to come by, because whatever the Stones’ marketing machine tells us is hardly ever the whole truth.

I started listening to the Rolling Stones as the rock music was being pushed aside by house, acid, dance, jungle, and rap. Brought up of a mixture of rock and heavy metal, I was not compatible with the music of the 90s. After U2’s Rattle and Hum I had nowhere to go.

The Rolling Stones’ music proved to be a nice refuge and I stayed there ever since. (I do listen to other bands, of course, but the Glimmer Twins have a special place in my heart.) As I got interested in the history of the band, I realized that I like them even more and not only because of their music or the flamboyant image, but because of their story of financial ruin and re-birth, which made them more human in my eyes.

The story of their fight for their own money and rights is possibly even more fascinating than the stories of their adventures, but it was never told. And it should be told, because the story of the Rolling Stones’ finances is one of the few stories where a banker is the good guy.

I always wanted to know more about their finances, how they ran the business side of the greatest rock’n’roll band in the world. These stories are very hard to come by, so I wasn’t actively looking for them.

Over the last twenty or so years I have read about half a dozen books on the history of the band, but I didn’t like them, because their authors were obsessed with drugs, sex, and urban legends. That can be fun, but it gets boring when people start rehashing the same old stories.

I was disappointed that all authors focused their attention on the endless procession of groupies, girlfriends, and wives and ignored one important character who was always there, silently working in the background, looking after the Stones’ affairs, getting them out of jail, and protecting against the Establishment. Yet, he was never spared more than a couple of sentences. That man was Prince Rupert Loewenstein who had looked after the Stones’ affairs for over 30 years. He was a banker who saved them, which in my world makes him a saint on Earth.

You wouldn’t expect a banker to tell you how he managed his clients’ affairs, but that is exactly what Prince Rupert Loewenstein does in his memoir, A Prince Among Stones.

The book is too short for me, does not go into enough detail, but it is a very enjoyable read for a fan of the Stones’ who wants to get the backstory. For me it is an essential appendix to the Keith Richards’ astonishingly good Life.

Apart form being a unique who-is-who of his social circle, Prince Loewenstein’s book offers some very good advice:

  • arrange your tax affairs in a way that helps you retain what you earn
  • buy property on freehold
  • it’s good to have a good banker on your side
  • good bankers have access to more people than you can imagine
  • good bankers know no borders and can communicate, travel, and operate as if political systems, divisions, or even wars did not exist; they are immune to such silly things

Unfortunately, people of Prince Loewenstein’s character are very hard to come by. Which is a shame. But at least we have his book. Recommended, not only for a Stones’ fan.

Tease #2013/00

A random paragraph from Chapter 1 of MF (before copy editing):

K. waved all messages away and got up from his seat. He had no desire to play tonight. What he had planned to do had to be done in private mode. He set his final status to On a business trip to Gibraltar and boarded the 18:46 fast train to Paddington. He was almost there.

My Personal Fiction Writing Master Class

I am writing a new book. This time it will be my first sci-fi book. I have experience writing non-fiction, but writing fiction is something I promised myself I would do but never did. A year ago I decided to go back to an old idea I had 20 years ago. Yes, some things can take a little bit of time to get to. But, if Louise in Steel Magnolias could have been in a very bad mood for 40 years, I guess I can be excused for sitting on a sci-fi book idea for 20 years.

On closer inspection the original idea (codename “Revenge”) turned out to be a good third book, but not a good first book, because I think some things need to be explained before I get to the third book in the series.

Actually, it is not important whether there will be a whole series of books or not, what matters is that when I abandoned the original idea and went on an expedition to explore a side-plot my creativity was suddenly on fire and I got out of a creative block I was stuck in for a few months. It was so effective that I got the outline and the first three chapters out of my head in three weeks.

I really like to feel the creative side of my brain buzzing with activity. Contrary to what you may be thinking, I don’t spend all of my time writing, but rewriting and learning more about the craft of writing fiction. Thanks to the internet I don’t have to take classes or join an esteemed society to learn how to write a book. These days I can simply go to YouTube, listen to the best authors and learn a lot about the process.

In case you want to learn how to write, I created a playlist of my favorite author talks. If you do not like the playlist interface, here are the direct links to the videos on that list. I also included links to the books by those authors. I chose those videos where the authors talk about the craft of writing, not those that are solely intended as promotional appearances.

PS. If you want to follow my journey towards getting my first novel published, sign up to my mailing list. It’s free and there will be no spam, just updates on the process and subscriber-exclusive content.

Vim: Which Line Am I On? Which Column Am I In?

Vim is a powerful beast of a text editor, but you would know that from its’ spartan screen. Sometimes it’s a good thing, but sometimes you need to know where you are. Fear not the answers are here.

Which Line Am I On?

The following Vim lesson is an excerpt from “Vim and Vi Tips.” You can get in PDF in a couple of minutes!

If you ever need to know the current line number, try these commands:

  • Display the line number:
    type :#, :num, :.=, or press Ctrl+G.
  • Display the number of lines in the current file:
    type :=
  • Display the line number and the total number of lines:
    press Ctrl+g.
  • Display the number of the next line that matches a regular expression:
    type :/regex/=

The search will start on the line with the cursor and continue towards the end of the current file.


  1. Open exercise file: vi line-number.txt
  2. Type 4G to move the cursor to line 4.
  3. Type :num
  4. Press Enter/Return.

If you would like to display line numbers without having to check them using the commands described in this section, you need to set the number option:


  1. Press Esc to switch to command mode.
  2. Type :set number
  3. Press Enter/Return.

If you want to reclaim the space taken by the line numbers, you need to set the nonumber option:


  1. Press Esc to switch to command mode.
  2. Type :set nonumber
  3. Press Enter/Return.
  • You must switch vim to command mode to use the commands described in this section.

Which Column Am I In?

If you would like to display a continously updated location of the text cursor, the line number and the column number, you need to set the ruler option:


  1. Press Esc to switch to command mode.
  2. Type :set ruler
  3. Press Enter/Return.

The location of the cursor will be displayed in the right half of the bottom of the vim screen.

Did you enjoy this short Vim lesson? There are plenty more practical Vim tips in Vim and Vi Tips! You can get in PDF in a couple of minutes!

Buy Now

How Amazon did everything wrong (but I still got to #1)

I have been thinking what I should write about in this post for the last couple of weeks or so. I have always liked the convenience, the reliability, and speed of operation of Amazon. They are an amazing company. When they came out with their Kindle devices, I got the Keyboard Kindle as soon as I could and I was not disappointed.

When Amazon had opened their Kindle Direct Publishing platform to the publishers without the US presence, I was among the first to enable my books for publishing there. I accepted their strange pricing model for ebooks that effectively forces the publishers to price their books at no more than $9.99 if they want 70% of the cover price and I didn’t even mind the DRM as long as the books got on the readers’ devices in under a minute. I knew that ebooks were the future so I accepted the limitations. That and the fact that Amazon knows how to sell.

But I do have a problem with their the current model of co-operation where authors and publishers are treated like they have nothing to say and should just shut up and take it like a man. And that it precisely how Amazon treats them, despite the official friendly message.

What Amazon would like you to think

If you watched the recent Kindle Keynote on September 6, 2012 you had a chance to see the example of a successful self-published author who uses KDP to bypass the traditional gatekeepers of the publishing industry, the agents and the publishers. Great. More power to authors, I say. More power to Theresa Ragan who was used as the example of how good the Kindle Direct Publishing platform is for the authors. (She apparently has sold over 300,000 copies of her books on the Kindle platform).

While I followed the keynote, I was trying to figure out what to do about the real Kindle publishing experience I was going through. When it works, the Kindle Direct Publishing platform is a nice experience with not too steep a learning curve, but when you have questions or when things go wrong, you will be either ignored, get a canned response, or you will be taught an expensive lesson in lost sales. Which I got.

Early signs of future trouble

I got the first taste of what Amazon thinks of self-publishers back in November 2010, when I tried to publish an ebook in Polish, a language not officially supported by Amazon Kindle. It got rejected, which surprised me, because I had easily found other books in the same language available from the Kindle store, so I asked the KDP support staff for an explanation. Their canned response stated that I would receive a reply in 2-3 days.

The reasons for not supporting certain languages by Amazon Kindle have never been clear to me. It makes not sense to support Swahili but not Polish. Both are spoken by roughly the same number of people. At least that’s what Wikipedia says.

They have yet to answer that question.

That didn’t upset me too much. The book was an experiment in publishing a blog archive, so not much work went into it anyway. I left it on my computer and let Amazon sell my other books for me. They were never great sellers by the publishing world’s standards, because computer books are never great sellers anyway. Also, the size of the Kindle audience was far smaller in 2012 than it is today.

And then, in August 2012 I decided to update one of my best-selling books, Vim and Vi Tips: Essential Vim and Vi Editor Skills, 2nd ed. and do a KDP Select promo for it. I thought it would be a good idea to use KDP Select to check if people were still interested in the subject and in my book before I sat down and wrote the third edition.

Amazon gives Kindle publishers a promotional tool called KDP Select. You have to accept certain restrictions (more restrictions!), but you get a chance to promote your book on the Kindle platform. The only promo price you can set is $0.00 and you can do that for at most 5 days within any 90-day period. The difference between setting the price of your book to $0.00 and doing a FREE promo is the description on the book page that says something like “You save $29.99!”

I defined a two-day promotion for August 17-18, 2012 and went to bed. I expected around 1,000 downloads as was the case with my other books. Anything above that would be very nice indeed.

Day one (August 17, 2012)

The promotion started slowly with a few dozen downloads and it looked like the book would reach that 1,000 copies goal. I did the usual things: tweeted the link, shared it on Google+ and Facebook. After a couple of hours, sometime during lunchtime I logged into my KDP account and noticed something strange. The number of downloads had already exceeded a few hundred copies. It was Friday morning in New York. A few minutes later I reloaded the stats and saw another couple of hundred copies added to the count. That was unusual. I poured myself a cup of coffee and kept refreshing the stats for a while. Things looked very good. I kept coming back every half an hour or so. The news about the promotion was spreading fast among the developer community and soon got on the front page of Hacker News. Then it went crazy.

The book was downloaded by 10,000 Amazon users within the first 6 hours of the promotion. That’s approximately one copy every 2 seconds.

To put things into perspective, the second most successful KDP Select promotion I have done so far put one of my other books into the hands of approximately 1,000 users. 10x in six hours was a very good result indeed.

The book roared up the charts. Within 6 hours it reached the following record places:

#2 in Kindle Store > Kindle eBooks > Nonfiction > Computers & Internet > Operating Systems > Unix

#4 in Books > Computer & Technology > Operating Systems > Unix

#92 in Books > Computer & Technology > Software

For a while, the book was doing better than Emily Bronte’s Wuthering Heights. You could say I was beating the British on their own turf, at least for a few hours. It was all good fun while it lasted, but it wasn’t all just a flash in the pan. To this day, if you search for a Vim book on the Kindle store, my book is #1. Mission accomplished.

Day two (August 18, 2012)

In the end, the book was downloaded by over 24,000 Amazon customers, some of whom wrote to tell me that the promotion was the reason they opened accounts with Amazon. It looked like a win for all: the readers, Amazon, and myself. I doubled the number of readers to over 50,000 in just 48 hours.

Let’s repeat this. 24,000+ Amazon users had downloaded my book in 48 hours. That’s an average of 500 copies per hour.

When I shared this news on TWiSTLIST someone wrote that’s only because people love free stuff. No. That wasn’t the only reason. A computer book does not get downloaded by 24,000+ in two days just because it is free. But whatever the reason, the promo was success.

Did I say, ‘Success’? Not so fast…

Encouraged by the success of my promotion, I decided to publish the third edition as quickly as possible. I never expected what Amazon had in store for me.

Dear valued customer, please kindly prove that you are not a camel

When a promo goes this well, you want to follow up as quickly as possible, right? I certainly did. But then Amazon had served me their first nasty surprise.

Here’s an excerpt from the email I got from the KDP support team on August 20, 2012 after I submitted the third edition of Vim and Vi Tips for publication:


Thanks for using Amazon KDP! We look forward to bringing your books to
the Kindle store. Copyright is important to us – we want to make sure
that no author or other copyright holder has their books claimed and
sold by anyone else. For your book(s), we just need a few additional

During the first week after the promotion the third edition of my book got witheld from publishing. Twice. You see, Amazon only wanted to make really sure that I owned the rights to my own book. I was asked to prove that once, then my book got withheld again and I had to prove it all again. Nice.

It took me over a week to deal with those issues. That’s one week of lost sales.

Now, 24,000+ copies in two days (Friday and Saturday) plus a bunch of new customers may not be siginificant for Amazon and I wasn’t expecting the red carpet treatment, but those stumbling blocks came out of nowhere and surprised me in a very non-pleasant and costly way.

Your update is not welcome

Once the third edition was published, I wanted to let all those 24,000+ readers know that there is a new edition and, should they choose to do it, they can buy it.

But how do you let over 24,000+ readers know there is an update available? Amazon does not give publishers access to the customers’ email addresses so you cannot get in touch with them directly. Also, you cannot put a link inside a Kindle book to another item on the Kindle store or on the internet. They are all disabled. And even when you do publish an update to your book, amazon may not make it available to those who have the previous version.

You have to upload an updated binary and ask the KDP staff to send an email to the people who purchased your book letting them know about the update. I followed the procedures and, foolishly, I thought it would be all that was needed.

Here’s an excerpt from the boilerplate response I got from the KDP support team:

August 30, 2012

Hello Jacek,

We received your request to provide updated content to customers who purchased your book. Thanks for providing specific details about the changes made. We’ll perform a review of the changes to determine the most appropriate way to describe the updates to your customers. This review will be complete within four weeks, and the possible results of our review listed below.

1. If the changes made to your content are considered critical, we’ll send an email to all customers who own the book to notify them of the update and improvements made. These customers be able to choose to opt in to receive the update through the Manage Your Kindle page on

2. If the changes made to your content are considered minor, we won’t be able to notify all customers by email, but we will activate their ability to update the content through the Manage Your Kindle page on

3. If the changes made to your content have caused unexpected critical issues with the book content, we’ll temporarily remove your book from sale. We’ll notify you of the issues found so you can fix them. Once the improvements are made, just let us know and we’ll then email customers as in case 1.

Once our review is complete, we’ll email you to share the results and action taken.

Thanks for using Amazon KDP.

That’s right. They give themselves up to four weeks to make their mind up. And they can do pretty much anything they want with that update and you have zero say in this.

Still, I thought that was reasonable. What I didn’t take into account was how broken the Amazon Kindle Direct Publishing platform is, how poor is the Amazon Kindle team’s communication with the publishers, and how vile are the Kindle trolls.

When you post an update to your Kindle book and let Amazon know about it you are asked to provide samples of the changes you made and write a convincing email explaining why the KDP team should notify their customers about it. It’s all discretionary and there are are three official outcomes outlined in the email I quoted above. Read it carefully, it is a broken system that the publishers have nothing to say about.

I thought my request to notify the customers about the update was justified, as I not only gave people a free update to the next edition, but I also fixed the formatting errors spotted by a couple of readers. It’s not like only small publishers make such errors. Formatting issues were the reason for an update to the biography of Steve Jobs and recently J.K. Rowling’s new book had similar problems. I thought I had a good case and, however long it would take to review it, I could count on positive outcome.

You can’t have that book

The update went live on September 1, 2012 and I thought all was fine. Silly me. Without telling me about it, Amazon made my book unavailable for purchase on the same day and posted the following message on the book’s page:

Amazon lied.

Nobody was in touch with me, nobody notified me, nobody could point out the critical issue that Amazon claimed the readers have discovered, and nobody was “working with me.” I caught this only because I was checking the books’ page every couple of hours, not because Amazon bothered to notify me.

Alarmed, I send an email to the KDP support team and got the standard canned response that they appreciate it and will get back to me in 2-3 days.

It was Friday, but I though that since the issue was critical, and they claimed to be “working with me” I would get someone to quickly reply to me. Nothing happened for 24 hours. I then decided to use the social media to bring this issue to someone’s attention. As this was an emergency, I tried to reach them via Twitter, Facebook page, the KDP support forums, and Hacker News. Finally, on Saturday, September 1, 2012, I recieved this email:

Hello Jacek,

I’m very sorry for any frustration this issue has caused. We’ll need a little time to look into your title’s buyability issue.

We will contact you with more information by the end of the day on Wednesday, September 05, 2012.

Thanks for your patience.

I patiently waited and this is what I got in my inbox on September 5, 2012:

Hello Jacek,

I wanted to send you a quick e-mail to let you know that we are still researching your concern. It usually takes 1-2 business days for this sort of research, but in this case it’s taking a little longer. I’m very sorry about this delay.

We’ll be in touch shortly with an answer for you. Thanks for your patience.

At this point I lost two weeks of sales.

How did you like your free book, then?

Despite blocking the update that fixed the issues with formatting and blocking sales of the updated book, Amazon sent two emails asking people to review the book. The book received a number of negative reviews for “typesetting issues” (fixed in the updated) and “outdated content” (fixed in the update). These things were minor, but you should never argue about them. Just fix them. The few negative reviews took a star off the overall rating of the book. I wasn’t surprised, the people were upset and I had no way of communicating with them while Amazon blamed me and made me look bad in the eyes of the current and the potential customers.

The Italian job

After another week of lost sales, this little gem arrvied in my inbox on September 10, 2012:

Gentile editore,

desideriamo informarti che abbiamo riscontrato dei problemi con il tuo libro. Al fine di evitare che altri lettori riportino gli stessi errori, abbiamo temporaneamente annullato la pubblicazione del tuo libro.

That’s right. I got a short email from In Italian.


Thanks to Google Translate I was able to understand that someone in Italy had spotted a problem with the update and reported “duplicated content” which I had problem finding, because Amazon does not keep the history of book updates and does not tell the publishers, which version of your book the customer is complaining about. From my point of view, there were no typographical errors.

And then it dawned on me. As Amazon began serving the update, someone in Italy got upset about the image I had placed in several places inside the book. The image looked like this:

It was a Kindle version of the shareware “nag screen”, but I tried to make it polite and non-intrusive. You still got the full thing, no content was obstructed, but apparently some people in Italy got offended. And why shouldn’t they? They got a full update to the book they got for free and there was a message inside that if they like the book, they might buy it. No obligation. So they complained to Amazon, instead of me (the email address can be found inside the book) and Amazon pulled the book from sale.

The emails in Italian were the last emails I had received from Amazon. I removed the image that had offended the good people of Italy from the latest update.

Curiously, there are plenty of books that the readers complain about in the Amazon reviews and even when they point out glaring typographic errors, those books are never subject to the same kind of treatment like mine was.

Amazon Kindle has become a strange place where a piece of porn for housewives sells just fine despite many damning reviews, but a technical book will get pulled immediately for weeks without proper explanation. I guess housewives and guys looking for relief are too busy with their privates to discover the way to troll the system. I guess I’m in the wrong business.

What is more interesting, the real error that I discovered myself (one section was displayed in the wrong order) went unnoticed…

I can take criticism, I am open to discussion and suggestions how the book could be improved. But we won’t have a proper conversation as long as Amazon sits between me and you.

What Amazon needs to change

No system is perfect. The Amazon Kindle team have built an impressive system for publishing, purchasing, delivery, and reading ebooks. Kindle is the ‘iTunes for eBooks.’ They got many things right, but they do need to improve their relations with publishers, regardless of the publisher’s size.

  1. Stop lying that they are “working the the publishers,” when they are not.
  2. Stop asking the readers for reviews when they block the sales due to issues reported by the readers.
  3. Add version information to error reports.
  4. Start communicating with the publishers.

What about the update?

The third edition of Vim and Vi Tips is now available in PDF format. It looks great, much better that the Kindle version. You can click to buy it below and have it on your computer within minutes:

Buy Now

Thank you for your support!

Having :Sex with Vim (i.e. browsing the filesystem using Vim)

Vim is a huge subject. I wrote a short intro book on that subject, but some of you though it was too short and asked me to write more. Which I did. And here’s one section that will make you smile while you learn a practical Vim trick!

The following Vim lesson is an excerpt from “Vim and Vi Tips.” You can get in PDF in a couple of minutes!

Browsing the Filesystem Inside Vim

You can browse the local filesystem from within vim in two ways: using the text mode browser or the Open and Save As file dialogs. The latter option is only available in the versions of vim that run as stand-alone GUI applications.

Browsing in text mode can be done in three different layouts: standard, vertical, and tabbed.

Each layout presents the list of files in the current working directory. The thin horizontal line indicates the current choice of the file/directory.

The horizontal view is handy if you are working with long file or directory names. You enable it with the :Sex command:


  1. Press Esc to switch to command mode.
  2. Type :Sex
  3. Press Enter/Return.

To navigate the filesystem, use the following commands:

  • Move Up — press k.
  • Move Down — press j.
  • Move to a Subdirectory — select the subdirectory and press Enter/Return.
  • Move to a Parent Directory — select the .. directory and press Enter/Return.
  • Open a File — select the file you want to open and press Enter/Return.

Because vim treats the list of the files in a directory as if it was a file, all cursor movement commands can be used.

Did you enjoy this short Vim lesson? There are plenty more practical Vim tips in Vim and Vi Tips! You can get in PDF in a couple of minutes!

Buy Now

Vim and Vi Tips: Essential Vim and Vi Editor Skills, 3rd ed.

No Unix-class system administrator or user will get far without learning the basics of Vim, the modern replacement for vi. Contrary to some misinformed opinions spread among users who are new to Unix-class systems, Vim is not difficult to learn. Granted, it is not very friendly to beginners, but once you grasp the basic concepts, you will never have to learn another text editor again, because Vim is available for all standard operating systems, including Microsoft Windows, Mac OS X, Linux, BSD, and many others. This book helps you shorten the time you need to spend learning Vim.

With over 50,000 copies in distribution to date, “Vim and Vi Tips” has become the Vim book to go to when you are learning Vim or just trying to remember a specific shortcut.

The latest, 3rd edition teaches you even more about Vim without sacrificing the concise style and easy to follow presentation of the subject.

I have good news for all readers of Vim and Vi Tips! The third edition is available in PDF!

This is a serious upgrade. There are 22 new sections, one new chapter, and 71 updated sections. No page left unturned. And now, with even more screenshots!

Once again, I went against the traditional way of teaching Vim. The comments I received from the readers of the first and the second editions of Vim and Vi Tips confirm that my decision to present the subject from the point of view of someone who does not have a lot of Unix experience was the right one. This stuff is not hard, if you shed some of the old ways and lingo!

And over 50,000 of you who have purchased that book since 2008 seem to agree!

If you want to find out what has changed, I posted the full Table of Contents and the detailed list of the changes from the Second Edition on this site.