Blog
what did i learn today
Uncategorized
Nieuw begin

Momenteel ben ik o.a. actief in de e-learning sector, waar ik ook vooral zelf veel moet bijleren. In zo'n zoektocht naar nieuwe tools en informatie, heb ik via de blog van de CEO van Intalio "Getting Things Done" (GTD) ontdekt. Dat lijkt bij nader onderzoek nogal hip te zijn. Ongelooflijk veel tools en blogs die het over GTD hebben. Weer een bos en de bomen probleem :)

Maar momenteel ben ik dus volop bezig mijn eigen werkwijze te stroomlijnen en te formaliseren, en ik zou het zelfs ruimer durven stellen : mijn levenswijze.

Een pracht-site in dit verband is zenhabits.com. Alles om je leven zo zen mogelijk te krijgen. Huishoudtips, geld-tips, gtd-tips, alles vind je erop :)

Maar binnenkort meer hier over productiviteit, en alle nieuwe tools.

More ...
Uncategorized
Beyond Java (Bruce Tate)

Good thing about having to change, is thinking about your career, where you want to be, where you want to go to. I am a c++ man. By stagnation. I have done a bit of java, but not enough to my liking to call me proficient. The language shouldn't pose a problem, but the frameworks do.

So i picked up this book. The Java environment is getting bigger and bigger, and coming from the outside, the step towards it is also harder and harder. Not because of the language or the complexity of the frameworks, but just the sheer size and the amount of available solutions, options.

I wanted to look "Beyond Java", aim for the next wave directly. The author focuses on web-programming. He feels this is the way to go. I agree, for all client-based software. GUI would best be written for the web, so you don't have deployment problems (or less), scaleability from the start (or easier, just scale your webserver --or it should be that easy).

So this book focuses on two solutions : Ruby On Rails and Continuation servers. Both seem to make web programming easier. I have used PHP and MySQL, which is easy but dirty. Ruby on Rails seems much neater, a cool environment, the scaffolding is a good start. RoR as an environment, for pure webprogramming, beats java hands down. Continuation servers are really cool, because they allow the programmer to think as for a normal UI-application. Much easier. But the downside is that for now it is only available on SmallTalk. Ruby by the way, as a language, looks really interesting. It is great. Reminds me a lot of SmallTalk too.

But ... how cool RoR looks, it is limited. Java is a total enterprise framework, which is way bigger then just programming for the web. Web-programming in Java could be improved (port Rails ?), but Java offers more. Integration with legacy is possible. Java is also the platform where all the latest developments come together naturally. Refactoring, design patterns, agile development, was all nicely integrated. This makes java, in my book, a winner. There is as we speak no real contender.

What about .NET ? Well, i have seen it at work. It is super-cool. The development environment is awesome. C# has some really cool stuff, and does do things better than java. Building forms is dead-easy, and they look good. I have heard building websites is as easy (or easier). For the websites i am not as convinced because the strength of webbrowsers has to be the platform-independency. So you don't include components which can only be used or shown on a Windows PC, or worse, on a Windows PC with the entire .NET environment present. But on that regard : i am not an expert, so i am not sure what .NET is capable of.

For me it just doesn't feel as right, working with .NET which totally ties you to a single supplier. Porting applications to linux becomes entirely impossible. Should you want to ? Well, for instance, our application servers ran 30% quicker on less performant Intel machines. Go figure.

For me there seem to be two options. Learn Ruby, and fast. Learn java, even better. Ruby for fun, java for real work ;-)

More ...
Uncategorized
About generics and stuff

In my new job, which will start on the 1st of February, i will first work in c++, and then be moving on to .NET. This was not entirely what i had in mind. I was planning on moving to java, completely. On such short term though, this seemed difficult, because up until now i haven't had much real experience with java. Although, pure java programming, coming from c++ is very straightforward. But i am unfamiliar with the standard libraries. Even worse, making the leap bigger, i am definitely unfamiliar with the J2EE framework, and all possible frameworks available to make your life easier (struts/spring/hibernate..).

When switching to java, the problem no longer is learning the programming language, but getting to know all the available frameworks. And it is a big leap. As a former Sinclair QL adept, i would say Quantum Leap ;-)

But the advantage of java is that is more open source. Almost everything is freely available, or you can find good "free" alternatives. There are no ties to specific platforms, or suppliers.

That is exactly what scares me about .NET. But looking at it in more detail, it is actually pretty neat. It is designed, mind you, by the guy from Borland, Anders Hejlsberg. My god, Borland ! I am a Borland fan from the start, precisely because of this guy, and because of their war against Microsoft. Well war is not exactly the right word, but i always had the impression Borland was the underdog, with a superior product. Speaking of VCL, Delphi or C++ Builder : it always was a better language than VB, and a great RAD-tool. Visual C++ had its strengths though. Definitely. It was a very impressive compiler, but not RAD. Microsoft made this weird decision that VB would be the RAD-part, and Visual C++ would be for real programmers. For instance, making a make-file in Visual C++ was and still is way better than in Borland C++ Builder. In Visual C++ you can keep different targets, which is very handy.

By the way, does anybody remember what RAD stands for ? Rapid Application Development. Nowadays it would be called agile ;-)

Anyway, i was looking at Java 1.5, with generics, which i was looking forward to, as it is one of the strongpoints in c++, imho. Anyway, in java it is not at all implemented well. An ArrayList still remains an ArrayList on the inside, because Sun didn't want to adapt the JVM. So all translations are done in bytecode. All casts are inserted. An ArrayList will be converted to Objects, so you lose a possible efficiency advantage. Reflection will not work, because from runtime on, it is just a normal ArrayList. Imo this also means you can still insert other types into an ArrayList. Doh!

In c#, generics are done well, but, alas, different than in c++. At least an ArrayList<int> can only contain integers. That's a relief. But in c# the typing is much stronger than in c++. And I am not quite sure whether this is better or worse. In an age where everyone is pointing at Ruby, and its weak typing, and it's apparent advantages, c# goes to the extremely strong typing.

Let me explain. In c++, templates are a kind of macro, which get instantiated at compile-time with a type <t>. This means, that in the template you could use any function, and only at compile-time, will it check whether such a function is available. Whereas in c#, the generic is a real class, and you have to define the constraints on the type, or the class wont compile. Meaning you have to specify the interfaces T implements, for instance, or which classes it inherits from. Which is ok, it is much stricter, it is correct, and it will catch bugs much earlier.

Whereas in c++ you could get this weird, unreadable, lengthy errors, when instantiating a template, and some function suddenly was missing. A classic are the comparison operators (well, at least in my experience). It is a design decision of course. I am not quite sure which exactly is the best. Introducing a possibility of weak typing does sound appealing, but also has disadvantages.

As in Ruby, where typing is very weak: if it walks like a chicken, and talks like a chicken, it must be a chicken. In Ruby, all checking is at runtime, it is never type-based, but signature-based. So if a specific class has a certain expected function, doesn't matter which type it has, or where it derives from, but if the function is available and the signature matches, call it. Great. This ultimately is very dynamic, and possibly very strong. It also invites, of course, as always, possibly bad programming. And you will have to use unit-tests very thoroughly to catch all errors soon enough. But it sounds great.

I am going to try out Ruby (and RoR of course), and I will keep you posted.

More ...
Uncategorized
Clarification (about procrastination)

In my local newspaper I read an article about laziness. Being lazy at work, because your employer wants to make a profit out of you, anyway. And you should do the same, be the first.

I might be the exception, i think i am not, but i actually like to work hard, to do the job as good as i can. Procrastinating has nothing to do with unwillingness to work. It is just sometimes, i feel blocked, creatively, which somehow pushes me toward procrastination.

I am not lazy, i like to work, i take pride in what i do, i want to earn my living earnestly and honestly. In the article there were 10 rules to follow as an employee. How to be lazy succesfully. In short : lay low. Don't be noticed. One rule i would like to mention though :

Rule 9 : always be nice to contractors, on a fixed-time contract, because they are the only ones who really work.

Aaaaah, yes ! At last, recognition :)

More ...
News
Future

Weird how things go. On my private website, i have written a review on the book "A whack on the side of the head", by Roger Von Oech. Which is a great book, about creativity, about how a whack to the head might get you started, and how you could whack your creativity, without hurting yourself.

I have been whacked, recently. My contract has been ended. Which was a bit of a surprise. But it also got me started again. Got me thinking about my carreer, how i would want to progress. How i would go about accomplishing this. Learning again.

And then suddenly, opportunity comes along, with a totally new and different road. And I like it. I hope it works out ! Wish me luck ;-)

More ...
Uncategorized bde borland oracle
Oracle 10 Troubles --continued

We had more than a few troubles migrating to Oracle 10, in our production environment. We are using a clustered server, with 3 nodes, so it should be blindingly fast. I'll sum up our biggest issues (we had) :

  1. Sequences : we used a sequence to make sure the messages we send, can be ordered. Somehow our sequence was set to NO ORDER, but in a single-node environment this always works. In our environment, we suddenly go gaps, leaps, depending on which node you were connected to. This seemingly unexplainable behaviour (sequences are always in order, so the error must be something else), was luckily quickly discovered (are they really?), and easily fixed.
  2. ORA-01483 : all our c++ server software, running on NT, is built using C++ Builder and BDE. We have had troubles like hell with "max open cursor" problems. So, fix, or workaround : count maximum open cursors, if this approaches the database maximum, re-connect to the database. Dirty, but it works. So, in Oracle 8, we had upped the SESSION_CACHED_CURSORS to 250. When we did the same in the Oracle 10g, suddenly, out of the blue appeared the ORA-01483 error. Whammo !! It took us quite a while to figure out what exactly caused the errors. Resetting the aforementioned to its default value fixed that problem.
  3. Database drop-out : every night our database just crashes, hangs. This is related to "open cursors problem". Our applications count the amount of open cursors using the v$-tables, which apparently after a while causes Oracle to hang.

Here is the query which correctly counts the open cursors given the program name :

select distinct a.value, s.sid, s.machine, s.program, s.inst_id, s.server
  from gv$sesstat a, gv$statname b, gv$session s
  where a.statistic# = b.statistic# and b.name = 'opened cursors current'
    and s.sid = a.sid and s.inst_id = a.inst_id and upper(s.program) like '[program-name]%'
order by 1 desc

The query we used before, was :

select count(*) from v$open_cursor where sid=:sid

To solve this, i changed the server-process causing the database to hang each night, to use DOAinstead of BDE. Apparently this also alleviates our open cursor problem. I did notice that open cursors, using DOA, are only really closed in Oracle after a commit. This is taken into production tonight, let's hope it will finally improve our databases up-time.

For the moment we manually stop and start our database twice a day, in a controlled way, in the hope our database can keep up for the rest of the time. Oracle are looking into our case, i am not quite sure why our setup is different than the rest of the world.

It has been a very hectic two weeks. Finally we are reaching a somewhat stable environment, although it still requires a lot of manual intervention to keep it running smoothly.

More ...
Uncategorized
Welkom!

Welcome! Welkom op de website van DIXIS bvba. Kijkt u gerust even rond :)

More ...