Facepalm, was exactly how i felt when i was chatting with my friend @Juliana Franco (which is going to be one of the newest students of Msc Software Engineer@FCUL so, congratz on her achievement!), and ‘why?’ you ask, this is why:
(n & 1) == 1
For non programmers, this & represents an AND bit wise operation, in short, this is a condition that verifies if n is an odd number. I, as almost every programing student around the world, have been working with binary numbers and bit wise operations for years and when i saw this i asked myself, why did i failed to see the usability of my knowledge and experience in an useful situation like, for instance, get a better performance out of my code? Why didn’t i think of this? (for non programmers, one thing that you always need to have in mind is the performance of your code, you can have 2 programs to do the exact same task but one needs 1sec to finish and the other needs 1hour, meaning that the first have have a better optimized code than the second, moving on…) If i failed to see something this basic, am i failing to see other amazing little things? Mind blown.
So, if you have any other programing black sorcery that can do magical things (lol), feel free to comment and share them!
On another note, we hit our first milestone, having 25 facebook page likes thus, securing an username for the page.
That’s all for now!