background preloader

Modern Web Development

Modern Web Development
So, you’ve added a breakpoint, you refreshed the page, and now your script is paused. Now, the fun begins. The first thing of interest in the sidebar is “Watched Expressions”. If you care about the value of some expression (Say “MyApp.someController.property === ‘some value’”), then adding that as a watch expression will let you keep an eye on it without having to type it over and over in the console. Below that, the “Call Stack” section shows you every function call that the system went through to end up where it did. Next, “Scope Variables” lists the local variables and their variables. Now that you’ve inspected the state of the app on a breakpoint, you’ll probably want to move around. Continue resumes the execution of the program. These tools are essential in walking through your code and pin-pointing a bug, or finding out which path through your codebase is being followed. Another handy tool lives under the “XHR Breakpoints” section. Next in the list is the Timeline Panel. Timelines

Dive Into HTML5 PythonBooks - Learn Python the easy way ! Adequately Good - JavaScript Module Pattern: In-Depth - by Ben Cherry The module pattern is a common JavaScript coding pattern. It's generally well understood, but there are a number of advanced uses that have not gotten a lot of attention. In this article, I'll review the basics and cover some truly remarkable advanced topics, including one which I think is original. The Basics We'll start out with a simple overview of the module pattern, which has been well-known since Eric Miraglia (of YUI) first blogged about it three years ago. Anonymous Closures This is the fundamental construct that makes it all possible, and really is the single . (function () { // ... all vars and functions are in this scope only // still maintains access to all globals }()); Notice the () around the anonymous function. Global Import JavaScript has a feature known as . Luckily, our anonymous function provides an easy alternative. (function ($, YAHOO) { // now have access to globals jQuery (as $) and YAHOO in this code }(jQuery, YAHOO)); Module Export Advanced Patterns Augmentation

Self-referencing many-to-many through Django's ManyToMany through attribute allows you to describe relationships between objects. I've written a post about this - (Describing Relationships, Django's ManyToMany Through) - and so I won't cover here the details of its implementation or usage. What I want to talk about in this post is how to create ManyToMany relationships between objects of the same kind, and more than that, to show how those relationships can be described using through models. Asymmetrical Relationships - the Twitter model As we all know by now, on twitter you follow people. So how do you model something like this in Django? So, taking a look at the models, what's important to note is that on the Person model I've created a ManyToMany to 'self' through 'Relationship'. Adding and removing relationships are pretty straightforward - we can deal directly with the Relationship model and create or delete instances of it. Looking at this at a SQL level might make it more clear. Using it in the admin Relationships App

zapier/django-drip The Future of You - Tomas Chamorro-Premuzic by Tomas Chamorro-Premuzic | 9:00 AM January 1, 2013 Economic and technological changes are reshaping the nature of work. Having a great job does not guarantee your career success; your competence no longer depends on what you know; and being an affluent consumer matters less than becoming a sought-after product. Welcome to a new era of work, where your future depends on being a signal in the noisy universe of human capital. In order to achieve this, you will need to master three things: self-branding, entrepreneurship, and hyperconnectivity. Self-branding is about being a signal in the noise of human capital. We are all individuals, but unless we are also a brand, our individuality will be invisible. Successful brands are polarizing (they generate strong reactions) and simple. Entrepreneurship is about adding value to society by disrupting it and improving the order of things: it is turning the present into the past by creating a better future.

Related: