Back to the Basics

From time to time you have to go back from whence you came inorder to get perspective to where you are going. And with all these recent developments in web standard technologies, its useful to do this so as to stay in the current. for example, knowing the deprecated elements such as font , bgcolor, since the introduction of HTML5.

Since being relevant in the future is our main aim, i decided to focus on what i think is core to web development and that is dynamic content. Hence the debate JQuery and Javascript. Which is better? which is more dynamic and which is more relevant in the future.

What is JavaScript?

JavaScript is a scripting language that was designed for use within a web browser. Typically, JavaScript is used for interface interactions. Slideshows and other interactive components are typically done using JavaScript.

JavaScript has many other uses as well. If you are familiar with using the Google email client Gmail, you have experienced the power of JavaScript firsthand. Many of the additional features and functionalities that make Gmail such a popular email solution are created using JavaScript.

The uses of JavaScript don’t stop there, however. JavaScript has also been used for server-side programming, game development, and even creating desktop applications.

Years ago, JavaScript was popular but web developers were not entirely sold on the idea of using it simply because every web browser would render JavaScript content in a different manner. Newer standards now force all web browsers to implement JavaScript uniformly; saving developers time and frustration trying to debug code for a specific web browsing client.

Dynamic content is the hot topic in web development right now. Dynamic content refers to content that constantly changes and adapts to specific users whenever possible. For example, JavaScript can be used to determine if a website visitor is using a computer or a mobile device before deciding whether or not to render the mobile version of the website. It’s these small things behind the scenes that create genuine value in using JavaScript to create dynamic web pages.

What is jQuery?

Before jQuery was developed, web developers created their own custom frameworks in JavaScript. This allowed them to work around specific bugs without wasting time debugging common features. This led to groups of developers creating JavaScript libraries that were open source and free to use.

JQuery is simply a specific library of JavaScript code. There are many other JavaScript code libraries such as MooTools, but jQuery has become the most popular because it is so easy to use and extremely powerful.

While many web developers confuse JavaScript and jQuery as two separate programming languages, it is important for you to realize that they are both JavaScript. The difference is that jQuery has been optimized to perform many common scripting functions and it does so while using fewer lines of code.

So Which One Should You Use?

Professional web developers spend a lot of time debating whether JavaScript or jQuery is appropriate in a given situation. The truth is that there is no correct answer. Either option can be used to create the exact same effects, but often jQuery can do it with fewer lines of code.

As a general rule, jQuery is sufficient for most web development projects. There will be some projects that require traditional JavaScript; however, these are few and far between as of late. Although jQuery maybe the better choice in most scenarios, as a novice web developer you should still take the time to learn both JavaScript and jQuery.

Although using JavaScript exclusively can slow down project completion time significantly, it’s important to realize how JavaScript works and how it affects the Document Object Model (DOM).

Remember that the biggest difference between jQuery and JavaScript is that jQuery has been optimized to work with a variety of browsers automatically. Unfortunately, JavaScript still has some issues with cross-browser compatibility due to poor JavaScript implementation practices on the part of web browser developers.

To see this difference in action, consider the following example that is designed to change the background color of a body tag using jQuery and JavaScript respectively:


$ (‘body’) .css (‘background’, ‘#ccc’);


Function changeBachground(color) { = color;


Onload=”changeBackground (‘red’);”

Can you see how in a large, complex web development project it makes more sense to use jQuery? A single line of code accomplishes what it takes four lines of code to accomplish in JavaScript and this doesn’t even account for the extra time you might spend debugging this short piece of code to work across popular web browsers including Internet Explorer, Firefox, Chrome, and Safari.

Is jQuery the answer to all of your scripting needs? For most projects – yes. For those few projects that require the specific functions only available in traditional JavaScript, you can quickly adapt your style to include JavaScript code when needed.

Remember that although 99% of your web development projects will work perfectly fine using jQuery, there will be a small percentage that does require JavaScript. As a result, it would be wise to study both so you can transition between the two as needed to provide a better web development service to your clients.


Adding/Finding the Databases window in Adobe CC

i’m recently updating my jutsu in adobe and i was suprised when i couldnt locate the databases window in my Dreamweaver CC.

These are the steps i followed: (Assuming you have Dreamweaver CC installed)

-Download Adobe Extension Manager(You’ll have to have an adobe login or create one)

-Install and run the Extension Manager and under the File tab. Click on install.

-Navigate to this directory and install:

C:\Program Files (x86)\Adobe\Adobe Dreamweaver CC\Configuration\DisabledFeatures

you’ll find this file:

-Deprecated Panel

install and under the windows tab in Dreamweaver. you’ll find the Databases option


As it fast approaches, hearts beat faster, anxiety levels reach critical points .. tongues go wagging as others go numb. This is what the dreaded 14th brings .. but i recently read something that sort of set the mood and it would be mean not to share .. so lemme give you a sample and you be the judge…

its titled KNICKERS!

There comes a point in a man’s life when he has to remove a woman’s knicker. It’s inevitable. It’s a point of gravitas. It’s a definitive point. It’s the icing of a flirt. It’s the last horn blown to the game of attraction. It’s the last stanza to the love song. A cul-de-sac of the road trod by lovers. Whatever rings your bell.

A woman’s knicker is a cloak that enshrouds her respect. A woman’s knicker is a metaphor of preservation. And because a woman’s knicker is indeed the custodian of her womanhood, it then becomes a symbol of power. A symbol of her power. And for a man to fully be conscious of this power he has to be in that frame where he appreciates the woman’s worth. He has to acknowledge her potential, her insurmountable role. And that’s why men don’t remove prostitute’s knickers…if they wear any.

I lost my virginity in my early teens. I lost it at the back of an old blue Volkswagen Beetle. A little hot contraption with bald tires. She was older. I was wet behind the ears but very enthusiastic and eager as only a 17yr old faced with the prospect of a lifetime can be. She dragged me into this car that sat behind their house, and there she had her way with me. Not that I resisted!

But I didn’t have the pleasure of removing her knickers.

I felt short changed because to fully appreciate a woman’s nakedness you have to remove her knicker. The process of removing a woman’s knickers is sacred. It’s poignant than the first kiss because it’s an endorsement of sort, an endorsement of you as the man of the moment. The very action of removing a woman’s knicker is a powerful moment, an avatar of supremacy. The very exploit of removing her knicker is defining to the moment as it is for the man. It says – rather childishly because indeed aren’t we all children gentlemen? – that we have triumphed. But largely it means success, and success is a tongue that men seek to learn and muster.

Here is an irony: Whilst men might feel like removing a woman’s knicker is a fruition of their own sly effort, the truth is a tad shocking. The sobering truth is that it’s not us who remove women’s knickers; it’s the woman who “removes” her own knicker. In essence, no woman lets you remove her knicker if she isn’t ready for you. She dictates when you remove her knicker and she dictates where you remove her knicker. Hell, she even dictates which knicker you remove. The true power still remains with her.

But still, it’s a moment of beauty to pull down the woman’s knicker, you know? Yank it over her legs and toss it away because for that moment, that moment when she lies there without her knicker she becomes helplessly yours. The moment becomes more than just about sex. It’s naked power to finally expose the real woman because a woman without her knicker is not the same anymore. She can never be the same anymore because her nakedness was her veil of intrigue, and now that that cloak hangs from the lampshade she becomes bare, stripped down to her elements. She becomes vulnerable in your eyes. And she becomes truly yours for the few hours after the departure of the knicker…or for the next one minute for some men.  I’m just saying guys.

Get the rest here:

How to install moodle in Kali (Debian)

Web Server (Apache highly recommended)
Database Server (MySQL or PostgreSQL recommended)
PHP, PHP-MySQL mod (or mod for your database)
Various PHP modules necessary for Moodle
-apt-get install apache2 php5 mysql-server php5-mysql libapache2-mod-php5 php5-gd php5-curl php5-xmlrpc php5-intl php-mbstring curl libcurl3-dev libcurl3
#(important for postgresql database usage)
-apt-get install php5-pgsql
-apt-get install clamav-base clamav-freshclam clamav(The clamav package will support virus checking on file uploads into Moodle. May have to run it again
to configure properly)

then change php settings by opening this file: php.ini
-vi /etc/php5/apache2/php.ini
then add these lines under Dynamic extensions
(here you are configuring php to communicate properly with mysql)

(here you are configuring php to communicate properly with postgresql)

then search and adjust these values accordingly
memory_limit=40M(mine was 128M so i didnt change)
post_max_size = 80M
upload_max_filesize = 80M

SETUP DATABASE(Postgresql recommended)
login to automatic postgres user(its the default user for postgresql)
-sudo su postgres
Log into the PostgreSQL command line client
-psql -U postgres
After some preamble you should see the prompt postgres=#.

Create the user for the Moodle database and assign a password:
-CREATE USER moodleuser WITH PASSWORD ‘moodleuser123’;

Create the database:
postgres=# CREATE DATABASE moodle WITH OWNER moodleuser;

**Character set and encoding
CREATE DATABASE moodle WITH OWNER moodleuser ENCODING ‘UTF8′ LC_COLLATE=’en_US.utf8′ LC_CTYPE=’en_US.utf8’ TEMPLATE=template0;

first create a directory where moodle will be installed
-mkdir /var/www/moodle
-Download moodle from the site:
go to the directory containing the download
– tar xzpf moodle-latest-28.tgz -C /var/www/
make moodledata directory
-mkdir /var/www/moodle/moodledata

Set permissions(www-data is apache in debian)
-chown -R www-data:www-data /var/www/moodle/moodle/
-chmod -R 0755 /var/www/moodle/moodle/

-chown -R www-data:www-data /var/www/moodle/moodledata/
-chmod 0755 /var/www/moodle/moodledata/

(Optional step,though this is what i did;saves time typing the whole path to the moodle directory)
Change Apache to use Moodle as website
Note that the server comes with Apache running and looking at the /var/www directory. But there is nothing in that folder, so one just gets a redirect. Edit as follows to have it point at Moodle instead:
-vi /etc/apache2/sites-available/default

On about line 4, change DocumentRoot “/var/www/moodle/moodle” to
DocumentRoot “/var/www/moodle”
On about line 10, change <Directory “/var/www/moodle/moodle”> to
<Directory “/var/www/moodle/”>

Final Install
(if option above was used,first time install = localhost/install.php)

type : localhost/moodle/moodle in browser

How to install Odoo/Openerp in Kali (Debian)

After clean install
– update and upgrade system

Add user ‘openerp’ and such that it belongs to group’openerp’
–sudo adduser –system –home=/opt/openerp –group openerp.
-sudo su – openerp -s /bin/bash

login in back as root create passwd and add user to sudo
create password for user ‘openerp’as root
-passwd openerp

Add openerp to sudo group
usermod -a -G sudo openerp

Install postgresql
-sudo apt-get install postgresql
-sudo apt-get install pgadmin3
then start service:
– sudo service postgresql start
then log in postgre
-sudo su postgres e.g openerp@openerp-desktop:/$ sudo su postgres
then create user openerp
-createuser openerp
(y for super user)
view table created
-psql -l
select template and add rights
-psql template1
-template1=# alter role openerp with password ‘postgres’;
then exit (Ctrl+D)

Installation of Odoo


log on as root
(-adding the download URL (address) to the aptitude repository sources as root)

-echo “deb ./” >> /etc/apt/sources.list
then update system
-apt-get update
(Note: The OpenERP package itself is not signed, and a cryptographic key is not provided. Therefore, aptitude will warn you that it can not be authenticated, requesting you to install it without verification)
then install openerp

logon back as openerp
-sudo mkdir /var/lib/openerp
-apt-get install openerp
confirm dependancies and without verification
then start apache2
-service apache2 start

Add the following line to the openerp-server.conf/odoo-server.conf file:
logfile = /var/log/openerp/openerp-server.log/(logfile = /var/log/odoo/odoo-server.log)
-vi /etc/openerp/openerp-server.conf

then make the log file
-sudo mkdir /var/log/openerp OR (odoo) depending

Add permissions
add permissions to user ‘openerp’ to the openerp-server configuration file
-sudo chown openerp: /etc/openerp/openerp-server.conf
sudo chmod 640 /etc/openerp/openerp-server.conf

add permissions to openerp,assuming the openerp server is running under user’openerp’,to install addons
-chmod 775 /usr/lib/python2.7/dist-packages/openerp/addons/
-chown root.openerp /usr/lib/python2.7/dist-packages/openerp/addons/

-To start the Odoo server type:
sudo /etc/init.d/openerp start
sudo service openerp start

Download the latest file
Install OpenERP server.
-sudo dpkg -i openerp_6.1-1-1_all.deb
-sudo apt-get install openerp -f
reboot and start server

Access the Web Client using http://ip:8069
in case of this error:DataError: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII
do the following:
sudo -u postgres psql postgres
update pg_database set datallowconn = TRUE where datname = ‘template0’;
\c template0
update pg_database set datistemplate = FALSE where datname = ‘template1’;
drop database template1;
create database template1 with template = template0 encoding = ‘UTF8’;
update pg_database set datistemplate = TRUE where datname = ‘template1’;
\c template1
update pg_database set datallowconn = FALSE where datname = ‘template0’;
(press Ctrl-D to quit from psql)
restart odoo and try again.


Letter to the Kenyan patient…….(from the Kenyan Doctor)


Dear Kenyan,

Thank you for taking your time to read this…..

6 months post internship and I still suffer from insomnia. Mine is not a unique case, but one of every Kenyan doctor that has been in the system. I look back at the highlights of my long one year to remind me of how doctors and in general Kenyans must be so angry to do something about the situation.

I can’t quite decide if it is the night I performed 2 caesarian sections with the anesthetist shining the light from his Nokia phone because the generator did not function and the operation had started, or if it is the nights that I had to beg the anesthetist to come to work for life saving operations that brings back the nostalgia. Maybe it is the worse reality of recent events of doctors performing deliveries with no gloves, of young doctors dying of renal failure because they cannot afford dialysis or renal replacement therapy.

I wish to step back from the emotional laments, to look at a typical day for a doctor. The day begins in the morning, way before 7 am to prepare for the rounds, and continues to 5 pm. In general, there are on average 3 interns in properly staffed centers and occasionally 2 interns manning a ward. This means that you get to go on call on every alternate day. On a day you are on call, the day simply does not end. On a good day you may get some minutes to have some food and get back to clear the day’s work before night time.  Beyond 5 pm, one is designated to attend to all patients through the night, with a higher burden in the surgical rotations that may require you to go to theatre though the night. The unfortunate thing is that for most of the night it is difficult to get the help of specialists in the few facilities that have them, but it is worse in areas where you cannot access the specialists. On the next morning there is no break, and you continue to work the day till 5pm in the evening to complete a 36 hour shift.

Kenyan, did you know when I can get 2 hours of sleep at night I sleep on a bench in the tea room or laundry?

I applaud the medical profession in utilizing social media in communicating our plight especially on the use of twitter and facebook as a tool of advocacy. The social media has been the tool for the Kenyan public too to lash back at the medical profession, notably one from Alice

Such comments do not offend me but make me angrier. For instance, does the Kenyan public know about the several instances this year when nights were raped this year in 2 district hospitals during night duty by some ‘patients’? Does the general Kenyan public know of the humble initiatives to try and offer free service to marginalized areas organized as health camps?  I remember my first visit to Turkana as part of a health camp, and a lady with a chronic ulcer had to walk for 2 days so that she could make it to see the doctors. There are several young children with rheumatic heart disease that we took back with use to get more specialized care.

Reaching out to rural Kenyan communities to provide health care

Due to the exposure to the TB cases in the wards, the medics carry a higher incidence of latent Tuberculosis, with several doctors on anti-Tuberculosis drugs. For a profession with no health cover, most of the doctors have at one point taken ARVs as part of post exposure prophylaxis and lack even a basic Hepatitis B immunization.

Did you know the last time you sent relief food I had to line up for some. All shops in my area of work are closed down and my money is  worthless here.

Kenyan, the truth is there is no good working environment for medical practitioners. The system fails to provide basic equipment and even minimum staffing needs.

On a different view, we doctors are angry at you, the Kenyan patient. You must remember that we are not God or magicians or miracle workers. When you as a patient makes several visits from one local traditional healer to another and bring your poisoned child and lie about it, I will not work a miracle. I have no access to ICU services and I have not toxicology support to work up what the poison is. When all people in your village go blind and you continue to drink illegal alcohol, if you continue to consume the same brew you will go blind by the time you arrive in the hospital. I appreciate second opinions, but when you keep paying money to a quark that treats you for a “weak heart” and you stop your antihypertensive medications, you will get a stroke, and there is nothing I can do about that. Moreover, if you are pregnant, but decide to stay at home with no antenatal care because the last pregnancy was fine, remember hypertension is a leading killer and if you come with eclampsia you have a high likelihood of dying. Kenyan, when was the last time you had a pap smear or visited a wellness clinic?

Point is, it is time for change. We are not perfect, we are not asking for unreasonable terms. We are human, humbled to be in a nobel profession but with family and other responsibilities. We are asking for equal rights, an overtime that you the general Kenyan get in your work, some protection regarding the higher risk of the work and environment in which we work in.

We are asking you to be responsible for your health, and help us work better. Moreover we are asking for some piece of mind, and better health for us so that we can continue to serve you better.

We are sorry for the time you got less than optimal treatment in the system. I am sorry for the time I had to send you out to look for the IV cannulas for your dehydrated child to get any fluids. You may not believe this but there were none in the hospital. For the days you were frustrated because your anemic child did not get transfused, I called all hospitals and the blood bank. I obtained blood bags to allow several children to share one pint of blood because that’s all I could get. Kenyan, when was the last time you donated blood? Kenyan, I know you preferred that I rub your back through labour which I could not. I had 20 other patients in labour at that time. I know you were in pain; there are no pain medications for use in labour in our hospitals. I couldn’t rub your back, but I ran you to theatre when you had a prolapsed cord, or came in with a ruptured uterus, and saved your life.

Kenyan, please invest in your health. You do not allow my children to attend school with no unpaid fees. At the bank, I do not get free service. Yes, I use the ‘matatu’ and pay the hiked fares during the rainy season. In fact, at your place of work you clearly put up a notice saying “For credit, come tomorrow !”. I am simply extending the same courtesy to you. My services are not for free. Have you paid up for the NHIF insurance or any form of insurance?   Do you even save for health costs? Why do you make your lack of planning my emergency? The last time you came to deliver, you did not bring any clothes for the baby. This year you did not bring baby clothes again! Please respect my work area as I respect your own.

Yours sincerely…

The frustrated Kenyan doctor…

CCK vs Media Owners

The Media Owners (Technically, most of them are media managers) and CCK are about to fight like two ladies at Kenyatta Market.

Their fight is centered on a communiqué that the CCK sent demanding that all operating broadcast houses should re-apply for their licenses by November 15. Thing is, when you re-apply FOR all the licenses you currently hold (even the un-used ones) you might LOSE! No one knows the criteria CCK is going to use to issue the new licenses.

In Kenya, most of the broadcast licenses were issued through corruption. That’s the reason politicians have their fat fingers in so many media houses. Look at RMS, the chap holds 9 radio stations. Those are hundreds of licenses since all the station are national. Not forgetting, there is a limit to the number of outlets you can own.

This is the reason radio in this country is losing its relevance. Instead of a media house concentrating on ONE brand, they’re fragmenting all over and as they try and fragment, they need new license and since politicians hold all the lucrative ones, they get into bed together. Like in the case of Homeboyz Radio, a former PS owns that frequency (The chap has shareholding (via proxy) in at least 6 radio stations) if the CCK decided to go through the paperwork, Homeboyz would lose its frequency, so would SK and half his stations. Radio Africa has three frequencies that belong to a very connected politician.

For Capital, they got lucky and dumped Mark Too (Bet you didn’t know that) Mark owned the 98.4 frequency and Linda just piggy backed  on his power and influence to delay Kiss Fm’s launch. Patrick had to join hands with the Kitonny’s (who also had baba Moi’s ear) to get their license approved.

If the CCK is serious this time, they should cancel licenses of all stations that flout broadcast rules (Classic, good morning) and all the stations that are just dead air.

Fortune 500 Companies Have Room to Grow on Social

Many are using social sites and blogs, but usage has slowed in 2011

Many of the Fortune 500, the largest companies in the US, are using Facebook, Twitter and corporate blogs, but not much has changed with their activity in the past year.

The University of Massachusetts Dartmouth Center for Marketing Research released its latest study on social media adoption by Fortune 500 companies in October 2011. This year, the study found that 61% of Fortune 500 companies had an active Twitter account, with at least one new post in the past 30 days.


Fortune 500 Companies that Use Select Social Media, 2011 (% of 

Looking at previous reports from the Center for Marketing Research, this percentage is up from 35% in 2009 but about the same as 2010, which was 60%. Additionally, there hasn’t been much change when it comes to public-facing corporate blogs, with 23% of Fortune 500 companies using a blog in both 2010 and 2011.


Fortune 500 Companies that Have a Public-Facing Corporate Blog, 
2008-2011 (% of total)

This apparent slowing down of social media adoption is interesting, as many of the Fortune 500 companies, such as Coca-Cola, Starbucks and Levi’s, are well-known for their social outreach. However, this may be the saturation point for social media among the largest US companies. By now, if a large company with a big budget wants to be active in social, it probably already is. And those that are not may be larger holding companies or B2B brands that do not have public-facing social media as part of their communications plan.

This plateauing is also interesting when comparing the Fortune 500 to the Inc. 500, which is a list of the fastest-growing private companies in the US. Social buzz and outreach can contribute a lot to a company’s growth, so it wouldn’t be surprising to see a socially savvy company show up on the Inc. 500.

In fact, the latest Center for Marketing Research study on Inc. 500 companies, looking at 2010, found that 86% of Inc. 500 companies think social media is very or somewhat important to their business and marketing strategy. Their focus on social is something Fortune 500 companies can learn from and, possibly, grow.

Why teachers should go digital…

We ask our students to be good observers, consider the world carefully and to analyze the implications of what they see. As educators, it’s time we do the same.

Our classrooms may appear as we experienced them — a row of windows, a blackboard (OK, maybe they’re white now), inspirational posters. But the kids looking back from those same uncomfortable chairs are fundamentally different. They are like a Bronze Age tribe being asked to use stone axes. It’s time to put down the stone.

It’s true, no matter what we do, our kids will leave us behind — it’s the natural way. But we must provide them with the knowledge they need to improve the world. Our generation is the one developing all the new tools that offer limitless access to knowledge. So, why wouldn’t we offer these advantages — the ones kids can’t keep their fingers off of, even during class — and help kids acquire the skills they need to survive in a connected world?

To be fair, we have begun to transition away from “stone.” Textbooks, for example, are being digitized. But is that sufficient change? The good news is that our children will no longer be lugging twenty pounds of pulp on their backs. Revisions to their reading content can be updated on the fly, not each decade with new printings.

But is that really leveraging the full power of technology? If you think about how we use technology in our adult lives, it’s primarily a communication experience — email, WebEx, text messages and collaboration tools. It’s social, but we’re not letting these collaborative tools into the classroom.

We’d be blind not to recognize and utilize students’ inclination for social interaction and their obsession with mobile technology. This is our opportunity to join them on this side of the millennium. If we don’t, we will lose their attention, and to some degree, their respect. They know we’re teaching them, for the most part, like we were taught — like our parents were taught.

Here’s some typical summer AP English homework: “Read Walden and write a report on Thoreau’s theme.” I’d bet that SparkNotes sees a surge of traffic in the last week of summer. It’s not that Walden doesn’t contain big ideas relevant to today’s kids. But they’ll do better by constructing meaning from it socially — not alone with a text and a Google search for “Walden Thoreau Themes.” They need something tangible to learn by imitation or iteration, which is the way we all learn most everything. They need to see and hear what academic discourse sounds, looks and feels like.

I understand this is easier said than done. The best solutions are still being explored and developed. But there are many online resources that are changing education significantly. Companies are spending capital to develop interactive visions for math and science. curricula. There are some great solutions out there, and it’s just beginning. But it takes the will and desire for change to ensure today’s students are taught in a way that is relevant. If used correctly, the tools of the 21st century leverage the best of the old and build on the successes of traditional teaching.

To be sure, our students will leave us behind no matter what we do, and I’m OK with that. But when they do, I will rest easy knowing we did our job the best we could — that we led by example and were not afraid of the future. All it takes to know this is the right path is to observe the world as it is today and consider the implications for our children and what’s really at stake here. From there it’s easy — leverage all the tools available to foster creativity, inspire curiosity, and provide the knowledge our children need for success.

My funny Blogs

In today’s world we are more engaged towards our Life Target. And Internet has changed the whole scenario of Living Life. So i thought it would be a great idea for me to list few of my favorite Humor Blogs  sites which I visit very frequently.











I hope you have many more other sites from where you have fun. Share them with us, we would love hear about them.