Factorial calculation algorithms


Eventually, at some point in your coding career, you’ll need to calculate the factorial of a number.

This, of course, with most modern programming languages shouldn’t be a problem… unless you need to calculate the factorial of any real number, even if it is a fractional number. […]

Drawing lines in the Console (or elsewhere)


I remember once needing to code my own drawing functions for an HP48 and not having a clue how to draw line.

My first implementation worked by determining the delta increment that should be applied to both x and y from the starting (x0, y0) point to the final location (x1, y1).
Although this worked, it resulted in horrendously looking jagged lines.
To make matters worst, I also had to calculate the sign of the increments, based on the slope of the line, which added complexity to the code, making it quite ugly and slow.

Then a couple of days later I realized that a line is nothing more than the radius of a circle!
That was quite an eureka moment for me.


Without heresy there is no free speech


Moving piece and great reporting from The Young Turks (as usual) regarding the solidarity shown around the world towards the recent terrorist attacks in Paris, defending our most dearest right: freedom of speech.


I guess I haven’t been bored for a while…

Busy Orange Man

I haven’t had the time to get bored for a while, hence the lack of new posts.

Fortunately for me, I’ve been pretty busy working on a number of different projects.

Among them, I started coding for Android (using Xamarin) and as soon as I finish the project I’ll post my impressions on the experience which, to say the least, has been quite bumpy.

Also, I’m about to start a new project using Xojo; I’m sure this “experience” will produce a pretty entertaining post 😉

Finally, I’ve been preparing an article covering a three years long project I worked on, which never got approved.
This is by far the most complex program I’ve ever worked on and I’m sure it’ll blow your mind.
Hint: Think of Shazam/SoundHound on steroids.

.NET introduces binary literals

Binary PeopleWith the introduction of the new Roslyn compiler platform for Visual Studio, the .NET languages team has, finally, made available the support to declare and use binary literals for VB.NET.

Back in 2011 I posted a request to the .NET languages team to implement support for binary literals and also took the liberty to suggest some improvements to the syntax currently used by VB.NET to declare these literals. […]