Mining Bits and Knowledge
PyCon 2011 Highlights: Python IDEs Panel
25/03/11
| Este post também está disponível em Português |
PyCon 2011 occurred on March 9th thought 17th in Atlanta, Georgia, and covered many interesting topics. The nice thing about PyCon is that all the lectures are available in this channel.
There were some really nice lectures that I’d like to highlight. The first one is about Python IDEs and the lecture title was “Python IDEs Panel”.
For many developers, IDEs are an essential tool-just as essential as source code control. The growth of Python in recent years has led to a number of projects and vendors developing Python-specific or Python-supporting IDEs. (…) This panel includes representatives from a number of Python-specific or Python-supporting IDE vendors, showing the ways that IDEs can speed up development on any platform.
Mais >
PyCon 2011 Highlights: Hidden Treasures In The Standard Library
12/04/11
| Este post também está disponível em Português |
This is another great presentation given by Doug Hellmann, from the blog series PyMOTW (Python Module Of The Week). This presentation is a quick overview from the blog series, which is a tour of the Python standard library through short examples.
Modules covered in this presentation:
- csv (handling values);
- sqlite3 (database communication);
- hmac (signatures);
- json (Object serializing);
- sys.excepthook (Error Handling);
- logging (Logging errors nicely).
The blog series has become a book, named “The Python Standar Library by Example”, pre-order it here. Also, the PyMOTW is available for download here with all the source code examples.
PyCon 2011 Highlights: How To write Obfuscated Python
04/07/11
| Este post também está disponível em Português |
After a long hiatus, I recapture to this series of posts that I was enjoying to write. To this return more exciting I’ve chosen one of the most incredible and difficult presentations from PyCon 2011 Atlanta: How To Write Obfuscated Python. This lecture was given by Johnny Healey
Obfuscated code is the act to write a simple code but in an obscure way, that is, making it difficult to understand. In many languages this is a relatively simple task, but the clear and concise Python syntax turns this easy task into something more challenging. When writing obfuscated code, not necessarily the code will be “ugly” but rather difficult to read. For those reasons this is an extremely fun and challenging lecture. So, I’ll make the same warning of the speaker:
Python’s clean syntax can make traditional approaches to writing obfuscated code much more challenging. Fortunately, Python provides many useful abstractions that can be misused to write code that is unreadable or even deliberately misleading. This talk will provide a survey of silly python tricks that explore the boundaries of the language.
Topics:
- Redefining builtins;
- Rarely used syntax;
- Comparison edge cases;
- Things you probably shouldn’t do with decorators;
- Fun with lambdas;
- Bytecode manipulation;
- Code Objects;
PyCon2011 Highlights: Everything You Wanted to Know About Pickling
19/07/11
| Este post também está disponível em Português |
I was wondering how to describe this great presentation, by Richard T. Saunders. Just found this sentence: This is one of those lectures that open your mind.
One of the most mysterious thing in Python is the pickle module. He is able to serialize almost any object in Python and, symmetrically, deserialize it. Its usage looks just like magic, because it is simple and intuitive. In this talk, after a brief introduction about the pickle, its alternatives and comparisons, Mr. Saunders explains in detail the inner pieces of the pickle module.
Many will say it is not necessary to know (or it’s a waste of time to study) how pickle works, we just need to know how to use it. I believe that having this kind of knowledge is an ace in the hole! One day, when you’re dealing with a real problem, your subconscious will nudge you and say: “You can solve this problem using the same logic used in the pickle module.”
Richard T. Saunders uses Python in his 10 years working in Rincon Research Corporations and is also a professor of Software Engineering at the Arizona University. In his work he “reversed engineered” the pickle module and as a “consequence” of this, he created the PicklingTools library, an open source library to communicate Python with C++.
In this speech Mr. Saunders covers many points as:
- Origin of the pickle name;
- What is pickle, pickling and unpickling;
- What is serialization;
- Pickling and unpickling examples, used to save a game state;
- Pickle alternatives (Marshall, XML, JSON, and Google protocol buffers);
- Why use pickle (advantages and disadvantages);
- Comparisons between the pickle alternatives;
- Pickle versions (0, 1, 2 and 3) and a brief history of each;
- Comparisons between pickle versions;
- Machine code analysis (opcodes, value stack and the mark stack) used by pickle;
The slides from talk is available for download here in PDF .
At the end of this lecture I was surely tempted to write a “simplified” pickle module, just to be sure that I can.
PyCon2011 Highlights – Why Is Python Slow And How PyPy Can Help
26/10/11
In continuation to the series of articles PyCon2011 Highlights, today I won’t just suggest but insist with you to watch this great talk by Maciej Fijałkowski and Alex Gaynor, about the Python’s Virtual Machine called PyPy. I always wondered how PyPy (which is written in Python) can be faster than CPython (which is written in C). This talk not only clarified this question of mine but made me very curious about the subject, which resulted in a little research to better understand PyPy and JIT.
For those who were lost during the lecture, here’s a brief explanation on how PyPy and JIT work.
Mais >
PyCon2011 Highlights: Python and CouchDB in Practice
26/12/11
This is another Atlanta PyCon2011 lecture that I’d like to highlight. This one was given by Luke Gotszling and talks about Python and CouchDB, a NoSQL database document oriented.
Now some additional information…







