Search Results: "Erich Schubert"

24 November 2006

Erich Schubert: BPM tag your music

When you DJ or - as I do - dance a lot, the beats-per-minute values of songs are interesting. However, counting them manually is a pain, especially if you have lots of them. GJay is a software that can calculate the BPM (using a clever algorithm from BpmDJ). However, it stores the information in it's own database. Whenever you move the file, you'll likely have to recalculate it. And so on. However, the ID3v2 format has a TBPM field for beats-per-minute information, so why not store it there? gjay from CVS (sorry, the Debian package doesn't include this yet; I also do not know if this works for Windows) has a standalone mode for analyzing. So I wrote a tiny python wrapper which can mass-process files, runs them through gjay, parses the XML output via ElementTree and tags the files with mutagen. So get the dependencies - gjay from CVS, python-elementtree and python-mutagen - then run my script. Or modify it to suit your needs, it's free software. [Yes, I am aware that there are songs which change speed. So what? I'm not expecting the BPM value to be exact, or to apply from the very first bit to the last...]

22 November 2006

Erich Schubert: JSF XML syntax for c:url in attributes?

Dear Lazyweb, What is the JSF 1.2 XML-Syntax equivalent for
<img src="<c:url value='/static/foo.png' />" />
(this will make the URL relative to your application root, not to your web server; so if the app is installed in /foobar, the resulting URL will be /foobar/static/foo.png) My preferred solution would have a useful src= value so an XHTML browser can still display the page. Same for CSS stylesheets, links and similar. Please send me an email at erich@debian.org, I'll update the entry. (Comments are intentially not enabled.) Thanks. [Update: at least in apache myfaces, this should work (untested):
<c:url value="/static/foo.png" var="url" />
<img src="$ url " />
However, the template file won't render approximately in a regular browser. For easy-to-edit templates it would be nice to have an actual value in the src property. I have an idea how that could work with custom tags...]

21 November 2006

Erich Schubert: Iceweasel is the latest firefox

Debian unstable now has iceweasel. Running iceweasel presented me with the pretty message
You've Updated To The Latest Version of Firefox
Great. Note: Ubuntu has more patches to firefox than Debian, so if Debian is (or: was) violating Mozillas trademark, so is Ubuntu. And probably Fedora. And Redhat. And Gentoo (well, maybe not; from what I know Gentoo is closed to unmodified upstream usually, and not as anal about LSB and desktop integration etc. as the others), ... you name it. Anyway, go, iceweasel, go.

19 November 2006

Erich Schubert: Video transcoding

My camera has a video function. Nothing special, but it works okay. Actually the image quality maybe is even better than a typical PAL or NTSC camera. There are other drawbacks - tiny microphone, and I can't zoom while recording or handle light changes. So it can't replace a real camera, but it's okay for some limited use cases. Last weekend there was a Balboa workshop in Munich, with excellent teachers. At the end of the days we recorded the teachers repeating the moves they tought us during the day. A perfect situation to use my camera: good lighting, no lighting changes, no zoom changing needed. These videos are quite big, due to the limited compression capabilities of the camera. (the video codec they used is MJPG, i.e. the camera just saves 30 jpg images per second). So I decided to recompress them. I tried transcode first, but it messed up the audio (which played back at double speed). Mencoder worked like a charm. Size savings of a factor of 8-12 are easily possible (well, depending on your camera, YMMV) without much tuning or serious loss in image quality. Here's the commandline I used:
mkdir out
for nam in *.avi; do
  mencoder "$nam" -ovc lavc -oac lavc -vf hqdn3d \
  -lavcopts acodec=mp3:abitrate=48:vb_strategy=1:vbitrate=600 \
  -o "out/$nam"
done
Notice that I also enabled a noise filter. Due to the nature of MJPEG, there is a certain amount of noise in dark areas, which I don't really care about. Filtering noise both improves compression and image quality IMHO. Depending on your video, of course. Here the dancers are well-lit, just the background isn't; I don't want to see noise in the background amplified by a compression trying to adopt to it. :-)

17 November 2006

Erich Schubert: Apple spam

One more reason not to buy Apple: they spam. Yesterday and today I received Spam from "insideapple.apple.com". The same mail twice I think; and to the same old old email address. I can even trace back that they bought the email address from the old uni.de student portal site (which has since been sold or relaunched, I don't know). I unsubscribed yesterday, but received the same mail again today. Apple, thats NOT the way to go.

15 November 2006

Erich Schubert: Eclipse just doesn't work

Eclipse just doesn't work right for me. I'm so pissed by this crap... I've been following this tutorial (whoever had the idea to use screenshots for the actual code parts... ever heard of copy'n'paste?). At one point you need to add a class. A new class. Derived from Object. So I chose the menu option in Eclipse to, well, add a new class. After pressing "Next" in the wizard, eclipse froze, using 100% CPU. After killing and restarting eclipse, it had only created an empty file. But since I have to type in the data from the Tutorial anyway, ok. Next step in the tutorial: edit the faces-config.xml file with the faces-config editor. Sounds easy. I click on the file, open with, faces-config editor. Boom. First some content type error message is displayed, but the details actually list a NullPointerException:
java.lang.NullPointerException
    at org.eclipse.wst.sse.ui.StructuredTextEditor.update(StructuredTextEditor.java:3047)
    at org.eclipse.jst.jsf.facesconfig.ui.FacesConfigEditor.addPages(FacesConfigEditor.java:396)
    at org.eclipse.ui.forms.editor.FormEditor.createPages(FormEditor.java:142)
    at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:276)
    [... 40 more lines of backtrace ...]
Error handling in Java sucks, too. Usually you just get a 50 lines+ stack trace. [Update: deinstalling XML buddy resolved the last problem, and I could add a second class without another crash]

Erich Schubert: CDBS is NMU-friendly

Steinar H. Gunderson even threatens kittens because of it, and Steve McIntyre ranted against using CDBS for packaging, claiming that it's much harder to fix bugs in packages that use CDBS. I have to disagree. More than once I've given up on fixing a bug in a package because I couldn't decrypt the huge makefiles used for building the package. For private packages I often switch over packages to CDBS then, so I don't have to fiddle around with a build system noone except the original maintainer understands. And every now and then I fix a bug in Debian, but don't upload it because I replaced the "magic" build system with CDBS magic... While CDBS does a lot of "black magic" to build packages, it usually does quite a good job. If it doesn't, it maybe even is a bug in CDBS, that happens. debian/rules files that use CDBS are usually quite easy to read, even easier than traditional debhelper template-based scripts. And that is why I think that CDBS is a good thing: it does a good job at separating package-specific and package-independendant build scripting. Maybe all we need is more documentation on how to properly fix common issues in CDBS, starting with misplaced or misnamed files etc. CDBS has a lot of hooks, but it's not obvious which hooks to use for which fixes. (Note that sometimes the fix should maybe be done in the upstream makefile instead.) On the long run, Debian could use a more unified way of packaging. Debhelper has already unified package building a lot, and CDBS maybe goes one step too far, but ideally we would all be able to understand each others debian/rules.

Erich Schubert: Third party software

Ubuntu has been attracting "newbie" users, and also has drawn users away from Debian. Some people are annoyed by Ubuntu because of this - I am not. Ubuntu users have been happily collecting third-party repositories to get the latest glitz like beryl. Trevi o compiled a huge list of them, and made it easy to install (DON'T USE THIS!). Everybody concerned with security must go mad with just the throught of collecting thrid party repositories for the fun of it. To most of us, it's bad if we have to use any third party repositories... However, Johan Kiviniemi reacted in an interesting way. His highly experimental repository - setup for some 5 users or so, on his home DSL line - was included in this stupid "every repository I could find" list. Noticing this increase in users, he found out about this madness - and made a package to replace the default wallpapers (and disable wallpaper changing) with this scary warning message. Sounds like a good plan to me, however many users were pissed by being warned that they've done something stupid... So: thank you, Ubuntu community, for helping teaching new users that they shouldn't just blindly install software from the internet. :-) and for keeping these users away from Debian.

13 November 2006

Erich Schubert: Eclipse chaos

For my diploma thesis, I'll be extending a tomcat-based wiki. So I decided to setup a development framework for Tomcat, JSF and all these. What a mess. The installation docs are really really bad etc. Two hours later, a dozen Eclipse restarts, I might finally have the Eclipse.org Web Tools Platform on my computer. I don't know yet, since I didn't even write a single line of code or metadata yet. I think I've picked my preferred mirror about 20 times by now. I wish I could just use apt-get. Debian is so nice for installing software... I wish eclipse were a pure opensource project, and there weren't so many companies trying to sell extensions to it. Oh, and I wish it were a native Linux/Unix project, and wouldn't care about working around Windows userunfriendliness by offering an own installer and own update tool and own everything-that-windows-lacks. [Update: how to install eclipse extensions without going crazy:
mkdir -p ~/.eclipse/eclipse/plugins
mkdir -p ~/.eclipse/eclipse/features
touch ~/.eclipse/eclipse/.eclipseextension
Now start eclipse, go to Help, Software Updates, Manage Configuration and add ~/.eclipse/eclipse as a location to search at. Note that the folder must be called eclipse and have these two folders and marker file in it.]

8 November 2006

Erich Schubert: DHL Express ist langsam...

Wie ein Mitbewohner von mir gerade erfahren musste, sind DHL und DHL Express so "disjunkt", dass man bei der DHL insbesondere kein Paket abgeben kann, dass per DHL Express verschickt werden soll. Was jetzt besonders lästig ist, weil man ein Paket bei der DHL ja dann in der Filiale vorbeibringen kann, wenn es gerade passt. Und an den Packstationen wohl sogar 24h am Tag. Und gerade war jemand von der DHL bei uns an der Tür; nur kann er halt das Paket für die DHL Express nicht mitnehmen. Ich habe den Eindruck, wenn das über die normale DHL verschickt würde wär es schneller... da wär das Paket schon da, bis die DHL Express es mal schafft hier vorbeizukommen wenn jemand zuhause ist...

Erich Schubert: Kiss or diss launched.

Kiss or Diss logo Kiss or diss, a rather spontaneous project of a few friends of mine and I, has officially launched. It basically works like famous Hot or Not, except we're doing video, have a much better user interface and are also trendier. Hot or not is so... web 1.0 :-) You get to see girls and boys (choice is up to you) trying to impress you (or more likely making fool of themselves). To continue to the next video, vote on them. Really simple, but quite addictive because of the contents. There are lots of videos with people dancing. There are some pretty good singers inbetween. If you don't filter out males, you'll occassionally get some nice guitar playing... There is a certain amount of Ajax in it already, more web 2.0 goodness to come. Tags and such. Ajax is quite useful here, because you can comment or share a video without the page reloading - and thus the flash movie restarting. Definitely a plus in user experience. And since you need flash, your browser should have javascript anyway. There is no way we'll do a Lynx version with aalib, sorry. :-) P.S. Not all of these videos are "safe for work". Youtube does delete quite some videos, so they all should be okay (though still maybe "inappropriate"), but YMMV. Don't blame us if you get into trouble for watching videos at work. Do it in your lunch break or so. :-) P.P.S. And don't blame us for wasted hours watching stupid videos, either!

7 November 2006

Erich Schubert: The power of userContent.css

All mozilla-based browsers have a feature called "userContent.css". It was designed to allow you to override page CSS with your own, e.g. for accessibility reasons. It has mostly been used by people to remove ads, and I'll share two examples with you. Create ~/.gnome2/epiphany/mozilla/epiphany/chrome/userContent.css (you'll probably need to create the chrome directory, too; other browsers use similar path names) and put these two rules in there:
a[href$=".pdf"]:after  font-size: 10px; color: red; content: " [PDF]"; 
iframe[src*="devart.adbureau.net"]  display:none !important; height: 0;  
@-moz-document domain("mail.google.com")   button#ac_tr   color: red !important;   button#ac_dl   color: red !important;    
The first one will postfix a red [pdf] to any link going to a PDF file. This is very valueable especially with Google scholar. The second rule is an example on how to hide elements. This example hides some ads on deviantart. You can easily pick a wider term or grab some of the existing rulesets. The third rule will color the ">deviantart. You can easily pick a wider term or grab some of the existing rulesets. The third rule will color the ">deviantart. You can easily pick a wider term or grab some of the existing rulesets. The third rule will color the "delete" button in Gmail red, so you find it easier. Since it moves around (UI hazard; "delete forever" replaces "archive" button in spam and trash folders.) this is quite nice to have. But if you want to go for default ads filtering, I'd suggest to use some of the adblock extensions. These userContent tricks are mostly useful for adding rules that the extension didn't catch.

5 November 2006

Erich Schubert: News backlog

I was too busy to read my favourite tech news the last few weeks. This sunday I finally started working on the backlog. Parts of it - I'm not going to try to catch up with Slashdot... And most of the time, I'm only reading the headlines, too. Most of the stuff here will be in German; since I'm also interested in the politics surrounding technology here in germany, a local ticker such as Heise is most useful for me.
  • the Novell and Microsoft deal: I wonder if it's mostly to show an act of good will, to calm Europe in preparation of the Vista release. This and the new API for third party security software may get them to launch Vista on time in Europe, too.
  • Contact information on web pages. May now be reachable with two clicks from the first page, if the wording is obvious. Germany used to require contact information to be reachable with a single click for commercial web pages.
  • Flash 9 for Linux. Beta. Closed source, and it frequently locks up my browser. Probably has a lot of security issues, too; so better use it only with flashblock, and load flash only from somewhat trusted sites. But it works, and it finally allowed me to see that I don't care about MySpace videos and similar crap.
  • New Ubuntu release. Congrats, but I havn't tested it yet. I considered going Ubuntu for some of my computers, but ended up with Debian on all of them. I just feel more at home here, and there is not much that Ubuntu has in extras for me that I really need.
  • My new laptop has harddrive encryption, and encrypted swap. Suspend works, thanks to David Härdemann for helping me with that.
  • I missed the Debian bug squashin party, which was kindly hosted by the LiMux team, responsible for the Debian Linux installation at the city of Munich. This deployment may become one of the most prominent examples of good Debian use: customized, to offer the best end user experience.
  • Debian renames firefox and thunderbird. Welcome iceweasel and icefox. The official mozilla stuff is somewhat written for Windows, and needs modifications for proper Linux integration. This violates Mozilla trademark policy. In fact, Ubuntu and other Linux distributions would have to do this renaming, too!
  • BenQ Mobile crash in Germany. IMHO this was planned by both Siemens and BenQ to get rid of "liabilities". Reminds me of the famous un-word "Kollateralschaden"...
  • Firefox 2.0 - does this mean it has more features I do not need? I'm using epiphany; it has almost all the features I need, but a much nicer, less cluttered UI. Some say it's also faster, and it's Gnome integration definitely is better. The only thing I sometimes use firefox for is the web developer extension, which is a really nice tool when you have to fight HTML and CSS.
  • Java to become OpenSource. Well, I hope they use a sane license... but at least that should finally clear up the licensing issues many people still see with current Debian Java packages. But I fear it might already be too late - Mono support has been better than Java for some time now.
  • 4 November 2006

    Erich Schubert: Turbogears performance

    I've been trying some stuff with the Turbogears application I worked on a bit during the last two weeks. First thing was that I looked into using postgres as DB backend for Turbogears. Which turned up a bug in sqlalchemy (an ORM, mapping objects to database rows and back). I was passing a unicode string to the getBy function (to retrieve an object by it's primary key), and it went into the SQL statement without any quoting. Since my keys are all ascii, I could just cast them into regular string objects, and getBy worked then. Performance with postgres is worse than with sqlite; this is not too surprising. However this might change once I enable multithreading. Performance numbers: with SQLite: 8.30 trans/sec, with Postgres: 7.52 trans/sec These performance numbers are still very bad, and I guess we won't be keeping Turbogears on the long run, unless I find some documentation on improving the speed. One of the hints I got was to avoid py:match in kid, the templating engine used. I started by not using turbogears "sitetemplate" default template. This would automatically insert javascript and css files when needed. Since I don't use their widgets and such, I havn't been using this feature anyway. Not using the template - which contains one py:match for the 'head' tag and one for the 'body' tag - improved performance to 9.01 trans/sec (or 8.32 trans/sec) Now I can't explain why the improvements in the postgres run were better; both are a 10 minutes siege run. But 8.5% improvement is a start. I'll look into getting rid of the other py:match instances in our templates. (If I'd only find a good example with py:def - guess I'll instead "precompile" pre-templates into the actual templates or so instead with some self-written tool.) P.S. No, I'll probably not use turbogears for my next similar project. Rapid development is nice, ORMs are fancy and such, but sometimes good old plain SQL can be very easy to use, too. And more performant.

    1 November 2006

    Erich Schubert: Myspace is localhost

    It's funny, because it fits the name so well:
    # dig myspace.com
    myspace.com.            18112   IN      A       216.178.32.48
    myspace.com.            18112   IN      A       216.178.32.49
    myspace.com.            18112   IN      A       216.178.32.51
    myspace.com.            18112   IN      A       216.178.32.50
    myspace.com.            18112   IN      A       127.0.0.1
    
    Yay. Myspace IS localhost! :-) At least until they fixed their DNS (the primary nameserver already publish a fixed record. too bad.)

    29 October 2006

    Erich Schubert: Life with compiz

    Since my new laptop features shiny Intel graphics (and not the proprietary stuff from ATI or Nvidia), I can comfortably run compiz on it. None of my ATI or Nvidia machines did. Face it: compiz is a window manager. It does that job okay. I somewhat still like openbox better, but compiz has it's bright sides, too. I'll probably add devilspie again, though. Too bad they removed the XML syntax and went to a lispy thing. Openbox had a nice XML syntax and had all the window matching functions I needed. Now most people expect compiz to just magically add some 3D effects to their desktop. That's not entirely accurate. 3ddesktop worked like that, years ago. It worked with most window managers, by taking screenshots of your desktops. Maybe some of it's layouts could be added to compiz. Compiz however functions different, and thats why it IS a window manager in itself (which has "outsourced" window decoration to e.g. gtk-window-decorator to achieve a metacity-like look). From my understanding, it basically has all windows placed off-screen and uses GL to draw them on the real screen. This will result in some speedups, actually, whereas 3ddesktop came only with slowdowns. Anyway, so much for the theory. Here are my firsthand experiences: On overall, compiz doesn't distract from work that much; I had feared I would spend a lot of time just playing with the effects, but it's okay. (Try setting visual bell to shiver, start vim and press arrow up some time, and watch your window violently shake. Reduces stress when not finding a bug.) So it likely is less harmful for the Debian etch release than Frozen Bubble 2.0 (which has a new 6-player mode, and is feared to have a similar impact as tetrinet...) Whoever released frozen bubble 2.0 just now must have some evil plan of delaying the etch release. [Yes, I'm aware of this compiz fork; but I'm sticking to Debian packaged software, so my system will upgrade itself. I don't think it's packaged yet?]

    Erich Schubert: Link farming, YouTube style

    Apparently (unless they already have some spam filters in place; I'm surprised they don't use rel="nofollow") you can turn YouTube into a huge link farm. You won't be able to inject links into non-youtube-sites, but maybe (I didn't test that) it's possible to inject at least a link from every single youtube video page to yours... And it's not even a new thing. I mean, referrer spam is old. Really old. Sure, they might have filters, I havn't tested, but I'm not sure you can reliably filter this unless the "attacker" seriously overdoes it. I'll try it with this blog entry. Maybe I can become a top result for "youtube chad steve" this way? Not that I'd have any benefits from that. (And no, it's not funny if you prove me correct by sabotaging my attemt using the same technique. Be more creative than that, please.)

    27 October 2006

    Erich Schubert: Google SoC and etch

    Despite having blogged a lot already today (no, I didn't break planet, these are all new blog entries), I have one more thing to share with you. This image is from the Google Summer of Code mentor summit. Well, strictly speaking it's from the hotel where most of the attendees were staying. This draw was called the "executive toy box". I somewhat enjoyed that there was an "etch" around even before I arrived at Google. ;-) Etch-a-sketch

    Erich Schubert: mDNS is nice

    I'm setting up my new laptop, and for obvious reasons I have to copy over some data from the old to the new laptop. The wireless network here at my apartment-sharing is crappy; and it lacks a local DNS server offered by newer DSL routers. So I would have to find out the current IPs of my laptops to copy data around (note that the router also doesn't give you IP persistence apparently, the laptops have new IPs each reconnect...) mDNS to a rescue. Multicast DNS (Bonjour / Zeroconf / Avahi) comes in handy here. It allows me to locate my laptops by just using "hostname.local" (using the libnss-mdns package) or using the avahi zeroconf browser (package: avahi-discover).

    Erich Schubert: eBay message userunfriendlyness

    eBay (at least ebay.de) doesn't allow quotation marks or stars in messages sent via their UI. That totally sucks. I agree with not allowing HTML tags, to avoid any potential issues with broken webmails and cross site scripting, whatever. But not allowing quotation marks in messages sucks. I use them all the time, basically whenever I quote something of the artice description (that's why they are called quotation marks I guess). Why can't they just fix their code to allow quotation marks?

    Next.

    Previous.