Cryptonomicon is quite possibly one of the best works for fiction that came at around the start of the millenia. Neal Stephenson has been amazing as always with his foresight and how he has integrated the stories of (almost) modern day crypto and the World War II developments. However, I’ve never really gotten around to finish it and I’ve tried 3 times already!
1. The first time I saw this book was in the American Library which used to be in the compounds of Hotel Yak and Yeti in Nepal. I don’t exactly remember why I stopped reading (it was around October/November 2006) but something tells me I was busy prepping for SATs and reading a book for leisure wasn’t in the lists then. I kept the book around for a while and gave up on it a little later.
2. The second time I tried to read the book was during winter vacation of 2008. I was back in Nepal and got a few books with me. Including Anathem and Cryptonomicon. However, due to laziness (perhaps some sensibility to get some rest), I didn’t really start reading until the last two weeks and then ended up leaving it at home
3. Now, I’ve started reading the book again. And guess what, due to some bizzarre turn of events I lose the book (hopefully temporarily).
Here’s what happened this time around. I was travelling to Dover,New Hampshire in the C&J Trailers bus from Boston, MA yesterday. I wanted to use the restroom and went to the back of the bus. I left my “Cryptonomicon” book on the seat. However, someone was in there and I decided to stay in one of the empty seats and wait for a bit. The bus stopped at NewBuryPort and I waited. After finishing my job at restroom, I return back to my seat and ahoi! someone else is in my seat. Awkwardly, I sit on the seat right behind my previous seat. Even more awkwardly, I nudge the woman in my seat to ask “Did you see a book when you sat down?” She apparently didn’t see anything when she sat down but was keen enough to notice that someone handed a book to the authorities at NewBuryPort. She asked me what the book was about, I reply “it’s about code breaking in the modern world and during World War II.” She mentions the recent news about coded message to Thomas Jefferson being broken. After exchanging some niceties, it dawned on me that I nothing really better to do except watch the ongoing video in the bus, “The Addams Family.” For some reason, C&J seems to find really good series to watch during the trips.
When I got off in Dover, I ask the driver if someone had given a book in NewBuryPort, after a little misunderstanding, he called up the people in NewBuryPort and arranged to get my book back to Dover, where I could pick up anytime I wanted. So much for reading it this weekend!
The nice part is, I’ll finally get to read it on my trip back.
Lesson of story, don’t go to restroom when the bus is about to stop. I’m just grateful to the good Samaritan who turned the book in.
However, what I’ve noticed is that your application might try to play the junk at the end (with terrible squeaky noise) or just crash (errrm, most windows apps?), so be careful if you are playing those songs at parties.
I am a huge fan of Eclipse. However, I should be honest in that Netbeans was my first Java IDE and that’s where I learned most of Java from (before college of course). So, it still holds some special place in my heart. What I like about Netbeans is that it makes GUI design in Swing very easy if you know how to do it properly. However, after Netbeans 4.5, I felt it lost some of the focus I wanted for Java and it seemed to make things harder to do that I’d like. Of course, I was into eclipse already and didn’t see much point in switching to another IDE for the hell of it. Who will memorize all the shortcuts for me?
Now, of course I had this crazy idea to work on IRC again which soon enough turned to cloning a popular chat client. Now, I needed to make some user interfaces. After trying to do it old fashioned way in Eclipse for about an hour, I decided to download Netbeans 6.5.1 and give it a go. What I discovered was that I can import my eclipse projects
from File>Import Project > Eclipse Project
You give the eclipse project location in the workspace and your Netbeans project location
After you work with it for a bit, for example work on making a GUI, you can just right click the project and say resynchronize with Eclipse
You can safely go back to eclipse and work more (after doing refresh in Eclipse of course)
I’d been wanting to do some programming with eclipse itself. However, writing a full blown plugin for something rather simple is not exactly fun. Then I discovered Eclipse Monkey a few days back. I decided to give it a run when I came across a simple problem of commenting a specific method in my code. Yes, this is very useless but a good start IMO.
So, here’s my first experience with Eclipse Monkey:
This example just comments lines with stall function. Yeah kinda lame, but okay for a first shot IMO
In the meantime, checkout https://github.com/prasincs/eclipsemonkey-scripts/tree
where I’ll be posting more of these eclipsemonkey scripts
/*
* Menu: Editors > Comment Stalls
* Kudos: Prasanna Gautam
* License: EPL 1.0
* DOM: http://download.eclipse.org/technology/dash/update/org.eclipse.eclipsemonkey.lang.javascript
* OnLoad: main()
*/
var comment = "//";
function main(){
var sourceEditor = editors.activeEditor;
var valid = true;
// make sure we have an editor
if (sourceEditor === undefined) {
valid = false;
showError("No active editor");
}
if (valid){
var newSource = "";
var source = sourceEditor.source;
var parts = source.split('\n');
for (var i = 0; i< parts.length; i++){
if(match=parts[i].match(/^((?:\s+)?stall.+)/)){
newSource +="// ";
}
newSource += parts[i] +"\n";
}
sourceEditor.applyEdit(0,source.length, newSource);
}
}
For more info on Eclipse Monkey, visit:
http://aptana.com/monkey/
Update:
Sorry for posting code from wrong file (one of the example ones)
My spring break has been very fruitful to say the least. In the process of working with Android, I have created some side projects that I think might be useful to a lot of people. They’re on git, so feel free to follow, fork, hack whatever you like.
This one is supposed to be expanded and made better as time goes. However, this will never improve from the hodgepodge of small tools that don’t exactly do anything useful. It’s more for learning Android APIs/Intents. I wrote it as a proof of concept for my POSIT application but I feel you can use it anyways.
This is more like typical hacker project as in I wrote it to solve my own problem and to kinda challenge myself to write a quick (and somewhat complete) Android application (did in around 3 hours inc. debugging). At Trinity College, we have a shuttle system of two buses that go around the campus from 6pm to 1pm (I think). They have a nice website setup at http://gps.trincoll.edu and even a mobile website. But, it’s somewhat painful to open a browser, type up the link and load the google javascript and all.. well, let’s just say I’m lazy to press a few more buttons. So, with a little poking around I figured they’re getting data as RSS feed from http://trinity.ublip.com/readings/public. After that it was just writing the XMLParser, RSSFeed readers and some hacking around with MapView. Yes, I forgot to add <uses-library> for using MapActivity again! (I’m adding this as a reminder to myself too).
Ok, this is a cute little video I found at geeksaresexy.net. Apart from the graphics and all the mushy stuff, I like the user interface that has been imagined here.
I wonder if I could call it epiphany the moment someone thought
Hmm…. what if I could cat over the network?
cat: the essential unix tool to read and write files. FYI, the name comes from concatenate (source: comp.unix.shell…. I mean wikipedia). Possibly the simplest yet the most powerful unix tool ever made.
Meet netcat, called the TCP/IP swiss army knife. It is probably the most useful networking tool to have been made for unix and with cygwin, for windows too. Some of its possible uses are port scanning, transferring files, turning any command line app to run over the network and oh yeah, to put backdoors. I’ve used it for these things every once in a while.
So, I had to backup my /home directory in Linux because the system was fscking up (more on that once I am sure what exactly was wrong with it). Sending 40+ GBs over the tubes is a terrible idea when you aren’t sure when your computer is going to hang up. However, I have a windows box with lot of free space. Using winscp is a good idea for small enough files is nice, but bad for a lot of small/big files but I wasn’t even sure saving would protect the protect the permissions. Winscp is just slow and makes very little sense in a secure LAN most of the time. I’ve had problems with that when I move files over the network to windows machines for backup. Another idea was to make a tar file and just move that over the network using ftp.But, I don’t exactly have any free space to tar a file and then move. Then I thought about netcat. Maybe someone has ported to windows too, afterall it is very useful.
for most of the things, it seems to work like the unix one and does it pretty well. I even got to spawn the windows commandline shell using
nc -p 3444 -l -e cmd.exe
and then
telnet <host> 3444
on my linux box to get the windows shell.
Anyways, the way I am doing my backup is just the usual set of commands:
nc -p 333 -l -v > F:\backup-home.tgz
and then
sudo su
# tar czvf – /home | nc 192.168.1.135 3333
Simple enough and I am getting pretty good speed as my files get backed up. Now I think the catch here is that if the connection is broken or I start downloading some crazy big file, it halts the download. While I was downloading, I decided to write a blog post and i wanted to try the windows live writer. As I was running the web based downloader, it apparently hogged all the bandwidth (overzealous MS products again) and my download halted for a while.
Further Info:
If you managed to read/skim through my rant, here are some resources that you might like. I don’t really like regurgitating everything from another site, so I’m putting up some interesting links.
OK, Finally a blog post after a while. From the title, it probably seems like I’m undergoing a crazy crisis related to time. If this was a science fiction like Doctor Who, I’d get on my tardis go back in time and fix up a few things, or just go back every once in a while to make some more time for myself. Alas, that’s not really possible and I’m stuck as a mere mortal trying to make the best of the 24 hours allocated to me. So, what have I been up to? For one, I went back home and didn’t take any pictures of my visit (How do you like that?) which prevents me from posting anything useful at all.
My Nepal Visit
Spending time with my family
Getting allergic every time I went out.
Oh yeah, my tolerance for pollution is very low.
Writing paper for ISCRAM
Spent a week in 16-hour loadshedding schedule to finish the paper.
Great book by Thomas Friedman about global warming, climate change and more so, how to solve it.
Not exactly as good a read as The World is flat but definitely better.
Hmm.. Just this one list might make a bunch of blog posts, when I come to think about it. However, it’s to be noted that, I wasn’t exactly in mood to work that much when I was in Nepal. Blogging was almost out of the question back then. Thanks to my poor health (low tolerance to dust, smoke), I got to spend more time with my family and read books and write the paper on POSIT. I got the sad news on Feb 16, 2009 that it didn’t get accepted by the iscram selection committee but oh, well.. move on.
Structure and Interpretations of computer Programs
Database Fundamentals
Scientific computing with Perl
Mastering Regular Expressions
It’s like I’ll keep re-reading this book forever
Godel, Escher and Bach
I might never finish reading this book. Its like I take two steps forward and one step back.
All the goddamned blogs with all their stupid posts I have to go through for the good ones.
Yeah, the point of this blog post is that.. these things are just some of the things I’ve been doing lately, and there are still a lot of things I’d like to do or spend doing anyways. I’ll keep posted. I might even retroactively add a few things to this one. However, it’s pretty long as it is.