Snakes on the... (starting with Python)

Recently I’ve finished Python course on codecademy and I’m hooked. The last language I’ve liked so much was PHP, but I lacked real incentive to start doing more advanced stuff. Python is different as I can create apps for my desktop (or even phone), not only for my server. It is quite logically organized, although there are few things I don’t like. And it’s the first language which forced me to indent my code which made it almost readable.

As I’m not ashamed of being laughed at you can see results of my sweaty sessions here. Who knows maybe you’ll find it useful. Don’t get your hopes up too high though.

My first publicly shared script is YouTube playlist downloader which uses pafy library. If you’ll bother to take look at it you’ll see that maybe I was forced to use indentation, but I’m yet to be compelled to using meaningful variable names. I’m still loving my one letter names which means that after a month or so I’ll be rediscovering my code again. Nothing better than self driven adventure.

There’s also one glitch. I’ve tested my script on few playlists and on one of them it failed as it couldn’t download one of videos. But it failed because of pafy, not my code. Not that it makes it any better, just saying. Pafy apparently isn’t returning any meaningful errors just fails with all this Python generated gibberish, so I can’t, or most probably don’t know how, parse it to anything meaningful. I’m not giving up easily though, maybe one day I’ll fix it.

As for codecademy itself, course was great. Really engaging and well formed. One thing which sucked a bit was limited debug. During last parts I often had to run scripts on my machine to properly debug them and see where I’m making mistakes. Nevertheless it was worth the time and I’m recommending it to everyone, especially that it’s free.

I’m so hooked up I’ve started intermediate course already. After going through decorators I’ve got a headache and as soon as I’ll figure out where to use it I would have to reconsider my attitude towards variable names. Can’t imagine going with single letter variable names and decorators.

Posts

subscribe via RSS