May 31 2009

Posted by coen under School

Endings and beginnings

As we all know, at a given moment in time, some things end as other things begin. That’s also currently happening over here at coen-HQ: I’m working on the finishing touch of my graduation project and I’m preparing for the life after that. That means that I’ve got to do some interviewing for jobs and I’m preparing my submission for the Software Engineering master at the University van Amsterdam. At this moment, I have no idea whatsoever what – or where, for that matter – my job will be but actually I don’t care (actually I do care that it’s a computer science job). The most important thing to look out for is the environment I’ll work in: the colleagues, the working conditions, the diversity of the job and the career opportunities I’ll have. If these are fine, I don’t care what or where my job will be.

As for my thesis: it’s finished and ready for delivery next Tuesday, June 2nd. On June 15th I have to defend my case and I think I’ll be fine. After that my last but very long holiday begins in which I’ll be backpacking in Thailand with two friends and I’ll make sure to post some nice pictures over here :-)

I must say, I learned a *lot* during the last five months. Not only about pure software development, but I also learned to take a little more distance from my own work and review it like it was someone else’s and it’s actually pretty difficult to not go native when reviewing, for example, my own thesis. I also thought about what kind of programmer I’d like to be the most. The answer is definitely a backend programmer. Another thing I’d like to do is teaching. I simply love the idea of trying to teach someone something and afterwards see the successful results. Maybe that’s a boy’s way of thinking just as much as it is with programming: you create a toy and it works and you are happy.

I’m curious what the next couple of months will bring me with regard to jobs and stuff but I think fate and I will handle those things fine. Up to the next milestone!

No Comments »

Apr 07 2009

Posted by coen under Programming,School

Lost in translation

I’ve been planning to blog again for some time now, but every time I had some spare time I had nothing interesting to write about. That has changed. In my short experience in working through projects, I noticed that sometimes there are moments ‘in between’. You know, those moments between milestones or something. Well, I’m in one right now, and it’s a biggie.

I sort of finished the backend of my model translation tool (It reads an Enterprise Architect Class Diagram [/buzzwordalert] ), and now it’s time for the client. The problem with that is that I always get bored when the interesting stuff is done. In this case, The Interesting Stuff is figuring out how the Class Diagram parts of UML fit together and how to translate that to usable interfaces so that it can be transformed into code.

Luckyly for me, another interesting part is coming up: I have to create an Eclipse plug-in that uses the backend and produce kick-ass quality Java code of it. And reverse engineering, ofcourse. Not that I’m willing to be a rival of any other tool like, say, for instance the Eclispe Modeling Framework. I just want to know how stuff like that is done and what problems are encountered while creating code for that purpose, and I secretly hope that I will be able to contribute to the EMF after my graduation internship because after reading only the beginning of the Eclipse Modeling Framework I’m very excited about it.

I also ordered a book on creating Eclipse plug-ins because I couldn’t find much of a tutorial so I’ll be reading a lot, the next couple of weeks. But until that time I am a little off my game here with translating models and all. Lost in translation.

5 Comments »

Feb 22 2009

Posted by coen under C-Sharp,Java,Programming,School

Modeling and code generation

At my graduation internship at Sogyo I am currently working on an interesting item: researching the currently available modeling and code generation tools, and see if there’s a way to provide integration between those. There probably are a lot of tools that can generate code, but I’m focusing on the Eclipse Modeling Framework, Visual Studio 2008 and Enterprise Architect. The reason I am doing this ‘research’ is because I believe that modeling should have nothing to do with the programming language the software will be written in.

As it turns out so far, Visual Studio provides a Class Designer tool, but that’s not as extensive as I’d hoped. On the other hand there are the DSL Tools which enables me to create a Domain Specific Language that provides the necessary functionality. In fact, one could create a DSL that generates Java code – or whatever language, but that’s an obvious property of any DSL.
The Eclipse Modeling Framework has way more functionality, but can – as far as I know right now – only generate Java code.
The third tool, the Enterprise Architect, is an UML modeling tool that also provides very basic code generation. Unfortunately I must say that I’m not satisfied at all with the generated code by the Enterprise Architect, and even less satisfied with the plug-ins they provide for Eclipse and Visual Studio. In the generated Java code, enums and interfaces are apparently ignored; in C# code, the namespaces are not created and class methods are generated but getters and setters are neither recognized nor generated (this also goes for Java).

So I have decided that I’m going to write at least an Eclipse plug-in that reads the model from Enterprise Architect and creates decent hand-written-quality code for the domain classes. And given time, I’ll also create a Visual Studio plug-in that does the same. After that, the next step would be to extend these plug-ins with functionality to generate persistence and GUI code. Another thing is that it should be possible to alter the code after it’s been generated and send the changes back to the model. I’ll incorporate that as well in the first version of the plug-ins.

That leaves me with a lot of work todo, so I won’t get bored the next couple of months :)

4 Comments »

Jan 17 2009

Posted by coen under PHP,Programming,School

php and ssha ldap passwords

Although the current semester is almost over, we’re still working very hard on our project (in Dutch), and today I finished a password reset function for users of the portal. The tricky thing for me is that the user passwords are stored in LDAP, so I had to figure out how to write to a LDAP database, and how to create a SSHA password hash in php.
I found that there is very little documentation about the ldap functionality in php, let alone how to create a SSHA hash. There was, however, one post on php.net where I found half of my answer: http://nl.php.net/manual/en/function.sha1.php#52365 . The only thing I had to change was:

// this
$salt = pack("CCCC", mt_rand(), mt_rand(), mt_rand(), mt_rand());
// into this
$salt = pack("CCCCCCCC", mt_rand(), mt_rand(), mt_rand(), mt_rand(), mt_rand(), mt_rand(), mt_rand(), mt_rand());

So, the complete code now looks like this:

mt_srand((double)microtime()*1000000);
$salt = pack("CCCCCCCC", mt_rand(), mt_rand(), mt_rand(), mt_rand(), mt_rand(), mt_rand(), mt_rand(), mt_rand());
$sshaPassword = "{SSHA}" . base64_encode( pack("H*", sha1($newpasswd . $salt)) . $salt);
// bind using the configged options
$ldap->bind();
$ldap->save($userDn , array("userPassword" => $sshaPassword));

So finally, the password reset functionality works and users won’t have to worry if they’ve lost their password.

2 Comments »

Jan 03 2009

Posted by coen under General,Programming,School,c++

2009

And there it is: the year 2009.
Thing is, I don’t really have a clue as to how to write this particular post, but there are a few things that I want to mention because I’m really really really excited about them :)
First of, I’m going to graduate this year, starting February 2nd. I plan to do that at Sogyo, and I’ve got a very cool assignment: I am going to do research after the available tools of code generation and DSL, and build proof of concept code in case the already available tools don’t suffice. Also, I think I will get my first Java certificate (SCJP).

Although these things all have a high nerd factor, I’ve a plan that can top that. In the summer holidays, I’ve decided to go to Hacking At Random, which will be in The Netherlands this year. I think that my friends and classmates (who also will be there) and I will have a *lot* of fun. As a matter of fact, I promise to show you some pictures afterwards.

While I’m thinking about it, my learning-by-cheating idea didn’t go as well as I thought: I didn’t finish that little project (but alas, that’s one of many). What did come out of it is Sentry. The Sentry core is actually nothing more than a library loader, but is has some nice features. Each plug-in (or library) can provide a number of hookpoints, where other plug-in commands can hook onto. Nice thing about this is that you can create a completely event-driven application, and anyone is free to create their own plug-ins. At this moment, I’m using it to create an IRC bot that is kind of able to control what’s happening in a channel and also to give my c++ knowledge a boost :) If you’re interested: you can take a quick look at my websvn subdomain, the repository is sentry_cpp, and it’s also possible to svn co it from the svn subdomain.

That’s all for now, happy 2009 y’all!

No Comments »

« Prev - Next »