jay-pinkman
i think duck typing is retarded.
although sometimes it is regarded
as an elegant solution
to your code base evolution
don't let simplicity of use
and the surrounding hype confuse
your inner paranoid coder
who wants to keep the code in order.
don't let your laziness corrupt
your bits and bytes and interrupt
execution of your program.
type annotations do no harm,
but add perfection to the scene.
without'em source code looks obscene.
so don't be shy to add some strictness,
let the compiler check the fitness
of your fondly written code.
and to conclude this episode
i'd like to say it to the masses:
let compilers save your asses!what i can't stand is when an app that's only supposed to display image files depends on a whole lot of other completely unrelated components exposed via DBus and buried into some desktop so deeply that you need to install a huge part of that desktop just in order to make that little app happy.
what the hell is wrong with 'do one thing and do it well'? i don't need 'less integration points' - i need integration implemented on a higher, not lower level of abstraction. let me clarify this. let's suppose you want your image viewer to add paths to recently viewed pics to some database and also let you post them to your twitter account. you can write a viewer that depends on zeitgeist for storing paths and on some other funky DBus interface to work with twitter. you'll probably end up with a program that works in Ubuntu but not in another environment that doesn't provide zeitgeist or that funky twitter interface or DBus. but you could go another way:
1. write a program that only displays images passed to it as command-line arguments 2. write a wrapper that passes paths to zeitgeist 3. write a twitter app that handles posting
now your viewer works on systems with no DBus - good. the wrapper can be extended to handle any program - when the user selects a file it passes the path to that file to zeitgeist and invokes the program registered to handle files of that type. to post your pics to twitter you could write a program that displays a form for posting and uses your viewer (or any other program registered for image/png|jpg|etc) to display a preview on it. anyway just viewing and just posting are different actions and you don't need those mixed up. if while viewing an image you suddenly decide to post it you could close the viewer and open the app for posting - the path to the image file (recent file) can be read from zeitgeist. you can even integrate the 'recent documents' thing into the zeitgeist wrapper. or use some other approach to streamline things.
that's the unix way and that's how DEs could implement their reach interfaces. this would make it easy to integrate programs into desktops and preserve their 'freedom'. but DEs guys decided it's much better to trap apps into their DEs. i see it as a failure to introduce proper abstractions.
> I've no love for Ubuntu, but claiming that you cannot easily (okay - define that) learn its ways and how to fix or customize it yourself? I think you should reconsider that part..
man, just stick with Arch for a while:) you'll know what i'm talking about. system configuration via simple plain text files, simple daemon management, nothing is forced on you, if you edit some configuration file there's little chance that some gui (or non-gui) tool will mess with that file without warning you... well, let's just leave it at that. now i'll go get some sleep. no, wait! one more thing:
i gave up trying to manage any system-level stuff the way i want. i don't care anymore how things are managed underthehood in Ubuntu, Fedora, OpenSUSE, etc. i just stick with my development tools that work everywhere and try not to write programs that depend on DBus interfaces (except hardware-related ones). for all the rest i just use what's provided by the distro.
but the thing that touched me is that there are standards like POSIX for the cli world and there are standards like DBus for the gui world and lack of any sane standards for both of them. POSIX-based software and DBus-based software took quite different paths in their evolution. so different that they look now like creatures from two different universes. it's always nice to see how devs from GNOME and KDE develop standards that help interoperability. i wish someone would look into interoperability between the gui world and the cli world too. i originally moved to Arch from Ubuntu because the latter looked quite noisy to me - too many desktop components that i never used, to many system resources waisted on activities that i consider useless or harmful. i've created a very minimalistic environment built around some cli tools and a few very simple gui components that didn't depend on a whole desktop. and it worked quite well until it started to fall apart - every program that didn't belong to the cli world tended to either crash or work with some limitations. mostly because of the problems with DBus. most of these problems were caused by differences between the actual DBus interfaces provided and what those programs were expecting to see. and of course there were some missing components that depended on a ton of other components from either GNOME or KDE. so now i'm back to square one - i'm back on Ubuntu and i feel like an alien. most things indeed work out of the box but it's not a linux that i understand, can easily learn, fix and customize myself.