Wow the things we find humorous…

June 30th, 2008 imsplitbit Posted in YouTube | No Comments »

AddThis Social Bookmark Button

Oh Python… how I loathe thee…

June 9th, 2008 imsplitbit Posted in Python, Ruby | 2 Comments »

So those who know me know that I am an avid ruby fan, you may not know it by looking at some of my code but I am, trust me. I have spent the last 2 or so years getting to the point where I am not embarrassed to share my work with others. Now… the job comes in and says “Python is the new hotness”, granted not new, hell not even old hotness but they think so all the same. Now all new projects are in python and python only. “Ok” I says, “I can do python if I have to”.

As I sit here recoding a bunch of libraries I had finely tuned in ruby to python I realize how much I really hate python. I think it is a travesty that the developers of this language are able to call it Pure Object Oriented when core types aren’t really objects. Lets take for instance strings, a string is an object in ruby, hell everything is an object in ruby buy in python a string doesn’t even inherit the ability to understand what it is. As an object you are a member of a class of some kind. Being a member of that class gives you certain abilities to work on yourself that are inherited by being a member of that class. We won’t dig too deeply into this but look at the following:

Ruby:

irb> "Hello World!".class
=> String

Python:

>>> "Hello World!".class()
SyntaxError: invalid syntax
>>> type("Hello World!")

So looking at the previous snip you see that in Ruby a string is an object of the String class and inherits the ability to know that it is a member of the class String. In Python we have to call a core method to look at the data to figure out what type it is. This may be reaching but why in the hell can’t a string know it is a string?

Let’s take this further, you would think that in any pure object oriented language an object can figure out how many characters or items it contains no?

Ruby:

irb> "Hello World!".length
=> 12

Python:

>>> "Hello World!".length()
AttributeError: 'str' object has no attribute 'length'
>>> len("Hello World!")
12

Now we see even a basic function such as knowing the data length of one’s self isn’t permitted in python, we don’t completely inherit, we selectively inherit. And again we are punished by being forced to call an outside method to look at our data.

Big whoop you may say, but nay my friends there is a method to this madness. Lets say you were tasked with taking a string, figuring out it’s length, taking it’s length and coverting that to a string. Why would you do this? Who the hell knows but look at the difference in the code to do so:

Ruby:

irb> "Hello World!".length.to_s
=> "12"

And to prove it is a string that you are looking at, besides the handy quotes around it:

irb> "Hello World!".length.to_s.class
=> String

Python:

>>> str(len("Hello World!"))
'12'

And to prove again it is a string that you are looking at…

>>> type(str(len("Hello World!")))

So you tell me, what makes more sense in the grand scheme of things?

“Hello World!”.length.to_s.class

or

type(str(len(”Hello World!”)))

I submit to you that the language wars are over! Python has killed itself alongside Perl. Both great ideas that slapped features on their sides like colostomy bags without ever thinking about building real core functionality.

AddThis Social Bookmark Button

OMG who remembers this?

May 5th, 2008 imsplitbit Posted in News | No Comments »

AddThis Social Bookmark Button

Heading Home!

April 18th, 2008 imsplitbit Posted in News | No Comments »

It has been a long week… a really long week. I am happy to have attended another MySQL User conference but I am ready to go. I miss my babies and they miss me. I will hopefully be able to catch the 6:15 am flight out of Santa Clara. Anyway, that is the news and I am out of here!

AddThis Social Bookmark Button

Is Jonathan Schwartz lying to our faces???

April 17th, 2008 imsplitbit Posted in MySQL, News, On The Road | No Comments »

I am an pretty strong user of MySQL. I don’t code in C so I don’t really dig through the source very much but the fact that the source is available to me is a pretty big plus in my book. Mainly because if I wanted to change it, I can (in theory). I am currently in Santa Clara, CA attending my 5th (I think) mysql user conference and I get the news that Sun/MySQL has decided to close source certain parts of their server to try to make some money from the mysql community. Read Here. This really wouldn’t be all that surprising except that Jonathan Schwartz, the CEO of Sun, just spoke to us on Monday about how Sun is committed to open source and the open source community. How can you say that one day and then do this the next day??? You might have noted from my Twitter posts that he “joked” with the phrase “Enough of this free software stuff” in his keynote. Keep in mind he did smile and laugh and taken out of context that seems more damaging than it came across but nonetheless this makes me question his sincerity. I have spoken to some MySQL/Sun employees, who will remain nameless, that are sorely against this move and they have assured me that this will not stand if they have anything to say about it. But you have to ask yourselves [addressing the mysql employees brave enough to talk about this with me], When you are one in 400 you may have a say but one in 40,000 makes you a glitch in the radar, not a blip. Good luck guys, I hope this works out.

On a side note, to all of the so called mysql users throwing around “I better brush up on my postgres”, puh-freakin-lease! Even if Sun closes off the source of some obscure feature, I would venture to say that 99.9% of you are like me, DB geeks. You weren’t gonna change anything in the server anyway. And do you seriously think that some huge group of software engineers wouldn’t take the last GPL version and fork the project? Stop being drama queens and wait til it settles. And for the love of god, or whomever you choose to believe in if anyone, don’t go to a database server that offers you a trigger based replication as it’s best scale out method.

AddThis Social Bookmark Button