Tuesday, February 26, 2013

Experiment: Durata de viata a becurilor (III)

Se pare ca becul proaspat schimbat a crapat repede. Azi adica!

Schimbat cu Daniela deLux candle 40W clear.

O sa incerc sa fac o baza de date.

Sunday, February 24, 2013

Experiment: Durata de viata a becurilor (II)

24 Februarie 2013: am schimbat un bec de la hota (becul din partea stanga).

Modelul noului bec: Bec hota, 40W, marca Hepol luat de prin Dedeman.

Am incercat si sa pun un bec normal la hota si s-a dus rapid. Deci e clar mai bine cu becuri speciale de hota.

2 inlocuiri in 2 luni, nu-i rau.

Monday, February 18, 2013

Xming replacement/alternative: VcXsrv

Lately I discovered that some software I used to run X applications on Windoze converted from open-source to quasi non-open-source software. It's about Xming whose latest free version is almost 6 years old. More to this they state on their commercial website (you'll find it, I won't make them too much publicity) that you need a "donor password" in order to download the latest versions of Xming. Ok, I understand, but fuck you too!

Luckily some people started a new project called VcXsrv which seems to be a good alternative to Xming.

So far it hasn't failed on me, so I think is a good enough free X server to be used on Windoze platforms.

Thursday, February 14, 2013

Using meld under Windows with Tortoise HG (Mercurial)

Because meld (http://meldmerge.org/) is written in an interpreted language there may be some issues when trying to integrate it into mercurial.

Step 1
Go to this page: https://live.gnome.org/Meld/Windows and
a) install Python 2.7 if you don't have it
b) install PyGTK with PyGtkSourceView (for syntax highlighting)
c) download the meld archive (from this page or from http://meldmerge.org/)

The problem is that MELD_DIR\bin\meld is not recognized as an executable. To make it work with tortoise hg you need to do some voodoo trick like this one (source was this web site):


[extdiff] 
cmd.meld = C:\Program Files\Python27\pythonw.exe
opts.meld = \"c:\\Program Files\\Meld\\bin\\meld\"


To avoid that hack over there, which actually calls the interpreter, python, with the meld script as argument you can rename meld to meld.py.

Since python is installed meld.py is seen as an executable by windows (you double click on it and it runs). So the line before can be replaced by:


[extdiff] 
cmd.meld = c:\Program Files\Meld\bin\meld.py


In Linux you don't have this problem since meld has the executable bit set and this avoids all issues; of course you need to have python installed, which is a no brainer regardless of the Linux distribution.


Yeap ... Windows requires sacrifices.

Sunday, January 27, 2013

Want to learn a new language?

Guide for the impatient:

Go to: http://mymemory.translated.net
Learn something, translate, start understanding, document yourself.

Programmers, you have an API which is *free of charge* compared to others.

===================

Probably you remember how you learned your first foreign language. You got a book, you read stuff from it, you memorized words, expressions, grammar rules etc.

After that the process started to flow normally, you engage in a conversation, learn other words, expressions etc.

It was a pretty selfish way of learning it, wasn't it? I mean everything that you learnt stayed with you, and things you've forgotten will usually be forgotten.

I believe that right now you can learn it in a modern way, leaving some contribution so that others and even you can benefit from it.

It's not unrealistic!

And from my experience I can tell you that there a lot to be learn from this experience.

I will offer, as an example, my experience as a Wikipedia contributor on some technical articles. I knew some things about what I should write but contributing implies:
  • extensive documentation from different sources which in the end is beneficial both for you and for the universal encyclopedia
  • a good explanation of the process
  • a deep understanding of the subject
The main question that people ask themselves is why bother? what do I gain from this?
  • You get feedback, which is by far the most important thing that's missing from most of our learning activities!
  • You compare your information with others
  • You'll be possibly defending your opinion by giving more arguments, which is again beneficial
Another similar example could be openstreetmap.

So go on an contribute to http://mymemory.translated.net

Friday, January 25, 2013

Zapada jucausa

A fost perfect. Da' perfect!

Nici prea multa zapada sa te afunzi in ea dar nici prea putina sa dai de asfalt.

Bicicleta a facut drifturi nemaipomenite...

Sunday, January 13, 2013

Financial crisis in C programming language

for(;;) // main execution loop
{
    mem = malloc(needed_memory);
    if (NULL == mem)
    {
         // this should never happen!

         // but guess what? It does... from time to time.
         exit(EXIT_FAILURE);
    }
    .......
}

And the solution is to restart the program over and over again.


Sounds familiar?