guilhebl

Philosophical writings about programming and technology

How to intercept and mock external API calls in Golang

Mocking and testing in Golang is easy due to its inherent philosophy of how an interface contract is fulfilled: "Implementing a Go interface is done implicitly. In Go, there is no need to explicitly implement...
Read more...
09 December 2017

Dockerizing a Scala Play application

Docker is one of the most popular container technologies in the IT world nowadays. It provides many benefits such as portability and component isolation along some other features. For more info: Docker In this example...
Read more...
23 August 2017

Git - developer contributor typical lifecycle commands

These are the typical Git commands a developer would use in a bread-and-butter daily scenario through the development lifecycle. Create "feature" branch We are creating a new branch called "myBranch123" this branch will contain all...
Read more...
23 August 2017

Testing Scala application using Play framework and Mockito

In this example the controller class Product Controller fetches data from an external service called DataService. Since we can't call real APIs during Test we need to mock DataService and return mock data instead. Similar...
Read more...
12 July 2017

Finding K(th) Max or Min element of a collection

Frequently in software development projects there's a need for programmers to find the Kth smallest or largest element in a designated collection, in these use cases many are the approaces to fetch the Kth element...
Read more...
30 June 2017

Finding minimum size distance of a group of keywords in a document

An interesting problem that happens to be very common in search engine realms is to find the shortest snippet of text containing a certain group of keywords in a document. The solution for the problem...
Read more...
22 June 2017

Scala Url Shortener

Url Shortener Built Scala Url Shortener based on existing github java version.
Read more...
08 May 2017

Offer web v1 Angular1 code released on Github

Offer web Angular1 front-end webapp Search Prod Angular1 front-end app is now available on Github as an open-source project. Frontend github project link Previous Angular1 Frontend app code can be found at project github page...
Read more...
08 May 2017