Mahdi Yusuf

Mahdi Yusuf


Python is Beautiful

Sunday, April 29, 2012

So I recently read an article that got quite a bit of attention in the Python community. Why are python applications being SO ugly?

Although he may be right in some cases, but for him to ask the question ‘Dear Python, Why are you so ugly?’ is quite ridiculous. 

The very premise of this statement is quite foolish. The person who wrote this article seems to be severely unimpressed with the level of design put into blogs and web application built on top of python.

With that being said, just to debunk his claim I have put together a list of applications that use python and are extremely well designed. 

So don’t judge me based on the layout of my HTML, but on the content of my servers. 

-Mahdi Yusuf

Instagram

This little company recently sold for a billion dollars. One of its factors for being so popular was being so beautiful, it makes heavy use of python. 

Pinterest

What another pretty app? It surely can’t be written in python? Yes. Yes it is.

Washington Post

News websites aren’t the most innovative of designs, but this is not ugly by any definition of the word. 

EveryBlock

EveryBlock started by one of the co-creators of Django, Adrian Holovaty. Ugly? I don’t think so. 

Mozilla

One of the biggest websites using Python these days. Mozilla is pushing the boundaries in both design and innovation.

Courtside

This application is one I wrote for Django Dash with the rest of my team. Although, I can’t take any credit for the design we did take the time to plan it out.

Youtube

Need I continue?

Also I think Path makes heavy use of python in its web application, which is acclaimed for design and innovation as a product. 

So making the statement saying that websites written in a particular language are ugly, doesn’t make a whole lot of sense. The python community is vibrant with a great many aspirations and interests, beyond just making pretty things. 

That being said the designers are what make these websites look beautiful and a breeze to work with not the language the backend developers code in. 

If you are developer looking to learn design you might want to check out Design for Hackers: Reverse Engineering Beauty


This post is filed under #python #design #beautiful #code #programming

Discussion


I’ll Sleep When I am Dead

Monday, March 26, 2012

There has been a lot of hype around polyphasic sleeping, being a person who usually lives with less than 5 hours of sleep a night, I thought this might be a cake walk. Being no stranger to lack of sleep, 24 hour gaming competitions, and coding sprints, I thought it would be cool to try out. 

So like any true seeker of truth I decided over the Christmas break to try out the Everyman sleeping cycle myself. The entire concept behind polyphasic sleeping is to trick your body and mind to quickly get into REM sleep (Rapid Eye Movement) which is the phase of sleep that is most beneficial to brain.

Polyphasic sleeping tricks the brain to quickly jump into this state due to the lack of sleep, as opposed to an hour or two into sleep like rest of you mere mortals. 

Everyman, basically consists of core sleep of about 1.5-2 hours with three supplemental sleeps of about 20-30 minutes. There are more extreme sleeping cycles like the Uberman which solely consist of 20-30 minutes sleep intervals every 4 hours. 

So I basically had two weeks to get into this sleeping mode, which I thought would be super easy cutting down from 5 hours to 3 hours. I removed major sources of caffeine from my diet so it wouldn’t alter my sleeping. 

Week 1

So the first problem I had to combat is waking up. I had several alarm clocks setup all over my room, So whenever I would get to sleep I would set the alarm for the interval I would be sleeping at and quickly rush to bed.

At first I found it extremely hard to fall asleep in the allotted time, let alone get into the much needed REM sleep (the good stuff), this was the horrible part the transition everyone has been talking about. I failed at the sleeping cycle a few times during this transition. That being said, I found the supplemental sleeps to extremely annoying and non beneficial at this point, and looking forward to my big sleep more and more. 

During this week, I found a lot of things changing, my apetite was diminished greatly, extremely vivid dreams as well as an overwhelming amount of time on my hands. If you ever want to do this, I would strongly suggest having some sort of project or a stack of books you want to read and keep your mind engaged, or if your lucky enough fool a friend into doing it with you. Most people will fail here and fall back into regular sleep cycle simply due to boredom. 

Week 2

Now on to the good stuff. During the second week I was able to successfully sleep for 30 minutes and beat my alarm clock most of the time. I was still extremely drowsy when I would wake up and would need non-negligible amount of time to get productive again. I had started a coding project during this time, I found myself extremely unfocused during the entire process and found it difficult to execute on what I had in mind, and getting caught up on the details often. Very similar to the end of coding sprints I have participated in the past. 

That being said I found myself quickly disinterested in what I was working on after a mere 1 hour or so. I found myself constantly  switching between reading, coding or the next shiny thing finding it hard to focus on any given one. 

I also have a theory about just being conscience that long, you start to lose a sense of time there is no finality just this never ending loop of waking up and sleeping, I know this is hard to understand, but if you think about it; when you sleep at night; you have this ease about putting the day behind you and moving on to a new day. With this you never have that finality its just infinite cycle of sleeping and waking up. I would be interested to know if other experienced this. 

Conclusion

This is impossible to keep up with any type of social life, unless your friends with a bunch of vampires. You can never be away from a bed or a place to sleep for anything more than 4 hours. You have to be extremely vigilant with your sleeping, the slightest change in sleeping can leave you very tired and slipping back to monophasic sleeping. To be honest it a lot of hassle to just squeeze an hour or two more waking hour which is basically spent waking up. 

As for writing code like this, you will be better served sleeping once, and just stocking up and tea and coffee until you finish what you need to get done. Sleep is better for creative mind and learning.

Sleep you need it. 


This post is filed under #programming #code #sleep #productivity

Discussion


7 Places for Social Developers

Monday, February 6, 2012

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

Do you want a legion of smart developer send links to technical articles and interesting things in the news? If so get ready to probably waste [gain knowledge] an hour a day there easily hitting refresh. Check it out.

Reddit

Now you may thinks Reddit is mostly used for finding cool pictures of cats and place where you can make fun of people failing. Although that may be true there is a vast developer community on there that have various discussions about development broken up is more ways you can imagine in subreddits, chime in! 

Coderwall

I know I said 7 but I can’t leave out this out for those of us who love competition, and awesome tracking of development achievements! Coderwall goes through your github repositories and gives you badass achievements on code you develop; they recently launched new profile pages that look awesome! Try it out! 

—This post has been inspired by Scott Hanselman talk here


Discussion


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


Friday, December 16, 2011


Students Turn Classroom Notes Into Cash With Social Site NoteWagon


The Spark of Genius Series highlights a unique feature of startups and is made possible by Microsoft BizSpark. If you would like to have your startup considered for inclusion, please see the details here. Name: NoteWagon. 

Discussion




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