Search Results: "erich"

6 December 2009

Erich Schubert: Making pyroman IPv6 capable

I'd like to make pyroman IPv6 capable. That is actually the one big thing before calling it a version "1.0".I must admit that I havn't been very active on Pyroman (or Debian in general) the last years. This goes even so far as that "pyroman" was considered "abandoned" by Fedora or so. It is not; I use it on all my servers. It's still in use at the network I developed it for (after all there is not that much benefit for a workstation setup, where a 10 line iptables script will do the job just perfectly.).Anyway, I'd like to get IPv6 support into pyroman, but there is one big issue here: I don't have any machine using IPv6, so I havn't used ip6tables myself yet, so I don't know about all the magic involved ...So if you use IPv6, it would be very cool if someone would jump in to get full IPv6 support into pyroman. Madduck had already done some preliminary stuff, but I didn't get around to have a look at the integration or completeness yet.The '--no-act' and '--print' modes of pyroman should even allow development without any IPv6 support or root permissions in the system.Other things remaining on my pyroman wishlist:

4 December 2009

Erich Schubert: Tracking outgoing links with Google Analytics

Here's a code fragment to track outgoing links with Google Analytics. As usual, use it at your own risk. I can not give you support for Google products, for obvious reasons.To use it, you <me>need at least understand where to put it (call it in a try-catch in onLoad) and how to adjust the variable name of your page tracker (I'm not using the default).
function trackLinks() 
  var as=document.getElementsByTagName("a");
  var ig=["mydomain.tld","google-analytics.com"];
  for(var i=0; i<as.length; i++)  
    var ignore=false;
    var oc=as[i].getAttribute("onclick");
    if(oc!=null) 
      oc=String(oc);
      if(oc.indexOf('urchinTracker')>=0
        oc.indexOf('_trackPageview')>=0
        oc.indexOf('javascript:')>=0)
        continue;
     
    if(as[i].href.indexOf("mailto:")<0) 
      for(var j=0;j<ig.length;j++) 
        if (as[i].href.indexOf(ig[j])>=0)
          ignore=true;
       
     
    if(!ignore) 
      as[i].onclick = function() 
        var o=this.href.replace(/:\/*/,"/");
        pt._trackPageview('/out/'+o)+";"
        + ((oc!=null)?oc+";":"");
       ;
     
   
 
This code tries to attach an onload handler to any outgoing link, ignoring internal links or links that use JavaScript. If such a link is clicked, it generates a virtual page access with an "/out/" URL that can be analyzed in Google Analytics.A side benefit (apart from knowing which links are interesting to your visitors) is that you should get more accurate "time on page" statistics for your pages.

28 November 2009

Erich Schubert: Tracking Google image search in Analytics

I do not really understand why they don't support this themselves, but Google Analytics will not track keywords for Google image search. Instead it just shows up as "referrer". A site I'm webmaster for, Swing and the City, gets a lot of image search exposure (funnily for an image that is gone since August, Google also needs to work on their index, too), so it was a bit odd to have images.google.com show up as top referrer but not "organic search".Here's the code I use to fix this:
var r=document.referrer;
if(r.search(/images.google/)!=-1 && r.search(/prev/)!=-1) 
 var e=new RegExp("images.google.([^\/]+).*&prev=([^&]+)");
 var m=e.exec(r);
 pt._addOrganic("images.google","q",true);
 pt._setReferrerOverride("http://images.google."+m[1]+unescape(m[2]));
 ;
pt._addOrganic("maps.google","q",true);
pt._addOrganic("forestle.org","q",true);
pt._trackPageview();
Note that image search is more complicated than the maps and forestle search engines I also add for keyword tracking. The original query is encoded in the "prev" parameter, and the easiest (or only?) way to get working tracking is to use the ReferrerOverride function of analytics.Note: this is not a straight copy & paste, since I use this code in a compressed and encoded (for injection into the page via DOM ops) form. So no guarantee of syntax completeness. You'll need to adjust it to your variable naming anyway (I use "pt" instead of "pageTracker"). This is just to show you the use of unescape on the "prev" parameter for this purpose.

26 November 2009

Holger Levsen: We just want your best - your attention

Hi. If you are interested to get an invitation to my bathroom or kitchen, drop me a mail. I have currently 42 invitations I can give out.

I believe this is to most people as interesting as yet another wave of invitations to yet another online service aiming at your data, soul and money. I really don't get why people are falling for the hype of yet another useless product.

Current mood: bored.

25 November 2009

Erich Schubert: Identifying Link Spammers via nofollow links

I wonder if it's possible to identify link spammers (you know, these bots that mass-submit a link into as many blogs/etc they can find in order to boost their page rank) by the simple measure of how many of the links to their site are marked 'nofollow'.Say, a regular page should have less than 5% (and less than 20) nofollow links; a site that goes significantly above this value probably employs some spam bot.The only really hard thing is how to avoid attacks on a site using this ... say, I write a bot that spams links to Microsoft on as many sites as it can find that DO use 'nofollow', in order to get that site above the limit, and have google penalize it.So in general I don't think Google would automatically penalize such things, still it could be used to e.g. have a human check the destination site for useful content, and then only blacklist when it doesn't seem to be useful.P.S. Which BTW is a reason why some of the SEO "do nots" are bullshit: it would be too easy to deliberately use these to blacken a competitor. So a 'link farm' will at most do nothing to raise your ranking; but Google must not allow you to actually lower a competitors ranking by setting up a link farm to him!)P.P.S. On another side note: Who guarantees that Google actually ignores "nofollow" links? They could also just be assigned a lower weight or a penalty, so that a "nofollow" link from a strong site such as Wikipedia would still be worth a lot, while the average blog comments page link goes down to 0. Say a "nofollow" link from a PR 6 site is as much worth as a regular link from a PR 4 site, and PR 2 becomes PR 0. Would already do much of the trick in discouraging the use of blog spam bots. Because after all, ignoring the links on Wikipedia for page rank would be quite stupid. In German Wikipedia, the page contents are even "sighted" (aka: peer reviewed); this is a rather trustworthy source, especially when you take time effects into account. A link being constantly in Wikipedia on a popular page for more than a month very likely is good.

Erich Schubert: Lost an ext3 filesystem

These days, something happened to one of my external USB drives that I so far only knew from ReiserFS (which I since called ReisswolFS, German word play on "shredder" ...). But, it's not ext3 which I blame.Short story what happened: What I will do now: As you can see, something was wrong with the system, not with the file system.I have a strong suspect to have caused this. In case you wondered why I included "resumed from suspend" above: I've been having system stability issues with resume ever since upgrading to the Intel driver 2.9.0 and KMS (Debian unstable+testing) with kernels up to 2.6.31. In about 1 out of 5 resumes, I get a Xorg or system lockup after anything from 1 to 60 minutes. Sometimes I also experience video corruption after a few minutes, trashing some terminal emulation until the next redraw. Just before writing this email I had a typical lockup: when scrolling the terminal emulator. This has been a typical trigger for lockups. On contrast I havn't seen any such crashes (or screen corruption) on a fresh boot.Freedesktop bug reporting the same issue closed as "not our bug, blame it on the kernel".Note that 2.6.32 release candidate Changelog contain many changes for the intel DRI kernel driver. So the bug might already be fixed in the RC kernels.Same report in Kernel Bugzilla is still 'NEW' though.Related bug report in Debian, blaming it on KMS.

Erich Schubert: Google Wave rolling out?

When I got my Google Wave account, it took the invitation about a week to arrive. A few days ago, I got my first own invites, and invited some colleagues (in an attempt to actually find a use for Google Wave beyond "rich media live messaging"). Within a few minutes they were "in". Now I just got my second set of invites. So is Google Wave now getting ready for mass opening, rocketing user numbers?As you might have already guessed, I'm not convinced by Google Wave. It's technically interesting and well-done. The demos are all nice. It's just that the UI in the browser is a bit fragile and cumbersome, and the big question so far is:
What does Google Wave allow you to do that you couldn't do before?
To me, there has been little actual use so far. Wave can do everything, but isn't optimal in any of them: Yes, I'm aware that you should differentiate between the protocol and the ui. Still pretty much everything is currently designed for the web browser with full JavaScript and Flash capabilities.Of course this isn't the end yet, Google Wave will evolve. Maybe into something cool, maybe it will remain just a niche thing. Maybe some cool apps will just use Wave as protocol. But I figure, I'll mostly wait for these things to happen first before I become a frequent user of Wave.The biggest thing I see is the "spam" (this especially includes 'Quiz', Mafia Wars and similar Scamville type of 'apps' that surely will show up in no time, once Wave is open to the public). What will Wave provide to me to handle this flood of worthless information that I'm getting more and more?P.S. Please don't bother to ask for invitations to Wave.P.P.S. here's how to replace the odd scrollbars with the regular OS scrollbars with a really simple user style (CSS).

19 November 2009

Romain Beauxis: Holly smokes !

Sorry Erich, I am not living in Bavaria so I won't sign your petition. Furthermore, I quite understand the use of the planet for activism related to free software and freedom in general, but I do not appreciate the brain washing about smoking ban and wanted to state it since you bring the topic on the table.

Erich Schubert: If you are in Bavaria, sign up for the smoking ban vote!

Starting 01/01/2008, Bavaria had introduced a quite hard smoking ban, which also included bars and restaurants. It however contained a backdoor by excluding non-public locations, which led to the creation of 'smoker clubs' where you had to become a member to be admitted. At some point, most clubs were of this kind.In August 2009, however, the law was changed to exclude beer tents (Oktoberfest ...) and small bars. Many people belive that this was to get votes on the elections in september 2009 (which ended up in a minus of 6-7% compared to the previous election and a historical low for the biggest party).This caused several organizations to call for a public vote on restoring the smoking ban to the 2008 state (without the 'smokers club' backdoor). In order to force a public vote on a law (without the governments support!), we need 10% of the voters to register as supporters for the vote. You have to register at your registered home town. For Bavaria, this means about 940.000 supporters.If you are registered voter in Bavaria, please drop by your municipality and sign up. You need an ID and 5 Minutes, that's all. 940.000 supporters is an incredible lot of people to get to the offices, take along your friends!When we get enough supporters, the Bavarian government has two options: accepting the changes as proposed (and thus making the initative obsolete), or conducting a public vote on it, offering an alternative (e.g. the current law, no change) and have the voters decide (which is quite expensive, so if many many people sign up, they might save that money and just pass the proposed change themselves).For more information (german only), check the Nichtraucherschutz Bayern Website, including the sign up office locations.P.S. In other European countries, the introduction of a strong smoking ban has led to a 10-15% decrease in heart attacks (20% for non-smokers). The german constitutional court has also already ruled that the protection of non-smokers and employees from passive smoke weights stronger than the individual's freedom to smoke in enclosed spaces.

16 November 2009

Erich Schubert: DebConf 2011 in Munich

We'd like to host DebConf 2011 in Munich, Germany.However, this is a far from trivial challenge:Rent in Munich, in particular for conference rooms, is far from cheap. In my opinion, unless we get some really big sponsor (and I'd still prefer spending sponsor money to fund developer trips to the DebConf instead!), the only chance we have is to get some rooms at the university.However given the development of the recent years (budget etc.), it has become a lot more difficult to actually get rooms at the university for such events. Unless the event is considered to be fully a part of the universitys "work", we might have to pay rent to the university. Which again isn't that affordable.Anyway, if you are in Munich, working at one of the universities, or in any way interested in supporting DebConf 2011 in Munich, please join the DebConf11 Germany mailing list. Also check our meetings scheduled on the DebianMuc Wiki page, currently every Monday, 18:00, at the new LiMux offices in Sonnenstr.P.S. There will also be a Bug Squashing Party in Munich end of November: Munich BSP November 2009

25 October 2009

Erich Schubert: Facebook tweaks

Every time Facebook changes anything, people complain. Most of the time just because something has changed, without knowing actually what changed.The october layout change for example isn't too big in fact. As far as I can tell it's not much more than turning the "hot" items that were in the right sidebar into a special tab (and breaking the refresh for the live feed, but I guess they'll fix that soon). The "live" tab is basically all information (see below for getting rid of certain restrictions); the "News" tab tries to reduce this amount of information by only showing you certain posts Facebook magic considers to be "important". If you are a heavy user you will probably prefer the "Live" feed, if you are a casual Facebook user, go with the "News" feed to have less crap posts to read.Still there are some things you should be aware of when you are a facebook user (not all of these are new): Also you should never forget that all the data you put online is hard to get rid of again. Just don't put anything there you don't want everyone to know. Facebook can be really powerful when used right for example as promotion channel. But the way you should be using it is to first consider what you want people to have an impression of you, then try to present yourself this way. Don't just throw everything that comes to your mind there. (This even more applies to blogs and web sites, obviously, that don't have any privacy control)

4 September 2009

Erich Schubert: Friends update - LiveDash, HoneyWish, Amiando

A short update on some friends of mine.First of all, Patrick F. Riley - I worked with him on some projects when I was visiting the UC Berkeley, one of which was a predecessor to his latest thing: LiveDash. It's really cool: it allows you to search almost in realtime in TV feeds. It also live-indexes Twitter, blogs, news sources etc.Secondly, HoneyWish (currently only available in German) is a service for a "honeymoon travel gift list" thing. It works like the traditional gift lists, except that instead of putting all kind of household stuff on it, there are all the parts of the honeymoon trip on the gift list. This makes much more sense these days: people tend to get married later; they might even be sharing a house for some time before getting married. So they don't need much silverware anymore, but they for sure will enjoy their honeymoon trip - so what could be a better gift for them?Third, Amiando a web-based ticketing and event management service. Founded already some years ago by some friends, it has been growing and coming along nicely. Every now and then, it won some award, many of them in the "top startup" category.There are of course many more projects of friends I'd like to point out, but these three definitely are highlights.

3 September 2009

Erich Schubert: Embedding Flash: don't forget wmode="transparent"

If you are doing a complex web layout (such as my Swing and the City layout which features alpha-transparent fixed layers), and want to embed Flash (e.g. on the Was ist Swing? page - German: What is Swing), make sure you add the attribute wmode="transparent" to your embed tag, and <param name="wmode" value="transparent"></param> to your object. Otherwise, a layer - in particular popup menus - might end up below the flash.This includes you, YouTube. In HD view, the user popup menu only has the top 3.5 entries out of 5 accessible for me.The following XSLT stylesheet can be used to find such embeds in a bunch of XHTML files using the command line xsltproc findNoWmode.xslt $( find -iname '*.html' )
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:html="http://www.w3.org/1999/xhtml">
<xsl:output omit-xml-declaration="yes" indent="no"/>
<xsl:template match="/">
  <xsl:call-template name="t"/>
</xsl:template>
<xsl:template name="t">
  <xsl:copy-of select="//html:embed[not(@wmode) and (count(param[@name='wmode']) = 0)]"/>
</xsl:template>
</xsl:stylesheet>
You can of course also write a XSLT stylesheet to insert the wmode statements whenever there is none, to make transparent your default.[Update: I've received comments that this comes at qutie a performance cost for Flash, and that this might be the reason why YouTube doesn't use it - in particular for the HD videos. Also it isn't supported by WebKit based Browsers so far (so Safari neither?) and nor does it seem to be working in Gnash, an opensource flash plugin. So you have to choose between multiple evils if you are using Flash...]

31 May 2009

Erich Schubert: Fun with Wolfram Alpha

Wolfram Alpha was often hyped as the latest and greatest search engine.I wouldn't call it so. It's just a very minimalistic search frontend to a nice database with lots of numerical facts.Yes, it can give you the height of the eiffel tower (because that's a fact in its databases). It can even compute for you what Pi times the height of the eiffel tower is. But that is about as far as you can go in combining. In my tests, I wasn't able to compare the temperature in Munich with the temperature in Berlin (both of which WA will visualize you with a pretty graph, so these are facts in WA) - their query parser just doesn't get my question.The funniest reply so far however was to the question:
How many cars in Germany?
The answer of WA (which btw is copyrighted by WA):
No
Seriously, I doubt that there are no cars in Germany.At least it also offers an explanation why it comes to this conclusion:Cars is a town in south-western France (which as you might guess currently is not a part of Germany. :-) ) - so for WA, there are at least cars somewhere in Europe, but not in Germany!

29 May 2009

Erich Schubert: Java hacks: Generics and toArray

Arrays and Generics in Java do not mix very well. In order to create an array, you need to know the object class the array is supposed to store.Arrays in Java are special: they can efficiently store primitive data types. The expected difference in efficiency between byte[] and Byte[] is pretty big (of course some good VM might optimize) for obvious reasons (think of: references, garbage collection, pointer sizes, ...).This is probably why you need to know the type before creating an array (because an array of primitive types such as byte will be different from one that stores objects of some kind).In particular, the following Java code
  String[] foo = (String[]) new Object[0];
results in a run time error ("[Ljava.lang.Object; cannot be cast to [Ljava.lang.String;"). But it gets more confusing when you introduce generics:
public static <T> T[] test()  
  T[] te = (T[]) new Object[0];
  System.err.println(te.length);
  return te;
 String[] foobar = test();
will print "0", then throw the same run time error in the foobar line.What happens here is that in the test() method, T actually is replaced with "Object" at compile time. Thus the array type works just fine, and so does the call to te.length. Upon returning, it is then cast into a String[] array and fails.Now here comes a crazy Java hack:
public static <T> T[] test(T... ts)  
  T[] te = (T[]) java.lang.reflect.Array.
      newInstance(ts.getClass().getComponentType(), 0);
  System.err.println(te.length);
  return te;
 String[] foobar = test();
The exception is gone, foobar is of the proper type now!A result of discovering this hack are these two methods:
public static <T> T[] newArrayOfNull(int len, T... ts)  
  // Varargs hack!
  return (T[]) java.lang.reflect.Array.
      newInstance(ts.getClass().getComponentType(), len);
 public static <T> T[] toArray(Collection<T> coll, T... ts)  
  // Varargs hack!
  return coll.toArray(ts);
 
Notice how elegant the last method looks - and it finally allows you to do toArray(collection) instead of collection.toArray(new WhateverClassTheCollectionHas[0]).Note that this is still a hack, and may or may not work with all Java compilers, JREs and/or Java versions.Update: Note that this 'hack' is also not transitive. The context calling toArray needs to know the object type at compile time. So it doesn't save you much more than writing "new KnownClass[0]" etc.Update: So I'm actually not using this - it's just a hack, and often quite hackish. The problem is that when you call e.g. toArray in an Generics context, it will actually create an array of "Object", so it makes much more sense to verbosely specify the class you want to use for the arrays (and get some reliability in use back).

25 May 2009

Erich Schubert: If you're wondering why your circle is a diamond ...

... you might be bitten by this Java bug rendering arcs as straight lines at large zoom levels.It looks like a classic to me: in order to improve rendering performance, you approximate arcs with straight lines at small resolutions (if it's just 2 pixels big, nobody will be able to tell the difference). Except of course, when you end up doing the same approximation at a large zoom value - of course a 100-pixel circle looks different from a 100-pixel diamond.Reported in 2005, still not fixed in current Java (we're in 2009 now).Sun is really slow at fixing Java bugs.See also a related Apache Batik bug report. Fortunately, this only applies to Java rendered graphics - SVG export, PDF, Postscript are all fine.

17 May 2009

Martin F. Krafft: Switzerland opts for biometric passports

Switzerland voted today for the introduction of biometric passports, with 50.1% for and 49.9% against, one of the closest votes since 1848 (according to NZZ). While the news don t fill me with glee there are too many unanswered questions around the digital passports one aspect of the decision surprised and even shocked me. I do not like biometric passports, because I like to know when my data are consumed, and by whom. The German government assures that only authorised parties can access those data, and published information about the security features of the German biometric passports, but I am unconvinced that those are adequate to protection for the 10 years of validity of the passport. Furthermore, I could find absolutely no information on who the authorised parties are, or which regulations cover who will become authorised in the near future. If that was properly addressed, e.g. by leaving it up to me and only me to decide who gets access, then the digital passport could actually be a good step forward, streamlining border control and making travel easier. But there is a completely different avenue of concern, no matter who gives permission to whom to consume whose data: how are they used, and where, and how long are they stored, and for what? Again, I cannot find any regulations. Instead, my question to the German Department of the Interior was answered (!) along the lines of it being up to each country to decide themselves over the use and storage of the data. In this light, it makes little difference that the German procedure for the digital passport does not permit the issuing bureau to store the data, while Switzerland s strategy is to build a central database of all these personal details (this is what shocked me). It might make you wonder what use the Swiss government is hoping for, and you might feel uncomfortable with your government building up an even tighter database of its people. But I d much rather have my data stored in Switzerland than consumed and stored every time I enter another country, because when I compare the style of governance of Switzerland to pretty much anything else out there, I am glad I get to live here (even though I am not Swiss and cannot vote). Yet, it s a worrying step in a direction of the glass human , of a society in which personal privacy is unknown and everything is part of the system. These are totalitarian visions, and it s doubtful whether we ll ever actually get there (so far, I don t think any state has come up with the information management strategies required to properly store, make use, and read sense out of the massive amounts of information), but the trend is clearly visible. In the end, however, what worries me the most is how relaxed people treat their personal information these days. Look at the infamous social networking sites, or other Web 2.0 gimmicks and you really start to wonder how headless people can be these days. I cannot immediately paint a scenario where it might be dangerous to push all kinds of information about yourself to the masses, but the mere idea of that is scary in and of itself. I d prefer to have the choice with whom to share what data. The biometric passports, despite the advantages they might bring, are one step away from that, because they empower the government to make that choice for you. I don t consider that progress at all. Update: NZZ reports that the issue is not closed. In the cantons of Grishuna and Lucerne, people are challenging the vote and a recount or even re-vote seems possible. I will post an update as soon as I know more. Then, I would also like to address some replies I ve received over the real problems behind the digital passports, because it cannot be just the central data storage it s not like your government doesn t already have all that, and I can t imagine how your fingerprint could be used against you.

16 May 2009

Erich Schubert: Adobe GoLive question

Is there any way to provide an alternate CSS stylesheet for GoLive CS2 only, not for regular browsers? Because there are some things in that layout that are too difficult for the GoLive renderer, it doesn't display them right. The pages are still editable (just plain XHTML), it's just not looking right in GoLive (advanced CSS).The site already has alternate stylesheets for browsers such as the broken Internet Explorers, so if I could convince GoLive to use their stylesheet it might be looking a lot better in the editor, too ...I am aware that GoLive CS2 has been abandoned in favor of DreamWeaver. Still it's going to be used in a project I help with the web templates.(Other options would be Kompozer and Amaya, but none of them seem really fit for production use: Amaya was just removed from Debian because it had some security issues and the maintainers had the impression the code was such a mess that there will be much more such issues. And Kompozer seemed to be a mostly dead branch of a Gecko hack (although there has been a new alpha release this year) ... is there some reliable opensource non-source HTML editor that I'm missing?)P.S. Sorry, no comments in this blog. Use Email: erich AT debian ORG

12 May 2009

Erich Schubert: Dropbox experiences?

Has anyone experience with Dropbox?It seems to be an interesting web storage service, with 2 GB of free storage.However, the Linux client seems to be closed source (which is understandable, it seems to have a lot of neat features) - so I intend to use the web interface only (at least for now).Update #2: There is a RFP bug for Debian, some Source is on the download site. And while this sort (except the images) is GPL, it's just the nautilus integration part, not the daemon you also need.Did you try Dropbox? Does it work well? I know some people (especially Windows users) who could benefit a lot from a service like that, so I wonder if I should recommend them Dropbox. Or is there some better alternative (it should allow sharing of files though - synchronization is not as essential, it is a lot about exchanging files too large for usual email in small user groups; still synchronization probably is a comfortable way of transferring the files without having to think about it yourself)?No comments in this blog - email me via erich AT debian ORG.P.S. I know there is some referral program to get more storage, feel free to send me your referral link - I'll remove this PS once I've signed up.P.P.S. There also is Ubuntu one, but as far as I can tell Ubuntu only so far. Looks very similar.P.P.P.S. So far, I've received a lot of praise for DropBox.P^4.S. My own referral link, feel free to use this to sign up (+256 MB for you, too!) and "upgrade" my account.

28 April 2009

Erich Schubert: Supporting Internet Exploder

Quoting MSDN on the CSS "clip" property:
As of Internet Explorer 8, the required syntax of the clip attribute is identical to that specified in the Cascading Style Sheets (CSS), Level 2 Revision 1 (CSS2.1) specification; that is, commas are now required between the parameters of the rect() value.
...
In Internet Explorer 7 and earlier (and in Internet Explorer 8 or later in IE7 mode, EmulateIE7 mode, or IE5 mode), the commas should be omitted.
... and if you want to support both?I see a few options:

Next.

Previous.