Einträge in Projekte

Diese Kategorie enthält Beiträge, die sich mit meinen Projekten befassen. Also mit allem, womit ich mir die Zeit vertreibe bzw. warum mich andere manchmal als “Freak” bezeichnen oder mich einfach nur “irre” nennen.

Persönlich bin ich ja immer noch der Meinung, dass man sich mit sowas auskennen sollte, wenn man fürs Programmieren Geld bekommen will… die Wirtschaft sieht das natürlich wie immer anders…

7. GamesDay abgeschlossen

Vom 30. April 2010

Der 7. GamesDay ist nun endlich abgeschlossen. Alle Aufzeichnungen sind online und es gibt nichts großes mehr zu tun. Endlich Zeit um stehen zu bleiben und etwas zurück zu blicken.

Im Gegensatz zu dem 6. GamesDay hatten wir dieses mal deutlich mehr Zeit für die Organisation (2 Monate statt 2 Wochen). Wir haben sie zwar nicht so gut ausgenutzt wie beim letzten mal, aber dafür hatten wir alle noch etwas Leben neben den GamesDay. Ich bin echt froh, dass dieses mal so viele bei der Organisation mit geholfen haben, besonders zum Schluss hin währe es sonst nicht machbar gewesen. Viele haben wirklich sehr gute Arbeit geleistet.

Alles in allem hat der GamesDay bei mir mit ca. 42 Std. produktiver Arbeitszeit zu buche geschlagen (ohne Besprechungen und Zeit an der HdM) und damit das Asteroids-Projekt (ca. 40 Std.) überholt. An für sich sind 42 Std. jetzt nicht so viel (knapp eine Woche normale Arbeit), aber 42 Std. produktive Arbeit sind eine ganze Menge. Einige haben vielleicht schon die Erfahrung gemacht, dass man an einem 8 Std. Tag nicht unbedingt 8 Std. produktiv arbeiten kann…

Von den Vorträgen haben mich mal wieder die technischen Themen begeistert. Allen voran “Game Engine Architecture” von Andreas Stiegler. Einfach genial, Punkt. Ich werde mir seinen Vortrag noch einige male anschauen, sobald mein nächstes Spiele-Projekt anläuft. Persönlich mag ich relativ realistisches bzw. physikalisches Gameplay sehr gern und Andreas hat bei seinem Vortrag witzig und anschaulich erklärt, wie man genau sowas angehen kann.

Ebenfalls sehr gut fand ich den Vortrag “Einführung in die Computer-Echtzeit-Grafik” von Benjamin Thaut. Ein schöner Vortrag darüber wie man in der 3D-Grafik die Dinge auf den Bildschirm bekommt, so dass sie schön aussehen und sich auch noch schnell genug bewegen können. Dieses Partikelsystem vergesse ich nie wieder…

Alles in allem bin ich momentan sehr froh, dass der GamesDay vorbei ist. Auch wenn es Spaß macht, ist es doch ein riesen Aufwand und als Organisator bekommt man beim GamesDay selbst leider immer nur die Sachen mit, die eben gerade nicht funktionieren.

ps.: Wer nicht beim GamesDay war kann sich übrigens die Aufzeichnungen anschauen.

Abgelegt in: Projekte | Kommentare ansehen und hinterlassen

My new favorit virtual machine

Vom 1. April 2010

Yesterday I got access to a newly created virtual machine I can use for my streaming project. Initially I had doubts about the performance of the VM because ffmpeg2theora is encoding a DV stream there.

However after a look at htop these doubts vanished instantly:

This is simply the best VM I ever had. I have never seen a CPU load of “nan” before… :)

Abgelegt in: Projekte | Kommentare ansehen und hinterlassen (2)

Asteroids

Vom 28. Februar 2010

This is (or was) one of the projects, that consumed my time for several weeks now:

A small screenshot of Asteroids. Starships shooting asteroids... and sometimes crashing on them.

Download: Linux with i368 and amd64 binaries, Windows

On Ubuntu Linux you need a newer libsdl-image1.2 package than the one in the repository. Installing the newer Debian package does the trick.

When you start the game you can find an overview of the basic controls in the lower right corner. The normal cannon (space key or left mouse button) is a fast firing projectile weapon. However you’ll need multiple hits with it before an asteroid finally breaks apart. The secondary weapon (called “sweeper”) fires 10 projectiles at once with a small spread, making it effective at close range. However has a cooldown of 5 seconds so it can not be used that often.

As with every game there are some small bugs:

  • The player collision is not really exact. It does not consider the players rotation (always checks as if the player would be looking up).
  • If you hit an asteroid with the sweeper weapon at close range it might happen that more than two small asteroids are spawned.

Background and development

This game mainly was a playground to get a better feeling for the D programming language and to explore how a game could be programmed. It all stared with a course (development of computer games) Thomas Fuchsmann gave at the university. Since then I was somehow hooked up by this topic and so Asteroids became my official project for this course (due tomorrow).

However the game is not “just” an usual Asteroids remake. I guess when making a game every developer mixes in some other influences. Here are the specials:

  • An “ingame” menu. That does’t only mean the menu is part of the game, but that your are flying around in the menu. You can land in different docks to trigger several actions (e.g. start a new game, continue a game or exit).
  • Particle effects. I don’t actually know if the original Asteroids game had particle effects. Anyway, this game has particles with color. Thanks to Daniel Klier for inspiring me to write a basic particle system.
  • Real thrusters. Well, as real as virtual thrusters can be. The players ship is equipped with 7 thrusters. Depending on your controls different thrusters fire and this causes the ship to move or rotate. Of course each thruster has particle effects corresponding to its strength. Just try to rotate the ship with the arrow keys and with the mouse. You’ll see the difference if you look closely.
  • Modern controls. Sort of. You can move your ship with the keyboard (basic WASD controls known from ego shooters) and rotate it and fire with the mouse (this makes crazy flying quite funny). You can also rotate the ship with the arrow keys. More or less the standard controls for PC games today, but now you can play Asteroids in this style, too.

I also worked on a way to really shatter the asteroids instead of just replacing them by smaller ones. However this didn’t really worked as I wanted (concave polygons can be troublesome fellows) and it was to unreliable to give a good gameplay experience, so I removed it again.

Another drawback: The game can only be played on a fixed 800×800 pixel window right now. It would not be much effort to allow different sizes or a full screen mode but I simply didn’t considered it important enough to devote time to it.

Technically I’ve learned quite a lot during this project. Several ways to structure your game with all sorts of pros and cons, architecture of an engine and even some details about math and algorithms. I only used OpenGL, SDL and SDL_Image as a basis, the rest was all done from scratch (starting from an N-Tree for the scene graph up to collision detection).

Turned out that D was quite a nice language to work with. Even if it’s not really at home on 64 bit Linux yet (the game was developed with the GDC compiler on Ubuntu 64 bit). You also need wrappers for some stuff but it’s still the most productive compiled language I’ve worked with so far. I’ll definitely use this language more often now. However I might try to rewrite the game with some nice libraries and might take a look at Tango. Doing it all from scratch produced a lot of really ugly code that would need ages to clean up.

Anyway, enough talk, get shooting some asteroids… just not get crashed by one: Linux version, Windows version.

Please let me know what you think about the game (e.g. post a comment or drop me a mail). Much fun. :)

Abgelegt in: Programmieren, Projekte | Kommentare ansehen und hinterlassen (2)

One step further

Vom 13. Juni 2008

Today really was a great day. First of all I wrote the last of my final exam tests (physics) and it went far better than expected (90 – 95%). This was the last test needed for the so called “Fachhochschulzugangsberechtigung” which grands me access to the local universities of applied science. This allows me to start studying this October.

Since I’m not the type of guy who likes drinking I made my self scarce some hours after the test. To make the day even better I noticed that Opera 9.5 was released just yesterday. I’m testing the weekly builds from time to time so I had a rough impression of what was coming with “Kestrel” (the codename for this release). The new UI is impressive and Dragonfly looks promising, even if it can not really match Firebug. What really blew me away however was the speed improvement (at least for the Linux version). Opera used to lag on my machine once about 10 tabs were open but now it handles them without a problem. The summary of added web standards is also quite a good read. There are some really cool new features (text shadows, extended canvas and SVG support, ...) and I will definitely look deeper into SVG. Not only that I started to use it for web design with Inkscape but it also finally gains usable momentum in the browser world.

However after several weeks of hardly doing anything else than learning it’s finally time to get back to normal life. Unfortunately quite a bit has happened during the time I had to focus on passing these test, so far to much went on an somewhat useless To Do list.

  1. My family started to move to a new home. My father finally bough a house and we worked on the house for several weeks now. The final move is planned in about two weeks and until then I will be busy there most of my time. I’m not a fan of all this because it was terribly well coordinated (read: not at all) but it was the right move for my father.
  2. Some time ago I wrote that my grandfather suffered a brain tumor. It was removed some weeks ago and so far everything went well. However he is just slowly recovering from all the treatments… if this can be called “recovery” at all. It’s always hard to witness the degeneration of a loved one but this is a part of life.
  3. A new website for the ZGR community has always been some kind of “dream project” for me. I already started a new page about 6 month ago and now I finally want to focus the biggest part of my development time on this project. The people there really deserve a great page.
  4. However there are other projects around, like Simple Localization and the i18n patch group. I want to resume active development on Simple Localization and I have several i18n messages in my mailbox. Time to get “back to work” there. :)

This is it for now. The time for coding has come again. :)

Abgelegt in: Sonstiges, Projekte, Browser | Kommentare ansehen und hinterlassen

Modern Ambience design prototype

Vom 25. Mai 2008

This is just another “I’m sick of practicing and try to chill out with web design” post. But this time there is even more to look at and play around with: the Modern Ambience design prototype.

This is the current version of the design prototype I was working on for the last few days. I’ve also showed a screen shot of it in the previous blog entry but this time it’s the real stuff. HTML, CSS and JavaScript.

However I publish this prototype here for several reasons:

Font appearance on Ubuntu, Windows and Mac

On Ubuntu DejaVu Sans is the default font. Primary because it’s the default font of GNOME (or at least Ubuntu) and looks quite good for small and large text (not completely perfect though). It simply is clearly readable and has a good balance between positive and negative space. On Windows however there is no real equivalent for it but Verdana seems to fit for medium sized or large text. However it’s to wide for small text. Therefore the prototype uses Arial for small text. I don’t really like this combination and I’m concerned that it looks kind of strange.

Another candidate to solve this problem is Trebuchet MS. I just found out that this font is installed on Windows and MacOS X by default but I haven’t had the time to try it yet.

So if someone from the Windows world is looking at the design, please tell me if the fonts look strange compared to usual websites.

MacOS X

I still have no proper possibility of testing a website on MacOS X. Since I’m especially interested in the font rendering (or the use of fall back fonts) a screen shot would be perfect. Theoretically MacOS X should use the same fall back fonts as Windows (Verdana and Arial) but I have absolutely no Idea how these will look like on OS X.

Other aspects

There are several smaller new things I tried with that design prototype.

  • Style switcher: The most interesting experiment. I think it improved a lot compared to the switcher of the current design. I’m planning to make a short page about the different designs (“Forest”, “Mountain” and “Sunset”) to better explain their history and give better credit to the people who did the great photos. Therefore the extra “about” links. I might also add a new design…
  • Figure styles: Another experiment. These styles for images and other stuff are heavily inspired by the GNOME Wiki. It seems to be a good and readable way to add a small caption to an image.
  • Breadcrumbs navigation: The design prototype also includes a breadcrumbs navigation in the title area. It’s not the usual spot (between header and content) but I hope it’s usable. It should make the navigation easier.
  • Silk icons: I’ve added some icons from the Silk icon set (comments, tags and search). However I don’t know how well these will fit into the changing color scheme of the website. Right now the fit quite well but I’ll have to wait and see how ell they’ll fit into the other color schemes.
  • PNG transparency: This prototype makes heavy use of PNG24 alpha transparency. Every drop shadow is done with those PNGs. IE 6 can not render them correctly but this time the page only have to be usable with IE 6. It does not need to look really good. Some special PNG files without drop shadows should do the trick for IE 6.

I’ll abandon IE 5 and 5.5 compatibility for this prototype. Since this is not a commercial website made for a specific audience it’s good enough if it works with IE 6 and looks good with IE 7, Firefox and Opera. I would also like to properly support Safari (for Mac) but I have no real idea on how to do this. Anyway, the prototype is not “IE ready” yet but much to my surprise I just noticed three errors with IE 6 (missing PNG transparency, a float bug with the navigation and a margin bug affecting the style switcher).

In the greater picture this project is more than just some chilling out from practicing. I want to test some new technologies I want to use for the upcoming ZGR redesign: cross platform font appearance, some content styles, the style switcher, Maruku for posts and wiki pages, proper image and file uploading, tags and heavy news feed support. Since the ZGR redesign will be a pretty big project I can not test these technologies there (it would take to much time). It’s easier to throw away a bad implementation on a small scale project than on an large scale project where everything connects to everything.

Opinions and critics (negative as well as positive) are very welcome. Feel free to write one or two sentences (or even more) about the design prototype.

Abgelegt in: Programmieren, Projekte | Kommentare ansehen und hinterlassen

To much school, to less coding

Vom 21. März 2008

This is some kind of “I’m not dead” post. Recently my web and programming activity was quite low if not zero at all and I just want to write some lines about this.

First of all the number one time burner is “school”. Right now I’m attending some kind of study preparation school you need to finish to be allowed to study at a university of applied science. The topics at school wouldn’t be a problem but since I want to study media informatics (computer science) at the university of applied science in Stuttgart I have to maintain a high mean value of my marks (2.0 on a 1 to 6 scale). Since the material at school is highly compressed (usually you get 2 or 3 years, we have just ¾ of a year) it’s getting difficult to maintain this mean value. Right now I’m exactly at 2.0 but there are still some pretty heavy tests ahead… not to mention the final exam in about 3 month.

This is pretty much the reason why all other activities almost dropped to zero. Maintenance of the Simple Localization project has become quite difficult since I’m still the only developer there and work on the Rails I18n group also has come to an halt. It’s quite sad to see these projects frozen just because of the lack of time. I really hope that I can revive these projects once my final exam is over and I have some month until college starts.

In the private world things are also not that well right now. A week ago my 76 year old grandfather has had some heath problems and the doctors found some kind of a brain tumor in his head. He made the first operation tow days ago but visiting him is difficult since the hospital is several hundred kilometres away. We’ve been there twice during the last week but it’s hard to see a person in such a condition. Especially since I owe my grandfather quite a lot. He taught me mathematics and chess in an early age, awoke my interests in drawing and science (astronomy, physics, technology, ect.) and taught me some of the principals I’m now living on (e.g. before you judge someone try to see the situation from his point of view and think about how you would have acted in his place). He also started to use a computer at an age of 71. I really hope he will make it trough all this.

Well, this is the current situation. I hope I have time for the projects again once the final exam is done.

Abgelegt in: Sonstiges, Projekte | Kommentare ansehen und hinterlassen

Altes Blut…

Vom 13. Oktober 2007

Der letzte Eintrag ist jetzt schon über einen Monat her und so wird es mal wieder Zeit, die großen Dinge der letzten Zeit nieder zu schreiben.

Das wohl wichtigste, dass sich seit dem letzten bzw. vorletzten Beitrag verändert hat, ist das Ende meines Zivildienstes. Schon Seite dem 11.9.07 besuche ich jetzt die BOS, also schon über einen Monat. Ich muss ehrlich sagen, dass das bei mir wieder altes Blut in Wallung gebracht hat. Zwar braucht man zwei bis drei Wochen bis man sich wieder an das ganze Lernen gewöhnt hat, aber nach fast 5 Jahren ohne wirkliche Schule ist das kein großes Wunder.

Die BOS ist zwar anstrengend, aber so langsam kommt wieder der alte “Entdeckergeist” hoch. Es gibt neue Sachen zu lernen und ich weiß zwar nicht warum, aber es ist für mich schon fast spannend zur Schule zu gehen. Besonders Mathe macht mir schon fast wieder Spaß. Es gibt zwar auch einige Fächer, bei denen ich überhaupt nicht weiß, wo ich dran bin (z.B. Deutsch), aber dafür gibt es eben auch andere, entspannende und interessante, Fächer (Englisch, Geschichte, Chemie). Momentan ist aber nach wie vor alles noch Einführungsstoff, es wird sich also erst noch zeigen, wie gut ich wirklich mit den Fächern klar komme.

Der Besuch der BOS nimmt zwar viel Zeit in Anspruch, aber ich glaube ich bin inzwischen bei meinen Projekten an einem Punkt angelangt, an dem man nicht einfach mal schnell irgend was “auf Eis” legen kann. Namentlich geht es mal wieder um das Simple Localization Projekt. Dank der Hilfe einiger Entwickler konnte ich in der letzten Woche recht viele Fehler beseitigen und ich bereite gerade die Veröffentlichung der neuen Version vor (wie oft hab ich das schon gesagt?).

Allerdings gibt es seit zwei Wochen noch ein anderes “Projekt”, das sich einen festen Platz in meiner Freizeit erkämpft hat. Matt Aimonetti, ein Programmierer aus den USA hat mich zu einer Diskussionsgruppe eingeladen, die das Ziel hat eine möglichst robuste Lokalisierungs-API für Ruby on Rails zu implementieren. Ich bin ihm für diese Einladung wirklich dankbar, da es für mich auch bedeutet, dass meine Arbeit an dem Simple Localization Plugin unter anderen Programmieren anerkannt wird. Die Zusammenarbeit mit den anderen Entwicklern war zwar am Anfang ungewohnt (eine englische Mailinglist und englische IRC-Besprechungen), aber ich bin wirklich erstaunt darüber die produktiv, gelassen und offen es vorangeht. Ich habe in meiner bisherigen Berufslaufbahn noch keine so produktiven Besprechungen erlebt. Ein weitere positiver Effekt ist, dass sich meine Englisch-Kenntnisse dadurch auch verbessern.

Naja, das war es erst mal so weit. Ich probiere jetzt erst mal die neue Unreal Tournament 3 Beta Demo aus. Bis auf bald.

Abgelegt in: Programmieren, Sonstiges, Projekte | Kommentare ansehen und hinterlassen

SubVersion: work around “issuer is not trusted”

Vom 7. September 2007

Again an English post. This time about a little problem I’ve stumbled across while doing some nice stuff with one of my SubVersion repositories. For readers who don’t know SubVersion is a version control system useful for working with the same files on multiple places and keeping a history of these files. But well, version control isn’t the topic of this post.

Actually I was trying to add a post-commit hook to one of my repositories. This hook should do a simple trick: updating a working copy on the same server after each commit. Not a big deal, or at least it shouldn’t be. Writing the hook was no problem:

#!/bin/sh

cd /path/to/working/copy/on/the/server
svn update

Looks easy… but doesn’t work. The svn update command just doesn’t update the working copy. As the SubVersion FAQ suggests I’ve tested the hook a bit. On the server SubVersion is used together with Apache 2 and therefore the post-commit hook is run by the user Apache 2 is running with. When I switched to that user and executed the post-commit hook by hand it became obvious what doesn’t work: The svn update command was asking me for my login to the repository and wanted me to confirm the self signed certificate we’re using on the server.

Well, the repository is accessed using HTTPS (with a self signed certificate) and requires a login. Usually the SubVersion client caches this information but since the user of Apache 2 is just a system user it can’t do so.

The login isn’t a problem, a quick look a the parameters of the svn command solved this:

svn update --username [myuser] --password [mypassword]

However there isn’t a parameter to confirm self signed certificates which aren’t signed by a trusted issuer. I tried it neverless but always ended up with an “issuer is not trusted” error. I tried searching around for several hours and found some people with the same problem. However there doesn’t seem to be a solution for this… at least none by using the svn command or one of it’s parameters.

This is why I tried some other approach: with Linux it’s quite easy to play around with the input and output streams. So why shouldn’t it be possible to fake the “p” key needed to confirm the certificate when the svn command asks for?

svn update --username [myuser] --password [mypassword] < /bin/echo 'p'

Using the normal input operator < (don’t really know how this is called) doesn’t work. The svn command just aborts in some strange way. However with a lucky look at Wikipedias Bash page I learned something new: Bash supports the “here document” syntax.

command <<< "string to be read as standard input"

So trying this for the svn command

#!/bin/sh

cd /path/to/working/copy/on/the/server
svn update --username [myuser] --password [mypassword] <<< "p"

and it worked! It used the login for the repository, accepted the self signed certificate and updated the working copy. So this was the solution for this… not by using the svn command but by using good old Bash.

After all it was funny playing around with this. I hope some other people find this useful. ;)

Abgelegt in: Projekte, Helion | Kommentare ansehen und hinterlassen (8)

Cool, ich hab… Zeit

Vom 8. August 2007

Naja, eigentlich nicht, aber ich hab heute meine gesteckten Ziele erreicht. Da hier schon länger nichts mehr aufgetaucht ist schadet ein neuer Eintrag sicher nicht.

Zu aller erst hab ich endlich mal probiert, Photoshop auf Linux zum laufen zu bringen. Dank diesen Blogeintrags war es eigentlich kein Problem. Sehr, sehr viel einfacher als ich gedacht hatte.

  • Über “Hinzufügen/Entfernen…” Wine installieren
  • Das Setup von Photoshop 7 auf die Platte kopieren (Wine unterstützt keine Zugriffe auf Dateien im Netzwerk)
  • Setup ausführen
  • Starter auf dem Desktop anlegen und als Befehl wine "C:\Programme\Adobe\Photoshop 7.0\Photoshop.exe" eintragen.

Der letzte Befehl ist nach dem oben genannten Blogeintrag nötig, damit das “Für Web speichern…” geht (funktioniert bei mir).

Hab Photoshop bis jetzt nur für ca. 10 Minuten offen gehabt und ein paar meiner alten Designs durchgeschaut. Es läuft wirklich besser, als ich erwartet hatte. Manche Fenster sind zwar manchmal etwas zu klein oder zu groß und die Toolbar-Fenster sind immer im Vordergrund (auf allen Desktops), aber das stört nicht weiter. Photoshop findet auch die alten (Windows-)Schrftarten nicht mehr, wobei man dass sicher durch die Installation der “Microsoft Core Fonts” beheben könnten (dann schaut bloß Opera wieder mies aus).

Alles in allem ein großes “Dankeschön” an das Wine-Team. Wirklich beeindruckende Arbeit!

Projekte

Ok, so viel zu meinem Zeitvertreib der letzten halben Stunde. Im größeren Stil fließt meine Arbeitskraft gerade in das Simple Localization Projekt und die Organisation der ZGR SommerLAN 2007.

Bei dem Simple Localization Projekt geht es eigentlich momentan recht gut voran. Leider musste ich einen extremen Problemfall (automatisches Erstellen von Einträgen in der Sprachdatei) erst mal nach hinten verschieben. Dieses eine Problem hat das Plugin jetzt schon ca. 1½ Monate aufgehalten. Inzwischen bin ich beim 4. oder 5. Anlauf (hier die Reste des Ersten), aber dieses mal bin ich zuversichtlich, dass was gescheites bei raus kommt. Naja, dass muss nun aber erst mal bis zur übernächsten Version 2.5 warten. Ich freue mich schon richtig auf den Tag, an dem die Version 2.4 fertig ist. Seit 2.3 ist eine ganze Menge (meiner Meinung nach) geniales Zeug dazu gekommen und ich bin sehr gespannt darauf, wie es die Leute aufnehmen werden.

Zu dem möchte ich mich hier gleich mal bei den ganzen Leuten bedanken, die mir geholfen haben bzw. helfen. Solche Unterstützung motiviert einen sehr stark. Alleine schon dass das Plugin von den Leuten benutzt wird bzw. ich damit anderen Entwicklern das Leben leichter machen kann bedeutet mir sehr viel.

Was die Organisation der ZGR SommerLAN 2007 angeht habe ich dieses mal auch ein recht gutes Gefühl (sprich: ich bin optimistisch). Bis jetzt haben sich zwar noch nicht sehr viele Teilnehmer angemeldet, aber ich denke, dass wir das Zusammenspiel dieses mal deutlich besser hin bekommen werden. Am Wochenende ist erst mal ein kleines Organisation-Treffen und das wird auch der Zeitpunkt sein, mein eingeschläfertes Windows mal wieder auszupacken.

Ach ja, bevor ich es vergesse: Hab nur noch diesen Monat Sklaven… äh Zivildienst! Danach geht es mit der BOS weiter. :)

Ich gehe dann mal 8 Stunden Schlaf genießen…

Abgelegt in: ZGR, Zivildienst, Projekte | Kommentare ansehen und hinterlassen (2)

Rails FCGID dispatcher finder

Vom 7. Juli 2007

Another English post because this might come in handy for some people out there. Some Rails programmers out there may know the problem:

When updating your production server you’ve just run svn update to update the source of your Rails application. Because of cached code it is also necessary to restart the dispatchers of the Rails application.

Well, I have to admit, until now I simply restarted the Apache2 webserver or killed all dispatcher processes (killall dispatch.fcgi). However since there are quite a few Rails apps running on my server this always killed the other dispatchers, too. This isn’t really a problem but more of “unnecessary brute force”. The perfect solution would be to find the exact dispatcher of the Rails application I want to update and just kill this one.

But how? ps -A | grep dispatch.fcgi only prints out the PIDs of the dispatchers but not the paths. To work around this and I created a little script: find_dispatcher.rb

It analyses the Apache log file and shows the data of every log entry where an FCGID dispatcher was started.

ruby find_dispatcher.rb
1722    Fri Jul 06 18:59:01 2007  /path/to/project/a/public/dispatch.fcgi
1755    Fri Jul 06 19:11:52 2007  /path/to/project/b/public/dispatch.fcgi
4615    Sat Jul 07 14:49:14 2007  /path/to/project/c/public/dispatch.fcgi
4931    Sat Jul 07 16:20:30 2007  /path/to/project/d/public/dispatch.fcgi

It’s possible to specify a filter to just see the dispatchers created for a single project:

ruby find_dispatcher.rb -f project/b
1755    Fri Jul 06 19:11:52 2007  /path/to/project/b/public/dispatch.fcgi

To combine this script with others the --only-last-pid (or -p) option just prints out the last PID:

ruby find_dispatcher.rb -f project/b -p
1755

By default the script searches the /var/log/apache2/error.log file for matching entries. You can specify your own log file with the --log (-l for short) option.

ruby find_dispatcher.rb --log /my/own/log/file.log

This is it. --help will show an overview of all options. You can get the script directly out of my SubVersion repository: find_dispatcher.rb. Much fun with it.

UPDATE: I just found out that ps -Af also prints the path to the processes. Together with grep it’s no deal to get the PID of a specific dispatcher (eg. ps -Af | grep collaboa). This makes the script a bit useless. However it can be still interesting to know when your dispatchers where started.

At least it was an exciting programming practice. :)

Abgelegt in: Programmieren, Projekte, Helion | Kommentare ansehen und hinterlassen

Options for Rubys to_yaml method…

Vom 20. Juni 2007

... and how to waste two days. This post is meant for all developers having the same kind of problem (searching for options of the to_yaml method) and because of that it’s written in English.

While programming on the Simple Localization plugin for Ruby on Rails, a mail exchange with Roman Gonzalez produced a nice idea: if a user accesses a key of the language file (a file containing YAML code) and that key does not exist it should be automatically added to the language file.

So far so good. Loading YAML is easy:

YAML.load_file ...

And saving YAML isn’t hard as well:

File.open(target_file, 'wb') do |file|
  YAML.dump data, file
end

However trying to change the way the data is converted to YAML… is a waste of time.

Why care? Well, because the language files of the plugin are written by hand and therefore it is important to keep the YAML code as clean as possible. Let’s demonstrate this. Here is a snippet of the German language file:

dates:
  abbr_monthnames: [Jan, Feb, Mär, Apr, Mai, Jun, Jul, Aug, Sep, Oct, Nov, Dez]

After loading it to Ruby and dumping it as YAML again it looks like this:

---
dates:
  abbr_monthnames: 
  - Jan
  - Feb
  - "M\xC3\xA4r" 
  - Apr
  - Mai
  - Jun
  - Jul
  - Aug
  - Sep
  - Oct
  - Nov
  - Dez

I wouldn’t say it screws up the language file, the YAML emitter (the thing constructing the YAML code) does every thing right (the YAML code is working). However the keys are not ordered and you can not be sure to find a key where you left it, after new YAML code is saved to a language file. Special characters (like German “umlauts”) are escaped because the generated YAML code is encoded in plain old ASCII. Most readers will also notice that the generated YAML code does not use inline collections (eg. [a, b, c, ...]) and does everything in usual ordinary sequences (- a\n- b\n- c). The final new part added by the emitter is the document separator (---).

Please, don’t get me wrong. There’s all right with the data stored in the YAML code, only the presentation isn’t as clear as it could be. The Simple Localization plugin heavily depends on hand written YAML files (as a place to store the localization information) and I decided to use YAML for this because it’s a very powerful and more important a simple way to write information. It makes writing the language files almost painless, sometimes even fun. This is a very important part of the plugin if not the core itself. But all the things that happen to the YAML file when it’s loaded and saved back makes it very annoying to work with the language files.

So, what do to? Usually Ruby libraries offer all kinds of options to manipulate their behavior. A short look at Rubys core docs for the to_yaml method looks promising: to_yaml( opts = {} ). So there’s an opts parameter, probably a hash witch makes it possible to alter the way the YAML code is generated. A few searches later the documentation of the yaml4r project shows the desired information: The Options Hash.

Nice, every thing we need. At least until you try it out. Options are fine but they are useless if they don’t change anything. I tried to specify the options to every YAML object that is involved in generating YAML code. A bit later I found a mail at least mentioning this:

Q3.

The following options are defined in ‘yaml/constants.rb’:

:Indent => 2, :UseHeader => false, :UseVersion => false, :Version => ‘1.0’, :SortKeys => false, :AnchorFormat => ‘id%03d’, :ExplicitTypes => false, :WidthType => ‘absolute’, :BestWidth => 80, :UseBlock => false, :UseFold => false, :Encoding => :None These options are intended to be used witch Object#to_yaml(), YAML::Stream.new(), and YAML::Store.new(). But all except :Indent, :SortKeys, :ExplicitTypes and :UseBlock are not available when I tried on Ruby 1.8.2.

What options are available in Ruby 1.8.2 and 1.8.3?

Most of these constants are now singleton methods in Ruby. I need to update documentation and remove the constants from yaml/constants.rb.

Ok, fired up irb and searched everything YAML-like for singelton methods. No go. Nothing there, too.

After more than a day searching for the YAML options enough was enough. I started to read the source files in Rubys yaml directory. A bit of reading later I found out that Ruby uses the Syck library as a backend for it’s YAML support. Syck grew out of the pure Ruby YAML library used before the days YAML was added to Rubys core. Some files in the yaml directory are nothing else than old unused files left there for backward compatibility. The main work is done by the pure C Syck library and a wrapper used to talk to Ruby.

Now I hoped that the pure Ruby Interface just uses an outdated way to pass the options to the Syck objects. However analyzing Ruby and C code for a few hours (I’ve never written a C extension for Ruby) only brought this:

The wrapper around the Syck objects does not pass the options at all. It just stores them in an instance variable and leaves them there.

I ended up in the ext/syck/rubyext.c source file of the current Ruby trunk in the syck_emitter_reset function (YAML::Syck::Emitter#initialize in Ruby). It does get the options but does not use them to set options to the Syck emitter object. A list of supported options can be found in the syck_new_emitter function in ext/syck/emitter.c.

Since the Syck functions can only be accessed via C code this could only be fixed in C. Maybe I’ll create a patch for Ruby to fix this but this will not solve my problems with the Simple Localization plugin (at least not in time). Maybe Ruby Inline can help here but for now I’ll focus on other features still on the plugins todo list.

I just wrote all this down to spare others from searching for this for to long. Please notice that I’m not experience in reading C extensions for Ruby and therefore I may have missed a thing or two. If there is a way for this to work I’ve overlooked please let me know.

At the end I still like Ruby and YAML. Rubys support for YAML is pretty impressive neverless. Because of Rubys and YAMLs powerful natures the little details can just get very tricky sometimes…

Abgelegt in: Programmieren, Projekte | Kommentare ansehen und hinterlassen (7)

Projekte

Vom 29. April 2007

Ich hab heute mit einem guten Freund von mir (Florian Seefried) mal wieder ein kleines Telefongespräch geführt. Unterm Strich haben wir eine ganze Menge über momentane und zukünftige Projekte geredet. Aus diesem Grund findet man jetzt auf dieser Seite hier eine Liste meiner aktuellen Projekte (gleich rechts unter den Hauptlinks).

Das Simple Localization Projekt verbraucht momentan wohl den größten Teil meiner Freizeit. Allerdings hab ich bei den Projekt bis jetzt so viel gelernt, dass ich keine Sekunde bereue, die ich investiert hab. Zu dem melden sich inzwischen einige Leute und helfen mir bei der Entwicklung. Unter anderem hat mir Mark Kocera eine niederländische Sprachdatei geschickt und Sylvain OBEGI erstellt gerade eine französische.

Unter all den Projekten der letzten paar Monate ist dieses Plugin wohl das Projekt mit dem größten “Spaß”-Faktor. Es motiviert zumindest mich ungemein, wenn man merkt, dass das Plugin von anderen genutzt wird und dass diese Leute dankbar dafür sind. Noch dazu enthält das Plugin einige Konzepte und Lösungen mit denen selbst ich als Perfektionist sehr zufrieden bin. Es verdient das “Simple” im Namen wirklich… wobei ich manchmal auch versucht bin, ein “genial” hinzuzufügen. :)

Table Navigation wiederum war ein kleiner Besuch in der Welt von JavaScript. Im besonderen in der Welt von jQuery und eigentlich mein erstes richtiges Projekt in JavaScript. Selbst bei diesem kleinen Ding haben sich einige gemeldet und das Plugin hat sich recht gut entwickelt. Die Idee dazu hatte Florian Seefried und eigentlich war die erste Version nicht mehr als ein paar schnell zusammengeschriebe Codezeilen. Ich hätte nie gedacht, dass sich aus so einem kleinen “Quick’n Dirty” Skript so ein Plugin entwickeln könnte.

Ok, das war ein kleiner Überblick über meine aktuellen Projekt. Wenn euch das ein oder andere davon interessiert, schaut einfach mal auf den Projektseiten vorbei.

Abgelegt in: Programmieren, Projekte | Kommentare ansehen und hinterlassen (10)

Collaboa auf Ubuntu 6.10… compiliert und läuft

Vom 17. April 2007

Die letzten zwei Tage waren zwar etwas Kommandozeilenlastig, aber dafür hat es sich gelohnt. Seit langem wollte ich mal etwas tiefer in Linux einsteigen und da manche Pakete etwas komisch aufgebaut sind vor allem auch Software selbst kompilieren.

Ok, aber nun zur eigentlichen Hauptsache. Vor einigen Einträgen hab ich schon einmal erwähnt, dass ich momentan Collaboa zum laufen bringen will. Allerdings ist die Dokumentation dieses Projektes nicht sehr gut (ok, nur ein aktiver Entwickler…) und unter Windows habe ich es ganz aufgegeben (wegen der Ruby SVN Bindings).

Gestern, oder besser gesagt heute früh, ist es mir endlich gelungen, Collaboa in Aktion zu bewundern. Leider ist das ganze etwas ausgearted… VMWare Tools, Ruby, SubVersion, SWIG und noch andere Kleinigkeiten.

Fangen wir mal an. Laufen tut das ganze unter Ubuntu 6.10 in einer Virtual Machine (VMware Server 1.0.2). Ich bewundere jedes mal die Installation von Ubuntu und man könnte sogar sagen, dass es mir Spaß macht, Ubuntu zu installieren. Auf jeden Fall ist das nach ein paar Minuten erledigt.

Da es für die Installation von Collaboa sogut wie keine Dokumentation gibt (erst recht keine deutsche) bin ich mal so irre und schreib hier alles genau nieder. Alles, also auch Ruby, SubVersion, usw.

1. Compiler einrichten

Um Software zu compilieren braucht man jemand, der die Arbeit tut. Hab keine große Lust, die Bits selbst an ihren Platz zu schieben.

sudo apt-get install build-essential

Gelobt sei apt-get und nach etwas Wartezeit ist der Compiler einsatzbereit. Jetzt können wir loslegen und Software compilieren.

2. VMware Tools installieren (optional)

Für alle armen Leute, deren Hardware zu ausgefallen oder neu für Linux ist. Hab das ganze auch ohne VMware Tools ausprobiert, also kann man diesen Schritt getrost weglassen. Die VMware Tools machen alles allerdings etwas schneller und man kann die Bildschirmauflösung nach oben drehen (bei mir 1280×1024).

Die genauen Schritte werden in dem Artikel Install VMware Tools on Ubuntu Edgy Eft erklärt, also fasse ich mich hier kurz.

Um die VMware Tools zu compilieren brauchen wir die Kernelheader:

sudo apt-get install linux-headers-`uname -r`

Im VMware Menü auf “VM” → “Install VMware Tools…” klicken. Nach ein paar Sekunden sollte dann eine CD gemounted werden, die die VMware Tools enthält. Anschließend noch ein paar Kommandos eingeben:

cp /cdrom/*.gz /tmp/
cd /tmp
tar xvzf VM*.gz
cd vmware*
sudo ./vmware-install.pl

Das VMware Tools setup fragt dann nach einigen Einstellungen. Hier einfach die Standardwerte bestätigen. Bei der Frage, ob das Modul compiliert werden soll, ebenfalls bestätigen.

VM neu starten, fertig.

3. Ruby

Zlib

Ruby bzw. Ruby Gems braucht die ZLib Bibliothek. SubVersion benutzt sie ebenfalls. Auf www.zlib.net kann man den Quelltext der neuste Version runter laden (die Dateien, die meist auf tar.gz enden). Für alle, die zu faul sind, die Seite zu überfliegen gibts auch einen direkten Link.

Dieses Archiv irgend wo hin extrahieren (hab es in mein persönliches Verzeichnis extrahiert) und in der Kommandozeile öffnen. Dort dann die drei Befehle eintippen:

./configure
make
sudo make install

Dadurch sollte Zlib compiliert und installiert werden.

ReadLine

Mehr eine Kleinigkeit, aber wenn man die Konsole von Ruby on Rails nutzen will, braucht man Readline bzw. den Quelltext. Sonst spuckt ein IRB leider eine Fehlermeldung aus.

sudo apt-get install libreadline5-dev

Ruby, endlich

Jetzt gehts ans eingemacht. Allerdings war ich erstaunt, wie einfach es eigentlich ist. Den Quelltext von ruby-lang.org runterladen. Für faule hier wieder der genaue Link zum tar.gz Archiv.

Dieses Archiv wieder entpacken, in der Kommandozeile in den entpackten Ordner wechseln und die Prozedur von Zlib wiederholen:

./configure
make
sudo make install

Diese Befehle können eine Weile dauern aber damit sollte Ruby compiliert und installiert sein. Weiter, zu etwas, dass bei Ruby nicht fehlen darf…

Ruby Gems

Die Paketverwaltung von Ruby, mit der man schnell und bequem Ruby-Software installieren kann. Die aktuellste Version von Ruby Gems kann man bei entsprechenden RubyForge-Seite runter laden.

Dieses Archiv ebenfalls entpacken und in der Komandozeile zu dem Ordner navigieren. Die Installation ist hier allerdings etwas einfacher:

sudo ruby setup.rb

Fertig. Mit Ruby Gems installieren wir später Ruby on Rails und alles, was man für Collaboa so braucht.

4. SubVersion

SWIG

Wir wollen mit Collaboa (Ruby on Rails bzw. Ruby) ja auf SubVersion zugreifen. Für diese Ruby-SubVersion-Schnittstelle brauchen wir allerdings SWIG. Es ist wichtig zu beachten, dass SubVersion momentan (v1.4.3) nur SWIG v1.3.25 unterstützt. Eine ältere oder neuere Version funktioniert leider nicht. Wenn man sich bei SourceForge etwas durchklickt findet man die richtige Version.

Dieses Archiv wie gehabt extrahieren, in der Kommandozeile hinein navigieren und die üblichen Befehle ausführen:

./configure
make
sudo make install

SubVersion

Den Quelltext findet man auf der SubVersion Homepage. Entweder in den News oder im Source Code Download Ordner. Das subversion-x.y.z.tar.gz Archiv (x, y und z stehen hier natürlich für Versionsnummern) enthält den Quelltext von SubVersion selbst. Seit SubVersion 1.4 gibt es zusätzlich auch noch ein subversion-deps-x.y.z.tar.gz Archiv, dass alle Abhängikeiten enthält. Genauere Details dazu gibt es in der Installations-Datei von SubVersion.

Entpackt zuerst den SubVersion-Quelltext irgend wo hin, z.B. in euer privates Verzeichnis (home-Verzeichnis). Dort sollte nun ein subversion-x.y.z Ordner zu finden sein, der den Quelltext von SubVersion enthält. Anschließend entpackt auch das deps-Archiv an den gleichen Zielort. Dadurch werden alle nötigen Abhängikeiten (Apache Portable Runtime, Zlib und Neon) in den SubVersion-Ordner entpackt.

Nun bemühen wir die Konsole und navigieren per Komandozeile in den subversion-x.y.z-Ordner. So in etwa:

cd subversion-1.4.3

Das Archiv entpacken und per Kommandozeile den Ordner öffnen. Wir haben ja für SubVersion bereits SWIG installiert, allerdings müssen wir SubVersion das vor dem Compilieren noch mitteilen. Sonst läst sich später die Ruby-SubVersion-Schnittstelle nicht compilieren. Deswegen fällt hier der ./configure-Befehl etwas länger aus:

./configure --with-swig=/usr/local/bin/swig
make
sudo make install

Durch die Abhängikeiten von SubVersion kann der ./configure-Befehl etwas länger rattern. Am Ende erscheint auch eine Meldung, dass Berkeley DB nicht installiert ist und deswegen nicht eingebunden wird. Diese Meldung kann man allerdings getrost ignorieren. SubVersion sollte nun installiert und einsatzbereit sein.

Ruby-SubVersion-Schnittstelle

Die Ruby-SubVersion-Schnittstelle (“SubVersion Ruby Bindings”) ist im SubVersion Quelltext enthalten. Also schauen wir noch mal in das SubVersion Quelltext Verzeichnis (dass vom vorherigen Schritt) rein. Dort die folgenden Befehle eintippen:

make swig-rb
make check-swig-rb
sudo make install-swig-rb

Der 2. Befehl make check-swig-rb kann eine Weile dauern. 2 Tests meldeten auch Fehler weil die Berkeley DB nicht installiert ist. Das kann man allerdings, wie die Meldung vorher, getrost ignorieren.

Um sicher zu sein, dass die Schnittstelle funktioniert, sollte man die folgenden Befehle ausführen:

irb
irb(main):001:0> require 'svn/core'
=> true
irb(main):002:0> exit

Falls statt => true eine Fehlermeldung erscheint, funktioniert es leider nicht. In dem Fall könnt ihr hier einfach einen Kommentar schreiben. :)

5. MySQL

Ruby on Rails braucht natürlich noch eine Datenbank im Hintergrund, MySQL erfüllt diesen Zweck recht gut. Hier bin ich mal nicht so gründlich und installiere es so wie es im Ubuntu Serverguide steht:

sudo apt-get install mysql-server mysql-client

Die MySQL-Ruby bindings zu laufen zu kriegen ist allerdings etwas schwieriger bzw. dazu braucht man noch ein Paket mehr:

sudo apt-get install libmysqlclient15-dev
sudo gem install mysql

Nun sollte MySQL laufen und für Ruby on Rails bereit sein.

6. Ruby on Rails

Langsam kommen wir nähre an Collaboa ran. Rails kann man dank Ruby Gems bequem installieren:

sudo gem install rails -y

Bei mir musste ich den Befehl zwei mal eingeben. Also wenn am Anfang zuerst eine Fehlermeldung kommt, einfach noch mal eingeben.

Mongrel (optional)

Der Standardserver von Ruby on Rails (Webrick) ist nicht perfekt und hängt ab und zu. Es gibt bessere und vor allem schnellere Alternativen, wie z.B. Mongrel.

sudo gem install mongrel -y

Wenn man mit Webrick zufrieden ist, kann man sich diesen Schritt sparen.

Collaboa

Die Ziellinie ist in sicht. Collaboa kann man auf der Website runterladen. Allerdings braucht man für Collaboa noch einige Gems:

sudo gem install redcloth
sudo gem install syntax
sudo gem install xhtmldiff -y

Das Collaboa-Archiv entpacken. Die aktuelle Collaboa-Version (0.6.1) wurde mit Rails 1.2.1 entwickelt und ist darauf fixiert. Dementsprechend wird sich Collaboa beschweren, wenn wir nur die neuste Rails-Version 1.2.3 installiert haben. Um diese “Fixierung” an Rails 1.2.3 anzupassen hab ich kurzerhand die entsprechende Quelltext-Zeile in der config/environment.rb Datei bearbeitet. Von

RAILS_GEM_VERSION = '1.2.1'

zu

RAILS_GEM_VERSION = '1.2.3'

Dazu fehlt in dem Collaboa-Archiv das log-Verzeichnis. Damit Collaboa beim Start deswegen nicht rausfliegt legen wir manuell ein log-Verzeichnis an:

mkdir log

Damit sollten alle unmittelbaren Bedürfnisse von Collaboa gestillt ein. Die paar letzten Schritte (Aufbau und einrichten der Datenbank, Einrichten von Collaboa) werden im Collaboa-Wiki gut erklärt.

Nach diesen kurzen Schritten kann man den Webserver starten (ruby script/server) und unter localhost:3000 die Collaboa-Installation bewundern.

Fertig!

Für mich war es ein langer weg bis hierher. Die ganze Prozedur hab ich 4 mal hinter mich gebracht. Zu dem war es für mich eine gute bzw. tiefere Einführung in Linux.

Wie man vielleicht schon erahnt, hab ich Collaboa momentan nur zur Entwicklung aufgesetzt. Ich werde noch ein paar Fehler korrigieren und ein paar Funktionen hinzufügen (z.B. Wiki). Bis jetzt hat mich Collaboa sehr beeindruckt… vor allem die für mich unerlässliche Unterstützung für mehrere Projekte.

Ich hoffe, dieses kleine … “HowTo” hilft einigen anderen weiter, die sich für Collaboa interessieren, aber in den “kleinen Details” ertrinken.

Danke für’s Lesen.

Abgelegt in: Programmieren, Projekte | Kommentare ansehen und hinterlassen

Der Spaß am Programmieren

Vom 5. April 2007

Heute ist mal wieder ein Tag, an dem das Programmieren Spaß macht. Genauer gesagt dann, wenn man weiß, dass die eigene Arbeit anderen Programmierern das Leben leichter macht.

Vor einier Zeit hab ich das Simple Localization Plugin für Ruby on Rails veröffentlicht. Jedoch hat sich bisher dafür anscheinend niemand interessiert. Ok, zugegeben, es gibt andere, wohl auch bessere Plugins, um eine Ruby on Rails Anwendung zu übersetzten. Allerdings gab es dass, was ich gebraucht hab, noch nicht, also hab ich eben selbst eines gebaut (z.B. Übersetzung von Models und deren Attributen). Als ich das Plugin gestern in ein neues Projekt eingebunden hab (kleine private Finanzbuchhaltung um den Überblick zu behalten), sind mir jedoch zwei Fehler in dem Plugin aufgefallen. Etwas erschreckt hab ich festgestellt, dass das neuste Feature des Plugins nicht funktioniert und daher das gesamt Plugin nicht geht. Wenn man einmal keinen Test schreibt…

Lieber mache ich das hier erst mal fertig und schau mir das Plugin später noch mal an…

dachte ich mir und hab nach nem kleinen Fix an der Anwendung weiter programmiert. Ironischer weise hab ich heute nach der Arbeit eine eMail von Manuel Wahl bekommen, in der er mich nach genau diesem Bug fragt. :)

Diese Ereignisse haben mich etwas zum schmunzeln gebracht. Mir wird jetzt allerdings klar, warum das Plugin niemanden was gebracht hat. Wenn es gar nicht funktioniert hat…

ps.: Das Plugin ist jetzt natürlich korrigiert (v2.1.1).

Abgelegt in: Programmieren, Projekte | Kommentare ansehen und hinterlassen

Ein kleines Update

Vom 27. Dezember 2006

Ich war so frei und hab ein kleines Update dieser Website hier online gestellt. Das meiste lag zwar schon seit fast zwei Monaten in der Versionsverwaltung rum, aber ich hab bis jetzt einfach nicht die Zeit und Motivation dafür aufgebracht.

Naja, wie dem auch sei, nun sollten einige lästige Fehler korrigiert sein.

  • Das Layout müsste jetzt eigentlich auch im Internet Explorer 7 richtig funktionieren. Genau das war die Änderung, die seit zwei Monaten in der Versionsverwaltung rumlag. Damals hab ich das Layout nur mit IE 7 RC1 getestet und momentan fehlt mir leider eine Maschine um die Website mit der finalen IE 7 Version zu testen. Werde das bei Gelegenheit noch nachholen.
  • Nach ca. 1200 Spam-Kommentaren hab ich jetzt ähnlich wie bei ZGR eine kleine simple Aufgabe (addiere 8 und 5) eingebaut. Diese Aufgabe muss man jedes mal “bewältigen”, wenn man einen Kommentar schreibt. Ich weiß, auch für Menschen fast unlösbar.
  • Wenn man einen Kommentar schreibt, werden jetzt die Daten wie Name, Website, usw. in einem Cookie gespeichert und auch beibehalten. Das hat früher nicht funktioniert, weil es nur ein Session-Cookie war, also beim Schließen des Browsers wieder gelöscht wurde. Nun ist es so eingestellt, dass das Cookie auch weiterhin gespeichert wird.
  • Einige Änderungen im Innenleben der Website… allerdings nichts grundlegendes.

Der Hauptfortschritt ist wohl die kleine Aufgabe, die den Spam-Bots hoffentlich das Leben schwerer macht… aber man wird sehen.

Abgelegt in: Programmieren, Projekte | Kommentare ansehen und hinterlassen (4)

Navigate through table rows using the keyboard

Vom 10. Dezember 2006

Eines meiner “liegen gebliebenen” Projekte hab ich jetzt endlich soweit fertig: Navigate through table rows using the keyboard (englisch).

Dabei handelt es sich um ein kleines jQuery (JavaScript Framework) Plugin, das die Arbeit mit Tabellen auf Websiten erleichtert. Man kann die Tabellenzeilen mit den Pfeiltasten durchgehen und mit der Return-Taste quasi die aktuelle Zeile “öffnen”. Wenn man eine Zeile geöffnet hat, sich aber doch nicht dafür interessiert, kann man mit der Rücktaste (Backspace) wieder zu der Tabelle zurück und schnell die nächste Zeile markieren und “öffnen”. Mit einfachen Klicks (Zeile markieren) und Doppelklicks (Zeile öffnen) kann man auch sinnvoll arbeiten. Die Beispielseite demonstriert die Nutzung recht gut… hoffe ich jedenfalls.

Die Idee kam von meinem Freund Florian Seefried während eines längeren Skype-Telefonates am Abend. Er arbeitet gerade an einer Webanwendung für seinen Betrieb. Da seine Mitarbeiter aktuell noch mit einer Anwendung arbeiten, die ein ähnliches Tastaturverhalten bietet, kam irgend wann mal die Frage auf:

Geht das bei Websiten auch?

Nach einem kleinen Test heiß die Antwort glücklicher weise “Ja”. Sorgenkind ist hier allerdings mal wieder der Internet Explorer, bei dem man leider die Pfeiltasten nicht abfragen kann. Allerdings sollte auch für IE-Nutzer die Hervorhebung der aktuellen Tabellenzeile und die Nutzung der Maus etwas bringen.

Wenn man etwas über dieses Tastaturverhalten nachdenkt, findet man auch ein paar Situationen, bei denen man dieses Plugin sinnvoll einsetzen könnte. Ein Beispiel währen die Themenlisten in einem Forum oder die Übersicht der privaten Nachrichten.

Naja, bin auf jeden Fall froh, dass ich das Plugin jetzt in einem Zustand gebracht hab, in dem es dem ein oder anderen Programmierer helfen kann. War so frei und hab es zur Plugin-Liste der jQuery-Seite hinzugefügt. Vielleicht findet es jemand nützlich. :)

Abgelegt in: Programmieren, Projekte | Kommentare ansehen und hinterlassen

Arkanis Development Version 2 online

Vom 17. September 2006

Ich hab schon öfters mal von mir gegeben, dass ich an einer neuen Version dieser Webseite hier arbeit. Nach einigen Monaten Arbeit ist es nun so weit… nun, seht selbst. :)

Hier nun ein kleiner Überblick über die Änderungen:

  • Neues Design… naja, eigentlich gleich drei. Wenn ihr euch fragt, was diese drei farbigen Buttons links bedeuten, geht einfach mal mit der Maus drüber und klickt drauf. Hoffe sie gefallen euch.
  • Auf Arkanis Development erscheinen jetzt ab und zu mal ein paar Artikel, die sich genauer mit diversen Themen befassen. Anfang macht ein Artikel über die Entwicklung dieser neuen Version. Allerdings habe ich bereits weitere Artikel über PNGs und den Spamschutz von eMail-Adressen auf Webseiten in Arbeit.
  • Ich hab mir mal die Zeit genommen und die Über… und Profil Seiten zu dem gemacht, was sie sein sollten. Werft einfach mal einen Blick rein.
  • Die Daten, die man beim Schreiben von Komentaren eingibt (Name, eMail und Webseite) werden nun in Cookies gespeichert. Wenn man einen weiteren Komentar schreiben will, sind diese Felder dann automatisch ausgefüllt. Hab ich mir von Lexx seinem WorldPress Weblog abgeschaut.
  • Viele, sehr viele Details…

Eigentlich ist ja sowieso alles komplett neu geschrieben und es ist nur ein Zufall, dass es ab und an Ähnlichkeit mit der ersten Version gibt. Weblog bleibt halt Weblog. Ich möchte allerdings noch anmerken, dass in den letzten 2 Wochen zu den ca. 772 Zeilen Code noch mal 516 Zeilen Tests dazu gekommen sind. Anders ausgedrückt kommen auf 100 Zeilen Quelltext 66 Zeilen anderer Code, der sicher stellt, dass die ersten 100 Zeilen auch das machen, was sie sollen.

Ich habe wie gesagt einen Artikel über die Entstehung dieser Version verfasst. Der Artikel ist aber mehr eine grobe Zusammenfassung und geht nicht ins Detail. Wenn jemanden Interesse an speziellen Details hat, kann ich zu dem Thema auch gerne noch etwas genaueres schreiben.

Es hat fast die kompletten letzten zwei Tage gekostet, die neue Webseite online zu bringen. Jetzt, um 23:00 Uhr bin ich endlich fertig. Also, viel Spaß mit der neuen Seite. :)

Abgelegt in: Programmieren, Projekte | Kommentare ansehen und hinterlassen (6)

Die kürzeste Geschichte der Zeit… vorbei

Vom 24. Juli 2006

Das Buch ist für meiner einer nun Geschichte. Muss wirklich sagen, dass es die Zeit auf jeden Fall wert ist. Man bekommt wirklich einen ungefähre Vorstellung vom (mehr oder weniger) aktuellen Stand der Wissenschaft. Es wird auch Wert darauf gelegt, zu erklären, was eine “Theorie” eigentlich ist… und das eine Theorie nicht erklären kann, warum das Universum existiert, sondern nur wie.

Am besten man liest das Buch selbst, Zeitverschwendung ist es auf jeden Fall nicht. Im Gegensatz zu “Das Universum in der Nusschale” ist dieses Buch bei weitem nicht so anstrengend zu lesen. Hatte nie das Bedrüfnis, es für ein paar Tage mal weg zu legen. Hab jetzt auf jeden Fall wieder eine ganz, ganz grobe Übersicht über diese Themen (natürlich relativ gesehen).

Nun aber wieder zu “normaleren” Themen. Das Wochenende ist mal wieder in einen halben Schwimmbadbesuch ausgeartet… tauchen, kiloweise Algen fischen, das volle Program eben, zumindest für einen Schwimmteich. Die Hälfte des Tages bestand danach aus Programmieren am Teich, mit dem gemütlichen Geplätscher eines kleinen Baches. An für sich recht entspannend, aber wenn man schon im Sitzen so sehr schwitzt, dass einen der Schweiß von der Stirn runter läuft, ist man für eine gelegentlich Abkühlung und viel Trinken noch dankbarer. Hab ich schon die Fließen auf der Terrasse erwähnt? Wenn die Schmerzgrenze irgend wo bei 70°C liegt, müssen die wohl etwas heißer gewesen sein.

Der perfekte Ausklang allerdings war die kleine Grillparty am Abend. Da leider nicht alle Teile des Grills vorhanden waren, haben wir das Grillfeuer einfach in einem provisorischen Steinkreis im Carport (Betonboden mit einem Dache drüber) gemacht. Es war zwar schon dunkel, als wir zu grillen angefangen haben, aber dafür kammen die Kerzen und Fackeln besser zur Geltung. Der Witz der ganzen Sache war, dass es während des Essens angefangen hat, wie aus Eimern zu geißen. Tisch geschnappt, zwei Meter weiter unter dem Carport getragen und schon haben wir beim Essen den Regen zugeschaut. Tolle Atmosphäre, erstklassiges Essen (Kompliment an die Köche und Grillmeister)... was will man mehr?

Das wars dann erst mal wieder. Wenn ihr euch fragt, warum ich erst jetzt wieder etwas schreibe… Ich bau nach wie vor an der neuen Version dieser Seite hier und während ich das Design gemacht hab, hat mich der Perfektionismus gepackt. Was genau das bedeutet seht ihr hoffentlich bald selbst, in allen drei Facetten.

Abgelegt in: Programmieren, Sonstiges, Bücher, Romane, ..., Projekte | Kommentare ansehen und hinterlassen (2)

Einhweihung

Vom 14. Juni 2006

Willkommen erst mal auf der “neuen” Arkanis Development Website und damit auch zu meinem Weblog.

Leider war die “alte” Website nichts weiter als ein Platzhalter… und das seit fast einem Jahr. Die Arbeit bzw. meine Ausbildung verschlingt seit zwei Jahren leider die meiste Zeit und Motivation, so dass für meine eigene Seite so gut wie gar nichts übrig blieb. Momentan wird das ganze ehr schlimmer und diese Woche ist seit langen Monaten (seit Anfang des Jahres?) der erste wirkliche Urlaub, den ich genießen kann.

Eine Woche reicht jedoch auch nicht wirklich aus, um eine komplette Website aus dem Boden zu stampfen… und so ist auch die “neue” Arkanis Development Website nicht wirklich das, was meinem Qualitätsstandart gerecht wird. Das System hinter der Seite ist mehr oder weniger der Überschuss aus einem Ruby on Rails Crashkurs. Es stecken vieleicht 2 oder 3 Tage Arbeit drinne, dem entsprechend ausgereift und fertig ist es auch. Das Design jedoch liegt schon etwas länger auf meiner Platte. Es ist schon fast ein Jahr alt und hat eine recht interessante Entwicklung hinter sich. Leider hab ich bis jetzt die Bugfixes für den allseits beliebten IE 6 noch außen vor gelassen. Ist allerdings schon fast erstaunlich, dass es auch ohen Bugfixes relativ gut funktioniert.

Naja, dann werde ich mal etwas weiter Fehler beheben… vieleicht trifft dann in ein paar Stunden ja die Beschreibung “Alpha” auf die Seite zu.

Abgelegt in: Projekte | Kommentare ansehen und hinterlassen (2)

Projekte

Simple Localization
Ein einfaches, aber macht- volles Übersetzungsplugin für Ruby on Rails.
Table Navigation
Ein jQuery Plugin um per Tastatur schnell durch Tabellen zu navigieren.

Über was ich schreibe…

Newsfeeds

Kommentare