June 18, 2018

Random hex strings

As a developer is sometimes happens that I need to generate some random bytes as a hexadecimal string. This could be the case if you need a short lived token of some kind. This is not something you should use to generate a password for any environment. So I have compiled a small sample in the languages I usually develop in. C# using System; Random random = new Random(); var bytes = new Byte[30]; random. Read more

September 6, 2017

Check if a value is an array in JavaScript

I am sure it has happened to everyone to call a function in Javascript without knowing exactly the return type. The question is, how can I test that value to see if it’s an array? This is especially true if you have business logic that differentiates between an array and a normal value, and performs different instructions based on the type. Well it’s actually super easy to do that. Always use the isArray() static method provided by the runtime on the Array object, introduced in ECMAScript: 5 Read more

August 30, 2017

About

My name is Christian, but my friends call me Chris I am a full stack developer and software architect. I love coding, from pure front end to back end integrations… and of course all that using a container or two ;) Currently I am working with NodeJS, Python and Go as a senior backend developer in the microservices squad at Nuuday in Copenhagen. The squad is working hard to create the new platform for our streaming services. Read more

August 30, 2017

Hello world

In most programming books the author attempts to appease the programming gods by printing a small sacrifice, usually ‘hello world’. Here is my attempt to appease the programming gods. In C# using System; class Program { public static void Main(string[] args) { Console.WriteLine("Hello, world!"); } } In Swift. println("Hello, world!") In Go. package main import "fmt" func main() { fmt.Println("Hello, world!") }

Copyright Ⓒ 2020 Christian Giacomi