Conway’s Game of Life

So I recently learned about Conway’s Game of Life, which as far as I can tell, is some type of automation algorithm that aims to simulate a two dimensional universe in which space is divided into small crates, and life is represented by rectangular cells that fill those crates and that can die or reproduce in a way that keeps the system going until it reaches some type of equilibrium. The algorithm is fairly simple as you can see in the Wikipedia article and the rules are easy to implement.

I might try to implement it in a way that can make it work in a 3 dimensional universe, but that will have to wait until I return from visiting my parents.


Linux foundation works with edX and other MOOC partners



Yay! Ever wanted to learn more about how Linux and how its nifty internals work? here‘s the best chance you can get. The Linux foundation is starting to work with edX  to make Linux learning materials widely accessible. And You know since Linux is all about open source and public participation it’s about time they do so. But for now there’s only an introduction course. I hope that they add more courses especially about programming drivers and low level stuff for Linux

Soundy – OpenCV with portaudio


, , ,

So I made an app about three weeks ago that reads video input from a webcam and detects a specified color then plays a sound relative to it’s position. It written in c++ using OpenCV for color tracking and portaudio for the audio. you can configure it to track the color you want by pressing (C) and giving the lowest and heighst HSV values of the color you want.

Here’s a link to the github repo.

Helpful tool I just discoverd



So today as I was messing with the terminal in Ubuntu I accidentally typed the command “i” and the terminal said ” the program ‘i’ is not installed. You can install it by typing: sudo apt-get install iprint” lead by curiosity I installed it and it turned out that the command “i” whas a quiet handy command.

It prints the ASCII, hexadecimal, octal, and binary value of the command line arguments given to it. as an example you can run this “i ‘hello'” (without the quotation marks) and the output can be this:

104 0x68 0150 0b1101000 ‘h’
101 0x65 0145 0b1100101 ‘e’
108 0x6C 0154 0b1101100 ‘l’
108 0x6C 0154 0b1101100 ‘l’
111 0x6F 0157 0b1101111 ‘o’

which can be quiet helpful at times

Using BashPodder with Notify OSD

Pratik's Blog

I thought wouldn’t it be nice take advantage of the new Notify OSD, in Ubuntu 9.04 Jaunty Jackalope, to tell me when BashPodder is finished downloading the podcasts. So, I took at advantage of it.

Since, BashPodder is written in Bash, I installed the libnotify-bin package to be able send a notification and have it display the notification. To do that, I typed in the following command in the terminal (without the dollar sign.)

$ sudo apt-get install libnotify-bin

Then I added the following at the end of the file “” as one line.


View original post

Using QML for GUIs


, ,

lately I’ve been using QML which is is a JavaScript-based, declarative language for designing user interface–centric applications and I’ve got only one word It’s AWESOME.
Yes it great! It’s a very good way to separate gui code from program logic code and besides It’s very simple, easy to use and the resulting UIs are just fabulous. It’s easily extended using C++ and the Qt framework. However, the best part about it is that it works for most of the computing platforms out there (like just about everything based on the Qt framework), I think everyone with C++ knowledge should try Qt with QML out.

دارات كهربائية قابلة للثني ….. ولكن


, ,

🙂 هلا هلا، اشلونكم، اشلون الصحة

هذا البوست من اجل أن تشوفون الوضع المتدني الي وصلتلو اليوم و ما توصلون انتو لنفس الشيء

البارحة شفت صورة دارة كهربائية قابلة للثني على النت و خطرت ابالي هل فكرة العبقرية الي قررت اسويها اليوم الصبح و الي هي: اذا جبت ورق مقوى (من النوع السميك) أو حتى قطعة قماش سميكة(جينز) و لزقت تحتها قطع المينيوم (من ورق المينيوم)  مو يصير عندي دارة تشبه الدوائر المطبوعة و رح اقدر الحم عليها قطع الكترونية. و طبعا انا رحت جبت القطع و سويت الدارة و ثقبتها و كلشي و و و و…. بس بعدين من رحم الحم عليها القطع بينت المشكلة (لا تخاف م احترق شي, بالعكس) المشكلة كانت انه المينيوم “لا ينقل الحرارة” يعني لا بسخن, و حتي اذا سخن يفقد الحرارة بسرعة  و بالنتيجة اللحام ما رح يلزق علي و يقع

و النتيجة كانت 😦 هاي الصورة و العياذ باللهImage

و لكن الفكرة يمكن يطلع منها شي لو جربتها مع ورق نحاس بدل ورق المينيوم بس لازم تنتظرون لنزلة السوق الجاية …. ه

اذا عندك اي فكرة او اضاففة. قسم التعليقات موجود من أجل هل شيء




, ,

Hello today I’m going to talk about how to read, understand and successfully modify open source code.

At first I just want to say that I’m going to be talking about what I do when I try to understand open source code, and that I have written this I n respect to c++ projects (which I mostly work on) but I think this could apply to about any programming language or project you are trying to understand it’s code.

Well let’s you are feeling like looking at some code in order to improve your skills at a certain language or to understand a certain programming concept, or just to have fun (well mostly it is fun)

so you googled for an open source arcade game or whatever you are interested in and you found that innocent project that has about 20 headers and 20 source files. And you were like: ehhh now what? , well now you have to understand it and make something out of it that will help you or anybody. But that could be somewhat difficult (especially if it’s your first time), So I wrote this in order to share what I do when I’m in that situation.

for me, I mostly follow three simple yet very useful steps, here they are:

step 1: know which files you need to start looking at


look at the source files and watch out for the most included files in the source code

for example if you have like 10 header files then look at there includes and if they have a file (e.g #include <Defines.h> then this is the file you need to start playing with.

However, if the header file have no commonly included file then it’s best if you just pick any file that seems the most abstract one (the header that most sources depend on or the header that has only included STL and dependencies headers and no header from it’s own project)

step 2: play with it !


start playing with some values and defines it has then compile and run the program and see

what happens (or what you messed up!) cause this will make you develop certain feelings for that program (don’t worry you can’t marry it), And most importantly it will give you a sense of

how the program works. And if possible try to track where the value’s that you have changed are used

NOTE: don’t change all the values in that file because this will get you a headache, instead change only some values once at a time and if you want to play it easy then just play with one

value at a time

step 3: Do the same thing with step 2 but with functions


try to figure out what the most used functions are and understand what they do. then, if possible,

play with there inner working then watch what happens when you compile and run the program.

step 4: the most important step (not actually a step as you need to do it all the time)


comment then comment and once you have finished comment again!.

Once you understood something about the code then comment it instantly it doesn’t matter where you put the comment for example you could make a ” my comments” section at the end of each file or you could put the comment between the lines of your code, for me I always try to put the comment right next to the value definition if I figured out what this code is used for

or put it right under the function definition if I figured out what this particular function does.

And I do the same thing with classes, structs, enums, and just about every thing

that means once I understood everything about the functions and definitions in a particular file

then it’s going to have a hell lot of comments. And I think this is the right way to understand all the code of open source project’s or at least the bits of code that you want to understand.

if you have anything to add, That’s what comments are for.

And thanks for reading.