Ikke's Blog

Categories: Technology, Coding Corner, Docbook, Summer of Code 06, Desktop, Ivman, Linux, Networks

May 8
Development-related presentations using Git

Yesterday I had to give some introduction presentation on Django, a Python-based web-application development framework (really cool, if you don't know it yet, take a look!).
The goal was to build some simple blog-like application during the presentation to give the audience an overview of the framework and some of it's basic capabilities (whilst still hand-coding everything, not using newforms/generic views/..., providing pointers to these great features though).

Obviously, at several points of the presentation, you got to show some example code. As most of the time you work on one source file during several stages of the presentation, you don't want to show the end file from the beginning, you want to incrementally add code.

There are some obvious ways to do this:

  • Type everything by hand at every stage
  • Have a source tree for each state in different directories
  • Give files a special name, like blog/models.py_slide19

These "solutions" got several problems though:

  • The first one is slow, error-prone and boring for the public
  • The second one is acceptable but uses a lot of diskspace
  • The last one is not acceptable as (in this case) because of the "wrong" filenames, you won't be able to run the django development server at the separate stages of development

The way I did it: put the code of your first slide in a (local) Git repository, create a new branch whenever you change code, check-out the branch, change the code and commit. Then when the presentation starts, git-check-out master, then everytime you're at a slide where you changed some code, git-check-out (name of the branch for this slide). I used "slideXX" as branch names, using just 1, 2, 3 etc might be better as my schema'd break if I had inserted a slide somewhere.

Really quick and easy to work this way!

Apr 15
About the lack of Java-style interfaces in Python

Just had some discussion about OO concepts, abstract classes and interfaces in Java and Python in #gnome-nl. I still dislike the fact Python and other interpreted languages got no enforced interface implementation support.

A little comparison (not meant to be disrespectful againt anyone):
When you're living in a Java world, you can go out on friday night, meet some person implementing the Girl interface, invite her at your place and have some fun (you know ;-)).

When you're Python, you might go out on friday night, meet some person who tells you "it" implements the Girl interface and at a first sight does so, as get_voice_timbre returns "girl" and has_boobs returns true. Then you take the person home, to your bedroom, and find out, well, it's a shemale.

Got the picture? :-)

Anyway... SoC news will follow later on!

Apr 2
Summer of code

Application deadline for Google's Summer of Code 2007 is already some time behind us. Might be interesting to provide a list of proposals I submitted, maybe some other people might pick up a project ;-)

I submitted 3 of them:
- GNOME: HID handling
Basicly, integration of XInputHotplug in the desktop, including per-device settings, and better Bluetooth mouse/keyboard handling (if possible without any command line magic etc.). Enhancing multimedia key support (especially ACPI-based) was a subproject too.
- Django: Row-level permissions
Title says it all. A pretty important project for the Django community.
- Gaim: Porting the Bonjour protocol module to Avahi, and enhance it's functionality
Bonjour-based IM (iChat) is pretty cool and should be (ab)used more. libhowl isn't so nice though as we got the Avahi guys providing us a completely free, glib-integrated mdns/dns-sd stack.

That's about it... I do hope at least one of them gets selected :-) All projects do deserve some love though, that's for sure.

Anyway, while waiting, I'm going to implement some little gimmick panel applet, more about that one later... Still doubting whether to take the Mono/C# or Python road.

Mar 29
Ubuntu joke

Actually I think it's a pretty funny one, not intending to be disrespectful against anyone.

Wonder what this is all about? Read more.
Maybe compare it with this mailing.

Mar 23
Dear web, please fix my screens

Old situation = laptop with 1280x768 display + Ati X1600 + fglrx + XGL + Beryl working fine.
New situation = old situation + 1280x1024 TFT connected to laptop VGA out
Desired situation = new situation + working Xinerama-like multihead setup (ie being able to move windows across both monitors, etc) including XGL/Beryl

What I got: after playing with fglrx settings, pairmode line etc, a normal Xorg server with TWM works, windows can be dragged across monitors,...

Whenever I restart GDM (and XGL) though, I can log in, then my standard Beryl-driven GNOME desktop is displayed on my laptop screen, and a second desktop (with its own panel etc) on the external screen. I'm unable though to move my mouse pointer to this screen, can not drag windows,... Basicly, the monitor and the desktop on it can't be used.

This is what I got in my XGL session:
$ fglrxinfo -display :1.0
Xlib: extension "XFree86-DRI" missing on display ":1.0".
Xlib: extension "XFree86-DRI" missing on display ":1.0".
display: :1.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Mobility Radeon X1600
OpenGL version string: 1.2 (2.0.6334 (8.34.8))

display: :1.0 screen: 1
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Mobility Radeon X1600
OpenGL version string: 1.2 (2.0.6334 (8.34.8))

$ xrandr
SZ: Pixels Physical Refresh
*0 1280 x 768 ( 342mm x 203mm ) *60 75 70 72 56 47
Current rotation - normal
Current reflection - none
Rotations possible - normal
Reflections possible - none

$ xdpyinfo | grep dimensions
dimensions: 1280x768 pixels (342x203 millimeters)
dimensions: 1280x1024 pixels (342x271 millimeters)

$ less /etc/X11/xorg.conf
Section "Device"
Identifier "ATI Graphics Adapter1"
Driver "fglrx"
VendorName "ATI Technologies Inc"
BoardName "ATI Radeon Mobility X1600"
Option "OpenGLOverlay" "on"
BusID "PCI:1:0:0"
Option "MonitorLayout" "LVDS, AUTO"
Option "Mode2" "1280x1024"
#Option "ForceMonitors" "LVDS, AUTO"
Option "DesktopSetup" "horizontal,reverse"
#Option "EnablePrivateBackZ" "yes"
Option "PairMode" "1280x768+1280x1024"

It seems like the creation of Xwindows (when opening a menu, or a new application, etc) is very slow too :-( This might be just an impression though.

*update* Enabling Xinerama not by adding it in xorg.conf (doesn't work, enabling Xinerama disables DRI, so Xgl won't work), but by adding "+xinerama" to the Xgl start line in my custom gdm config file, seems to work... somewhat. I get my normal desktop on my laptop monitor, but only the standard grey-like X checkerboard on the external one. I can move my mouse pointer on it though, but get the default X cursor, not my normal one. I can't drag windows to it either, they seem not to get rendered. Maybe I got to recompile some packages to get Xinerama support...
Window creation isn't "slow" anymore too :-)
Strange though:
$ xdpyinfo | grep dimensions
dimensions: 1280x768 pixels (313x181 millimeters)

*update 2* Playing around some more with aticonfig doesn't solve the issue. It's pretty strange: whenever I'm in GDM, all looks fine. Once my GNOME session starts though, the system starts to clone the 1280x768 laptop monitor to the external monitor, which doesn't look very nice (wrong resolution), instead of providing me with a bigger screen, as when GDM is running. Pretty strange!
This is what xrandr says:
$ xrandr
SZ: Pixels Physical Refresh
0 2560 x 1024 ( 684mm x 271mm ) 60
1 1280 x 1024 ( 684mm x 271mm ) 75 70 60
*2 1280 x 768 ( 684mm x 271mm ) *60
3 1024 x 768 ( 684mm x 271mm ) 75 72 70 60
(omitted last lines) Choosing another mode doesn't solve the issue though :(

<< Previous Page :: Next Page >>


Who's Online?

  • Guest Users: 135


XML Feeds

What is RSS?