Wednesday, September 16, 2009

Release

I've packaged up a tarball to make a first release of idfeditor, an application to create and edit the configuration files for Energy Plus building simulation. It can be found at code.google.com/p/energyplus-frontend. The first release is very basic allowing editing of most elements of the configuration file.

Next is to simplify viewing and editing the building geometry. Energy Plus has a few different ways to represent the information. One way is vertices, with a building element made up of a series of 3d points. The points can be relative to a building basepoint, or zone, the points can be clockwise, counter clockwise, starting at any of the four corners, etc. Or there is another way which has azimuth or facing angle, tilt, origin, length, width. Again from origin. It is quite flexible, meaning quite complicated and error prone.

Right now I'm working on translating the various input types into xyz space, something suitable to transforming, rotating and such. The first goal is to get the code to the point where it reads and writes the data reliably with all the defined input types. The math is fun. I vaguely remember learning all this stuff in school, and have the horrifying memory of doing the calculations on a slide rule. I can't honestly say that it is coming back, that would assume there was some memory remaining. It is all pretty basic vector geometry.


Monday, September 07, 2009

Almost ready to release

Almost ready for the first release of Energy Plus frontend, idfeditor. code.google.com/p/energyplus-frontend. The link lists the features that are done. I'm in the process of testing by building and editing a simulation, and am finding the odd thing that needs fixing. There are many things I want to do to make creating a simulation easier, but they will have to come in future versions. Anyone who wants to test can checkout the svn tree and run "python idfeditor.py".

One issue that I'm not sure about is regular crashes when calling QFileDialog. It doesn't crash each time it is called, but seemingly random. The traceback shows a call to free() in Qt. The PyQt folks may have some ideas, but has anyone else run into this? I'm not sure if it my Arch Linux setup which is somewhat bleeding edge.


Saturday, August 15, 2009

Phantom Pain and Python

Been rereading The Brain that Changes Itself (link). A friend had a severe injury a number of years ago, lost two limbs. He experiences phantom pain, where the missing limb hurts or itches. Quite common for amputees. A neurologist figured out a mirror box, where for example if you have one hand amputated, you put the good hand in this box, and you see the mirror image in another compartment. The patient is told to imagine putting his phantom hand in the other compartment.

The movement of the good hand is reflected, and the brain sees the mirror image and gets the impression that the missing hand is moving. People would find the pain and odd feelings from the missing hand go away. About half of the patients treated in this way improved.

The gentleman who figured this out, V. S. Ramachandran says to his students "when you go to meetings, see what direction everyone is headed, so you can go in the opposite direction. Don't polish the brass on the bandwagon". He describes pain as "an opinion on the organism's state of health rather than a mere reflexive response to injury". Out of these insights come therapies that help in dramatic ways.

The energy plus frontend is progressing. I wrote a script that reads the class definition and generates python classes representing all the elements that make up a building simulation. Right now I'm working on models that encapsulate the data for the variety of views that are needed. Andreas Gerber, who teaches building technologies, has contributed code for writing out the definition data from the classes.


Sunday, May 03, 2009

Rapid Application Development

An itch showed up, I needed (wanted) a simple, or so I thought, application to edit or create a definition file for the Energy Plus building simulation suite. Energy Plus is a US department of energy sponsored project. You need to define the building quite specifically. There are applications available for windows, or for purchase. So I decided that the best way to learn the rather complex structure was to write some code to fool with it.

I started with Ruby, but when I needed some gui stuff, found the bindings not up to date. PyQt is up to date and well supported, so I started writing. First was to parse the definition dictionary provided in the suite to build python classes representing each needed description. The classes would know how to read, write, edit and draw the particular element. Or would once I wrote it. Then read some example definition files, and work on the edit code. So far, so good. There is still a ways to go, but I'm seriously impressed how quickly one can bang out a working application for a specific purpose. This isn't trivial; the definition files are complex, long and involved. I have some widgets to write, some careful parsing through the results to check for accuracy, and some code to draw a few elements onto a graphics scene to represent the building outline. I suspect another 40 or so hours on top of the 40 or so I have into it already to get something useful.

Very impressed so far. PyQt is well documented and works, python works well and is reasonably quick. Qt is of course very nice to work with. It is so quick to build something useful.

The project is at http://code.google.com/p/energyplus-frontend. You need python, and pyqt. And the energy plus suite mentioned above, which is free. Get both the linux and windows one, it runs in wine. The windows package has the dictionary files required to build the classes. I'm working with the v3.1 stuff, and eventually may test with earlier versions.

The prerequisite screenshot. Note the empty space in the middle. A graphics scene ready for one's imagination.


Sunday, January 25, 2009

Qt and Community

The opening of the Qt repository is potentially the most important move Nokia has made.

Jeff Jarvis documents the decline of print media and explores strategies that could be adopted to keep in business. He describes an attempt to build a news product with community involvement, attempting to use the community. He probably inadvertently describes some of the attempts to leverage free software developers. It only works if people are building something for themselves.

Nokia is building something for themselves, and opening the repository (and adjusting the license) so that developers can build something for themselves.

One might add that having developers by definition as users of the library makes it more likely that valuable contribution will happen. End user applications face a bigger hurdle in eliciting contribution.

I have an article in lwn.net this week regarding the Qt announcements.


Thursday, January 15, 2009

Nortel Bankrupt, My Fault

Nortel, a venerable manufacturer of telecommunications equipment has filed for bankruptcy protection. Their last gasp was the tech boom of the 90's, but since then they have been shrinking. The market they sold into has changed, and they didn't.

Why is that my fault? Simple. My daughter is in Scotland, so I explored the various alternatives to be able to call. Cheap was the goal, with the expenses paid on my end preferably. So I set up a voip account with a UK provider, purchased a local number in the city where she resides. It costs me around $8 a month. I dusted off an old laptop that was sitting idle, installed Asterisk and got it working. I purchased a product from Nortel's arch nemesis Cisco, who sells a Linksys phone/voip adapter. She calls the local number with her cell phone on the weekends when it is free. The phone rings here and we talk as long as her free minutes allow.

All for $8 a month. For 4-6 hours of chat.

That is why I feel personally responsible for the bankruptcy of Nortel. I don't feel bad or guilty. Just responsible.


Monday, January 05, 2009

Qt LGPL

Big news. I actually liked the GPL since it forced 'payment' of some kind. But there is no denying that the license conditions of Qt have limited it's adoption. Those barriers are gone.

The one thing that was problematic with the old arrangement was the insistence on ownership (with rare exceptions) of the code within Qt. If there was a bug, the solution was to maintain a parallel tree and/or wait for Trolltech to fix it. To quote from Ars Technica:

An inclusive and transparent development model

In addition to adopting the LGPL license for Qt, Nokia will also be completely changing Qt's development model to make it more inclusive and transparent. The source code will be moved to a publicly-accessible Git repository so that the latest changes will always be visible. The use of Git, a distributed version control system, will make it easier for third-party developers to participate directly in the process of improving Qt. To further reduce the barrier to participation, Nokia plans to accept code from contributors without requiring copyright assignment.

That is a very positive change. And probably bigger news than the license change.

Looking At the Gift Horse's Teeth

Multi-national corporations don't give things away. So what is the deal here? Nokia seems to be trying to gain developer mindshare. They are in a multi way fiercely competitive market in phones; Apple, now Google, the Microsoft platform, Palm is back in the game, RIM, etc. The base phone market is pure commodity. But if you had a very nice smart phone with a very large developer community that is cross platform, cross capability, cross everything, there is potential.

This is up against Microsoft, with an solid toolchain and product offering. But it is closed and expensive. Google, with an open and free platform developed in the dark. Google is great with free software, but does it the typical way, periodic free code dumps. Control rears it's ugly head. RIM has a totally closed stack and offering and has the benefit of first to market, actually having defined a market segment. Apple with very tight control of not only the platform but what runs on it. Nice, expensive, boutique, but ultimately limiting.

So Nokia comes tearing into the corner like Esa Tikkanen, attempting to change the game. An excellent toolkit with a large and vocal and enthusiastic user base. A license change that will only increase the size of that base, potentially changing KDE and Qt from an outlier in the free software stack to a central part. Throw in the freeware and shareware potential for other platforms. And much of what is written potentially available for a smart phone. With some work of course. The platform potential gets defined in large ways by the numerous users and developers. And by the way, I've got some hardware that you'll like for sale. Think of the implications. I enjoy free software for the ability to customize my work environment. Not wallpapers and sounds, but the whole application and workspace. I want a portable device that would allow me to do that. Not 'allow', but by design encourage.

If you look at the offerings now, they each have a small well defined market to cater to. Rim with the connected. IPhone with the fashionable. I have no use for either, and haven't bought them. My needs will not be met by someone looking for market share. They will be met by ideas implemented by people with similar needs. All we need is a platform to build it on. It seems that Nokia is looking to build that platform.

As I said, very interesting. Palm had such a platform for it's time, but when the possibilities changed, their software wasn't ready for it. As long as Nokia keeps it open, lets go as much as possible, and follows while leading (as tough a challenge as it sounds). Don't do anything approaching the Apple khtml/webkit BS. Remember that people will work to no end for themselves, but will not ever work for you for free. Think hard about the difference and get it right. Produce nice compelling hardware for us to buy and build on.

We are in for an interesting ride. I'm actually excited by the portable platform again.


This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]