Today's Question:  What are you most afraid of as a programmer?        GIVE A SHOUT

SEARCH KEYWORD -- javascript

  Chrome’s WebRTC roadmap

Last January, Chrome was the first major browser to preview WebRTC, HTML5's new real time audio and video stack. Since then, we've been hard at work keeping up with the evolving specification, fixing bugs and listening to the web community’s feedback. The main parts of the WebRTC specification are now stable and are coming soon to all 200M+ Chrome users. With this blog post, we want to help developers plan for what will be introduced in this first stable release later this year. What'...

   WebRTC,Google,Open source,Roadmap     2012-04-12 10:27:51

  I don’t like the Ruby 1.9 hash syntax

There, I said it, I don’t like it. And I don’t know why you do either. I assume you like it anyway, everyone else I talk to seems to. My heart sank over and over again whilst I was at the recent RailsConf and saw respected rubyist after respected rubyist using the new Ruby 1.9 hash syntax in their presentations. I just don’t get it. But I’m not one to just moan. I plan to justify my feelings. Then maybe you can tell me why you do like it? My friend the hash rocket I like the hash rocket...

   Ruby,1.9,Hash,Feature     2011-12-14 07:05:09

  Read 10 new books from O'Reilly for free

Recently O'Reilly provided free access to some books. Some of them are even in early release status. Here we recommend 10 of them. 1、Mastering Perl 2、Git Pocket Guide 3、Vagrant: Up and Running 4、High Performance Browser Networking 5、802.11ac: A Survival Guide 6、Test-Driven Development with Python 7、Interactive Data Visualization for the Web 8、HTML5 Canvas 9、Programming JavaScript Applications 10、Agile Data Source :

   O'Reilly,Free book,Early release     2013-07-03 07:56:20

  Which web front-end framework to choose?

When doing web design, we often need to choose which front-end framework to use in order to provide great user experience and simplify the development. Also, compatibility problem can be solved by using front-end frameworks. Here is a list of front-end frameworks. Which one are you using? Which one do you prefer?1. Apache FlexApache Flex, is a software development kit for the development and deployment of cross-platform rich Internet applications based on the Adobe Flash platform. Initially deve...

   Web design,Front-end,Framework     2012-07-30 13:57:26

  Valid JavaScript variable names

Did you know var π = Math.PI; is syntactically valid JavaScript? I thought this was pretty cool, so I decided to look into which Unicode glyphs are allowed in JavaScript variable names, or identifiers as the ECMAScript specification calls them. Reserved words The ECMAScript 5.1 spec says: An Identifier is an IdentifierName that is not a ReservedWord. The spec describes four groups of reserved words: keywords, future reserved words, null literals and boolean literal...

   JavaScript,Name convention,Standard     2012-02-22 05:16:53

  Deep clone of JavaScript object

In JavaScript world, it's frequently seen object clone. Normally when creating a clone of an object, it's only the reference being cloned but not all contents. In some scenarioes, it's desired to clone all the content instead of just the reference such that any change made to the cloned object will not change the original object. Differences between shallow clone and deep clone can be as simple as: Shallow clone : Only the object reference is cloned but not the content Deep clone : Clone all co...


  var in JavaScript

Geoff published an article sometime ago--"How one missing var ruined our launch". This article described one case where MelonCard uses Node.js as their backend system, suddenly there was a small registration peak period--50-100 people registered concurrently, then the entire website stopped responding and many other strange problems showed up. When they were investigating the source of the problem, they found one missing var in the following‘/apps/:user_id/status’, function(req...

   JavaScript,Scope,variable     2012-05-26 12:35:36

  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 s...

   Dart,JavaScript,Comparison     2012-01-05 08:23:21

  A String is not an Error

I decided to write a little article to discourage an unfortunately common pattern in Node.JS modules (and browser JavaScript, to a lesser extent) that can boil down to these two examples: // A:function myFunction () {  if (somethingWrong) {    throw 'This is my error'  }  return allGood;} and // B: async Node.JS-style callback with signature `fn(err, …)`function myFunction (callback) {  doSomethingAsync(function () {    // …    if (somethin...

   JavaScript,Node.js,String,Error object     2011-12-23 08:00:32

  An alternative way to parse URL in JavaScript

Normally when we need to process URL in JavaScript, we may use the location object. Then we can use location.hostname,location.href,location.port etc to get the information we need. In this post, we will parse an URL with an alternative way. We can use an URL to create a DOM object by calling document.createElement("a"). The complete code is: function parseURL(url) { var a = document.createElement('a'); a.href = url; return { source: url, protocol: a.protocol.replace(':',''), host: a.ho...

   URL,location,parse     2014-03-03 07:05:11