Today's Question:  What weekend projects have you created?

#### 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 Javascript do_send_email (recipient, cc, subject, body); // Ruby do_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. Eve...

Objective-C,PHP,JavaScript,Parameter,Function name     2012-01-16 09:46:09

#### Gcd Algorithm with JavaScript

How to find the greatest common divisor between two integers? We may encounter this problem frequently in interviews or other occasions. An efficient metho to find gcd is the Euclidean algorithm, which uses the division algorithm in combination with the observation that the gcd of two numbers also divides their difference: divide 48 by 18 to get a quotient of 2 and a remainder of 12. Then divide 18 by 12 to get a quotient of 1 and a remainder of 6. Then divide 12 by 6 to get...

JavaScript,Algorithm,Gcd,Implementation,     2011-09-21 15:57:32

#### 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 no...

JavaScript,Feature,Tips     2012-01-18 08:21:39

#### What is an HTC File?

Question: What is an HTC File?Did you find an HTC file on your computer and wonder what program should open it? Maybe someone emailed you an HTC file but you're not sure how to use it. Perhaps you tried to open the HTC file but Windows told you that it could not open it. Before you can open an HTC file (assuming it's even a file format that's intended to be viewed or edited), you'll need to determine what kind of file the HTC file extension refers to. Answer: A file with the HTC file exte...

HTC,HTML Component,JavaScript,Extension     2011-06-30 23:07:44

#### 4 asynchronous programming methods in JavaScript

You may know the execution environment of JavaScript is single threaded. The so called single thread means only one task can be running at any time, if there are many tasks, they need to be in a queue and wait for the previous task to be completed. The advantage of this mode is it's easy to implement and the execution environment is relative simple; the disadvantage is that if one task takes long time, the tasks following it must wait in the queue and this will delay other tasks consequently. Th...

JAVASCRIPT,ASYNCHRONOUS PROGRAMMING, EVENT MODEL,PROMISE     2012-12-25 00:55:47

#### IDEs for Java programmers

IDEs are great helpers to programmers. They can help programmers write less error-prone programs with less time. They have become an inevitable part of many programmers. As a Java developer, you may be familiar with Eclipse already. But do you know other IDEs for Java programmers? We will give an overview of different IDEs for Java programmers. These IDEs are Eclipse, Intellij IDEA, NetBean and BlueJ. Eclipse Eclipse is the most widely used IDE for Java programmers. It's an open source IDE whic...

Java IDE,BlueJ,NetBeans,Eclipse     2014-08-21 06:15:54

#### Parallel Javascript

Lately the ideas for a parallel, shared memory JavaScript have begun to take shape. I’ve been discussing with various JavaScript luminaries and it seems like a design is starting to emerge. This post serves as a documentation of the basic ideas; I’m sure the details will change as we go along. User Model The model is that a JavaScript worker (the “parent”) may spawn a number of child tasks (the “children”). The parent is suspended while the children execute, meaning that it will...

Parallel JavaScript,API,Spawn,Parent,Task     2012-01-11 12:02:00

#### HTTP Streaming and Internet Explorer

In early 2006, Alex Russell posted about a neat hack that the Google Talk team in Gmail use to support Comet in Internet Explorer, a trick which works as far back as IE 5.01. What great news! A reliable way to stream Comet messages to Microsoft’s browsers. If only it were that easy. I have not been alone in the following findings: after connecting the htmlfile ActiveX object as a streaming Comet transport to my Comet server, everything works perfectly for a few messages, but then abruptly fail...

IE,Streaming,JavaScript,htmlfile,ActiveX     2011-09-05 04:05:23

#### Why does LinkedIn migrate to NodeJS from Ruby?

Node.js, the server-side JavaScript-based software platform used to build scalable network applications, has been all the rage among many developers for the past couple of years. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices. Because of these advantages, there are many websites are migrating to Node.js.One of them is LinkedIn. LinkedIn was initially built on Ruby...

LinkedIn,NodeJS,Ruby     2014-03-21 23:39:25

#### Introducing Google JS Test

Google JS Test is a JavaScript unit testing framework that runs on the V8 JavaScript Engine, the same open source project that is responsible for Google Chrome’s super-fast JS execution speed. Google JS Test is used internally by several Google projects, and we’re pleased to announce that it has been released as an open source project.Features of Google JS Test include:Extremely fast startup and execution time, without needing to run a browser.Clean, readable output in the case of ...

Google,JavaScript,Test tool,Open source     2011-10-07 23:35:48