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


Introducing Pycoder’s Weekly

Monday, February 6, 2012

The last couple of weeks Mike Grouchy and I have been talking about the python newsletter that we would want to recieve weekly. A curated collection of the best python news, articles and projects from around the internet delivered to your inbox in a beautiful package weekly.

             

The result of this talk has been Pycoders Weekly. The first issue is set to drop on Friday, February 17th, we hope you like it.

If you have created some content or run some project that you think should be in Pycoders Weekly contact Mike or me and let us know.


This post is filed under #python #code #weekly #newsletter #developer

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


A Developer’s Year in Review

Saturday, December 24, 2011

2011 has been an extremely fun year for me. I have met a lot of new people, built quite a few things. Experienced failure, learned a lot. I believe everyone is by product of all things they experience or force themselves to experience. You think you may know something because you read about it, trust me experiencing it for yourself has no comparison. 

As I look back, I am getting better at building things as the timeline will hopefully show.

All of this work has been done outside of my 40-55 hour work week job in software security.  No excuses. 

TL;DR

I built a few things. Learned from my experiences. Links to those things and the people I worked/debated with below. 

Dusty Programmer

This maybe soo META, but this blog itself has been a integral part meeting a lot of people I have worked with on various projects. When I first started writing, I knew having a clean and working design would be essential. I had admired the work of Serena Ngai, content maybe the king, but design is certainly what wins people over. So I emailed her. I didn’t know her. She didn’t know me. 

It was a pleasure collaborating with her on the design. I would eventually work with her again. 

Once that was completed. I began several write ups on various topics, that I found interesting which rung in with the developer community on Tumblr, the blog grew and grew. 

Then one day in passing I wrote a simple blog post about, How much bandwidth was used with Tumblr ASCII art. It took me about 45 minutes to write. I did most of the math in a Google search bar. As I was writing the blog post. I submitted it to HN, it was well received. I think. 

That was actually the first time, I got reaction that strong from anything I have ever written. That being said, Justin is still in ICU and we expect him to make a full recovery in the new year. 

That being said here are the best articles from the year of 2011. 

 

I learned a lot about how people consume information, and what resonates with people. Extremely interesting to me. Things like bounce rate, are ridiculous when you think about it. I kept trying to do things like linking to the site and passing users to other content, something you will see I have done throughout this post.  In case math isn’t your strong suit, that’s over 949K views on those 4 posts. Last month I was proud cracking 1 millions views :)

Takeaways:

  • Write.
  • Proofread(still working on this)
  • Create a brand for yourself.
  • Find like minded people. 
 

Prologger

First solo project. I am by no means a designer, but friend Ahmed(developer by trade) claims to be. So he eventually came on to make this releasable with me, Thanks. 

I started playing with ideas around achievement systems. I extremely irritated by the way hiring was being done in organizations solely based on claimed skills rather that accomplishments. 

So I thought about building an achievement system that would tie in all your online contributions to various projects, if you were the lead developer on a project, if you a big contributor, languages you were proficient in. 

So I discussed it with anyone who would listen. This is where I meet a quite a few people. Kenneth Reitz was the probably the first person talked to this about who genuinely got excited about it, this was before he was famous for Requests. Mike Grouchy was indispensable to me, gave me someone I could talk to about design decisions I was making.

Since building something on your own, can be particularly daunting task, especially when doing most of the development on your own and very very late at night, but I took it as a personal challenge. 

So I was building away, the site was quick. But, I was beaten to the punch by coderwall. They were a team. Working on it full-time. My ego would have liked for me to be able to compete but it wasn’t realistic. They had the exact same concept, I am sure they had exact same discussion I had been having with my friends. It was a serious blow to me. I was working super late nights. Then the glory gets all swooped up just like that. Truly depressing, but with failure comes success. So I thought hard about what to do next. So then I thought why not OS the project. I did it was one of the most followed projects on Github that day. 

I ended getting a couple of thousand users. It was fun meet a bunch of cool people who were excited about what I built. Learned a few planning and skills and to focus on MVP. Fork it here. If someone wants to clean it up ( it needs seriously cleaning). 

Takeaways:

  • Your ideas don’t mean anything
  • Execute first.
  • Open Source is fun.
 

Courtside

I was quite certain I needed something else to fill up my free time. This came up in a casual lunch discussion with Denis Zgonjanin and Omar Shammas. I had this awesome chicken Caesar wrap. We were excited about the idea of Courtside not the chicken caesar wrap. We knew Django Dash was coming up so we decided to build this for the competition. So to do well we I knew we needed someone who was good designer. Serena popped into mind. I messaged her, she agreed to join in.  Everything was a go. Denis was unable to join us since he building his start up eProf. We did build it at his place. There was little sleep had that weekend.

I soon came to realize, I hate coding sprints. They extremely good for getting  MVP out the door extremely quickly, but don’t expect a polished product. I like to release things when I feel they are ready, but with coding sprints everything is rushed and slapped together, but it a beautiful experience every developer should experience once. 

We had a three way tie for 8th place out of 40 teams it was extremely close. It was the first time we all worked together and our first coding sprint competition. It was extremely fun!

Takeaways:

  • Built something cool.
  • Worked with smart people. 
  • Learned you need business people. They aren’t so useless. :)
 

Bro Did You Hear

I needed something else to create. I think I am funny. I doodle quite a bit. I thought why not put some of this online. I knew I needed to meet more designers. Often times when I want to build something, I lose steam because I know it will be ugly. So I posted to Forrst. I had some many ideas, just no one down to hack on them. 

Valentin responded, we then continued to work for the next 5 hours, never having meet in person. We worked well together, site was well received. It was added to subreddit comics. It received quite a bit of traffic, gave me another insight on bounce rates as well. People on this type of site tend to stay longer, in hopes of another laugh. But with my blog often arriving through reddit or HN, they would quickly consume the knowledge and move on. Problem I have observed and yet to solve. 

Takeaways

  • Learned more about traffic and people. 
  • Made a new friend. 
  • Hype can do magic.
  • Do what you love to do. 
 

Notewagon

Once I had released a bunch of the projects. I started to realize that I need to consolidate my efforts into producing things outside of the fact of me just building them. Everything I have built I have learned something through each of those experiences, but those returns were diminishing. 

I was thinking about building a Note sharing tool for the university I went to. My one friend had started something similar and told me about the Notewagon guys. We started talked and since then I have been working with them. That’s why I have been off the radar for the past couple of months. :)

Takeaways:

  • We will see. 
 

Conclusion

 

If you think something is cool. I am sure there are other people out there who do as well. It’s your job to find them. Build a brand. Be kind. Be passionate. Be awesome. 

You can do anything you want to do. Work hard. Oh I can’t I have no time. bullshit. You rather be lazy and sit around. Focusing your efforts is the thing I have learned the most this year. 

I wish I could list everything I built. If you want to see the complete list. Tweet me here, or follow me here on Github. 

We will see what next year holds. :)


Discussion


Script or Not to Script

Sunday, October 30, 2011

Every single day we are required to do some repetitive tasks, like clean up old data files or run some commands on some servers, and collect X.

Now you can go about this in two ways, do it manually or write a script that does it for you. The generally accepted rule of thumb is to write a script for things that you will do more than twice. Is that really true? If I am going to collect metrics a few times; is the time that i invest into writing a script really worth my time?

Some would say yes, but in my experience I always find myself seconding guessing myself and I often spend time really thinking about if writing the script will save me time in the long run. So you can clearly see where time is being spent.

As you can see this has become and an issue, I am not even including the soul crushing regret that when you realize you should have written the script (grrrrr). Now what is the solution to all your problems? What is the one question that you can ask in order to determine if you should write a script or not. Unfortunately like all things in life it depends.  Here are some questions to ask to determine if you should. 

  1. Can you get a significant amount of work done while the script is running?
  2. How long will the script take to write?
  3. How many times will you be doing said task?
  4. Will you learn something new?

This is just what I found useful. I would love to hear your thoughts on this.


Discussion




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