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:
- Registration with Ajax/JS validation,
- Login with Ajax/JS validation
- Password reset via email
- Change password
- A time-like like FB with Status, Comment, Like, Dislike
- A friend search utility
- Add/accept/delete/deny friend
- Upload and view photos
- Upload and view videos
- 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.
- 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
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.
Back to code.