ALL


  The future smells like JavaScript

Of course I am only repeating what others are preaching about the recent rise of JavaScript.But I think the movement is significant and can't be overstated. And recent developments are really even making it more and more interesting.Nobody can deny hat JavaScript is the de facto programming language of Html5. Every other language trying to bolt itself onto Html5 looks like pure friction so far. And Html5 is looking upon a prospering future.Today we are used to some established JavaScript frameworks that make working with JavaScript more fun and productive. jQuery seems to emerge as the clear l...

3,263 0       JAVASCRIPT FUTURE NODE.JS CLIENT-SIDE


  An Object is not a Hash

Following my article A String is not an Error, I want to bring attention to an issue that similarly applies to JavaScript in general, but has special relevance in the Node.JS environment.The problem boils down to the usage of {} as a data-structure where the keys are supplied by untrusted user input, and the mechanisms that are normally used to assert whether a key exists.Consider the example of a simple blog created with Express. We decide to store blog posts in memory in a {}, indexed by the blog post slug. For example, this blog post would be posts['an-object-is-not-a-hash'].We start writin...

43,001 3       JAVASCRIPT OBJECT HASH NODE.JS


  The seven rules of Unobtrusive JavaScript

I've found the following rules over the years developing, teaching and implementing JavaScript in an unobtrusive manner. They have specifically been the outline of a workshop on unobtrusive JavaScript for the Paris Web conference 2007 in Paris, France. I hope that they help you understand a bit why it is a good idea to plan and execute your JavaScript in this way. It has helped me deliver products faster, with much higher quality and a lot easier maintenance. 1. Do not make any assumptions (JavaScript, the unreliable helper) Probably the most impo...

2,817 0       JAVASCRIPT TIPS FEATURE


  PHP to Objective C, where the f**k are parameters?

Javascript, PHP, Ruby functionsI assume you are very familiar with declaring functions in any of the languages above, if not, you should not be reading this. Let’s begin with a simple function to send email in these languages:// PHP or Javascriptdo_send_email (recipient, cc, subject, body);// Rubydo_send_email (recipient, cc, subject, body)So it’s clear by looking at the function’s signature that it takes 4 parameters and they could be optional, depends on your implementation. Even if you missed one parameter, in most cases it is fine, no complain, no fatal error.First enc...

3,937 0       OBJECTIVE-C PHP JAVASCRIPT PARAMETER FUNCTION NAME


  JavaScript Needs Blocks

While reading Hacker News posts about JavaScript, I often come across the misconception that Ruby’s blocks are essentially equivalent to JavaScript’s “first class functions”. Because the ability to pass functions around, especially when you can create them anonymously, is extremely powerful, the fact that both JavaScript and Ruby have a mechanism to do so makes it natural to assume equivalence.In fact, when people talk about why Ruby’s blocks are different from Python‘s functions, they usually talk about anonymity, something that Ruby and JavaScript share...

1,807 0       JAVASCRIPT STYLE FORMAT BLOCK MAINTAINEBILITY


  Javascript Frameworks Are Too Small

A while back I stumbled upon a great post by Jean-Baptiste Queru. It describes the incredible depth of the modern technology stack. Layers upon layers of complex science, hardware, and software, each layer creating a simpler abstraction around the previous. This ultimately enables our paltry human brains to create amazing things that would otherwise be impossible (or really difficult). This is, in my opinion, the lifeblood of modern software development.For some reason, however, when it comes to front-end web development – meaning javascript – the stack is extremely shallow. Most...

2,846 0       JAVASCRIPT JQUERY FRAMEWORK SMALL SIZE


  Paradigms of Iteration in JavaScript

One of the joys of programming is that no matter how simple a problem may seem there are always tons of ways to solve it. It can be good practice to go back and revisit fundamentals by solving simple problems with as many implementations as you can think of. In this post we'll explore approaches to basic iteration in JavaScript.This style of exercise is a good interviewing technique, too, because it's open ended and leads to good discussions. The focus isn't a tricky, wacky problem you're seeing for the first time ever, but bread and butter programming awareness, command, and comfort. It's a g...

4,414 0       JAVASCRIPT ITERATION WRAP RECURSIVE FOR LOOP


  10 reasons why Dart is cooler than JavaScript

Dart is a new programming language from Google and after coding JavaScript for over one year now, I immediately felt in love with it. Coming from the Java world I had a good bunch of things I had to learn before I could use JavaScript.Some people say, you need to dig deep into JavaScript, otherwise you are not allowed to speak about the pros and cons of a language. I am not a JavaScript Ninja. But I strongly believe a programming language should be easy to learn, easy to understand and should be consequent in terms of language constructs. Even after all the long time I dealt with JavaScripts w...

2,987 0       DART JAVASCRIPT COMPARISON