I’ve been reading a C++ book for a couple of months now and waiting to arrive at the part where I get to build programs where I can click, drag and drop. Then I realized that the book doesn’t cover that, so I went searching for it. I found alot information on a framework called Qt by Nokia and it looks promissing. I haven’t tried it yet but it will be on my agenda to do so. If popular softwares like Autodesk Maya and VLC media players uses it, it must be good. If you used it and liked or hated it leave a comment below.

Install PySide

How to install PyQt4

Installing Truecrypt in the command line

Download the console only Truecrypt at

extract it and the shell script (.sh) will appear then run it
$ sh truecrypt-7.1a-setup-console-x86

Truecrypt Command Line Usage

To run truecrypt
$ truecrypt ./volume

Installing truecrypt in linux apt-get

console, ubuntu server, terminal

Block IP Address Access to your site

It seems that spammers are usually the same people. If your site isn’t that big you can block these people by their IP address with little work. In WordPress every time someone comments on your blog their IP is shown. Below is how to block with Apache .htaccess file.

order allow,deny
deny from
deny from 123.45.6.
allow from all

Blocking of all visitors except yourself:

order allow,deny
allow from
deny from all

Detailed information click here

Spam on Blog

Geez, I recently switched from Blogger to WordPress and boy do people like to spam. The great benefit about switching to WordPress is the facility of user feedback but on the flip side you get spam like crazy. It makes me wonder, are my views actual people or bots.

I’m not smart, I work hard

“Your Smart!” They said to me but I replied, “not really, I just work hard”. It’s funny when someone comes to me and calls me smart when couple years ago, supposively I wasn’t so smart. I’m not smarter than the next average Joe but a harder worker, let me tell you.

If they saw me everyday trying to program, reading a book, learning a little a day everyday they would see its not about physical ability or genetic lottery but determination with a mixture of perseverance.

It doesnt matter how much you explain to someone they can never understand the time, the tears, the sweat nor the blood it took to get me to the “smart” part of my life. Many are fooled because they believe they can’t achieve the same results but the only thing keeping them from reaching it is the ability to put in the work. It’s not possible to change overnight but you can change your direction.

Code Snippet: Simple Javascript Progress bar

This snippet uses jQuery

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
            border: 1px solid black;
        #progress_bar {
            background: red;

<div id="border">
    <div id="progress_bar"></div>

<script>//progress/status bar    
var len = 3;
var bar_size = $('#border').width();
var increment = bar_size/len;
var fill = 0;
for(var i =0; i<len; i++){
	fill += increment;

Piwik Installation

Piwik is an open source website traffic analysis. I decided to give it a try over google analytics, one of the reasons is because the data can be stored on my server if I choose to and its fast.

Installation was simple, One may be confused by the different versions piwik has such as a plugin for wordpress and the actual source. The plugin for wordpress is only an integration that cannot be used by itself but with the actual source installation. Piwik can be installed on any server and it doesn’t need to be inside wordpress directory. Below is a non-english video which shows how to install it. What he says is not important.

C++ MVC example

I’m calling this a MVC example for simplicity. It’s actually separating 3 c++ files into 3 different responsibility for better organization and reuse-ability.

This is the header file which contain templates and functions prototype. This file will be included on the other 2 files.

#ifndef COORDIN_H_
#define COORDIN_H_

//structur templates
struct polar{
char from[50];    //distance from origin
char description[50];       //direction from origin

int balls(polar test);


This file contain functions called in file1.cpp

# include <iostream>
# include <cmath>
# include "coordin.h" //structure templates, function prototype, what links the scripts

//convert rectagular to polar coordinates
using namespace std;
int balls(polar test){
cout << test.description << endl << test.from << endl ;

This file is where you put the meat of your program. This is where you bring all the previous files together.

#include <iostream>
#include "coordin.h" // structure templates, function prototypes.  what links the scripts
using namespace std;

int main(){
polar test = {"mvc like","must compile both file1 and file2"};


return 0;

Now in order for this to work you must compile both file1.ccp and file2.cpp at the same time. Example:
$ g++ file1.cpp file2.cpp