Category: Computers

Watch your webcam with mplayer

A small post just to keep this command at hand:
mplayer -fps 30 -tv driver=v4l:width=640:height=480:device=/dev/video1 tv://
This allows you to watch what your webcam “sees” (provided it uses a video4linux webcam). Btw, Cheese is funny to use too!

I was also trying to find a decent Python library for video4linux but I only found outdated ones (libfg, 2003, and pyv4l, 2002). I guess I’ll have to use some C library for a small project I’ll tell you about later 😉

E-conferences

Following my previous post about an e-conference, Daneel Ariantho provided me with interesting informations …

The conference about scientific patents was part of Second Nature, (scientific journal) Nature’s home in the virtual world of Second Life. Following their description, Second Nature is home to scientific exhibitions, ongoing projects and regular events. The conference in itself was given in November 2007 but, unfortunately, nor slides nor podcast are available. In real life, if you miss a conference, you still have a copy of the slides or, at least, the abstract 😉 .

In the second part of my post, I was wondering if contacts were better in virtual worlds and if the quality standard of most “real world” scientific events was still there. But since this particular event was organized by a Closed Access journal on a semi-closed virtual world, I will wait for more events of this kind before forming an opinion on these events (current educational events in Second Life doesn’t seem to be too serious …).

E-conference about scientific patents

Conference about scientific patents

While looking for pictures related to patents, I found these interesting ones taken by Daneel Ariantho on Flickr. They depict a virtual conference about scientific patents. It could be interesting to get more information about 1) the content of this conference and 2) the kind of conferences organized in these virtual worlds. It could also be interesting to see the social aspects of these conferences (are your contact better/different in a virtual conference?) and the “quality control” (of speakers, of posters, of advertizers, …).

Bad choice for France Télévision web platform

It’s sad to see France Télévision chose a proprietary platform (MS Silverlight) to develop its web platform for video delivery … They developed this “thing” with public money; the content should at least be available to all the public eyes (even the “without Silverlight” link requires to have Windows Media Player 11 which even recent MS-Windows PCs do not have).

No silverlight

Here are some general reasons why it’s a bad idea to develop something with Silverlight:

  1. The Silverlight runtime is only available for MS-Windows and recent MacOS machines. This leaves out other operating systems (i.e. Linux, older Windows or MacOS versions, …). Even if these OSes market shares are minimal (compared to Windows XP and MacOS X), Curl and Adobe developed players for altervative platforms. For the end-user, it means (s)he will be able to keep her/his favourite computer to run your application.
  2. Javascript-enabled browsers are already available since a long time, on nearly all operating systems (e.g. Firefox is available for Linux, Windows, MacOS and xBSD). For the end-user, it means (s)he will be able to keep her/his favourite browser to run your application if you use standard technologies like AJAX, DHTML, etc.
  3. If you, as a developer, you really want to develop your web application with OpenLaszlo or Flex, the Flash player is already available on the computer of more than 95% of your potential clients. Although this is mainly due to historical reasons (Flash is available since the 1990s), I can’t see why Silverlight can win over Flash/Flex/Air since Silverlight is a competitor without added value. For the end-user, it means (s)he will most probably be able to run your Flash-based application out-of-the-box and it won’t be the case with Silverlight.
  4. From a developer point of view, writing code for Silverlight requires to download and master 4 packages: Visual Studio, Silverlight Tools for Visual Studio, Expression Blend and Deep Zoom Composer (although real web designers will probably prefer other tools than the two last ones). Compare with this: if you develop for AJAX, you might need to download and master 1 kit (your AJAX toolkit) ; developing for OpenLazslo or Flex: 1 SDK each. Moreover, all developer kits (except Silverlight) are open source, giving more durability to your developments and investments.
  5. Finally, still from a developer point of view, your Silverlight application will not be seen in any of the major search engines. No SEO possible.

The "problem with TinyURL" is (partially) solved

Thanks to the free software project lilURL and one of its implementation at ur1, the problem with TinyURL is solved. Thanks Alexandre for the info. 🙂

So now http://www.poirrier.be/~jean-etienne/ can be short (http://ur1.ca/04d) and free at the same time: free to use, and free to look at source code.

Since I’m never fully satisfied (hmm, never say never), the next step would be an implementation of some “intelligence” in these short URLs (see Udi’s post). And since I never have time (or less and less), I’m a bit sad not to have that time to code a solution (which should be quite easy).

The problem with TinyURL …

The problem with TinyURL.com is that its source code is not free. And I can’t find any other open services/projects that offers the same features (1).

I realized this when trying to add a long link in a Twitter update (2, 3). A maximum of 140 characters doesn’t allow you to add much text around. And it seems that a lot of Twitter users are using the TinyURL.com service which allows you to translate a small URL it gives you to the full, “regular” URL. For example, http://www.poirrier.be/~jean-etienne/ (37 characters) becomes http://tinyurl.com/6kq84z (25 characters).

But … TinyURL is trademarked and its terms of services explicitely tell us they may report your activity to some “agencies” … In addition to the reasons why Udi hates TinyURLs, I wonder how is stored your URLs. Well, it’s not exactly “how?” but “with which additional information?”. I guess they store your IP address, ISP and location (to be able to report your activity to your ISP and U.S. agencies) along with your submition, date & time, … Nothing is said about privacy in their page. Nothing is said either about the time they will keep your URL (what if you try to use your TinyURL in 5 months or 5 years?). And obviously, no source code available. On the other hand, if you don’t want to use the service, you are also free not to use it.

The only problem is that I can’t find proper, free/open alternatives. There are dead/unborn projects like this one at Mozdev or url(x) (no, GiganticURL is not a solution 😉 ). And there is even a PEAR service to TinyURL. Decent URL is not a solution since it’s only a variation on TinyURL (still not open/free and nothing about privacy). BURL is often cited but the only link I have is broken.

It could be nice to have a TinyURL-like service with open source/free source code and a clear overview of privacy settings (why not à-la-carte settings defined when the user submit his/her long URL?). (Note that Udi also has interesting additional ideas in his previously cited post, mainly about knowing what kind of media you’ll get with the short URL)

(1) The first sentence of this post is a kind of “executive summary”. I hope I’m not getting too old to indulge myself in this kind of thing 😉
(2) Yes, I now have a Twitter account. I don’t know the real purpose of having this kind of thing along with my own blog. Let’s see …
(3) I know, Twitter doesn’t have an open/free source code too. But open source microblogging site may become Twitter fallback.

Firefox 3.0 + Flash on a protected Windows PC

Very often, your company doesn’t allow you to install a new software on your company computer. For this purpose, Portable Apps is a very interesting website: it contains a lot of free software ready to be used, without any installation process. Moreover, it releases latest version of software very quickly. For example, 1 or 2 days after the launch of Mozilla Firefox 3.0, it was already in Portable Apps.

Most Firefox plugins (“add-ons“) can be installed in the Portable apps version of Firefox, but not all of them. The Adobe Flash plugin is one of the few ones that you can’t install without administrator rights …

Unless your company installed Firefox 2.x on your computer with the Flash plug-in. If it’s the case, you have just to copy two files from the 2.x install to the 3.0 one :

Go to your “old” Firefox plugins directory, for example: C:\Program Files\Mozilla Firefox\plugins\. Then copy these 2 files: NPSWF32.dll and NPSWF32_FlashUtil.exe to your Portable Firefox directory, like: FirefoxPortable\App\firefox\plugins\. Now re-start Firefox 3.0 … Voilà!

AEL-NG?

A few days ago, I was sad to see that the Association Electronique Libre (AEL) website was down and only replaced by two measly <html> tags. For those who didn’t know it:

The Association Electronique Libre is a belgian association protecting the fundamental rights in the information society.

The Association Electronique Libre supports the freedoms of speech, press, and association on the Internet and any electronical mediums, the right to use encryption software for private communication, the right to write software unimpeded by private monopolies, the right to access and preserve public domain and free digital information.
(from an old copy of the AEL website)

Although it was based in Belgium, the information it contained as well as the actions that were supported exceeded the small Belgian borders. The wiki was a very useful and valuable source of documents, links and comments about freedom in the electronic media. “Fortunately” we still have a 2007 version of the website on archive.org and some messages from the mailing-list were kepts on the mail-archive and open subscriber (and I will preciously keep my archives!).

Following a small exchange of e-mails with one of the main guy behind AEL, the machine hosting the AEL is simply dead (the fact the machine was dying was announced a long time ago, no one apparently reacted). I guess (or rather hope) that the data is still available on the hard disk(s).

Now what? Beside the fact we are all getting “older” with other priorities in life, how come we don’t feel more concerned about our freedom in the cyberspace? Internet liberties are still in danger [1], the Electronic Frontier Foundation website has more and more issues, a paper-media publishing house is printing comics to “educate teenage youth about an array of issues ranging from privacy, free software, security and the impact of politics on personal freedom as it relates to the use of technology”, … Are we too lazy to try to understand what’s behind Facebook, LinkedIn, Orkut, Ning and other “social networking websites“? Maybe the technological gap between these polished websites and what indivuals can do “in their garage” radically increased since the advent of so-called Web2.0, inhibiting our will to actively participate in it [2], to make it ours? Did most of us “surrender” in front of the razzle-dazzle aspects of new communication media?

The idea behind this post title (AEL – New Generation?) is simply that something should be done to bring back to life a central, hopefully community-driven website to gather information about our freedom in cyberspace …

[1] Ironically, in this post, this reference is written by the main person behind the AEL
[2] About the “creativity” of people in Web2.0 applications, we could read with interest this article from C. Jonckheere and F. Schreuer (unfortunately in French only)

Comment your code

QR codeIt doesn’t matter if you write proprietary or open source code, comments in your code are very important (somehow even more important than readability and functional correspondence to the client’s needs). This is especially true if someone else is supposed or will, one day, look at your code, re-use your code and/or build upon your code.

For example, despite the fact that this source code header explained what the whole source is doing, you can’t tell what processing is done in this paragraph:

           MOVE SPACES TO IDTCLO-L1 OF ACXB01
                          IDTCLO-L2 OF ACXB01
                          IDTCLO-L3 OF ACXB01.
           @ZOBLIG, IDTCLO OF ACXB01, IDTCLO-V OF ACXB01-V.
           @CLR1, "01", "**", IDTCLO OF ACXB01, "3", "Y", "Y", "N",, \
                  IDTCLO-V OF ACXB01-V.
           MOVE IDTCLO    OF CLR1   TO IDTCLO    OF ACXB01.
           MOVE IDTCLO-L1 OF CLR1   TO IDTCLO-L1 OF ACXB01.
           MOVE IDTCLO-L2 OF CLR1   TO IDTCLO-L2 OF ACXB01.
           MOVE IDTCLO-L3 OF CLR1   TO IDTCLO-L3 OF ACXB01.
           MOVE NUMCLO OF CLD01-01  TO NUMCLO    OF TS-INTE.
           INITIALIZE ACD0B-01.
           MOVE NUMCLO OF TS-INTE TO NUMCLO OF ACD0B-01.
           MOVE REFACE OF ACXB01   TO REFACE OF ACD0B-01.
           @READ, "1", ACD0B-01, XX.
           IF ACCESS-OK
              @ERREUR, IDTCLI-V OF ACXB01-V, "ACXX0001"
           END-IF.

This code is definitely not readable. It first uses a standard nomenclature for variables, it uses macros with a good number of unknown variables, we don’t exactly know what can cause an error while accessing the table in the last lines, etc. This is only an example ; you can find this behaviour in many other programming languages.

That’s a reason why I really like tools to auto-generate comments and documentation (like Javadoc, pydoc, etc.). The documentation is in the code and it usually doesn’t block code reading while adequately describing what a section/paragraph/function does. And the tools can generate properly formatted documentation in a lightweight format (usually HTML+CSS, not heavy MS-Word documents). One nice thing: you don’t need to send the code and the documentation for review or upgrade: just send the code and your addressee will automatically get the documentation (s/he will be able to automatically generate it). And, in 2 years, people will still understand what you wrote and they won’t need a specialist to reverse-engineer your code.

By spending a little bit of your precious time to comment your code, others will get a better understanding of what you did and your project, as a whole, will save an impressive amount of time (time that you can spend on a terrace with a refreshing drinks).

Photo: “quote” by Bonnie Peirce (CC-by-nc)

I can’t read my blog

At least from my office. Sadly true 😉 since one of the rules of my company proxy server bans all URLs with the letters “blog” inside (no blogger.com, blogspot, … websites either). Fortunately, there are a lot of web-based feed aggregators (which are not — not yet? — banned). It also blocks all URLs with the “exe” string so we are not able to visit the Belgian Post website (it uses an URL containing “outletlocator.exe”) ; I didn’t find any bypass yet.

Banned blog by ISA server

Btw, with their message, we know they use Microsoft ISA Server as a proxy …