A month ago I discuss with a customer about BDD, Behavior-Driven Development, and i show our exciting results with this approach. He was extremely interested in because he knows how many time a company waste during a product development because of missing business expectations. They uses WordPress as a framework and develop several plugins in order to realize custom features.
I was one of ZFDay’s speakers, here in Turin on 7th February. I present a talk with title: Build your own (micro)framework with ZF2 components (as building blocks). In practice i present how we can achieve an interesting result with just a couple of components. The framework that we have created at the conference is based on the event manager and relies on the service manager for getting and resolve internal/external services. In this little article i just want to explain more the framework.
I use Vim as text editor during my daily work on source code. It is cool, i like it almost always. My projects are typically test driven or at least i always create a bunch of tests. Movements between buffers are quite simple in Vim but i want something that can simplify my life more. Issue a command in order to open a related test-case from a source file or viceversa.
I have written about the UpCloo Web Framework few months ago (click here) and, as the README.md says, the micro-framework (App.php) is quite a bit messy. At this time is important, before starting add new features, clean the code base a little bit and move on with the microframework. In order to do this I want to apply the Boy Scout Rule: “Always leave the campground cleaner than you found it”. First of all I ran all tests and I discover that App.php is poorly covered (only 46%) and many key features not at all (at commit c70375e6).
A couple of days ago I found an interesting breakout. The HC-SR04 ultrasonic sensor. It is so cheap, just 3€ (yes, three euros). Why not, why don’t buy it… There is a little problem with this component, it is TTL 0 – 5V. All Raspberry Pi GPIO, are 3,3V and not 5V tollerant. So I decided to skip this problem (yes i skip the problem… but, with a couple of resistor I think you can achieve a good solution), just because I don’t have any resistor at home… Now the point is: Do i damaged my Raspberry Pi?
The event driven design of modern PHP frameworks is very useful and interesting. Different ZF2 components are designed with events as well. This feature, that adds different pre/post event abilities can solve different problems. One of those is to modify the caching layer configuration (ttl and others parameters) on different cacheable data.
GPIOs are super interesting in Raspberry Pi. My version of this board (Model B) has a couple of i2c buses available for use. GNU/Linux handle i2c as character devices. Thanks to this, is super easy develop something that communicate with i2c peripherals. My friend Gabriele Mittica bought an IMU breakout for Arduino and for the Grove shield, the MMA7660FC board. He gave that to me in order to try it with the Raspberry Pi board.
A couple of weeks ago I bought a Raspberry Pi and it is an interesting board: ARM processor, 512MB RAM (v2) and many other things like GPIOs. I want to realize something that works with GPS and IMUs. This board, with raspbian and other linux based os, is not an embedded system, is more like a general purpose computer but with more interesting possibilities. First of all: Go programming language is designed also for this kind of platforms (ARM based) and this open a wide set of incredible projects and with GPIOs we can communicate easily with different peripherals.
Da qualche settimana ho inziato a lavorare con il linguaggio Go per diversi motivi. Ieri ho acquistato la Raspberry Pi modello B perchè vorrei realizzare una struttura di localizzazione e movimento di un “mezzo”. L’idea è quella di utilizzare le porte di IO per comandare dei servo e ricevere in input alcuni dati da diversi sensori (GPS, etc).
Ieri sera ho trovato sul web una sfida di programmazione (Synacor Challenge) veramente interessante. Mi ha colpito subito perchè mi riportava alla mente l’assembly ed il divertimento nel mondo dell’elettronica. La sfida è interessante, si tratta di scrivere una “macchina virtuale”, un semplice automa a stati finiti che esegue un programma passato al “boot”.