Programming Leftovers
-
Fabio Alessandro Locati: Parse multi-CSV files in Go
As it happens every year, I had to pull a lot of information from various financial intermediaries and convert them into the way the local tax system wanted them. For this reason, I created a Go program that does this modularly. Whenever I have a new financial intermediary, I create a new module that can read whatever format they create and returns a structured object in the form that the application expects. This year I added a new financial intermediary with a very “interesting” CSV format.
To be able to condense multiple different kinds of data in the same file, they created a CSV file that has as the first column the name of the content (I think of it as the database table name). In the second column, we will find either Header or Data to distinguish if the row represents the headers for that “table” or rows of data, and then from the third column, it looks like a normal CSV file.
-
Using console.log() in JavaScript - Pi My Life Up
The console.log() function is an incredibly useful part of JavaScript that you can use to debug your code.
This function allows you to write messages to the console from your JavaScript. It allows you to easily debug your code on the fly as you can print out any required values when a problem occurs.
-
Flutter vs Kotlin – For Android Development
Believe it or not but the future is going to be in the hands of compact devices such as mobile phones, tablets, etc. In the last few years, the pandemic has changed the whole business metrics. That’s the fact, companies are now trying to find a way to reduce their production cost and speed up their sales figures. and they’re focusing more on developing sustainable mobile applications to maintain their true existence. There’s no surprise that it is one of the most important trends in the world of the software development industry.
-
Learning OCaml - (think)
For as long as I’ve been into programming I’ve been learning some new programming languages on the side. The more “exotic” and “niche” they were - the better.1 While my professional career was mostly focused on C, C++, Java and Ruby, over the years I’ve been playing to a different extent with languages like Prolog, Common Lisp, Scheme/Racket, Clojure, Smalltalk, Erlang, Elixir, Scala, Haskell, just to name a few. It’s funny that every couple of years I revisit Erlang and Haskell, but I always fail to truly master them. Anyways, for some reason (laziness?) I haven’t been seriously learning anything new since my last (failed) stint with Haskell 3-4 years ago and I’ve decided it’s time to change this. After compiling a short list of appealing candidates2 I’ve opted for OCaml - one of the most famous members of the ML family of programming languages.