HandsOn – Create HA, Scalable web/mobile apps in 2 months

Sep 24, 2012 15 Comments by

Code like the master you are destined to be [pic c/o http://bit.ly/SpFEym]

This blogpost for today is for CODERS and wannabe-Coders only. Techies, If you allow me to use some media language. So, cooks, watchmen, wasee wa Man-U, shoe-shiners and cobblers etc, kasomeni ‘Dear Dorcas’.

By the way, leo naweza tukanana.

Nishasema. So, ofcourse, #teamCatchFeelings, msinilaumu.

So naanza na a short story.

This jamaa is always sumbuaing me in twirra manze. His hunger is insatiable. Nyege kama boyie wa campo. Actually, ako Campo. UoN. No. Si ki-ushoga. Mimi si msee wa Drive A kwa Windows. Ama msee wa back-slash kwa Linux. Ama wa Man-United kwa ball. Ngumu. This jamaa sumbuas me and all he says is this.

“Salim, send me code, DB and Schematics of your simplest PHP web app. I wanna see how you code so that I can improve myself as a coder.”. This kind of shiite always humbles me.

So, I sift through all my projects and one UGLY thing called an NDA always pops up. So, a dilemma, I find myself in. Get a solution for this dude and many more with similar requests, I must. Breach client contracts and share paid-for-code, I should never.

The dilemma is simple. On one hand, we always talk about how pathetic wasee wa Strathmore are when it comes to coding. How wanna-be-ish UoN and JKUAT guys are when it comes to business-level code. Ofcourse, they are hello-world gurus. No doubt. Sijamention Nazarene, CUEA na the rest. Nitaambiwa nimetukanana. And we do nothing about it to make sure these kids can code in the RIGHT way.

On the other hand, the REAL coders I have met in Kenya. All 17 of them, are too busy to do idiotic things like sit with a Human and teach them how to coder properly. There are too few of them to manage this mean feat. So the rot continues.

We see banking systems and mVitus running on spaghetti code written to a kindergarten efficiency level. We laugh and criticize from our high-seats, ignoring the fact that WITHOUT support and guidance, this is the best these maafaqaz can do.

But that’s not enough. We see a sadder end-result. A catastrophe. Alot of thinkers who would easily be master coders end up doing some stupid stuff like Actuarial Science, Sijui Engineering nShit.

Lastly, I have been called, many-a-times to companies where a system needs support or a little redesign and I had the satanic experience of going through BADLY written code. Ohh, the pain! Ohh, the misery!!

So, in my spare time, I have been designing a simple system that I am releasing as an Open-Source starting point for someone who has interest in writing code that:

  • Is very easy to read and understand. Segmented and documented.
  • Is easy to manage and hand-over to new coders or coders of less knowledge and skills.
  • Uses the BEST and fastest combination of web and server technologies.
  • Utilizes as little I/O (Disk,network) as possible and is BLAZING fast.
  • Uses HMVC (Hierarchical MVC).
  • Runs on any DB a client would choose [MySQL, PostGres, Oracle or MsSQL]

Ndio kusikuwe na excuse yaani. After today, writing bad code should by punishable by sneers and jeers.

Haiya! Twende kazi.

So, I thought of a simple app. I called it Mkatiano Version 1.0. Think of it as a clone of a social network e.g. MySpace, Tagged, FB etc. Something that you can easily relate to. The focus here is on concepts.

It has the simple features below:

  1. Registration with Ajax/JS validation,
  2. Login with Ajax/JS validation
  3. Password reset via email
  4. Change password
  5. A time-like like FB with Status, Comment, Like, Dislike
  6. A friend search utility
  7. Add/accept/delete/deny friend
  8. Upload and view photos
  9. Upload and view videos
  10. View/update profile

To eschew complexity, I am uploading a simple setup that has features 1-4 above. Every 1 week I will release one extra feature, so that we learn together slowly. Hapo vipi?

“Salim, you are getting me wet! When do we start?”, you ask. Ok. Ok. I heard you. Grab your copy of the code from here: Mkatiano Repo on BB.

Then:

  • Download CI 2.1.2 and install it. Change the paths and domain names kwa config/config.php
  • Install Postgres and Import the DB SQL file (mkatiano.sql). Change config/database.php to conform to your setup.
  • Install CouchBase 1.8.1 and change the lines in config/config.php
This ALONE, will be a good proof that you are willing to learn. Please don’t force my next blog post to be : “How to setup the environment to run Mkatiano v 1.0″. Mwanamme ni effort. Mwanamke ni details.

The repo has fully working code, let us meet again here in a day or 2 to see if you have managed to have the app RUN on your laptop/pc.

Kazi kwako.

Back to code.

Wazi.

Coding, Personal, Startups

About the author

Coder, hacker, inventor, pool guru.

Switch to our mobile site