Hacker News new | ask | show | jobs
by omribahumi 2233 days ago
That's what I've been doing since I was 12 years old :)

My first "programming" experience was with mIRC scripts. I even wrote an IRC client using mIRC sockets at some point, and a dummy webserver / SMTP client. When you do things the wrong way, you pick up a lot of new skills. I learned to "reverse engineer" (my implementations were trivial, not fully fledged) protocols with a proxy/sniffer pretty early :)

From there, the first use case I had for every new language I wanted to learn was write an IRC bot. I had written one in VB6, VB.NET, Python and even C/C++ at some point.

It's funny to see this comment on HN, as this has been my mantra for a while now. On top of string manipulation and networking, another important piece it teaches you about a language is using data structures and manipulating data. IRC client is super stateful. For example, it needs to maintain the list of channels you're in, the list of users in those channels, their op/voice status, etc.

Highly recommended as a project for picking up a new language.

5 comments

Me too! I will never forget adding "runtime loadable moduels" to my PHP IRC bot at age ca. 14. Oh my was that functionality a travesty: a user might say something like `!load poll` to activate the poll module. What would my code do? Oh it'd `include poll.php` (or whatever the syntax is, this was both my first and my last PHP project) in the main loop. On every iteration. Because hey, how else would the poll code be able to react to stuff?

I learned a lot of lessons and still have fond memories 20 years later :-)

Edit: Man, just thinking at this has Metallica playing as background music in my head even though I haven't listened to them in this decade. It's so strange how childhood memories can be so incredibly strong and cover so many sensory modalities. These days I can hardly remember what I did last week.

I suggest you check out http://brainrules.net/ by John Medina, he covers the fidelity of our memories as we age and much more.

https://www.youtube.com/watch?v=NujSdn1bg5k

> My first "programming" experience was with mIRC scripts. I even wrote an IRC client using mIRC sockets at some point, and a dummy webserver / SMTP client.

Same here! The mIRC scripting language was incredibly rich, and the ability to create native Windows dialogs with it was a powerful tool.

Back in the 90s, a friend and I reverse engineered the protocol behind a popular program used to play Magic the Gathering online called Apprentice. The protocol was insecure and allowed users to cheat by controlling the outcome of coin flips and other elements of the game. The purpose of the research was to prove definitively that the client could be manipulated, in order to resolve some cheating accusations that had been thrown around.

I set out to write a program that would hook into Apprentice through the Win32 API and allow you to change the program's output, while my friend created an mIRC man-in-the-middle server that you could configure through a dialog box to connect to Apprentice and modify incoming and outgoing protocol messages.

My project never shipped and his reached widespread availability, eventually leading to the development of better clients [1]. The fact that he was able to get so much out of mIRC script (dialog boxes, sockets, event handling, etc) and was able to make it simple for others to use was impressive.

[1] https://en.wikipedia.org/wiki/Apprentice_(software)#Backwash

May I promote the bot I have been running for two weeks? An IRC text game described there: https://pink-dragon.surge.sh/
I really wish I kept my mIRC scripts somewhere. It'd be interesting to see how I progressed.
im still trying to write my perfect irc client (the code has to be good). my latesy approach is using functional programming a lot