see whatever…

jump to menu

May 2, 2009

Blu-ray blues…

Filed under: Death,Film,Usability — see @ 12:20 pm

I do like watching movies. I used to go to the cinema very frequently (there was a time in which I went more than 200 times in a single year). I totally passed on Video as the quality never was good enough (and I also never had the money to buy a decent TV and VHS at the time ;) . And VHS just was not anywhere near cinema quality.

When DVD came out (and became affordable) I got a player and also a projector with which a cinema like experience at home was almost possible. I did not get any high-end player nor projector but still the experience has been worth it and it is affordable. Also starting at that time I like watching movies in their native language which is a real problem in Germany as most films are dubbed and not just subtitled. This is the main reason I do not go to the cinema very often these days. At home I can see movies in their native language (it takes a while until films are released on DVD etc but this time has been getting less and less recently and I think almost bearable now). See also An Epic Fail which is very interesting.

So naturally after HD came about I was thrilled. Even better quality! No way to afford a full HD projector yet but 720p projectors have been quite affordable for some time now and even on these HD makes a difference (depending on the quality of the film of course ;) .

I watched the dreadful battle between HD-DVD and Blu-Ray which is one of those needless but self-destructing things in modern technology it seems. In the end HD-DVD (being the better technology it seemed) lost. But as BD-players were still much too expensive and I did not want to get a noisy power-hungry monster like the PS I waited. HD-DVD players were in sale and the price was as low as a middle class DVD player and so I got one of the last ones. The player was good enough or even better than my old DVD player so it replaced it.

Films on HD-DVD were quite cheap as well (at least not as outrageously priced as BD still sometimes is today – a movie for 30€?!) and near normally priced DVDs (which is somewhere a movie ticket for 2). I got about 5 or 6 movies which I sometimes already had on DVD but all of them were worth the (now sometimes doubled) investment. Very crisp and clear image, films like 2001 are just made for HD. Also the menu system was nice. Nothing too fancy but menus popped up quick and just on top of the film (so a quick change in e.g. subtitles etc was easy). Also for most films each extra showed its duration which sometimes is very interesting. A making-of has a range between maybe 5 and 200 minutes and knowing that beforehand is nice. Of course the player had some drawbacks. It was dead slow until a disc was finally running, sometimes upto a full minute. But all in all the experience was enjoyable. The main stuff – the movie – in good quality, extras were good and easy accessible.

Of course I knew HD-DVD was a dead technology but as the price I paid was hardly more than what I would have paid for the same stuff on DVD it was totally worth it.

Then, I think this year, BD-player prices finally came down to affordable ranges and also movie prices finally came down. Also the range of movies available on BD is high enough that not only last years blockbusters are available now but also classics like Kubrick films, the Bond movies, and generally movies which are not in their kindergarten age but like Planet of the Apes are from the sixties and older. Even some Hitchcock movies are at least announced.

So when a very nice offer came along I finally got a BD-Player. New generation but very decently priced and a player which had good reviews in every magazine and online review.
I don’t think the player is bad and I also don’t think that my player does anything very different than other players on the market (ignoring high-end ones for now). I guess any player from any brand is at least similar. Sometimes a bit slower, sometimes a slightly better image but all in all exchangeable. So my problems with BD are not with my specific player. (One point: My player does not have a subtitle button which I would like to have as I need about 5 clicks to change this. Very annoying).

But I think BD has problems…

First, reading a BD is as slow as reading a HD-DVD. This will improve with new models but it is painful. During the player reading a disc for the initial time it flickers between funny images like a complete blue screen, a wobbly black and green one and other stuff. This is the same when I start up my PC but I want a home consumer technology to hide this.
It seems handling the HDMI HDCP handshake and handling the BD copy protection the player is so busy that it simply is unable to show anything decent.
Also the “Reading” message is shown as frequently as the typical “LOADING” on any PC-game or modern Flash based websites…

So the player is slow but the real problem is that EVERY TIME I press the button to go to the main menu it takes time. It seems the menu has to be read from scratch every time. HD-DVD was much better there, menu popup was almost instantly there.

Generally the menu system is really strange. I guess any publisher does his own menu so there are no best practices yet. So any publisher makes his own mistakes how to structure and navigate the menu. (BTW, no BD I have seen until now had duration information on any extra feature which HD-DVD discs had and which I liked – maybe it is just coincidence). The possibilities in designing a menu for BD are much higher than for e.g. DVDs but with this power also comes a higher responsiblity (sorry for this overused quote ;) . It seems hardly anyone tests if a menu is usable at all.

Two examples:

On X-Men 1 the extras have lists of parts or subfeatures. These are “scrollable” with a click but they do not rotate which is annoying in a list of 12 items and you are at the bottom but want to the top of the list which then takes 12 clicks. Also going back to the menu takes about 3-5 second every time I am finished watching 1 extra which is most tiring when I have like 30-40 extras all in all…

The Zodiac BD menu is much simpler (basically a one screen menu like a sitemap which is actually good) but navigating this menu is not self explaining. The Menu has 3 columns which you navigate up/down by using the cursor up/down keys on the remote. I would expect the highlight cursor on the screen to move to the top of the next column if I am at the bottom of the column before. But that does not work. I have to use the cursor right and left keys to move between columns. Ok, let it be so. But I also have to be on the proper height in a column to move to the left or right! If I am at the bottom on col 2 I cannot use cursor right as the right column has no selectable items at this point… (BTW my player locked up totally once while navigating the menu which is really strange given such a simple menu with no animation or any other fancy stuff. I had to shut the player down completely which took about 30 seconds as it did not wanted to shut down. I am patient so I did not pull the power cable but I wonder what would have happened…)

Another problem is the handling of buttons in the menus. It seems most menus just use the cursor and ok buttons on the remote. The remote also has a “Return” button which is used in the player setup menus. So I expected to be able to use it in disc menus too. Returning from a deeper level of the menu to a higher would be a reasonable function of this key I think. But all I get is a player message “This function is not available at this time”. This seems to be a standard message if a key press it not supported (Also e.g. when trying to get to the menu during the dreadful legal message screens after some movies which are shown in 10-30 languages. But this is a DVD problem too…). But I get this message on almost any second press of a button which is just strange. I simply do not feel comfortable with such a control. And I guess people not familiar with technology generally just think the disc is broken…

These are all minor annoyances. But should a new technology not be better than an older one? Watching a DVD is quite simple, menus are basic but simple to use, menus are generally quick and also loading of a disc is quick. BD is generally slow, sometimes unbearable. And why? One reason is the copy protection which makes the player so busy it cannot even respond at times. And it is known no copy protection is safe forever (not even years) so a IRONY:”feature” I don’t want and does not help anyway does even annoy me?
I don’t copy movies, I do buy them. But I have to live with a handicapped technology. I did not even mention region codes…
The usability problem of dics I guess will not be solved as it would force publishers to test any new menu. Website usability has improved over the years (still not perfect of course) but I think BD menu usability is not even recognized as a problem yet.

In former times products were developed for a need and to help the customer (at least that is what I think). BD just seems to cause problems and being able to watch a movie in good quality is just a side effect. The greatest fear I have is that it will even get worse in the future (BD+ copy protection is on the way but what madness will the next technology after BD have)…

March 8, 2009

property filter with cssutils

Filed under: cssutils — see @ 6:22 pm

cssutils 0.9.6a2 has just been released and the main new feature probably is custom property profiles. You might want to filter any given stylesheet on certain properties. This might be predefined ones (like CSS 2 properties like e.g. “color”)  or predefined ones but with a limited set of possible values or even custom properties with custom values.

Example

Following a simple example how to define a custom profile and filter any given sheet (at least style declaration properties, filtering of certain @rules is not shown):

import cssutils
# remove ALL predefined property profiles
cssutils.profile.removeProfile(all=True)

# add your custom profile, {num} is defined in Profile and always available
macros = {'myvalue': 'a|b|c'}
props = {'abc': '{myvalue}|{num}', 'color': 'red|blue'}
cssutils.profile.addProfile('my-profile', props, macros)

# keep only valid properties (valid in given profile)
cssutils.ser.prefs.validOnly = True

print cssutils.parseString('''a {
    color: green;
    color: red;
    abc: 1;
    abc: b;
    abc: 1 a
}''').cssText

results in (some messages may be doubled – not shown here – because messages are output on parsing AND during serializing):

ERROR   Property: Invalid value for "my-profile" property: green [2:9: color]
ERROR   Property: Invalid value for "my-profile" property: 1 a [6:9: abc]
a {
    color: red;
    abc: 1;
    abc: b;
    }

How to

To define your custom property profile you just need to define the properties with the possible values in a standard dictionary. Each key is a property name, each value a regular expression defining valid values. Actually the value is not (yet) a regular regular expression but may contain macros which may be used to simplify the definitions. Each macro is defined with enclosing {} and must start with [a-z]. You may define your own macros (“myvalue” in the above example) or you may use predefined macros. The basic ones are defined in cssutils.profile directly. To get a list use:

import cssutils, pprint
print "TOKEN_MACROS"
pprint.pprint(cssutils.profile._TOKEN_MACROS)
print "MACROS"
pprint.pprint(cssutils.profile._MACROS)

resulting currently in:

TOKEN_MACROS
{'escape': '{unicode}|\\\\[ -~\\200-\\777]',
 'ident': '[-]?{nmstart}{nmchar}*',
 'int': '[-]?\\d+',
 'name': '{nmchar}+',
 'nl': '\\n|\\r\\n|\\r|\\f',
 'nmchar': '[\\w-]|{nonascii}|{escape}',
 'nmstart': '[_a-z]|{nonascii}|{escape}',
 'nonascii': '[^\\0-\\177]',
 'num': '[-]?\\d+|[-]?\\d*\\.\\d+',
 'number': '{num}',
 'string': '{string1}|{string2}',
 'string1': '"(\\\\\\"|[^\\"])*"',
 'string2': "'(\\\\\\'|[^\\'])*'",
 'unicode': '\\\\[0-9a-f]{1,6}(\\r\\n|[ \\n\\r\\t\\f])?',
 'uri': 'url\\({w}({string}|(\\\\\\)|[^\\)])+){w}\\)',
 'w': '\\s*'}
MACROS
{'angle': '0|{num}(deg|grad|rad)',
 'color': '{namedcolor}|{hexcolor}|{rgbcolor}|{uicolor}',
 'frequency': '0|{num}k?Hz',
 'hexcolor': '#[0-9a-f]{3}|#[0-9a-f]{6}',
 'integer': '{int}',
 'length': '0|{num}(em|ex|px|in|cm|mm|pt|pc)',
 'namedcolor': '(transparent|orange|maroon|red|orange|yellow|olive|purple|fuchsi
a|white|lime|green|navy|blue|aqua|teal|black|silver|gray)',
 'percentage': '{num}%',
 'rgbcolor': 'rgb\\({w}{int}{w},{w}{int}{w},{w}{int}{w}\\)|rgb\\({w}{num}%{w},{w
}{num}%{w},{w}{num}%{w}\\)',
 'time': '0|{num}m?s',
 'uicolor': '(ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|Butt
onHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText
|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu
|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShado
w|ThreeDShadow|Window|WindowFrame|WindowText)'}

You may also use any macro defined in the predefined profiles. As these may use other macros all have to be added (in the following example the “‘identifier” macro):

from cssutils.profiles import macros as predef
from cssutils import profile
macros = {'my-font': predef[profile.CSS_LEVEL_2]['family-name'],
          'identifier': predef[profile.CSS_LEVEL_2]['identifier']}
props = {'f': '{my-font}'}
cssutils.profile.addProfile('my-font-profile', props, macros)
print cssutils.parseString('''a {
    f: 1; /* 1 is invalid! */
    f: Arial;
}''').cssText

resulting in:

ERROR   Property: Invalid value for "my-profile2" property: 1 [2:9: f]
a {
    /* 1 is invalid! */
    f: Arial
    }

I hope this does not feel to complicate… If you have any suggestions or questions please try the cssutils Google Group.

February 12, 2009

geek

Filed under: Uncategorized — see @ 9:21 pm

what links one get over twitter is just marvelous…

71% Geek

(and I know why my score is so low, at least partly because I use windows…)

and be careful not to order anything, just the quiz is free ;)

February 8, 2009

words I like: “Libelle” and “now”

Filed under: Language — see @ 1:22 pm

A word I do like: “Libelle” (german for dragonfly which I actually do not like really).

Another word that I do like a lot is “now”. Slightly more 80s though (maybe because of some songs using it extensively like some Art of Noise stuff).

Actually “though” is veerry nice too.

December 26, 2008

combine and minify CSS

Filed under: CSS,cssutils — Tags: , , — see @ 12:55 pm

I have been working on minifying CSS for quite some time now and had written a simple web.py based CSS handler which does exactly that. Actually it simply uses the minify option of cssutils

Additionally the handler does combine all imported stylesheets of a given proxy sheet into a single one. Nice for development as you can split sheets into as many as you like but deploy only one. So you may have the following stylesheet style.css:

/* proxy sheet */
@import "basics.cs";
@import "layout.css";
@import "forms.css";
/* etc... */

(I normally separate styles into something similar).A given HTML page always references the single stylesheet style.css which would even work without a combinator as @imports will be loaded by the browser anyway. But for deployment or when using the simple combinator handler style.css will contain all rules from all imported sheets resulting in only a single HTTP request. If additionally minified after combination the savings on load time in most cases is substantial.

For the next release of cssutils I added a combinator function to cssutils itself:

proxysheet = cssutils.parseFile(PATH_TO_CSS) # or use parseUrl etc
combinedsheet = cssutils.resolveImports(proxysheet)
cssutils.ser.prefs.useMinified()
print combinedsheet.cssText

Based on this I thought it would be nice to have a service which does just that, resolve all imports in a given sheet, minify it and return it. So I started the CSS Minifier at GoogleAppEngine (GAE). It has a basic frontend where you enter an URL, may optionally select advanced options (for now the error level below which errors are simply swallowed, the target encoding which may currently be UTF-8 or ASCII and the option if the imports should actually be resolved).

Additionally it may be used as a simple service which returns a combined and minified sheet or in case of any errors a HTTP 400 BAD REQUEST with the error log.

The only problem on GAE was that it prevents usage of urllib/urllib2 to actually fetch the content of URLs. But it has it’s own API for that so no big problem to rewrite the fetching code. For the next cssutils release I actually added the code for GAE into cssutils itself. If cssutils thinks it runs on GAE it uses the GAE specific fetcher code, else urllib2 as before.

To detect if a script is running on GAE for now I try to “import google.appengine”. Not quite sure if that is enough but for now it seems to work.

Anyway, hope this service may be useful.

October 16, 2008

CSS Systems

Filed under: CSS — see @ 10:28 pm

via Isotoma found Natalie Downe’s CSS Systems, some thoughts about it:

  • a “system” for better communication for the end user (in most cases another developer) is a good and valid point
  • ordering (#17) and grouping (#18) of different style “areas” is mostly on what I would agree on.
  • the term helper classes (#18) for e.g. forms is great. I guess I did this unintentionally anyway but terming it this way is great
  • during the whole presentation (it is a PDF from a pres.) there is lots of “I like” or “I don’t like”. It seems CSS has quite some areas which are a matter of taste (and it seems my taste differs in more than one area…)
  • Using CSSEdit on Mac (which I don’t know as I do not work on Mac) seems to influence how you write your styles too. I normally use Aptana with a custom helper script (server side) which allows working in more than one file but get as an end result a single CSS file (to cut down HTTP requests)
  • Some of the things I do like (but not Natalie apparently):
  • IE specific sheets verses CSS Hacks: I prefer the hacks as IE condiditional comments require:
  • more than one sheet with more than one HTTP request PLUS maintainance problems with styles littered over several sheets (hacks keep related styles together). I do use valid hacks only though and try to minimize them too which normally is possible with most designs to develop HTML + CSS for
  • “Selector based indentation” (#44): This is actually something I do quite often. Not for everything but for the styles Natalie would put into the area of “page structure” (the layout I guess) and “page components” (some say “modules”). The general layout (e.g. 2 column-container with a left and and right column in it) seems a perfect fit for indentation. As this general layout is mostly quite simple (as it is a skeleton only) and stable hopefully ;) (if not the HTML and there for CSS has to change substancitally anyway) I don’t see a problem of maintainance here. Also as page componens/modules are normally not really that long (I find for most designs and therefor also page modules the HTML is quite simple and therefor the CSS mostly too) and are by definition self-contained (a module…) indenting there is a helpful way to make the CSS more readable. If you factor out helper classes (e.g. for a specific kind of link or headline or list etc) these groups become even smaller so indenting makes these even more useful.
    If you use CSSEdit this may be different but it seems CSSEdit does show something like an improved version of Aptanas “Outline” which I do not find very helpful anyway so guess CSSEdit would not help me much either (again a position of tool and taste)
  • Maybe indentation also is a matter of what programming languages you use? I could even live with a CSS without any curly braces just defining declaration blocks by indentation. But that would be a Python programmers wish (actually there is a script which allows you just this but for that I am more a HTML/CSS than a Python guy ;) ). But the same as Java programmers seem to hate indentation with a meaning in Python some people seem to ignore indentation in CSS as a help for adding addiotional information/context
  • Class instead of element name selectors: Indentation makes most sense if you have a self-contained module with selectors mostly using element names and not classes (at least not module specific classes). E.g.:
  • .download {}
      .download h2 {}
      .download ul {}
        .download li a {}
        .download li .specific-helper-links-extended-here {}
  • this way you minimize the amount of classes needed altogether (yes you need to keep track when e.g. changing the “h2″ to an “h3″ but if you change the HTML for this case the whole structure where this module is used changes so you should be aware of the anyway. But I am not dogmatic here, you may still use a class “.header”. If you are worried to use “ol” instead of “ul” you probably will be better of styling the “li” anyway) [but I am drifting off...]
  • I do agree on to think about “what” to style and not “where” (#44) it will be (semantically on the module and not the single HTML element level of course so this is not really an argument against indentations of related style declarations IMHO). Anyway, the CSS classes reflect this in their “semantic” naming as a result. Sometimes there may be a problem here though. For designs not being stable yet (but the CSS to be done nevertheless, deadline ACK!) but also for websites running a long time and being extended/changed etc,  sometimes finding a proper and longlived name is sometimes really difficult. Especially if you get a design, start trying to find related modules and their respective (class) “names” but then the design uses just the same before defined modules for sometings totally different or the actual client puts totally different content in these the semantic names are actually totally wrong…
  • Sandboxing (#47): I agree on this which seems to contradict my point made about indentation. But in my experience most people simply try to be too clever (and therefor complicated) or sometimes even too bureaucratic. Simplifying the CSS (leave out any not needed selector part) sometimes make a sheet not just dramatically shorter and maintainable but also
  • style leaking by keeping the element name with a class it maybe ok for helper classes but to page components (which I would equal to modules – not sure now if Natalie actually meant this) I find an adding of a module class (above example “.download”) sufficient.
  • “height” being evil I strongly agree on…
  • 2 points I think are missing:
  • #id versus .class: I only use IDs for tying label and form elements together and anchors so normally NOT for CSS styling at all (maybe for Javascript enhancements but even then hardly). You mess up your cascade and also you never know if you may use a style declaration again (which you can’t in case it is an ID without duplication the style declaration OR adding another ID…)
  • Once you use “!important” you are lost. Never use “!important” except maybe for print styles or even more-maybe for IE bug fixing but you have to be very careful…

September 20, 2008

removed generated twitter posts

Filed under: Uncategorized — see @ 1:32 pm

just for the record, I removed all generated twitter posts. Due to messing up the tagcloud (they were not tagged and effectively “uncategorized” simply was too big). Also there was the doubling of posts on twitter AND this blog’s feeds (sorry Paul and thanks for the hint).

All original posts are available on twitter of course so nothings really lost. Comments given for any posts on this blog are removed too though. They were just a couple and please don’t be annoyed if I removed your comment…

August 17, 2008

ipot…

Filed under: Life — see @ 6:38 pm
ipot

saw the other day in a shop, the ipot… ;)

August 2, 2008

lost mail…

Filed under: Death,Web — see @ 1:53 pm

despite my freudian misspelling of mail (male ;) I lost all mail which I got on friday August 1…
Thunderbird got confused while handline over 500 of “:o) ” referred emails and simply seems to have swallowed all still in my inbox. Very annoying.

Luckily I don’t too many really important emails (hopefully I do no offend anyone with this statement ;) but please resend any mails you may think I should have read or answered (but did not). Thanks a lot!

July 30, 2008

cssutils 0.9.5 final…

Filed under: CSS,cssutils — see @ 2:25 pm

After about 6 months of development 0.9.5 of cssutils is released as a final version. The last final version has been 0.6 …

Not that final means perfect but at least I tested everything, the lib itself, the scripts which have been broken in some alpha and beta releases and also the examples on the website which have been changed quite a bit. There still are quite a few areas where I suspect problems but there has to be a release at some point ;)

Anyway a release means starting a new one. I guess I have to improve the basic property handling. New values have been added to CSS2.1, CSS3 modules can be added (especially the Color Module which is almost a recommendation).

But I think I do look into other small projects first as I have been concentrating on cssutils in my spare time for quite some time now…

« Newer PostsOlder Posts »

Powered by WordPress