lunatechian (lunatech-ian)

one relating to, belonging to, or resembling lunatech

Mon Oct 20 2008

I woke up rather late today (around 8 AM). I have been suffering from back pain for the past 3 days. Hopefully, it should get better tomorrow. This has made me miss my workout.

Today I started on the G. M. Diet to reduce my weight. I have been eating fruit for the whole day. This is supposed to help the body to detox. I did not have a carving for any other food. I hope I am able to get through the one week of this diet plan successfully.

Surprisingly, it rained a lot in the afternoon today, but the weather was pleasant.

Defined tags for this entry:

lunatech-journal.el

I have created a emacs major mode, called lunatech-journal, that I use for blogging. It is a derived mode from muse-mode, an excellent mode for writing and publishing.

Currently, it has following functions defined

  • lunatech-journal-skeleton - loads a skeleton for blogging
  • lunatech-journal-show-hints - shows a buffer with questions to help me blog about my day
  • lunatech-journal-make-html - creates a html file from the muse-mode
  • lunatech-journal-preview - allows me to preview my journal in the browser

I use a php script to post the blog entry to the website. To use it, I have the following in my .emacs file

(defun journal ()
  (interactive)
  (find-file "~/blog/journal.muse")
  )
(require 'lunatech-journal)
(add-to-list 'auto-mode-alist '("journal\\.muse\\'" . lunatech-journal-mode))

When I feel the need to blog, I do M-x journal, I get dropped into my journal file and I can blog.

Links:

Defined tags for this entry: ,

some commentary on Bangalore traffic

The most favorite activity that Bangaloreans indulge in is Trafficking. It is a social activity surpassing the bounds of caste, creed or religion. Every morning and evening all the people in Bangalore come out on to the streets with whatever vehicle(s) they own and create a mass procession. They honk, rev engines, brake hard, bump, double park, shout, jump traffic lights ... its a mass revelry. — Taken from Uncyclopedia

After living here for three and a half years, I think I can say with some authority that commuting in Bangalore is a daily adventure. Every day there is something unpredictable that will happen and will affect the flow of traffic. Either a truck would be parked on the wrong side of the road, or a car would have broken down, or the traffic police would mark one of the roads as one-way.

There is a "magic window" in the Bangalore traffic. This is the time when the traffic flows without the interruptions of the traffic police and the heavy trucks have not yet come out on the roads. If you are able to get to your destination in the magic window, your day will be relatively tension free.

The amount of time wasted on the streets is staggering. If we add the cost we pay in terms of health and peace of mind, the costs would be enormous. To give you an idea, the route to reach my office is around 12 kilometers from my home. However, it takes me around 30 minutes to cover this distance.

In my opinion, a two wheeler is the best way to navigate your way around Bangalore. It is easy to work your way around cars and trucks waiting at the traffic signal. Not to forget, the savings on the petrol bill.

Speaking of cars, I don't understand why people buy luxury cars in Bangalore. I have seen quite a few traffic snarls caused by one luxury car going slow or waiting to take a turn.

Anyhow, enough of my rantings.

Defined tags for this entry: , ,

testing, testing

testing, testing - 1, 2, 3

I should now be able to set the categories of my post.

This post is brought to you by emacs, php and lots of cups of tea.

Defined tags for this entry:

innodb and blobs

Are you planning on storing blobs in Innodb tables? If yes, think again. According to the manual,

InnoDB stores the first 768 bytes of a VARBINARY, VARCHAR, BLOB, or TEXT column in the row, and the rest into separate pages.

This translates into slower retrieval for blobs. However, InnoDB can skip reading blobs if they are not in select column list.

One solution for this is to keep blobs in a separate myisam table and do a join when you need the blob column.

Defined tags for this entry:

mysql bugs

If you are a heavy user of MySQL, I think you will appreciate this list of saved bug searches. For example, check out "p1_bugs_in_5.1" or "ActiveInnoDBBugs" These saved searches are also available as rss feeds.

Defined tags for this entry: