Menu Categories Author

Nubis Novem

Consulting On Cloud Nine

Tag: functional programming

What’s the Fizz Buzz: A fully functional code example in Perl

Here is why should you want to know about so called “Fizz Buzz”: it is mystifying!.. No, not really, at least not if you know how to program. Simple put that is one of most common requests to write a sample code while interviewing for a programming job. As quoted on c2.com the “Fizz Buzz” request might be formulated as following:

“Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.”

Read more

Perl: Extracting Alpha Vantage stock price history via parallel threads

As we are getting more and more acquainted with a valuable flow of free financial information provided generously by a company called Alpha Vantage, we will now come up with a Perl script that would facilitate data extraction from their feed. The abovementioned service is free, but you have to register to obtain your individual API key. For obvious reasons we will use a demo API key in our Perl code examples here. We recommend you to get your own.

Read more

Lack of context type for Perl hash arrays

Just some random thoughts on a napkin. Please do not shoot the messenger, but Perl would gain a lot in readability if it had reduced even more some of its generic constructs with better use of unambiguous context. For instance, who is in favor of a separate context type for hash arrays (associative arrays usually defined as %hasharrayname), please raise your hands.

Read more

ProgFun is back

In about a month, on April 25, 2014, the next iteration of Functional Programming Principles read by Prof. Martin Odersky starts on Coursera. Regular college or university students contemplating participation should by all means follow their mentors’ advice. Mine is for those among seasoned and mature programmers, both professionals and amateurs, who have missed the opportunity to master functional thinking in their good time but are sharp enough to see their peers—who have had the chance—running circles around them intellectually.

Read more