Calculate Pi

It is a beautiful day in the Twin Cities of Minneapolis and St. Paul. Currently it is sunny and the forecast call for highs in the lower 60s. My wife and I are planning on walking 5 miles after work.

The topic for this post is computing Pi. Unless you are working on some specific mathematical issue that requires an extreme precision, you would not attempt to generate Pi or care about how it is generated.  You would use the value (typically a constant) returned by the mathematical library in your favorite programming language. Continue reading “Calculate Pi”

Basic RESTful Service – Part I

One can use different programming languages, frameworks and libraries to develop a RESTful web server which exposes the same API. In this post I will implement a RESTful server using JavaScript, Express, and npm libraries.

Given that one needs to start with some level of requirements, we will use the following short and simple statement:

“Implement a very simple RESTful API for a storage server that supports store, query, retrieve and delete operations using DICOM data”. Continue reading “Basic RESTful Service – Part I”

Yard Design

This morning I received in my Gmail account the following edited message:

“Hello Mr. Canessa,

I have a long fixed rectangle in my front yard and I would like to design a Fibonacci garden within this rectangle.

The width of the rectangle is 16.5 feet. The length is 48.5 feet.

I am thinking I could fit two Fibonacci designs within this but I don’t know where to start with my measurements.

How do I go from a 16.5 x 16.5 big square to the smaller squares and rectangles?

Any help will be appreciated.

I do sort of understand but would like some help so that it looks right.

Thank you!

Regina”

The message was also left in this post. Continue reading “Yard Design”

JUnit 4 – Parameterized

The winter storm in the Twin Cities of Minneapolis and St. Paul is over. Currently there is light snow falling but the temperature is above freezing. Hopefully all the snow will melt somewhat slowly in order to avoid flooding.

In this post we will revisit JUnit 4 from the parameterized angle. I have covered other aspects of JUnit in this post. Continue reading “JUnit 4 – Parameterized”

ACM ICPC Team

It is Thursday April 11 and this area of the Twin Cities of Minneapolis and St. Paul has received since yesterday around noon to today around 04:00 PM about 10 inches of snow. Around noon today the snow stopped and we start receiving freezing rain. Schools are closed and there is very little traffic in the area.

According to the forecast, tomorrow will be raining during the day. Not sure if the precipitation will turn into freezing rain. One way or the other, staying home working is not a bad idea. Continue reading “ACM ICPC Team”

Node.js Issue – RESOLVED

A couple days ago the temperature in the Twin Cities of Minneapolis and St. Paul rose up to 70 F. Yesterday the highs were in the upper 50s. Today the temp is going to go as high as 34 F and will be raining and snowing. Not sure how much snow and rain we will be getting. Hopefully things will not flood.

I am working with micro services and Node.js in order to streamline a storage server currently implemented by three monolith services. We will be going the hybrid route for a while. Eventually all will be implemented with Docker and possibly running on a public cloud (i.e., AWS or Azure). Continue reading “Node.js Issue – RESOLVED”

Equalize the Array

It seems like it is going to be a nice day in the Twin Cities of Minneapolis and St. Paul. The sun is shining and the forecast calls for a high in the mid 60s. If it remains dry my wife and I will go for a walk around 05:00 PM. Looking forward to a walk to burn some calories gained over the weekend. Continue reading “Equalize the Array”

Singleton Threads

My wife and I enjoy cooking and of course eating the food we prepare. Yesterday we decided to making from scratch empanadas. Different cultures around the world have come up with similar implementations. I am not a historian so I am not sure if all foods covered in some type of dough and then baked or deep fried, are derived from a single version or instance (the Computer Science shows up).

In the US we refer to a similar object with the name turnover. My wife’s family comes from Spain. According to this article the name empanada was mentioned in a book published in Catalan as early as 1520. It seems that one should be able to find the best recipes for empanadas in and around Barcelona. Next time we are in that area will make sure to have some empanadas.

My parents came from Italy. As a matter of fact I am first generation not born in Genoa.  In Italy there are similar foods named calzone and Stromboli both of which we had on my parents table quite often while growing up.

While searching the web with Chrome, I found this site which lists some foods related to empanadas. Empanadas enclose some type of food in dough while a food that is quite common in the US, presents the food in an open face version. That is what pizzas are all about. You can read more about pizza here. The modern pizza was created in Napoli, Italy, and yes my wife and I have been to the restaurant that claims to have created the Neapolitan pizza.

So back to yesterday, my wife made about seven pounds of empanada stuffing (beef, onions, eggs, garlic, and many other spices). I made a batch of dough (flour, yeast, olive oil, and a few more ingredients) which was enough to make about 18 empanadas. While we were preparing the food, one of my wife’s nice stopped by. Apparently she was interested in joining us for lunch. While we were chatting, my son calls. One thing and the other and he (plus wife and two sons) requested some empanadas for Sunday. We where forgetting that two of my in-laws and spouses were stopping by around 02:00 PM for lunch.

Panic mode set in. We had plenty of stuffing, but not enough dough. I made a second batch. As the empanadas were taking shape, I made a third batch. Of course the dough did not have enough time to rise, but it had to be done. When all was set and done, we ended with around six dozen empanadas. We were baking them in batches so things were moving along.

Our formal guests arrived so we all had empanadas with lime, beer, and wine. On Friday, my wife had prepared a couple gypsy arms stuffed with “dulce de leche”. We forgot to serve the salad but I had more than enough to eat and drink. We did not have a chance to walk outside yesterday. That said; I checked my fitbit before going to bed. I had about 10,500 steps. I was pleasantly surprised with the final tally.

Today we are going out for Chinese food. We do not wish to cook. Continue reading “Singleton Threads”

Singleton Pattern

It is a humid, cloudy and rainy day the Twin Cities of Minneapolis and St. Paul. Probably the only redeeming feature is that the Final Four is being played at the US Bank Stadium in Minneapolis. There are several streets closed in Minneapolis. Yesterday in the evening news you could see the amount of people eating, buying memorabilia, watching concerts, even riding a Ferris wheel built at a street intersection. It seemed that people were having lots of fun.

Yesterday morning I woke up shortly before 04:00 AM. I wanted to check on some tests running on a couple computers at home and had to write some documentation. I just got up and finished the tasks in the first 2-hour block of the day. Woke up my wife and had breakfast. She had plans with a friend to go shopping early morning. They were back around noon. We ended up having hotdogs for lunch, but what is most important, they had fun. Continue reading “Singleton Pattern”

Repeated String

A day or so ago I read a post on the Financial Times titled “How the Modern Office is Killing Our Creativity”. This is nothing new but seems that most people do not wish to understand the consequences and apply changes to improve. This specially holds for the CEO down to the project managers.

Since I can remember, I have always tried to set a reminder of what I need to achieve in a specified time period. In some cases I write down the set of tasks. In others I just repeat a set of memorized steps. One way or the other, if possible I perform the tasks in solitude. Of course there are some tasks that need to be performed with others (e.g., consultation regarding an issue, ideas if I get stuck, help team members when they need it). Continue reading “Repeated String”