I am an Interviewer

What can possibly make me take a long time to post a blog entry ;)?!

Busy is  the obvious answer;considering I'm still an earthian i.e not dead.

I have been busy developing software products on Kohanaphp framework.Unfortunately( or Fortunately),It  always turns out that while you are busy you always tend to loose the self,you pay little attention to your cares.

In one of these busy times,I was trying to get a solution to an imagined problem,which constituted the solution to a real world problem I was to solve.This problem reminded me of an article I read once about the type of questions you are asked if you go for an interview at Googol.

Further,I assume this question was posed at the interview and I am  the interviewer.I also assume the person comes from the clan of Rasmus Lerdorf and may just have left school with no much experience.
Write an Algorithm to Calculate two random  numbers between 1 and 1,000,000  so that the difference between them is always 355.
hint: use rand() or mt_rand() if you come from the class of Rasmus Lerdorf else use what tool you have.

What basically you are expected to give will be the possible algorithm,your method of approach of the question and not necessarily the answer since it is already given.It is like you are given the answer and you asked to reconstruct the problem.This is the industry and Not school ;).

I have always known, a problem can be solved in a million ways no matter how long or how cumbersome  the arrival may be.
The most simple ideas I always like; and In choice I consider the simplest.
My religion remains simple;If it's not simple, count me out!.

But how simple can simple be?That is philosophy!:( .Which is not simple.

But since this is my blog(  and again I'm an interviewer ;)) I'll like  the complete steps and it's just for fun forget about losing the job at Googol :).

This also turns out that this is the last blog post I will do for Livejournal ;):been here for 5 months.My time is up!.I will be moving to Blogspot( I have not been employed by Googol lol!).

I will put up my own idea once I move to Blogspot;notably after my post: The Nature of Objects in OOP.

I'll see you soon:) at the other end.

P.s.Livejournal guys.
You rock, I will miss you!.
1like for the Mood setting.

Demo of MVC for BarCamp Cameroon 2010
I have not blogged for a while;I have been busy ;).This blog post presents the partial codes for the presentation I did at BarCamp Cameroon.

Barcamp Cameroon(barcamp.org/BarCampCameroon2010#BarCampCameroonProgram)
passed 2  weekends ago and I must say it was an amazing event, the presentations and the people and  the energy!.
Check for My the presentaion here: MVC
I did a preach on MVC(Model View Controller), how it can ease development across  platforms:Web,Enterprise and Mobile:
Web,Enterprise and Mobile
I am to demonstrate that for php using Kohanaphp;don't ask why....I just love the framework.You can read the previous post if you are not using a framework and wish to know what a framework is.

I don't like assumptions,I will wish to make it common for everybody but I am force to!.:).
I shall assume or require  the following:
1.You have some familiarity with php
2.You  have a basic familiarity with the kohanaphp framework(I use 2.3.1),
If you are interested in the framework, then check my other post about 10 reasons, ok!.
No more talking and business....GO!.

We need to demonstrate the use  of Model View Controller (MVC) in php using the Kohana php framework.
It is a simple form with user Email and a Message to be submitted,validated and stored to the database.


Create a php file call it, contact.php drop it under the application folder/model and copy the following code to it:

<?php  defined('SYSPATH') or die('No direct script access.');
 Model(which is a class) and we are using ORM(active records)
 With ORM,since our Model's name is Contact, we are supposed to have a table in the database with name
 contacts(with the 's').Table with fields (id,email,message)
 @author Njie-litumbe.L.Nara ======= njielitumbe@gmail.com
 @www.afrovisiongroup.com  ========== njielitumbe.livejournal.com
//Considering we have a table called contacts in the database
 class Contact_Model extends ORM{
Save it!.

Create another php file call it,contact.php drop under the controller folder, copy and paste the following code:

<?php defined('SYSPATH') or die('No direct script access.');

@author Njie-litumbe.L.Nara ======= njielitumbe@gmail.com
@www.afrovisiongroup.com  ========== njielitumbe.livejournal.com
  class Contact_Controller extends Controller{

      public function _construct()
Continue copy...Collapse )


The View:
We shall be using 'views of views' forget the name just do as follow:
All the following files are droped under the application/view folder.
Create another php file, call it header.php and past the following code in it:
Continue copy...Collapse )

Create the Custom Error Messages:
Continue copy...Collapse )

Create ... NO! We are done creating...;).
But if you need style then Create a css file call it my_css.css and drop under the a CSS folder under the maindirectory(It is not there create it!).
Paste the following code:
/* CSS Document */
Continue copy...Collapse )

Run the codes!.

This is What you get:

This is what you get!

The Demo is complete.The use of Model View Controller has been brought out well.
Now, If I have to add a service to display the number of users who have sent messages shorter than 20 words  and get a chart for the different message length I will need to add just a function(method) under the class controller and a new view file under the View folder.
I can choose to change how I wish the user to see the information display,,,,I change the view. If there is a new Logic I add a function under the controller. For a new table or additional data I create a new Model class(a simple class as demonstrated above).
I used ORM I am guilty....I just used an engine saw to kill an ant ;).

The other codes for the iphone/Android without even the sdk:Test on your Android/iphone, Safari /Chrome.

I'll see you soon.

Next Blog post: The Nature of Objects in Object Oriented Programming.

tweetI tweet


10 Reasons why every Web Developer should use Kohana.
It is more than two weeks since I got my hands dirty with the Kohana framework.
I am not writing as a Kohana publicist but a developer who is using Kohana and has used others frameworks; Realised a project in half the time I used to realise with CI.I am just appreciating the framework!.

Now Working seriously on  CMS(with Konana )and Engineering for another project (all Kohana).
This blog post is meant for surely developers only!It is much Kohana talk the word Kohana appears at least 35 times!so you know what I am talking of here.

1.If you are very lazy like most Programmers:
Developing websites and web applications involves a lot of repetitive work. Programmers, being lazy sods, have responded by making the software do the heavy lifting. Usually this means writing libraries and components which simplify and automate certain tasks.
Observant programmers noticed that developing web applications involve lots of the same type of repetitive work. Observant programmers, being clever, have responded by making the software implement a pattern, which simplifies and automates the solving of well defined problems.

2.if you say yes to  this question then u need to start using Kohana

   -Do you need to use a  Framework?:Then Use Kohana.

What is a framework?
A Framework can be:

   1. An implementation of a problem solving pattern.
   2. An organized collection of reusable software components.
   3. Both

3.If you have Large Projects to Implement:Kohana is probably better for larger sized projects as well as projects that need more flexible extensions. PHP5 offers better (proper) OOP support as the foundation, plus Kohana’s several better feature implementation make it  stronger than most other frameworks.
Rapid development cycle. Rapid development results in faster response to user bugs and requests.

4.If you are to use a Database and want to keep it clean of SQL:Automagical Database Handling . Kohana has an optional ORM module. The ORM module is the Most powerful feature I have got to appreciate till now, when I am tempted to compare CI and Kohana.The ORM library is the Object-Relational mapper for Kohana. It provides ways to handle records in your database as if they were objects and it manages relationships between your tables. It is not loaded like other libraries but works in the model.
There is the modified active record pattern.
Doing connection to the database with ORM of Kohana is magic.The database entries are called as objects.Everything is an object.

5.if you need more help :Enough Documentation:Kohana is all where accused of no documentation and examples.Kohana is in the process of improving its documentation.Check some here :

6.If you need view Automation:Power of Template controller-The template controller is also a tool(class) which is vital in increasing the speed of production and it greatly reduces Repetition.You can be able to produce several views By just calling the "content" and May be "title" to be displayed.U can then experience the power of speed and completion(it's more fun!:)).

7.If you need order:Kohana Implements with MVC-> HMVC without 3rd party libraries.
why MVC-
A very common problem for many websites, is producing dynamic output, often based on user input. The most common pattern which solves this problem is known as Model-View-Controller(MVC). The concept is that an application should organize around a logical separation of operations. The Controller "controls" things, deciding which resources are used, what data should be modified and when output is displayed. The Model "models" the data, abstracting the retrieving, storing, updating and validating of data. The final output is presented in the View, which is a "view'" of what just happened.

8.If you don't want to take a lot of instructions to make it work: Kohana favors convention over configuration.
What does this mean? Kohana expects that certain things be named in a certain way, and certain resources to be located in a specific place. That allows Kohana to "Just Work" if normal conventions are followed. To change conventional behavior, you need to tell Kohana about it, by configuration.Further, If you need less Configuration-In my opinion Kohana is more yet it is simpler (less clustered) to do so! Most of the Kohana configuration files are stored in the system folder, you only copy and paste the ones you actually need to modify, and modify them accordingly.
Example: if you are using a db and using the ORM to access it, then to ease the object convention,the database must be the plural of the Model i.e if db is called afrovisions then the model would be Afrovision_Model.That's all you need to do to work with your database;Magic!.

9.If you are thinking of the future of Web developement: Kohana Offers many benefits with it's Strict PHP5 OOP(Object Oriented Programming) as :visibility protection, automatic class loading, overloading, interfaces, abstracts, and singletons.

10.If you use another framework and needs the best shift possible into strict OOP and you need to enjoy the power of OOP of php 5?, Then Kohana.Kohana is originally built on CI.It inherits some common features.A shift of framework should be easy.
Kohana Provides True auto-loading of classes. This includes libraries, controllers, models, and helpers. This is not pre-loading, but true dynamic loading of classes, as they are requested.


Kohana is probably better for larger sized projects as well as projects that need more flexible extensions. PHP5 offers better (proper) OOP support as the foundation, plus Kohana’s several better feature implementation make it a the better tool for Web Development.
As long as you’re an advanced PHP v5 programmer and understand the intricacies of OOP you’ll have absolutely no problem picking up Kohana.OOP is the future of web development.Kohana brings that to live;and It's what you need;it's the future; it's now.

The AfroVisioN team knows that the future of Deb development is here.You can get your site here : AfroVisioN Group.tomorrow is my birthday!HB!

It Works!!!Work is Fun not War!!!
It works.Yes it does work.
This is my second week with the Afrovision Team.It has been exciting for me.I mean the changing routine.Travel to work in the morning,get to look at my CodeIgniter(CI) application,study how to implement with it,Implement with it,have fun then Travel back home.The routine may have just ended.Today I finished the Application and it was approved;so I get a routine shift.The whole exercise was to get me used to the MVC(Model View Controller) Architecture. I made it with the finishing of the application as a proof.

I am now to start using Kohana framework.I am already so much liking CI but Churchill promises and swears everyday day that when I know Kohana, I would never want to think of CI again.I don't agree with him yet because I am already familiar with the Ci framework and has to get familiar with Kohana framework.

Kohana is to be the base for the development at Afrovision.So I must get used to it after 2weeks with CI I would just loose the familiarity.It's funny how we still hold on to things which leave us/we leave them even when we get a better replacement.

I just started with Kohana.Sincerely I can't judge from first impressions but I have to.Comparing with CI,where I took more than 4 days just trying to fix deprecated components in it,and make it work for the app I wanted to build.I have come to love Kohana deja because I have done no work on the framework and I see the output already.It is the shortest time I have taken to produce "Hello World" in all my years of entering a new language or framework :).
Now in Kohana everything is an object.At least that is what i have come to appreciate so far.I see lot's of order;yes there is.

My First Impressions says: would be good.The word should have gone out since about Kohana.I guess I have to get familiar here too.

Oh!This is not supposed to be a CI or Kohana Blog but my Corporate life Blog.

Being with the team for 2weeks has been more fun to me.Working can be fun is the philosophy I now have come to agree with;Work is fun surely not war.If it can't be fun then find something else where you can work and get fun.The idea keeps me glued to the office with the team;it keeps every one going.Sometimes I forget to go for my bus to the town of Friendship( forgetting to eat is usual :)).The Bus ride is a continuation of the fun.I have the opportunity to read and think away from my 15 inch Lappy and Listen more music from the BB; also laugh with different people,in communication.

I happen to have stumbled on this while searching Kohana and I like to keep it here:
Ten websites implemented with Kohana.

Work has been swift because of the new hot offers the Company offers;affordable,quick results, customized.The best solutions you would find around here and even there!!!.

AVN.More Information can be got here:www.afrovisiongroup.com.

Surely I shall soon come to agree with Churchill that "CI makes PHP easy,Kohana makes Life easier"(hahahahaha).

I'll see you soon.

How come I see it like a mystery and you see it so easy!!!???
This is my first week of codding with AfroVisioN(AVN) Team at the AVN Lab.It has not been easy for me as I have to embrace a new community, a new team, new Ideas and Technology.The team is a great one because they are determined and want to make it.Making it here means changing the conventional thought of doing things for money.

They portray the love for their work.They do it because they wish to see a better Cameroon and Africa in the realm of Software Development;Doing it because they know there is to be a change;a hope for a better future of Software development in Africa.

I think they have to do it because if they don't someone else would.

I have been indroduced to a new framework, Codeigniter(CI).CI is a framework with built in functions to make Php programming very easy.You can achieve many  tasks seamlessly.This is thanks to the team at EllisLab;Hi!!!.I am familiar with Php and MySQL but the framework is a new story to me.It comes with the idea of some Object Oriented Programming.

The idea of Model VIew and Controller(MVC).Basically, MVC .The Model is the handler of the data;View is the handler of the user interface and controller for mediation between the model and the view.

At first it is never easy;"How come I see it like a mystery and you see it so easy!!!???.I think familiarity is the answer.To be come familiar with a new skill; time and Practice are not left as the company of the word.

As I get familiar I  get to achieve tasks I had imagined would take several days in few hours.As now I am progressing at my liking speed and not under lot's of pressure from the project manager;Churchill who is also an Inspiration to me.

The major problems I face now is mixing my corporate life with my personal life.I love to keep the lives apart.At least in theory.This Blog is supposed to keep track of my corporate life as a Software developer now under AfroVisioN.My thoughts may stray in.I am trying my best to fit into this new id.I am fitting well and getting it.Apart from this I like to keep my life out of the eye of the public (Even away from God if it where Possible).

Out of writing programs that I find as fun,respect and like so much, I can be found Listening to Music(Now mostly indie and Rock/Alternative,POP,Punk,some Emo).My music player is good for me. Movies, Adverts, Travel, art, reading, writing (all of it stay in My  wall robe except the ones you see now and few others...hahahaha),the acquisition of a new property.....You may also find me thinking about mankind's biggest problems(Emotions).
What we Provide!
We provide the above services;Basic,Business and Corporate .You can find more details at www.afrovisiongroup.com.
It is a revolution as an idea in  Web developement for Cameroon and Africa as one.

I will see you soon.


Log in

No account? Create an account