PortoData December 15th 2015, Road to database automation

Last Tuesday (15 December 2015) I made my first presentation in Porto.Data community. “Road to database automation” was the title and the this session had two main goals: discuss the challenges of database inclusion in the Application Lifecycle Management (ALM) and present a set of strategies and tools to achieve this inclusion.

The effort of database inclusion in the “agile context” is designated as Database Lifecycle Management (DLM) and is composed by 3 main parts: database source control, database continuous integration and database continuous delivery.

In the first approach to database automation are presented some strategies/techniques and tools, such as Mercurial (TortoiseHg) and Git (SourceTree) for source control and Flyway for database migrations management,  to deal with the challenges that a database version control system implies.

Arduino Christmas Lights

One of my first projects using Arduino happened during the Christmas season, so seemed a good idea to create Christmas lights to illuminate and brighten the house.

The first step is to gather the necessary hardware:

  • 1 x Arduino, I used the Arduino 2009;
  • 2 x breadboard, should be enough to perform the tests;
  • 1 x switch button, it will be used to switch between the diferrent lightning effects;
  • 8 x red LEDs
  • 8 x green LEDs
  • 8 x yellow LEDs
  • 4 x 56Ω resistor
  • 4 x 33Ω resistor
  • 4 x 47Ω resistor
  • 1 x 10kΩ resistor
  • wiring

The second step is to connect LEDs so that there are no excessive current circulating in the circuit since a small change in voltage may cause large current variations (the current through an LED varies exponentially according to the voltage that crosses).

The solution is to use resistors, which have the purpose of limiting the amount of current to a safe value. To define the resistors values and the appropriate way to connect the LEDs I resorted to the following website: LED center.

Relevant information:

  • DC source voltage: 5V (Arduino output)
  • Forward voltage:
    • Red LED: 2.0V
    • Yellow LED: 2.1V
    • Green LED: 2.2V
  • Forward current: 20mA for 3mm and 5 mm LEDs
  • Number of LEDs: 4 x LEDs for each Arduino output (it were used 6 outputs)
Red LEDs
Yellow LEDs
Green LEDs

The represent the whole circuit I used Fritzing. This tool, which is an open-source project, allows documenting prototypes, share those same prototypes and even design the layout of a printed circuit board (PCB).

Circuit using breadboards

To download the Fritzing file (.fz extension) click here.And so it concludes the part referring to the hardware.

The third step is the lighting effects program creation for Arduino. The program was written using the Arduino IDE and is defined by a set of lighting effects and the ability of switch between them. The following lighting effects were defined:

  1. blinkAllLights:  the lights turn on and off periodically;
  2. runningLights 0: the lights starts as off and then light up and down successively;
  3. fadingLights: the LEDs intensity is increased and decreased step by step;
  4. runningLights 255:  the lights starts as on and then light down and up successively;
  5. Adds the above affects,1 to 4, in a sequential manner within a loop.

The switch button lets you toggle between the different lighting effects. It should be mentioned that the fading effect implies using the PWM Arduino outputs.

The code can be downloaded from this link.

Merry Christmas and Happy New Year!

SQLSaturday#429 Porto 2015 experience


My first contact with SQLSaturday event occurred in 2014 on the SQLSaturday#341 Porto 2014 edition as simple and curious attendant. A full day of learning, sharing and meeting people sounds to good to be true especially if it´s free. At the end of the day I was amazed, and asked myself why organize and event like this? The answer is quite simple: sharing.

The same principle lead me to join Porto.Data community. It was here that I met Ivan Campos  the community leader, who invited me to make part of the SQLSaturday#341 Porto 2015 organization. Of course I accepted his challenge with great pleasure and apprehension, after all I was just a “rookie”.

The organizing team was mainly composed by Ivan Campos (@WizardDBA), I (@EdPiairo), Paulo Correia (@paulofmc) and Filipe Coelho (@DataPlumbR). But we were not alone, a group of volunteers helped us materializing the event, and we also count with the guidance from the members with more experience like Niko Neugebauer (@NikoNeugebauer), Pedro Simões (@pedro_mg_simoes ), and others. I’m proud to say that the event was a great success and I want to thank all who contributed to this success.

This success was the result of the work carried out over months before the event. As important as the final result of the event were the lessons learned.  The importance of having a plan was well understood by the team. It’s very important that each member know what, when and where to do.  It´s also important to exist the role “plan master”, who is responsible for ensuring that the plan is being implemented. The plan and the plan master gain more relevance when the team has junior members (as me).  Here’s a tip: you should have a survival guide to help the team in the organization process allowing better deal with stress/adrenaline.

In the end of the day I presented two types of feelings. As a team, we share the “mission accomplished” feeling, we were then a team. As an individual, a feeling of “profit”, I had the opportunity to know and hang out with the speakers, the opportunity to meet new people, the opportunity to learn and share knowledge.

For all the reasons presented above I leave you this advice: you definitively should try!

Ultimately, I want thank Ivan for his invite, wich has provided me a great experience, and congratulate him for the success as leader of the event organization.