background preloader

Web Dev

Facebook Twitter

How Reddit's cofounders built Reddit with an army of fake accounts. The problem with Mechanical Turk is that you tend to get a lot of low-quality content. If people don't have an emotional investment in the site's success, they'll usually just write drivel and collect their fee. That sets a whole tone for the site which isn't really sustainable. Common approaches I've seen for seeding a UGC site: 1.) Create lots of sock-puppets yourself and write/find the content that you yourself would want to read. 2.) 3.) 4.) 5.) 6.) Design Pattern Library. Web App with jQuery, CoffeeScript, Ajax, Web.py & Heroku. Computing ThoughtsWeb App with jQuery, CoffeeScript, Ajax, Web.py & Herokuby Bruce EckelSeptember 30, 2011 Summary Following up on my previous article, I create a super-simple example where a web page communicates with the server (written in Web.py) sending a JSON request object and receiving a JSON object as a response, which it uses to dynamically update the page.

Afterwards, James Ward quickly loads the example into Heroku using their new Python support. Here is the previous article, showing how to use CoffeeScript and jQuery. I chose Web.py because it's the simplest and most straightforward web framework I've found for Python. The intent of this example is to utilize high-level tools to create a very simple web app. The web page is very minimal, with a text field for input and an H1 field to be manipulated by jQuery to display the output. <! Note that we include getdata.js here, which will be produced later via CoffeeScript. (Also, this is the first time I've -- finally! Web.py. WebSockets: A Glimpse of the Future. Computing ThoughtsWebSockets: A Glimpse of the Futureby Bruce EckelDecember 31, 2011 Summary In order for HTML5 to become the true user interface technology of the future, servers must be able to transparently push data to clients.

People have been trying to do this for a long time, and WebSockets look like they will solve the problem once and for all. There have been custom technologies, and some open-source projects like Comet and CometD. The great thing about WebSockets will be that they are part of HTML5 and so -- eventually -- they'll be supported, debugged and optimized by the browser vendors. While James Ward was visiting Crested Butte, we spent a few hours getting a WebSocket demo going. I decided to use Python because I find it the fastest way to do experiments, so everything in the article is Python-centric. For the Mac, I came across instructions that said -- clearly with a grimace -- that I should use MacPorts to perform these binary library installations. <! How content delivery networks (CDNs) work. Content delivery networks (CDNs) are an important part of Internet infrastructure that are frequently used without a full understanding of what’s happening behind the scenes.

You’ll hear people saying, “oh, we put that on the CDN” or “make sure static assets go on the CDN,” when they have only a rudimentary idea of what CDNs are and how they work. As with most pieces of technology, CDNs are not magic and actually work in a pretty simple and straightforward manner. When a web browser makes a request for a resource, the first step is to make a DNS request. Making a DNS request is a lot like looking up a phone number in a phone book: the browser gives the domain name and expects to receive an IP address back. With the IP address, the browser can then contact the web server directly for subsequent requests (there are actually multiple layers of DNS caching, but that’s beyond the scope of this post). DNS resolution Accessing content Yahoo! Example For example, Yahoo! What does static mean?

Blog Interesting - 32 Ways to Keep Your Blog from Sucking. Best practices - What should every programmer know about web development. Schema.org - Home. About microformats - Webmaster Tools Help. Marcado de datos con microformatos Los microformatos son sencillas convenciones (conocidas como entidades) que se usan en las páginas web para describir un tipo concreto de información (por ejemplo, una opinión, un evento, un producto, una empresa o una persona).

Cada entidad tiene sus propias propiedades. Por ejemplo, una persona tiene las siguientes propiedades: nombre, dirección, cargo, empresa y dirección de correo electrónico. En general, los microformatos hacen uso del atributo class en las etiquetas HTML (que suelen ser <span> o <div>) para asignar nombres breves y descriptivos a las entidades y a sus propiedades. <div><img src="www.example.com/robertosanchez.jpg" /><strong>Roberto Sánchez</strong> Editor principal de Ediciones ACME Calle Mayor 4 Alcalá de Henares, Madrid 28801 </div> A continuación se muestra el mismo HTML marcado con el microformato hCard (persona).

A continuación se indica cómo funciona este ejemplo. Microformatos anidados Contenido no visible. Rentzsch.tumblr.com: HOWTO Use UTF-8 Throughout Your Web Stack. How Browsers Work: Behind the Scenes of Modern Web Browsers. Web browsers are the most widely used software. In this primer, I will explain how they work behind the scenes. We will see what happens when you type google.com in the address bar until you see the Google page on the browser screen. The browsers we will talk about There are five major browsers used on desktop today: Chrome, Internet Explorer, Firefox, Safari and Opera. On mobile, the main browsers are Android Browser, iPhone, Opera Mini and Opera Mobile, UC Browser, the Nokia S40/S60 browsers and Chrome–all of which, except for the Opera browsers, are based on WebKit. I will give examples from the open source browsers Firefox and Chrome, and Safari (which is partly open source). The browser's main functionality The main function of a browser is to present the web resource you choose, by requesting it from the server and displaying it in the browser window.

The way the browser interprets and displays HTML files is specified in the HTML and CSS specifications. The rendering engine Grammars. Web development - The Definitive Guide To Forms based Website Authentication. Avoiding common HTML5 mistakes. Between curating sites for the HTML5 gallery and answering readers’ questions here at HTML5 Doctor, I see a host of HTML5 sites and their underlying markup. In this post, I’ll show you some of the mistakes and poor markup practices I often see and explain how to avoid them. Don’t use section as a wrapper for styling One of the most common problems I see in people’s markup is the arbitrary replacement of <div>s with HTML5 sectioning elements — specifically, replacing wrapper <div>s (used for styling) with <section>s.

In XHTML or HTML4, I would see something like this: <! Now, I’m instead seeing this: <! Frankly, that’s just wrong: <section> is not a wrapper. With that in mind, here’s the correct way to mark up the above example using HTML5 and a couple of ARIA roles. <body> <header> <h1>My super duper page</h1> <! If you’re not quite sure which element to use, then I suggest you refer to our HTML5 sectioning content element flowchart to guide you along your way.

Ah, <figure>. <! Summary. Best Practice: Get your HEAD in order - EricLaw's IEInternals. Career - Best approach to learning web programming - Programmers - Stack Exchange. HTML5 Rocks - A resource for open web HTML5 developers. Web Intents: A fresh look - Tales of a Developer Advocate. We have a huge problem on the web today. If I built an image gallery application and I wanted to let users edit an image so that they can remove red-eye from a photo I either have to build an application that edits the images, or integrate with a 3rd party solution.

Doing this is hard and stops you from building an awesome image gallery; and what happens if the user has a favorite service that they already use to remove red-eye? Simple, you have a frustrated user. We have a solution! In December 2010 I announced a project called Web Intents whose goal was to allow developers to build applications and services that could work with each other, but not need to explicitly know about each other – the concept has heavily inspired by the Intent system in Android, although the API bore no resemblance.

It would allow you to build applications using just the functionality your cared about, and then delegate the other functionality to the users preferred choice of service. So what changed? Coding Better Object-Oriented JavaScript with Closure Compiler. Intro While many programmers do think that Object Oriented JavaScript is a good approach to take, it’s also known that it’s hard to write robust OO-style JavaScript simply due the nature of the language itself and the environment which it’s running in (mostly are browsers). Using Google Closure Compiler can not only help you to compress the the code, but it also compiles it just like any compiler does. When the compiler’s flag ADVANCED_OPTIMIZATIONS is enabled, you can get a lot more optimization than most JavaScript compressors such as YUI Compressor, Dojo Compressor.

This article will talk about several common OO-style patterns and how they are implemented now or how they should be implemented. In the end, you shall see how you can write formal OO-Style code and keep the performance boosted with the help of Closure Compiler. Have fun! OO-style JavaScript is considered expensive In traditional object-oriented languages, classes and inheritance come for free.

JavaScript simply has no Class. Flexie. Clean Up Your Mess - A Guide to Visual Design for Everybody. TV - CakePHP Blog Tutorial Part 1 - Installation produced by andrewperk. W3Fools – A W3Schools Intervention. Building Dynamic Websites / OpenCourseWare.