Writing Code in a Professional Manner

•February 5, 2015 • Leave a Comment


“Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. Code for readability.” – John F. Woods

In order to have your code respected and appreciated, it need not only to be efficiently programmed and well constructed but also well written and well formatted! Yes, not having bugs is essential and of primary importance; however, what good would it be if it can only be poorly understood, barely maintained, or hardly developed?! A professional programmer always keep the code clean, formatted, and well commented.

… Though one may question these factors as how their style is made or picked. Well, there are conventions and defined styles for almost everything: variable and function naming, indentation, and even commenting. When programmers worked on large projects, they’ve noticed that abiding a convention or a standardized style always ease up the development process and understandability of code written by different coders.

Continue reading ‘Writing Code in a Professional Manner’


Java vs C portibility – intermediary code perspective

•February 2, 2015 • 1 Comment

Note: don’t get too excited, I’m not back to blogging. I’m writing some articles for a basic programming class discussion board and I may share some here.

When a team embarks on a new project to develop, one of the first decisions they make is the choice of a programming language which is typically based on the type of application they’ll be building. Ever since Java became popular and up until the middle of the last decade Java was almost always the pick for systems whenever the target application needed to be portable. I will not discuss what other languages and technologies they use now, but rather I will discuss how Java has always been seen as first pick for portability and how it shouldn’t; I will investigate the portability of the C language and compare it to that of Java.

Continue reading ‘Java vs C portibility – intermediary code perspective’

My tribute to Dinnes Ritchie went wrong!

•October 14, 2011 • 2 Comments

Yesterday. … It’s the day that precedes today. It’s also the day Ubuntu released Ubuntu 11.10, the day I knew about the death of Dennis Ritchie, and the day I wrote a C program as a tribute to Dennis’ death and made me and my PC suffer!

Well, I was at college most of the day – with no internet connectivity; it remained that way till I returned home late at night. Like always, I check emails and RSS. Q8Geeks.org had a new post: Dennis Ritchie RIP.

I was not expecting his death, … it was a shock; I actually was sad. Being tired, I thought I should sleep. However, right before I got off my chair, I decided to write a C program as a tribute to Dennis’ death; I was inspired by GH0S1_R33P0R’s code in the blog-post.
Click to see how the tribute resulted in a nightmare!

My whitespace binary coder: whitecoder

•September 11, 2011 • 3 Comments

Imagine this situation: you’re supposed to give your supervisor an important report he’s expecting on a specific day, on that day you give him a bunch of blank papers. He garbs the papers and goes through them as  his anger increases. He awaits an explanation and you say: … You see, it’s whitespace encoded.

You know, that situation is not far from the situation that brought up this topic! The other night, sigtermer and I were talking about our programming class professors and how one can effectively have his revenge on them for being – let’s just say: not so open-minded – professors. A thought rolled after another, then this idea kicked in. Giving a professor the requested code – whitespace encoded. Handing him the blank papers would yield the best expression ever. Explaining it would confuse him whether to be angry of this joke or be interested and ask about the codec.  Doing that to dino-professors would probably result in deducted marks instead of few extra ones! Though I think it would be worth it.

Putting those situations aside, how does the the idea “whitespace
encoding” sounds to you? Sounds fantastic to me!

Click to read about the evolution of the idea!

A weird Android ‘Obtaining IP address’ Wifi issue workaround

•September 10, 2011 • 200 Comments

Android disapproves Wifi *

Ever since I bought my android phone, iGalaxy (Samsung Galaxy S), it grew to hate me more and more until the beginning of this year; it had enough. Little Android finally refused to work accordingly. Until recently, I’ve been suffering of an irritating issue. But honestly, I don’t blame it for what it has done, I hate it; it’s only natural to hate back whoever hates you.

The issue that I was facing was a Wifi issue: a bug that renders the phone incapable of connecting to a specific wireless network! Yes, it would connect to other wireless networks except a specific one. Unfortunately, in my case the specific wireless network was my home wireless network. This issue is known as: Wifi obtaining IP address issue.

Note: If you are searching for a workaround, go watch the video at the end. Also, check the update section in the end of the blogpost. Comments might also help.

If you wish to continue reading the post click this link!

Thought of buying a new phone line number; wrote a script

•August 27, 2011 • 4 Comments

Original screenshot by Kai

Have you ever wondered what phone number you should get? Have you ever wondered what your phone number might spell? … Well, I had to dive into this since I’ve been thinking lately of ditching my current Telecommunication Service Provider for another one – seeing that another TSP charges less and provides longer validity.

Now, when people here in Kuwait decide to get a new phone number, the majority goes for what they call “golden lines”: phone numbers that contain as few different digits as possible and as structured as possible (e.g. xxxyxxxy). The only problem with those numbers is that they are extremely expensive – some reached above 1000KWD! But honestly, even if they were not as expensive, let’s say as cheap as the regular phone numbers, I wouldn’t be that interested.

However, what interests me is phone numbers that actually spell words; phonewords; vanity numbers (e.g. xyz-NUT). This is uncommon in here, in fact, I’ve yet to meet someone that spells his phone number! Objectively, I dislike this fact, but subjectively, I love it; it means we, those who seek phonewords, have a greater chance to get what we want! … That’s why I had to know what numbers some great names would correspond to on dialpads.

At first, I grabbed my phone and manually translated the words I had in mind. All one has to do is looking up the corresponding number of a letter on a dialpad. GNU:468; linux:54689; debian:332426; ubuntu:828688; python:798466. However, upon finishing that, a bunch of other names came to my mind. I couldn’t take it, so much unnecessary effort has been put. I decided to write a script.

If you wish to continue reading the post, click this link!

My hypothesis on the originality of the name “Google”

•August 17, 2011 • 5 Comments

“Google”, every human being knows this name and for what it stands for – except for some Kuwaitis who mistake it for the internet. “Googol” on the other hand is a fairly known word, probably only professors,  nerds, and few geeks know it. Those two words are close in spelling that one can easily misspell one of them. In fact, the Internet approves this possibility and suggests that one should believe Google Incorporation’s  claim:

“Google” is a misspelling of the word “googol”.

However, I had to investigate; I ended up with my own unique  hypothesis.
Click to read my bizarre valid hypothesis!

Hyd yo kids, hyd yo wives, and hyd errything behind yo images!

•August 9, 2011 • 8 Comments

I sometimes enjoy messing with files, binary-ly. Many times I end up having chunks of binary files that are meaningless which once were texts, images, and archives. Though last time, I decided to get something out of the act.

I’ll be honest and tell you that at the moment I remembered Antoine Dodson and his advice to humanity “Hyd yo kids, hyd yo wives, and hide yo husbands”. That gave me the idea of hiding files behind other files.

The idea is not securing or locking files, GPG can do that perfectly, the idea is hiding it. Meaning that if one takes the cover off, one will probably see it! Though hiding files might be useful in some cases.

A quick real-life example: One person is refilling his fountain pen in his room and accidentally squirted his wall with the black ink. He brings in an extremely interesting painting/poster and covers the mess. Now, the mess still exists and can be seen once the cover is taken off. This approach is safe and practical whereas locking the room might bring suspicions and curiosity.

Caution: if (self.fearOfLongTexts): exit(); else: continue;

Some of them are quite tools!

•July 14, 2011 • 9 Comments

How much are you dependent on productivity online services and tools? For how long can you work productively without internet connectivity? Nice questions, eh? Well, if you said “Not dependent” or “Forever”, I salute you, buddy.

So what is it that today’s internet provides besides Trolls? Almost everything, from tips on buying PC’s to books on system hacking to videos on GTK programming to online tools. Screw the first three, let’s focus on “online tools”, online services, and cloud computing.

If you’re a person who says “tl;dr”, don’t click!

“I LIVE AGAIN!” — Future Cop LAPD

•June 24, 2011 • 3 Comments

… Did you too think I was dead? Two guys actually told me -in the face- that they thought that I died in real life. Well, I am alive – unless if this blog-post was scheduled. But believe me, I’m alive (proof: on Jun, 3rd).

Any reader would probably ask: Where the heck were you all that time? My answer would be: In a grave, dead; I was a ghost, I could see you but not vice versa. Wait, … am I contradicting my own words? Okay, let me put it this way, I was adj(internet) dead then became an online ghost.

It’s true that I, many times, peeked, but I wasn’t active like I used to be (obviously). I only checked emails, read Q8Geeks blog-posts, uploaded some photos/digital artwork. I was trying to avoid interacting with online communities as much as possible.

Read more about my excuses and plans