Learn to Use A Real Editor, or: Vim Tips and Tricks

For years I have been recommending that users diving into the Linux world, or who otherwise expect to get into contact with something unix-like, learn to master vi. The simple reason is that this editor, though feeling a little arcane at times, is very powerful, and almost ubiquitious. It works almost the same across all systems that you might encounter, from the now 30 years old workstation that you find in the dumpster, to the most recent netbook or mainframe computer. So you learn the program once, and use it a lifetime - how's that for a cost/benefit ratio? And contrary to popular belief, you can learn the basics of this program in about an hour.

Plus, this editor lets you work on your text in much more efficient manners than you used to, if all you have seen so far are the typical end-user type of editors (like Notebook under Windows, Joe, Jove, or likely even CodeWright and friends). The catch is that you need to make some effort to actually learn how to use it. But here is where the differences start: While other editors may have a man page or help file that allows you to master the program, vi has had a learning program since ages.

If you are on a halfway modern Linux system, I highly recommend using vim, which also exists for other platforms (example shown assumes Debian):

$ apt-get install vim

Then invoke

$ vimtutor

and plough through the lessons to master this program. There are also numerous tips and tricks on the web, but today, this very nice blog post caught my eye:

Vim anti-patterns

The web page contains a very nice overview over the basic functions of the program. Kudos to the author of the page, and enjoy!

Of course, feel free to ask questions if you are running into trouble.

Back to top


Rick Santorum For President... Really?

Today, I was alerted to the following nice web page:

http://spreadingsantorum.com/

While I don't exactly think that it matters that much who will be next in the White House, in my personal straw poll, Rick Santorum turns in in the last place, too. Actually, watching the current election campaign makes me wonder why such a big country fails to produce a halfway sane candidate. Again.

I mean, you can be a Catholic and still be less nuts than he is. Really!

Back to top


Privilege To Have A Passport

It has long been held as a mark of a free society that every citizen is allowed to travel, wherever they want, and governments that denied their citizens the right to travel, have long been denounced as oppressive regimes. Not being entitled to a passport, has long been unthinkable in the west. Today, this gem sheds some light on the state of one of those societies that claims to be the freest ever, worldwide:

http://kdvr.com/2012/02/21/denver-family-stranded-after-passport-denied-because-of-crease/

Quote:

"To have a passport is privilege, it's not entitled to you by citizenship."

I can only hope that the guy who made this statement is rather a nobody than a government official. But nevertheless, the interpretation of what a passport is (property of the respective government, not the holder), and what the right to a passport is (a privilege instead of a basic, unalienable right for everyone) should raise awareness with all freedom-loving people in the west about domestic problems.

Back to top


WebKit als Nachfolger des IE6?

Gerade stolpere ich über einen Artikel, der die aktuelle Fassung des IE6-Problems, nämlich die Fraktionierung des Web, durch die Marktmacht von Browsern auf Mobilgeräten anprangert. Im Kern geht es darum, daß WebKit, als Basis von allen Browsern von Apple und Google, den mit Abstand größten Marktanteil bei Mobilbrowsern hält, und daß die Webdesigner in der Folge nur noch für WebKit designen, nicht aber für andere (Mobil-) Browser. Damit sind wir wieder da, wo wir mit IE6 und FrontPage aufgehört zu haben glaubten: Diese Webseiten funktionieren nicht, wenn man sie mit anderen Browsern anschaut. Technisch liegt dem die unsachgemäße Nutzung von inoffiziellen Leistungsmerkmalen zugrunde, die Apple und Google längst hätten zur Standardisierung einreichen können und sollen. Daß sie dies bisher unterlassen haben, ist im Grunde unlauterer Wettbewerb und droht dementsprechend, einen Rückfall in IE6-Zeiten zu bringen, weil jeder Hersteller irgendwie "kompatibel" sein muß, dieses Ziel aber mit offiziellen Mitteln dank fehlender Standardisierung nicht erreichen kann.

Der Originalartikel erschien in dem Weblog des Autors, der Mitglied des des entsprechenden Standardisierungskommitees im W3C ist:

www.glazman.org

Ich kann seinen Aufruf, entsprechend kaputte Seiten zu boykottieren und nur im Zusammenhang mit diesem Fehler zu erwähnen, nur voll unterstützen, und hoffe, daß meine verehrte Leserschaft dies ebenso sieht.

Back to top


Coverage Testing in Pyramid

The normal project layout, generated by the scaffolding for Pyramid projects, generates a project structure like this:

project/
       package/
               tests.py (or tests/*)

In conjunction with Jenkins, it turns out that nose's plugin for Cobertura-style output fails to discover the test modules properly. Instead of saying

$ nosetests --with-xcover

one needs to also specify the configuration file:

$ nosetests -c development.ini  --with-xcover

Back to top


Plone Setup Gotcha on Debian

I am using zc.buildout together with a virtualenv to generate my Plone instances. It turns out that Zope requires the Python Profile be installed. However, under Debian, the relevant package, python-profiler has made it to non-free instead of main, due to the licensing of that package. As a result, you only discover that testing doesn't work until Zope tries to import the profiler, and falls over.

In order to get things to run, you need to do the following:

  1. Add non-free to the set of repositories that you want to use. Eg.:

    deb http://ftp.debian.org/debian stable main
    

    would have to become

    deb http://ftp.de.debian.org/debian stable main non-free
    
  2. Run apt-get update (obviously).

  3. Now you can apt-get install python-profiler, and you should be all set.

Back to top


Theism, as Explained by a Mathematician

For some time, it has irked me how to best expose the logic behind (monotheistic) religion. Not resorting to ZOMGitsCriss's crude, but accurate "elves up your butt" comparison, or to Pat Condell's blazing series explaining history, though quite focussed on only one such creed, this one relies on simple mathematics, and it does not require more than elementary school level education on your behalf to understand:

Have a few nice days off, altogether. Hope you enjoy your family and friends.

Back to top