Search This Blog

Thursday, July 25, 2013

Avoid complexity, simplify your code.

Over the years i have written a bunch of codes that function inside other applications or independently and in all my doings, i keep one thing in mind, simplicity.

There are a lot of people who write complex codes and think by doing so, it makes them look very good, and the fact that others can't read their code makes them superior. Is that true? well i can tell you for sure that a lot of those programmers cannot come to manage, fix or even read the code they wrote 2 years ago. Einstein once said "If you can't explain it to six year old, you don't understand it yourself", this brings us down to a serious series of questions!
     
      1. Do i really know what i am writing?
      2. Can i explain it to a kid and he will understand what i am saying?
      3. Do i know what every line in my code does?

Well if you can answer does questions and they turn out to be positive, then you really know your shit.
Talking about simplicity, are the use of third party softwares/libraries good or bad? this is a very difficult question and has multiple response depending on the scenario.
One, if you need a function from a library to integrate into your source code and that function happens to be one out of say two or three functions, definitely it is a good idea to just use that library instead of trying to reinvent the wheel. But what if a library contains hundreds of features and you happen to need only one feature, is it wise to integrate this whole system into your software and cause complexity and inefficiency because of one single feature? why not just write the feature from scratch and make the job a whole lot easier for future managers of your work, who knows it might be you, and at that point, the failure of one single feature in your system which is likely not what you use will cause you time, energy and productivity.

Another point to this is modular development, i am a fan of modular development and currently writing my thesis on it. What is the idea? simple, break your project into independent pieces that communicate with each other and function as a whole system i.e. each module performs a particular function. Why is this important? well lets take for instance, you have a system that monitors the weather and logs the information to the database and also to an online cloud storage. Now, the easiest modular way to do this, is to break it into modules, one module gathering information, another module logging in a database and another uploading to the cloud. So at this point you have three modules communicating together, if one module fails, lets say the one responsible for uploading online, your system is not a total failure, still it can gather info and store in the database, and all you have to do is to fix the module responsible for upload to the cloud.

Lastly, the idea of Object Oriented development is great, but a lot of developers tend to abuse this paradigm in the sense that, this days you will find an application with a lot of classes which could have been easily written into two small functions. Even though the idea of reuse is good, but if it is not necessary, do not write dormant classes in the hope that there will be need for it in the future, you can simply write it when you need it and avoid the whole complexity.

Well i hope developers will start simplifying their systems and make the job of managing, extension and debugging much more easier to those who will likely work on their codes in the future.

Tuesday, July 9, 2013

The concepts: Hackers, Crackers, Social Engineers DECODED

Over the years i have heard and had a lot of debates on this topics with colleagues and random strangers, truth be told, i am not an expert on this but i pretty much have ideas of all of this topics.
So i am gonna try and decode the actual facts behind this group of people and make references.

First of all lets talk about HACKERS, this subculture emerged from the academia around 1960s from the MITs Tech Model Railroad Club and MIT Artificial Intelligence Laboratory. According to wikipedia, a hacker is someone who loves programming and enjoys playful cleverness, now in this statement it is clear that a hacker loves to explore the unexplored, going to different levels to see how vulnerable a system is and devising a way to make it more secure. On a different level, a hacker can be considered to be someone who explores the limitation of a system and then tries to extend it to ensure a better performance, flexibility and availability of more functionalities. Hackers are not limited to programming, their are a lot of hardware hackers, system security hackers and in a lot of other Engineering and Science fields.
There is no doubt that hackers are the reason we are in the state of technology right now, if we look back to the history of some notable hackers such as Richard Stallman, Donald Knuth, Dennis Ritchie, Paul Graham, Larry Wall, Steve Wozniak (this guy was obsessed with technology, always finding a way to better things, even in the days where a single person cannot afford a computer, he had a dream of making his own computer, he worked hard, tweaked and hacked out the first Apple Computer. This man i refer to as the Hardware Hacker god) e.t.c all this people at the time shared a common goal; they wanted to make their own programs, extend systems, invent new ways of doing things and also showing their cleverness in doing things in an exciting manner and ways no one could ever think is possible. This men are heros in the Hacker/Programmer subculture, they made technology seem like a piece of cake, now our days, hackers are seen as criminals as portrayed by the media, those who break into systems to exploit them and cause damages were as this people are actually not hackers but crackers. This two sets have been confused a lot, hackers have ethics, this days the people we refer to as hacker community is the well known Open Source community.

On the other hand, CRACKERs mostly have almost same skills as HACKERs but different vision, unlike hackers who have ethics and have vision to make better tools and technology, crackers actually exploit those technologies not to better them but to destroy them, using their skills in fraud, causing damages and looking for fame by causing economic disasters. This group of people often referred to as the BLACK Hats are driven by some sort of motivation, mostly against the government and they think the only way they can be heard is through CYBER TERRORISM.

SOCAIL ENGINEERS are another set of frauds, they mind trick people into giving them vital intel such as bank informations and they use those intel to suck people dry, this group also refer to themselves as hackers but actually its just a kind of a shield because i know they do not have any qualities to earn the name.

The media has it wrong about the true hackers and the true hacker subculture, and they use this to implant some kind of ideas in peoples mind that makes them hate hackers, were as the actual enemies wrap themselves by using this term.

I believe from this short note, people will see that hackers are not the bad guys here, if we don't recognize this notable creators, the least we can do is to preserve the name for good. The real hackers are underground working so hard to make the cyber world a better place and are not driven by monetary or material things but are driven by the fun in creation, the fun in hacking, showing off their cleverness, they write tools, make our systems better and extend them all for FREE which in this case not necessary FREE for PRICE but FREE for FREEDOM, having the freedom to use systems, twist it the way you want and modify to your taste. All this privileges are not given by proprietary systems.