background preloader

Learning Javascript with Object Graphs

Learning Javascript with Object Graphs
HEADS UP! This article was written for an older version of node. More up-to-date information may be available elsewhere. One of the secrets to being a super effective JavaScript developer is to truly understand the semantics of the language. References Everywhere A variable in JavaScript is simply a label that references a value in memory somewhere. Local Variables In the following example, we will create four local variables in the top-level scope and point them to some primitive values: variables.js // Let's create some local variables in the top scopevar name = "Tim Caswell";var age = 28;var isProgrammer = true;var likesJavaScript = true;// Test to see if the two variables reference the same valueisProgrammer === likesJavaScript; Notice that the two boolean variables point to the same value in memory. In the code snippet we checked to see if the two references pointed to the same value using === and the result was true. The outer box represents the outermost closure scope. objects.js

Protovis Protovis composes custom views of data with simple marks such as bars and dots. Unlike low-level graphics libraries that quickly become tedious for visualization, Protovis defines marks through dynamic properties that encode data, allowing inheritance, scales and layouts to simplify construction. Protovis is free and open-source, provided under the BSD License. It uses JavaScript and SVG for web-native visualizations; no plugin required (though you will need a modern web browser)! Although programming experience is helpful, Protovis is mostly declarative and designed to be learned by example. Protovis is no longer under active development.The final release of Protovis was v3.3.1 (4.7 MB). This project was led by Mike Bostock and Jeff Heer of the Stanford Visualization Group, with significant help from Vadim Ogievetsky. Updates June 28, 2011 - Protovis is no longer under active development. September 17, 2010 - Release 3.3 is available on GitHub. May 28, 2010 - ZOMG! Getting Started

8 ways to be a better programmer in 6 minutes. 'hacka' on Sun, 08 Feb 2009 10:12:44 GMT, sez: stop using .net 'lb' on Sun, 08 Feb 2009 10:14:27 GMT, sez: @Hacka Ouch! 'Don2' on Sun, 08 Feb 2009 10:26:20 GMT, sez: The bigger font-size idea is excellent. Now I am better, and I can get on with my life. 'just honest' on Sun, 08 Feb 2009 10:35:21 GMT, sez: Maybe if I turned up to work sober once in a while. 'nagoff' on Sun, 08 Feb 2009 12:04:28 GMT, sez: How about 'remove some (all?) 'Michael' on Sun, 08 Feb 2009 14:40:49 GMT, sez: Learn a design pattern and try it out the next time an appropriate opportunity arises. 'Stephan Schmidt' on Sun, 08 Feb 2009 17:24:02 GMT, sez: Nice, made me think. Stephan -- Programming is hard - 'nagoff' on Sun, 08 Feb 2009 17:59:07 GMT, sez: I missed an obvious one that only occurred to me later - chat to a customer. 'jm' on Sun, 08 Feb 2009 18:00:49 GMT, sez: Read an open source project in six minutes? 'dccrowley' on Sun, 08 Feb 2009 19:07:17 GMT, sez: 1. 1.

Raphaël—JavaScript Library markItUp! 2.0 - A jQuery universal markup editor - Coming when it's done. CSS Sprites: Image Slicing’s Kiss of Death Back when video games were still fun (we’re talking about the 8-bit glory days here), graphics were a much simpler matter by necessity. Bitmapped 2-dimensional character data and background scenery was individually drawn, much like today’s resurgent pixel art. Hundreds and later thousands of small graphics called sprites were the building blocks for all things visual in a game. Article Continues Below As game complexity increased, techniques developed to manage the multitude of sprites while keeping game play flowing. And what does this have to do with the web? Everything old is new again, and though the rise of 3D games has made sprite maps obsolete, the concurrent rise of mobile devices with 2D gaming capabilities have brought them back into vogue. Specifically, we’re going to replace old-school image slicing and dicing (and the necessary JavaScript) with a CSS solution. How do CSS Sprites work? Let’s start with the master image itself. On to the HTML. Applying the CSS#applyingcss

prefuse | interactive information visualization toolkit The New Boston » Java A true story about survival in the Adirondack Mountains. The park covers 6.1 million acres, a land area greater than Vermont, or than Yellowstone, Yosemite, Grand Canyon, Glacier, and Great Smoky Mountains National Parks combined. The Adirondacks are also home to thousands of black bears, deadly snakes, and countless other dangers. Abandoned in the middle of the park with no survival experience and very few supplies, the entire journey was documented and filmed. Click here to watch the whole series! Welcome to thenewboston, the ultimate source for free video tutorials on the internet! There is also a new and improved thenewboston Official Forum. If you are ever on YouTube, make sure to check out my channel at Feel free to donate to help support thenewboston. I hope you all enjoy the website, and thank you to everyone for all of your support!

ADULLACT - Mutualisation de logiciels libres pour institutionnels Popcorn.js | The HTML5 Video Framework Using the memcached telnet interface This is a short summary of everything important that helps to inspect a running memcached instance. You need to know that memcached requires you to connect to it via telnet. The following post describes the usage of this interface. How To Connect Use "ps -ef" to find out which IP and port was passed when memcached was started and use the same with telnet to connect to memcache. Example: telnet 10.0.0.2 11211 Supported Commands The supported commands (the official ones and some unofficial) are documented in the doc/protocol.txt document. Sadly the syntax description isn't really clear and a simple help command listing the existing commands would be much better. Traffic Statistics You can query the current traffic statistics using the command stats You will get a listing which serves the number of connections, bytes in/out and much more. Example Output: Memory Statistics You can query the current memory statistics using stats slabs Which Keys Are Used? stats items Never Set a Timeout > 30 Days!

graphviz The Macintosh port of the automated graph layout software, featuring a new document-based GUI, export to PDF and many more bitmap formats, full alpha transparency, native font and shapefile support and anti-aliasing. If you have an iPhone or iPod Touch, take Graphviz to the next level with our new product, Instaviz. We are now available on the App Store! Instaviz uses advanced shape recognition to turn your finger sketches into beautiful Graphviz graphs. Graphviz 1.12 (v11) won Best Mac OS X Open Source Product and was runner-up in Best Product to Mac OS X in the 2004 Apple Design Awards. With AT&T Graphviz, you don’t figure out the graph, the program does. dot , just describe which nodes should connect to which other nodes. You get these distinctives with the Mac OS X version: Document-based GUI with the Macintosh look-and-feel: Preview and zoom graphs, from 12.5% to 800%. . © Pixelglow Software.

10 Puzzle Websites to Sharpen Your Programming Skills Solving programming puzzles is a fun way to develop your logical and problem solving abilities. Also, when you’re familiarizing yourself with a new programming language, solving puzzles for that language can help speed up the learning process. Here are the top 10 popular programming puzzle sites that will help test your thinking and improve your programming, problem solving, and logical thinking skills. 1. Programming Praxis Programming Praxis is a blog that includes a range of interesting problems with solutions usually available in several different programming languages. 2. CodeKata is a blog of programming puzzles written by Dave Thomas, who’s most famous for the groundbreaking book, Pragmatic Programmer. 3. TopCoder is an active programming community of developers who love to solve puzzles. 4. 5. Facebook has a collection of very challenging programming puzzles that–should you manage to solve them–could result in you getting a job at Facebook! 6. 7. 8. 9. 10. 99 Prolog Problems

3 ways to define a JavaScript class Introduction JavaScript is a very flexible object-oriented language when it comes to syntax. In this article you can find three ways of defining and instantiating an object. Even if you have already picked your favorite way of doing it, it helps to know some alternatives in order to read other people's code. It's important to note that there are no classes in JavaScript. 1. This is probably one of the most common ways. function Apple (type) { this.type = type; this.color = "red"; this.getInfo = getAppleInfo; } function getAppleInfo() { return this.color + ' ' + this.type + ' apple'; } To instantiate an object using the Apple constructor function, set some properties and call methods you can do the following: var apple = new Apple('macintosh'); apple.color = "reddish"; alert(apple.getInfo()); 1.1. In the example above you see that the method getInfo() of the Apple "class" was defined in a separate function getAppleInfo(). 1.2. 2. apple.color = "reddish"; alert(apple.getInfo()); 3. Summary

Tempo :: The tiny JSON rendering engine by TwigKit

Related: