Published inCodeX·May 16, 2021Why You Should Always Avoid Static FunctionIt is always tempting to write a static function. We can call them from anywhere directly without having to inject/initialize/prepare their wrapping class. But we should never do it. In fact, they should just not even exist in any programming language. 1. They Are Not Testable Suppose we have this method in class Test: public…Java4 min readJava4 min read
May 7, 2021Three Ways to Validate JSON in Java(a sample github project with all the examples is given at the end) 1. Validate with jackson (obvious way) The obvious way to validate json is by mapping to a typed object through serialization (here with the most popular lib for that in java: jackson): public class MyJsonClassTest { public static class MyJsonClass {…Json4 min readJson4 min read
Apr 28, 20212. First step of the software development journey: get preparedMy previous article was trying to stimulate interest in software development, especially to scientists. The end goal is to use the enormous computing power available like you use your hands or your brain. To use the large amount of cloud servers as an extension of your thoughts. …Software Development5 min readSoftware Development5 min read
Apr 24, 20211. From “scientist” to software developerIf you are a scientist wanting to do real science and make money out of that, this post is for you. 8 years ago, I choose to become a software developer after finishing two degrees in mathematics & physics and I hope you will do the same. Why do we need more scientists? We can ask…Programming3 min readProgramming3 min read
Nov 24, 2020Setuping A Sandbox MariaDB Master-Slave ReplicationTesting some failover scenarios and replication parameters in a sandbox environment before going into prod or buying new machines is common sense. Here is a quick tutorial on how I do it with docker. Starting With a docker-compose File I would not recommend using containers to hold any persistent data in production (see this good…Mariadb Replication3 min readMariadb Replication3 min read
Jan 13, 2020Using LaTeX in Visual Studio Code on WindowsCombine the best text editor with the best document preparation system: edit in LaTeX with VSCode! Here is a quick reminder how to install and use LaTex with VSCode. First you need TexLive: go to https://www.tug.org/texlive/acquire-netinstall.html and click on the .exe download for Windows: 2. Once download is finished, click…Writing3 min readWriting3 min read
Published inAngular and dot NET·Oct 21, 2019Create a custom domain on Namecheap and connect it to a firebase web siteHere is a quick reminder how to create and connect a custom domain to a firebase web application hosted in firebase hosting plan. …Firebase3 min readFirebase3 min read
Aug 3, 2019How to summon and play with legacy softwareMost of the time, I don’t want to play around with frameworks/databases/libs and so on, while I’m working and billing a client. I want to do some experimentation at my home before launching an idea in a real and bigger project. I share this method with many developers. In fact…Docker1 min readDocker1 min read
Aug 3, 2019Using OracleBulkCopy the right wayWhy waiting 15 minutes when you can wait 5 seconds for the exact same query in Oracle? Or asked more cleverly: why an oracle C# data access provider would ask you this stupid question? I recently wrote a simple “InsertMany<T>(IList<T> list)” function to “Bulk insert” inside an Oracle table. I…Oracle2 min readOracle2 min read
Published inAngular and dot NET·Mar 26, 2019Reading Assembly Info Without Loading It In C#I was puzzled by a very peculiar problem the other day: I wanted to read the manifest information from an assembly (dll). In C#, this is pretty straigthforward: var assembly = Assembly.Load(“your-library.dll”); Unfortunatly, this method load the assembly in RAM. So if you want to read the same assembly both…Decompile2 min readDecompile2 min read