Categories
Life Programming

Goals for 2020

It’s nice to have a list ready about what I would want to achieve this year. One is really ambitious of course, but this is something to refer back to later during the year, something to get inspired from in times of difficulty.

So here we go.

Categories
Programming

Stress testing for “Data Structures and Algorithms” courses – Java & Python

I am doing the Data Structures And algorithms specialization on Coursera. (Which means every now and then I pick it up and make a few weeks of progress…) Started out with Python and now I’m switching to Java.

In this post I’ll show you how to set up stress testing, by generating random input data and comparing your implementation’s results to correct “naive algorithm” results.

I’ll also share a script that loads input from files and compares them to answers. This is useful for testing example inputs or pre-given tests for some exercises (usually where stress testing is not feasible)

Moreover, there is a GitHub repo with the ready-to-use solution.

Categories
Programming

My Java experience as a Javascript developer

Motivation – why learn Java as a JS dev?

As a software engineer for about 2 years, I learned a lot. Starting out as a Typescript/Node.js developer, I quickly got the gripes of the Javascript world.

As we know, Javascript is a dynamically typed language, with an ‘objects linked to other objects’ (or prototype linking) approach. ES2015 adds some class-like syntax sugar on top which I personally don’t like, but frameworks such as Angular really embrace them.

Typescript adds static, compile-time type checking to the picture with a neatly engineered type system but it ultimately has no effect during run-time (apart from juggling with source maps).

I think that if as a developer you specialize in one or two languages, it’s still important to learn other languages, too, to widen your views and better understand general programming principles.

I believe general understanding turns you into a better engineer even if you don’t have a CS degree, plus it helps you pick up other tools of the trade (languages, frameworks) easier during your career.