Node.js in Production

It is a partly sunny Sunday in the Twin Cities of Minneapolis and St. Paul. Currently I am waiting for my wife to get ready to go out for a walk. Yesterday it was cloudy and sprinkled on and off all day. Towards the end of the day it cleared up but we were not in the mood to walk given that we were watching movies at home.

Spoke on the phone with my youngest son. He and his wife were driving to Wisconsin from Indiana to check out a few homes today. He got a job in the area and the family is moving in a month or two. Seems like a house that matched their expectations came on the market last week and they are hoping will meet and exceed their expectations. Will find more about it later this afternoon when they drive back home. Continue reading “Node.js in Production”

Promise to Async and Await

Yesterday on snail mail I received a pin from the Red Cross. Apparently I have given blood 16 times so far. That adds up to two gallons of blood. Planning on continue to donate in the foreseeable future.

As you can tell based on the code we will be using for this post, I am a fan of Ian Fleming’s spy novels staring James Bond. I read all his books when I was growing up. Have watched all the James Bond movies and own a DVD collection of all the titles that have been released of 007.

To start we have a set of functions written in JavaScript Continue reading “Promise to Async and Await”

Async and await in C#

When developing a software product or service, system architects need to decide to build or buy the pieces / components needed to develop and deploy the solution. I am stretching this well know strategy to a set of events in my personal life that occurred a month or two ago.

A few years my oldest son and I went to a barber shop once a month. The small place has two chairs. With time only one was being used. At some point the barber decided that he was about to retire. We had to look for an alternate place. Continue reading “Async and await in C#”

JavaScript Promise

I have been asked why I am dealing with RESTful services in JavaScript. My idea is to create a set of services that implement sets of APIs (e.g., DICOM storage server) using different programming languages (e.g., C#, Java, and JavaScript). Once that is done will decide on a single service implementation implemented using microservices written in different programming languages. The API for such RESTful server will be determined at the time. As you can see there is some logic behind this madness. If possible, I will then deploy the same set of microservices in a couple public platforms (e.g., AWS and Azure). Continue reading “JavaScript Promise”

Beautiful Triplets

It seems that today is going to be another nice day in the Twin Cities of Minneapolis and St. Paul. For some reason I woke up a few minutes shorter than 04:00 AM. I decided to give a try to the HackerRank challenge that I received via email.

If interested take a look at the requirements on how to determine what makes a triplet beautiful. Continue reading “Beautiful Triplets”

Basic RESTful Service – Part II

It is a rainy and stormy day in the Twin Cities of Minneapolis and St. Paul. All is well with rain, but I do shutdown my computers as soon as we get lightning. Have my computers connected via different power supplies, but on more than one occasion I have lost multiple components. So as soon as I hear thunder, I immediately shutdown and read until the storm subsides.

I worked in 2-hour blocks. At the end of the second block I went up and prepare tea. My wife and I have this morning ritual. What was unique today is that a rafter of wild turkeys was in our backyard. Last Friday the tom had two females and they were stopping traffic on the parkway. Today the rafter has grown to include seven females. There are several large parks and dozens of lakes and ponds in this area. We see turkeys year round. Continue reading “Basic RESTful Service – Part II”

Bootstrap Jumbotron

It is a beautiful Saturday in the Twin Cities of Minneapolis and St. Paul. My wife and I will be going for a 5 mile walk later this morning.

Today I woke up around 04:00 AM. It was somewhat warm at home. Turned off heating and opened a window. Since then the inside temperature had dropped to a more comfortable 68 degrees F.

This morning I read a post titled The Middle Class is being Disrupted by the One Percent by Michael K. Spencer on Medium. The post is quite interesting to me. The reason being is that I have been thinking and discussing with friends and family similar ideas. Something needs to be done by companies and governments before Capitalism and Democracy becomes a chapter in a history book. Continue reading “Bootstrap Jumbotron”

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”