Wednesday, May 9, 2012

I Moved!

Today it's official, out with the old in with the new. I'm done using blogger as a host to my blog and now moving to Wordpress. You might ask, why?
1. Wordpress gives me more control and customization
2. Wordpress is more professional
3. Wordpress doesn't mess up my Domain Name URL forwarding
4. Google can be scary with all their privacy policies.
5. Wordpress makes it easy for others to comment. No need for an account!

What does this mean to you.
You can access the site by going to baligena.com and all the content has been transfered there. This will be the last post on this server so if you ended here at this page go to baligena.com.

Monday, May 7, 2012

Installing Piwik

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 different 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.

Friday, May 4, 2012

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.

coordin.h
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
};

//prototype
int balls(polar test);

#endif


file2.cpp
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 ;
}


file1.cpp
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"};

balls(test);

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

Wednesday, May 2, 2012

You're a Business, The employed and self-employed

You probably heard it before "I enjoy being my own boss because I make my own rules and I have freedom". A very general description because you're free from WHAT? You may not have a person as a boss but that role is switched to your customers, they're your boss. You may have this false feeling of freedom but you’re bound to customer complaints, returns, paperwork and so on. It’s cool to walk around and say "I'm my own boss, I make my own rules" to your friends. But depending on the situation having your own business isn't the best idea. Being your own boss is still having a job but your responsibility is different, and many sacrifices are required to be successful.

I'm a business no matter what. If I'm an employee or employer whatever it is I'm still the owner of myself and the money I make. When I work I give my best and want to be compensated accordingly. If this can't be done, my business (myself) will switch different markets (job). When this market(job) is not cutting it then I should venture in new territories(self-employed).

There's always a flip side to the coin, a yin and a yang, risks and rewards and depending on the situation we find ourselves in we need to make the decisions for what is best. I'm all for starting your own business and it is my ultimate goal. I won't do it because I'm lazy of responsibility or work, but because my job just isn't cutting it anymore.