Search Results: "Erich Schubert"

13 April 2006

Erich Schubert: MusicSquirrel 0.1

Grab my new MusicSquirrel 0.1 while it's hot. MusicSquirrel is a duplicate finder and killer for your music collection. It will calculate Accoustic fingerprints for your music files (MP3, Ogg and such) and thus can detect the same song even when it was encoded in different formats or at different quality settings. The findings are presented in a sorted list, with checkboxes to pick which version of the files to delete. MusicSquirrel Screenshot It requires PyGTK, Python Glade2 and Python Glade2 and python-tunepimp. You can even run it on Windows (Don't ask me for help on that! Get ActivePython, PyGTK for Windows, Python tunepimp bindings and either compile all the libraries yourself or copy them from the latest Picard beta. Note that there is a memory leak somewhere in windows only, probably in the libs and not in the python code)

12 April 2006

Erich Schubert: Python pitfall of the day: <tt>def function(var= )</tt>

I was hunting an odd bug in a python program of mine. Here's a condensed code snippet for explanation:
class odd:
        def __init__(self, a, b= ):
                self.b = b
                self.b["a"]=a
one = odd(1)
two = odd(2)
print one.b["a"]
That code looks reasonable, doesn't it? The parameter "a" is required, but other parameters can be given in a hash. So what output would you expect? The output is 2. The reason is as follows: Python creates an empty hash, and b is a reference to this hash per default. To the same hash each time. So the code is basically equivalent to
class odd2:
        default_for_b_in_init =  
        def __init__(self, a, b=default_for_b_in_init):
                self.b = b
                self.b["a"]=a
and not (as I had expected):
class odd3:
        def __init__(self, a, b=None):
                if not b: b =  
                self.b = b
                self.b["a"]=a
Obviously, both behaviours make sense, and the python way is somewhat consequenter. So be careful when using default values in functions! Non-reference types such as integers are fine, so is None, and of course any outside objects you want to be the same for each call. Don't assume the def statement will create any new object. Even shorter example:
def test(a, b= ):
        print b
        b["a"]=a
test(1)
test(2)
will result in the output
 
 'a': 1 
again there is only a single hash b.

9 April 2006

Erich Schubert: New Microsoft Innovations: froogle.live.com and googlescholar.live.com

Whoa, Microsoft announced two new innovative services for their famous live.com website (you know, live.com is like, a top brand already, you know). They'll add a product search engine [google.com] and a scientific search engine [google.com]. Not that any of these hadn't been done [product search engine list] numerous [citeseer] times [DBLP] before. And apparently it takes them until september to actually launch the first of these (no ETA given for renaming shopping.msn.com to live.com and ajaxifying it). That's so "me too", what they are doing. I would laugh if Google would launch an Ajax-version of their services just before Microsoft is done with theirs. I mean, Google has Ajax experts. Not that Ajax would improve the user experience much for search pages. I wonder if Microsoft could hold their shipping date of Vista if they wouldn't try to copy Google at the same time. And making game consoles. And mice.

8 April 2006

Erich Schubert: Alexa.com wildy inaccurate

I just checked out alexa.com, and was very surprised to see graphs for my blogs domain. (Note: the other stuff in the same domain has even less visitors; alexa says 75% are on the blog) Alexa graph for blog.drinsama.de Apparently, one day beginning of april, drinsama.de made it into the top 100.000 domains at alexa again (happened in january and february, too). This very likely was my blog posting on running MSIE on Linux (whyever you might want to do that...). But their numbers are just absurdly off. They claim my blog has a reach of 20 Mio users. My ModLogAn, which uses the actual access logs, lists a peak of 358 visitors on April 4 (average is around 300 for March, 220 average in April so far). This doesn't include readers on Planet Debian, which is probably the largest share. At alexa, the domain peaked at .6 million pageviews - ModLogAn says 10k. I have, however, lots of referrals from Digg.com, Reddit.com and del.icio.us this month, since they've picked up my MSIE posting. Maybe this will happen again with the Cross-platform virus posting. I do think it has to do with users using the alexa toolbar and similar things (there is a nice firefox extension for showing Google Pagerank and Alexa traffic rating). My personal homepage, which is totall overrated in Google and has had an average of 1000 unique daily visitors in December and January, never made it that highly into alexa. While having three times as many visitors, alexa thinks it's 3-4 times worse. The difference is probably the power users. My personal page doesn't have "power visitors" like my blog.

Erich Schubert: Apple's backstab on Windows

Apples latest move - BootCamp - can turn out quiet bad for Microsoft. By allowing users to install Windows XP additionally to OSX on it's newer machines, many people will buy a Mac (because of it's design, and the ability to try out OSX while still having Windows available). They'll install Windows. But one time or another, Windows will fail them, and they boot up their OSX. And eventually notice that it's better, prettier, easier to use. And they'll see the price of buying Windows licenses. If Microsoft doesn't manage to launch Vista before christmas, and offer something relevant for the users with Vista (a prettier UI and a malware detector isn't enough, and noone believes Microsofts security promises anymore), they'll lose quite a bit of the christmas sales. I wonder when Dell and Samsung will start selling PCs with OSX, too, now that it's no longer an either-or decision.

Erich Schubert: Proof of concept virus for Linux and Windows

Many IT news websites have been reporting that there is a new proof-of-concept "cross-platform" virus for both Windows and Linux. This is largely overrated. There are a couple of reasons why this type of virus poses no threat to Linux users: So overall, this threat is very theoretic. However, the Linux community should consider defense mechanisms for this. Debian can already verify the integrity of most of its files via md5sums, but some tools (e.g. prelink, to improve application start times) will modify the applications and thus the md5sums. A couple of measures we could/should probably do: These measures could make it even less attractive to write attacks against Linux software. I can't assess the potential security issues we might "inherit" from the Windows platform by offering the Mono C# implementation. This basically means that some of the to-come malware for Windows will run on Linux, too. Only if users try to run their Windows shareware, of course. [Update: another win32+linux virus, from 2001. Noone cared, nothing happened.]

6 April 2006

Erich Schubert: Planarity

Planarity is indeed an addictive flash game. I just did level 13 in 19:30 minutes. What are your scores like? This game was also featured in that cool Multi-Touch touchscreen video you might have seen some month ago. There is however a rather generic approach that will lead you to a solution rather reliably. Don't just move around random vertices, instead pick one and move it into the center, now grow the solution from that center node. The higher the level, the less space you'll have, so keep it dense! Always look at all "new neighbours" first, where to place them best to avoid having to swap them later. But by just walking around clockwise around the "convex hull" of what you've built so far, you get a pretty good network. I guess you can even prove it that you'll be able to solve it in O(n) that way when done right. In level 13 I this worked quite good for me, except I ran out of space some time. I then picked a random outer node, moved it to the very upper left, and moved the "covex hull" to the borders of the screen. From time to time you'll see you've made a mistake, but this can usually be solved by mirroring some group in your network. Update: Level 14 in 18:13 Minutes. Looked like this: Planarity screenshot with a small problem at the top edge of screen due to lack of space there. Update: Level 15 in 14:01 Minutes. The schema works perfectly, you have to touch each node at most twice (once when discovering, and maybe switch place with a sibling when discovering the new neighbours). All changes are local, and you don't actually look at the lines, just at the colored nodes. Unless of course you run out of space and have to rearrange.

Erich Schubert: SSH scanner rebuttal

Mike, please re-read my blog posting, especially the very first sentence:
I have a box still running woody, and can't run iptables recent match on it (see an earlier post in my blog on how to use this kernel filter to effectively block ssh scanners).
I've been using that method for well over a year I think. On those boxes that support it.

Erich Schubert: More on SSH scanners

I have a box still running woody, and can't run iptables recent match on it (see an earlier post in my blog on how to use this kernel filter to effectively block ssh scanners). Every few days another hacker, most of them being IPs from China, hits it with a SSH scan. When I notice these scans via logcheck mails and it still seems to be in progress I usually manually block that IP. Maybe I should move the ssh server to a different port for now. Anyway, I just received the following lines via logcheck:
Apr  6 01:04:50 sshd[1371]: Failed password for news from 213.80.123.21 port 42768 ssh2
Apr  6 01:05:29 PAM_unix[23403]: (ssh) session closed for user testtest
Apr  6 01:05:32 PAM_unix[6136]: (ssh) session closed for user testtest
Apr  6 01:06:20 PAM_unix[6793]: (ssh) session closed for user testtest
Apr  6 01:13:38 sudo: erich [...] block_host.sh 213.80.123.21
So first of all, I happened to block that scanner by chance just a few minutes after he had actually hit an account with a weak password. Fortunately, that user (like all users by default) has shell /bin/false, so these three logins were pretty short. Figures that I immedeately locked that account (which apparently has been sitting around for a year and was never used, locked as in "user not found"), and I'm annoyed that someone created an account with most probably username == password, despite the account creation tool even generating secure passwords for you. I also ran a system check, but it's clear that they couldn't ran their default attacks and didn't have time to come up with some clever mail/whatever combination to get in. But a couple of things for you to take away: Oh, and it is interesting, that once they hit that "locked down" account, they actually gave up scanning. They tried three times logging in to that account, and then didn't scan anymore. Maybe I should modify my ssh server to send unknown users always to /bin/false.

5 April 2006

Erich Schubert: Too many projects...

I'm doing too many projects. I need to step back from most of them ASAP. I just don't want them to dwindle, but prosper... I really need to find more contributors for Oh, and half of above projects need a fancy web design and an icon. Anyway, I should basically turn off my computer for the next two months and refrain from going online. :-( I know that I won't have the discipline to do so... And there are oh so many projects still only existant in my head that I'd really love to do sometime. One involving new search technologies with tags, bringing together directories like DMoz, tag based stuff like del.icio.us and "traditional" text search engines. Definitely the stuff the Web 2.0 is made out of (read: hype). But when I'm done with my diploma this new dotcom bubble is probably over, too... :-(

Erich Schubert: Programming languages: the next big thing?

I've been thinking a lot about programming languages. Especially on what the "next big thing" after OOP will be (and I'm talking of the magnitude of OOP vs. traditional imperative programming). I'd predict we'll end up with such a new paradigm in like 10 years, and it'll do away with OOP like OOP did with traditional imperative programming. It won't be Aspect Oriented Programming. It won't be UML and all its sublanguages. It won't be a pure functional paradigm, these have been around a long time already. It'll have to have multithreading support in a very natural way (multithreading is somewhat ugly in all the OOP languages with locking and such; in theory it should be very nice in functional and logic languages, but I'm not aware of anyone actually making use of that...) I guess it'll be around data flows, and it will offer a range of detail levels, so that on the one end you can do amazing things with a few lines of code (like in python or ruby), but it'll also be possible to use (and enforce if needed) lots of constraints for validity checking such as typing, value constraints, pre- and postconditions and so on. And it won't be graphical like all the UML stuff, because coders type a lot faster than they click. It will however need to come with a very very powerful editor offering benefits from both the Eclipse and the VI worlds. It will be very interesting to watch these developments. Oh, and I have intentionally no comments on my blog.

Erich Schubert: Programming languages that need to die.

We have way to many programming languages. So I'm putting together a list of languages that need to die. ;-) Honorable mentions that didn't make it into the "must die" list: Languages that I think have issues, but couldn't put on this list: So let the flamewars begin. I'll try to keep track which language zealots are the worst. Without having started, I bet it'll be the Lisp zealots.

4 April 2006

Erich Schubert: Intel PRONoMgr.exe

Whoever came up with that name, he really made me think that Windows box had some trojan on it. But the "PRONoMgr.exe" doesn't handle P0rn, but is for managing the Intel gigabit e1000 adapter. I don't think it matters if you kill it, it probably only displays that icon in your system tray.

Erich Schubert: Windows fileservers suck

... give me samba, please! I've recently been fighting windows file servers. They run on totally oversized hardware (P4-HT, 8 SATA drives in a 7-active-1-hotspare RAID-5 set) but still don't perform reasonably. (2.5 MB/s write performance is really bad, read performance is somewhat okay, though) And then it's so easy to confuse windows... seems like Windows can't handle directories ending with a dot. But you can easily create such folders over the network with SMB... name a folder "foo." and windows can't handle it any more. Or "...". Windows can't delete or rename it. And I'm talking NTFS, not plain old legacy FAT. So if you're going to hide data on a windows box, just store it using SMB in such a folder. And if you want to be really evil, write a script that autodiscovers writeable network shares around you and creates "You suck." folders there. Windows users will start running around screaming, but obviously you can't be the culprit, since you can't access Windows shares, can you? I've also been porting a python app to Windows. Python is so nice, and PyGTK works like a charm on windows. Now if Windows just wouldn't suck as much... for example, it doesn't have os.fork(). And it's I/O charset semantics are a complete mess. Once you don't use only 7-bit ASCII you're likely to go crazy. Seems like the console on Windows always uses codepage 437. The filesystem probably cp 1252. Windows internally claims to use 16-bit unicode. So if you want a python script to run on windows: I can recommend python for cross-platform coding however. The PyGTK GUIs are really nice, much nicer than all that java stuff out there. And these "issues" with windows aren't really Pythons fault, but Windows.

3 April 2006

Erich Schubert: MSIE 6 on Linux

You can run MSIE 6 on Linux quite well by now. Not that there is any reason to do so. (Okay, maybe if you are a webdesign professional you'll want to make sure your layout works fine with MIES, too.) So for me, this is more a demo on how far wine is. Here's how: Or, you could just be happy with not using Windows software. There is so much good FL/OSS software around, that I'm always seriously disappointed when I have to fight some windows software. I don't need it, do you?

Erich Schubert: Skype incompatible with Gnome?

Skype (that shady VoIP application which may eventually turn your computer into a "supernode" and use it for forwarding dozens of calls, that is packed with tons of anti-debugging techiques and tries to be very very shifty) seems to be incompatible with my Gnome. With the gnome session-manager, to be precise. Because I can run skype, if I launch it using
SESSION_MANAGER= /usr/bin/skype
Anyway, if you want to use VoIP, please use a standard protocol such as SIP. German DSL providers will currently give you DSL modems for free when you sign up with them that have SIP built-in, and where you can attach your regular phone (even ISDN) and do least-cost-routing. Some even give you a flatrate to landlines with their DSL service. And Freemail providers such as Web.de, Freenet.de and SIP specialists such as SipGate offer you a true phone number for use with SIP for free. There is tons of SIP software available. Linux users might want to try kphone (for KDE), linphone (GTK) or ekiga (former GnomeMeeting, Gnome). All of which should be included in your favourite Linux distribution (okay, maybe except for ekiga which has licensing issues with the OPAL library) Windows users might want to check out (I havn't tried it myself) Gizmo. I bet there is OSX software, too. Tons.

2 April 2006

Erich Schubert: Pure Nerd

I scored "pure nerd" (69% Nerd, 17% Geek, 17% Dork) in the Nerd, Geek or Dork Test. Probably because I barely know anything about Star Trek and Star Wars (I just recently saw Star Wars Episode I for the first time, on free TV, and I have seen at most 2 of the Star Trek movies, if any). Or any other movie or TV series. Yeah, I just don't qualify as Geek. And I also just don't qualify as Dork, going dancing to four different kinds last week, with four different girls I do not date. I definitely spend too much time with a large group of friends to qualify as Dork. The few geek/dork points I "earned" are probably due to my current interest in Swing ("old aspect of popular culture/nostalgia item")... Guess I'm actually happy with the "pure nerd" judgement of that test. ;-)

Erich Schubert: Read Feeders

... or feed readers, whatever. I'm currently using Liferea, and I've previously been using Straw for a long time. While both are okay, I consider liferea a bit more polished than straw (and it definitely has some functions like Extensions (aka filters) I really like. For example Heise only has a rather crippled feed (which doesn't even contain the teaser part of the article), so I grab the front page and convert it to a feed myself. And liferea allows you to group feeds together into one folder and read them like they were one feed. Very nice if you have a couple of comic strips which are each updated once a day, saves a couple of clicks. Straw also didn't have proper threading IMHO, so every now and then it was unresponsive while updating the feeds, especially at startup. However, straw at least did some caching of "attachments", which is very nice when you're using it to e.g. read some comic strips via RSS. Liferea doesn't cache any images, and this totally sucks. For example the Technorati icon it has for each entry is loaded again and again (or at least it always takes a second to be drawn... Oh, and depending on the rendering engine you use in liferea (gtkhtml or mozilla, I'd recommend the first) some keys may or may not function. Oh, and please don't suggest I try "blam". From what I've read it's rather minimalistic so far, and I don't like C#/Mono stuff.

29 March 2006

Erich Schubert: Let there be groups

The "rise" of udev, hal, dbus, networkmanager, powermanager applet and such has caused an increase of groups on the typical debian system. Groups provide a reliable way of granting access rights, so this is a good thing. The drawbacks are that you need to add users to these new groups and users need to logout and login again to get these new group rights. Groups you might want to assign to typical desktop users include: audio, video, plugdev, netdev, powerdev, dip, scanner, cdrom, floppy You can assign these groups using the gnome user manager, or by the following shell script as root:
for user in USERNAME1 USERNAME2; do \
for group in audio video plugdev netdev powerdev \
dip scanner cdtom floppy; do adduser $user $group; done; done
We're lacking a way to handle such changes on upgrade, though. This definitely is something we should handle with etch, that on upgrade the user is offered an easy way to update his group permissions. Anyone knows how to put winbind-users into unix groups? I have some machines where user accounts are actually loaded from ActiveDesaster, authenticated using kerberos. Winbind works fine for the single-host username to uid mapping, but it doesn't give me an option to assign e.g. the plugdev group to all users. Which I really need.

Erich Schubert: SELinux optionals in base

Up to now, if you had a working modular reference policy, you actually had had luck. There were some bugs in the toolchain that prevented this from working as intended. Thanks to all who helped tracking this down. Looks like modular reference policy is now actually working as intended for me. ;-)

Next.

Previous.