Home

[icon] Blue Swiss Cheese ( 브루 쉬쓰 치즈) - November 14th, 2003
View:Recent Entries.
View:Archive.
View:Friends.
View:User Info.
View:Website (The Blues side of the Moon).
View:Memories. Projects. Freshmeat.
Missed some entries? Then simply jump to the previous day or the next day.

Tags:, ,
Subject:Man or Machine
Time:12:01 am
Current Mood:[mood icon] sleepy

"Well," said Programmer, "the customary procedure in such cases is as follows."
"What does Crustimoney Proseedcake mean?" said End-user. "For I am an End-user of Very Little Brain, and long words bother me."
"It means the Thing to Do."
"As long as it means that, I don't mind," said End-user humbly.


As I was telling Meredydd the other day, I'd rather write to a machine's spec than a user's. Someone needs to write about the art and science of UI design. I think there's a book on it already.

Glade has been acting up. It freezes on a select() call every time I paste an object in. I have to kill it everytime, and lose my work.
comments: Leave a comment Add to Memories Tell a Friend

Tags:, , ,
Subject:Self extracting tarball
Time:05:12 pm
Current Mood:accomplished
install_tar.sh:
   #!/bin/bash

   skip=9
   # blah blah blah
   tail -n +$skip $0 | tar jxvf - | (while read a; do echo -n "."; done; echo;)

   exit
   __LINE_8_END_OF_CODE__


and then cat whatever.tar.bz2 >> install_tar.sh

voila, you have a self extracting tarball. Don't forget the exit just before the __LINE_8_END_OF_CODE__, and make sure that that *is* the last line of your shell code.

set skip to the line where your tar.bz2 data starts.
comments: Leave a comment Add to Memories Tell a Friend

Subject:Intel aptitude test?
Time:05:18 pm
Someone sent me this piece of code saying it was asked in an aptitude test for Intel:
   int i, n = 20;
   for(i = 0; i < n; i--)
      printf("-");

You've got to get it to print - 20 times. You may add, subtract OR replace only one character in the above code.

I'm posting my solutions as a comment, and screening it for a while.

[update]my bad, the problem was wrong. n is initialised to 20. thanks kalyan[/update]

[update 15-11-03, 19:00 IST]I should add that I've got 3 solutions[/update]
comments: 27 comments or Leave a comment Add to Memories Tell a Friend

Advertisement

[icon] Blue Swiss Cheese ( 브루 쉬쓰 치즈) - November 14th, 2003
View:Recent Entries.
View:Archive.
View:Friends.
View:User Info.
View:Website (The Blues side of the Moon).
View:Memories. Projects. Freshmeat.
Missed some entries? Then simply jump to the previous day or the next day.