• Migration from CapsuleCRM to salesforce

    CapsuleCRM CapsuleCRM is a relatively small company that provides a simple crm solution. It allows customization at a field level, but no new entities. The entities that can have custom fields are: contacts cases sales opportunities. The API Capsule has a RESTful API dealing...

  • 2019's resolution

    The 2019 resolution was to remove my dependency to google, amazon and any other big surveillance capitalist corporation. I failed to finish it and will certainly need another year. But I have certainly reduced it enough so I can confidently say that I’m not being tracked by a single entity....

  • Surveillance capitalism and google

    I strongly recommend reading The age of surveillance capitalism by Soshana Zuboff. Context Somewhere around 1998 I started using IRC and it was fine. The clients were mostly free, the servers had all the messages but I don’t think they were popular enough or the companies were...

  • Improving migrations speed for Django 1.9

    Django version 1.9 has some form of memory leak when it runs its migrations. The two points of friction I have noticed are: 1 The calculation of the dependency graph seems unusually slow 2 The sql operations seem to leak in memory and in execution time ##Slow graph In order...

  • Django isnullfield admin filter

    Made for django 1.11, based on the BooleanFieldListFilter

    class IsNullFieldListFilter(FieldListFilter):
        def __init__(self, field, request, params, model, model_admin, field_path):
            self.lookup_kwarg = '%s__isnull' % field_path
            self.lookup_remove = '%s__exact' % field_path
            self.lookup_val = request.GET.get(self.lookup_kwarg)
            super().__init__(field, request, params, model, model_admin, field_path)
            if (self.used_parameters and self.lookup_kwarg in self.used_parameters and
                    self.used_parameters[self.lookup_kwarg] in ('1', '0')):
                self.used_parameters[self.lookup_kwarg] = bool(int(self.used_parameters[self.lookup_kwarg]))
        def expected_parameters(self):
            return [self.lookup_kwarg]
        def choices(self, changelist):
            for lookup, title in (
                    (None, 'All'),
                    ('1', 'No'),
                    ('0', 'Yes')):
                yield {
                    'selected': self.lookup_val == lookup,
                    'query_string': changelist.get_query_string({self.lookup_kwarg: lookup,}, remove=[self.lookup_remove]),
                    'display': title,

  • Linux Acer one s1003 D16H1

    This post describes how to install linux on a Acer One. There are some things that don’t work yet and some others that require some work Distributions uefi 32 only. Only debian 32 and multiarch seem to work fine. The system itself is 64bit Tried and failed: ubuntu 32...

  • Git notes

    git flow

    When googling “git branch model”, this is the first entry. It is very close to what we do at iwoca. In pydsl I don’t use a development branch; I just use master and feature branches, merging them whenever they are ready.

    The more I use git, the more I realize how cheap is to branch and remerge, and how easy is to have all the branches living in the same repository at the same time. Subversion and CVS got the versioning right, but made branching complicated.

    Diff to the common ancestor (like gitlab, github and bitbucket)

          git diff master... < common ancestor

    Merge but always resolve towards the branch merging in

          git merge  --strategy-option theirs master

    Make an interactive rebase without tripping with the merges into the branch

    git rebase -pi or git rebase -ri

  • How to make code more reliable

    There are a few techniques to make code more reliable: Contracts It is a set of pre and postconditions attached to functions or types, which can be functions themselves. They might be enforced both at compile and execution time, or by external tools against the code See: ADA...

  • Parser classification

    Grammar Classification This is the Chomsky formal grammar classification in CamelCase RecursivelyEnumerableLanguage RecursiveLanguage ContextSensitiveLanguage MildlyContextSensitiveLanguage ContextFreeLanguage RegularLanguage Recursive descent parser Left to right Calls a recursive function with a slice of the input and a symbol, trying all productions, until a terminal symbol is reached....

  • Implementing Domain-driven Design

    Implementing Domain-driven Design by Vaughn Vernon Following DDD by Eric Evans, Implementing Domain-driven design attempts a more pragmatic style on the same topic. One of the advantages of this book is that it highlights the importance of bounded context/subdomains earlier and more deeply than the original book. However, the...

  • Domain Driven Design

    Domain Driven Design by Eric Evans Domain Driven Design is a set of concepts and paradigms invented by Eric Evans, and converted into a book. I own a digital copy of it, and I find it one of the most useful paradigms for development. The basic idea is that...

  • How to make bad code

    A function is named after the caller rather than what it does The name of a function represents its contents, no where it is used def calculate_score_for_table(a, b): return sqrt(a**2 +...

  • Practical Vim

    I have bought Practical Vim by Drew Neil. The book is really solid and to the point, it feels like a short reference for vim with loads on effort on what can be done. It is a good book to open at random and read about something new, and...

  • Domain Driven Design in python

    This is a collection of notes specific to Domain driven design when implemented with python. The structure I have followed is the same than in the main DDD book by Eric Evans. The building blocks of Model driven design Isolating the domain In the context of the layer...

  • Dumping json from django preserving order and indentation

    In python3 the hash function is randomized by default, hence the need to set the hashseed to 0.

    PYTHONHASHSEED=0 python dumpdata --indent 2

  • Python 2 to Python 3

    Part of my work in different companies has been about the transition fromp python2 to python3. It used to be recommended to use 2to3, but nowadays most of the efforts are around the use of __future__ as well as the future and six library print...

  • How to spot fake news

    #How to spot fake news A few ideas on how to spot fake news. I wonder which approach are the new automated factchecker companies are using. Here is my own list: The source is defined exists, its role is defined, it is directly connected to the topic, doesn’t profit...

  • DDD fundamentals pluralsight

    by Steve Smith and Julie Lerman. I followed this course via pluralsight during my Rightmove days. Overall it was a good introduction and decently pragmatic. However it didn’t expand my knowledge beyond C# specifics. Introduction The first few chapters introducer Domain Models and Aggregates, without expanding too much outside...

  • DSLs and Towers of Abstraction with Gershom Bazerman at NY Haskell (also reddit link)

  • Introduction to Parsley

    Worry-Free Parsers with Parsley by Allen Short introduces PEGs and Parsley implementation

  • MongoDB verification

    As many other IT startups, we are using mongodb at iwoca. Mongo is a database that belongs to the NoSQL family. It stores documents in BSON format (a slightly enhanced binary version of JSON) without enforcing any structure. Mongo interacts very well with dynamic languages like Python; BSON objects...

  • Internal DSL vs External DSL

    When creating DSLs from a programming languages, there are two ways of implementing it: Internal and External. Implementing an External DSL implies creating the code for all the steps: Lexer -> Parser -> ASTTranslator (Frontend) -> Interpreter/Output/Bytecode (Backend) An internal (embedded) DSL means reusing parts of...

  • Operaciones en pyrqt

    Los programas de estadística no son más que entornos de manejo de datos en los que se puede realizar ciertas operaciones. En el caso de R, las funciones estadísticas son llamadas por consola, y su ayuda puede ser consultada a través del comando help. En driza, al ser una...