Thus Spaketh Idd Salim

Tag: Coding

The forgotten warrior – Small is big

by on Feb.24, 2011, under Coding, Personal

The big white obscures the small black...

Naskia poa sana leo. So I picked a nice topic to blog about.

Hapana. hapana. I won’t talk about whose sister I converted in to a .pif yesterday. #didNotHappen. No. Hizo niliachia watoto wa campus. Ni kama windows machine ikijisifu ati ime-crash. Those are kawaida things.

Also, sitaongea about some nice chats and emails I have been having with some nice people of late. It is amazing how many good people are here and how Karma takes you to them and them to you, once you stop dealing with useless people. This is always a reminder of the fact that God (or Allah, The Universe, Karma, Fate etc) wants you to be happy. And what you allow yourself to contend with, will always be your maker or destroyer.

Pia, sitaongea about some obscure organizations that I have received emails from asking me to join them. Hapana. Not that.

Leo I want to talk about something big. No. Not my bazooka. Something tangible and real. (Ok, I hear you. Even my bazooka possesses those 2 characteristics).

I was reading the blog of one of my close friends, allies and partner in crime. And I got instantly turned on. Mentally. You pervert! (I get stimulated more by TechTalk and TechDo than SexTalk. So don’t believe the hype. Or your perception of Salim. Mimi husteadisha more niki-code ama while talking about IT than with madem. #noHomo.) He did not blog about the Masinde Muliro garden orgy. No. There are more pressing issues to talk about.

He talked about the concept of a SIM-Embeded Facebook app. Broadly, sim-embedded social networks. Something waaaaaaaaayyy overdue.

I was talking to some technical and VAS jamaas from one of my most loved companies, Safaricom. We discussed NFC and its uses, security concerns and applicability. We discussed JavaCard 2.2 and 3.0.1. And then it hit me. SIM Card App programming is the gSpot of Mobile Technologies.

On Monday, I was at iHub at MoMO and listened to Kamal talking about Elma. Then overheard some real coders and wanna-be-coders (wasee wa VB na the HelloWorld Gurus Crew) and some CodeLessForm-Designers talk about how they are going to ditch their tools and jump to $toolX (replace toolX with Elma, Android, iPhone, QT, Bada and YaddaYadda) … err… and .. err… make millions.

Ohh, how mistaken they are. Personal Opinion: J2ME is here to stay. At least for the next 5 years. If you REALLY must achana na J2ME, do ONLY QT or Android. Just my view.

So, in my possession right now is the bomb to a terrorist. The durex to a ukuta like Mette and Sebbo. The youporn to the computer porngrammer like Ezra and Knoxx. The paintbrush to the artist. The reggae CD to iTosh or Gabbu. The Nunchaku to BruceLee or Daud.

I have the full Gemalto Developer Toolkit. With Blank SIM Cards. For SIM card programming. Won’t use it immediately, coz I gotta finish ProjectX4 (deadline set to March 5th. #soHelpMeGod) and Start ProjectX5. The JavaCard.

But niko nayo na hauna. #MezaMate. Talk to me if you want to start/learn JavaCard Programming.

Back to code…

Wazi!

6 Comments :, , , more...

I am gonna be forking all night; today

by on Feb.19, 2011, under Coding, Personal

Yeah. Pervert, I know whatchu thinking. Shame on you. This mosprolli sounds like one of those ‘Mrembo shikilia ukuta nikuonyeshe‘ escapades. Call me a motherforker if you like. But tonight, I am going balls-deep into process forking.

I just encountered a very sweet problem today. And I want to solve it in PHP. Yes, I know. Java, C++, Python and .NET can do this in their sleep and with their pants off, but, PHP it is. PHP with JIT support. Compiled PHP scripts.

Not the slow kawaida dot PHP files running on top of Apache in plain-code.

So, what’s the problem?

I faced this system doing a script for YU. DB design issues etc aside, we needed to have a script execute a certain set of functions and commands, then release the resources. The script takes 3 seconds to handle 100 records . But there are 200 new records per second. How do you handle this load. How do you ensure client requests are not delayed. On the same hardware. You fork() off!

The load on the server is like 2%. But the single script is locked on a loop and must complete before doing the next 100. This is a very optimized piece of code and the transactions are complex. But the resultant operation is too slow. What do you do?

Solution

Make the server work. Hard. Fork the processes. Redesign the code and fork off the code and functions that don’t need intervention and a front-face to a thread. Have as many child-threads as the server can handle (80% throttle) and have each report to a master monitor.

The effect

The ability to handle over 15, 000 records over those 3 seconds. Same hardware. Same DB load. Even more. Sijali. Happy clients. Fat pockets. More time to go shoot pool and play foosball with @iTosh.

Talk of an embarrassingly parallel setup.

Now, lemmi fork() her one more time. Now using 0MQ. Will report how sweet she is.

URGENT OT REQUEST:

I am actively and urgently looking for a BigHand printer/supplier. (The big index-finger or thumb foam glove fans wear with team name printed. Like the ones used for the Safaricom Rugby and KQ. Ama zile za wrestling.) Will order in bulk.

Back to code…

Wazi

7 Comments :, more...

The Kenyan ‘yangu-ni-yangu’ curse – Revisited

by on Feb.03, 2011, under Coding, Personal

Umoja vs Kimoja...

On April, 20 last year, I shared my thoughts about a very saddening habit among young Kenyan professionals. In this innovation age, there is always a feeling that all you need is ONE GOOD idea and you will immediately become a member of the Mkwanjaville. That notion is very very true. To some of us, it is that sole piece of faith that keeps us going.

But then comes the nitty-gritties. When you start being analytical and thinking small, you realize that the task is BIG. There are many issues that need to be done. You need a powerful custom setup, not a toy setup like LAMP/WAMP/XAMP etc.

You need a serious firewall to protect your service. You need rate-limits to avert DoS. End of Security. You need a properly designed Postgres/MySQL DB. You need fine-tuned and security-minded PHP/JS/Python Code . You need versatile server daemons. End of technical. You need a solid, fast and friendly UI. You need nice graphics that talk to the users. You need good layouts and light CSS/JS. End of  UX Design. You need a solid marketing plan. You need good marketing skills. You need a good image. End of PR. You need money to pay for logistics, hosting, colo or a personal DataCenter. End of Financials.

And this is just for starters.

What I see alot of people (me, once, included) was crying to mamma. Google. ‘how to setup a FreeBSD firewall’, ‘How to create compelling CSS’, ‘How to not be hacked’, ‘How to get laid while all you do is code’.

You find yourself being a do-it-all. A jack of 6 trades. You forget your core strengths. Have you ever thought of it? Maybe:

  • You were not meant to touch the DB at all.
  • You were meant to just worry about the product specs, and not code a single line.
  • A PR firm could do a better job than you and google can?
  • Saka could do your logo in 5 minutes, instead of you doing it in 3 hours.

Then comes the moment to start. You have spend over 1 month ‘preparing’ to do the system.

You ‘have’ all the knowledge you need. Your App has a Web/Mobile/Mobile_Web/Symbian and IOS front-end. You have Java, J2ME, C++, Objective C++, PHP, JS and CSS scripts to write. You have a DB to design and optimize. You have a server to setup and configure. You have a choice between Apache, Mongrel, Lighty and Xginx. You must decide.

All these using one month of googling? Ohh, Phulleeez!!

So, what do you do?

So, faced by all these challenges, comes the benefit of a place like iHub. A concentration of brains and balls. Coders and designers and thinkers. I will write soon about the core benefits of collabos and HOW to prevent idea theft when doing collabos. As soon as I finalize this ka-small mPeZapYu hack that I am debugging.

In short, Umoja ni nguvu. Kimoja ni ngori.

Sure, it sounds hot and, as Wakanai might put it, ‘you sound full of machismo’, when it is said that ‘S/He did it all alone.’, but why walk and crawl alone, when you can fly Air iHub?

Back to code.

Wazi.

Leave a Comment :, , more...

2011, the beginning… Lessons from 2010

by on Dec.16, 2010, under Coding, Personal

Bye 2010. Thanks for everything.

I will keep this short and simple. Some people, as always, will get annoyed. Some people will feel that IddSalim is attacking them (the blog, not the person). Some people will say, ‘Go Salim! Tell dem! Say what we would love to say but are too scared to say’.

2010 has been a testing year. I made a few friends and enemies (due to misunderstanding) and met some brilliant and inspiring people. I will dedicate this post to the people and organizations that have shaped my Life in 2010.

1 – Safaricom

After I blogged about ‘Hacking Mpesa for Fun and Profit’ I attracted bad blood from Mpesa Department and a barrage of nice and not-so-nice emails and reactions from Safaricom and Vodafone. The blog was about how to Export the Mpesa SSL client certificates from IE to Mozilla and Opera.

An Innocent article that should have earned me some Bonga Points. But NOOOO!! Ohh No! This was seen as a direct ATTACK to Mpesa and Vodafone over-reacted. Our Mpesa PayBill contract was revoked out of fear that I know so much about Mpesa and could hack it. (My God!).

There were questions that were raised that I wish to answer, before end of 2010. Q: (How did Salim gain access to Safaricom Lan. How did he do a vulnerability Assessment on Mpesa. Why does he hate .NET apps that much?) A: (I do not have any priviledged access to Saf. Just the kawaida bambanet access. What I discovered about Mpesa is as open to any hacker worth his salt as it was to me. As an act of Good faith, I can share all I know and my Security Analysis of the Mpesa System. The information I had/have is for the pre-november-update Mpesa system. If All the issues have been fixed now, then there is nothing to fear.).

2 – Google

After my Interview with Google, I was enlightened. I was humbled. I was taught to never ignore even the most minute details in IT. Finally, I understand true inheritance and polymorphism. I finally understand and can write my own optimization and logic algorithms. Finally, I was forced to learn Python. Real learning. From Scratch. To Understand the language. Not just to know how to solve problem X. Thank you Google for the challenge. Talk to you soon.

3 – Buju, Too, Vera and Shazie

It finally got to my code cranium. All code without scrilla makes Salim an un-focused coder. That is All I will say.

4 – Partnerships and Relationships

Biggest lessons fall in this category. There are people who will stick with you no matter what. There are those that will RUN away at the first sight of trouble. There are those who are there to USE you to gratify their egos. There are those who are there to PROFIT from your efforts. There are those who will STEAL from you, without a moment’s hesitation. There are those who will KEEP AWAY from you as soon as they start ‘doing well’.There are those that will smile at you then stab you wearing the proverbial VELVET glove.

I have met all these people.

5 – This blog

One year old now and I have met, befriended and equally and annoyed more people than the last 8 years of my life. I had to pull down extremist blog posts (#mashogaHatuwapendi) and some posts got me into trouble due to misunderstandings #SafaricomGotmeWrong. But all that is water under the Athi Bridge.

We will do alot of business together next year. Cant wait to forge long-lasting data relationships once 2011 starts.

Wazi.

Back to code.

6 Comments :, , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Kenyan Blogs Webring Member

Possibly related