Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- javascript



  Understanding the "this" keyword in JavaScript

Many people get tripped up by the this keyword in JavaScript. I think the confusion comes from people reasonably expecting this to work like “this” does in Java or the way people use “self” in Python. Although this is sometimes used to similar effect, it’s nothing like “this” in Java or other languages. And while it’s a little harder to understand, its behavior isn’t magic. In fact, this follows a relatively small set of simple rules. This...

   JavaScript,this,understanding     2012-03-29 13:48:59

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

   JavaScript,Framework,Size,Small,jQuery     2012-01-10 07:20:59

  Let's talk about JSON.stringify()

JSON has been used in lots of places to exchange data among different services/systems. Nowadays all mainstream programming languages have built-in library support of JSON data parse and stringify. In this post, let's talk about JSON.stringify() in JavaScript. Let's first take a small example of Object conversion handling. There is a requirement to convert below object const todayILearn = { _id: 1, content: '今天学习 JSON.stringify(),我很开心!', ...

   JAVASCIPT,JSON,JSON.STRINGIFY     2020-02-22 04:25:08

  Google Dart? Don’t bet against JavaScript

Procotols, programming languages and operating systems all compete in a constantly evolving software ecosystem. Out of that ecosystem only a few technologies truly have staying power and survive over the long term. An example? How about Ethernet? It’s been a survivor over the last thirty years despite existing in a constantly changing landscape that’s been populated with many worthy competitors. Ethernetâ€...

   Google Dart,JavaScript,Comparison,Future     2011-12-06 09:49:39

  A turing machine in 133 bytes of javascript

Multiply turing machine The fact it took me 20 lines of javascript to implement a nondeterministic turing machine simulatorlast week kept me up at night. All weekend. Too much code for something so simple and I kept having this gut feeling implementing a basic version shouldn’t take more than 140 bytes. Sunday afternoon I sat down for about an ...

   Turing machine,JavaScript,Simple code     2011-11-28 09:27:28

  Backend-as-a-service?

As the list of *-as-a-service’s continues to grow, I thought I’d throw one into the mix. What about the idea of a backend-as-a-service (BaaS)? The recent surge of client side Javascript frameworks along with the attractiveness of simple RESTful APIs has created an environment where server-side interaction can be reduced to simply database interaction (including validation and some computation). But why stop there? What if the server-side of the equation was simply a RESTful, ...

   Web design,Backend,Service,BaaS,Client JavaScript     2011-12-29 09:07:38

  Interaction between JavaScript and Frameset

ou want to change more than one frame at a time? OK, well here is how to do make the trick work for you! The first thing you will need is a frameset to get you started. Again, I will use a frameset with two frames. Here is the code for the frameset page: <HTML> <HEAD> <TITLE>Frames Example 5</TITLE> </HEAD> <FRAMESET cols=\"20%,80%\"> <FRAME SRC=\"page1.htm\" name=\"left_frame\"> <FRAME SRC=\"page2.htm\" name=\"right_frame\"> </FRAMESET> <...

   interaction,javascript,html,frameset,fra     2011-03-22 12:50:47

  JavaScript finite state machine

Finite state machine is a very useful design model, it can be used to simulate many events in the world. In short, finite state machine has three features: Number of states is finite At any moment, one object can only be in one state In some condition, it will transfer from one state to another state In JavaScript, finite state machine can be applied in many places. For example, one menu element on a webpage. When the mouse hovers on the menu, the menu will show up, while the mouse moves away...

   JavaScript,Finite state machine,State     2013-09-02 11:00:57

  HTML5 Can Get the Job, But Can HTML5 Do the Job?

This post is part of our ReadWriteMobile channel, which is dedicated to helping its community understand the strategic business and technical implications of developing mobile applications. This channel is sponsored by Alcatel-Lucent. As you're exploring these resources, check out this helpful resource from our sponsors: Cultivating a Developer Ecosystem: Understanding Their Needs HTML5 is changing the way that developers create applications for the mobile Web. Yet, it is not the be a...

   HTML5,Future,Job,New feature     2011-08-12 07:45:29

  Writing great JavaScript

I probably could have named this post something like “Writing clean, validating and portable JavaScript”, but that would be no where near as catchy. The problem with “great” is it means different things to different people. I am going to show you my idea of great which may differ from many developers views, but I hope it helps someone improve their code. So what’s the point in this, why can’t you just carry on writing JavaScript as you have been for a...

   JavaScript,Great,Clean,Tips     2012-03-24 05:18:12