23,391

“Hello, (real) world!” in PHP in 2017

You might think that it’s easy to write in PHP, and that “Hello, world” looks something like this: <?php echo 'Hello, world!'; Well, what else could one expect from a language with such a gentle learning curve? That’s exactly how it used to be. A long time ago. But now, in 2017, no one does it this way. Let’s see why, and try to build a more realistic hello-world application step by step.
21,512

Meteor. How to Build a TODO List

In this tutorial I don’t want to discuss why Meteor is the killer of the web, especially because I don’t think so and even like this framework. That’s why I want to show what to start with when developing applications on it. I’ll tell you about what packages there are and what Meteor is. I don’t have much experience in developing Web applications. I’ve been doing it for two years only, and I got to know Meteor only a few months ago.
11,701

An Interesting Task for an Interview. Currying and Partial Application of a Function

I am currently attending some job interviews. Some of them are boring, others are interesting. During one of the interviews they asked me to write a function that could add two numbers. So, I wrote: it ('should add two numbers', function () { var add = function (a,b) { return a + b; }; assert.equal(add(2,3), 5); }); — «But what if that the function signature should be something like add(num1)(num2)?
1,957

JavaScript optimization challenge

Hi, we’re hosting the JS optimization challenge right now, with cash prizes and all. Link to full rules. The challenge: make JS strftime function very fast, and beat the performance of GNU libc’s strftime. The slower code that can be used as a base for optimizations is here: github.com/mvasilkov/strftime You’re free to use that source as the base of your solution. To make things interesting, we’re not providing the reference benchmark.