Mitch Altman talks about how TV takes away 13 years of 70 years of an average American's life. He hates TV so much that he created a universal remote called TV-B-Gone.
Here is a talk he gave on hacking life for fun and profit - http://video.google.com/videoplay?docid=-4600578110948529551&hl=en
Some salient points -
1. Watch more TV be less happy.
2. TV is one of the causes of obesity.
3. Advertisements makes one feel inadequate and discontented.
4. TV watching is the only non-natural activity that causes our brains to radiate alpha waves. Our brain releases alpha waves when we are falling asleep, drowsy or
sleep. This implies we are more susceptible to advertising.
Some nuggets from the talk -
If you're building a project around some thing you like
make sure your damn well love it because parts that are uncool are incredibly uncool. If you don't love it you'd hate it more than anything you've hated in your life.
The bad things in life are still there but now there are so many cool things to do and choose from.
Choose well what you do with your time. Do what you love and world would be a better place.
Saturday, March 28, 2009
Thursday, March 26, 2009
The Sawmill
As I walked into my parking lot a small smile came to my lips. A smile that comes with knowledge of familiarity.
As a kid I used to visit my grandparents' sawmill. The mill is still there but they aren't. They were older than the mill. The passage to the mill was piled with fresh logs on both sides. The greatest attraction of the mill for me was it's big wooden pan balance right at the entrance. Others liked the new electric sawing machine. I loved to swing on the balance. Sometimes I'd get weighed against firewood, sometimes against the weights that I could not lift.
In summer my cousins, my brother and I'd play hide and seek in the mill. Behind the logs, over the shed, heap of sawdust, and dingy cowshed were our hiding places. Sometimes we'd climb the shed and pluck wood apple and jamun (kind of a plum). Granddad would yell urging us to be safe and not to pluck the raw fruits. We'd take these fruits home to aunt. Jamun made for immediate consumption. We'd take a glass full of them, washed and salted. When we were done eating each of us will compare whose tongue was darker shade of purple.
After the hard day at mill body would itch with sawdust and lungs would be saturated with smell of damp wood, wood shavings, sawdust and rat poop. We would go back the next day nonetheless.
It's this nostalgic smell I've found in my parking lot emanating from the mulch of wood chips.
As a kid I used to visit my grandparents' sawmill. The mill is still there but they aren't. They were older than the mill. The passage to the mill was piled with fresh logs on both sides. The greatest attraction of the mill for me was it's big wooden pan balance right at the entrance. Others liked the new electric sawing machine. I loved to swing on the balance. Sometimes I'd get weighed against firewood, sometimes against the weights that I could not lift.
In summer my cousins, my brother and I'd play hide and seek in the mill. Behind the logs, over the shed, heap of sawdust, and dingy cowshed were our hiding places. Sometimes we'd climb the shed and pluck wood apple and jamun (kind of a plum). Granddad would yell urging us to be safe and not to pluck the raw fruits. We'd take these fruits home to aunt. Jamun made for immediate consumption. We'd take a glass full of them, washed and salted. When we were done eating each of us will compare whose tongue was darker shade of purple.
After the hard day at mill body would itch with sawdust and lungs would be saturated with smell of damp wood, wood shavings, sawdust and rat poop. We would go back the next day nonetheless.
It's this nostalgic smell I've found in my parking lot emanating from the mulch of wood chips.
Sunday, March 22, 2009
Unlocked iPhone
After several failed attempts at craigslist and unwillingness to sign a 2 year contract my wait finally got over today. I bought a 4 GB 1st generation iPhone.
I attempted to jailbreak and unlock with QuickPWN but it did not quite go well on mac. I guess because I failed to put iPhone in DFU mode a couple of times. When I tried again iTunes blew raspberry with "An iPod has been detected, but it could not be identified properly. Please disconnect and reconnect the iPod, then try again. 2001"
The phone didn't turn on again. I guess this is what they call being brick. I restored my iPhone by holding down home key and connecting to pc with iTunes (8.0) already running. I let iTunes update the software version to 2.2.1 and restore it to factory setting. This took about 25 mins.
So the phone was alive again! Then back to unlocking and jailbreaking.
1. Download and unzip QuickPWN - Software Version: 2.2.5-2 from www.quickpwn.com.
2. Download bootloader file from http://www.mediafire.com/?990ml2wzcuz and unzipped to get bootloader 3.9 and bootloader 4.6.
3. Download iPhone1,1_2.2.1_5H11_Restore from www.quickpwn.com.
All the above downloads should be in the same folder. Close iTunes while your iPhone is still connected to pc. My iPhone had the unactivated AT&T sim card while I unlocked it.
With all the downloads ready and phone connected run QuickPWN. It would guide you thru all the steps. Most important step is while putting the phone in DFU mode. Do not release the home key until iPhone screen turns white. That is when QuickPWN has started to run your iPhone.
After that its a cake walk. But yes replacing the sim is a little unconventional too!
Here's my apple and iPhone :)
I attempted to jailbreak and unlock with QuickPWN but it did not quite go well on mac. I guess because I failed to put iPhone in DFU mode a couple of times. When I tried again iTunes blew raspberry with "An iPod has been detected, but it could not be identified properly. Please disconnect and reconnect the iPod, then try again. 2001"
The phone didn't turn on again. I guess this is what they call being brick. I restored my iPhone by holding down home key and connecting to pc with iTunes (8.0) already running. I let iTunes update the software version to 2.2.1 and restore it to factory setting. This took about 25 mins.
So the phone was alive again! Then back to unlocking and jailbreaking.
1. Download and unzip QuickPWN - Software Version: 2.2.5-2 from www.quickpwn.com.
2. Download bootloader file from http://www.mediafire.com/?990ml2wzcuz and unzipped to get bootloader 3.9 and bootloader 4.6.
3. Download iPhone1,1_2.2.1_5H11_Restore from www.quickpwn.com.
All the above downloads should be in the same folder. Close iTunes while your iPhone is still connected to pc. My iPhone had the unactivated AT&T sim card while I unlocked it.
With all the downloads ready and phone connected run QuickPWN. It would guide you thru all the steps. Most important step is while putting the phone in DFU mode. Do not release the home key until iPhone screen turns white. That is when QuickPWN has started to run your iPhone.
After that its a cake walk. But yes replacing the sim is a little unconventional too!
Here's my apple and iPhone :)
Sunday, December 07, 2008
OpenCobol Compiler
I was looking for a COBOL compiler to use compile a matrix multiplication program. I found and downloaded openCobol using Synaptic.
I wrote a simple "Hello World" display program but it would not complie for lack of lncurses. I cursed and installed libncurses5-dev. The program compiled and ran just fine.
OpenCobol translates COBOL to C and then compiles C program using Gnome C compiler. COBOL code is compiled using "cobc -x pgmname.cob" and if you want to see how your COBOL program looks in C try "cobc -C pgmname.cob"
Detailed instructions are available in user manual on openCobol.org
Sample Hello World COBOL program
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLOW.
ENVIRONMENT DIVISION.
DATA DIVISION.
PROCEDURE DIVISION.
DISPLAY "HELLO WORLD".
STOP RUN.
C Program from Cobol program
/* Generated from HELLOW.cob by cobc version 0.33 patch level 0 */
#define __USE_STRING_INLINES 1
#include
#include
#include
#include
#include
#define COB_SOURCE_FILE "HELLOW.cob"
#define COB_PACKAGE_VERSION "0.33"
#define COB_PATCH_LEVEL 0
/* function prototypes */
static int HELLOW_ (const int);
int HELLOW (void);
/* functions */
int
HELLOW ()
{
return HELLOW_ (0);
}
/* end functions */
static int
HELLOW_ (const int entry)
{
#include "HELLOW.c.h" /* local variables */
static int initialized = 0;
static cob_field *cob_user_parameters[COB_MAX_FIELD_PARAMS];
static cob_module module = { NULL, NULL, NULL, NULL, cob_user_parameters, 0, '.', '$', ',', 1, 1, 1, 0, 0};
/* perform frame stack */
int frame_index;
struct frame {
int perform_through;
void *return_address;
} frame_stack[255];
/* Start of function code */
if (unlikely(entry < 0)) {
if (!initialized) {
return 0;
}
initialized = 0;
return 0;
}
module.next = cob_current_module;
cob_current_module = &module;
if (unlikely(initialized == 0))
{
if (!cob_initialized) {
cob_fatal_error (COB_FERROR_INITIALIZED);
}
cob_check_version (COB_SOURCE_FILE, COB_PACKAGE_VERSION, COB_PATCH_LEVEL);
if (module.next)
cob_set_cancel ((const char *)"HELLOW", (void *)HELLOW, (void *)HELLOW_);
(*(int *) (b_1)) = 0;
(*(int *) (b_2)) = 0;
(*(int *) (b_3)) = 0;
initialized = 1;
}
/* initialize frame stack */
frame_index = 0;
frame_stack[0].perform_through = -1;
/* initialize number of call params */
(*(int *) (b_3)) = cob_call_params;
cob_save_call_params = cob_call_params;
goto l_2;
/* PROCEDURE DIVISION */
/* HELLOW: */
l_2:;
/* HELLOW.cob:6: DISPLAY */
{
cob_new_display (0, 1, 1, &c_1);
}
/* HELLOW.cob:7: STOP */
{
cob_stop_run ((*(int *) (b_1)));
}
cob_current_module = cob_current_module->next;
return (*(int *) (b_1));
}
/* end function stuff */
So much for a two line code
#include
main()
{
printf("Hello world\n");
}
I wrote a simple "Hello World" display program but it would not complie for lack of lncurses. I cursed and installed libncurses5-dev. The program compiled and ran just fine.
OpenCobol translates COBOL to C and then compiles C program using Gnome C compiler. COBOL code is compiled using "cobc -x pgmname.cob" and if you want to see how your COBOL program looks in C try "cobc -C pgmname.cob"
Detailed instructions are available in user manual on openCobol.org
Sample Hello World COBOL program
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLOW.
ENVIRONMENT DIVISION.
DATA DIVISION.
PROCEDURE DIVISION.
DISPLAY "HELLO WORLD".
STOP RUN.
C Program from Cobol program
/* Generated from HELLOW.cob by cobc version 0.33 patch level 0 */
#define __USE_STRING_INLINES 1
#include
#include
#include
#include
#include
#define COB_SOURCE_FILE "HELLOW.cob"
#define COB_PACKAGE_VERSION "0.33"
#define COB_PATCH_LEVEL 0
/* function prototypes */
static int HELLOW_ (const int);
int HELLOW (void);
/* functions */
int
HELLOW ()
{
return HELLOW_ (0);
}
/* end functions */
static int
HELLOW_ (const int entry)
{
#include "HELLOW.c.h" /* local variables */
static int initialized = 0;
static cob_field *cob_user_parameters[COB_MAX_FIELD_PARAMS];
static cob_module module = { NULL, NULL, NULL, NULL, cob_user_parameters, 0, '.', '$', ',', 1, 1, 1, 0, 0};
/* perform frame stack */
int frame_index;
struct frame {
int perform_through;
void *return_address;
} frame_stack[255];
/* Start of function code */
if (unlikely(entry < 0)) {
if (!initialized) {
return 0;
}
initialized = 0;
return 0;
}
module.next = cob_current_module;
cob_current_module = &module;
if (unlikely(initialized == 0))
{
if (!cob_initialized) {
cob_fatal_error (COB_FERROR_INITIALIZED);
}
cob_check_version (COB_SOURCE_FILE, COB_PACKAGE_VERSION, COB_PATCH_LEVEL);
if (module.next)
cob_set_cancel ((const char *)"HELLOW", (void *)HELLOW, (void *)HELLOW_);
(*(int *) (b_1)) = 0;
(*(int *) (b_2)) = 0;
(*(int *) (b_3)) = 0;
initialized = 1;
}
/* initialize frame stack */
frame_index = 0;
frame_stack[0].perform_through = -1;
/* initialize number of call params */
(*(int *) (b_3)) = cob_call_params;
cob_save_call_params = cob_call_params;
goto l_2;
/* PROCEDURE DIVISION */
/* HELLOW: */
l_2:;
/* HELLOW.cob:6: DISPLAY */
{
cob_new_display (0, 1, 1, &c_1);
}
/* HELLOW.cob:7: STOP */
{
cob_stop_run ((*(int *) (b_1)));
}
cob_current_module = cob_current_module->next;
return (*(int *) (b_1));
}
/* end function stuff */
So much for a two line code
#include
main()
{
printf("Hello world\n");
}
Saturday, December 06, 2008
First Firefox Extension
Thought of trying out some thing new and I wrote the "Hello World" Firefox extension. Precise instructions and explanation are available at https://developer.mozilla.org/en/Building_an_Extension.
The profile folder mentioned in the instructions is ~/.mozilla/firefox/*.default/extensions
After creating the id file in extensions folder when you restart you firefox, the addon window notifies that a new add on has been added.
You can uninstall your extension like any other extension. Uninstalling removes the id file from the extensions folder.
EDIT: An excellent tutorial here - http://www.borngeek.com/firefox/toolbar-tutorial/
The profile folder mentioned in the instructions is ~/.mozilla/firefox/*.default/extensions
After creating the id file in extensions folder when you restart you firefox, the addon window notifies that a new add on has been added.
You can uninstall your extension like any other extension. Uninstalling removes the id file from the extensions folder.
EDIT: An excellent tutorial here - http://www.borngeek.com/firefox/toolbar-tutorial/
Tuesday, December 02, 2008
Color Pencil Drawing - Sleeping Dogs

This is my first color pencil drawing. I took four hours to do it. Ear of the dog in front looks as if it has been wrung.
Made the preliminary sketch while listening to PG's Great Hackers
Subscribe to:
Posts (Atom)
