Posted by & filed under free software, linux, programacion.

In these few years since I am at college I had to use several programming languages from several paradigms such as Pascal, C, Python, Smalltalk, Java, Bash (not strictly a language though). Each of one had shown me Its charm and potential, however one of them was above the rest. As the title predicts, I’m talking about Python.

Why  Python?

When I had to start using it my only previous languages were Pascal and C. For those who know, they are pretty square and capricious, structured and strongly static typed. What personally pushes me to code is the what if? I used to answer the question within a few code lines. When using Pascal & C I generally used Geany and fpc/gcc by terminal and then running the executable.

Python opened a whole new world of possibilities, by having a live interpreter in the terminal the process was by far less time demanding. Leaving aside the anecdotal, lets cut to the interesting part.

As an overview Python is a dynamic typed language, multiparadigmatic (used for structured, objects and other paradigms), high level, with several data structures implemented by default and garbage collector. Its philosophy aims towards code clarity and simplicity.

Read more »

Posted by & filed under ciencia.

It is likely you have someday wondered why an MP3 song’s size its just 4 megabytes, when a commercial music CD only have few songs making it file size approximately of 30 MB. The answer to this question is quite simple. Commercial CDs use a high quality uncompressed audio format, while MP3 is a compressed format with similar quality.

 What is MP3?

MP3 stands for ‘MPEG-1 Audio Layer 3″ which is a encoding format using a lossy data compression algorithm, this encoding format final audio contains much less information (11 times aprox) than the original without compromising it quality (at least not much). How is this possible? Easy, it takes advantage of the human ear flaws.

  • Hearing Range: Human ear is capable of hearing frequencies between 16 and 20,000 Hz, the remaining frequencies can be omitted.
  • Mask Effect: When having similar frequencies signals, we only hear the one with highest volume; lower ones can be omitted.
  • Stereo Redundancy: Our ear can’t distinguish the direction of certain frequencies, so we can delete one channel.
By taking advantage of all this deficiencies, we can compress an audio file without compromising its quality and making it more portable.