Infinite Sequences in JavaScript
Consider this classic interview question:
Write a function to return the first n odd numbers.
Just reading that, some readers will probably have started answering in their heads already. ...more
Consider this classic interview question:
Write a function to return the first n odd numbers.
Just reading that, some readers will probably have started answering in their heads already. ...more
There aren't many Unix utilities more Unixy than dd(1). It takes data from the input file and writes it to the output file — but it's kind of shy. Wit… ...more
Like most people, I was born without knowing how to touch-type. Growing up, I'd pore over programming guides and magazines. I'd write programs out lon… ...more
In my last post I took a perfectly good program and went about optimizing it. My first attempt was substantially slower, and I progressively found and… ...more
My friend showed me a piece of code he wrote years ago. It takes binary data on stdin and converts each octet to a sequence of 8 0 and 1 characters o… ...more
canvas { background-color: #aaa; } One quiet night I was remembering how much fun I had plotting graphics on my TRS-80 Color Computer and lamenting th… ...more
In the last post we finished implementing the TopQueue
class and looked at how it was able to perform so much better than the
plain sorting solution from Part 1.
This time we're going to drill down into Scala and turn our special purpose integer collection into an elegant, general purpose tool. We'll implement and briefly discuss a number of Scala features along the way. ...more