In this article I want to share some concepts related to named and anonymous types in Go with an example exercise.

The exercise

Let’s take a text that represents a drawing with rectangles inside and our objective is to count them. The input is a []string input and the rectangles are drawn using 3 characters:

  • Vertices are drawn with the ‘+ character
  • Horizontal edges are drawn with the ‘-’ character
  • Vertical edges are drawn with the ‘|’ character

Here are a few examples:

A simple input with one rectangle
A simple input with 1 rectangle


Image for post
The zebra…

In this article I want to share the steps that I followed to solve the Zebra Puzzle problem in Go and the algorithm that hides behind its solution.

What is the Zebra Puzzle

The Zebra Puzzle is a logic problem that may have several formulations, one of which is the following:

There are five houses.

The Englishman lives in the red house.

The Spaniard owns the dog.

Coffee is drunk in the green house.

The Ukrainian drinks tea.

The green house is immediately to the right of the ivory house.

The Old Gold smoker owns snails.

Kools are smoked in the yellow house.

Milk is drunk in the middle house. …


In my experience as software engineer and developer I’ve come across the need to customize the creation of my Angular project. In this context I have found and started studying and working with Schematics from the Angular Devkit. In my article I want to share my experience with Angular Schematics and the steps I have performed to manipulate the creation and the structure of an angular project.

The operating system I am working on is Ubuntu 16.04 and the version numbers I am reporting later are the ones that I have obtained at the moment of writing this article.

References

I would like to share first few of the references I have used to learn about Schematics provided by the Angular Devkit and how to customize the creation and the structure of an angular project. …

About

Michele Caci

The story of a travelling Sicilian SW Eng living in Cote d'Azur dreaming the US and a normal life...well normal is just a word ;) - Inveniam viam aut faciam

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store