Friday, January 28, 2011

K Code Parser (story 3)

Delivering code that you can't compile.

It's Java, therefore it's possible. How, you ask me? Simple. Watch this simple error:

Exception in thread "main" java.lang.Error: Unresolved compilation problem:
    The method setVar(String, int) from the type VariableStorage is not visible

Yes, this is precisely what it means. Unresolved compilation problem. This means that the code shouldn't have compiled in the first place; but heck, people can deliver it anyway.

I don't know if I should call this silly or not. I am just thinking about that corner case that happens once in a million years (let's say, when you fix your clock for the daylight savings time). What can I say, tester's hell.

Tuesday, January 25, 2011

K Code Parser (story 2)

So the first day passed, and it was kind of lazy. Actually, after hitting that SVN frustration I stopped doing that and started doing other things. Unrelated to the project. But this morning was a bit more productive, and I managed to implement the first part of Mr. Crenshaw's tutorial. In Java. As I said, the code can be found on the mercurial repository from Google Code.

One nice touch. Eclipse is really cool when it wants to be (it proves to be really helpful when it wants, and writes tones of stuff that I don't want to for me). Second: Java + Exceptions. I truly hate exceptions, but they seem to suit this type of implementation (that I'm trying to do). So I will roll with exception. It's a nice way to abort something, and they can be helpful too.

One thing I hate about Java. Why the heck did they name the bool 'boolean'. It's toooooooooooooooooooooooooooo daaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaamn looooooooooooooong. And I always write bool. So eclipse, unhelpful in this case, doesn't try to correct me by writing stuff for me. So long with the helpfulness of Eclipse :(

Now onwards to the second page of the tutorial.

Monday, January 24, 2011

K Code Parser (story 1) (continued)

So what the heck should this error mean?

 Missing requirement: SVNKit 1.2.2 Implementation (Optional) 2.2.2.I20101203-1700 (org.polarion.eclipse.team.svn.connector.svnkit15.feature.group 2.2.2.I20101203-1700) requires 'org.eclipse.team.svn.feature.group [0.7.9.I20101001-1700,1.0.0)' but it could not be found

[Retorts taken out. Really, really upset dude at keyboard]

Mental note. For the fun of the game, add "error 0.7.9.I20101001-1700,1.0.0 detected" message in my project.

So I cannot use SVN from Eclipse. In case you were wondering if it works, it doesn't, no matter what the official docs say.

PS: I know it's a 64 bit issue. I don't care. Why should I, the user, care? It's an IDE, it doesn't work, the feature is disqualified. Now if I could only change my code.google.com source versioning to mercurial :( *sigh*

K Code Parser (story 1)

I'm gonna update the blog about the advance in my project in stories. I don't know how many stories I will have, nor will I bother to name them (unless they are tremendously interesting, like this one is not).

So first story is how difficult is to have SVN on eclipse, and make it work. It's not that I cannot find my way without Eclipse. It's that I want to learn how to use the damned thing from Eclipse - after all, it IS an Integrated Development Environment.

So we want to install some plugin for SVN. Easy. We go in Help->Install new software (always loved to do that) and we search for SVN. Wait for about 1 minute before deciding not to use the task manager to close eclipse, select first Subversive SVN connectors. Amaze yourself with the fact that it doesn't work. Try again, selecting from the window stuff that might work. Try again, again and once again. When you have a 'Next button' on the second page (no errors, then) press it. Don't think twice. Don't mind what's installing. I don't know, and you don't know. Eclipse knows. Restart Eclipse. Notice that it doesn't work. Try again. Don't succeede. Write an angry post on how it's friggin' incredible this piece of sh**.

Then relax, and try again

File->New Project

Ok, so it's that time of the year. It's 7:27 in that crazy wintery Monday morning that you know you ain't going to work. You are bored, and you feel like doing something useless.

And you remember that some time ago you have bookmarked a 300 hundred pages tutorial. It's about parsing code. And dumping assembly code. Which sounds like fun.

So five minutes later you finish writing the blog post in which you announce the URL of your new project, you're committed to writing it in Java although it's the silliest thing to do in Java and then you open your Eclipse.

So here it is, guys... http://code.google.com/p/k-code-parser/source/checkout . Don't rush, there's nothing there yet.

But there will be :)