Tuesday, 6 November 2012

Zen Of Python

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

Saturday, 27 October 2012

How to Install Aptana Studio 3 on Ubuntu 12.04 LTS (Precise Pangolin)




1. Install the prerequisites

 In order to  access the Sun JDK, do the following:
sudo apt-get install libjpeg62 libwebkitgtk-1.0-0 git-core
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

Note:
libjpeg62 is very important and without it you will encounter errors like this:

An internal error has occurred.
No more handlesNative code library failed to load. (java.lang.UnsatisfiedLinkError: /opt/Aptana_Studio_3/plugins/com.aptana.swt.webkitbrowser.linux.x86_64_1.0.0.1295409059/os/linux/x86_64/libcefjni.so: libjpeg.so.62: cannot open shared object file: No such file or directory)
2. Download Aptana Studio

 You can download Aptana Studio 3 here. Select the "Standalone Version" if not selected and click download.

3. Extract Aptana Studio


sudo unzip [name of Aptana Studio ZIP file here].zip -d /opt


4. Add the menu shortcut



wget http://www.samclarke.com/wp-content/uploads/2012/04/AptanaStudio3.desktop
sudo mv AptanaStudio3.desktop /usr/share/applications/AptanaStudio3.deskto
 For all of you who are security conscious, you can check the contents of
AptanaStudio3.desktop .

Hope this article is of help to you who is reading.


Wednesday, 17 October 2012

What is Python? Beginning Python

How I Learned About Python
After hearing about this word, "Python", I set out to discover what it was all
about and how different it is from other programming languages. Created by Guido van Rossum in 1996 .

What is Python
Python is generally a general-purpose, interpreted high level programming language whose design philosophy demands code readability. It is open source and can run on all platforms i.e  Windows, Linux and MacOS X and has been ported to the Java and .NET virtual machines

Python is Like
Python at most times has been compared to languages like Ruby,
Perl . It is popular for its said to be clear and expressive syntax. Like Java it also comprises of a large and comprehensive standard library.

Versions of Python
Currently Python2 is the one mostly used, Python3 is still in the development phase. To install it to your machine you can download it from The Python website.

Why am Learning Python
So we have talked about what python is and how you can download it. the reason why i have to learn Python is so that use one of its framework, Django
which is popularly know for its dynamicity in the development of web application.

How Do you Learn Python
This brings me to the question that may be in many of your minds, How do i learn Python, since i have it installed in my machine. For me I am using the book Learn Python the Hardway by Zed. A . Shaw. I find this book very good for beginners since it helps one learn the language in a short time and simultaneously giving you the  feel of what programming is and how it should be done.

When you Get Stuck
If you think you are stuck in anyway while doing Python you can always join the Google Group comp.lang.python and post and am sure you may get answers that may help you.

Punchline
Until next time. I hope this post was of help to all those who read it .

Remember Programming is a skill its just like riding a walking, the first time a baby starts to walk, the baby usually falls but with time, the baby learns to walk and walking becomes part of the child's, same to Programming, ensure you practice at least 2 hours a day and withing some time you will become a better programmer.



Tuesday, 4 September 2012

Campus Divas For Rich Men


CAMPUS DIVAS FOR RICH MEN



The facebook page Campus Divas For Rich Men is page that has elicited alot of interest in the past few days.Since the debate on kiss 100 a few days ago by Shaffie Weru and Kalekye Mumo on the  rush hour as well as Caroline Mutoko’s morning show the page has grown wildly.It now has over 30,000 likes and is still growing.Is this a replica of what is really happening in our instituions of higher learning?Are the young ladies in this institutions this hungry for money,luxuries and a smooth life?Is the moral fabric this stained with wild thirsts and lust for money and pleasure?


The government having increased the number of universities in the country implies that now a higher population has access to the instituions.Introduction of parallel programmes and the accelerated university intakealso  implies that young kenyans who have not really matured emotionally and maybe mentally are now in the instituions where everyone is a guard of their live.But can we blame the government for this?It would be pointless to do so?So where does the problem lie?Who is to blame?
Searching for answers for this questions has brought me to a dead end.Some part of me would love to believe that the 30,000 divas out hunting for rich men is quite a  negligible number.But it is not.At what point does education have impact on ones life.Isn’t it pointless to be of great knowldge and no morals?
You be the judge but the group keeps growing,other groups against it keep sprouting an interesting one being Campus Hunks For Rich Women.


The administrator of the group has been linked with satanism.i’d call him a disturbed guy..one of his posts reads “Angel from below,i wish to sell my soul,devil take my soul,with diamonds you repay i don’t care for heaven.....”some say all this is after a love story gone sour.



But one thing is for sure times have changed..and this is an E-brothel that I pray will die out soon enough. Bringham Young once said “when you educate a man you educate a man,and when you educate a woman you educate a generation”we should not allow generations to be destroyed by people  whose lives no longer have meaning.Take charge of your life look ahead,make wise choises ,make a change.
                                                                                                      CAMPUS DIVA WITH AN EYE FOR THE FUTURE.

By Muthoni Wanyoike

Monday, 30 July 2012

SouthAfrica Gets Gold and A World Record


South Africa was able to clinch its first Gold medal after 24 year old, Cameron Van Der Burgh won the 100M Breaststroke outdoing the WR record holder Brenton Rickard of Australia and two-time Olympic champion Kosuke Kitajima. He was able to clock 58.46 taking the WR and OR. South Africa now have one medal up in the tables. This is the first time a South African has taken this event.

Friday, 27 July 2012

London2012 on your PC

Its 15 hours to the London2012 Olympic games and everyone is excited. For y'all who don't have coverage of the event you can log on to www.youtube.com/olmpics and you will be able to stream the event by preference.
Join the London2012 Olympics through your computer or Smartphone

Sunday, 22 July 2012

Letter to Sweet

Hi there, thought i could sing but heck No! I can only rep the Mic. People around just ask who this is but let me just break it down to you am Kenju, i guess there are many of us there but this particular one from the 254.

I don't know why the world has to be so cruel but Sweet I always thought there was something between us. I see you sweet and my heart just pops out like bottle top on a Coke. For you I would do anything you wish.

Sweet, when i see you, my mind goes as blank as a new book waiting to be filled in with writings. Many are the times my friends just say, "Hey Man just let her Go". I often listen to them just as mother would tell her child, but problem is I can't she has got me into this quagmire of thoughts and am thinking like should I move on or should I try more.

Sweet, I would like to transform like Chris Brown and be like Lil Twist so that I can sing to you "Love Affair" because this sole issue of love is Killing Me Softly just as Alicia Keys puts it. Sweet I ain't no rock artist but i bet I can rep the Mic just as Biggie used to rep it in his days. So Sweet, let Kenju be Kenju and not a knockoff version of Kenju that just tries to impress you.

But anyway this i guess will be my last calling, I will not stand there and let Kenju254 be blown away like a wilting leaf is blown away into the skies and vanishes. Kenju254 is like the Statue of Liberty who will be alive many decades to come in hearts of people around him.

Please Sweet, stop giving me mixed signals, Let me be as free as a bird that flies into the sky fearing no one. Sweet, i want to let go but i cant, I don't know what kind of voodoo is actually being used. Its like am enchanted. There is nothing I guess i haven't done, evening the venting has been done, pouring my heart out like wine on wine glass.

I don't know who else has been into this quagmire of events? Am I the only one? And what should I do next? Should I go on ? Should I just drop her like a database on my  local server? Because this database is tampering with my local server. Am torn apart on the "sijui niseme Yes ama No"?