James Crisp

Coding, calisthenics, book reviews, mind hacks and the occasional personal bit.

Month: August 2006

Litost in Le Petit Prince

I was reading a post on Phillip Eby’s blog recently which quoted a little of “Le Petit Prince” by Antoine de Saint-Exupéry (“The Little Prince” in English). It’s been a long time since I read it (I studied it in French class at school), so I got hold of my old copy and have been re-reading it. It’s really great – both funny and serious, and I’ve been enjoying exercising my atrophied French muscles a bit. If you haven’t read it, I recommend you get it and have a read in either French or English. Wikipedia has got some more information on the novel here.

Anyway, I came across an interesting passage that seems to dove tail very well with my recent post on Litost. Here we go:

“Elle serait bien vexée, se dit-il, si elle voyait ça… elle tousserait énormément et ferait semblant de mourir pour échapper au ridicule. Et je serais bien obligé de faire semblant de la soigner, car, sinon, pour m’humilier moi aussi, elle se laisserait vraiment mourir…”

And here’s my rough translation into English:

“She would be very vexed, he said to himself, if she could see that… she would cough violently and pretend to die to escape being laughed at. And I would be obliged to pretend to heal her, so that I could humiliate myself as well, otherwise, she would really let herself die.”

PS – Found the full-text available online in English, French and some other languages!

Engagement Party!

Last night was our engagement party! It went really well 🙂

We had it at the Royal Exchange Hotel in Marrickville. The weather was great, and the venue was really nice, and our guests were awesome!

Many thanks to my mum and grandma for the cakes, my family for being so helpful on the night, to Dennis Building for the drinks tab, and to everyone for coming along to celebrate our engagement with us. We had a really great time and I hope everyone else did too 🙂

Litost

For some reason, while doing the washing up today, my mind was wandering and I remembered reading “The Book of Laughter and Forgetting” by Milan Kundera. A colleague and friend of mine gave me the book for my 24th birthday. It was a fun and interesting read with a good story. The passage I was day dreaming about was “What is Litost?”. I was thinking I might take a stab at explaining it in my own words, but having read the passage again, I’m sure Milan Kundera has done a better job than I could hope to achieve. Hence I give you the passage verbatim:

What is Litost?
Litost is an untranslatable Czech word. Its first syllable, which is long and stressed, sounds like the wail of an abandoned dog. As for the meaning of this word, I have looked in vain in other languages for an equivalent, though I find it difficult to imagine how anyone can understand the human soul without it.

Let me give an example: The student went swimming in the river one day with his girlfriend, a fellow student. She was athletic, but he was a very poor swimmer. He could not time his breathing properly and swam slowly, his head held tensely high above the surface. She was madly in love with him and tactfully swam as slowly as he did. But when their swim was coming to an end, she wanted to give her athletic instincts a few moments’ free rein and headed for the opposite bank at a rapid crawl. The student made an effort to swim faster too and swallowed water. Feeling humbled, his physical inferiority laid bare, he felt litost. He recalled his sickly childhood, lacking in physical exercise and friends and spent under the constant gaze of his mother’s overfond eye, and fell into despair about himself and his life. They walked back to the city together in silence on a country lane. Wounded and humiliated, he felt an irresistible desire to hit her. “What’s the matter with you?” she asked him, and he started to reproach her: she knew about the current near the other bank, and that he had forbidden her to swim there because of the risk of drowning – and then he slapped her face. The girl began to cry, and when he saw the tears on her cheeks, he took pity on her and put his arms around her, and his litost melted away.

Or take an instance from the student’s childhood: His parents made him take violin lessons. He was not very gifted and his teacher would interrupt him to criticize his mistakes in a cold, unbearable voice. He felt humiliated, and he wanted to cry. But instead of trying to play in tune and not make mistakes, he would deliberately play wrong notes, the teacher’s voice would become still more unbearable and harsh, and he himself would sink deeper and deeper into his litost.

What then is litost?

Litost
is a state of torment created by the sudden sight of one’s own misery.

One of the customary remedies for misery is love. Because someone loved absolutely cannot be miserable. All his faults are redeemed by love’s magical gaze, under which even inept swimming, with the head held high above the surface, can become charming.

Love’s absolute is actually a desire for absolute identity: the woman we love ought to swim as slowly as we do, she ought to have no past of her own to look back on happily. But when the illusion of absolute identity vanishes (the girl looks back happily on her past or swims faster), love becomes a permanent source of the great torment we call litost.

Anyone with wide experience of the common imperfection of mankind is relatively sheltered from the shocks of litost. For him, the sight of his own misery is ordinary and uninteresting. Litost, therefore, is characteristic of the age of inexperience. It is one of the ornaments of youth.

Litost works like a two-stroke engine. Torment is followed by the desire for revenge. The goal of revenge is to make one’s partner look as miserable as oneself. The man cannot swim, but the slapped woman cries. It makes them feel equal and keeps their love going.

Ruby on Rails Hosting, Setup And Migration

I’ve been doing a little rails of late.. Here’s a summary of the stuff that I’ve learnt.

What hosting should I use in Australia for rails?

NOT JUMBA – SEE UPDATED REVIEW BELOW

I’m using jumba (http://www.jumba.com.au). Jumba is very cheap (~$30AUD/year), and they give you shell access, mysql etc. However, there was a period of several weeks when they moved me to some server without an install of rails and kept promising to install rails and never did. I finally got them to move me back to their main server which has rails installed. It was a painful process, so I’m not sure if I would recommend them. That being said, things are going OK at the moment, and I’ve got a few development apps up and running on their service.

UPDATE 29 March 2006: Jumba summarily stopped rails support without notice and was rude when I contacted them about it. I would not recommend Jumba for web hosting anything – they have frequent down time, server switches and reboots and their low price is made up for by the amount of time you waste. They used to be OK, but no longer. I’m in the market for a new host, will post on how it goes.

How to set up rails applications in your home directory (in public_html) under a UNIX/Apache/cgi/fcgi environment

  1. Upload or create your application in your home directory. Eg, ~/MyRailsApp/
  2. In your public_html directory, create a soft link to the public directory of your app. Eg,
    ln -s ~/MyRailsApp/public ~/public_html/MyRailsApp
  3. Make sure dispatch.fcgi in the ~/MyRailsApp/public directory is executable. If not, chmod it a+x.
  4. Confirm that dispatch.fcgi has a valid path to ruby on the first line. If you’ve created this project on another machine, you’ll quite possibly need to update the path. The path is often something like ‘#!/usr/local/bin/ruby’, but check what it is under your system with ‘which ruby’. Special note for InstantRails users – you’ll always need to update the path when uploading to unix hosting, as instant rails uses a windows style path with the slashes the other way around.
  5. Update your ‘database.yml‘ file (in the ‘config‘ directory of your app) with correct database names, user names and passwords.
  6. Run ‘dispatch.fcgi‘ (in the ‘public’ directory of your app). If you see an ‘Internal Server Error’ message, you know things are going OK. If you’ve got the path to ruby wrong on the first line, or some other similar problem, you’ll find out about it here, where as if you run through the web, you don’t get these sorts of problems reported in an easy to understand way.
  7. Check out your running system in the browser (eg, browse to http://myhostingcompany.com/MyRailsApp/)

Tips for trouble shooting rails errors

  1. A good place to start is by reading your logs in the ‘log’ directory of your rails app. If you’re running a development configuration, have a read of ‘development.log’.
  2. Try manually running ‘dispatch.fcgi‘ in the ‘public’ directory of your app. If you get an ‘Internal Server Error’ message printed out on the console, it’s probably working ok. Alternatives to this are reports of missing files and unable to find ruby – often these aren’t shown when browsing to your web site.


Rails problems and solutions

1. Browser and logs show: Application Error – Rails app failed to start properly

I got this after my app was moved from one unix host to another by my hosting company. I tried heaps of stuff to try and resolve this. Eventually I created a brand new dummy project on the unix host called ‘Test’ and Test worked fine from the browser. I then tried my original project again and suddenly it worked fine! It has been working fine since. I can only imagine that there was some sort of problem in temporary files or similar which got flushed. No good explanation for this currently.

2. in `start_engine’: undefined method `add_path’ for Controllers:Module (NoMethodError)

I got this one when migrating a project from rails 1.1 to a later version of rails. The solution is to force update your rails engines:

script/plugin source http://svn.rails-engines.org/plugins
script/plugin install engines –force
script/plugin install login_engine –force

3. My app works fine if there is a trailing slash on the url. Otherwise, I get a ‘Bad Request’ error page. Eg, ‘http://myhost.com/myapp/’ works, but ‘http://myhost.com/myapp’ does not work.

Add a RewriteRule to the .htaccess file in your application’s public folder:
RewriteRule ^.*myapp$ http://%{HTTP_HOST}/myapp/ [R=301,L]

My basic .htaccess rewrites are as follows:
RewriteEngine On
RewriteRule ^.*myapp$ http://%{HTTP_HOST}/myapp/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

I tried removing the RewriteCond !-f, and my pages lost their styles. I think the condition allows the rails framework to load .css files directly without having the requests go through dispatch.fcgi.

What is Wing Chun About?

For those of you who haven’t heard of it, Wing Chun is a type of Kung Fu which was developed by a nun in China, a couple of hundred years ago. It focuses on technique rather than strength and, as such, is designed so that a smaller person can successfully fight a much larger person, and not get too tired out in the process. There’s no messing around in Wing Chun, it’s not like the movies where fights go on for ages. The aim is to take out your opponent rapidly and effectively.

Here are the principles of Wing Chun, according to the masters:

  • Economy of movement
  • Directness
  • Practicality

As a Wing Chun student of about 3 years (ie, by no means an expert), I think this means:

  • Carefully angling legs and arms (the ultimate angle) at which point they are very strong and take very little energy to resist force applied by an adversary.
  • Applying full body weight in every movement (eg, force going from shoulder, to elbow, to wrist in each movement).
  • Relaxation of muscles to increase speed, decrease energy use and make it very difficult for your adversary to grab you.
  • Redirection of strikes rather than blocking.
  • Increasing force of your strikes through pivoting and stepping forward.
  • Simplicity. Movements are simple with no adornments.
  • Ruthlessness. Nowhere is off bounds to a strike when you’re fighting for your life.
  • Keeping your pelvic floor muscles lightly tensed so that your body works as a single unit.
  • Every defence is also an attack.
  • Stance is very important. From a strong stance, your blows have much more force as you do not move backwards when you strike. All your force goes into your opponent, rather than rocking you backwards.
  • Upsetting the stance and breaking the guard of your opponent is a major goal. Once that’s done, they are at your mercy, you can keep them off balance by constantly moving forward.

I really enjoy Wing Chun. Also, it keeps me fit, and I think I’m much better equipped to deal with any sort of physical aggression as a result of my training. I haven’t tried any other school, but I’m happy with my current one, the International Wing Chun Academy.

"Norwegian Wood" by Haruki Murakami

Norwegian Wood is an excellent novel. I finished reading it at lunch today, and haven’t stopped thinking about it since. The novel is really subtle, and at the start, I wasn’t immediately interested. However, once I got into it, I couldn’t put it down. Toru, the narrator is so well developed in the novel that he seems almost like somebody I have met in real life. If you haven’t read it, don’t hesitate – start reading it right away! And don’t read any more of this post.

If you have read it, what do you think of the ending? I’ve read people suggesting that Toru committed suicide or similar, but I don’t believe that that is the case. For one thing, he’s got to live to 37 and catch a plane, as described at the start of the novel. I think the “dead centre” reference is due to Toru being dead centre of the “countless shapes of people walking by to nowhere”, rather than having died. I think the ending is happy. Or maybe I just want it to be. Here’s my interpretation. Toru is lost in the middle of nowhere. His old life was based around Naoko and Kizuki (plus Reiko as a link to them). They have all died or left. He is in the middle of nowhere. But Midori can rescue him from this. She is his anchor to reality and a new life. She will give his life direction and meaning – that’s why he calls out to her again. If anyone in the novel is a symbol of life, it is Midori, and by calling out to her, I can only understand that Toru has chosen to keep living and to pursue happiness. Midori’s silence is “the silence of all the misty rain in the world falling on all the new-mown lawns of the world”. That’s a positive image for me at least, pregnant with possibility.

If only I could read Japanese, perhaps I would understand better.

PS – Many thanks to my friend Jim for lending this most excellent book to me.

Some Random Writing

You’ve heard the expression ‘All men are the same’? That’s obviously not true. However, there are some things that most heterosexual men share. One of them is an inbuilt, natural response to stimuli, a certain bond that eats cultural differences for lunch, and that applies across all ages and languages. No matter what they pretend, a visit to a womans’ clothing warehouse is a daunting experience for a man.

Just look around. Sure, there are one or two women who look like they find shopping for clothes a chore. But the majority, see their rapt attention and concentration, circling the racks of clothes, looking, holding, touching, and cradling the cascading cloth against their bodies.

Now, for the men. You can see four sitting around the room – two are reading newspapers, one is operating a PDA and the last is just staring at his legs, spacing out. Only men sit in the chairs. They are the loved ones and drivers. Their opinion is sometimes sought, but generally only out of politeness. The women already know what suits them best.

Powered by WordPress & Theme by Anders Norén