Tag : perl

“The Thing about Volunteers and Civility” (#modernperlbooks.com)

I copy the post The Thing about Volunteers and Civility by chromatic on modernperlbooks.com. Though the text refers to aspects of the Perl community, I believe the message is more general. The formatting (numbered list, etc) is mine.

  1. The thing about volunteers is that they don’t have to do what they’re doing. If you’re getting paid to hang out in an IRC channel and answer questions all day, that’s one thing. If you’re hanging out on an IRC channel all day because you want to, that’s another.
  2. The thing about volunteers writing software is that they don’t have to do it. The same goes for volunteers writing documentation or reporting bugs or asking questions about how to use or install or configure that software.
  3. The thing about the Perl community is that almost no one gets paid solely for participating in the Perl community. Sure, you can volunteer for a while to earn the cachet and the right to apply for a TPF grant at a fraction of the going consulting rate to justify continuing to work on the unpleasant parts of a project, but you’re still effectively a volunteer.
  4. The thing about volunteers is if it’s not worth their time or energy or health or sanity or happiness to keep volunteering, they can walk away whenever they want. They have no obligation to continue to do what they do. Not even their sense of devotion or duty or guilt or community camaraderie should compel them to continue on projects that aren’t worth their investment of time, and that’s more than okay.
  5. The thing about volunteers is that you can’t force them to do anything. You can’t force them to have your priorities. You can’t force them to work to your schedule. You can’t force them to work on your project and you can’t force them to care about what you care about. They’ll do what they want to do when they want to do it and you either deal with it or you don’t.
  6. The thing about volunteers is that it’s rare to have too many and it’s far too common to have far too few. Thus healthy projects spend time and effort recruiting volunteers and keeping volunteers around and guiding the interests and energy and time of volunteers in productive ways, not only by making their projects pleasant and useful but by removing distractions and unpleasantness from their communities.
  7. The thing about volunteers is that for every one willing to take the abuse and hostility from a few people, you can’t tell how many orders of magnitude more potential volunteers find that hostility and abuse so distasteful that they refuse to consider the possibility that it’s worth their time to contribute.
  8. The thing about volunteers is that if you allow certain parts of the community to fester and to grow toxic, you’re well on your way to having fewer and fewer volunteers who grow more bitter and eventually become a tiny little cluster of angry, angry people who can’t do anything productive.
  9. The thing about volunteers is that it doesn’t have to be this way.
  1. Certain Perl IRC channels don’t have to be seething cauldrons of rage from burned out system administrators who castigate anyone who doesn’t know the secret rituals and wordings of arcane rituals to identify themselves as insiders.
  2. Certain Perl forums don’t have to devolve into arguments over whose web framework stole which idea from some other place, or whether it’s clear that anyone who does or does not use one CPAN dependency or another has parents with specific unpleasant characteristics.
  3. Certain Perl mailing lists don’t have to debate whether people who work on one version of Perl or another are hateful fools whose only goal in life is to destroy everything good and sunshiney and organic.
  4. Certain Perl blogs don’t have to have comments accusing other volunteers of being liars or thieves or people of negotiable affection because said volunteers disagree on project management styles.

I suppose it’s easier to destroy than to create, and it’s easier to prove that you’re right by demonstrating your scathing verbal wit with a keyboard, and it’s easier to believe that you’ve won an argument if you reduce the other person to a cardboard cutout of simplistic, ridiculous beliefs. It’s also easy to justify your decision to spread hostility if you can overlook the fact that the person you’re castigating is a human being with complex motivations, goals, dreams, aspirations, beliefs, and emotions.

The thing about volunteers is that they don’t owe you a thing.

If you want a Perl community full of hostile people who jump to hasty conclusions, who are willing to nitpick and debate the specific meaning of words than to understand what other people mean, and who are willing to throw wild accusations of crazy, hateful motives around, then you have an easy task. Just say nothing. Let it fester.

Me, I don’t think that’s the way to encourage a healthy community. After all, how silly is it to argue over how some other volunteer spends his or her time? Yet isn’t that what we’re doing?

Maybe if more of us speak up when we see this abuse and hostility, maybe we can discourage it. Maybe we can encourage people to try to understand and listen more, or at least to disagree politely if they must disagree. Maybe we can help people unwilling to be civil to find better hobbies than abusing other volunteers. Maybe we can make the Perl community and our IRC channels and our mailing lists and our forums and our comment sections places where potential volunteers want to participate because they know that we appreciate novices and we appreciate volunteers and we don’t all have to do the same things or want the same things or agree on the same things to treat each other with respect.

After all, we’re all trying to build great software to solve problems. Why should we borrow trouble?

Playing with Git

Git is a version control system (VCS) software that is used for source code management (SCM). There are several examples of VCS software, such as CVS and SVN. What makes Git different is that it is a distributed VCS, that is, a DVCS.

Being a DVCS, when you use Git you create fully capable local repositories that can be used for offline work. When you get the files of a repository, you actually grab the full information (this makes the initial creation of local repositories out of a remote repository slower, and the repositories are bigger).

You can install git by installing the git package. You can test it by opening a terminal window, and running

git clone git://github.com/schacon/whygitisbetter.git

The files appear in a directory called whygitisbetter. In a subdirectory called .git/,git stores all the controlling information it requires to manage the local repository. When you enter the repository directory (whygitisbetter in our case), you can issue commands that will figure out what’s going on because of the info in .git/.

With git, we create local copies of repositories by cloning. If you have used CVS or SVN, this is somewhat equivalent to the checkout command. By cloning, you create a full local repository. When you checkout with CVS or SVN, you get the latest snapshot only of the source code.

What you downloaded above is the source code for the http://www.whygitisbetterthanx.com/ website. It describes the relative advantages of git compared to other VCS and DVCS systems.

Among the different sources of documentation for git, I think one of the easiest to read is the Git Community Book. It is consise and easy to follow, and it comes with video casting (videos that show different tasks, with audio guidance).

You can create local repositories on your system. If you want to have a remote repository, you can create an account at GitHub, an attractive start-up that offers 100MB free space for your git repository. Therefore, you can host your pet project on github quite easily.

GitHub combines source code management with social networking, no matter how strange that may look like. It comes with tools that allows to maintain your own copies of repositories (for example, from other github users), and helps with the communication. For example, if I create my own copy of the whygitisbetter repository and add something nice to the book, I can send a pull request (with the click of a button) to the maintainer to grab my changes!

If you have already used another SCM tool (non-distributed), it takes some time to get used to the new way of git. It is a good skill to have, and the effort should pay off quickly. There is a SVN to Git crash course available.

If you have never used an SCM, it is cool to go for git. There is nothing to unlearn, and you will get a new skill.

Git is used for the developement of the Linux kernel, the Perl language, Ruby On Rails, and others.

Éńĥãǹčīṅǧ·ẗḧë·ẃṛīťıñĝ·ṩụṗṗọṙẗ·ıń·ǦŤḰ+

These are the presentation slides of my talk on improving the writing support in GTK+. It relates to several posts I have in my other (now not used anymore) blog at http://blogs.gnome.org/simos/2008/07/23/guadec-2008-presentation-slides/.

Enhancing the writing support in GTK+

Note: The title may not appear properly because I use a fancy effect that does not support the full range of Unicode characters. It’s a drawback of being trendy. The title says “Éńĥãǹčīṅǧ·ẗḧë·ẃṛīťıñĝ·ṩụṗṗọṙẗ·ıń·ǦŤḰ+”.

Multimedia support in Ubuntu Linux 6.06

With Ubuntu Linux 6.06, it is much clear how to install those codecs in order to get broad multimedia file support.

In Ubuntu, the multimedia infrastructure is handled by GStreamer; you install GStreamer plugins and any application that uses GStreamer can immediately benefit from the new codec support.

A typical installation of Ubuntu will bring in the free and open-source codecs by default. This includes the base gstreamer plugins package, gstreamer0.10-plugins-base that covers

  1. /usr/lib/gstreamer-0.10/libgstadder.so
  2. /usr/lib/gstreamer-0.10/libgstaudioconvert.so
  3. /usr/lib/gstreamer-0.10/libgstaudiorate.so
  4. /usr/lib/gstreamer-0.10/libgstaudioresample.so
  5. /usr/lib/gstreamer-0.10/libgstaudiotestsrc.so
  6. /usr/lib/gstreamer-0.10/libgstcdparanoia.so
  7. /usr/lib/gstreamer-0.10/libgstdecodebin.so
  8. /usr/lib/gstreamer-0.10/libgstffmpegcolorspace.so
  9. /usr/lib/gstreamer-0.10/libgstogg.so
  10. /usr/lib/gstreamer-0.10/libgstplaybin.so
  11. /usr/lib/gstreamer-0.10/libgstsubparse.so
  12. /usr/lib/gstreamer-0.10/libgsttcp.so
  13. /usr/lib/gstreamer-0.10/libgsttheora.so
  14. /usr/lib/gstreamer-0.10/libgsttypefindfunctions.so
  15. /usr/lib/gstreamer-0.10/libgstvideo4linux.so
  16. /usr/lib/gstreamer-0.10/libgstvideorate.so
  17. /usr/lib/gstreamer-0.10/libgstvideoscale.so
  18. /usr/lib/gstreamer-0.10/libgstvideotestsrc.so
  19. /usr/lib/gstreamer-0.10/libgstvolume.so
  20. /usr/lib/gstreamer-0.10/libgstvorbis.so

With a properly encoded multimedia file, you can play music or video with subtitles. Such good codecs are Ogg, Vorbis and Theora. You can also rip CDs; cdparanoia is also there.
By default you also get the good package, gstreamer0.10-plugins-good
It contains

  1. /usr/lib/gstreamer-0.10/libgst1394.so
  2. /usr/lib/gstreamer-0.10/libgstaasink.so
  3. /usr/lib/gstreamer-0.10/libgstalaw.so
  4. /usr/lib/gstreamer-0.10/libgstalpha.so
  5. /usr/lib/gstreamer-0.10/libgstapetag.so
  6. /usr/lib/gstreamer-0.10/libgstavi.so
  7. /usr/lib/gstreamer-0.10/libgstautodetect.so
  8. /usr/lib/gstreamer-0.10/libgstcacasink.so
  9. /usr/lib/gstreamer-0.10/libgstcdio.so
  10. /usr/lib/gstreamer-0.10/libgsteffectv.so
  11. /usr/lib/gstreamer-0.10/libgstgoom.so
  12. /usr/lib/gstreamer-0.10/libgstid3demux.so
  13. /usr/lib/gstreamer-0.10/libgstlevel.so
  14. /usr/lib/gstreamer-0.10/libgstefence.so
  15. /usr/lib/gstreamer-0.10/libgstmulaw.so
  16. /usr/lib/gstreamer-0.10/libgstossaudio.so
  17. /usr/lib/gstreamer-0.10/libgstrtp.so
  18. /usr/lib/gstreamer-0.10/libgstrtsp.so
  19. /usr/lib/gstreamer-0.10/libgstsmpte.so
  20. /usr/lib/gstreamer-0.10/libgsttaglib.so
  21. /usr/lib/gstreamer-0.10/libgstudp.so
  22. /usr/lib/gstreamer-0.10/libgstvideobox.so
  23. /usr/lib/gstreamer-0.10/libgstvideoflip.so
  24. /usr/lib/gstreamer-0.10/libgstwavenc.so
  25. /usr/lib/gstreamer-0.10/libgstwavparse.so
  26. /usr/lib/gstreamer-0.10/libgstauparse.so
  27. /usr/lib/gstreamer-0.10/libgstdebug.so
  28. /usr/lib/gstreamer-0.10/libgstnavigationtest.so
  29. /usr/lib/gstreamer-0.10/libgstalphacolor.so
  30. /usr/lib/gstreamer-0.10/libgstcairo.so
  31. /usr/lib/gstreamer-0.10/libgstflxdec.so
  32. /usr/lib/gstreamer-0.10/libgstmatroska.so
  33. /usr/lib/gstreamer-0.10/libgstvideomixer.so
  34. /usr/lib/gstreamer-0.10/libgstcutter.so
  35. /usr/lib/gstreamer-0.10/libgstmultipart.so
  36. /usr/lib/gstreamer-0.10/libgstflac.so
  37. /usr/lib/gstreamer-0.10/libgstjpeg.so
  38. /usr/lib/gstreamer-0.10/libgstpng.so
  39. /usr/lib/gstreamer-0.10/libgstspeex.so
  40. /usr/lib/gstreamer-0.10/libgstgconfelements.so
  41. /usr/lib/gstreamer-0.10/libgstshout2.so
  42. /usr/lib/gstreamer-0.10/libgstvideobalance.so
  43. /usr/lib/gstreamer-0.10/libgsticydemux.so
  44. /usr/lib/gstreamer-0.10/libgstximagesrc.so
  45. /usr/lib/gstreamer-0.10/libgstannodex.so
  46. /usr/lib/gstreamer-0.10/libgstgdkpixbuf.so
  47. /usr/lib/gstreamer-0.10/libgsthalelements.so
  48. /usr/lib/gstreamer-0.10/libgstdv.so

This includes generic AVI support, access to digital video and Firewire devices, visualisers, the Matroska codec, access to shoutcast servers, the speex audio codec, the flac codec and many more.

At this point, you can install Pitivi, a gstreamer-enabled video editor written in Python that helps you create your own movie. Make sure you install gstreamer0.10-gnonlin which enables non-linear editing in gstreamer.

Up to here you got free and open-source software.

You can continue with more codecs by installing the package gstreamer0.10-plugins-ugly. This package is not part of the official Ubuntu distribution; you need to enable the Universe repository. Use System/Administration/Synaptic Package Manager to install these additional packages.
Ugly are the plugins and codecs that may have distribution problems in some countries.

Ugly includes

  1. /usr/lib/gstreamer-0.10/libgsta52dec.so
  2. /usr/lib/gstreamer-0.10/libgstasf.so
  3. /usr/lib/gstreamer-0.10/libgstdvdlpcmdec.so
  4. /usr/lib/gstreamer-0.10/libgstdvdread.so
  5. /usr/lib/gstreamer-0.10/libgstdvdsub.so
  6. /usr/lib/gstreamer-0.10/libgstiec958.so
  7. /usr/lib/gstreamer-0.10/libgstmad.so
  8. /usr/lib/gstreamer-0.10/libgstmpeg2dec.so
  9. /usr/lib/gstreamer-0.10/libgstmpegaudioparse.so
  10. /usr/lib/gstreamer-0.10/libgstmpegstream.so
  11. /usr/lib/gstreamer-0.10/libgstrmdemux.so
  12. /usr/lib/gstreamer-0.10/libgstsid.so

This package will bring in, among others, DVD playback and subtitle support, ASF file support, MP3 support (MAD package) and MPEG2 video playback.
You can also get MP3 support if you install the gstreamer0.10-fluendo-mp3 plugin which is available from Universe as well. This package is probably free to use in any country thanks to the efforts of the Fluendo team.

It appears that if you install ugly, it is good to install gstreamer0.10-ffmpeg so that you get support for

FFmpeg plugin for GStreamer

This GStreamer plugin supports a large number of audio and video compression
formats through the use of the FFmpeg library. The plugin contains GStreamer
elements for encoding 40+ formats (MPEG, DivX, MPEG4, AC3, DV, …), decoding
90+ formats
(AVI, MPEG, OGG, Matroska, ASF, …), demuxing 30+ formats, and
colorspace conversion.

Finally, there is a package gstreamer0.10-plugins-bad with plugins of potentially suboptimal quality. It includes

  1. /usr/lib/gstreamer-0.10/libgstbz2.so
  2. /usr/lib/gstreamer-0.10/libgstcdxaparse.so
  3. /usr/lib/gstreamer-0.10/libgstdtsdec.so
  4. /usr/lib/gstreamer-0.10/libgstfreeze.so
  5. /usr/lib/gstreamer-0.10/libgstgsm.so
  6. /usr/lib/gstreamer-0.10/libgstmms.so
  7. /usr/lib/gstreamer-0.10/libgstmodplug.so
  8. /usr/lib/gstreamer-0.10/libgstmusepack.so
  9. /usr/lib/gstreamer-0.10/libgstqtdemux.so
  10. /usr/lib/gstreamer-0.10/libgsttrm.so
  11. /usr/lib/gstreamer-0.10/libgstspeed.so
  12. /usr/lib/gstreamer-0.10/libgstswfdec.so
  13. /usr/lib/gstreamer-0.10/libgsttta.so
  14. /usr/lib/gstreamer-0.10/libgstvideo4linux2.so
  15. /usr/lib/gstreamer-0.10/libgstwavpack.so
  16. /usr/lib/gstreamer-0.10/libgstxingheader.so
  17. /usr/lib/gstreamer-0.10/libgstneonhttpsrc.so

With bad you get GSM audio codec support, MMS support, QT playback support for some formats, Flash (SWF) playing support, Video4Linux2 support, MUSEPACK support and a few more.

Taxis and security

It is quite encouraging that citizens taxed in Greece are able to file their tax reports through the Web, at the Taxis Website. Sadly, it has been reported that standard-compliant Web browsers are not supported by the Taxis Website. If you are affected, do complain about it! If you file taxes and you are affected, file a report.
Let’s see some more issues.

A. The main login page is not configured properly with regards to the autocomplete feature found in modern browsers; as is, your username and password get saved by default in your browser. If your computer is stolen or a trojan horse gets installed on your computer, your tax details are gone! 🙁

The Web developer should modify the HTML code from

< span class=“textblue2″>< b>user name: b>span>
< input type=“text” name=“username” maxlength=“40″ size=“15″ value=“testing”>
< P>< span class=“textblue2″>< B>password:B>span>
< input type=“password” name=“password” maxlength=“40″ size=“17″ value=“testing”>

to

< span class=“textblue2″>< b>user name: b>span>
< input type=“text” name=“username” autocomplete=“off” maxlength=“40″...
< P>< span class=“textblue2″>< B>password:B>span>
< input type=“password” name=“password” autocomplete=“off” maxlength=“40″...

B. The page http://webtax.gsis.gr/taxisnet/login.do claims that users are protected by Verisign (SSL/TLS). Quite sadly, the intent has probably been that users will connect through the proper URL, at https://webtax.gsis.gr/taxisnet/login.do. Dear Taxis, you should place an HTTP redirection to move all users to the SSL/TLS-protected URL. You are in breach of your Verisign license!

The image “https://i0.wp.com/static.flickr.com/55/110197352_d60be48ab3_o.png” cannot be displayed, because it contains errors.

I will follow on the above report here.

Actually, it would be much better if the web server is SSL/TLS only (no plain HTTP version available). The web server should be configured at any access to a URL under http://webtax.gsis.gr/… should redirect to https://webtax.gsis.gr/.
C. What is worst of all, the website provides content in the 8859-7 8-bit legacy encoding. It is much better to convert to Unicode and UTF-8. I do not know if users have to write text in Greek for their tax forms…
I don’t file taxes so I am not sure if there are more issues once you logon.

Update: The http://webtax.gsis.gr/taxisnet/login.do URL does not work anymore (it forwards to another Website which is down). I did not hear back from Verisign; it’s possible that the two events are linked together.

Ελληνικά στην αλληλογραφία, μέρος πρώτο

Πρέπει να λαμβάνετε γράμματα / ανακοινώσεις από μερικούς δικτυακούς τόπους όπου η κωδικοποίηση για τα ελληνικά δεν είναι σωστή, είτε στο σώμα του μηνύματος, είτε στην κεφαλίδα (From: “Ανακοίνωση” ).

Συγκεκριμένα, δεν καθορίζεται η κωδικοποίηση οπότε είναι θέμα εξ ορισμού ρυθμίσεων του παραλήπτη για να δει το αποτέλεσμα.

Ας δούμε πως μπορείτε μέσα από μια εφαρμογή PHP να στείλετε αλληλογραφία με ελληνικά. Το ίδιο μπορεί να γίνει και από άλλες γλώσσες, όπως Perl και Python.

<?php
include(‘Mail.php’);
include(‘Mail/mime.php’);

$from = “From: \”” . mb_encode_mimeheader(‘Όνομα Αποστολέα’) . “\” < αποστολέας στο gmail τελεία com>“;
$to = mb_encode_mimeheader(‘Όνομα Παραλήπτη’) . ” < παραλήπτης στο gmail τελεία com>“;
$subject = ‘Θέμα γράμματος’;
$body = ‘Περιεχόμενο του γράμματος.’;

mb_send_mail($to, $subject, $body, $from);
?>

Το γράμμα που θα παραχθεί θα μοιάζει με

Από: Όνομα Αποστολέα < αποστολέας στο gmail τελεία com>
Προς: Όνομα Παραλήπτη < παραλήπτης στο gmail τελεία com>
Θέμα: Θέμα γράμματος

Περιεχόμενο του γράμματος.

Απαιτεί την εγκατάσταση του πακέτου php-mbstring που το έχουν όλες οι καλές διανομές Linux. Διαφορετικά είναι δυνατόν
να έχετε το ίδιο αποτέλεσμα αλλά θα κάνετε τα παραπάνω χειρωνακτικά.

Ακόμα, πρέπει να ρυθμίσετε το /etc/php.ini με τα παρακάτω:

[mbstring]
; language for internal character representation.
; Neutral σημαίνει Unicode
mbstring.language = Neutral

; internal/script encoding.
; Some encoding cannot work as internal encoding.
; (e.g. SJIS, BIG5, ISO-2022-*)
mbstring.internal_encoding = UTF-8

; http input encoding.
mbstring.http_input = UTF-8

; http output encoding. mb_output_handler must be
; registered as output buffer to function
mbstring.http_output = UTF-8

; enable automatic encoding translation accoding to
; mbstring.internal_encoding setting. Input chars are
; converted to internal encoding by setting this to On.
; Note: Do _not_ use automatic encoding translation for
; portable libs/applications.
mbstring.encoding_translation = On

; substitute_character used when character cannot be converted
; one from another
; σημαίνει ότι στην μετατροπή αν κάτι πάει στραβά, θα εκτυπώσει των κωδικό U+xxxx του χαρακτήρα.
mbstring.substitute_character = long;

Αν είστε χρήστης της εφαρμογής phplist, ενημερώστε τη σελίδα αυτή.

Σημείωση: Όλα τα παραπάνω είναι σε κωδικοποίηση utf-8 (Unicode).

Kinja και πρόβλημα ελληνικών (utf-8)

Όσοι είχατε δοκιμάσει το Kinja.com θα παρατηρήσατε ότι δεν μπορούσε να εμφανίσει τα ελληνικά σωστά. Ήταν πρόβλημα στο τρόπο χειρισμού του κειμένου από το λογισμικό της εταιρίας. Τώρα γυρίσανε σε Unicode (utf-8) και το πρόβλημα λύθηκε.

Ακολουθεί η απάντηση που έλαβα:

I'm sorry it took such a long time, but we finally have database/driver 
support for utf-8 & other encodings.  All new posts added to Kinja
should display properly.  However, old posts may not.  Thanks for your 
patience.

Ηθικό δίδαγμα: Αν κάτι δε δουλεύει, πείτε το.

Ηθικό δίδαγμα (2): Προσπεράστε το iso-8859-x, βάλτε utf-8.

Tip (άσχετο από Kinja): Είναι πολύ εύκολο να μετατρέψεις ένα δικτυακό τόπο από iso-8859-7 σε utf-8, ακόμα και αν έχει CMS με βάση δεδομένων…