My views and discoveries in the technology world, my experiences and some programming codes. Besides, I share some inspiration flavored with humor. I also share random thoughts.
Saturday, 9 November 2013
Thursday, 12 September 2013
Just Start!
Have you ever found it
a hassle to begin a project, report, blog post, or even anything? You have the
idea but the struggle is putting the first few lines down. It almost always
happens to all of us. The worst part or maybe the best part is you will have to
get started anyway.
Here I provide you with
some ways I use to maneuver under such circumstances.
1. Don’t think
about it
For many of us,
we always think of a perfect start, which is almost impossible to achieve. If
you have a subject to work on, or a task to work out, don’t put too much thought
on how it will look like at the beginning. What you have is enough to get you started.
Thinking too much about it might even bring up opposing ideas which will ultimately
hinder you from beginning the task.
2. Talk it over
Sharing the idea
with friends is also beneficial. Listen carefully to the ideas and the views
they have towards what you’re working on. This doesn’t mean you ask them to
help you get started, but you only ask for their view and maybe their input.
Besides, you can meet experts on the field you’re working on and find their
views.
3. Find other means
Sometimes going
through the material related to the subject you’re working on can help. In the
fields like programming, developing an algorithm and working on the code
afterwards is one way of getting started. There are numerous ways with which
you can find help, but as soon as you do, get started and work to the finish.
Like Nike goes, “Just do it!”
Leave a reply!
Friday, 12 July 2013
Friday, 28 June 2013
LUCT - Breaking News
Following what I call a “special issue,” of my local newspaper, Lesotho Times, I saw a need to bring a new thought to the subject the paper had written in more than five articles.
Robert Kiyosaki, in his book, “Rich Kid, Smart Kid,” highlights some of the fundamentals of the new order of the day. He confirms that, in the Industrial Age, the rules were go to school, get good grades, find a safe, secure job with benefits, and stay there all your life. After twenty years or so you retire, and the company and the government take care of you for the rest of your life.
We are in the Information Age and the rules have changed. The rules now are go to school, get good grades, find a job, and then retrain yourself for that job. Find a new company and a new job and retrain. Find a new company and a new job and retrain, and hope and pray you have enough money set aside to last you much longer than age sixty-five because you will live well beyond the age of sixty-five.
The mentality of the paper exposes the kind of thinking we have in our society, the Industrial Age thinking. LUCT is geared to a much better process, transforming the thinking of the individuals and equipping them to use their creative skills to make a living.
Kiyosaki adds that, in the Information Age, the people who make the big bucks are the athletes, actors, and musicians, the guys with creative and innovative skills. Many of the doctors and other professional people are actually making less than they did in the Industrial Age.
Besides, instead of hoping to find a good job with a big company, more and more students are starting their own businesses in their dorm rooms. LUCT even has a special office –The Limkokwing Entrepreneurship Acceleration Platform- that assists students in developing their incubator businesses—touted as a way to help them build their businesses.
The question is, what does the plight of the institution have to do with the paper?
Here are the links to some articles that show how best LUCT students Lesotho can go:
Leave a comment!
Friday, 14 June 2013
Tuesday, 11 June 2013
Linux Start-Up Animation - My thought
On my multi-media final project, I was asked to design a start-up animation for any application or operating system of my choice. Here's a look of what I thought of. Believe me, I used only Photoshop to complete the project. This is just an image, will cash in the animation some time.
What do you think?
Wednesday, 22 May 2013
Tuesday, 14 May 2013
C++ Stack - Part 3
Below is the manipulation of the objects created with the stack data type inside the main function. This final C++ stack source code is used in collaboration with part 1 and part 2.
#include<iostream>
#include "part1_filename.h"
using namespace std;
int main()
{
int choice;
stack Abacus;
int element;
while(1)
{
cout <<"Select a number for an action you want to perform";
cout<<endl;
cout<<endl;
cout <<"1 - Insert an element into the stack";
cout<<endl;
cout<<"2 - Remove an element from the stack";
cout<<endl;
cout<<"3 - View the elements of the stack";
cout<<endl;
cout<<"4 - See the size of the stack";
cout<<endl;
cout<<"5 - End";
cout<<endl;
cout<<endl;
cout <<"Enter your choice: ";
cin >> choice;
switch(choice)
{
case 1: cout <<"Input a number: ";
cin >> element;
cout <<"\n";
Abacus.Push(element);
break;
case 2:
Abacus.Pop();
break;
case 3:
Abacus.Print();
break;
case 4:
Abacus.getSize();
break;
case 5: exit(0);
}
}
system("pause");
return 0;
}
The code and its associates are fully functional. There are a few changes to be made and the code can be run on any c++ compiler.
Feel free to suggest some changes on the source codes.
C++ Stack - Part 2
The stack's function definitions and implementations. To view the stack interface go to part 1.
#include<iostream>
#include "part1_filename.h"
using namespace std;
stack::stack()
{
top = -1;
}
stack::~stack(){ }
bool stack::Push(int x)
{
if(IsFull())
{
cout <<"The stack is full!"<<endl;
return 0;
}
arrayStack[++top] = x;
}
bool stack::Pop()
{
if( IsEmpty() )
{
cout <<"The stack is empty";
cout<<endl;
return 0;
}
else
cout<<arrayStack[top--]<<" has been removed from the stack"<<endl;
}
bool stack::IsEmpty()
{
return (top == -1);
}
bool stack::IsFull()
{
return (top > 8);
}
void stack::Print()
{
for(int z=top; z>=0; z--){
cout <<arrayStack[z] <<" ";
}
cout<<endl;
}
int stack::getSize()
{
top = top + 1;
cout << top;
}
Save this block of code in the same folder as the header file in part one. Part three will cover the main function.
C++ Stack - Part 1
Part one covers only the class interface of the stack. Basically, a stack is a data type which follows Last-In-First-Out rule.
#ifndef STACK_H
#define STACK_H
using namespace std;
class stack
{
public:
stack(); // Constructor
~stack(); // Destructor
bool Push(int x); // A Function that inserts an element into the stack
bool Pop(); // A Function that deletes an element from the stack
bool IsEmpty(); // A function that determines if the stack is empty
bool IsFull(); // A function that determines if the stack is full
void Print(); // A Function that prints all elements in the stack
int getSize(); // A function that returns the number of elements in the stack
private:
int top; // A variable that indicates the position of the last element
int arrayStack[10]; // An array that contains the elements of the stack
};
#endif
Your file name is very important here, because in Part two, which will be the function definitions and implementation will be used.
Saturday, 4 May 2013
9 Lies and The Truth
1. I’m too busy
2. Everybody hates me
3. I tried over and over and over again
4. I’m not meant for this
5. I’m such a fool
6. I've already failed
7. I’m not a genius
8. I’m too young
9. It has always been this way
1. You’re fearfully and wonderfully made. Stop.
Read that again.
Tuesday, 30 April 2013
Frequently Asked Questions (FAQ)
As we're celebrating the workers day in my country, I thought about some questions which would somehow be ambiguous but they're actually not. My assumption is that they're frequently asked and therefore I give frequently awesomely ignored answers to them.
A - "Oh! Oh! My phone! It had not fallen down!"
Q - "Your hair looks beautiful, what have you done to it?"
A - "Nothing! You know, I've seen people feed their hair some cream called ’Hair Food’ and it grew faster. I've also seen some let their hair go hungry and turned into bald heads!"
Q - "Are you a player?"
A - "What are talking about? I don’t play for any team!"
Q - "So can I have your number so I can call you?"
A - "I don’t think that’s a good idea. Don’t call me, I’ll call you!"
Caution!
If you happen to be asked any of these questions, never use any of the answers here unless your rude by yourself!
Happy Workers Day!
Friday, 26 April 2013
Human Factors and Outsourcing
After completing a term paper at college, I thought I should share a portion from it. As the title says, it is about the effects of human factors on outsourcing.
To
begin with, communication between
parties involved in outsourcing plays a vital role as most of the processes
towards outsourcing have to be discussed. These include the discussions of the
objectives and the tasks allocated to the company taking the outsourced
functions. However, differences in interpreting the content can cause a potential error.
Another
human factor closely related to communication is the language barrier. As a
company may outsource their functions to companies abroad, language barriers
may pose a great problem to the companies. The only question that would be
asked is: “How will the language barrier problem be overcome?” In such cases,
hiring translators to bridge that gap proves handy.
Due
to the growth of the outsourcing market and the increasing workload in
outsourcing maintenance, most of the companies rely on temporary employees or un-certified
personnel. Most of these temporary workers shift
from one company to another in order to meet their peak workload.
However,
those temporary workers have to learn new set of procedures every time when
they move to a new organisation; this may potentially cause a problem. Never
the less, to minimize this procedure error, companies need to strengthen their
internal training programmes.
Let's hear your thoughts...
Saturday, 20 April 2013
A Taste of What I've Been Reading!
I been engaged in lots of reading lately and thought
it would be helpful to share a bit from the resources that personally benefited me. I won’t go as far as introducing the featured authors here; I’ll assume you've heard of them before. If that’s not the case, just follow the links on their
names. The passages are shared as they appear in their publications.
How to Live on Twenty-Four Hours a Day – Arnold Bennett
Talk about an ideal democracy! In
the realm of time there is no aristocracy of wealth, and no aristocracy of
intellect. Genius is never rewarded by even an extra hour a day. And there is
no punishment. Waste your infinitely precious commodity as much as you will,
and the supply will never be withheld from you. Mo mysterious power will
say:−−"This man is a fool, if not a knave. He does not deserve time; he
shall be cut off at the meter." It is more certain than consols, and
payment of income is not affected by Sundays. Moreover, you cannot draw on the
future. Impossible to get into debt! You can only waste the passing moment. You
cannot waste to− morrow; it is kept for you. You cannot waste the next hour; it
is kept for you.
Rich Kid, Smart Kid – Robert T. Kiyosaki
10. Simply put, the Information
Age will bring economic changes that will dramatically increase the gap between
the haves and have-nots. For some people, these changes will be a blessing; for
others, these coming changes will be a curse; and for still others, these
changes will make no difference at all. As my rich dad said, "There are
people who make things happen; there are people who watch things happen; and
there are people who say, 'What happened?'"
How To Use Your Mind – Harry D. Kitson
The life of a student is a trying
one. It exercises chiefly the higher brain centres and keeps the organism keyed
up to a high pitch. These centres become fatigued easily and ought to be rested
occasionally. Therefore, the student should relax at intervals, and engage in
something remote from study. To forget books for an entire week−end is often
wisdom; to have a hobby or an avocation is also wise. A student must not forget
that he is something more than an intellectual being. He is a physical organism
and a social being, and the well−rounded life demands that all phases receive
expression. We grant that it is wrong to exalt the physical and stunt the
mental, but it is also wrong to develop the intellectual and neglect the
physical. We must recognize with Browning that, all good things are ours, nor
soul helps flesh more, now, than flesh helps soul.
Unstoppable – Nick Vujicic
Go with your gifts and passions. The most balanced,
stable, happy, and fulfilled people I know are those who build their lives
around continuous development and full expression of their talents and
interests. They don’t have jobs or even careers. They have passion and purpose.
They are fully engaged. If you do what you love and earn a living from it, you
will never have to work a day in your life, and retirement will be what other
people do.
The Law of Attraction – White Dove Books
Attempting to secure your hopes and dreams based
solely on good energy isn’t something that is highly likely. With that in mind,
it would be very foolish to depend upon a natural law to provide you with
everything you need. Instead, you have to be willing to take advantage of every
opportunity that is presented to you.
It's your chance, what have you been reading?
Friday, 12 April 2013
Typing Speed – Yes, It Matters!
I have seen a number of people devote a lot of time working
on their assignment drafts but fail to produce or need additional time typing their
work. This has brought a question to me as to whether does the need of improving typing speed really matter. Surely it does. In the meantime, I have also
seen people loss interest in improving their typing speed or working on it.
Some people seem to be blinded to the benefits of typing
speed. Typing in a professional way does not only save time but boosts
accuracy. One of the prime condition and basic necessity
of typing is to type with all the fingers. Don’t tell me you haven’t used only
one hand or two to three fingers typing. Typing with all the fingers will make
you more comfortable. It’s hard to master that technique but with a little run-through
one will get used to it.
It is essential to keep both hands on the keyboard at the right
position while typing, the location of the keys on the keyboard gets memorized spontaneously
and in no time a person starts typing by not even looking at the keyboard again
and again. Taking a few glances still helps though. This does not materialize
when an individual uses few fingers in typing.
There are many resources that can be used to improve one’s
typing speed. I have personally found the Typing Tutor softwares very helpfully.
Just download free versions on the internet. There are also free typing lessons
available on the internet. These tools prove handy as they offer guidelines and
you can also monitor your own progress. They also offer typing games!
The last thing to point out is, in your typing everyday make it a habit to use all your fingers and you’ll soon see yourself become an expert in typing. Don’t fall into a trap of using very few fingers.
If this post was helpful to you, leave a comment.
Friday, 5 April 2013
7 Comedy Movies For Your Next Movie Marathon!
A Thin Line Between Love And Hate - 1996
Martin Lawrance and his friend. |
In this American dark comedy-romance an observable,
fast-talking party man Darnell Wright, gets his sentence when one of his
conquests takes it personally and comes back for retribution.
3 Idiots - 2009
3 Idiots |
This Indian comedy drama unveils a situation where two associates
are searching for their long lost buddy. They revisit their college days and remember
the memories of their friend who motivated them to think differently, even as
the rest of the world called them "idiots".
Home Alone - The Holiday Heist (TV 2012)
Finn |
Finn Baxter and his family move from California to Maine to
their new house. Finn is horrified and believes the house is ghostly. While he
sets up traps to catch the "ghost", his parents get stranded across
town and Finn is home alone with his sister. Their house becomes a target of
three thieves who’re in search of a treasure.
My Cousin Vinny - 1992
Lawyer Vincent Gambini |
Two New Yorkers are suspects of murder in rural Alabama
while on their way back to college, and one of their cousins--an unproven,
loudmouth lawyer not familiar with Southern rules and manners--comes in to
defend them.
Mad Buddies - 2012
Leon Schuster and Kenneth Nkosi |
This Johannesburg based comedy movie forces two sworn
enemies to do a road trip together on foot, only to discover that they have
been tricked into being part of a reality TV show, they join forces to exact payback.
Diary Of A Wimpy Kid - 2010
Greg |
Live-action reworking of Jeff Kinney's illustrated novel
about a wise-cracking sixth grade student.
Coming To America - 1988
Eddie Murphy and one of his associates |
An African prince goes to Queens, New York City to find a
wife whom he can esteem for her aptitude and determination.
Find additional movies so you make 26.2 hours of movies just like in a marathon. Have fun!
Leave a comment!
Tuesday, 26 March 2013
Let's go for a ride - On our way to Mokhotlong, Lesotho
...this isn't a waterfall! |
A few minutes out of the Butha-Buthe town, you come across this beautiful scenery. Call it whatever you may, but it's certainly not a waterfall! During winter, the water falling here freezes!
Keep driving! |
Drive a few kilo-meters, caution-speed kills, so you better be careful!
Oxbow Lodge |
Need a rest? The Oxbow Lodge will keep you refreshed as you continue with your journey. You better stop by!
120kmh, I guess! |
Step on that accelerator harder, the ain't no pot-holes! Before you think, you will have gone some distance.
Go snow skiing! |
To add a little adventure, there's a snow skiing dwelling down the hill. It's a few minutes drive to the resort. Remember, it will surely not be free down there, prepare some cash!
Waving flags... |
Glance out the window -not at the rear mirror- you see the Lesotho, South-Africa and some other flags waving, it's a beautiful scenery!
Are we there yet? A resounding, NO! Be patient, we still got a few more kilos to go.
Road under construction |
Sky Restaurant. The highest restaurant in Africa, that's what they say! No cold drinks, it's freezing out there, you'll like their tea though.
Along the way... |
It's along the way, experience the fresh air of the Maluti.
Gravel road |
You wouldn't want to keep your windows opened! There's some distance you'll be travelling on gravel.
Cross the Mapholaneng river |
We're here now, and the journey is almost coming to an end. In fact, we're done! The next location
I ventured on this journey as a mission trip, and it's amazing how most of claim to have gone around our countries but actually never enjoyed the spirit of the journey. It's not about the destination, it's about your experience along the way!
Leave a comment!
Friday, 22 March 2013
Entrepreneurship – Google it!
My assertion is that everybody is an entrepreneur whether they realise it or not. This lays in my view of what entrepreneurship is. Now, there are so many definitions and explanations that are assumed on the word entrepreneurship but loosely put, it’s a matter of recognising opportunities and building on them.
Like I already indicated, I believe everybody is an entrepreneur since everybody is eyeing an opportunity of some sort. There are four different kinds of entrepreneurs that I want to focus on, and I want you to classify yourself after going through this. A good friend of mine was the one who helped me make finer distinctions between these entrepreneurs.
Survival Entrepreneurs
"...they merely do it for survival.." |
Here we categorise people whose lives are of some sub-standard
level. Any income they get is used to buy a meal for the day or meet the needs
of the family. Believe me, there are also so many people who make a lot of cash but can still be viewed as survival entrepreneurs because the money they are
making always has to pay some bills. No savings can be made from that money.
Another good example can be that of the street vendors. For some of them, their
survival is upon the little money they make.
Lifestyle Entrepreneurs
Out of a 100 people, 80 fall under this category- my
assumption. Individuals under this category have a very fascinating life. For
them, it’s all about being ’up-to-date’. The money they make is for buying
fast cars, penthouses, expensive gadgets and yes, fancy clothes. Now, don’t get
me wrong, there’s nothing off beam with them purchasing whatever they want but
these individuals are more focused on improving their conditions than
themselves.
Growing Entrepreneurs
Now, this is growth! |
Revolutionary Entrepreneurs
Much cannot be said about this category. You’ve had of the
likes of Bill Gates, the late Steve Jobs, The Facebook Mark Zuckerberg, and …,
complete the list with the one you endorse. The ideas that emanate from such
individuals are worshipped. This however doesn’t mean that pioneering ideas are
always from a certain group of individuals; everybody can reach this platform
too.
Now, which kind of an entrepreneur are you?
Leave a comment!
Friday, 15 March 2013
Creating a Login Page using HTML, PHP, and MySQL
In creating a simple login page we’ll use HTML and the PHP
programming language to connect to the MySQL server. What we’re about to do is
almost covering the forms and interactive web pages’ built in functions. These technologies used are known as content management system are helpful in interactive web
pages.
A few things before
we go further:
You’ll need to have XAMPP Control Panel installed and Apache
running on port 80 if you’re using Windows. MySQL server should also be
running. If you’re using Skype, I recommend you halt its usage while working on
this since its using the same port as Apache.
HTML code for the
login page
login.html
<html>
<head>
</head>
<form name="login" method="post"
action="connect.php">
Username: <input type="text"
name="username" /><br />
Password: <input type="password"
name="password" />
<input type="submit"
value="Login">
</form>
</html>
Just copy and paste this block of code on your notepad, save in html format and
run it. I recommend you use the same file names as I did; the same goes for the
PHP coding.
PHP Coding to connect
the MySQL server
connect.php
<?php
$connect=mysql_connect("localhost","root","password");
mysql_select_db("database_name",$connect)
or
die
(mysql_error().":<b> ".mysql_error()."</b>");
$username = $_POST['username'];
$password = $_POST['password'];
$username =
mysql_real_escape_string($username);
$password = mysql_real_escape_string($password);
$sql =
"SELECT * FROM table_name WHERE username='$username' and
password='$password'";
$result = mysql_query($sql);
$count = mysql_num_rows($result);
if($count == 1)
{
print"<script
language='javascript'>alert('Welcome!');</script>";
require('nextpage.html');
}
else
{
print"<script
language='javascript'>alert('Username or Password
Incorrect!');</script>";
require('login.html');
die
(mysql_error().":<b> ".mysql_error()."</b>");
}
?>
A few tweaks to work on:
You should create a database and have its name replace
wherever the code says ‘database_name’ and also create a table in the database to
replace ‘table_name’ on the code. The column names used should be the same as
the ones used on the code.
The ‘$_POST’ variable names are the names given to the
variables on the login page.
There’s however a pitfall on the code, there’s no
‘nextpage.html’ created to display whenever the user logs in, so you will have
to create a page that will display and replace ‘nextpage.hmtl’.
I’ve also incorporated the use of JavaScript to alert
whenever the login details are correct or otherwise.
Warning!
I’ve seen a lot of people struggle with launching the form
pages on the XAMPP to run them on their localhost. All the pages you’re working
on should be saved in the xampp sub-folder called htdocs that is located on
most computers in drive C. So, for the login page above just have:
localhost/login.html as your address.
Your browser should display a webpage similar to this one.
Just comment for any queries or anything. Have fun coding!
Subscribe to:
Posts (Atom)