Friday, October 1, 2010

Autohotkey\Real Programming

This post has been in the making for a long while. I use Autohotkey and I love it. I use it if I want to write a quick hotkey to make a repetitive task easier, or I'll write an entire program in it. I love it. Why? Because it's easy. DUH! It's pretty darn powerful, but it is easy enough that I can understand it, having taught myself from scratch. (Yeah, I still use SciTe which has syntax help, but you get my drift.) I mean, me, a dude who's had essentially no formal programming courses, can write a program that will actually work. Maybe not work the most efficient way possible, maybe not even be that complex, but work. All from reading the manual and the forum. That's why I love Autohotkey.

So it makes me wonder, "Why is it a scripting language instead of an actual programming language?" I guess the reason is that Autohotkey actually compiles into C++ (or is it C?) whereas all of the other programming languages are languages themselves. In other words, Autohotkey is a wrapper to make it simpler to program in a different language.

But anyway, it just kinda disheartens me sometimes because I don't really know a "programming" language, just scripting. And it also kinda scares me thinking, "Is 'programming' going to be alot harder than 'scripting'?" I've only taken a course in Java, and that was not very pleasant, and definitely not as easy as Autohotkey.

But then I ran into Python. Oh, Python, I love you. Python is so freaking easy, it's near the level of Autohotkey, but the power to write complex apps, which Autohotkey can frankly never do, in my opinion. (Anyone who finds an efficient way to read from/write to XML that doesn't take forever, let me know.) So it definitely gives me hope. Because I can set up a Python interpreter and just go, and actually write programs besides "Hello world!"

But basically, the reason I haven't gotten into "real programming" is simple: I'm lazy. Wait, I'm unmotivated. See, I really do love programming, but I want to get my hands dirty. I want to tinker, I want to learn by doing. And the only Java course I took was composed 50% of how to make flowcharts and crap. It was torture! Even back then, I was thinking "Come on. I can do more in AHK than this!" So it's really hard to make myself sit down and read the manual or even watch videos (like that free MIT lectures I posted a while ago.) That's the main reason that I love programming, but don't know any "real" programming languages.

Oh, and speaking of programming languages and learning them, let me make this statement as a beginner programmer: Please stop suggesting C++ as the first language to learn! I know that I'm definitely too much of a novice to carry any weight behind this statement, but it's my theory that C++ and Java are two of the worst languages to learn. (Besides maybe Assembly. But I haven't even seen any of that.) Why? Let me give you an example:
  • To check if a file exists in Autohotkey, use "IfFileExist, ____" or "FileExist(____)"
  • To check if a file exists in Python, use "os.path.isfile(____)" or "open(____)" or etc.
  • To check if a file exists in C++.....Um....well you, wait, that will only tell if you have permission....or you wait, that won't, download and install this 100MB library, then add it to your imports, then run this function which might not work.
Yeah, crappy example but again: me = no extended use with any languages.

My point is. Python, or languages like it take a "baby step" into programming, but it still lays down the fundamentals. Plus, Python is fairly widely used, at least I believe so. Yeah, DUH C++ and even C is used more often, especially in the corporate world, but I'm not saying you wouldn't learn those at all, I'm just saying not at first.

Anyway, that's my opinion. Or rather, me trying to excuse myself from being afraid of learning new things, then my opinion.


  1. I totally agree with everything said.

  2. This blog is fantastic. A "games!" button plus the ability to explain why c/c++ are wasteful programming languages (timewise). Thank you for existing.