background preloader


Facebook Twitter


Git / svn / make / scons / waf / deploying. Www / http / https. Www. DB / SQL. GUI / OpenGL / Shaders. CLI. Python. Untitled - Stypi. The Julia Language. Testing / profiling. Crypto. D,Vala,Go,Python,Java,C++ Interpreted Languages: PHP, Perl, Python, Ruby (Sheet One) - Hyperpolyglot. A side-by-side reference sheet sheet one: version | grammar and execution | variables and expressions | arithmetic and logic | strings | regexes | dates and time | arrays | dictionaries | functions | execution control | exceptions | threads sheet two: streams | asynchronous events | files | file formats | directories | processes and environment | option parsing | libraries and namespaces | objects | inheritance and polymorphism | reflection | net and web | gui | databases | unit tests | logging | debugging sheet two: streams | asynchronous events | files | directories | processes and environment | option parsing | libraries and namespaces | objects | inheritance and polymorphism | reflection | net and web | gui | databases | unit tests | logging | debugging version used The versions used for testing code in the reference sheet. show version How to get the version. php: The function phpversion() will return the version number as a string. python: import platform platform.python_version() ruby: <?

Interpreted Languages: PHP, Perl, Python, Ruby (Sheet One) - Hyperpolyglot

Pad. Cheat Sheets. TimeTransitionsImage (PNG Image, 524 × 455 pixels) PHP: a fractal of bad design - fuzzy notepad. (This article has been translated into Thanks!)

PHP: a fractal of bad design - fuzzy notepad

Preface I’m cranky. I complain about a lot of things. There’s a lot in the world of technology I don’t like, and that’s really to be expected—programming is a hilariously young discipline, and none of us have the slightest clue what we’re doing. This is not the same. PHP is the lone exception. PHP is an embarrassment, a blight upon my craft. But I’ve got to get this out of my system. An analogy I just blurted this out to Mel to explain my frustration and she insisted that I reproduce it here. I can’t even say what’s wrong with PHP, because— okay. Stance I assert that the following qualities are important for making a language productive and useful, and PHP violates them with wild abandon. A language must be predictable. My position is thus: I can’t provide a paragraph of commentary for every single issue explaining why it falls into these categories, or this would be endless. I’ve been in PHP arguments a lot. Design Patterns In Python (@Testing Perspective) 

Dynamic State Machines. I was talking with my coworkers Jeff and Randy yesterday about some work Randy was doing implementing a finite state machine in django, and I was reminded of a pattern I've previously used to implement state machines using Python's dynamic typing to do it.

Dynamic State Machines

In more static languages, an object is forever bound to its type, and implementing state-dependent behavior often requires using supporting classes which can be switched out to implement the variable behavior of different states. Python's dynamic nature makes this much simpler. Implementing state with dynamic typing In python, an object's type is determined simply by looking at the value of it's __class__ attribute. Conveniently, but also rather frighteningly, this attribute is mutable. This pattern is very powerful, and could easily be abused, but it expresses what is happening clearly and effectively, and matches the problem domain straightforwardly. A Blue morpho butterfly (Morpho menelaus) The life-cycle of a Butterfly Happy coding! Monkey patching in Python. Дерево ван Эмде Боаса / Алгоритмы. Всем доброго времени суток!

Дерево ван Эмде Боаса / Алгоритмы

Сегодня я расскажу вам об одной интересной структуре данных, про которую слышали лишь немногие и про которую очень незаслуженно мало написано в рунете, да и в англоязычном информации, в общем-то, тоже негусто. Решено было исправить ситуацию и поделиться с общественностью в доступной форме этой достаточно экзотической структурой данных. Дерево ван Эмде Боаса (van Emde Boas tree) — ассоциативный массив, который позволяет хранить целые числа в диапазоне [0; U), где U = 2k, проще говоря, числа, состоящие не более чем из k бит. Казалось бы, зачем нужно еще какое-то дерево, да еще позволяющее хранить только целые числа, когда существует множество различных сбалансриованных двоичных деревьев поиска, позволяющих выполнять операции вставки, удаления и прочие за O(log n), где n — количество элементов в дереве?

Главная особенность этой структуры — выполнение всех операций за время O(log(log(U))) независимо от количества хранящихся в ней элементов. Применение. Advanced Bash-Scripting Guide.

IDE / vim