JavaScript - Yahoo News Search Results

119.88 ¥/$ (5 p.m.)

Sorry, but your browser needs Javascript to use this site. Pro-Russian fighters patrol Tuesday in in the village of Shirokine near the strategic port of Mariupol, Ukraine.

Popular JavaScript Package Manager Npm Raises $8M, Launches Private Modules

 Most JavaScript developers are familiar with the npm package manager, which was originally developed by Isaac Schlueter. What many probably don’t know is that npm is also a company co-founded by Schlueter to support the project. Today, npm announced that it has raised $8 million on top of the $2.6 million seed round led by True Ventures the company announced last February. The lead… Read More

120.13 ¥/$ (9 a.m.)

Sorry, but your browser needs Javascript to use this site. Four out of 7 patients, including foreign visitors, who had liver transplants died within one month after the surgery at a new hospital in Kobe established in November, the Yomiuri Shimbun said Tuesday.

SCENE AROUND Special Populations Prom, April 11

Javascript is Disabled! This slideshow viewer requires javascript. To view this slideshow either enable javascript and refresh the page or go to

Cool tools for compiling to JavaScript

Every programmer has a favorite language or two. JavaScript lovers are the luckiest these days because their language is taking over the Internet and the Internet is taking over the world. Those whose hearts reside elsewhere in the programming language world, however, are stuck. They can either stay on the sidelines and curse the relentless juggernaut of HTML, CSS, JavaScript, and Node.js, or ...

Google refocuses Dart as a JavaScript helper

Backing down on ambitions to create a commercial grade Web programming language, Google is shifting work on its Dart programming language to make it an optimization aid for the pervasively popular JavaScript, which Dart was originally designed to supplant. The company no longer plans to incorporate Dart into its Chrome browser, the two creators behind Dart announced in a blog item posted ...

Instant feedback arrives for JavaScript code testing

Developers looking for quick results when testing JavaScript code could have a solution with the Wallaby.js test runner tool, a code coverage technology intended to offer nearly immediate reporting of results.


recent bookmarks tagged JavaScript

Javascript Replace All Hashtags w/ Links

Posted on 3 April 2015

Programmer: ASP.NET AJAX: Calling PageMethods Synchronously

Posted on 3 April 2015

Creating a downloadable text-file using blobs - JSFiddle

Posted on 3 April 2015

Posted on 3 April 2015

Draft Countdown

Posted on 3 April 2015


Posted on 3 April 2015

Posted on 2 April 2015

Posted on 2 April 2015

Posted on 2 April 2015

Posted on 2 April 2015

Top Answers About JavaScript (programming language) on Quora

Top Answers About JavaScript (programming language) on Quora

When given a choice between a coding bootcamp teaching web development or software development, which choice would give me the most employable skills and the highest salary if I will be working in NYC afterwards?

Flatiron School is the only programming intensive that has an independently verified jobs report. We have a 98% job placement rate, and the average starting salary is $74,000 a year.

That said, it’s important to clarify your question of web development versus software development — web development is software development for the web. iOS development is software development for iPhones. Bottom line, if you take a web development immersive, you should be learning the art of software development.

Our primary concern at Flatiron School is teaching students how to think and express themselves through code. That can be done through the lens of web or mobile, .NET or javascript, Ruby or Python. It doesn’t matter. We do that by focusing on the core technologies and moving up layers of abstraction. Before we teach students Rails, we teach them how to build Rails from the ground up. Rather than learn Active Record, students build their own ORMs. Before exploring JS frameworks, we dive into object-oriented JavaScript.

“"The psychological profiling [of a programmer] is mostly the ability to shift levels of abstraction, from low level to high level. To see something in the small and to see something in the large.” -Donald Knuth

If you are concerned with which language to learn, keep in mind that the most important factor to your success is learning how to learn. Programming languages will go in and out of vogue, but the ability to learn those languages and adapt to new ones is a skill that will never go out of style. Flatiron School focused on ruby and javascript and has had web development grads get jobs working with Ruby, JavaScript, Python, and even iOS — namely because they are practiced in the art of versatility.

Above all, your primary concern should be finding a place that inspires you to be your best self. Flatiron School is different in that way. Our students talk about history and philosophy — we relate programming to liberal arts, and value creativity above almost all else. We’re heavily oriented around community and the work is driven around teamwork.

Think about what environment is the best fit for you. If you’re going somewhere with passionate instructors and driven students, it’ll be hard to go wrong.

See Questions On Quora

Posted on 20 September 2015

Since Meteor.js was developed after Node.js, what are the advantages of Meteor.js over Node.js, if there are any?

Meteor is a very advanced framework built on top of node.js, which is a very simple foundation, so you're sort of asking what advantages a house has over a concrete foundation. You can live in a house and stuff, which is great. The disadvantage is that you better be mostly happy with how the house looks in general, because you cannot build another house on top of a house. :)

There is a misconception that node.js is big framework or something. node.js is just V8 (the Google Chrome JavaScript engine) bundled together with a couple of small libraries that allow you to write to disk and the network. That's it!

It's a very, very minimal thing. It's not much on it's own, but it's a very good to build things on top of, such as Meteor.

Oh, and if you like my writing, don't miss out on more of it - 
follow me on Quora and Twitter (

See Questions On Quora

Posted on 14 August 2015

What is the best way to get started building a personal website from scratch?

You can use tools like wix or download and host wp (or install in your panel or get someone on fiver to do it for you.).

I also recommend you take a look at the web builder within this company as it is hosted on a very robust server and the pages will be fast and the SEO tools & functionality is wonderful.

Give them a call and ask for a demo especially for the web builder, then you know you have more than just pafes - you have a complete business platform

See Questions On Quora

Posted on 9 July 2015

What are some of the newest JavaScript trends to follow?

Babel has made a big impact as it allows you to use language features from the future today. cssnext is the CSS equivalent of it.

On workflow side tools like Browserify, Webpack and jspm are having an impact.

I expect libraries based approaches (ie. React for view + whatever you want for the rest) will become more popular over framework based one. The primary benefit of picking your own libraries is that there's less of "lock in". Conversely you have more responsibility in this case. Frameworks can work up to a point but they have their limits.

npm will likely keep on getting more popular. In fact it has become popular for frontend usage too. That's where the tooling I linked in comes in handy as they can consume packages from npm directly. This means tools such as Bower are on their way towards obsolescence.

Thanks to Node.js/io.js merge the development pace will probably pick up again and we can see a faster pace of evolution for a change. This in turn means you'll be able to use newer language features natively. Currently you can achieve this through some tooling but ideally that shouldn't have to be required.

Isomorphic/universal JavaScript will become even a bigger thing. The next generation of major frameworks, such as Angular and Ember, are catching up with React on this department and will likely surpass it here on some areas. It will likely hit mainstream thanks to this development.

On backend side RESTful APIs will get challenged by approaches such as facebook/graphql. I expect we'll see development and adoption of similar technologies as people move from RESTful to something more suitable for applications. RESTful APIs still have their place. The goal here is to push developer experience further and make it easier to maintain large scale applications.

See Questions On Quora

Posted on 6 July 2015

Is Node.js declining already?

I think Node.js is stronger than ever. With io.js and the Node.js foundation and the exceptional community and tooling that Node has, it'll stick around for a very long time.

That said, it's very possible that the hype is decreasing as people are finding real practical applications for it rather than trying to apply it to everything. I personally do not believe that Node is a viable platform for building multi-user server logic. Node is great for asynchronicity, but that shouldn't be confused with concurrency* which is really what you want in those scenarios (I can write a list of things Node doesn't do well for building safe backend systems, but that's one example).

The Node platform is very good for single-user applications (games, web apps, command line tools, "browserified" apps, Node+browser containers), but I think a lot of people will come to regret using it for bigger backends. And the result of that might make it appear as if it's declining.

* Concurrency is not parallelism (nor asynchronicity)

See Questions On Quora

Posted on 13 June 2015

I need to get a good grasp on SQL, JavaScript, and HTML5 in 3 months. I'm ready to study 8 hours per day. I know basics. I need some good books or courses. What are some suggestions?

The single best resource to learn SQL is through Stanford online's Intro to Databases course - it's epic:
Stanford Online: Introduction to Databases

For HTML I would just do Codecademy, there really isn't much to learn here. Also don't forget to learn CSS while you're there...

For JS and Frontend developement, the best book to start is the free Eloquent JavaScript
Once you're done with that, or at least have the basics down - I wrote a blogpost on how I would learn JS if I were to start over now: Best Resources to Become a JavaScript Pro in 2015

I'm also teaching an online masterclass based on weekly coding challenges ( that has the following structure:
  • WEEK 01: Vanilla JavaScript
  • WEEK 02: Functional Programming
  • WEEK 03: Grid Systems - CSS
  • WEEK 04: Grid Systems - JS
  • WEEK 05: AJAX + Promises
  • WEEK 06: HTTP + Node.js
  • WEEK 07: RegEx + Node.js
  • WEEK 08: Algorithms + Data Structures
  • WEEK 09: Algorithms + Runtime
  • WEEK 10: Optimisation + Performance
  • WEEK 11: Application Development + Testing
  • WEEK 12: Advanced Application Development

See Questions On Quora

Posted on 12 June 2015

What are the best ways to scrape the AJAX driven websites?

There are so many ways to scrape websites, either those are AJAX driven. But let me tell you one thing. I am using one and the best tool from the last three years that is called Easy Data Feed - Web Data Extraction Scraping Software.

It is:
Working Well
Open Source
Always kept updated
Anybody can download it
It is free of cost
It is basically used to extract any type of data, we can scrape them easily either those are AJAX driven or they have JSON too.

See Questions On Quora

Posted on 5 June 2015

I need to get a good grasp on SQL, JavaScript, and HTML5 in 3 months. I'm ready to study 8 hours per day. I know basics. I need some good books or courses. What are some suggestions?

Remember it's not about the hours. It's about what you do. If you're struggling with something, don't let it eat your time. Take a break, go work on something else, come back to it later. Most lightbulb moments come when you're sat in a cafe with a sandwich.

See Questions On Quora

Posted on 4 June 2015

Are there performance differences between using semi-colons and not using semi-colons in JavaScript?

The interpreter still has to go through your script and interpret if there are any semicolons or not. Using semicolons does not have any performance benefit (or, contrary to popular belief, much benefit at all, except just being stylish).

Edit: After looking a bit, I found that someone actually made a performance comparison of this. In some older versions of Chrome, code not making use of automatic semicolon insertion (ASI) is slightly slower, but in the most recent versions, ASI is actually faster:
ASI performance · jsPerf

It should be noted that this is a pretty silly, theoretical exercise. Script execution is what is generally interesting from a performance standpoint, not interpretation, as that is only done once, while execution might be done trillions of times.

If you're already following me on Quora - don't miss out on my twitter feed. I tweet juicy software nuggets that you won't see elsewhere.

See Questions On Quora

Posted on 6 May 2015

Why are IT systems in big enterprises usually built using Java, instead of Python or JavaScript?

1) You have consistent performance through the JVM.  The performance characteristics of the JVM are pretty well known, and you can pretty easily take legacy code and add hardware to make it work.

2) A terrible programmer can do a lot less damage with java than they can with python or javascript.  Python and javascript are written so that if you have a terrible programmer, they can do something to create hard to track bugs that crash the whole system.  If you have a terrible programmer in java, they can do less damage, and the thing is modular enough so that you can work around the bad programming.

If you have a 1000 programmers and 1 of them is totally incompetent, then they aren't going to be able to single-handedly destroy the system.  Whereas with javascript and python, one incompetent programmer can single-handedly destroy the system.

See Questions On Quora

Posted on 5 May 2015

Why is JavaScript such a pain to learn?

The attitude expressed in this question is completely foreign to me. JavaScript is by far the easiest language I've had to learn.

A lot of answers here are grouping JavaScript together with a bunch of other technologies, such as HTTP, the DOM, CSS or HTML - technologies often (but far from always) used alongside JavaScript. I think a lot of people mistake JavaScript as hard because they are trying to learn a massive pile of technologies all at once, become confused, and blame JavaScript. The DOM (a concept completely different from JavaScript, mind you) is a horribly complex thing that takes years to master. But it's not JavaScript - if you were coding Dart in a browser, you'd still have the same problems with the DOM. Learn one or two things at a time, or you're going to have a problems, no matter what you're trying to learn.

JavaScript does have a few warts, and it's fun to poke at them (https://www.destroyallsoftware.c...). However, you must not use these warts as an excuse to dismiss JavaScript as hard to learn or complicated to work with, because they are easy to learn to avoid. If you look past the superficial problems, JavaScript is a very small and elegant language that can do almost anything. In it's latest iteration, it's pretty much a full-fledged functional programming language!

If you're actually having trouble learning it, you are probably using a bad resource. You should start by going through all the tutorials at) and then pick up a copy of JavaScript: The Good Parts.

Neither of those should take you much time. Seriously.  If you still find it hard after going through the two resources above, you're either new to programming in general, or you should reconsider if programming is really for you. JavaScript is, compared to almost all other languages, is very small and has pretty few rules to keep in mind. C++ is just enormous compared to it.

  • Learn JavaScript separately, or you'll be confused.
  • Give it a proper chance, don't learn it grudgingly, because you have to.
  • Use good resources, Code Academy and JavaScript: The Good Parts.

Also, follow me, so that you don't miss out on my awesome JavaScript answers.

See Questions On Quora

Posted on 21 April 2015

Why do a few of my co-workers argue that JavaScript isn't real programming?

I'll argue with anybody about customer requirements, the best way to accomplish a particular goal, and the schedule.  However, I decided a long time ago that it's never worth the effort to get involved in arguments over who's really a programmer or which language/editor/OS is "the best."  George Bernard Shaw once wrote, "I learned long ago, never to wrestle with a pig.  You get dirty, and besides, the pig likes it it," and I can't help thinking he would have been a great programmer with that kind of attitude.

If they're not interested in learning, but (obviously) still need you to do the work, there's nothing you're going to say beyond asking them how you're getting your results.

See Questions On Quora

Posted on 20 March 2015

I am Java developer who wants to learn JavaScript. Which technology, Angular, jQuery, or Node.js is better to learn nowadays?

I wrote an answer to a similar question a while ago, basically:
Here's a list if things you might find useful and should read/use:
  1. The Trouble with JavaScript
  2. Understanding “Prototypes” in JavaScript
  3. JS Comparison Table
  4. What's a Closure? (very nice tutorial!)
  5. Learning JavaScript Design Patterns
  6. Patterns For Large-Scale JavaScript Application Architecture
  7. JavaScript Garden
  8. A guide to the basics of jQuery
  9. JSbooks - Free Javascript Ebooks
  10. JS Classes Repository
Use Mozilla Developer Network for general API reference, I find it very useful.

Which technology better to learn? well JavaScript has lots of frameworks and stuff, so my suggestion here is learn what you need for your current project.

Want to build a network application?

A full scale web application? perhaps Angular.js or Backbone.js+Marionette.js. This are two very different beasts. and you should try both and see what feels more conformable to work with.

Selecting DOM elements/manipulation? General Helpers? Cross Browser Support? jQuery would be the solution.

WebGL? 3D? THREE.js.
Proper animation also in your game? TWEEN.js

So getting to the point. "better" is very subjective in this situation. better for who? better for what?

See Questions On Quora

Posted on 19 February 2015

Why are IT systems in big enterprises usually built using Java, instead of Python or JavaScript?

Big enterprises have been around long enough to recognize a few things about software development and organizational behavior:
  • Software lives a long time
  • Many programmers will have their hands in a piece of software over its service life
  • Those programmers will have varying levels of competency
  • Those programmers will have varying levels of communication with prior programmers, including "none at all".
Java has two major advantages over Python and Javascript:
  • Static typing. Programs are self-documenting; programmers never waste their time pondering questions like "what is this variable?", "what is the contract of this method?", "who calls this method?", "who overrides this method?". Giant categories of bugs (eg, passing in the wrong type to a function) are eliminated, reducing the test footprint and mitigating the damage caused by inevitable programmers who get sloppy with tests.
  • Robust IDE support, made possible by static typing. Modern Java IDEs practically write code for you - but more importantly, they make it easy to navigate an unfamiliar codebase. Navigating to method definitions is a simple command- (or control-) click. Hovering over methods shows you documentation. The answers to all of those questions above are just a click away. If you type anything that's even slightly wrong, the IDE puts a red squiggly underline under the problem area. And if you want to make major changes across a codebase no matter how large, automatic refactoring is quick and reliable.
These two aspects, more than anything else, make it comparatively easy to scale Java codebases to high levels of complexity. When you have dozens (or hundreds, or thousands) of engineers adding code to a running business, you end up with very complex systems even when you have top-notch programmers - and any large organization cannot count on this always being the case. Not even Google.

Javascript in particular is worth singling out as extraordinarily poorly suited for scaling into complex systems because of the need for asynchronous programming. The business rules for a large enterprises are often byzantine; forcing them into an asynchronous model magnifies the complexity tenfold.

On a personal note, I work professionally in Java, Python, Javascript, and Ruby. I have had the dubious pleasure of working on two nightmare-scenario codebases: Electronic Arts' core platform (all Java), and CloudFoundry (almost all Ruby, although that is changing). Both are enormous; both are full of code whose original developers have departed; both include the output of programmers of wildly varying skill; both are founded on poor architectural practices. Between the two, the Java codebase was significantly easier to "jump into" - even though it was significantly larger. The worst-case-scenario for dynamic languages is far worse than the worst-case-scenario for static languages.

See Questions On Quora

Posted on 20 January 2015

Why are IT systems in big enterprises usually built using Java, instead of Python or JavaScript?

Questions like this are usually asked by those with limited experience in large systems development, often after having just learned programming or done some small project work in the first languages they've acquired knowledge in.

For starters, neither Python or JavaScript are modern languages compared to Java.  JavaScript is only a couple of years younger than Java and before that it was called LiveScript.  Python is OLDER than Java by several years.

"Modern" does not mean "better".

Talking to other systems is a function of protocols, not languages.  You need to understand that distinction.  As long as you can speak the protocol, like HTTP or SOAP, you choose the language best suited for the job.

Java is NOT legacy.  It is mainstream.  And it is mainstream for a reason.  Virtually all of the common enterprise tasks one might want to perform is available in Java either natively or through many frameworks. 

It can scale and has many years behind it in how to do this.  That is huge in large enterprises with high volume systems.  JavaScript libraries are playing catch-up here and it will likely be 5-10 years before they work out all of the kinks in doing this well and the current framework wars that are being fought right now shake out winners and defacto standards emerge.

What about skillsets?  Too many people who prattle on about JavaScript and Python fail to consider that.  Companies need to hire people.  The number of skilled people determines how hard and how expensive that task is going to be.  Java skills are easier to find.  Paradoxically, they are also harder to find because the demand for skilled Java developers is so high that it is hard to find them because they don't move around much!

Java has had a long time to figure out what works well in a modern web development and service development context.  Python has a couple of well-known options like Django or TurboGears. 

JavaScript is all over the map right now playing the "let's reinvent Java because it is cool to do so" game.  JavaScript was never meant to be a back-end language and adapting it to that role is going to take time.  Hell, .NET developers are have been seeing the "new" MVC framework from Microsoft in the past couple years.  Java web developers are rolling on the floor howling with laughter at that one!  We were doing that 15 years ago and have used that time to refine what works and what doesn't!  Microsoft and the "modern" languages will be playing catch-up for sometime.

Managing large Java codebases is well known at this point.  It inherited that from its C ancestry.  Source control, build and deployment pipelines and most development methodologies like Agile have their roots in the Java space.

Legacy?  I sneer at that.  Give me a couple of good Java developers and I can probably wipe the floor with anyone using Python or JavaScript to roll out an idea and do it in the same amount of time and richness of capability.  With the advantage than when the idea needs to grow, I know my enterprise-grade solution will be able to scale because I'll have engineered it that way applying years of long experience.  Because I won't be reinventing the wheel when I crack out my JDBC frameworks, NoSQL frameworks, JSF2, Primefaces, Web Services components and the like.  You'll still be writing orchestration code or a front-end widget while I'm negotiating with my customers on what text their labels should have, hard work long behind me.

And I say this as some who is fluent in Python and JavaScript and use them in production systems.  And believe it or not, despite Java's strong typing, it is actually as dynamic in its behavior as Python or JavaScript are.  Java Reflection is the core of virtually every modern Java framework and we've been doing runtime inspection, runtime dependency injection and dynamic typing and runtime type determination for well over a decade.  Almost every piece of Java code I write, especially in a web application, is more-or-less a dynamically typed solution (i.e. JavaBean properties and dependency injected classes).

Languages are a means to an end.  They do not exist solely to justify themselves.  They are tools.  You're writing business solutions, not programming solutions. This is the first great epiphany you must come to understand.

See Questions On Quora

Posted on 18 January 2015

Why are IT systems in big enterprises usually built using Java, instead of Python or JavaScript?

At Spotify, we use Java extensively in the backend. This is not for legacy reasons, it's an active choice. We use Python too, but we have moved more and more to Java. The reason is that Java is much easier to get to perform well. Python is easy to write initially, but getting it to perform well when being hammered by 15 million paying users is another.

I personally don't understand how a medically sane person can like the Java syntax. However, no intelligent person can deny that the JVM is pretty darn good. It is fast, well-tested, well-documented and under active development. This cannot be said about many tools in software development.  

We used to have quite a bunch of C++ services, but while you can get C++ very fast too, it's harder to write, especially if you want the code to be maintainable. Java is a compromise that hits a sweet-spot for us.

Clojure is gaining tractions at Spotify, many new services are written in it, but it's not as wide-spread yet. While Clojure is certainly a better language, Java has the advantage of being non-weird. Java is an uncontroversial programming language that all experienced programmers can jump into with little effort, and that is a big advantage.

If you like my writing, don't miss out on more of it - 
follow me on Quora and Twitter (

See Questions On Quora

Posted on 17 January 2015

How many boring steps in programming were there for you, before it became exciting?

I got stuck playing Grand Theft Auto: San Andreas on my PC! I had to figure out a way to get rid of the update to unlock my old saves. I ended up messing with one piece of the source code that was open to modify, it was written in C (If I only had known what C is).

I went to buy this book (This exact copy) for $75. In North Iraq $75 is a lot of money:

My cousin, Misho, who was an actual Engineer at the time told me few things:

  1. First, that is C++, you wanted C, those are not that close. AND no the ++ doesn't mean a better version. (My logic back then :/ )
  2. Second, this is for someone who can understand at least College level English, wait do you even know what a TextBook is Yad?
  3. Third, why did you break the game again? It doesn't look like that you are going to be playing it anytime soon.

Hence, the journey started my friend! I went on an epic mission to fix the game back! Didn't know what was coming, it got dark really fast.

I ended up making a MOD on the game and never being able to fix it. I downloaded the free available 3D car models and added them to the game.
My first 101 programming project as a 16 years old (It was one of the most exciting things I have ever done in my life).

When I showed the game Mod to my friends, the reaction was something like this:

For those who are interested here is what the game ended up like:
Hitman: Blood Money MOD in GTA :):

I found a Forum that gave all the Car Models for free and I gave them my Mod for free. Back then startup tactics was such simple!

See Questions On Quora

Posted on 14 January 2015

I've been coding for some time now, and have developed several web applications entirely, two of which are largely used. To this point I haven't used any algorithms, or even much math. Why?

Jeff Darcy has hit the nail on the head. I would however like to elaborate a little more in detail. The thing which I would like to emphasize is that your understanding of algorithms helps you make a better design decisions.

I would like to give you an example of two guys Joe and Wee who are developing a search engine for wikipedia. 
Joe is a fresh programmer who recently learnt java and javascript to make a search engine. Wee is an experienced professional with good knowledge of algorithms and data structures.

Joe developing search engine.
1) Joe looks up at google "How to make a search engine" and finds top 10 results  refer to exsisting libraries like Apache Nutch™ -, Apache Lucene Core , The Xapian Project
2) Joe picks up a the first one lets Lucene goes through readme page and run an instance of it on a cloud machine.
3)He picks up pages of wikipedia and dumps it to remote server.
4) He quickly writes a javascript code to fetch data from the remote server.

Very little he know that his setup is only good till he get's the next bulk update from wikipedia.

Wee developing search engine.
1)Wee evaluates all three libraries and realizes that Lucene is not scalable for text based search and it's API's are restricted for a distributed architecture.
2) Wee know from his experience of data structures that every search engine has an inverted index table which requires consistent fetches from wikipedia whenever a document is updated.
3) In order to for the document to be updated the index must be built every time from the wikipedia. So if building index takes O(n^2) time then he can and I have roughly about 100,000 documents then building an index would take more time as compared to update frequency of a document. This means a document could take upto a month for lookup from the date it was added to wikipedia.
4) He has a checklist and quickly realizes that Open Source Distributed Real Time Search & Analytics | Elasticsearch will satisfy all of the above criteria. 
5) He builts a cloud server (using AWS instance) and runs an instance of elastic search and configures the index size and memory requirements depending on the corpus size.
6)Front end is always easy so he puts up an web based interface.

However, since he has been able to foresee better understanding of algorithms his decisions will be more long lasting in terms of selecting a tool and configuring to his own needs.

See Questions On Quora

Posted on 12 December 2014

What is the technical difference between prototype-based inheritance and class-based inheritance?

With classical inheritance, you have a cookie-cutter object (a class) that isn't a cookie itself but which makes cookies (object instances). With prototypal inheritance, you just start with a cookie and, when you want others, you copy it. Or you use it as a delegate, so that it can do the work of other objects. In any case, there's no cookie cutter/blueprint/class that is inert by itself but which makes other objects.

In Javascript, which is the most popular prototypal language, it's a little hard to see that classes don't exist, because the most common way of making instances is to use a function:

function Person(name) { = name;

var jennifer = new Person('Jennifer');

But the function is really just a way of creating a new object, adding properties to it (e.g. name), and attaching a proxy object to it. In other words, it's a sort-of factory function, not a class.

In the above example, I didn't make use of the proxy, but it exists. It's called "prototype," which is a horrible name, because it sounds class-ish. I wish Javascript used the word "proxy" instead.

function Person(name) { = name;

Person.prototype.sayHi = function() {
  alert('Hi. My name is ' +;

var jennifer = new Person('Jennifer');
var bob = new Person('Bob');

Neither the jennifer nor the bob objects have a method called sayHi. What happens when you try to call one, as if it exists, is that the Javascript interpreter looks for it, fails to find it, and checks to see if it's implemented on a proxy object, instead--a proxy object that jennifer and bob are linked to. The proxy can act for the object that users it. It can "sayHi" for bob and jennifer.

Javascript creates this object behind the scenes (and attaches it to bob and jennifer behind the scenes, too), but if you could see it, it would look like this:

{ sayHi: function() { alert('Hi. My name is ' +; } }

When the function gets called, the key-word "this" gets resolved to whichever object, jennifer or bob, is using the proxy at the time.

Proxies are like saying, "Sorry, but you can't have a bicycle, but I'll tell you what. There's a communal bike you can all use."

Here's a newer (ES5) way of hooking a proxy up to some objects:

var proxy = { sayHi: function() { alert('Hi. My name is ' +; } };

var bob = Object.create(proxy); = "Bob";

var jennifer = Object.create(proxy); = "Jennifer";

All you're doing here--in both approaches--is linking objects together. You are not creating instances from a blueprint.

See Questions On Quora

Posted on 9 December 2014

As a programmer, what does it mean when you are asked "What is your stack?"

This is asking you to tell the person posing the question what tool sets you are most comfortable working in. This includes the programming language, database and depending on what the context of the question is, could also include web server or compiler and operating system.

For instance, sometimes you will hear people say, I work with the LAMP stack.  This would mean they work with Linux Apache MySQL and Php (or Perl, but super unlikely nowadays). Other times you'll hear WAMP which is similar but with Windows in place of Linux. Now there are other acronyms like MEAN which stands for MongoDB Express Apache Node.js.

All the previous examples are geared towards people who work on a web app. It is just as realistic to answer, chef and AWS if you are systems person or python and R if you are a data scientist. Just think of your response in terms of, "when I sit down in front of the computer to write code or do my job, what are my go to tools?"

See Questions On Quora

Posted on 7 October 2014

Why should one use callback in JavaScript? What are its advantages?

Think about the word "callback" and how it's used in normal English: "Hey, Bob. Please call me back when you decide whether or not you're coming over for dinner."

The implication is that Bob can't answer yet. But when he's finally made a decision, I might not be around to ask him the question. So I say, "Please answer this question when you can." A callback is a way of asking a question (or requesting a task) in advance.

button.addEventListener('click', callback);

I don't know when the user will click the button. But whenever he does, I want a function called.

The whole point of functions is to set aside processing that can be done later, at any arbitrary time. When that time comes, we want the function to "call us back." Really, all functions are callbacks:

//When I ask you to call me back, here's what I want you to do:
function foo() {
  console.log('Hi. I'm calling you back');

//Request to be called back

Callbacks can also aid expressiveness by hiding some boring details. For instance, let's say I have an array of numbers, and I want to filter out all the ones that are less-than five. Here's a solution without callbacks:

var original = [1, 8, 7, 2, 14, 3, 5];
var filtered = [];
for (var i = 0; i < original.length; i++) {
  if (original[i] > 5) {

It kind of sucks that I have to write out the loop mechanics, as that's a boring implementation detail. It's how the task needs to get done, but it's not what the task is. Why can't the computer take care of the how while I just worry about the what?

Here's a functional version, using a callback:

var original = [1, 8, 7, 2, 14, 3, 5];
var filtered = original.filter(function(num) {
  return num > 5;

There's still a loop occurring, but Javascript is taking care of it for me. I'm just worrying about what I want the loop to accomplish.

Since you can pass functions as values in Javascript, this allows you to easily defer all sorts of processing until run-time:

//assume a variable called userHatesBigNumbers
//has earlier been set to true or false.

function isSmallNumber(num) { return num < 5 }
function isBigNunber(num) { return num >=5 }

var filterFunction;
if (userHatesBigNumbers) {
  filterFunction = isSmallNumber;
} else {
  filterFunction = isBigNumber;

var original = [1, 8, 7, 2, 14, 3, 5];
var filtered = original.filter(filterFunction);

See Questions On Quora

Posted on 24 September 2014

Is there an online course to learn front-end web design (HTML,CSS, Javascript)? Where?

At Bloc, we have two courses you should look into:

Our UX design program focuses on fundamentals of the user experience design process, creating wireframes, designing mockups and then producing code to prototype and test those sites. The front-end course takes that skillset even further, teaching you more advanced Javascript, jQuery and using frameworks like Angular to help build web applications.

Depending on how much you would want to learn and achieve, we have a class that's fit for you. It's all online-based, with one-on-one mentorship to help you get to where you want to go.

In the meantime, if you're looking for some basic HTML and CSS skills, you should check out our book on building your first website ( You'll learn the basics of HTML and CSS, how to use a text editor, structure content on a webpage, style it and deploy it to Github Pages for free. It's a nice crash course for beginners.

Disclaimer: I am the design director at Bloc, in charge of creating the curriculum for our UX design program.

See Questions On Quora

Posted on 21 July 2014

How do you program your game using Unity and JavaScript?

As a JavaScript developer, I just want to interject that you really don't. When I code for unity, I code in C#. C# is a really well-made language so it's not a pain at all.

I think "Unity does JavaScript" is a marketing lie by Unity3D and I think they should stop. The language that you write when you select "JavaScript" in the dropdown in Unity is not really JavaScript, it's some kind of weird adaptation of C# with JavaScript-like syntax. It won't accept normal JavaScript code and you won't be able to run JavaScript modules.

See Questions On Quora

Posted on 27 April 2014

Is Codecademy the best source to learn programming for a beginner now?

The first time I heard about Codecademy was when Mike Arrington wrote a boldly titled blog post called: Codecademy Looks Like The Future Of Learning To Me. Now that's it been a couple years and the hype has settled down, I think it's worth revisiting whether that claim panned out or not.

What Codecademy Does Well

As the founder of another technology education company, I've always been incredibly jealous of Codecademy's landing page. From the moment you visit their home page, they already have you engaged and hooked into this gamified learning environment with short lessons and instant feedback. It's a great product and a really fun way to start learning the fundamentals of programming without having to go through the agony of installing a programming environment or reading some dry book.

What Codecademy Does Not Do Well

With Codecademy, you can learn syntax and basic programming concepts like objects, conditionals, and loops. That's only a fraction of what you need to know to do anything useful with programming though. I would break it down like this:

  • 5% Setting Up and Maintaining a Developer Environment
  • 20% Programming Syntax / Basic Concepts (Codecademy)
  • 50% Building Real Apps Using Frameworks, Libraries, and Design Patterns
  • 25% Meta Skills (e.g. knowing how to Google for things, use StackOverflow, being savvy about the web development industry)

The numbers are arbitrary, I'm just trying to weight each area relative to each other. My point is that with Codecademy you get a surface level view of programming but you won't come out of it with the ability to actually build anything, which kind of misses the point of programming in my opinion.


Overall, I think Codecademy is a great way to get an introduction to programming if you're starting from 0 and don't know what an "if statement" is. It is probably the most effective execution of gamification for educational purposes, but it's not as game changing as we all hoped it would be because the limitations it uses to make it seamless to start learning to code are the very limitations that will prevent you from building real applications.

Start with Codecademy, but as soon as you can you should try to graduate to something that actually teaches you how to build and deploy real applications.

See Questions On Quora

Posted on 11 April 2014

How does one decide which Javascript framework (e.g. Node, Backbone, Angular) to use on any given project?

If you are just learning JavaScript, I suggest trying to work without any frameworks or libraries at all. Starting with something like Angular will make it much harder for you to learn the core language and browser APIs.

Once you've worked with raw JavaScript for a while, it's worth starting to learn jQuery - it's the basis of most of the popular JavaScript frameworks out there and understanding how it works will help reinforce a bunch of core JavaScript concepts.

If your priority is learning though, it's a good idea to start without jQuery. There are a surprising number of JavaScript developers out there who only really know how to program JavaScript using jQuery.

See Questions On Quora

Posted on 11 March 2014

How can a developer find a technical co-founder in a week?


Your mission is not to get accepted to TechStars. Your mission is to build a successful business.

To do so, you need to devote a great deal of time to finding your co-founder. You need to talk to lots of people, spend time with candidates, then do a trial run where you work together for a while before committing.

I'd also recommend reading the excellent "Founders Dilemmas" by Noam Wasserman. It will tell you everything about the structure and interpersonal dynamics of founder relationships that you need to know.

Spend time and get this right. TechStars isn't going anywhere.

See Questions On Quora

Posted on 23 December 2013

What's the best approach to grasp Objective-C concepts and start building medium difficult to complex apps?

The first thing you'll want to do is learn a bit of C. Objective-C is a superset of C, which means that any valid C program is a valid Objective-C program, but not vice-versa. While you might not write much pure C when writing your first iOS apps, learning the basic concepts of C (including memory management, typing, and the linking process) will help make your transition from Javascript to Objective-C much smoother. You don't need to become a hardcore C expert or anything like that, but developing a basic understanding of the "C" in "Objective-C" will give you a solid foundation to build on.

Next, you'll want to move on to the "Objective" part of "Objective-C" by learning a bit about object-oriented programming. Javascript's prototypal inheritance (as explained in Inheritance and the prototype chain) is a bit different than Objective-C's (more traditional) inheritance system, so I'd recommend reading Apple's nice introduction: Object-Oriented Programming with Objective-C. That document has some code examples in C, but luckily we already learned all about that, so no problem there.

Now, you can put together "Objective" and "C" by learning some Objective-C syntax. Apple's has a pretty nice guide (Programming with Objective-C), so I'd recommend starting there. Once you've flipped through that, fire up XCode and write some smaller Objective-C command-line programs by selecting Application > Command Line Tool from XCode's new project dialog. I've always liked making simple card games like Blackjack, Poker, or Go Fish (with no GUI) when learning a new language, since they tend to involve implementing several different classes without being overly complex, but really any command-line program will do.

Alrighty, now that you're done with that, it's time to make some apps. Once again, Apple documentation comes through in the clutch with awesome documents like Start Developing iOS Apps Today: Setup, About the Basic Programming Concepts for Cocoa and Cocoa Touch, and View Controller Programming Guide for iOS. Both Harvard (Main Page - Computer Science S-76) and Stanford (CS 193P iPhone Application Development) also have great classes available online for free. However, I think the best way to learn is by doing, so I'd recommend creating a few small iPhone apps like Tic-Tac-Toe, Pong, or a news/RSS reader for your favorite website. Implementing something that fetches data from some website's API can also teach you a lot about making more complex apps.

Once you have the basics down, it's up to you! The iOS SDK has lots of super cool features, so explore whatever you think is interesting. Some documents that I've felt have particularly come in handy include the Location and Maps Programming Guide, the Introduction to Animation Types and Timing Programming Guide, and the OpenGL ES Programming Guide for iOS (though not for the faint of heart). I'd be remiss if I didn't also call out Apple's Human Interface Guidelines (Designing for iOS 7), which is pretty much essential reading if you want to make an iOS app with a great UI/UX. If you have an Apple developer membership, I'd highly recommend flipping through WWDC talks that look particularly interesting as well. It's also worth spending some time to really understand common iOS design patterns like MVC (Model–view–controller), delegation (Delegation pattern), KVO (Key-Value Coding Programming Guide). Having a firm grasp on these concepts can really help take your Objective-C code to the next level. Finally, I'd recommend reading iOS programming blogs as much as you can to keep up on the latest and greatest; they're a great source of helpful tips and tricks regardless of skill level. Some of the ones I particularly like include NSHipster, Cocoa with Love, and Tutorials for iPhone / iOS Developers and Gamers.

And most importantly, have fun! Objective-C syntax is a bit... different, but give it some time and it'll grow on you! (Hopefully.)

See Questions On Quora

Posted on 2 December 2013

How does Google Images remember your position when you go back to it from a result?

Your position on the Google Image Search Results Page is encoded in the URL. For example: alba truffles - Google Search. When you click on an image result, we open a modal dialog box (a "lightbox") that shows you the image and provides links to open the full image and the containing web site. This lightbox rewrites the URL. Thus when you go to the containing web site and then hit "back," you go back to this URL. That URL jumps you to the location of the given result, which has the effect of making it look like Google remembered your position.

Separately, browsers such as Chrome remember session state from pages and will return you to your exact spot on the page when reloading. Chrome will do this even for tabs you close.

See Questions On Quora

Posted on 18 October 2013

What is the javascript code for disabling right click in a webpage, without using activex?

Please don't

I can easily type ctrl-shift-i and override your function in JavaScript console. All you do is annoy your users when they, for example, want to right-click on a link to open it in a new window or bookmark a link.

There are countless browser extensions to download every image asset from the page. It's just pointless and aggravates users.

See Questions On Quora

Posted on 28 September 2013

What are the tradeoffs of client-side rendering vs. server-side rendering?

Since Google Plus and a few other cutting-edge websites now render entirely on the client, let's review why server-side rendering is desirable at all.

Server-side rendering means when the browser fetches the page over HTTP, it immediately gets back HTML describing the page.  Server-side rendering is nice because:

  1. Your content is visible to search engines like Google.
  2. The page loads faster.  There's no "white page" while the browser downloads the rendering code and data and runs the code.
  3. It maintains the idea that pages are documents, and if you ask a server for a document by URL, you get back the text of the document rather than a program that generates that text using a complicated API.

Client-side rendering means JavaScript running in the browser produces HTML or manipulates the DOM.  The benefit is you can update the screen instantly when the user clicks, rather than waiting a few hundred milliseconds at least while the server is contacted to ask what to display.  Sites where you mostly navigate and view static content can get away with mostly server-side rendering, but I can't think of any website that doesn't do any client-side rendering.  Any portion of a page that's animated or highly interactive (a draggable slider, a sortable table, a dropdown menu) almost certainly uses client-side rendering.

People don't usually realize there doesn't have to be a tradeoff.  Why not render the initial state of the page on the server, interactive widgets and all, and then re-render the parts that need to be updated on the client?  Though it's typical to render the meat of a page on the server and then "enhance" it on the client with a library like jQuery, it's rare that a site performs the same rendering tasks on the server and client as appropriate.

The reason server-side and client-side rendering aren't typically mixed is that they are typically done in different programming environments, usually in different languages.  For example, almost all websites render the overall page layout and the content, such as blog posts, on the server, generating HTML in a language like Ruby, PHP, or Python.  On the other hand, a chat widget or an image gallery might be written entirely in client-side JavaScript, while a slider or a rich text editor certainly would be.

For websites that blend static, navigable content and app-like interactivity (or for companies that seek to provide an added measure of sanity for their engineers and designers), this divide becomes a huge pain.  This is why Google Plus does all rendering on the client.  Quora cleverly does almost all rendering on the server (including when you, say, click a "Follow" button), but only the updated parts are sent to the client.  (Particular widgets like the editor and "Promote" slider that provide instant feedback are clearly client-side.)  In an effort to increase responsiveness and flexibility, many sites now render Ruby templates on the server and Backbone templates on the client for different parts of the same user interface.  AirBnB has experimented with running client-side JavaScript templates on the server.

With server-side JavaScript on the rise, I believe the solution is simply to have a single UI framework that runs on both the client and the server, generating the initial HTML on the server and providing an interactive experience on the client.  I'm working on bringing such a framework to Meteor, which already unifies other APIs between the client and server such as fetching a URL or querying a collection of data.

In the absence of such a solution, programmers usually end up arguing either that client-side rendering isn't very important (because most sites or apps consist of large "pages" or "screens" and a round-trip to the server is acceptable when navigating between them), or that server-side rendering isn't very important (because an all-client app just needs a loading screen and a little extra attention to search engine optimization).  These arguments are motivated by the pain of having to deal with both types of rendering in the same application when they involve different languages and APIs.

Edit: More examples of major sites and their rendering strategies:  Facebook is mostly PHP but certain parts of the UI are pure JavaScript -- the chat, the comment form, probably the photo gallery.  Gmail is written in something like C++ or Java, and I'm not sure where the rendering takes place, but I'd guess it's mostly or completely on the client (given the progress bar it displays while it loads).  The old or "basic" Gmail view is presumably server-side rendered.  Github's Markdown implementation is written in C and runs on the server.  StackOverflow has two Markdown implementations, one for live preview on the client and one for the server.

See Questions On Quora

Posted on 7 July 2013

What are the tradeoffs of client-side rendering vs. server-side rendering?

1. Browser compatibility issues. The more operations you leave up to the browser, the more quirks/incompatibilities you run into.

2. SEO. Client-side rendering means that crawlers will have trouble indexing your site. There are workarounds that work perfectly fine (PhantomJS), but it's just one more piece of complexity to worry about.

3. Latency. On initial page render, server side rendering is much faster than client side rendering. But on subsequent page updates or when rendering new child views, server-side rendering is going to be much slower and less responsive because you have to make a network request and re-render most of / the entire page when data changes. Whereas with client-side rendering you can offload subsequent processing to the client and selectively re-render portions of the page for more responsiveness. This tradeoff is a bit blurry because any given app can have varying degrees of server-side/client-side emphasis - it's a sliding scale that ranges from HTML with a sprinkle of jQuery to a full-blown framework like Angular or Ember.

Modern web development is definitely moving towards client-side rendering. Issue #1 will slowly dissipate as people upgrade their browsers, especially to auto-updating browsers. Issue #2 will be fixed once the googlebot (and the bingbot?) gains the ability to fully run JavaScript (right now there is only partial support), which is actively being worked on.

See Questions On Quora

Posted on 5 July 2013

How would you explain objects in JavaScript to a child?

A Javascript Object is like a Mr Potato Head.

mrPotatoHead=new Object();

Every Mr. Potato Head has 'properties', or words that describe him. To assemble a Mr Potato Head out of all his properties, we can use literal notation:

var mrPotatoHead = {
     mrPotatoHead.height : "6 inches",
     mrPotatoHead.width : "3 inches",
     mrPotatoHead.isMarried : "true",
     mrPotatoHead.wife : "mrsPotatoHead"

Or we can use a constructor function:

function mrPotatoHead() {
     this.height = "6 inches";
     this.width = "3 inches";
     this.roasted = function(){
          var i;
          var slices;
          for (i=1,i<=mrPotatoHead.length;i++) {
          lunch = bake(slices,salt,pepper,oliveOil);
          return lunch;

That last part is the beginning of a nice snack, but is a little advanced for children, and the bake(); method is beyond the scope of this tutorial.

Some properties describe things he has or is wearing:

mrPotatoHead.hasOwnEyes = true;
mrPotatoHead.hasOwnPants = false;

Methods are things we can do to Mr. Potato Head. Sometimes it's a simple action:


Sometimes we need to give him more information by adding a parameter inside the parentheses:


JavaScript isn't what's called 'typed', so if we put in the wrong type of variable, it will do its best even if it doesn't make sense to mix types.


It will usually work anyway, but, yeah, it's best not to mix types.

Isn't that how everyone learned it? :-/

See Questions On Quora

Posted on 21 April 2013

What was the first site to implement infinite scroll?

I saw infinite scroll implemented for the first time on Aza Raskin's blog: Aza on Design a number of years ago. I looked around the web and was able to trace infinite scroll to its origins:

No More More Pages?

Infinite scroll was developed by Aza Raskin and presumably the rest of the folks at Humanized[1] in 2006 as per the above article. The article where the implementation is presented can be found via the internet archive at Reading, Humanized . Thus the original implementation was done for the Humanized Reader app on Friday the 28th of April, 2006.

Aza has given talks on infinite scroll, or infinite history as he calls it, at ixda 2008 and Google in 2009. He talks about Humanized reader at 22:00 mins into the following talk confirming the above source:

-- First 20 mins of the video are not directly related to infinite scroll --
At 23:30 he says that this idea is very old and he just reimplemented it with new technology. He also mentions that after they implemented it for Humanized Reader he then talked to the folks at Google Blogger and the NYTimes to see if they were up for it. According to other information on the web the above talk was when Google got the idea to use this for search results.

Aza was recruited to Mozilla labs later on.

[1] Humanized > About Us

See Questions On Quora

Posted on 16 March 2013

Exactly why does ['10','10','10','10','10'].map(parseInt) return [10, NaN, 2, 3, 4] in JavaScript?

  1. map
    calls the function with three parameters. The first is the element, the second is the index in the array (the third is the array itself).
  2. parseInt
    takes two arguments. The second is an optional argument specifying the radix (the base) to expect the string in.

Try some things:

['10','10','10'].map(function(x,y) { return y; });
// → [0, 1, 2] -- These are the indices of each element

parseInt('10', 0); // → 10 -- Defaults to base 10
parseInt('10', 1); // → NaN -- There is no such thing as base 1
parseInt('10', 2); // → 2 -- 10 in base 2 is 2

The solution is:

['10','10','10'].map(function(x) { return parseInt(x); });

EDIT: Thanks to Prithvi Raj's answer I've edited this to say that map calls the function with three parameters, not two as I originally said.

See Questions On Quora

Posted on 25 January 2013

What are the technical challenges involved in implementing and maintaining a bookmarklet like Pinterest's?

Here are some of the things that the Pinterest bookmarklet does:
  • detects whether the page contains a global "no-pin" directive in a META tag
  • passes the URL through an endpoint which checks if it's on Pinterest's list of domains from which pins should not be made
  • compares the URL to a list of patterns, each of which could result in different behavior. (Google Image Search results pages, for instance, are treated differently.)
  • grovels through the entire DOM to find pinnable things (images mostly, but some iframes, objects, and other tags occasionally work)
  • calls the no-pin endpoint mentioned above to see whether any of the pinnable things is sourced on a domain from which pins should not be made
  • calls a different endpoint on Pinterest to get attribution information (including thumbnail images for videos), if the URL of the page or any of the pinnable things matches one of many patterns
  • creates a thumbnail for the pinnable thing
  • adds to the thumbnail attribution hints (the source's favicon, usually) if it found any, or grays out the thumbnail if the attribution endpoint said not to pin it
  • waits for a click on any of the thumbnails and pops up the Pin It form
  • quietly tears itself down and goes completely away when a thumbnail or the Cancel link is clicked, or if there are no pinnable things, or if the page has a no-pin directive, or if the domain is on the no-pin list
  • does all of the above (or at least behaves reasonably) on any page on the Internet, no matter what browser the user is driving.
  • also does all of the above for all of our mobile applications and browser extensions, so they don't have to constantly reinvent the DOM-crawling wheel
As you can imagine there are several technical challenges here. The hardest is this: when most developers write JavaScript it only has to run on their page, which is totally under their control. When we write third-party JavaScript, however, it has to run on every page in the world.

See Questions On Quora

Posted on 10 January 2013

What is the significance of jQuery?

In no small way jQuery accelerated the proliferation of the non-static web, or "web 2.0."

The milestone I use as a marker for the start of the Web 2.0 (AJAX-driven web app) has always been Gmail.  It did things no other website even attempted at the time, when most sites were content being static pages of HTML + a tiny bit of CSS. Javascript was not considered a serious language and support was minimal. Nobody outside of a few engineers at Google and devoted JS evangelists understood how each browser ran code.

jQuery made it really easy for anyone to programmatically access and manipulate a page. Easy for engineers who otherwise wouldn't touch a website; easy for designers who wouldn't touch code. It massively added to the number of websites and developers who aspired to build something more than text + images, whether that meant animations, complex forms, or responsive apps rivaling that of contemporary desktop software.

Of course, there is downside to this progress.  It's very easy to write bad jQuery code.   Additionally the library prefers ease of use at the expense of imposing stricter/better engineering practices. Still, I think it's a net positive – there are plenty of other JS libraries if the fast-and-loose style of jQuery leaves a bad taste in your mouth.

See Questions On Quora

Posted on 3 January 2013

What techniques do you employ to improve your Web Development efficiency and productivity?

Here's my list of things that make me more productive:

  • First and most important: turn off all your notifications for everything, with maybe the exception of email. Development takes a lot of focused attention, and each moment that attention is broken is a ding in productivity.
  • Learn a few languages and know them really well, know them conceptually, philosophically and practically. This is about quality, not quantity, so avoid the temptation to try and learn all web/server related languages. It dilutes your knowledge and will impact your productivity.
  • Use high quality, ergonomic office furniture. To become a really good developer, you will need to spend hours and hours writing code and solving problems. This is normally done at a desk, so make that desk and chair really ergonomic and supportive. I also have configured my desk to remove all pain points in posture. Using a standing desk or treadmill desk as Bruno Skvorc mentions is a really good idea.
  • I'd recommend an Apple computer. Yes, I said it. Having a Mac is quite beneficial because there is so much good stuff out there that is more Mac compliant than it is Windows. If Mac OS is not your thing, then at least buy an Apple monitor. Their screens are the best in the industry with the highest resolution. If you're going to stare at something for 10 hours a day, make it nice ;)
  • Spend some money on a really good code editor or IDE: phpStorm, WebStorm Sublime Text 2, Espresso are all really good. Now that you have your code editor, learn the hell out of it. Don't change around; stick to it and get really good at it.
  • Lint all your code in your code editor/IDE. Linting should not be done after the fact; lint while you type.
  • Choose a development browser, and learn it's developer tools really well. Webkit, and by extension Chrome, has some really good developer tools that can make development so much faster, Firebug is good and so is Opera's Dragonfly, so pick one and then stick with it, learn the hell out of it.
  • Learn the Terminal and all the most common commands. It's something that can be quite intimidating at first, but once it clicks, it will make you more productive by giving you the opportunity to use CLI tools.
  • Install Nodejs, Git and Gruntjs, now that you've learned some basic and common Terminal stuff. Get good at Git and start using Gruntjs to automate development tasks.
  • Start looking for preprocessors like Sass, Less, Coffeescript, Compass, Jade and other things that help you write code faster, once you feel really comfortable with the languages and feel you are starting to master them. Note: this is not recommended if you are still learning the languages. This is where Gruntjs comes in for compiling all these abstractions into native code.
  • Lastly, find good frameworks that are compatible with your style of development, thinking and processes. There's a lot of good stuff out there, but don't get overwhelmed and don't try to learn them all. Pick one good interface and interaction framework (Twitter Bootstrap, Zurb's Foundation, Skeleton), one good DOM library (jQuery or Zepto) and one good app framework (AngularJS, Ember, Backbone). Once you made your choice, stick with it and become a master of it. Note: be careful jumping into these if you are still learning a language as the level of abstraction from the native code can confuse you.
  • Automate anything you do over and over on projects, or add it as a module to one of your frameworks. Keep your code, your style, your processes, your tasks DRY: Don't Repeat Yourself!

These are smaller and more optional suggestions:

  • Buy yourself a really nice pair of headphones that help block out distractions. I use these Beyerdynamic DT 770 PRO, 80 ohms: Electronics and these Shure SE215-CL Sound Isolating Earphones: Electronics
  • Use a good task manager. I use use Flow: Get things done with anyone.
  • Use a good time management app. I use Harvest Simple Online Time Tracking Software
  • Use a good versioning system. I use Git via GitHub.
  • Use a good file sharing, back-up redundancy service. I use Dropbox with unlimited versioning.
  • Get yourself a really good web host that offers VPSs for a good price. I use Dreamhost's VPS service: Virtual Private Server
  • Choose as few social network sites as possible. I just use Twitter, Forrst, Dribble, GitHub and Quora. That's it. I try not to spread myself too thin.
  • I drink coffee.
  • I use a 2mg nicotine gum, cut in half, to help with getting through tough spots and tiredness. No, I don't use tobacco products (they'll kill you), just nicotine gum as it's shown to increase focus, working memory and reduce mental fatigue.
  • Once you feel you are mastering a language, your processes, your style, turn around and help others master theirs. Teaching is the best way to learn, and it will do nothing but make you better.

If you are curious about what I use from the top section:

  • I use phpStorm
  • I use a Mac Pro
  • I use a 27 inch Apple Display
  • I use an Aeron - Office Chair - Herman Miller
  • I focus exclusively on JavaScript, HTML & CSS. I know a enough of PHP to get around, but I don't try to master it; that's what back-end devs are for ;)
  • I use Chrome Canary
  • I use Zurb's Foundation 3, which means I also use Compass and Sass.
  • I use AngularJS
  • I use jQuery, but only if I have to.
  • I do not use CoffeeScript

I think that's about it. Let me know if I missed anything :)

See Questions On Quora

Posted on 3 December 2012

What is the best way to educate yourself on HTML, CSS, JavaScript, and AJAX?

I have to recommend Udacity's Web Development Course.
Web Development Course (CS253)

Its taught by Steve Huffman (Reddit co-founder) and it will take you through the essentials of both front-end and back-end development. You'll finish the class with a sound understanding of the relationship between server-side and client-side technologies. Plus, Steve's experience building and scaling Reddit makes the class highly engaging.

The Course covers the following: (HTML,CSS, Javascript, GET/POST, HTTP, Cookies, JSON, Sessions, Database, Scaling, memcached, MySQL, Web Security, Hashing, Salting, Load-balancing, Templating).

At this point- go build something. Single page website, simple web utility, anything. You'll learn bucket-loads in the process.

With the essentials under your belt, I'd recommend becoming a jQuery wizard. Nearly everything sleek that happens on a webpage is through Javascript, and jQuery just makes Javascript development that much faster, cleaner, and stable. Codecademy does a pretty good job teaching the essentials of jQuery selectors and DOM manipulation.

As for AJAX, jQuery will make it pretty easy for you to make asynchronous calls to your server.

Lastly, going through tutorials is always a way to expand your knowledge through experience. Its akin to building something new, but you're guided along the process so its a bit more time-effecient for learning purposes.

My favorite Web Dev Tutorial site:

Happy Development!

See Questions On Quora

Posted on 9 November 2012

Why is JavaScript the only client-side language available?

I recently had a chance to ask the same question at a meeting with several experienced web architects. They all agreed that we're stuck with JavaScript because developers know that JavaScript will run in anybody's and everybody's browser.

The one interesting trend is that Google and others are writing compilers that take non-JavaScript languages and trans-compile them into JavaScript. In this new model, JavaScript is relegated to acting as a low-level, ubiquitous runtime code.

See Questions On Quora

Posted on 5 July 2012

When does it make sense to use an MVC framework for JavaScript?

The thumb rule to use MVC is that whenever you can separate Data and Rendering Always do so. Many times we simply dont have that option in JS because the server always throws HTML.

I will use a javascript mvc framework under following circumstances

Strong Reaons:
1. In page AJAX heavy applications
2. Same data is being rendered in different ways on the page
3. Presence of highly reusable visual elements on the screen. (Eg. A "upvote" button present almost 30 times on a single page)
4. Many trivial interactions on the page. E.g. Like buttons.
5. My server has only JSON/XML bases interface.

Typical examples: Stock Market Ticker. Social networking app, Data visualizations apps

Circumstances under which I will never use JS MVC

1. My server can not handle too many requests. If you use JS MVC each model operation costs a server call and which means your server will be bombarded with several small requests.

2. My application has less than three interactions on each page. For example a page that only has a "Submit" and a "Delete" button and nothing else.

3. My data does not change very often.

Examples: Blogging Software, News Website, Photo sharing website etc.

Please note that to make the decision to use JS MVC or not you must have control on your server as well. You server will have to provide a Data only kind of API which can accept and return JSON or XML data.

See Questions On Quora

Posted on 17 May 2012

How does Backbone.js interact with Django?

Django and Backbone.js are separate projects, and there is no direct interaction between the two frameworks. I.e., they aren't tightly coupled. You can "connect" a backbone.js file to a Django project via Ajax.

In my opinion, the easiest way to do this is to use Tastypie: Tastypie makes it easy to create REST-based interfaces in Django.

There is an example project in Github that demos how to connect Django to Backbone.js via the Tastypie Django app. You can find it at:

You can find Tastypie at:

See Questions On Quora

Posted on 30 April 2011

Why doesn't JavaScript have the bad reputation over PHP?

Attributing Javascript success to it being "the only language for the job" is unfair. Javascript is hands down a much better language than PHP. At its core it's a fairly consistent language, which follows a few powerful principles. It's a truly dynamic language, prototype-based, that supports functional constructs, all with strong theorethical basis on older languages such as Self and Scheme. Javascript may have its problems, but at its core is a very coherent and elegant language.

PHP on the other hand was from the start much more hackish in nature. PHP was never intended to be a programming language, much less a object oriented one; it started as a hack to build dynamic pages, which solved this particular problem fairly well, and was easy enough for anybody to try. Most of its more advanced features were tacked over it as it evolved with little 'theoretical' consideration. This can be easily seen in the progression from PHP4 to PHP5 and the now dormant PHP6 project. As a result, the language does not have a coherent design.

The main problems with Javascript are in my opinion the name (which imply that the language was derived from Java, which is not true in any sense) and the DOM (which is in my humble opinion a terrible hack glued over HTML+CSS code). All the rest are conscious design decisions, which may be debatable as a matter of application or even taste, but have their own merits. The same can't be said about PHP, despite how popular or effective for the job it may be.

See Questions On Quora

Posted on 7 March 2011

What bad programming/architecture habits can a self-taught PHP coder develop?

I agree with Syd that that you can write bad code in any language.

That said, there are some very specific things programmers who start off using PHP as their first language are vulnerable to, and I'll try to enumerate them as follows:

  • Not understanding how memory allocation works, how garbage collection comes with performance drawbacks and how it can be extremely problematic to use in certain problem domains.
  • Assuming that all memory is free, since they are insulated from manual memory management.
  • Not understanding the internal representation of types that are used, and consequences there of. ( For example a switch statement on strings might appear to be the same as a switch on integers, though at the core the map to different things internally.) The same goes for using strings as enums.
  • Not understanding that how doing certain operations across requests in a webserver are extremely expensive as compared to a server which keeps client state in memory. It can be done in PHP with APC, but naively speaking some users will likely write code that might do expensive state setup for every single request.
  • Not understanding the advantages of serialization in binary formats vs. PHP serialization, particularly the performance benefits.
  • PHP can train people to reach for @error suppression instead of actually writing error handling code.
  • Not understanding the difference between arrays and associative arrays, what operations are cheap for each class of structures and which ones are cheap.
  • Not understanding the implementation of the array_* functions, and assuming they are cheap.
  • Not understanding that deferencing null fields is a bad thing to do.
    I.e. in PHP you can check ( isset(x->y->z)), and it will work fine if y isn't set and simply behave as if x->y->z was null. In C it will crash if y is null.
  • Not understanding the difference between deep copies and shallow copies.
  • Not understanding concurrency, particularly at the hardware level. Users of the language are never exposed to more refined forms of concurrency such as epoll style event driven asynchronous IO.
  • Developing a mindset that presentation and logic is for output is a very bad thing.
  • Not understanding why file_put_contents isn't suitable more demanding instances of file/IO.
  • Developing the mindset that it is okay to evaluate things such as function names to execute at run time based on a string by the use of variable variables. I've seen code that actually stored callback function names for a certain data structure be written out persistently.

    The worst programming habit you can develop using PHP: "If it didn't work right, I'll just change something and hit reload" - that is hacking, not engineering.

See Questions On Quora

Posted on 20 February 2011

What is the technology behind the New York Times HTML5 / Chrome app?

Speaking as the developer of the app:

Jacob Rothstein's rundown is impressively thorough and accurate.

It may also be worth noting some additional points:

The app runs entirely on javascript, with all visual elements rendered at run time, and usually via some sort of template.

Some details

  • AppCache + WebSQL stores the entire app for offline reading (minus images)
  • WebWorker threads load the data quietly in the background.
  • A lot of css transitions and transforms, particularly for touch screen functionality. The effect on interface performance was profound.
  • Typekit is loading our proprietary typefaces to give it that Timesy look

If there's more you want to know, feel free to ask.

Update 1:

Received a question about Solo.

Solo is an in-house framework which is currently an extraction of the juicy bits of Skimmer. Basically, I asked myself what parts of Skimmer I would want immediate access to in a new app, and teased them out.

The main thing Solo does is resolve a number of problems with asynchronicity. Most of my apps involve requesting data from a server, updating the UI, and running some animations, and any of these processes might spin off more requests, more updates, and more animations, not to mention data storage, which gets overwhelming.

As the app grew in size, I also needed a way to control order of loading components.

Solo provides a system to manage loading so that components can announce their availability when they want to, and be loaded when the app can handle them. It further provides a way to declare certain objects as communication portals, and subscribe to notices of events.

Solo also captures touch and key events and runs them through the same infrastructure.

The end result is that you write objects, and declare them to be part of the communication stream. You add a few methods to handle loading and events, and the rest is just javascript.

It strikes me as a potentially odd solution, but I've found it useful, and I've been able to turn out features at a fast clip using it.

Your next question is probably: Will you guys release it. Answer: Probably. Another developer here is looking into bringing Solo to a point where it is generally usable. If all goes well, we may decide to release the code officially.

Thanks for the question and the interest.

See Questions On Quora

Posted on 8 February 2011

What is the difference between "__proto__" and "prototype"?

They're very much not the same, but there is a relationship between them. They're both sort-of unfortunately named.

Short answer:
  • __proto__
    is the actual prototype, but don't use it.
  • .constructor.prototype
    was supposed to do the same thing as
    but its mostly broken.
  • A function's
    is actually the prototype of things made by it, not its prototype.

Now the long answer:
In prototype-based object oriented languages like Self and Javascript, every object (i.e., instance) in the system has a (potentially anonymous) field that says "if I [the object] don't have a property or method that is requested of me, go to the object that this field references - my prototype - and look for it". Since that object will have this field as well, this becomes a recursive process and it is what is meant by a "prototype chain." Note that this means that in a prototype language, there is no abstract concept of a "class" - an object's "api" is just determined by the transitive closure over this field.

Javascript originally completely hid this field from the programmer, but Mozilla exposed it with
. So you could actually take any object, say it was of type Foo, and set
so that it would now be of type Bar. Which is weird. But technically
is actually the "prototype" of that object.
Now here's the confusing part. To make its prototype system look more like classical-inheritance OO, Javascript kind-of readopted the idea of constructors and classes: every function is eligible to be a constructor by calling it with the
keyword, and by setting the
property of that function, you tell Javascript that "when this function is used as a constructor, set up the object's prototype-ish field to this object." So that's not actually the prototype of the function - its prototype is, of course,

The original idea was that you could get the kind of thing that
referred to by taking an object and getting
. But
itself succumbs to prototypal inheritance, so unless the object's constructor set itself up to be that value, that wouldn't work. And nobody did that, so it's mostly broken.

As was mentioned, ES5 is kind-of rectifying this with functions like
which will always work.

See Questions On Quora

Posted on 15 January 2011

What is the appeal of server-side JavaScript?

There are several reasons why server-side JavaScript is rapidly gaining momentum:

  • It allows you to use the same language on the server and the client. This increases the amount of code that can be shared and decreases the cost and effort required to hire developers, since you don't need to hire different people to write code in different places. An expert in client-side JavaScript can quickly become an expert in server-side JavaScript. Plus, JavaScript is the most popular programming language in the world, so there are quite a few people who are already good at it.
  • It's crazy fast. Node.js (which is where most of the server-side JS buzz is these days) is an incredibly fast evented IO framework that makes it a cinch to write highly scalable network programs.
  • JavaScript is awesome. Although it has many notorious "bad parts", JavaScript is pretty awesome on the whole. It's object-oriented, dynamically typed, prototypal, and it supports lambdas and closures. This allows for rapid development and makes the language flexible enough and expressive enough to meet a wide range of needs.
  • The recent revival of the browser wars means that there are several excellent JavaScript engines all competing with one another to get faster and better. Since many of these engines can also be used to run server-side JS, this means there's a good selection of excellent JavaScript engines to choose from (although Node.js currently only runs on V8).
  • Node.js showed up at the right time. PHP, currently the most popular server-side language, has been mired in community squabbling amidst a large effort to refactor its character encoding support, while also losing developer mindshare to the many excellent Ruby web frameworks that have appeared in the last few years. But Ruby web frameworks, and the language itself, have become notorious for having performance issues and sometimes being hard to scale (although some of this perception is based on misinformation), so the appearance of a new highly performant, highly scalable evented IO framework built on top of the world's most popular programming language couldn't have been better timed.

See Questions On Quora

Posted on 6 June 2010

What is prototypal inheritance?

In a nutshell, prototypal inheritance is when an object inherits from another object. This differs from classical inheritance, in which a class inherits from another class.

In a classical language, classes typically define the structure of objects, but in a prototypal language, the objects themselves define their structure, and this structure can be inherited and modified by other objects at runtime.

Prototypal inheritance first appeared in Self and has since appeared in many other languages, but these days most people think of JavaScript when they think of prototypal inheritance.

Here's an example of prototypal inheritance in action in JavaScript:

// This function serves as an object factory. It creates a new
// object that uses the specified object as its prototype.
function object(o) {
  function F() {};
  F.prototype = o;
  return new F();

// This is our parent object. It will be used as the prototype
// for applePie below.
var pie = {delicious: true};

// This is a new object that inherits from pie. This creates a
// lookup chain, so any properties we look up on applePie that
// don't exist there will then be delegated to pie.
var applePie = object(pie);

// As you can see, pie is applePie's prototype. Note that the
// __proto__ property is a nonstandard language extension that
// isn't present in all implementations; it's just used here
// for demonstration purposes.
console.log(applePie.__proto__ === pie); // true

// The "fruity" property exists on applePie, while the
// "delicious" property exists on pie.
applePie.fruity = true;
console.log(applePie); // => {fruity: true, delicious: true}

// We can change the "delicious" property on pie, and since
// pie is applePie's prototype, that change will be reflected
// in lookups from applePie as well.
pie.delicious = 'totally!';
// => {fruity: true, delicious: "totally!"}

// If we add a "delicious" property to applePie, the lookup
// will stop there instead of delegating to the prototype.
applePie.delicious = 'you bet!';
// => {fruity: true, delicious: "you bet!"}

// But pie will not be modified.
console.log(pie); // => {delicious: "totally!"}

The ability to alter prototypes at runtime provides a great deal of flexibility over classical inheritance (although there are class-based languages, like Smalltalk and Ruby, in which classes have similar dynamic capabilities).

See Rick Waldron's excellent answer to
How do you implement object orientation in JavaScript? for further discussion and examples along these lines.

See Questions On Quora

Posted on 29 May 2010

What is the best way to educate yourself on HTML, CSS, JavaScript, and AJAX?

Doing beats simply reading every time so: go build a single-page site, now, then improve it as you learn.

Other resources: is a solid starting point, and reading the docs and faqs (and learning about why it includes what it does) is educational. is excellent for best practices and advanced topics. is a great tool to try things out. is excellent. has a fantastic, long list of tons of additional resources.

Finally, while I agree with many of the other answers to this question, I have to disagree strongly with those who have recommended is NOT a trustworthy resource. Its owners are SEO experts and prominently rank for most webdev-related searches, but the quality and accuracy and depth of their content is badly lacking. The awesome people at explain why to avoid w3schools:

We are passionate about the web, learning, and craftsmanship.
We want you, as web designers and developers, to be successful in your careers. We feel, though, that W3Schools is harming the community with inaccurate information. Like any other authoritative educational resource, W3Schools should both hold itself to, and be held to, the highest standards.
We hope we can illuminate why W3Schools is a troublesome
resource, why their faulty information is a detriment to the web, and what you (and they) can do about it.


See Questions On Quora

Posted on 30 March 2010 search results

Anyone use Javascript for non-web projects?

I've only recently decided to invest my time and effort into Javascript for a few reasons, primarily because of it's role outside of the web. I can use Javascript in MaxMSP (, which is promising. Node.js clearly opens a lot of doors and now we're starting to see JS-based micro-controller units like the Tessel -

Does anyone here use JS outside of web or mobile application purposes? I'd like to know more of what technical opportunities exist out there for JS.

submitted by rpeg to javascript
[link] [97 comments]

Posted on 3 October 2015

I'm making an RPG in JavaScript! Without canvas! Yes, I'm an idiot!

Update: I got a test version of the current build up and running if anyone wants to check it out!

Controls: Up/W, Down/D, Left/A, Right/D, Enter/Spacebar

Hello there! I am a budding JavaScript developer looking to make a name for himself (read: find employment), and so I decided making an RPG might be a fun way to test out my skills. It's far from finished, but I think I'm far along enough that I can share with people, and hopefully get some feedback!

The GitHub repo:

I'm also getting into the habit of making write-ups of the process:

I don't have screenshots, but here's a really quick video I posted just recently:

I'm posting in /r/javascript primarily to get some constructive criticism on the code aspect of it, not so much the game design aspect. Also, this is technically my first GitHub repo, so if I messed up the setup instructions in any way, let me know.

Any and all feedback is welcome!

Edit #1: A clarification! I work primarily as a front-end developer and UI/UX designer. Hence, my DOM-only approach. I'm using this project as a way to hone my DOM manipulation skills, and have a little bit of fun while doing it!

Edit #2: After some of your feedback, I'm definitely going to refactor some of the code to stop relying on jQuery as a kind of framework.

Edit #3: Thanks for all the support, everyone! There's a lot of really good advice on this thread, and I'm gonna do my best to put it to good use!

submitted by robobeau to javascript
[link] [126 comments]

Posted on 12 August 2014

Do JavaScript app developers typically use object-oriented javascript?

I'm a Java Developer and i'm about to learn JavaScript and AngularJS. Do folks that make full-blown enterprise apps with things like AngularJS tend to use a lot of object-oriented JavaScript or not? I don't find the object oriented features of JavaScript to be very intuitive (i.e. prototypes etc). Do folk actually make a lot of prototypes and use inheritance etc?

submitted by vt97john to javascript
[link] [57 comments]

Posted on 14 July 2014

Why do so many Javascript libraries get this wrong?

And why does no one notice?

All too often I see a promising Javascript library follow this approach to creating classes:

function Library(a, b) { this.publicMethod = function() { return a + b; }; ...etc... } 

Instead of the superior prototypical way:

function Library(a, b) { this.a = a; this.b = b; } Library.prototype = { constructor: Library, publicMethod: function() { return this.a + this.b; } }; 

For those of you who don't understand the difference, in the first (non-prototypical) approach, every time you initialise a new Library object you also unnecessarily recreate every single method. If your class is instantiated a lot and/or has a large number of methods, this will lead to much heavier memory consumption. The other approach only creates the Library methods once to be reused in different contexts (the typical inheritance model), which is much better for memory.

Now the average jQuery plugin isn't going to see a whole lot of decrease in memory consumption by using the prototypical approach, but how has it not been the standard this whole time? It's clearly the intended way of creating anything like a class in Javascript.

I remember years back when I first started learning Javascript, every tutorial I found taught the former approach. I didn't even hear the word prototype until years later. Yet after all these years with Javascript maturing as it has I still run into recent GitHub projects that base it around the obviously inferior design approach. And no one even mentions it in the issues, even on ones with thousands of users and hundreds of contributors.

Maybe I'm missing something here...

EDIT: It seems I've stumbled upon quite a controversial topic in the Javascript community. A lot of really great points here, let's just try to not downvote comments only because we don't agree with them.

EDIT 2: It seems the general consensus is that they each have their appropriate uses. My views have definitely been challenged and I recognise that my opinion was a little flawed. This has been an excellent discussion, thank you!

submitted by poisondwarf to javascript
[link] [116 comments]

Posted on 2 April 2014

Is the option to disable Javascript in browsers outdated?

Do you think the option to turn Javascript off in most browsers is outdated?

It seems like more and more of elements of the user experience that users really like and find really useful, necessary, are dependent on Javascript. AJAX is the best example.

All of that gets bollixed up if someone shuts Javascript off. Yes, the programmer can detect if Javascript is enabled, but it seems out of date for browser makers to give the users the ability to shut off a major.....close to being a defacto standard technology, s/he may need.

submitted by cyanocobalamin to javascript
[link] [99 comments]

Posted on 12 August 2013

What are your vanilla JavaScript knowledge standards that every JS developer should know?

I have an interview coming up for a front end position. I have used JavaScript while at uni for the last 2.5 years and am familiar with Modular JavaScript and other design patterns. Also am familiar with scoping in JavaScript and ...inheritance.

What other things would you recommend I brush up on? Your help would really be appreciated!

submitted by js_coder to javascript
[link] [230 comments]

Posted on 7 August 2013

My javascript game as native application for Android, Windows / Linux / OSX

I will be writing some "How to" articles soon but for now I would like to share what I consider finished work - and spawn a few initial thoughts on different platforms / systems.

Quick vine/video of the game if you are wondering is it worth reading.

Link to the game is at the bottom of post - because I mostly want to share my bitter-sweet joy after spending 500+ hours on this title.

Technical details:

  • Done with canvas - supported by my unfortunately named library Canvas Query
  • No DOM/CSS rendering
  • Sound based on Audio element (no WebAudio API)
  • GamepadAPI - w3c/chrome specification

Windows / Linux / Osx - node-webkit

Very pleasant to work - absolutely nothing has to be tweaked. Managed to do both windows and linux packages under Ubuntu (using WINE). Unfortunately for Mac you need OSX. Also you need special build for OSX < 10.7 - alsooooooo your app will not get accepted in Ubuntu Store for Ubuntu > 12 because of some dependencies craziness

Android / IOS - CocoonJS

Everything goes rather smooth if you are creating the game with cocoon in mind from the start - no DOM, first canvas element is screen, some traps like audio.load - pros is that it is WAY faster (thanks to OpenGL) than PhoneGap and other solutions - also you don't need OSX, nor developers account in development process. Cons are that you will loose your hair searching for bugs that are not in your code.

I have failed to make port for IOS because imageData related functions are not working properly - also it kill the app randomly for some reason - also context.arc is broken on IOS.

CocoonJS will support Gamepad API which makes it possible to make OUYA games. If you can't get your game working on IOS - ejecta is an alternative.

Firefox OS

Deploying application is the easiest of all platforms - you just upload some manifest file and voila - no porting at all. However the OS is still too slow to render more complex games like QbQbQb - tho I've been able to run different one in built-in browser (which performance is no-different from native apps) with promising results (but that's not the topic).


Currently my game is available on Humble (bundle) Store and Google play store, Newgrounds, Kongregate. Pending approval for Desura. Rejected by GOG and Rovio stars. Will be trying greenlight. However this is marketing - I am failing hard in this field so won't play wise guy :)

One advice: do not put DEMO in title on Kongregate - even if it is true :) They like/ask to be cheated by disguising demo as a normal version - and then full game is called "SUPER" or "HD" despite it has all the same assets.

I will be trying to find time to reveal little by little details on publishing on different platforms - especially how to build packages for android, ubuntu or making windows installers because this is something that javascript programmer may find extremely repulsive (I DID... it breaks the whole idea of HTML5 portability with browser as a vessel - and I am not yet sure was it the best business decision).

Also to show you a glimpse of how many twists are there check my distribution/ folder structure

The game:

|~o Click this o~|

Also - if you are currently porting html5 game and got stuck on something - ask - maybe I have encountered the same problem and managed to go through.

I will announce articles on /r/javascript but you can follow me on twitter or tumblr

submitted by rezoner to javascript
[link] [60 comments]

Posted on 4 August 2013

Javascript != Java

3rd-party contractor came to visit office yesterday, who has "decades" of experience. Conversation came up about JavaScript in one of our products. He says, "Our product doesn't use Java." After an awkward moment with someone who works on the knowledge base nodding in agreement with him, I speak up and delineate the difference between Java and JavaScript.

Later on in the conversation, the same 3rd-party guy followed up with this jewel: "besides, what would anyone even use JavaScript for on the web?"

I proceeded to disable Javascript in my browser and show him.

tl;dr: lasers, dinosaurs, & drums made a guy's head explode

[edit spelling]

submitted by raiderrobert to talesfromtechsupport
[link] [358 comments]

Posted on 22 May 2013

I'm trying to learn JavaScript, and all of the books I've looked at begin with a heavy dose of binary and memory allocation - is it really necessary to learn this??

I fully understand that in order to be a fantastic, brilliant programmer learning about how the computer converts your code and how much memory it takes to process it could be of benefit, but as a beginning programmer, I feel like it is a great waste of my time (for now) to know that the number 114 is made up of 64 bits. I'm feverishly trying to up my skill set so that I can move out of my horrific tech support job and into the world of programming, and in order to maximize my time, is it okay to skip over this or will it haunt me further down the line?

edit: Thank you for all the feedback, insight, and encouragement! I have ordered Professional JavaScript for Web Developers and The Definitive Guide from Amazon. They won't be here for another week, so in the meantime, I am 25 pages into homoiconic's book JavaScript Allonge (a very clever and informative read!) and I'm pressing on :)

submitted by have_u_restarted_it to javascript
[link] [131 comments]

Posted on 1 February 2013

r/javascript is not Stack Overflow

I don't know how other users of r/javascript feel about this, but I think this should be a forum for discussion of Javascript itself and sharing interesting examples.

Every day new threads hit the top of the page which are just asking for help with, or critique of code. IMO, these kinds of posts belong in a different forum, preferably Stack Overflow, a link to which is posted right over there --->

Am I being a fusspot? How do other people feel about this?

submitted by mitchellrj to javascript
[link] [115 comments]

Posted on 23 October 2012

Learn Javascript

This subreddit is for anyone who wants to learn JavaScript or help others do so. Questions and posts about HTML and CSS are also encouraged. /r/LearnJavascript is sponsored by the folks at [Hack Reactor](, a school specializing in teaching Javascript to fledgling programmers. HR staff members regularly post and respond to questions here. [link]

Posted on 4 April 2012

What program do you use to write Javascript?

I hope you guys don't get this a lot. Currently I'm using Dreamweaver code mode, but there's got to be a better tool out there for OO Javascript right?

Edit: Thanks for the advice guys, I'm going to give a couple of these a shot.

Also, I was going to ask for some up-votes, so that this would be more prominent on /r/javascript, but then I remembered it was /r/javascript. 2 is enough.

submitted by 90yoboy to javascript
[link] [138 comments]

Posted on 9 August 2011

Recommendations for mastering JavaScript.

I'm making it a goal of mine to master JavaScript and was hoping someone else had done the same and wouldn't mind sharing their regime.

EDIT: ** **I've created a new post to host all the references from this post. Find it here.

EDIT: Thanks guys. I've compiled a list of references mentioned here. I appreciate all your contributions.

  1. Anything written by Douglas Crockford. This includes: JavaScript: The Good Parts and YUI Theater
  2. Read other people's code, jQuery source, Node's source, etc.
  3. Understand JavaScript before becoming dependent on libraries (eg. jQuery, Prototype).
  4. Addy Osmani's Javascript 101 audio course
  5. Build Things - "think of something cool, and try and build it."
  6. Participate at StackOverflow.
  7. References -o- plenty: Gecko DOM Reference, HTML and DHTML Reference, Yahoo! YUI Theater, HTML DOM Tutorial, Annotated ECMAScript 5.1, JavaScript, JavaScript Blog

  8. And finally, Lord loves a working' man, don't trust whitey, and see a doctor and get rid of it.

submitted by fl0at to javascript
[link] [93 comments]

Posted on 21 February 2011

Javascript is NOT a bad language

Venting here. I'm sick of hearing that Javascript is a bad language. It's not perfect (what language is?) but it is quick and easy to write clean, flexible and reusable code. It's extremely well documented. It has some sweet debugging tools (these days). I love the powerful dynamic nature of it, and the event driven programming that it enables. Occasionally I sit down with people that "used to do some Javascript back in the day", people who were left with a bad taste in their mouth. Together we (ok, mostly me) hash out some clean, concise, and readable Javascript... and I laugh as they slowly realize that they don't know as much about it as they thought they did.

I love Javascript. It's the web browsers that I usually have issues with.

submitted by spiderworm to javascript
[link] [83 comments]

Posted on 29 December 2010


All about the JavaScript programming language! [link]

Posted on 24 January 2008