Tag Archive for 'java'

Trying To Get AST Working … I

Well, as a part of a dummy project Rahul and I are working currently, we need to create an Abstract Syntax Tree for the source code provided. Once that is done, we will be able to create wrapper classes around it and get our project running.

The AST that is provided by the core Java APIs give only a read-only handle, which is not of much use as we would like to be able to modify the AST later on. So we decided to go with the AST provided by Eclipse. Basically, eclipse has this thing integrated in its IDE to provide the refactoring features.

Importing a lot of eclipse jars, we set out to test if it works. The result is partial. We have been able to pass a source code as a string and get its AST, but when we tried passing the whole workspace, eclipse gave a run time error. It says IllegalStateException as the workspace is closed.

Googling around a bit, we realised that IWorkspace can be used only as an eclipse plugin. Now we certainly do not want to add the extra complexity of making an eclipse plugin, as we would like our code to run even in the absence of eclipse. So now, we need to figure out how to provide the whole workspace to the application as an input so that its AST can be generated.

Yet Another Transition

After 4 happy years of coding in compiled languages of C and C++, the time has come to make a transition to the interpreted language of Java. The change is more of an imposed one than desired. And I am not getting drawn into the subject of compilers vs. interpretors, mainly because of my lack of experience with the latter category.

Starting the next week, I shall join the FICO, Bangalore. I am quite excited about the oppurtunity as I have received excellant inputs from my seniors and their friends regarding the kind of work that people do over there. Also I need a change from an university-like environment.

Now at Fair Isaac, apparently, people prefer Java over C++. Navin sir said that there are a group of people using C++, but the bulk of libraries and code is in Java. So it will be easier if I switch over to Java than C++, though it shouldn’t be a lot tougher sticking with it. And after giving it a thought, I have decided to learn Java. Learning a new programming language is all about going through its libraries and adapting them. It should be an easy enough task. Also since I have a basic understanding of objects, classes, inheritance and theior abstract nature, it should be easy enough.

The only thing I shall miss are the pointers. Sadly Java does not allow pointer access to programmers like the C does. I do not know the reason behind this restriction, but it sure makes me sad. Of late, most of my variables were being referenced by address and I was really getting into the habbit of using pointers. They make complicated things so easy to manage.

And then another thing is the usage of WIndows. I would really prefer Ubuntu for coding. I do not thing there should be any problem with using ubuntu. I just do not want to START to TURN OFF windows :P .




Theme Tweaker by Unreal