Tuesday, June 26, 2007

Der long and winding road

Augh! I've been battling like crazy with getting the load/save cycle to work together with the openjacob draw2d libraries. Actually, that's not really fair, because I hadn't touched the problem before I switched to draw2d, so most probably I would have had the same problems no matter with graphical library I would have used.

Also, there is still something that have changed between draw2d version so that my visual manager, which let you connect terminals to infotrons visually, now route not at all between nodes. I'll get to that when I can.

Right now the main target is to be able to save and load both position, size and style of elements, including hierarchical elements in a page, including any infotrons and their properties and connections, with no losses between serializations.

This has proven to be nontrivial, but at the moment I am saving things correctly, and I erase stuff when loading almost correctly, and I can load all visible artifacts, and also all infotrons. Only the connections are remaining. And that is a known problem. I just have to choose how to do it, which is very nice for a change :)

And after that ...... the actual generation of a stand-alone webpage directory with the correct html generated and the correct js and css files copied to it. This is a non-hard problem, compared to my battles with the load/save cycle. I _know_ how to do it.

And when I've done that all I have to do is copy that process, tweak it a bit, and have export functions for both joomla and Google widgets (or any other stuff I'd like) Google widgets are extremely cool, because google has their own (of course) proxying library, so I don't have to ship a PHP (or other) backend for the proxy stuff. Hmm. I probably have to drop support for wsdl things initially, since I use PHP for that, but what the hey, who uses that stuff nowadays anyway? :)

Friday, June 1, 2007

The truth and nothing but the truth

Jeff Atwood of Coding Horror fame is kind of hard to write about, because I agree so much with him it's almost silly.

Take todays blog, for instance; http://www.codinghorror.com/blog/archives/000878.html
Named "The best code is no code at all", he succinctly argues that the biggest enemy to writing good code is ourselves, as programmers.

I've felt for a couple for years or more that I'm getting more and more sick and tired of being slave to a host of things that has nothing to do with the problem whatsoever.

We're getting bogged down by ant (or gods help you - maven) scripts, we have to battle code versioning systems of various lethal potency, and when the day is done we still have to create seven new classes and interfaces - several quite obscure and weird - just to be able to use a single kind of functionality of a fine API. We're not even using it in an edge-case scenario, we're trying to use it for the most common purpose for which it was built!

And then we've never even started to write the actual logic of what we're trying to achieve yet.

These reasons, in a nutshell, along with LOC bloat is my main reasons for using javascript almost exclusively, after almost 10 years as a Java/J2EE and occasional .N0t programmer.

You can also be very certain that the next time I code server-side again, I will _SO_ use a scripting language, probably PHP.