Archive for the 'Programming' Category

Published by Mircea on 22 Oct 2005

A new version of the Windows Installer

I spent a large part of this day updating the Psi Windows Installer, getting it ready for Psi 0.10 release.

If you don’t know, the Windows Installer has been moved to the Psi Darcs Repository (since Psi also switched from CVS to Darcs). The sources can be found here.

For a quick preview on how the new installer will look like, have a look over Psi Wiki: Windows Installer Guide. Graphics were created by our Psi web designer - MRAY - lots of thanks once again for the wonderful contribution.

The installer reached Version 2. The version bump was caused by some implementation improvements I’ve added recently, easing up the work required to package future versions. These 2 improvements include:

  • script for building the file list with everything that needs to be installed - NSIS has its own way of defining what files should be installed where; this script takes a Psi archive, unzips it and creates install/uninstall file lists to be used directly by the installer
  • script for creating language pack sections - as you probably know, you can include Psi language packs with the installer. The Windows Installer has a feature which makes it particularly interesting: if you select a language for the installer interface, it will be automatically selected from the language pack list - not an exquisite feature, but useful. This script looks in the directory with Psi language packs and automatically generates sections for the language packs in the installer (install/uninstall file lists) and setup functions (for autoselecting the language packs depending on the installer language)

One thing to notice: I wasn’t able to compile the installer script properly with the latest NSIS compiller(v2.10) and I used an older version (v2.03). There a strange incompatibility between the two versions, when it comes to displaying variables put in the Installer section names.

The new version of the Windows Installer will be used by Psi when 0.10 is released.

Published by Mircea on 28 Jun 2005

Hey, how’s programming today?

Answer: on paper… grr

I had the last exam today: Object Oriented Programming.

It so happened that some recurring memories remembered me that the Educational System in Romania needs an overhaul. Some courses need an overhaul, some teachers need an overhaul… oh well.. let’s call the last thing a “training”.

Surprisingly, last time something similar happened was exactly during time of year (it was 1 year and 2 days ago to be very precise). The situation is 70% similar. Where do the extra 30% go? Answer: to the teacher.

The exam, short version:

  • one huge problem, described in tons of words (it took me 1 A4 page - face & back to write it - I know this is relative) - above all, it wasn’t very clear either (just like the entire course, see below). Some colleagues managed to think like the teacher which is really an achievement considering the way he thinks - also, see below).
  • 1h 30mins for the entire problem. In the end, we were given 2 hours after asking for more time. I wrote all the time and my finger tips still hurt AFTER the exam was over.
  • we were allowed to use the computers to look over the Java documentation but you soon notice that it costs you time
  • looking over my paper after the exam was over revealed that, out of the points I’ve lost, lots were for syntax mistakes, something which is normally done by the compiler, corrected by changing some types in the overridden functions and adding some castings. All the logic which I’ve tried so hard to add to the program didn’t count much as only the syntax problems were seen. There were also some mistakes caused by the pressure of the time. I thought Object Oriented Programming is not only about syntax, but about the logic behind also. I believe syntax is easier to check compared to logic. Syntax should be similar, all across 30+ papers. hen again, how can 2 people correct and understand 30+ papers of several pages filled with code (possibly with not much comments, because of lack of time) in 2 hours?

As some of you might not know, the Object Oriented Course is actually a Java course. We had a total of 4 programming courses until now:

  1. Programming - generally speaking, actually a C/C++ course
  2. Data Structures and Algorithms (DSA) - STL, Graph Algorithms, Object Oriented Programming — this course included some lectures on classes, inheritance, overriding operators, working with objects, template classes (using STL), all in C++. That was a great course compared to the OOP course (last in the list).We should thank to this teacher for not leaving us to learn OOP with the OOP teacher we had this semester
  3. Programming in Assembly Language
  4. Object Oriented Programming

Most of the students (myself included) admit that, if it wasn’t for the first 2 programming courses, we wouldn’t have understood a thing if we were to learn OOP from the teacher we had this semester. The teacher even has some problems with the fact that we were taught OOP before the OOP course by another teacher (in the DSA course).

The course - facts:

  • When I got my final grade, I noticed that… work during the year does not count. Did you think that the laboratories count? You are naive if you do this. I admit, I was naive and I really tried to do my best, burning out valuable neurons. You just have to do the laboratories to be allowed to enter the exam. It doesn’t matter how well you do them (it’s pure logic, isn’t it?).
    Above all, we even had a test paper at the middle of the term (which we weren’t told if it is a midterm or not, untill we got the results. The teacher: Did I say it is a midterm? It is not a midterm. You’ll still have everything for the final exam.).
  • the lectures for this course were horrible. We (all students) noticed that it is very difficult for us to follow the teacher showing us Java. It’s all nice to use an on screen projector to show up code, documentation and all, but it was all put in a big/great mess. There was a big problem with wording the course. Ideas were started, paused, broke into pieces, restarted so many times, that the course could really give you a terrible headache. Lots of the students abandoned the idea of participating at the lectures. It so happened that the teacher held his lecture in front of 5 to 20 students (out of ~130 in the entire series*) every time. There was a day when only one student was present at the course for an hour. His lectures were something like: see this… and this… oh.. and there’s something I’ve recently discovered in… but the thing there is… where were we? eh, nevermind… let’s see what else we have here.. oh.. ok.. this one is about… do you remember that… oh… and there’s that thing… I hope you understood that no normal human being could resist much at those lectures.
  • The fact that some of the Data Structures and Algorithms course had some OOP lectures might have been a disadvantage for us. The teacher said one time that it favours some other series* and not ours - this might be because the DSA course has OOP lectures only in our series. This made the teacher think that we already know some OOP (which is true for some of us). Sometimes it went so off around an idea that we couldn’t understand what point he was trying to make. He assumed we already know what he was thinking about (but hey, we’re not reading minds) and skipped some steps. Asking for clarification possibly got you closer to the facts, but still, there was more. When he finally explained in detail, he wandered why we didn’t understand him… Well… GUESS WHY? (see above point).

The good thing about this course is the fact that it allowed us to spend some school hours thinking of Java (considering a very busy schedule). I’ve also done a project in Java during this year, because of ease in development and deployment. I don’t know if I was successful in this project because the way the teacher taught, or because I struggled to understand something for myself. I’ve also applied some things which I’ve learned by myself and heard of before coding in Java. Ever since this semester started I’ve been trying to convince myself that Java is something in a programmers world. Why so? Every time I heard the teacher, I was shown more bad points for Java. The teacher was a bad PR person for Java. It is a bit sad that a person, the teacher in this case, can induce a bad feeling about a programming language also because of the mess in his lectures.

I am slowly realizing that there must be something better than Java. I found some strange things happening inside. I am starting to believe C# might be closer to my dreams (I haven’t seen much C# code, but it is capable of some things missing in Java). The Royalty Free License of C# is a bit scary. Besides this, I want multiplatform. There’s still much to learn out there. Programming languages evolve every day. Each one is addapted for a particular application. Software engineers must be multi-oriented for better adaptation.

* we are organized into groups of 25-30 students and 5 groups make up a series.

Update: it seems that future OOP exams got easier, the high-graders number was bigger; this reminds me of another great rule in life: relativity (the difficulty of the exam can vary depending on the date of your exam, relative to others’ exams)

Published by Mircea on 03 Jun 2005

A patch of leisure

I don’t know where to put this entry… under Leisure or under Programming. I’ll put it in both.
Why am I asking this? Well, I just finished the last week of the semester… an exhausting week. Got home partially on foot, as I do every time when I come back from school. I always walk half of my way home, because I have the boulevard on one side and the university campus on the other side. It’s a nice blend between the green nature (in the campus) and the city. When everything gets gray because of blocks of flats, I get on a bus and go home.

Later the day I started the computer and, of course, Psi. I believe the Yahoo! transport I use was down, or I couldn’t have remembered that Psi has a bit of an annoying bug. During the nights of studying, the Yahoo transport went out and came back, but Psi set Online as my status for the transport, not my account status. My Computer Science mind, recently overloaded by somehow useless stuff, felt the need to express itself in a constructive manner. I’ve therefore started digging through the sources and came up with a patch for this problem. I’ve also FlySprayed the bug (as I normally do).

I don’t know how to consider this action… but it really felt good. After all the work for school, after all the sleepless nights, this tiny one hour patch made me feel really good. Finding the classes/functions in the code took most of the time - it was like a quest.

I did something that pleased me after a long week of work. Feels really good.

Enjoy the patch (attached in the FlySpray task). Making it allowed me to gain some more info on Psi’s inner-workings. More ideas got born. I feel really creative sometimes. Fortunately, I do write my ideas :)

Published by Mircea on 03 Apr 2005

Programmer’s Live CD

Due to a recent hardware problem I am unable to prepare for next week’s mid-term: Object Oriented Programming (Java). A system can be used without a HDD with… you are right… a Live CD.

My quest to find the most featured programmer’s Live CD lead me to the following 2 projects:

I wish they were a bit more updated - none of them has Java 1.5.
I am currently downloading them both to give them a try.

Published by Mircea on 02 Mar 2005

More CLI options for Psi (GnuPG)

Two extra command line arguments to complete the patch I sent a few days ago. They were also requested today on the forums.

    --gpg=EXEPATH - path to the GnuPG executable
    --gpghome=PATH - path to the directory holding the keyrings (similar to the --homedir gpg option)

These options are mostly useful for people carying their GnuPG Keyrings on USB together with Psi.

I’ve also sent this new patch to the psi-devel-maillist for reviewing.

Next »