see whatever…

jump to menu

September 24, 2006

cssutils update

Filed under: cssutils — see @ 8:18 pm

After a short holiday and clearing up some personal things I worked a bit on cssutils. Mostly adding testcases which revealed quite a few bugs. I did not plan to implement the CSSValue interfaces but due to a request I probably will do that when I am finished with the basic stuff.

An new alpha will probably be posted this week (maybe after another short holiday ;) and should then contain basic tests for all interfaces currently done, let’s see…

September 15, 2006

Filed under: Death,Life — see @ 5:05 pm

September 8, 2006

cssutils pre-alpha

Filed under: CSS,cssutils — see @ 6:10 pm

I put a pre-alpha release of cssutils on my website this week. After doing some tests and extending the unittests I realized that v0.9a1 does probably not work in most cases anyway. I wanted to put up a new version but FTP to my host was down so it had to wait till today. So 0.9a2 is online, still pre-alpha quality with lots of bugs and not working features but I wanted to put something online anyway as the last release is more than a year old…

The most important todos are

  • improving distribution, currenty I work my way through the setuptools docs which I meant to do for quite some time now but never found the time
  • @charset is working but is not to the spec, I found some more docs (which are quite wide spread so it is a bit of a hassle really). I guess most people will not use this feature anyway but I’ll try to bring this to work properly soon
  • tests for the main CSSStyleSheet and CSSStyleRule and related classes like CSSStyleDeclaration and so on are needed and I guess I guess I will find tons of bugs :( Strange how many bugs I put in so few code which I did while doing more tests for the much simpler @import rule.

That is quite a task by itself but I hope it will be done this month. Then I can concentrate on doing even more bug squishing (unittests ;) and I think I put support the @namespace from CSS 3 in too. Should not be too difficult…

September 6, 2006

Python exceptions should have more metadata?

Filed under: Python — see @ 9:56 pm

Ned Batchelder who quite often has very interesting things in his blog (about all kinds of stuff really) wrote about doing tests and in particular about handling exceptions there. Very interesting and I guess adding a bit more metadata to exceptions would be quite good in general.

Quite useful right now as I am about to rewrite cssutils (which comes along very nicely, at least much nicer than the last 2 tries ;)

September 3, 2006

missing lt und gt in feeds of WordPress posts

Filed under: Uncategorized — see @ 1:10 pm

I noticed that all lt and gt characters in my last post are missing in the generated feeds from WordPress, both the RSS and Atom feeds. Normally these should just be escaped as AMPERSAND-gt-SEMICOLON (> – does this go through?). I have not looked deeply into RSS or Atom yet but this should simply work, at least in Atom which definitely has facilities for using markup (or in this case just XML special characters inside post texts.

From experience I know a lot of developers using XML have problems with this stuff maybe by simply forgetting these things; maybe this is simply a security “feature”. But a bit strange and in a software as widely deployed and used as WordPress this should not happen…

UPDATE:
I just noticed that WordPress outputs the gt sign between the above parentheses as a sign and not as the escape sequence which I types. Funny thing is that the included WYSIWYG HTML editor in wordpress actually outputs the escape sequence, the actual output does not… So the feed generator is not the only quirky thing here

2nd UPDATE:
While looking at the Atom feed in more detail I noticed that the headline and text of the post are indeed escaped with mode=”escaped” and simply put in a CDATA section. But a combination of ltgt is handled the same as an actual HTML element and not as characters of text as the WordPress HTML Editor used them and also outputs them. It seems this is a bit of a mess…

September 2, 2006

and switching programming languages

Filed under: Java,Javascript,Jython,PHP,Programming,Python — see @ 11:18 pm

In Reqiem for an operator Barry Warsaw farewells the <> operator which will be removed in Python 3000. I have no real opinion on the topic itself although I think <> and != are one of the few not TOOWTDI things in Python and so a reasonable decision to remove one. But the followoing question in the same blog entry got me thinking:
“How often do you type semicolons at the end of your Python statements? How often do you type colons at the end of your C conditionals? Yeah, me neither.”

Actually I do tend to forget colons in Python after programming a while in Javascript or PHP, and I do forget using braces in e.g. “if” clauses in Javascript or PHP or Java after programming in Python for a while. Actually I forget to use a lot of things in other languages that are not needed in Python like () {} ; etc. What really made me nervous was building a simple JSP form this week where I had to use Java and I almost got angry about all the stuff I had to type which would have not been necessary if it would have been a Python or even Jython form. All the declarating, casting, complicated and verbose looping etc was simply a nervekiller.

So I guess getting rid of <> in Python in favor of != makes language hopping at least a bit easier.

About the only thing I sometimes wish for Python would be the removal of mandatory colons at the end of if, for, class, def etc. I guess this would make parsing of Python sourcecode impossible or at least “indeterminable” (is that an english word?). But the colon is one of the few places where a special character makes the code not more readable but a bit convoluted. Not a big problem as the parser complains about missing colons (which I see frequently ;) .

BTW, this post is somehow related. It makes me like the language even more as there still seems to be space for a bit of fun.

Powered by WordPress