Matheus Marabesi website, sharing ideas about software development - Listing posts on page 7

Rethinking legacy code and testing

Previously I discussed about legacy code and the strategies to test legacy code bases [1]. In short the strategy is based on a code base without any automated tests, the suggested approach is to follow a strategy starting from an acceptance testing and gradually refactor the code and get to the unit testing level. Ideally the code base would have several acceptance tests and then, the refactoring will start replacing the acceptance test suite with unit tests. The proposed strategy, is based in a single real world project, which may not fit all projects. Previously to that, I wrote an...

Clean code and the art of readable code a brief summary

Readable code is a subject of discussions among developers aiming to improve their code skills and also thinking about the human side of the code, indeed, the machine executes the code and doesn’t care about the readability or maintainability of the code, instead, this chore, is part of the daily life of programmers. Readability, can be interpreted in different ways by different people, therefore, there are initiatives to at least create a common sense. [1]. Previously I reviewed the book “The art of readable code” [2], this time, the focus is to compare the differences and similarities between “The art...

Setting up an API skeleton, what should I take into consideration? - Routing, Persistence and Caching

Building an API requires third party libraries, integration with database, cache solutions, testing frameworks, which patterns to use throughout the development between other tasks, that has nothing to do with the business domain. Such step, often, is not take as important as the business application, leading to later consequences. The goal of this post, is to build a skeleton for apis, as there is not universal programming language, I will focus in the javascript ecosystem. Previously I created a repository that was the first version for this post, the code is a way to start with a PHP based API....

Git release bot - PART 1

Releasing software to the final users is challenging regardless of the programming language of choice. For web apps it requires a web server, for compiled apps it requires a way for distribute the binary and for each one extra steps are needed, in the end the release is just the final step of a long process. In the old days, applications where deployed via SFTP and required to move file by file in the server, later on git, was used to make the changes a bit easier, without the need to upload file by file then the devops and continuous...

Lambda (AWS) - first impressions

Lambda has been a hot topic for a while, the proposal is hold in three main subjects (but not limited to): pay for what you execute only, scalability and composition (compose with different services such as, AWS s3, Kinesis, IoT etc). Lambda has changed how users think about cloud computing, giving the end user the power to chose and to pay for what is indeed executed. Out of the box, AWS supports different programming languages such as: nodejs, python, java, ruby, c#, go and powershell [1]. Unfortunately PHP is not supported as a default language, but, bref is a open...

ReactJs patterns - A study based on google search

ReactJS is among one of the most used javascript library according to GitHub it is one of the mos popular started repository. Given its popularity it is expected that the community around it will start to develop techniques, guides and tutorials around patterns. Inspired by the software systematic review literature paper [1], that collects a broader overview of the software engineering success and failure factors, this post has the goal to answer the following questions: Q1. What is the most popular ReactJS pattern? Q2. What are the themes that appears related to the patterns? Opposed to the scientific method presented...

Getting started with testing (PHP and javascript) - PART 1

Testing has its place in the development phase, often related as unit testing since the programmer write test cases for the smallest part of the code, such as a method of a class or a function. Therefore, to reach a level of confidence and write tests as a routine during the development cycle is a challenge for many programmers. The aim here is to give a guide line to get started with unit testing, and to reach a level of confidence to improve the development cycle, thus the programmer productivity. Prerequisites The first step to star get into the unit...

Clean architecture

Separation of concern, isolating pieces of code that repeats and decoupling responsibilities from different parts of the code base seems to be a common approach among experienced developers. Maximiliano Contieri for example, named coupling the only software design. Therefore, through the experience comes the opinionated approach, some developers might decide to create specific directories or others might use longer file names to express intent. I have published my own thoughts on that matter as well, and then I discovered the clean architecture book [1], which dives much deeper on that subject and also explores the pros of having an architecture...

Thoughts on REST API's

The architecture pattern REST was introduced by Roy Thomas Fielding in 2000 [1], since then, developers address the REST pattern as something related to the type of requests, such as GET, POST, PUT and PATCH, even though the dissertation presented goes deeper in the architectural style, rather than implementation details. This post aims to present resources on how to implement REST as well as thoughts on what I saw enterprise doing API’s, sometimes REST and sometimes not so. Definitions To get start with the REST part of things I would like to start present some definitions that I came across...