Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Good to Great Python reads

A col­lec­tion of python “must reads”:The Python yield key­word explainedPython’s super() con­sid­ered super!Under­stand­ing Python DecoratorsWhat is a meta­class in Python?Meta­classes DemystifiedTry/Catch for val­i­da­tion or speed?Python (and Python C API): __new__ ver­sus __init__Python “self” keywordPython and the Prin­ci­ple of Least AstonishmentA Curi­ous Course on Corou­tines and ConcurrencyGen­er­a­tor Tricks for Sys­tems ProgrammersCode like a Python­ista: Idiomatic Py...

2,967 0       PYTHON REFERENCE EBOOK READING MATERIAL


  How to read Haskell like Python

Have you ever been in the situation where you need to quickly understand what a piece of code in some unfamiliar language does? If the language looks a lot like what you’re comfortable with, you can usually guess what large amounts of the code does; even if you may not be completely familiar how all the language features work.For Haskell, this is a little more difficult, since Haskell syntax looks very different from traditional languages. But there's no really deep difference here; you just have to squint at it just right. Here is a fast, mostly incorrect, and hopefully useful guide fo...

3,272 0       PYTHON FORMAT HASKELL LIKE SIMILARITY


  Translating math into code with examples in Java, Racket, Haskell and Python

Discrete mathematical structures form the foundation of computer science.These structures are so universal that most research papers in the theory of computation, programming languages and formal methods present concepts in terms of discrete mathematics rather than code.The underlying assumption is that the reader will know how to translate these structures into a faithful implementation as a working program.A lack of material explaining this translation frustrates outsiders.What deepens that frustration is that each language paradigm encodes discrete structures in a distinct way.Many of the e...

3,067 0       PROGRAM PYTHON MATH ALGORITHMS FORMULA


  Python: copying a list the right way

new = old[:]Those proficient in Python know what the previous line do. It copies the list old into new. This is confusing for beginners and should be avoided. Sadly the [:] notation is widely used, probably because most Python programmers don’t know a better way of copying lists.A little bit of pythonic theoryFirst we need to understand how Python manages objects & variables. Python doesn’t have variables like C. In C a variable is not just a name, it is a set of bits; a variable exists somewhere in memory. In Python variables are just tags ...

2,562 0       PYTHON LIST COPY REFERENCE [:] LIST()


  Installing Python Packages

Now that you have you system and project environment all setup you probably want to start developing. But you likely don’t want to start writing an entire project fully from scratch, as you dive in you’ll quickly realize theres many tools helping you build projects and sites faster. For example making a request to a website there’s Requests, for handling processing images there’s Python Imaging Library, or for a full framework to help you in building a site there’s Django. With all of these there’s one simple and common way to install ...

1,874 0       PYTHON UNIX PACKAGE INSTALLATION LIBRARY


  Ruby is beautiful (but I’m moving to Python)

The Ruby language is beautiful. And I think it deserves to break free from the Web. I think the future of Ruby is firmly stuck in Web development, though, so I’m going to invest in a new language for data analysis, at least for now. This is a look at the fantastic language I came to from Java and a look at a possible candidate. (Update: I’ve since written a followup.)Java to RubySix years ago, I added Ruby to my technical arsenal. I learned C++ and Java in high school, and I planned to use them for data analysis in college—mainly for research kung fu. But when I disco...

12,205 0       JAVA COMPARISON RUBY ADVANTAGE PYTHON RUBY VS PYTHON


  Why learning Haskell/Python makes you a worse programmer

I've found, contrary to what you sometimes read, that learning Python and Haskell has not improved my programming using other languages. Haskell in particular, being so different from imperative languages, is supposed to give new insights into programming that will help you even when you are not using the language. My current experience doesn't exactly tally with this, and here is why:Demotivation.I find I think in Python, and even in Haskell to some extent, even though I have used Haskell very little. I constantly find myself wanting to use idioms from these languages, or noticing h...

2,944 2       PROGRAMMER PYTHON BAD BAD PROGRAMMER HASKELL


  A Python Optimization Anecdote

Hi! I’m Pavel and I interned at Dropbox over the past summer. One of my biggest projects during this internship was optimizing Python for dynamic page generation on the website. By the end of the summer, I optimized many of dropbox.com’s pages to render 5 times faster. This came with a fair share of challenges though, which I’d like to write about today:The ProblemDropbox is a large website with lots of dynamically generated pages. The more pages that are dynamically generated from user input, the bigger the risk becomes for Cross-site scriptingattacks. To prevent thi...

2,581 0       OPTIMIZATION PYTHON EFFICIENCY ANECODATE