#Coding4Fun – Sorting Arrays in #JavaScript, #Python and #CSharp … choose your own adventure

Buy Me A Coffee

Hi !

Not my usual set of posts, however this keep me thinking a lot. It all started with this tweet; an usual joke about JavaScript, and how it works with types.

array sorting in Javascript

I noticed that some responses focused on the “you need to know how the language works” before posting this. And it is correct, you need to know how JavaScript converts the elements into strings and then sort, to understand the crappy not so accurate output.

However, I am not a JavaScript expert, and I do not want to be one. And, when I use a tool or a programming language, I expect to have a nice learning curve; the previous example is not a nice “Welcome to JavaScript, where arrays and type conversions will make you think twice until you get it!”.

I’ve been doing a lot of Python programming, so I did the same exercise, and it worked as you may expect !

array and sort in python

I also did a similar in C#, and it also worked !

array and sort in C#

Do not get me wrong, this is not an Anti-JavaScript post. JavaScript is awesome and is almost everywhere. I know a lot of awesome JavaScript programmers, who I really admire.

However as a developer, I expect to avoid something simple like an array sort issue. I will always focus on “the code is clean and everyone will understand how it works, just read the code!”.

I am used to this as a C# developer; and I also found that Python is cool for this. But, sometimes, just sometimes, JavaScript looks like hell !

Bonus: An old post in my last JavaScript adventure.

Happy coding!


El Bruno

#Net – Learning C # using only a browser


A few days ago, at a university, one of the attendees in a session asked me what was the best way to learn C#. As always, this question depends on the level of the person who wants to learn, although it has served as an excuse to see what’s new in the .Net ecosystem.

Well, in addition to the (now) classic Microsoft Docs, I found a resource that is rather interesting

.NET In Browser tutorial

The format is rather simple, a small tutorial on basic concepts of C #, a web code editor and the chance to compile and see the result on the same web.


As entry point for concepts such as handling of strings, arrays, etc. it seems like a good starting point to start.

Greetings @ Burlington

El Bruno


#Net – Aprendiendo C# utilizando solo un navegador


Hace unos días, en una universidad, uno de los asistentes en una sesión me pregunto cual era la mejor forma de aprender C#. Como siempre esta pregunta depende del nivel de la persona que quiere aprender, aunque me ha servido de excusa para ver que hay de nuevo en el ecosistema .Net.

Pues bien, además de los clásicos Docs, he encontrado un recurso que es más bien interesante

.NET In Browser tutorial

El formato es mas bien simple, un pequeño tutorial sobre conceptos básicos de C#, un editor web de código y la capacidad de compilar y ver el resultado en la misma web.


Como punto de entrada para conceptos como manejo de strings, arrays, etc. me parece un buen punto de partida para comenzar.

Saludos @ Burlington

El Bruno