Skip navigation

Category Archives: computing+Life

I love sleeping (The type that we do alone). And I love being with the computer too. These two apparently, don’t go so well together. Scientific research has proved that usage of computers are directly connected to insomnia. No wonder I’m such an insomniac, ‘a night owl’ in other words. I love science and I tend to believe in scientific researches (Science works, bitches). But c’mon, looking at random funny pictures on Internet is fun. I’m not gonna reduce my computer usage to improve my sleep (lack of self discipline to be blamed, not me).

Crashed! /cc Gabriela Camerotti

Anyhow I want to stay up as late as I can and look at as many interesting things on wild wild webs and get on bed, crash in NO TIME, sleep tight and wake up sharp next morning. I rarely have problems with sleeping tight. I sleep like a log, one that has no sort of life left in, to be specific. But often falling asleep is the hard things. Stupid computer! I curse only till I fall asleep.

I was looking for ways to crash ASAP. Counting doesn’t work because it only waste my thinking power, doesn’t improve the fall asleep time by a micro second. One pitfall of counting is I feel like I lost in the count and waste a lot of time trying to figure out where did I miss few hundreds. And medications are not gonna work. It’s too much of work getting hands on them.

In my search for crash asap methods, lots of sources recommended practicing meditation. I really like the idea but again, :-/ it takes self discipline. A lot of self discipline. So all I did about meditation is saying “wow, cool!” at articles like this and forgetting it afterwards. But one day I found this article, “A Guide to Meditation for the Rest of Us“, which lead me to “Beat Insomnia with Blue Energy“.

And in one hard-to-fall-asleep night, I decided to gather all the self discipline I had and try what I’ve read. I also decided to hack the idea a bit and mix it up together. So read along to find out how I did it.

Following is an excerpt from an excerpt on “A Guide to Meditation for the Rest of Us”.

As you breathe in, count 1 in your mind, and as you breathe out, count 1. Breathe in, count 2. Breathe out, count 2. Continue through 10, then return to 1 again.


I do this for some time, counting to 10 twice or thrice while lying on bed (too lazy sit for this :P). And then do the blue energy thing. It sounds weird, you’ll laugh at yourself for doing this the first time but trust me and try it for several times.



1. Imagine your body filled with a blue gas, swarming all around, filling up every part of you.
2. Starting with your toes, to your feet and up your legs, slowly gather up all of this energy from each leg — feeling your toes, feet and legs relax as the energy leaves — and center it in your stomach area.
3. Do the same for your arms — slowly pulling the blue energy from the finger tips, hands, arms, shoulder and down into your stomach, letting it join the rest, creating an even larger ball of blue energy.
4. Again, pull the energy down from your head, neck and chest and add it to the spinning ball of blue energy that now fills your stomach area.
5. This ball of blue energy now contains everything — all of your worries, stresses and fears — and with it all together, shoot it out of the top of your head, through the wall, outside, and straight up into the sky. Watch it shoot past the tree tops, through the clouds and into space.
6. Feel your body relaxed and empty. Now, you’re ready to sleep.


That’s it. Read it once and have the idea in mind so that you can try it when you are ready.

After this blue energy thing I repeat the first step. I can’t really tell you how many times I do this. Hope you too won’t ever find it out.

I have tried this several times so far and it worked like a charm. I only do it if I realize I take too long to fall asleep. The reasons I like this so much are,

1. It really works for me.
2. It takes only a little effort and time.
3. It’s meditation.
4. It’s number 3 and yet takes only a little self discipline.
5. It lets me use computer the usual way.
6. It lets me crash quickly.
6. It gives me a good sleep and waking up feels good too.
7. Maybe it keeps nightmares away (Not enough data to confirm yet).

Still reading this? Good. So try it out. And don’t forget to share your ideas in comments.

I like Command Line Interface. Maybe I’ve been saying this earlier on my twitter if not on this blog. Since I started with GNU/Linux I was so fascinated with the CLI. The first reason was it’s something not everyone preferred. The next it’s the preferred way of all the hackers I read about in text files.

With time I learned why people called it’s easy and powerful. I was familiar with it to the point that I felt home in a text terminal with green text on black background. Then came the time I was looking for CLI tools for most of my day to day stuff. Ever since I found Amarok not doing well for me I didn’t use a GUI music player. Right now I’m using MoC and never had second thoughts.

And I recently had this moment I found GUI to be very confusing. And when I was thinking about it later it was very confusing for me to understand too. GUI are made to be easy to use right?.

It was the last semester and we were doing Prolog. There was a practical session in labs to get us familiar with the visual Prolog (I’m not certain though) interface. But as always I had a good reason to not go there which I can’t remember now. But there’s a limit even a student can push things off. And so came the day I do Prolog.

As you can imagine it was the last possible moment start with Prolog and I was in a hurry. I checked out the the IDE on a friends machine and I thought it’s the end.

What Visual Prolog presented me (thx @varunarl)

What I saw. cc public.resurce.org

If I found the software for GNU/Linux I would use it, somehow. But luckily I didn’t and found swi-prolog instead. I just wanted to write some code and see how it works. swi-prolog got me going in no time. I wanted to learn how to use consult and it was pretty much all about it. I learned how to do it in visual Prolog in order to help a friend. But it was still way too complicated.

Swi-prolog basic usage

I know that the fact I’m trying to convey is not really rational. But the point is, in the GUI environments all controls are visible and for a beginner that can be too much. But in the CLI I only chose what I want. I learned both swi-prolog and visual Prolog with guides found on internet but I’m sure I took more time to filter out the necessary details in visual Prolog guide.

I didn’t do any serious programming in Prolog so I can’t say how each tool would serve you in such a scenario. But in my situation the CLI tool saved me a lot of frustration and time which helped me achieve required knowledge level for the exam. And on a not so related side note, *surprise surprise* I have passed that module :D.

Story
Once I was at an ATM machine, of course to get some money for a gift to a friend of mine. I keyed in the amount & was waiting for money. The machine took a while, printed the receipt, gave out the card. Yes that’s all. I got no money but a receipt saying that the machine gave this amount of money & that amount of money left in the account. I lost my tongue except to murmur Faaaark!. I pushed my card back in checked the balance in account & the machine was very happy to say that I’ve just lost this amount of money.
The gift I was planning to by was intended to be a wedding gift & my friend was/is not the kind which is gonna marry again ;). I went to the bank, talked to the pretty girl & my story didn’t amaze her in any mean. Hmmm…That’s something to think about.

Thoughts
Facing that inconvenience, my mind kept thinking of the very thing a lot, I mean about the technical stuff. Why the machine don’t handle that very little but so very important event? What’s the system run on an ATM machine? is it an embedded system? does it run GNU/Linux? :) hell a lot to think.

chit-chat
After few days I went on a long tour with two of my geek friends & the topic ATM took priority at a time. And my friends provided me with these info. There are ATM machines which runs Microsoft Windows XP :D (in Sri Lanka) & earlier days it was OS2, according to Such. Kunchana has seen windows XP booting on an ATM after a power down. [Wikipedia confirms Such and Kunchana :)]

Assumptions/Solutions
In thinking deep about ATM machines I made some assumptions in my mind.

1) The machine keeps track of the money using some kind of a hardware mechanism or someone adds money & update records on the machine. So that the machine keeps track of the amount remaining. If this is the case it’s only a matter of a software modification to compare the remaining amount and requested amount to stay away from hassles.

2) Since there was no evidence to backup above assumption, I happen to think that ATMs don’t keep track of the amount of money they have. So in order to avoid problem I faced, the machines have to have a mechanism to keep track of remaining amount of money and of course compare the remaining and requested amounts.

appendage (17/12/09) :
This was quite an old writeup I never had chance to post till now. This is totally black boxed thinking without looking up Internet for more details how an ATM works. The incident I mentioned happened at Commercial Bank Nugegoda. I got the money back in my account in few days (The bank fixed it manually, I guess). I’ve heard few other cases like this but never again happened to me. And also Things should be changed and these problems should be ironed out by now. Anyway Off to Look up “How ATM works” :D

PS: And the friend who got married was geekaholic :D . The incident occurred  someday around 20/06/08, the wedding day.

The privacy is again in hot zone of topics in communities I follow. The reason is @ericschmidt, Google CEO Eric Schmidt.

The register reports, “If you have something that you don’t want anyone to know, maybe you shouldn’t be doing it in the first place,” under the heading “Google chief: Only miscreants worry about net privacy”. That’s how journalists do it. Let’s have a better perspective on the subject.

“Judgment matters… If you have something that you don’t want anyone to know, maybe you shouldn’t be doing it in the first place… If you really need that kind of privacy, the reality is that search engines – including Google – do retain this information for some time and it’s important, for example, that we are all subject in the United States to the Patriot Act and it is possible that all that information could be made available to the authorities.”

Quoted from Eric Schmidt on CNBC video found here (some interesting stuff about Schmidt too ;) ).

Doesn’t really sound as bad as The Register report, but still it’s bad.


Google has to obey the laws, I agree, and the laws are not perfect. Anyway laws and regulations is not the only reason they track and log certain information. It’s a part of their business model.

Google offers simply awesome services and I find it really difficult to stay away from all that awesomeness thinking of privacy issues that doesn’t seem to be hrmful for the time being. Hope it’s the case for you too.

It’s not only Google that we should be alarmed of. Recently Yahoo said something similar to “Our Spy Capabilities Would ‘Shock’, Consumers“. Is that sound frightening?

So I think it’s the time to at least stay concious about these issues, if not to stay away. I would rather ask Google than a friend, of a private and sensitive question, thinking my secret is also gone with the closed search page. But it’s not the case anymore. Unfortunately.

Note: Find some interesting ideas about privacy, on secutiry guru Bruce Schneiers blog

I was compiling Qt from source. And had loads of issues. This is what I learned after all.

1. Errors are chances to learn.

2. Never copy paste command / code blindly from somewhere on the Internet.

Even if it’s very trustworthy source. Copy paste process might produce errors to ruin your day :). Check the code for yourself. Especially beware of commands/codes looking ‘obvious’.

3. When you ask for help give the helper everything.

Not what YOU THINK is useful.
When you get troubles your sanity shakes a bit :).

4. It’s always helpful.. well.. to sleep.

http://news.bbc.co.uk/2/hi/health/8090730.stm . They are right. Believe me.

5. Sometimes it makes sense to “start it all over again”.

Hunting errors one buy one might probably be a Goose chase.

6. It’s always good to have nice & helpful friends & community around :) .

7. You should never trust a machine.

8. You better have good Internet.

I’m not talking about these guys. ?

Follow

Get every new post delivered to your Inbox.

Join 1,048 other followers