“amg faecbook is selling my privacies!!!!”

This just in: I have heard from various sources that Facebook is selling your data through a service called the Facebook Development Platform.

My response: No, no they are frigging not. They are not selling anyone’s personal data. If they are, they certainly don’t need the Development Platform.

“But amg programs that aren’t faecbook are accessing my datas!” you say. Well, it’s too bad that all of those people making angry Facebook groups, thereby sticking it to the man, aren’t as good at software development as they are at parsing through the Terms of Service to take quotes out of context.

The Facebook Development Platform is an Application Programming Interface. Wikipedia says:

An application programming interface (API) is a source code interface that a computer system or program library provides to support requests for services to be made of it by a computer program.

The software that provides the functionality described by an API is said to be an implementation of the API. The API itself is abstract, in that it specifies an interface and does not get involved with implementation details.

The API allows a program to make requests without having to know the details of the implementation. What does this mean? Well it means that using Facebook’s API, programs don’t need to have all of your private informations that you hold so dearly, since it can just make requests to the server and process everything without having the entire Facebook database on its machine.

I mean, hell, you need to log in for these programs to work. If Facebook is giving your information away, you have more to worry about than your silly little datas; they’re giving away passwords too! Oh noes! Security breach!

People really should actually read the API docs before accusing Facebook of criminal activity, because you all end up looking like retards to people who actually know what the hell they’re talking about.

In conclusion, Facebook users make me angry.

The One True Text Editor

Those of you familiar with UNIX and World of Warcraft will understand what I mean when I say that Emacs and vi are like the Aldors and Scryers. Once you get to Unix City, you take the tour with Khadgar’s annoying minion and then choose a side. Once you choose a side, you start questing for that faction and end up aggroing all the hate and ire of the other side.

This happens to be because text editors are the basic tools in the Unix world. Coding and editing files is a must and a text editor is your best friend. You’ll be editing many a fstab or crontab with this thing and you want it to do what you want. It’s very much like a sword that’s attuned to you.

So I ended up going Scryer. The decision to go Scryer or Aldor is much easier than choosing a text editor. But I did decide to throw my lot in with vi. Why? After I eventually get around to learning the rest of the commands in vi, I’ll be able to do superhuman things with it. Emacs on the other hand can do anything else, which is not really what I look for in a text editor.

So with my move to the Mac, I was in search for another text editor. The environment was very different for this sort of battle. For one thing, the text editor users weren’t dominated by Old Unix Zealots, but designers. Yes, web designers are the ones who influence me, at least, as to which text editor to use.

The thing about text editors on the Mac is that most of the good ones are commerical: TextMate, BBEdit, and others. The problem is that I didn’t want to spend money on a text editor.

So far, the only true alternative I’ve come up with is Smultron. It’s free, it’s open source, and it’s as beautiful as any other Mac program, and just as functional as any other text editor. It’s become my text editor of choice for anything on my Mac, really, from HTML to Java to that vaunted VHDL. Is it the one true text editor? No, but it is pretty darn good, so give it a whirl and enjoy the giant berry sitting in your dock.

Java XP

I have come to the realization that everything that makes me angry in Java pisses me off in Windows. This has been especially evident when I gave up using Java to study for my CS final and instead have been actually completing some work using Python after taking a few hours of my time to relearn.

Let’s have a look at Java.

class HelloWorld
{
    public static void main(String[] args)
    {
        System.out.println("Hello World!");
    }
}

How about that C?

int main()
{
    printf("Hello World!\n");
}

And my favourite, Python.

print "Hello World!"

Why am I creating a class for a trivial program? Why am I declaring the scope of the main function? Why isn’t main a reserved word?

See, Java makes you go through unnecessary hoops and annoyances to do hammer it into submission. Apparently, this is “more safe” and “reinforces good programming practice”.

Sound familiar?

Eight spaces, you heretics

One of the things that pisses me off most about DrJava is the fact that it indents using spaces. I absolutely hate code indentation with spaces. It makes about as much sense as indenting paragraphs with spaces, that is, if you do it, you’re stupid. What makes it worse is that DrJava absolutely must indent with spaces because the brilliant developers decided that a better use for the tab function is to automatically indent your code to the current block level using spaces.

The other thing about indentation is the number of characters to indent. As we all know, tabs are eight spaces. Therefore, indents are eight spaces. Not four. Not two, as is in the DrJava default. If you’re going to indent in two, you may as well save yourself the trouble and not bother indenting at all. While you’re at it, go and write your entire program on one line too.

On the other hand, do not ever indent in papers using the default tab. Most people type essays and indent paragraphs with an indent of half an inch. Go take your rulers out and frigging check how long half an inch is. Here’s a hint: it is bloody monstrous. An indent should only be one em. Why? Because an em depends on the size of your type so it will always look right at any size. You’re only allowed to change your indent size if you already know what an em is because you probably know what the hell you’re doing anyway.

Finally, brace style. It annoys me to no end seeing large chains of if statements with every brace getting its own line. First of all, it’s a bloody waste of space. Second of all, I find it impossible to follow the nesting and such. For branches and loops, opening brace comes at the end of the statement, not on the line after. The closing brace is on a new line, preceding the next statement on the same line if there is one. For functions and classes, they get their own lines because functions and classes are special and you’ll never chain a function or class together.

Okay, not finally. Methods are a retarded name for functions. This is why I hate object oriented programming. Have you read the Java book? It’s all like “OMG THEY’RE CALLED METHODS DON’T CALL THEM FUNCTIONS.” Maybe the reason I hate it so much is because they insist so strongly. Here’s news, they’ve been called functions long before this new OOP fad, and they’ll be functions long after. My God, I hate Java.