Mahdi Yusuf

Mahdi Yusuf


Everyone is thinking why in the world would anyone pick static, when you can be dynamic, so much more agile bro. Usually the thought process is what language am I most proficient in, that can do the job. Totally not a bad way to go about it. Now does this choice affect anything else? Testing? Speed of development? Robustness?

Dynamic vs. Static

Dynamic languages are languages that don’t necessarily need variables to be declared before they are used. Examples of dynamic languages are Python, Ruby, and PHP. So in dynamic languages the following is possible:

We have successfully assigned a value to variable without declaring it before hand. Simple enough, try doing this in Java (you can’t). This can *increase* development speed, without having to write boilerplate code. This can somewhat be a double edge sword, since dynamic languages types are checked during runtime, there is no way to tell if there is a bug in code until it is run. I know you can test, but you can’t test for everything. You can’t test for everything. Here is an example albeit trivial.

Now if you are raging to some serious dubstep, its easy enough to miss that small typo, you go screw it and do it live, and deploy to production. Python will simply create the new variable and not a single thing will be said.

Only you can stop bugs in production!

Static languages are languages that variables need to be declared before use and type checking is done at compile time. Examples of static languages include Java, C, and C++. So in static languages the following is enforced

Many argue this increases robustness as well as decrease chances of Runtime Errors. Since the compiler will catch those horrible horrible mistakes you made throughout your code. Your methods contracts are tighter, downside to this is crap ton of boilerplate code.

Weak and Strong Typing can be often be confused with dynamic and static languages. Weak typed languages can lead to philosophical questions like what does the number 2 added to the word ‘two’ give you? Things like this are possible with a weak typed language.

Traditionally languages may place restriction on what transaction may occur for example in a strong typed language adding a string and integer will result in a type error as shown below.

Conclusion

Regardless of where you land on this discussion, claiming one is better than the other would lead to flame war, but there are places where each is strong.

Dynamic languages are good for fast quick development cycles and prototyping, while static languages are better suited to longer development cycles where trivial bugs could be extremely costly (telecommunication systems, air traffic control).

For example if some giant company called Moo Corp. spent millions of dollars on QA and Testing and a bug somehow gets into the field, to fix it would mean another round of testing. When sitting in that chair the choice is clear static languages FTW, its a hard job but someone has to milk the cows.

Test, test, and test.

Just a little food for thought, for when you are starting your next project. You never know what limitations you maybe placing on yourself and your team.

What do you do consider when selecting a programming language for a project?


Discussion


Get Excited and Make Things

Saturday, November 12, 2011


Discussion


What’s Your Favourite IDE?

Friday, November 4, 2011


This post is filed under #dev #code #ide #developer #tech #programming

Discussion


Five Places for Social Developers

Monday, December 13, 2010


Forrst

is a new place for developers and designers to share inspiring code, screenshots and links.If you ever wanted other professionals frank opinion on a piece of code or can’t make a decision between one logo or the other! Forrst is the place for you. It is just ramping up and is still in invite only stage, but I urge you to get on and get to sharing. Nothing better than being popular on the new it site.

Twitter

if you still think twitter is place for little girls to tweet about their Bieber fever you are right. Although beyond that, [amazing reality] so are favorite products and software developers  sharing latest updates and interesting articles. I use Twitter as my news aggregator. If I see the same story tweeted by a few people, usually give it a further look. Tweets are a great way to keep in touch, if you follow the right people!

Blog

now you might be saying madness, I don’t want to have a blog. I am not hipster, who shares everything in hopes to have a movie written about them when they die. Although blogs are the best place to cultivate that particular type of pipe dream. It will also allow you share things you find cool, or link you wished you had bookmarked, its a ways to track your progress as a developer and as a human being. Maybe even open doors for you in the future. 

Github

what happens to code you write and keep on your hard drive and you dont let anyone use. It never gets run, or used beyond what it was intended for. In my mind that is a complete and full fledged fail. Get on Github, and set your code free. Great way to learn new things as well. Pick a language and start reading.

Stackoverflow

 are you the type of person who asks a ton of questions and expects answers? Look no further the greatest Q&A site to ever hit the internet. Now that they are spinning off various sister sites even better time to join. Want to know more about cooking, coding, ubuntu, or maybe even something new. Vast knowledge base and I would recommend this for any developer who wants to know more.

HackerNews

I know I said 5, but I couldn’t leave this out. Do you want a legion of smart developer send links to technical articles and interesting things in the news? If so get ready probably waste [gain knowledge] an hour a day there easily hitting refresh. Check it out.


Discussion


What Zuckerberg Could Buy?

Tuesday, November 2, 2010


Copyright 2012 Mahdi Yusuf
Errrrday I be programmin' (oh and hustlin' too)