Posts

Showing posts from September, 2012

Web Viewport Size

Image
if you ever had to deal with the full size of an HTML document, I know that feeling bro! The Most Difficult Thing To Get Right Ever! I mean, even google maps had some problem with that, preferring a user agent sniffing like technique rather than finding the real size of the window. This image is directly from latest Maximiliano Firtman post , a post you should read regardless this single topic! The Useless window.screen The object you might decide to check for is completely pointless for this purpose ... and the reason is simple: screen does not give any meaningful number to the Web field. The size of the screen in pixel means nothing when the viewport meta tag is set to scale 1, as example. The size means nothing in any case since it's about the full size of the screen and not the current DOM, viewport, window, size. The availWidth/Height property isn't that trustable neither, URL bar on the top or on the bottom, or both, could be in place ... how you gonna deal with t...

wannaqu.it - one button web app to track activities

This is a truly simple web application I am still improving but I believe it's ready to be tested for all of you :) wannaqu.it The purpose of this app is to track an activity. First of all, if you want to take full advantage and be able to use this app offline, pin it into your Home and you'll be free by network problems forever. That's correct, there is nothing, absolutely nothing stored online ... it's your data, it's you tracking it ... no magic behind and 100% anonymous. How Does It Work As easy as that: you press the button once when you do something. By default, something is smoking , but it could be drinking or really, anything else you can imagine. How To Read Data The graph will look weird at the very beginning ... well, you have to feed your own data in a meaningful way so it takes a while ... The graph is based on absolute time, rather than relative, and it keeps changing over the week, hours, month. The goal of your activity is to reduce it to zero so ....

A Meaningful Client Side Alternative To node require()

TL;DR Here you have the solution to all your problems ... no? So take a break, and read through :) Current Status Using a generic " module loader " for JavaScript files is becoming a common technique, and full of wins, not only on the node.js server side. There are different client side alternatives , not entirely based over the module concept, and apparently only one concrete proposal, called AMD , able to work in both server and client following a build/parsing procedure. However, as somebody pointed out already ... AMD is Not the Answer This post does not even tell everything bad about AMD problems, and I am getting there, but it's surely a good starting point. Tobie article is another resource that inspired somehow what I am going to propose here, so before discriminating this or that technique, I hope you'll find time to understand the whole problem ... found it? Let's go on then :) The Beauty Of node.js require Function I don't think I should even s...