about this blog icon

Welcome to my blog, dear reader.

I feel great that I have finally launched this blog because it was my dream to launch it two years ago when I bought this domain catonmat.net. Hackers love cats, don't they? lolcatz. ;)

So why did I start this blog and what am I going to write here?

First of all let me introduce myself a little (more information about me on about page).

My name is Peteris Krumins (pronounced as Peter Croo-mins). I am 22 years and I am finishing my Physics degree the next year. There is a good reason why I did not choose Computer science as my major. By the time I finished high school I already had great work work experience as a programmer, linux sysadmin and a white hat (computer security). After I get a B.Sc. in physics I am going for a M.Sc. degree in Computer Science, hopefully at MIT. I find Computer Science M.Sc. programme much more challenging than B.Sc programme and consider it worth spending time on. I am applying to MIT this autumn. MIT has been my dream for a few years now since I found MIT's OCW video lectures and saw how cool they are. (Little self promotion: I loved the video lectures so much that I started a free video lecture blog and free science video clip website which have become pretty popular).

So I have really good understanding of programming and have found two great approaches to software development. These approaches seem to be pretty well known and someone might say that they are wrong but I am going to show that they are not wrong and are efficient.

One of them I call "the hacker's approach" which basically means you just create cool stuff quickly that works by using anything you have available. And if something doesn't work you just get it working asap without getting into much details why it didn't work. Might sound pretty lame but I am going to demonstrate in some of my posts that you can quickly create cool tools and software with little effort.

The other approach is what the title of this blog says "good coders code, great reuse". This approach is similar to "the hacker's approach" but it does not require that you create your software quickly and dirty. It just means you reuse existing libraries and spend little effort writing stuff that has already been written. Software reuse so to say. There are so many libraries and code available on sourceforge, code.google, freshmeat and many other sites that most of all the solutions to problems are there.

By using these two approaches I will create some great free software and will try to monetize it so I can make enough money for MIT :)

I have been reading about Internet Marketing for the last year so I will definitely do a few software project from A-Z to learn more about software marketing and to teach you how it can be done. I will create open source software and document each step on this blog - what I learned, how I did it, how it worked and how I marketed it.

Also I have this list of 50 or so cool software ideas I have thought of during the last 3 years while studying physics which I have not coded myself but will theorize on how to implement and actually implement some of them, and write about what alternatives we have for them at the moment. For example, English is not my native language so I sometimes struggle getting grammar right. When in doubt, I usually query Google with the grammar form in question to find which form would return more hits. The one with the most hits probably has higher change of being correct. So I have an idea of writing a tool which checks grammar or expressions in any language based on how many hits Google returns. Or another example, there is this viemu software which emulates vi key bindings in Visual Studio, how hard would it be embedding vim in Visual Studio? I don't think it's that hard, probably some days of hacking to understand Visual Studio SDK and you get a fully fledged vim in Visual Studio. You get the idea.

Some of my posts will be how to do things with the wrong tools. A topic which I really love myself. Could be considered a hacker's approach because a real hacker would need to figure something out to accomplish the job if he did not have the right tools. The usual scenario for doing something with a wrong tool is choosing some tool and setting a goal to do something with it. For example, I was recently learning AWK programming language for fun and after a few hours of hacking I decided to watch a YouTube video just for relaxation. I love watching YouTube videos. Reasonably, I would like to download some of my favorite videos so I could view them on my laptop or phone. I thought wouldn't it be great if I could could download the videos with AWK? A quick Google search for awk + networking brought up results with GNU implementation of AWK - GAWK. And this implementation has networking support. So after a few tens of minutes I found a way to download my favorite YouTube videos with AWK. Pretty neat, huh? :) (I already wrote this tool, here is the post - downloading youtube videos with gawk)

Alright, I mentioned I had worked as whitehat. Really cool job to hack and to get paid for it. During my practice I found that many boxes were "secured" through obscurity. For example, having an internal web server (for outside access) forwarded on port like 31234. Surely, this is no security. So I came with this idea of hacking through obscurity. I just had to name regular hacking in an interesting way. I will write about it. It's similar to the idea of doing things with wrong tools. Here is an example, suppose you hacked a box and wanted to make sure your rootkit never got deleted. One step would be to put the script which installs the rootkit in the rc scripts but that's easily detectable because it's the first place to look for things like that. What about putting the script in less known places like bash shell's variable (PROMPT_COMMAND) which contents get eval'ed before each command? I call this hacking through obscurity. This is, of course, also easily detectable but you learn something cool not many other people know. Kinda cool. Heh. Heh :)

And one of the final things I am going to post are programming cheat-sheets. I love cheat-sheets. I have at least 30 on my desk from which I have made 15 myself. Stuff like Perl's predefined variables, C and C++ operator precedence and associativity tables and many others. (Here is the first post abou cheat sheets - awk cheat sheet)

Yes, I love Google! Google is everything for me. I love how smart they are, I love their products, I love their technology, I love that I can make money from them, I love that I can advertise with them, I love their tech-talk videos, I love their geek jokes, I love that they are the best company to work for, and I love absolutely everything about them!

Thanks for reading the first post! Don't forget to make first comment! :)


August 11, 2007, 16:00

I love everything you wrote about yourself, the ideas and google. I love google too. Keep rocking.

I am quite good with Perl, WWW::Mechanize and related CPAN modules. But I did not know that you can save a youtube video like that. You are pretty cool :).

August 22, 2007, 14:13

Your first post is good.i like it.You will surely win.Congratulations.cheers,indy.

alex Permalink
September 01, 2007, 16:57

i love everything about you esspessially your hacking techniqes i really would like to get some of your skills please adives meon what ishould concetrete on andwhich sites may be of help am willig to give up most of my time could you peharps teach me from scrach and areas i to need concetrate much its really cool to be paid to hack and how to make good software please teach me

ZESHAN ALI Permalink
November 30, 2007, 02:18

Peteris Krumins

you write every thing but you not tell about family and your location were you from.

Dear Really you do a good work . i emprase you dear

Daniel Permalink
January 07, 2008, 12:13

dude... you have a cool life.. i am trying hard so that i can achieve you.... but now.. i am still 16 yrs old and still learning.. thanks for this cool website.. i really want to learn fro you.. ^_^

April 25, 2008, 07:50

An advanced welcome to the field of computer science, I hope it doesn't crush your ideas.

You will probably have a course on privacy issues in IT systems, where you will gain a more nuanced view opposing your unconditional Google-lovin' :-)

All the best,

July 03, 2008, 07:19

Congratulations on your BSc degree in Physics.

I came across your site a few times. And I have not been able to figure out what "catonmat" means. Even google wasn't able to help me.

I was only able to figure out what it is not. It is not an English word. And it is not part of your name. Perhaps it is a word in another language. Or perhaps it is a totally made up word?

Perhaps you can let us know the origins of your website name. Of course, if you want to keep it a mystery, that is fine too.

Just curious.

July 10, 2008, 22:00

thanks alots thats so useful

July 10, 2008, 22:18

thanks man your work is so nice

Name Permalink
July 15, 2008, 01:12

Sorry to break to you, but google is not as good as you think it is. Believe, I worked for them for about a year and quit in disgust and disappointment.

July 18, 2008, 20:55


I have long been fascinated by the field of steganography. If you would search on that word in both google and amazon you will see resources which may be of interest to you.

I would be happy to help you bring some of your ideas and concepts into reality. Contact me if you wish. Best wishes for your continued success.

September 11, 2008, 14:41

I have sent you an email @ peter@catonmat.net .. please check it and reply if possible

Ravi Balgi Permalink
October 26, 2008, 09:51

Hey Peter....
You write about things which enchant me too..
All the best.. hope we can meet some day....

November 25, 2008, 10:57

All the best peter. I reached your web site through delicious.com. You are doing a great job by writing about what you like. Mostly people don't reveal any details if they fail in such big interview, but you have been so positive to write about it. This is called attitude and I hope you carry it throught your career.


Muhammad Permalink
January 05, 2009, 11:11

Hi Peter..i cant explain actually how much i like your work..Good job man keep it up and good luck in Google :)...
i have sent you a mail asking about small things please can you help me with it??...it is very important to me and very urgnt.Thanks To your Efforts anyway.. C ya in another Post

Muhammad Permalink
January 05, 2009, 11:12

Hi Peter..i cant explain actually how much i like your work..Good job man keep it up and good luck in Google :)...
i have sent you a mail asking about small things please can you help me with it??...it is very important to me and very urgent.Thanks To your Efforts anyway.. C ya in another Post

Muhammad Permalink
January 05, 2009, 12:59

Hi Peter, i just sent you another mail...please check it

January 20, 2009, 09:13

Seriously , I am really inspired by your dedication for actually taking time to write blogs.

February 18, 2009, 07:07

when u`ll persue Msc in computer science u `ii stop this ethical issue of hacking.ok

April 03, 2009, 23:45

мда +1 ..

April 16, 2009, 15:25

Interesting blog, Peteris. Keep it going!

One point of curiosity: Is the derivation of your domain name catonmat.net as simple as it looks to the English-speaking eye (that's a deliberate malapropism), to wit, from the phrase "cat on mat"? Or is some more subtle principle at work here? :-)

April 16, 2009, 21:17

Hi Galen, the domain name 'catonmat.net' stands for the 'cat on mat'. a cat on the mat :) there is nothing more subtle about it.

alex Permalink
June 03, 2009, 17:26

I found your website today. I read your message, really inspiring. I read BSc. Mathematics in the university. I wish to go int software development and also learn the art of hacking. Can you give me some advice on which languages i should start learning and what approach to take to quicken my learning process?

June 04, 2009, 23:09

alex, there is no definite answer for you question. art of hacking requires years and many languages, and if you are starting now, you may as well start with any language!

YJH Permalink
November 24, 2009, 17:39

Dude, there is no such thing as a M.Sc. in computer science at MIT. You have to enroll in a PhD program and they'll give you a masters degree after completing two years of your PhD. I know that Stanford, Harvard, and Brown have masters programs in CS.

November 24, 2009, 17:56

I was refering to the "Master of Science" degree on this page http://www.eecs.mit.edu/grad/index.html

Chuck Permalink
December 22, 2009, 09:02

Hey guy, I just wanted to let you know that your method of hacking has inspired me to not only hack often, effectively (through code reuse), and quickly but also to log my journey as I do it.

I am a bit unfamiliar with Wordpress but my project's aim is to build a lightweight extension of Wordpress for wannabe hackers like myself to register and log their adventures as hackers much like you have over the past three years. I already registered the domain 'catsonmats.net' and probably won't implement it right away but I just wanted to let you know in advance to see what you think.


December 31, 2009, 09:14


I become fan of you. I am a sysadmin and little scripting knowledge.

I liked your approach “the hacker’s approach” and “good coders code, great reuse“

I would like to request you become my mentor.

Hoping for your email aravind.gv@gmail.com

Louie Permalink
January 19, 2010, 22:30

Congratulations on hitting the 10K subscriber mark. What's the next world to conquer? 20K? 25K?

I love reading your posts. Even if it's covering something that's familiar to me I still learn a new trick or two. The Perl posts have been exceptionally good.


January 20, 2010, 08:22

Thanks Louie!

The next goal is 10,000 unique visitors per day! I currently have around 3,000 - 5,000 uniques per day. I'll do this with writing even greater posts and creating more projects. As I gain experience I have more and more interesting things to write about.

Diana Permalink
January 21, 2010, 21:37

Awesome. I like your aspirations and dreams. Also I find interesting the decisions you have made so far such as majoring in physics.

Have you ever thought of joining a start up in the US? They probably love your skills ;)


Leave a new comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the word "sandbox_2": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.