Carl

Carl Mastrangelo

A programming and hobby blog.


Avoiding Binary Thoughts

Can you both love someone and hate them at the same time? Can you appreciate the beauty of something and be disgusted by it simultaneously? Is it a stretch to both want to do something and not want to do it?

Of course!

These situations come up in our lives all the time, so why treat the world as black and white? If I told you I can’t stand X, and you liked X, you would think less of me. It’s an automatic reaction, taken as a response to a perceived hostile mode of thought. If I dislike X, then it would call into question your line of thought and reasoning about X. It would be viewed, perhaps unconsciously, as a strike against your pride.

But why? I didn’t even get to the part where I like X too. I like X just as much as you do, I just hate it at the same time. So why would you get mad, or treat me as less based on the first sentence? I don’t know, but it seems to be innate human nature to wrap ourselves around the very first thought we have about someone or something. The idea of abandoning it is far-fetched and foreign; an idea that only an antagonist would raise.

For example, there is a programming language called Python (warning, if the preceding text didn’t convince you to do a double take about your cognition, you might not want to venture forth). Python is my language of choice when jumping into something new. It’s a great language for prototyping, getting something up and running, and proving an idea really works. I even put it as my primary programming language on my resume!

That said, I hate Python. It does just about everything it can to slow a programmer down. It makes errant statements that could have been easily avoided by a stronger type system easy. It makes any sort of static analysis nigh impossible, making cross referencing or other code searching a losing battle, and makes otherwise minuscule errors able to take down production systems! It’s really a poor language to make something big. Obviously possible, but still a bad idea.

So do I like Python or hate it? The question itself is wrong. I both like and hate it. It’s another one of those “right tool for the right job” kind of things. If I need to make a small script to do something that would be cumbersome in bash, Python is the right choice. If I need to quickly get access to a large number library, and check out some quick idea that I have, Python again. But to build something large and powerful? Alas, Python is not the right choice. My rule of thumb is no more than 200 lines. (also, if you start writing a class, you’ve gone too far. Just dust off the Java and do it the right way.)

Python is just an example, the real idea here is to not be so hasty to judge. I both like ice cream but hate hate that it makes me fat. I both like that Superbowl is in town because it makes the city lively and festive, but hate that it totally clogs up the San Francisco bus system. If someone said they don’t like the Superbowl, or that they don’t like ice cream, don’t make a knee-jerk judgement about that person. Life is not binary, so don’t treat as such.


Home

You can find me on Twitter @CarlMastrangelo