Einträge mit dem Tag ‘Code’

Tags:

When your computer suddenly does funny things, Cosmic Rays may be at the heart of the matter. At least, that is what Nelson Elhage at the Ksplice blog suspects. Personally, I would wager more on defective RAM. Still, Nelson's debugging ist first class, and his post well worth reading.

Kommentare deaktiviert für Kosmischdeutsch

Dumb Thoughts

Whenever I enter our company's precincts these days, I am reminded of ice cream: a packed layer of snow, sprinkled with dark grit, looks just like chocolate chip ice cream; a thin layer of slightly dirty snow on top has more or less the colour of nut ice cream.

On Music

Never mind. I meant to tell you something totally different. It is about iTunes, the program I use to listen to music, and to keep my music library in order (and for a podcast or two). I have not yet bought anything from the iTMS, and nowadays, my iPod is used but rarely. So, I could just as well use a different program. On the other hand, iTunes works very well, it is integrated into the OS (on the Mac, that is), and I do not know of any real alternative.1

Out of tune

Nevertheless, there are some things I do not like. Mostly, these are minor points. For example, you can change the toolbar2 to suit you likings in almost every little utility; this is functionality provided by the operating system, so application programmers do not have to work too hard to include this in their program. Not so in iTunes. Or take Smart Playlists3: You can combine several criteria by either and or or, but not by both4. It is possible to work around this problem5 by combining several Smart Playlists.

Rated

Two points are, however, a bit bigger: the way iTunes works with albums, and with ratings.
iTunes' ratings are quite simple -- and that is the reason it looks a bit slapped-on to me: You can rate each track with one to five stars. These will be shown in your track lists, and you can use them in Smart Playlists6. That is about it. Wait, there is something else: when rating a complete album, the stars are copied to all the album's (unrated) tracks. They will be shown as outlines to remind you that the track as such has not been rated. Likewise, an album will be rated from the combined ratings of its tracks.7.

So far, so good. Such a simplistic rating seems to me to belong to the 90s8. My average rating is slightly better than four -- a prime example of grade creep. This is where I would like to see something completely new. I do not know exactly how it should work; however, the fundamental idea is to take away the need to give absolute ratings. Instead, one could for instance perform relative ratings between two tracks; the application would then calculate absolute ratings for all titles. Or maybe the rating is calculated incrementally, and you rate it up and down each time you listen to a track.9. Or maybe there is a totally different idea. Some engineer is bound to have a great idea.10

Albus, -a, -um

Now, I have to admit I am pretty old-fashioned. Since mp3 and similar formats have been accepted, the music business seems to have shifted toward single tracks.11 Albums are more or less dead.

Well, not for me. I still like to listen to whole records: the tracks belong together, forming a whole that is more than its parts, and sometimes, they even tell a story.12.

Fortunately, albums are not totally gone: iTunes will group tracks by album, putting the cover art next to the list of tracks. You can also instruct shuffle mode to play whole records at a time rather than single tracks. Finally, there is the indirect rating system I mentioned above.

However, I think there is still much room for improvement. For instance, I like to use Smart Playlists, to look for highly rated tracks, of for ones I have not listened to for a while. Sometimes, only isolated tracks from various albums will be collected in this way: I might have stopped listening in the middle of an album last week, so its first tracks are two weeks more recent than the last ones; or maybe, I have rated several tracks differently even though they belong to the same record, and now only a few can be found on my five-star list.

I would really like Smart Playlists to work better with albums: wouldn't it be great to have a list of albums collecting dust rather than just isolated tracks?

[Edit: English]

  1. Again: on the Mac. The situation may be different for other operating systems. []
  2. That is, the upper part of a window, where you will find icons serving as shortcuts to important commands. []
  3. Automatically compiled, rule-based collections of music. []
  4. Say, I cannot select all titles I like especially well and that are either from the 70s or belong to the folk genre. []
  5. Apple Mail does it, too. []
  6. For example, you could create a list of all tracks with four or more stars. []
  7. Unless you have explicitly rated the album already. []
  8. I am tempted to say: to last century. []
  9. I may have been less than clear: a new track is given an average rating, say, 3. Once I have listened to it, I think it is better than that, and iTunes increases its rating to 3.5 or so. After listening for the second time, I still think it is underrated, so it increases to 3.8 -- and so weiter in smaller and smaller steps. []
  10. I have added something to the wish list:

    What I would like to see in a future iTunes version is a truly innovative rating system. Instead of assigning a fixed number of stars per title, something that evolves as I build up my library and listen to music would be great.

    For example, once I have assigned preliminary stars to a new title, iTunes might allow me to compare it to other titles with a similar rating (say, while listening to the track). iTunes could then adjust its rating accordingly. Globally adjusting ratings in order to use the full spectrum of one to five stars might also be useful. Currently, the average rating in my library is slightly above four stars, however it is hard to correct this manually.

    []

  11. Except for concerts, that is. []
  12. And I like vinyl. But the drive does not fit into my Mac. Sob. []
Kommentare deaktiviert für Chocolate Chips and Nut Icedeutsch

Das Wort des Tages: Unbill. Außerhalb alter Texte (oder der Fantasy-Literatur) hört man es äußerst selten. Heute aber bat unser IT-Dienstleister, diese zu entschuldigen: ein zentraler Dienst ist vor Weihnachten ausgefallen, der Hersteller arbeitet immer noch an der Behebung des Problems.

Außerdem: Ich habe mich in einem Irrgarten aus Wenn-Dann-Abfragen verlaufen und ein Softwarepaket an zwei Stellen repariert, aber gleichzeitig an drei anderen kaputtgemacht. Bis die Reparatur dann getestet war, ging es schon stark auf acht zu. Naja, wer früh nach Hause will, sollte im Fenster mit den Build-Resultaten vielleicht ganz bis nach rechts scrollen. Dann sähe man nämlich die roten Balken.

Und: Während ich auf den Buildservice warte, bereite ich diesen Blogeintrag in einem TextEdit-Fenster vor. Das Programm mag aber den Satzanfang Naja nicht und ersetzt ihn automatisch durch Anja. Zum Glück kann man das abschalten.

Und zu guter Letzt: Der neue Mandelbulb-Film ist fertig. Es hat ein paar Wochen gedauert, ihn zu berechnen; aber für glatte Kanten und eine höhere Framerate hat ich der Aufwand gelohnt.


Kommentare deaktiviert für Vom Tage

Unter Macintoshjüngern-Anwendern gibt es seit Wochen nur ein Thema: die neue Version des Betriebssystems, 10.6, offizieller Codename Snow Leopard, sollte diesen Herbst erscheinen.

Es ist dann doch etwas schneller gegangen als gedacht (ja, das kommt auch in der EDV manchmal vor) -- seit dem 28. August kann man das System käuflich erwerben.

Spätestens jetzt können Nichtmacianer aufhören zu lesen; alle anderen mag vielleicht interessieren, daß Apple die neue Version ganz freimütig mit 0 new features vorgestellt hat -- um dann einzuschränken, eines gebe es doch: die Unterstützung von Microsoft Exchange nämlich. Wer in einem größeren Unternehmen arbeitet, mag sich darob dankbar gen Cupertino verneigen; den Privatanwender dürfte das aber weniger interessieren.

Was ist also neu am neuen System? Alles soll irgendwie etwas schneller, schlanker, flüssiger geworden sein, liest man allerorten. Wer etwas fundierterer Informationen bedarf, dem sei der sehr ausführliche Artikel von Ars Technica ans Herz gelegt. Zugegeben, das war jetzt sehr viel Vorrede, nur um einen Link unterzubringen. Darum bringe ich jetzt noch den letzten Tip an, sich von den ersten zweieinhalb Seiten des Artikels (im ganzen sind es dreiundzwanzig!) nicht täuschen zu lassen -- sie sind bei weitem der Teil mit dem wenigsten Inhalt.

Und nun bin ich still, damit ihr in Ruhe lesen könnt.

Kommentare deaktiviert für Zero New Features

Today, I learned something new about CSS: You cannot use :before inline. Come to think of it, that should have been clear. After all, inline styles are valid for exactly one element -- namely the element with the style option. But since :before is a pseudo-element, it does not have an HTML tag, so you cannot define an inline style for it.

I had tried something like this:

<div style=":before {content: url(xyz.png)}" >Text</div>

This is, of course, rubbish. Inline-styles lack elements as well as curly braces. I have solved the problem at hand slightly differently, though, so at long last this blog has category icons.

Kommentare deaktiviert für Trouble Inlinedeutsch

Mit iTunes kann man Musik hören. Ob das Programm nun gut oder schlecht ist, darüber kann man sicher streiten; ich finde es jedenfalls ganz praktisch.

Weil heute alles irgendwie vernetzt sein muß, erlaubt auch iTunes es, auf die Musiksammlungen anderer Rechner zuzugreifen. Dummerweise kann man Titel nur hören, aber nicht herunterladen -- technisch ist das ziemlicher Quark, aber da haben wohl die Rechteinhaber gedrängelt. Und noch etwas geht nicht: wenn andere Leute auf meine Bibliothek zugreifen, kann ich zwar sehen, wie viele; aber nicht, wer.

Ein kurzer Besuch bei der Suchmaschine meines Vertrauens[1] läßt mich jedoch wissen: wo die Applikation sich sperrt, hilft das Betriebssystem weiter. Bei Juretta finde ich einen netten Aufruf des Tools lsof, der meine Neugier befriedigt:

lsof -r 2 -n -P -F n -c iTunes -a -i TCP@`hostname`:3689

Leider bin ich noch nicht zum Testen gekommen, und der Eintrag von Stefan ist immerhin fast vier Jahre alt. Außerdem geht das so natürlich nur auf dem Mac, weil Windows lsof nicht kennt. Wer mag, kann sich ja eines der Windows-Tools daraufhin ansehen. Ein mögliches Problem: unter Unix ist fast alles eine Datei, auch Netzwerkverbindungen. Unter Windows mag das anders aussehen.

[1] Aus Prinzip ist das nicht Google -- die haben mir ein bißchen zu viel Marktmacht.

[Edit: Artikel vergessen]

4 Kommentare

Heute habe ich den ganzen Vormittag damit zugebracht, nach einem Konfigurationsfehler zu suchen: ich wollte einige Benutzer aus einem Server aussperren. Dazu habe ich Pluggable Authentication Modules (kurz: pam) verwendet. Mit pam kann man tolle Sachen machen, zum Beispiel den Login nur von bestimmten Rechnern aus zulassen, oder nur zu bestimmten Uhrzeiten, oder nach einem Haufen sonstiger Kriterien gehen. Das, was ich wollte, ist viel einfacher: ein Benutzer darf rein, alle anderen müssen draußen bleiben.

Nur: es klappte nicht. Egal, wie ich an der Konfiguration gedreht habe, das System hat immer alle reingelassen. Nach der Mittagspause bin ich dann über diesen Satz in der Dokumentation von rlogin gestolpert:

The login process is an instance of the login(1) program, invoked with the -f option if authentication has succeeded.  If automatic authentication fails, the user is prompted to log in as if on a standard terminal line.

Im Klartext: zuerst werden die ausgefuchstesten Bedingungen überprüft; wenn die sagen: komm rein, dann bist du drin. Wenn die aber sagen: du nicht, dann darfst du dein Paßwort eingeben und bis trotzdem drin. Na toll.

Wer denkt sich denn soetwas aus?

Kommentare deaktiviert für Hintertür

I cannot even tell how long this has upset me: if my web browser does not know the address I want to go to, it simply slaps a www in front and a .com at the end. To me, that is a typical case of "well intended". I hate it when my computer tries to be more intelligent than me. It doesn't work.

Some time ago,  however, I stumblede upon the solution: this is a feature called domain guessing, and you can switch it off! I had already looked in vain in every nook of the preferences dialog, of course -- instead, you have to type about:config into the URL bar, then set the entry browser.fixup.alternate.enabled to false.

Simple, really.

Kommentare deaktiviert für wwwas soll das?deutsch

Es war einmal eine Zeit, in der für jeden neuen Computer alle Programme neu geschrieben werden mußten. Die Menschen kannten es nicht anders, und so erfanden sie tagein, tagaus das Rad neu. Doch dann kam Dennis und sagte: wäre es nicht schön, wenn wir dem Computer einfach erklären könnten, was die Programme tun sollen? Dann könnte der Computer das Programm selber schreiben; und wenn wir einen neuen bauen, dann geben wir ihm einfach die gleiche Erklärung, und er baut sich das Programm so, wie er mag.

So hat Dennis die Programmiersprache C erfunden. Außerdem hat er noch einen guten Teil von Unix erfunden, aber das ist eine andere Geschichte. Ein paar Jahre später hat Bjarne C++ erfunden. C++ ist ein bißchen seltsam: einerseits ist es ein einfaches Werkzeug für Leute, die sich beim Arbeiten die Hände dreckig machen (low level, sagt der Programmierer), wie C es ist: so etwas wie ein Hammer oder eine Zange; andererseits bringt es eine Menge fortschrittliches Zeugs mit: wie ein Industrieroboter vielleicht.

Kein Wunder, daß es da Ungereimtheiten gibt. Wer sich mit C++ auskennt, der findet bei yosefk eine sehr unterhaltsame Zusammenstellung dieser Ungereimtheiten.

[Edit: Typo]

Kommentare deaktiviert für A, B, C, C++

Mit Computern, so sagt man, kann man die seltsamsten Dinge erleben.

Ich finde es zum Beispiel seltsam, daß sich manche Programme nicht auf Festplatten, die zwischen Groß- und Kleinschreibung unterscheiden können, installieren lassen. Seltsam vor allem dann, wenn es sich nicht um Produkte irgendeines Sharewareprogrammierers handelt, sondern um eine Weltfirma (jedenfalls für Softwareverhältnisse) mit 3 Milliarden Dollar Jahresumsatz.

Deshalb habe ich den halben Sonntag mit dem vergeblichen Versuch verbracht, meiner Festplatte die groß-kleine Intelligenz abzugewöhnen, ohne danach alle Programme und sämtliche Daten von Hand wieder aufspielen zu müssen. Ein guter Teil des Montags ging dann dafür drauf, auf einer zweiten Partition ein zweites Betriebssystem zu installieren. Jedesmal neu booten zu müssen, nur um Photoshop zu starten, ist allerdings auch nicht so toll. Also werde ich mich wohl über die Feiertage mal mit Aryas Beitrag auseinandersetzen: durch Umbenennen von gut 60 Dateien kriegt man zumindest CS3 ans Laufen. Vielleicht klappt das ja auch mit CS4.

Kommentare deaktiviert für LeHmZiEgeL