Zope

by Zef Hemel

I heard many positive stories about “Ruby on Rails”:http://www.rubyonrails.org, the trouble is that I’m not so fond of Ruby. “Python”:http://www.pyhon.org is much cooler, but why doesn’t it have a cool framework like that? Then I realized… wait, isn’t one of the better web application servers built on Python?

Absolutely, and its name is “Zope”:http://www.zope.org. Zope is an web application server. Ouch, that sounds complicated; which was also my first reaction when I came across it several years ago. And having briefly used other applications servers like “JBoss”:http://www.jboss.org my image of application servers didn’t improve much. They’re complex and hard to use and most of the time simply overkill.

Yet, this time I decided to take a more closer look at Zope. I read positive stories about it and decided to just go for it. I downloaded the “Windows installer package”:http://zope.org/Products/Zope/2.7.3 and dove in. After installing Zope you basically end up with one big application server. It has a webserver, FTP server, Object database server (ZODB) and WebDAV server built in, so you don’t need Apache, MySQL or anything like that. Everything you need (except for Python itself) comes with the package. After the server starts you can access it through http://localhost:8080 in most cases. I followed the tutorial that’s mentioned on the page that’s presented to you. After that I read more in the online “Zope Book”:http://zope.org/Documentation/Books/ZopeBook/2_6Edition/.

I won’t explain how all of Zope works, but I can tell you that I quite like it. It takes a while to get used to, but once you get it, it’s very nice. A couple of things that I like in particular:
* All-containing package, it’s all in there: HTTP server, FTP server, WebDAV and Object Database.
* Much of the development can be done in the browser (through the Zope Management Interface, see picture below)
* ZODB, the object database. This database stores all of your stuff; not just data, scripts, images, folders as well. It’s very easy to create new object types (ZClasses) and add methods and properties to them through the web interface, they fully intergrate into the web-based Zope management interface. What I like is that I can keep thinking in terms of objects. It doesn’t matter how objects are stored, Zope handles this for you. You can use relational databases, but you don’t have to.
* You can start out easy by ZPT templates and DTML documents/methods. Then you can move on to simple Python actions and later on to Zope products, defining your own classes and more.
* You can download many pre-built “products” from the internet and simply install and use them. You can also very easily package up your own products and download them as a distributable .tar.gz file.
* It has advanced security capabilities built-in.
* It has easy to use caching mechanisms.
* Methods you create in Zope are callable from outside the server through XML-RPC.
* It is “scalable”:http://zope.org/Documentation/Books/ZopeBook/2_6Edition/ZEO.stx, you can run your applications on multiple servers, clustering support etc.

The Zope Management Interface (browser-based):
The Zope Management Interface

The problem is: are there hosts that support Zope? Not incredibly much, but a couple. These are two I found:
* “Zettai”:http://www.zettai.net/ZopeHosting/
* “Quintagroup”:http://quintagroup.com/services/zope-hosting

There are even two nice free zope hosting services:
* “FreeZope”:http://www.freezope.org
* “Objectis”:http://www.objectis.org, check out my testing site there: “http://zef.objectis.net”:http://zef.objectis.net.

The trouble with not hosting the product yourself is that not all hosting companies allow you to add and create your own products, which is sort-of limiting. That’s why I love my VPS(Virtual Private Host) so much, I can install whatever I want.

Links:
* “Zope”:http://www.zope.org
* “Download Zope”:http://zope.org/Products/Zope/2.7.3
* “Zope Book”:http://zope.org/Documentation/Books/ZopeBook/2_6Edition/ (”PDF”:http://zope.org/Documentation/Books/ZopeBook/2_6Edition/ZopeBook-2_6.pdf)
* “Plone”:http://plone.org, an advanced CMS built on Zope
* “Zope Hosting Guide”:http://www.zopemag.com/Guides/miniGuide_ZopeHosting.html
* “Zope Labs”:http://www.zopelabs.com, Zope resources

NetLimiter

by Zef Hemel

Do you hate it too that your download manager slurps up all of your bandwidth? That because BitTorrent is using all of your precious upload bandwidth, loading a website takes two minutes? That the people you share your internet connection with are knocking on your door every time you’re downloading ehm… a Linux distribution?

Yeah, so did I. Until a couple of months ago when somebody told me about “NetLimiter”:http://www.netlimiter.com. Why I haven’t told you about until now? Because I needed to acquire some of their stock to gain most profit out of this massive publicity extravaganza that I’m hereby launching.^1^

So, what can NetLimiter do for you? NetLimiter allows you to limit the bandwidth usage of your applications individually (download and upload seperately) or even for all of your applications alltogether. It’s really simple to use and, basically, does exactly what you want it to do, the way you expect it to do it:


(Click to enlarge)

The only drawback is that it’s not free, a single-user license costs $29.95. Also, it’s only available for Windows. So if you’re running Linux or Mac OS X, you’re out of luck. There may be similar software available for those OSes, but I haven’t really found them as of yet.

“You can find NetLimiter here”:http://www.netlimiter.com.

^1^) I know this is redundant information, but I do not really own stock in NetLimiter’s company. I even doubt they’re a public company at all.

Software Pricing

by Zef Hemel

Joel sat down behind his PC, waved his hands a little and low and behold, there it was: another essay. This time it’s on software pricing and confusingly enough entitled “Camels and Rubber Duckies”:http://www.joelonsoftware.com/articles/CamelsandRubberDuckies.html. Why that is becomes clear when you read it. And as always: you should.

I suspect Joel was having quite a good time while writing this piece as it’s more comedy than content. Nevertheless, the problem is clear: you finished your software product, now how much are you going to ask for it? Is $100 too much? $1000? $10,000? After you’ve finished this essay you’ll be more confused than when you started. That’s unless your product is bug tracking software of course.

I’m going to start with a little economic theory, then I’m going to tear the theory to bits, and when I’m finished, you’ll know a lot more about pricing and you still won’t know how much to charge for your software, but that’s just the nature of pricing. If you can’t be bothered to read this, just charge $0.05 for your software, unless it does bug tracking, in which case charge $30,000,000 for it.

(For those who don’t know it: Joel’s company’s flagship product is “FogBugz”:http://www.fogcreek.com/FogBugz/. Worst… software… product… name… ever…)

“Read the essay here”:http://www.joelonsoftware.com/articles/CamelsandRubberDuckies.html.

Merry Christmas

by Zef Hemel

I’d like to wish everybody a very merry Christmas.

<?php
    $w='!samtsirhc yrrem';header(
  strrev('nialp/txet :epyt-tnetnoC'))
 ;$l=20;for($q=0;$q<20;$q++){for($i=0;
 $i<($l-$q)/2;$i++) {echo chr(32);}for(
 $i=0;$i<$q;$i++){echo '=';}echo chr(
10);}for($i=6;$i<14;$i++){echo chr(32);}
echo '==='.chr(10);for($i=6;$i<14;$i++)
   {echo chr(32);}echo '==='.chr(10);
   for($i=6;$i<14;$i++){echo chr(
      32);}echo '==='.chr(10);$w.=
        ' a uoy sehsiw feZ'.chr(10);
          echo strrev($w);?>

And for those who don’t have an PHP-enabled server: this is what it looks like.

*A Little Code NSFAQ(Not So Frequently Asked Quesions)*
Q: Why not in Python?
A: Python is kind of picky about spacing, so I couldn’t shape the code like this. Another reason is:

Q: Didn’t you post this code somewhere last year?
A: Yes I did (although I modified it a bit, to pass around Textile bugs). What can I say, I’m lazy.

Merry Christmas.

PS: People usually wish people a Merry Christmas and a Happy New Year. I’ll postpone the Happy New Year-bit until it’s actually 2005. I expect to still be alive by then to spread more current wishes. OK, now, did I already wish you a Merry Christmas? Merry Christmas.

Mr. Period

by Zef Hemel

Somebody showed me two comics yesterday that I find really great. They’re about Mr. Period. I’ll not inline them here because they contain some explicit language. So, before you click the links below, let your children leave the room if you believe that helps. Oh, and by the way, seriously, your kids will learn the words used in there even though you just sent them out. Even worse, they probably already do right now.

Letter to Japan
Fanboy forums

Enjoy.

Something what’s considered to be one of the major strengths of open source, is that you can modify the source code to suit your needs. If something doesn’t work the way you want it to, you can change it. If you find a bug, you can fix it. Great huh?

This monday I’ve had two situations where I could experience this ultimate power. The first was when I wanted to install “Fedora Core 3″:http://fedora.redhat.com, the Linux Distribution. The install went fine, but for some reason it didn’t recognise my network card. That was weird, it did work in Fedora Core 2… My network card always used the “tulip” module and with 2.4.x kernels it always worked fine (FC 3 uses a 2.6 kernel). After doing some research on Google, I found out that support for my card was also in the de4×5 module (or something, can’t really remember the name). So I loaded the module and my computer froze. The only thing I could do is reboot.

OK, we have two network card modules who should work, but one says it can’t find the network device and the other let’s the computer freeze. Open source to the rescue! Just download the kernel source code, find the right .c file. Fix the problem. Recompile and you’re set.

Yeah right. Have you ever seen what such a device driver looks like? It’s thousands of lines of code and all extremely low-level. I don’t know anything about hardware and, honestly, I’d like to keep it that way. Besides, debugging a kernel module that freezes up your computer is kind of hard, you know, because it freezes up your system every time you try something that didn’t fix the bug. For now I fixed the problem by one of the other strengths of open source: freedom of choice. I installed “Ubuntu Linux”:http://www.ubuntulinux.org, which also comes with a 2.6.x kernel, but a different release, which, apparantly, doesn’t have that bug. Not that it worked right off the bat, but after some tweaking I got it to work.

Second example: I’m taking an embedded systems class at university. We have to write programs for a 8051 processor system. The main trouble with it is to fit the program that you have to write in its tiny winy memory. Or so you’d think… Because you can’t just run normal Windows or Linux executables on such a processor, you have to use a cross-compiler. For this course we use the amazing “SDCC”:http://sdcc.sf.net. See that URL? Yeah, it’s open source! I feel confident already. So, we wrote the program first on the PC to see if it compiled well and worked. It worked fine. Then we compiled it using SDCC, no problem, no errors, no warnings. Then we uploaded the program to the 8051 system through the parallel port. After that we started sending data to it and then the 8051 froze… After some investigation by the professor there seem to be bugs in SDCC. Who knew? We tried a newer (unstable) version, which appeared to be even worse. Even the pong game that we wrote for this system in a previous class didn’t work with that one. But luckily it’s open source. We can just get the code, fix the bug, recompile and go!

Yeah right. Don’t even get me started on this one. Compilers make device drivers look like “Hello world” programs. I didn’t even dare look at the source code of SDCC. This time we didn’t solve the problem by using another strength of open source. Nope, our professor now only demands that you show that the program works on the PC and fits into the memory of the 8051 system.

Just another day in open source paradise.

Yep, I’ve been programming a little in the past few days. A couple of months ago I “talked a little about post formatting”:http://www.zefhemel.com/archives/2004/09/20/post-formatting and how I thought the BB-codes that today are used (like [b]bla bla bla[/b] for bold) are really not that great. Right now I’m working on my own ASCII to HTML converter that does it the way I want.

I thought I’d just put up a little demo: “you can find the demo here”:http://www.zefhemel.com/code/index.py/test.

These are some of the informal functional requirements that I formulated for it:
* The codes should be quick to type
* It should be suitable for academia and in the future should be do the most things academia need to do (including formulas)
* It should never get in the way, and if it is in the way you should be able to get it out of the way (hence the &lt;noformat&gt; tag)
* I should be consistent and easily adaptible for use in a Wiki. That’s why linking right now is done using the [[link text]](http://www.url.com) syntax. This allows for conistent inclusion of [[a wiki term]] or a link to a wiki term: [[some text]](the wiki term) later on.
* It should make it possible to do western non-ASCII characters such as éä etc. fairly easily. I chose the ‘e and “a syntax for this, which is LaTeX-like. See the demo for more special characters.
* It should be able to do bold, italic, underlined, links, images, headings (three levels), tables, lists (both ordered and unordered, multi-level)
* It should have processor tags which can be application-specific. By default I’ve included &lt;code&gt;, &lt;html&gt; (disabled in the demo for security reasons) and &lt;noformat&gt;. But in the future I’ll try to add more, such as &lt;math&gt; (which should translate TeX formulas into the correct representation (in an image, using LaTeX). It should be really easy add new processors.

Much of this is already operational (except for image and formula support) and should operate reasonably well. If you discover any bugs, please report them, I very much appreciate it. Also: I need a name for the formatter.

I’ve written it in Python and I’ll probably release the code (right now only 275 lines) when it’s more stable. Any feedback and suggestions are welcome.

Next Page »