Showing posts from March, 2014

Reg for ZCA addicts - Part 1: Adapter

Recently I have been exploring Reg , a library inspired by zope.component written by Faassen, and I found its simplification of ZCA to be pretty interesting. Being really loving ZCA for a while now, I end up trying to figure out how the ZCA patterns fits if I were to use Reg in my future projects. So here are the list of items I discovered so far: Adapters This is the most common pattern I use with ZCA, primarily to simplify writing logic by standardizing the interface of objects I work with into a common set of behavior/functions: In ZCA , adapters are done this way: from zope import interface from zope import component class IDog(interface.Interface): def bark(): pass class Dog(object): interface.implements(IDog) def bark(self): return 'Woof' class IDuck(interface.Interface): def quack(): pass class Duck(object): interface.implements(IDuck) def quack(self): return 'Quack' class IAnimalSoundAdapter(i

Life updates

So .... I think by now plenty of people have known that I left Inigo Consulting a few months ago. Those who are wondering why, the reasons was primarily due to personal mental health reasons, which I identified the core source was that I pushed myself a bit too far, investing time and emotion on a business model that is not going to work out for my long term personal goals. I realized things are not going to the right direction for about a year plus, but my philosophy of persistence kept me pushing it - possibly beyond my limits and nearing total mental breakdown. This led to generalized anxiety disorder, which destabilized myself, and led to other problems that cause plenty of things around me to collapse and destroyed, affected me emotionally (which, again, I did not realize my limits, due to I have a bit of alexithymia - inability to accurately identify and express complex emotions besides basic happy/sad) made me push myself into a mild form of emotional posttraumatic stress d