tHog

FAQ

General computing

  1. What is the difference between bandwidth and data-transfer capacity?
    See here.
  2. Why do you use the mouse with your left hand, even when you're right handed?
    Let's start with a basic premise — this might not hold for you, in which case you could skip everything except the last paragraph.

    You have two hands, and you can use them simultaneously to do a number of things more efficiently and easily than using them separately. The premise is that you want to use the keyboard and the mouse together at the same time.

    • Your right hand is more dexterous (pun intended) than the left. With only one hand on the keyboard, it's better to choose the right hand.
    • Another reason for choosing the right keyboarding hand is the position of control keys like arrows. They are on the right edge of the main keyboard section, so they are readily available, and the right hand is already used to them.
    • Lastly, with most keyboards the main typing space is biased to the left of the keyboard, due to the arrow keys and the number pad. With the mouse on the left side, it is closer to your hands, which reduces the time and strain to reach it.

    It does take some practice to get used to this. For precision work like drawing, it can be useful to switch to your more dexterous hand temporarily. So it really depends on what you do with the computer: the right hand gets the more demanding work in any case.

Programming

  1. What's so great about Python's whitespace requirement? It feels really awkward and troublesome!

    While it boils down to personal preferences, there is some very good reasoning behind that design choice.

    Most people indent their code even when it's not required by the language. For humans it is easier to distinguish code blocks by their bulk appearance, whereas brackets are easier to parse by the compiler. The Python way can be viewed from multiple angles:

    • People use both brackets and indentation to delimit code blocks. This is redundancy and as such, should be avoided.
    • Python is designed to work for humans, not the other way around. Humans can easily perceive the bulk indentation, so it is a natural choice for a block delimiter in the language as well.
    • These two points result in faster, more intuitive programming.

    The usual problem with whitespace sensitive languages is, when you mess up the indentation in a way that's not evident in your editor: for instance, use the tab character mixed with spaces. They look different to the interpreter, and it's a pain to debug. The solution is, of course, to be consistent with your editor and programming style, it's good for your work in general. Plus, it's also quite easy to lose a bracket in nested environments.

GNU/Linux software

  1. How do you view DivX and other movies in fullscreen on your slow systems?

    By picking the right software :-)

    • MPlayer: This is only distributed in source form, which is a Good Thing! The ./configure script carefully probes your system and the program will be compiled with very good optimizations. MMX, 3DNow, SSE and the like are extensively used. This program is in constant development so be prepared to RTFM.
    • FFMPEG libraries for the above. This includes an open-source DivX codec which is much faster than the closed options. It will be optimized along with the rest of MPlayer.
    • XFree86 with XVideo, OpenGL and/or DGA extensions on a suitable graphics card. The first two give hardware scaling which leaves more oomph for the decoding on the CPU.
    • A decent compiler, i.e. latest stable GCC.

    Quick guide to get it work:

    • Upgrade your GCC, binutils and XFree86 if necessary. Remember to install XFree86-devel packages. Run xvinfo and/or dga to see if the extensions work - they might only run in certain modes.
    • Download and unpack MPlayer and ffmpeg. Copy a section of the latter into the MPlayer tree:
      cp -rf ffmpeg/libavcodec MPlayer/
    • In the MPlayer directory: ./configure; make
      Test it:./mplayer -vo xv somefilm.avi
      and if it works, get root and make install
    • Read The Fabulous MPlayer/DOCS/documentation.html for config options etc.

    Hints and notes:

    • XVideo is faster than OpenGL. It accelerates colorspace conversion in addition to scaling.
    • If your card and X don't have XV or DGA, try the VESA driver. You can 'scale' the image economically by choosing a low-res mode. Of course the quality is not as good as that of decent interpolative scalers. I've noticed I have to use a framebuffer console and kill X, otherwise things mess up when exiting mplayer; YMMV and this may be fixed already.
    • The order to try video modes is XV, OpenGL, DGA (possibly also sdl:dga). I haven't tried the others very much.
    • DGA is best if you can switch resolutions quite freely; that way MPlayer will choose the best-fit resolution, and not need any scaling.
    • Use remote cvs to get the sources; it's easy to update them later just by saying cvs update -dP in the main directories. Perhaps use a script to update both packages and copy the libavcodec.

Finnish stuff

  1. Miksi viesteistäsi puuttuvat usein skandiääkköset?
    Koneessani on brittinäppäimistö. Minulla on kaksikin ratkaisua skandien kirjoittamiseen, mutta niissä on omat ongelmansa:
    • Olen asetellut tietyt näppäinyhdistelmät (käyttiksessä, ei ohjelmasidonnainen) joilla saan ÄÖäö:t tarvittaessa. Pidemmän päälle se ei ole kätevää, mutta jos täytyy esim. sanoa "Näin Celineä eilen illalla" niin väärinkäsitykset voi välttää yksittäisellä ääkkösellä vaikka tekstin muuten kirjoittaisikin ilman niitä.
    • Skandinaavisen näppiskartan saan vaihdettua vaikka lennossa, mutta brittinäppikseen tottuneena tuleekin ongelmia välimerkkien kanssa.
  2. Miksi sitten käytät brittinäppistä?
    Asumisella Britanniassa oli oma osuutensa, mutta vaihdon suoritin vasta kun aloin koodata vakavissani (siis muutenkin kuin omaksi huviksi/tarpeeksi).

    Välimerkit tulevat brittiläisellä paljon järkevämmin, esim. [/\#;] ovat omilla näppäimillään, ja {<>?|:} shiftin kanssa (jenkkinäppiksellä lähes samoin). Koodaus ja tekninen kirjoittaminen on paljon luontevampaa kuin jollain Alt-Grrrrrr!-sormiakrobatialla. Oikeastaan ihmettelen koko skandinäppistä, koska ääkkösten lisääminen pitäisi onnistua paljon pienemmillä muutoksilla, nykymuodossaan se on kuin salaliitto koodaajia vastaan.

    See also my writeup about the Finnish keyboard layout


Risto A. Paju