All posts by Ala' Ibrahim

My Name is Ala'a, I'm a Jordanian citizen, and I live there too. I'm a Senior Web Developer in a very known company,I have hobbies, other than coding :P , like most of the people, I'm a Bassist, which means I play Bass Guitar, also I admire walking, it's my ultimate hobby. If you want to know more about me you can take a look at my Blog.

Ternary Computers

If you have been following me on twitter, you would notice that I came interested in this topic very recently.
Well, it started as we were discussing performance, and Moore’s law. So according to this law, computers will get more performance in the same size, until something around year 2025 or something, when it would be impossible to add more transistors in the same space.

So for this to happen, computers, and processors would need to change the way they are working, maybe a biological computer would appear, or maybe a Ternary Computer.

So we started to imagine how things would work out if the world needed to upgrade to Ternary Computers, where data wouldn’t be represented in 1 and 0, it would be more like 1,0,-1 or 0,1,2, at first thinking of the logic was confusing, as there would no longer be true and false, but another state would be added. After doing some research, I started to understand how things would be done, and at some point, I thought it would be more logical than binary.

Also, the interesting part is, that such a computer was built before, and it was called Setun, and it was in USSR. And it did actually have better performance for cost than the regular binary computers. As in 1965 when they halted the production of it, the binary computer who matched the performance, costed 2.5 more than Setun.

Now just imagine, what if the production of this computer wasn’t halted, and it was accepted as the ultimate processing architecture, who much more advanced we would be, processors are cheaper, and preforms better.

Now let’s imagine, if we started to implement such computers, we would need a totally new hardware, and software. and The flip-flop-flaps would rule :). Thus the commercial interest in this would be very low. who would want a computer that doesn’t work with all your cool hardware laying around, and more, none of your applications would work on. Although I’m not sure how the regular networking protocols would work with such device. The whole world is built on 1s and 0s, and 8-bit bytes, how would it handle 6-trit tryte (which can hold the same values of up to ~9.5 bits).

I would think a good place for such a technology to shine is embedded systems, Imagine your car running such system. (Although your CDs would need another system).

I think at one point, we will have to deal with such an improvement.

Mp3 to Ogg converter

For some time, I needed to convert a big number of files from mp3 to ogg format, as I didn’t see any loss of quality with the ogg format, also it need less space.

The problem was that I want to keep my id3 tags, rewriting them would be a pain in the a**. I searched the web for free tools to do that, but I couldn’t find any, maybe I didn’t look enough. So I had to implement it myself.

Also, as I’m learning ruby, I thought it would be a good idea to use it for the script.

The tools I needed to do this, were mplayer, id3tool, and oggenc (vorbis-tools). Also in order to utilize my quad-core processor, I built it in a multi-threaded way (not so much, but it works :-)).

Now, I noticed that oggenc takes a lot of time, more than mplayer, so it was loading my tmp directory, so I made the mplayer thread wait when oggenc has 20 or more in it’s queue to process. Also, for more utilization, I put 3 threads for the oggenc to process.

I think that the script can use some improvements, feel free to post your feedback.

The script is available at git-hub at http://github.com/alaaibrahim/mp3toogg

Enjoy