RSS

Tag Archives: 254

So begineth me and Ruby on Rails

Wait before I begin this code stuff, I was just  playing Let Nas Down off that Born Sinner album….all I can say this some epic music…best line he says “Long live the idols may they never be your rivals,pac was like Jesus,Nas wrote the bible”  Then thanx to @TayianC I got the rmx to it where Nas replies to J cole…. Story for another day lakini…. Back to code

1883857_orig

As I blogged here last week >> am learning ROR (Ruby on Rails) from scratch…with mentorship from some of the best ROR coders In Kenya. The first step is always setting up the environment,and trust me you don’t want to be that guy going at a pro  “how do I set up Ruby on rails on my machine”..so Had to do it myself…hit the usual stumbling blocks and decided to write this to help anyone who will go through the same:

First  my environment Fedora 17 GNOME on 6GB RAM, Core i5. That being said,I tried setup the  old fashioned way

sudo yum install ruby
sudo yum install rubygems
gem install rails

Screenshot from 2013-07-08 09:53:09

But the problem with doing it that was is I could not install some gems (rails,sqlite or mysql)

Screenshot from 2013-07-08 12:42:42

So after some research and asking around I got to learn that I should do this setup using RVM ….so here is how I did it

First install  the prerequisites

sudo yum install git-core curl make bzip2 gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel libxslt-devel sqlite sqlite-devel openssl openssl-devel

We are now ready to install RVM:

bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

…followed by,

echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bashrc

Finally, reload your .bashrc file with the following command:

. .bashrc

Ensure that RVM is loaded with the following command, which should output “rvm is a function”:

type rvm | head -1

The following steps will install Ruby, Rails and the Sqlite3 gem. Execute these in order:

first,

rvm install 1.9.3

then…

rvm use 1.9.3 --default

Screenshot from 2013-07-08 12:12:23

followed by…

gem install rails

Screenshot from 2013-07-08 12:30:57

…and finally,

gem install sqlite3

Screenshot from 2013-07-08 12:40:07

 

And Viola you have Ruby,rails and sqlite setup (if you are planning on using MYSQL then you can as well install it instead of sqlite)

 
3 Comments

Posted by on July 8, 2013 in Uncategorized

 

Tags: , ,

Guest Post: UBAYA WA MAHACKATHONS NOWADAYS

Its been a while since I had a Guest Post on my Blog. So when a pal asked whether I could let her do one then you Know a bratha had to say Yes . So here it is {she blogs here if you are curious >>>>}

UBAYA WA MAHACKATHONS NOWADAYS

Been meaning to write this for a while and finally here goes. Ok Im not against competitions but seriously we need to rethink why and how we have these.

Napenda watu wa campo hio si issue but most of the time when you go for these things you will find majority of them there.  Si eti the other guys hawataki pesa but people be too grown for these (as in guys don’t just go for competitions just for the sake, watu wako busy wanacode “fa sustenance” si for pesa ya weekend. Lakini ka doo ni mob sawa). Most of the time you will get those who are on holidays, those who just cleared from school na wamecome kusocialize,  na wengine they just love the experience. Kuna wale huenda to make an extra buck and don’t think beyond the hackathon, then there is a fourth type of guys who have gone there with an intention of meeting the local Tech scene (if wazito watatokea), put what they know to test (coz they actually have initiative to teach themselves real code) and learn from the experienced people (they know there are guys better than them) so as to perhaps create networks for side husle jobs to build their skills.

Now we all know in campo unless you own a business or wewe ni husla you are usually broke so the sound of getting Ksh. Xk in a day sounds very exciting. Now it won’t matter if you actually have any skills or you are willing to do your best to add value to the team but getting the mulla is the focus for you since by mere fact of being in a team hata kama hukudo any, assures you a cut. Then lastly kuna wenye hujiita magurus and they think wanajua kila kitu….wololos!

Now this bunch (know it alls na joyriders) is what is giving competitions a bad name. Manze unaenda hackathon na unakutana na watu wanataka tu doo na they don’t even want to work for it. As in there is a difference between a commercial product and a class assignment and what they want to give is classroom material. When our University students go abroad for internships and the likes if they are doing CS (Computer Science or related stuff) they usually notice the difference I guess it’s the fact that they realize watu wengi wamezoea shoddy job kwa daro as in  “bora nipate marks. Meanwhile as we write Hello world in all languages kuna mtoii amepublish apps kadhaa kwa iOS …ok Moving on.

I think the standards at Hackathons should be raised as in if you tell every Tom Dick and Harry to attend kuna wasee hata even for their own good they don’t learn anything from there since they give minimal or no input. Then it has been noted (relax statistics bado hazijatolewa) that most startups formed by strangers in Hackathons especially mastudents hawajuani  or any other group don’t last beyond that. Only people who know each other well or have worked together and know what everyone else brings to the table have been successful.

Don’t get me wrong there are many gifted students shout out to UON, Strath, JKUAT, Egerton, Baraton, KEMU,  and the other Kenyan Campos’s but seriously saa zingine ……..Sawa that all!

 
 

Tags: , , ,

ctrl -A,ctrl- C,ctrl- V coder

Wacha niongee ju nimenyamaza for long….ok I have credible reasons for that but before I start hauling insults left right and center let me first share one or two heart warming things with those readers  who give me   genuine reson to write:

First I have just completed 2 Apps this month  which is kinda great for a small time coder as my self.(I read the guy who worked on IRIS did the whole app in 8 hours…..) Si wezi danganya nikuambie they will be the next great Ideas out there but what I can garuntee is they are coded  like the Egyptians build the Pyramids{Pure Art}…The way KaBinti looks {Pure beauty} The way my erection feels {Hardcore} So after all those man hours of coding I had to indulge in kidogo froth Thursday to Sato style…just the way Jaymo likes it.No wonder @mwas_LT was complaining about me drunk tweeting

While on that  topic of coding wacha nigusie kitu, I have great respect for the Kenyan code greats,@iddsalim Mohamed Maway @mbuguanjihia ,jaws na wengi wengineo I have blooged about them in way too many occassions, so let me talk about my league of coders,guys who come to me for code advice and I also replicate , this coders deserve attention pia.I have respect for kindred spirits  like @TayianaC Brenda Angweyi @twinkioko @ZacckOS people who actually ask for help code ikileta nyef nyef, guys who help you build your code skills by helping them solve bugs in theirs,but wale wamenichokesha ni ma copy pasters ma ctrl -A,ctrl- C,ctrl- V coders 

Haya sasa nime jam,why did i  have to go there,So here is what happened Coder flani…ata si coder,ni ka jamaa kanajifunza code,after kissing ass a whole semester i decided to help him with code kiasi, i recon its me giving back to society,Nothing wrong with that right? so mbona ume jam basi Jaymo, Well the dude carries a flash with him like kila tyme,so i chuck out kiasi and am guessing ndo workspace ili fanyiwa maneno, I come back to find dude with the Dog ate my homework  look,reading some pearl script i was working on for a pal,Kajamaa kakadaii ati ohhh wacha kaende kame pata what he wanted.

So mimi bila kujua nikaendelea na works,2 weeks later I hear he is doing Beta Testing <unaanza aje Beta bila Pre-Alpha na Alpha>. So i check out his .apk,walahi ni code ya Jaymo.Design,dimens,styles kila kitu….mpaka my customized quickactions.Yote…yangu

Mtu huambiwa asirushe mawe kama huna proof so i decompile his piece of crap,nyga ata ku obfusicate ni kazi ngumu kwake…manze code ni yangu, mpaka method namimg,class names…drawable names,raw zote…in other word this is just my work…..Nikajam,nika toka nje kuona kama kuna mahali nje ya mlango yangu imeandikwa opensource,au github HQ

Na mimi si ule msee wa kuketi na wezi chini tukiongea{Intelectual theft},Damu yangu ya umeru haiwezi, kwanza ilikuwa inadai nitafute panga nimshikishe adabu…but any way there are several  ways to correct a wrong.Tuesday  ndo nili roll  out operation shikisha adabu…4 hours attack on his computer….na ju haka ka jamaa ni ka WI-Fi junkie running a windows machine haikuwa kazi ngumu kuingia na ku erase my code from his HardDrive, re wrtite his and make all his methods echo “DAWAA YA WIZI NI ADHABU”…sasa naskia kana sema ati kana target machine yangu for subbotage.So here is what i have planned, you all know bubble gum Riddim…ile Riddim huchezwa kila mahali siku hizi, kinyozi,kibanda, choo,ma3 za kayole..bass hiyo..haka kajamaa kakidai za ovyo hivyo ndo source code yake itakuwa

Buda you really want to play it like that????

 
3 Comments

Posted by on February 26, 2012 in 254, campo, code, hack, JKUAT, twitter

 

Tags: , ,

Things to do in 2012.

so every one comes up  with a bucket list of things to do in a new year sijui you want to get saved or you want to save some endangered species in the amazon or plant trees in the mau… well my bucket list is rather….well…. rather  Jaymo. Any reader of this blog will attest  to my over indulgence in that which I call froth, the same readers will also attest for my deep love for code, but i promise to tone down on the froth this year, after several muggings in 2011. But for real though 2012 is the last year i have in college{dont even think am gon do an MSC}

so for 2012 this is  what i want to do

1.)Get a Muturi call

Yes we all heard that call “….aki muturi ku** inawaka moto….” yes boys and girls i want me a call like that, where she begs me to come rock her world like the flintstones and then i give her a lame  exuse like “aki babie si unajua na code, niko na project flani nafanyia client na siwezi kuja….” and then she will go like “.. aki jaymo ntakulipia taxi,atakama unataka meli ntalipa….” all this while the phone is on speaker and the crew is LOLing like they just smoked a spliff. Any way you get the picture

2.)Ship marto to some weird tao when he is passed out

This is not exactly me being all creative, i borrowed it from shameless, if you dont know what shameless is click here>> well in the series the old man passes out after indulging in froth and finds his ass in canada, yes he is shipped from states to canada. And that is what i plan on doing to one Marto this year. You have been warned

3.) Go to a Jew wedding 

Jaymo wacha utiaji wtf you talking about ati a jew what???? Niko serious btw, av always wanted to those guys just rock, they exchange vows, break glass, then lift the bride and groom on a chair. like seriously, sasa imagyn niko maji alafu  mimetokelezea kwa weeding kaa hiyo #winning

Av always wanted to lift someone on a chair,so a jew weedding it is for me, ju ya hiyo story i should start hanging around  their synagogues in tao, so mkiniona you know what am up to

4.)Blog more often.

I pulled a sebatical last year and abstained from written words,am not going to lie and tell you i went to the bahamas to discover myself, heck i was in kenya, doing nothing out of the ordinary, jaming to campmulla while dissing em football fans. so this year amo stop all that, and promise not to blog about Kabinti…..as much

5.)Code,code,code,code

Yes how can i forget about code, hii raundi am going HAM on yall, so wasee wa ruby jua your bwoy be coming through in 2012, i once heard a coder say that if java is a pair of scissors then ruby is a chainsaw, basi ju ya hiyo story si php itakuwa a pair on nun-chucks???? I want to have the honor of coding with someone like mohammed ahmed maaway,or debug code for eyedol. yes you bwoy be going HAM… listen to a coder like Linda Kamau talk about the code while thinking of banging a female coder like mariegithinji... yes code lazima iendele.

 
1 Comment

Posted by on January 16, 2012 in 254, campo, code, Humour, JKUAT, Reflections, twitter

 

Tags: , , , , , ,

Before I forget.

She looked at me with genuine interest and told me “Jaymo wewe una shida, you are a drinker with a coding problem”… so obviously am shocked, coz am expecting the opposite, i mean a coder with a drinking problem, but she went on “Siku gani hujawai lewa ukatae kunipatia story za code, this and that… sijui vile source code yako unaeza obfusicate na haiwezi someka…. dude in short am tired”….. yes a bratha was getting his Ass dumped for being inloved with his bottle of froth and that laptop  he calls lillian than being in love  with her……

Yes good people this is the first meaningfull post of 2012 and am listing all the crap that struck me in 2011 starting with the  one above. 2011 was a great year by any  standard, but it was equally frustrating so allow me to indulge you with my 3 worst events of 2011.

1.)Cougar Clande

Dont look at me like am some sort of perv, kama you neva had yourself a cougar clande then i suggest you  get yourself one, kwanza a monied one, ki Mbugua style. so your boy akaJaymo had himself a cougar clande, all was roosy at first, i mean she gave i received and i gave and she received {you  get the picture} but things took a rather dramatic turn after  my first sem ended, she got all possesive and shyt, getting all jealous of my girl Jean Grey, the fore mentioned cougar clande went to caosto for the new year and then came back to dump a bratha, imagyn a bratha being dumped coz he chats with Jean…..

Here is what the clande should have known: i spend most of my time either on twitter,unlimited text, or coding…. none of which anaweza hack{the texts pia} so why the fack you  getting all insane coz akajaymo wants to get some loving from a more 21st century member of the opposite sex???? ukipata jibu unaeza nipigia simu 0722***080

2.)Grand Theft Liquour

Last sem saw me  relieved of my wallet, cash, phone and house keys in one session. I swear the guys who saw  me that morning will admit i looked like a total wreck. dude you ever watched that scene from hangover 2 where they wake up all disoriented with no idea where they are? yap that was me, bila fare bila shyt!!! but i was high as fack, nakwambia ningekuwa sober ingekuwa a whole different thing…any way shyt happens ryt?

3.)The crew 

the crew is the best  thing in 2011 and still the worst  thing!!!! there is so much to talk about the crew that i think amo dedicate a whole post for em. But the worst thing in 2011 courtesy of marto,pato,eddie,JB,brayo,julius,mash na hao wengine wanao jijua ni ku throw a bash with two goats,mtungi ya keg na saa hizo ni wasee 11 pekee, suicide i tell you, how that bash ended up from being all fun to wasee wakipigana na wengine wakifunguliana roho… waaa boss that must have been the shortest bash from 2pm -7pm  no comment naachia hapo

So 2012 we doing it all again, drinking, coding, the may hem, the drama!!!!!!

 
Leave a comment

Posted by on January 15, 2012 in 254, campo, Humour

 

Tags: , ,

Me and Code:

I like this Fabo’s song that goes something like “…… sometimes I amaze sometimes I disappoint, sometimes I treat friends like its just some change, like shaq in the  line you probably miss the point but when you take a chance ever wondered where you took it from……..”

I am all sleepy, its 11.08 pm and I havent slept since jana… What have I been up to? well you may think I  was engaging in the usual froty indulgence that saw me photofinish some time in the Am and I had to get my ass back to campo in time for that Numerical Analysis lesson<yes I  have a class on a public holiday>. But no I was coding… I got in the zone around 7pm jana evening and  hevent left my machine since… I must have overdosed on  coffee coz I swear I cant feel my face.

Am listening to Denis Brown as  I write this not because I  have suddenly shfifted to reggae for relaxing but simply coz my playlist has ishad and the last songs I  added were reggae. I love code… the feeling one gets when you type something into an IDE and a living breathing(ok not exactly breathing) piece of software comes out. I guess that’s what God must have felt after creation,looking at the work of his hands and smilling simply to himself. I have been struggling with JSON for sometime… it was posting an error in my application….what application you may ask?

well for my final year am writing an android application that makes realestate mapping very easy, crudely put unaweza tafuta hao very easily… well Several of m beta testers have benn comaplaining that the code was posting some run-time error.  Hii imenikuala akili sana, so I  had to find a way of solving it bila ku re write code yote. Jana afta supper  I  went online. Found several forums about this and that,and started operating on my patient call me doctor James.

I get in the zone most times,plug in my head phones and just forget it all…. get all indulged in the code. At times this facks up alot of things in my life… yes you know that saying that goes that all nerds end up being alone coz half the time they chase away the good things in their life and elope with the code ,well its true..so before i go to sleep, i want to clear the air and talk to one or two readers who happen to be close friends of mine but who i have lengad for some time due to my over indulgence in certain.

Sorry pseudo names will be employed to mask true identity….

I begin with Biquits.. yes i know am a dick at times, i  spend more time with code than i  do with you, its nothing personal, i know you understand.. you the one who encourages me to do this stuff and even when i get syntax errors  i always know you will tell me to keep my head up.

Kabinti...Frothy friday nilikuona but shyt happened, went back to campo and ave been coding since.. i missed a CAT coz i was too tired from the previous night to even soma. I know you good kwenye uko so i will achia hapo..just wanted you to know.

Jean Grey aka the therapist,  If you buy a gun and shoot me then let it be stated in my will that i forgive you, I have not seen or heard from you in ages.. i don’t know if you even read my blog anymore but if it helps i still miss the sessions where i would speak geek and you would Google and try to be all nerd on me. Miss that alot so as soon as my app is done me and you are doing that Coffee at Mug’s

 
2 Comments

Posted by on October 20, 2011 in 254, campo, code, Humour, JKUAT

 

Tags: , , ,

Work of Art.

 

He is an artist,born & bred in Machakos,fine-tuned in Nairobi.
He draws and sketches,creates and ocassionaly destroies.
He gives his mother credit for placing a crayon in his hand at 3 yrs of age.
His art has however evolved alot since then drawing,painting,architecture,interior design graphics and his current obsession
Photography
He graduated from college as an Architect and now mascurades as an interior designer and a moonlights as a photographer
Sample his work below before his true identity is revealed

 

This is the Smaller structure of the KICC(Kenyatta International Conference Center) as shot from the helipad of the same building.

A sneak peek of the KICC in Nairobi as seen from the Nation Center at dusk. a work of art if you ask me

The Kenyan Flag as hoisted on the Promulgation day.

20th  Century Plaza as captured  by his camera.

According to me,if Picasso was alive then am guessing he would hang out with this dude,catch a beer or two,Ladies and Gentlemen presenting Mutua Matheka.

Links to some of his work: MutuaMatheka.co.ke & mutuamatheka.wordpress.com

 
2 Comments

Posted by on September 24, 2011 in 254, twitter, weekend

 

Tags: , , , ,