background preloader

Tech

Tech

A JavaScript Module Pattern Eric Miraglia (@miraglia) is an engineering manager for the YUI project at Yahoo. Eric has been at Yahoo since 2003, working on projects ranging from Yahoo Sports to YUI. For the past several years, Eric and his colleagues on the YUI team have worked to establish YUI as the foundation for Yahoo’s frontend engineering work while open-sourcing the project and sharing it with the world under a liberal BSD license. Global variables are evil. Douglas Crockford has been teaching a useful singleton pattern for achieving this discipline, and I thought his pattern might be of interest to those of you building on top of YUI. 1. YAHOO.namespace("myProject"); This assigns an empty object myProject as a member of YAHOO (but doesn’t overwrite myProject if it already exists). 2. Note the very last line with the closing curly brace and then the parentheses () — this notation causes the anonymous function to execute immediately, returning the object containing myPublicProperty and myPublicMethod. 3. 4.

Invisible Cities by Maria Popova What social media activity has to do with the literal lay of the land. In December, the now-infamous map of Facebook friendships revealed an uncanny cartography of the world depicted purely through social relationships data. Now, a project by Christian Marc Schmidt and Liangjie Xia is taking the concept ambitiously further: Invisible Cities is a transmedia mapping project, displaying geocoded activity from social networks like Twitter and Flickr within the context of an actual urban map — a visceral, literal embodiment of something VURB‘s Ben Cerveny has called “the city as a platform,” the idea that cities are informational media and living computational systems for urban society. By revealing the social networks present within the urban environment, Invisible Cities describes a new kind of city — a city of the mind.” Individual nodes appear whenever real-time activity takes place and the underlying terrain represents aggregate activity. via Creators Project

helloflower™ Create your own beautiful flowers Design Use simple tools to create any flower you can imagine. Just touch to shape the petals, choose colors and finely tune your design until you get the most fantastic blossom. And don’t forget to save your own unique creations in the gallery. Share Compose gorgeous pictures to use as wallpapers or give a new look to your profile. Watch Stunning 3D graphics take full advantage of the iPhone 4 Retina display and HD resolution on the iPad. Enjoy Relax creating dazzling 3D flowers! Runner-up in Best Non-Game category at the Unity Awards 2010.Awarded FWA Mobile of the Day for November 19th 2010.Featured in The Mobile Case Study Book published by TASCHEN. helloflower™ is a free app for iPad, iPhone and iPod touch.

Pixel Shaders: An Interactive Introduction to Graphics Programming JavaScript Garden Although JavaScript deals fine with the syntax of two matching curly braces for blocks, it does not support block scope; hence, all that is left in the language is function scope. function test() { // a scope for(var i = 0; i < 10; i++) { // not a scope // count } console.log(i); // 10} There are also no distinct namespaces in JavaScript, which means that everything gets defined in one globally shared namespace. Each time a variable is referenced, JavaScript will traverse upwards through all the scopes until it finds it. In the case that it reaches the global scope and still has not found the requested name, it will raise a ReferenceError. The Bane of Global Variables // script Afoo = '42'; // script Bvar foo = '42' The above two scripts do not have the same effect. Again, that is not at all the same effect: not using var can have major implications. // global scopevar foo = 42;function test() { // local scope foo = 21;}test();foo; // 21 Local Variables var foo = 3; bar = 4;}test(10); Hoisting

Home - Camargus The Wheels Of Steel: Turntables in your browser (a web-based DJ prototype) Aerotwist - Getting Started with Three.js ## Introduction I have used Three.js for some of my experiments, and it does a really great job of abstracting away the headaches of getting going with 3D in the browser. With it you can create cameras, objects, lights, materials and more, and you have a choice of renderer, which means you can decide if you want your scene to be drawn using HTML 5’s canvas, WebGL or SVG. For all the awesomeness of Three.js, there can be times where you might struggle. The basics I will assume that you have at least a passing knowledge of 3D, and reasonable proficiency with JavaScript. In our 3D world we will have some of the following, which I will guide you through the process of creating: A scene A renderer A camera An object or two (with materials) You can, of course, do some crazy things, and my hope is that you will go on to do that and start to experiment with 3D in your browser. Support Just a quick note on support in the browsers. Set the Scene

Processing.js Demos below! As a sort-of reverse birthday present I’ve decided to release one of my largest projects, in recent memory. This is the project that I’ve been alluding to for quite some time now: I’ve ported the Processing visualization language to JavaScript, using the Canvas element. I’ve been working on this project, off-and-on now, for the past 7 months – it’s been a fun, and quite rewarding, challenge. The Processing Language The first portion of the project was writing a parser to dynamically convert code written in the Processing language, to JavaScript. It works “fairly well” (in that it’s able to handle anything that the processing.org web site throws at it) but I’m sure its total scope is limited (until a proper parser is involved). The language includes a number of interesting aspects, many of which are covered in the basic demos. Note: There’s one feature of Processing that’s pretty much impossible to support: variable name overloading. The Processing API Download How to Use Demos

Holography without Lasers: Hand-drawn Holograms [SCIENCE HOBBYIST] Several hologram plates.(Obviously you cannot see the 3D effect in this flat photograph.) Depending on the tilt of the plate with respect to the sun, you might accidentally discover the "pseudoscopic" image of the "V," and it may appear to float *above* the surface of the plastic. Tilt the plate to bring the far edge up and towards you and you'll then find the "orthoscopic" image floating deep within the plate. If you had inscribed your entire name on the plastic, you'd now be seeing it down there within the surface. All this all started while I was walking along the rows of cars in the parking lot at work. Gritty car hood after careful "polishing" with a dry paper towel. The handprints in the above photo might appear to be on the surface of the hood, but in real life they look holographic and seem to float about one foot deep within the surface of the hood. With a start I suddenly I realized what I was seeing. Closeup of handprint pattern, 6" virtual depth (AHA! - Bill Beaty P.S.

Basecamp for iPhone, Android, Blackberry, and Palm. Highly recommended. Primarily through word-of-mouth alone, Basecamp has become the world’s #1 project management tool. For the last 10 years, companies have been switching to Basecamp because it’s famously easy-to-use, reliable, and It Just Works™. Combine that with our best-in-the-biz customer service, and you’ve got a unique and delightful package. Just last week, another 6,119 companies started using Basecamp. A track record you can trust. We’ve been in business for 15 years, so you can depend on us to be here when you need us. On the Mac, PC, iPhone/iPad, Android and via email. Basecamp’s at home on Safari (Mac, iPhone/iPad), Chrome (Mac, PC, iPhone/iPad, Android), Firefox (Mac, PC), and IE 9+ (PC, Surface). No “IT Guy” required. Basecamp runs in the cloud on our secure servers, so you don’t have to mess with anything technical. Can I see how other people use Basecamp? Absolutely. Free weekly classes + live Q&A. Who else uses Basecamp? A few quick reads and links.

Related: