web aggregator
Si avvicina l'arrivo del WiMax, promessa di banda larga wireless realizzata ovunque in Europa fuorché in Italia. Il 19 maggio c'è stata infatti la delibera dell'Autorità Garante delle Comunicazioni (Agcom), con la quale sono state fissate le regole per l'asta WiMax (in estate). Si chiarisce inoltre il quadro delle frequenze disponibili, in Italia, per gli operatori che vogliono offrire WiMax (il range è 3,4-3,6 GHz, come da indicazioni europee).
È partita insomma la volata finale nella corsa che porterà i servizi WiMax al pubblico (nel 2008, se la tabella di marcia non avrà altri intoppi). Il rischio di inciampare a un passo dal traguardo c'è ed è ancora forte; soprattutto, ci sono dubbi sia sulla qualità finale del servizio, in Italia, sia sugli spazi di mercato che potrà avere questa tecnologia, visto che arriverà in forte ritardo da noi.
Per cominciare, ha suscitato le proteste di alcuni piccoli provider (ma l'applauso da parte del produttore Alvarion) il regolamento d'asta di Agcom. È stato deciso che le licenze saranno tre, per ciascuna area in cui il Ministero delle Comunicazioni dividerà l'Italia per il bando. Due lotti di licenze saranno relativi a macro-aree (da due a quattro regioni accorpate) e quindi saranno facile preda dei grandi operatori (dotati di un maggiore budget, adatto a offerte su un vasto territorio). Per i "nuovi entranti", però, come li definisce Agcom nella delibera, ha riservato il terzo lotto. Primo, perché sarà su aree regionali. Secondo, perché sono escluse dalle offerte per la terza licenza gli operatori già dotati di frequenze per servizi di banda larga wireless. Il che taglia fuori Telecom, Wind, Vodafone e 3, ma non Fastweb e BT, che pure sono grandi operatori; ma forse ulteriori dettagli della delibera, che saranno pubblicati a breve sul sito, chiariranno come il terzo lotto sia riservato davvero ai piccoli operatori. Si spera di coinvolgerli nelle aste WiMax, perché è da loro che potrebbe venire il maggiore impeto di rinnovamento nel panorama banda larga italiano e il maggiore impegno nelle aree del digital divide.
Agcom, del resto, è consapevole di un rischio: che i grandi operatori acquistino le licenze WiMax e poi non le utilizzino per servizi al pubblico; e che agiscano così solo per bloccare il mercato ed eliminare una potenziale tecnologia concorrente all'Adsl o all'Umts. Ecco perché Agcom ha fissato, nella delibera, l'obbligo per i licenziatari a coprire almeno il 30 per cento del territorio assegnato e a offrire il servizio entro 30 mesi. Pena, la revoca della licenza. Resta da vedere se sarà sufficiente a scoraggiare eventuali mire protezionistiche.
Il problema più grave viene in realtà da un altro fronte: le frequenze. Ogni licenza avrà 21 + 21 GHz (cioè 42 GHz divisi con tecnica Fdd, Frequency division duplex), che sono una buona quantità per sfruttare al massimo le capacità di banda del WiMax. Peccato che da noi circa metà di queste frequenze (come riconosciuto dal Ministero delle Comunicazioni) è sporco, cioè soggetto almeno in parte alle interferenze dei radar del Ministero della Difesa. Il passaggio delle frequenze dalla Difesa alle Comunicazioni, quindi, non è stato ancora ultimato ed è improbabile, ormai, che lo sia per il giorno dell'asta. Il tutto minaccia la qualità del WiMax, nelle regioni dove le frequenze sono sporche (Lazio e Lombardia, tra le altre). Interferenze significano infatti cattivo segnale, debole connessione; la speranza, però, è che il problema sia minimizzato dai software integrati negli apparati wireless. Le nuove versioni hanno rimedi ("workaround") sempre più sofisticati per tenere in piedi la connessione anche in presenza di canali sporchi da interferenze.
Sono settimane di rinnovo listini per i provider, che così cercano di riprendere il filo della concorrenza con i grandi operatori. Vira, Ngi e Woow hanno varato sconti, cambiato le velocità di picco. Stanno cercando di tornare aggressivi, dopo che il passaggio di massa dell'Adsl base verso i 2 Megabit aveva scombussolato lo scenario rendendo più difficile per gli operatori minori differenziarsi.
Vira ha eliminato i tagli a 640 Kbps e ha varato offerte fino a 12 Mbps (per le aziende). Tutte le precedenti sono state eliminate e ora le nuove sono divise in profili Light e Fast. Si distingue Adsl Fast 2 grazie ai 512 Kbps in upload. Costa 40,99 euro al mese e ha 2 Megabit al secondo, con 96 Kbps garantiti. Soffre il confronto, certo, con le offerte che Wind e Libero rivolgono agli utenti coperti da rete unbundling. Ma ancora solo la metà della popolazione ne è raggiunta.
Ngi ha ridotto i prezzi e tenuto alta la banda garantita, che è il suo modo migliore con cui si distingue dai grandi operatori. Per esempio, garantisce 200 Kbps nella 2/0,256 Kbps, che costa 33,60 euro al mese. Quasi il doppio rispetto ad Alice Flat, che ha pari velocità di picco ma nessuna banda garantita. I piccoli, inoltre, di solito si distinguono anche grazie a un call center di qualità, dotato di addetti molto esperti.
Wooow ha invece una strategia opposta: non teme la guerra dei prezzi. Forte dell'appartenere a uno dei principali gruppi telefonici italiani (Eutelia), ha scontato e rivisto le offerte dual play (Adsl + VoIP). Ora ci sono due profili, Libera Tutti no Limits e Libera Tutti Formula Zero. Entrambe a 2/0,256, ma la prima costa 27,80 euro al mese e la seconda 20,80. 29 euro di attivazione. La differenza è che nella prima ci sono illimitate chiamate gratuite a numeri fissi nazionali. Nella seconda si paga lo scatto alla risposta (15 cent), dopo il quale il resto della chiamata è gratis. Incluso nel canone, il comodato d'uso del router.
La concorrenza potrebbe diventare più varia e sfornare offerte più interessanti per gli utenti, nei prossimi mesi: il 22 febbraio è prevista la delibera Agcom (Autorità Garante delle Comunicazioni) con la quale sarà obbligata Teleco a rivedere i prezzi all'ingrosso dell'Adsl. Sarà fatto in accordo con quelle che Agcom individuerà come le best practice europee.
Categorie: Samsung, Vodafone, Curiosità
Categoria: Curiosità

The social networking scene changes constantly. In this article, Linda points to a few sites that have altered their formats – are the changes good or bad? Only you can decide...

Bring your images to another level with the HTML5 Image Enhancer. Create real-time animation effects, reflections, gradients, image filters and transition with only few clicks and without any Flash! Add customizable borders with rounded corners and gradient colors, shadows, and even switch filters on mouse over.
You don't have an HTML5 compatible browser like Internet Explorer? - don't worry we have made a special fall back method, that will use Flash on browsers that do not support the HTML5 Canvas element to achieve the same fantastic results!
The new Kindle has a lot going for it. It’s inexpensive compared to a full-featured tablet computer like the iPad; you can slip it in your back pocket, where it’s more comfortable than an old-style paperback; and it includes a Webkit browser. This last point is where folks like us start to give a hoot, whether we’re fans of epub reading or not.
The flavor of Kindle’s browser concerns us because it affords us the ability to optimize the mobile viewing experience with a single line of markup. You can see this in action in the photo at the head of this article (published and discussed on Flickr).
I made no tweaks for Kindle per se; the Kindle is simply responding to a line of markup I’ve been putting into my web pages since 2007—namely, the viewport meta element, which controls the width of the viewport, thus enabling mobile devices with a limited number of pixels to focus all available pixels on your site’s core content (instead of, for instance, wasting part of the small screen on a background color, image, or gradient). The technique is as simple as web design gets:
meta name="viewport" content="width=770"
(Obviously, the value of “width” should be adjusted to match your site’s layout.)
I learned this little trick from Craig Hockenberry’s Put Your Content in My Pocket (A List Apart, August 28, 2007), which I naturally recommend to any designer who hasn’t seen it.
Legendary art director Roger Black guests on tomorrow’s episode of The Big Web Show, co-hosted by Dan Benjamin and taped in front of a live internet audience.
Roger co-founded the following new companies: Webtype, creators of high-end fonts for online typography; Treesaver, a platform that uses CSS, HTML, JavaScript, and the principles of responsive design to publish beautifully formatted content on any device with a web browser; Ready-Media, which designs templates for newspaper and magazine publishers (and attracts controversy); and Nomad Editions, a series of digital weeklies designed directly for mobile devices.
Roger is also a founding partner in Danilo Black, an international design agency he co-founded with Eduardo Danilo, and The Font Bureau, a leading type foundry he co-founded with David Berlow.
“He pioneered the use of computers in design, cut the best deals, and made himself synonymous with the modern magazine,” wrote Michael Wolff in a New York Magazine profile of Roger back in the 1990s, when Roger was the best-known magazine art director in the world. (Among many others, he designed Rolling Stone, The New York Times Magazine, Newsweek, The New Republic, Fast Company, Advertising Age, and Esquire.)
He also co-founded Interactive Bureau, one of the biggest and most successful web design agencies of the dot-com era.
In his free time, Roger putters around in his award-winning West Texas vacation home made of recycled shipping containers.
Roger Black is an astoundingly prolific creative force; we hope you can join us for this Episode of the show.
The Big Web Show (“Everything Web That Matters”) is taped live in front of an internet audience every Thursday at 1:00 PM ET on live.5by5.tv. Edited episodes can be watched afterwards, often within hours of taping, via iTunes (audio feed | video feed) and the web.
Photo of Roger Black at Happy Cog by Jeffrey Zeldman.
From Francisco Inchauste, on the topic of UI that imitates realism:
It is so easy to love a certain effect and want to use that everywhere. Not all projects need to have the selections sitting on a perfectly lit wooden bookshelf. On one hand we want to be creative and make something that is appealing and can sell the product. On the other side we have to question the cost of that approach on the experience itself and balance style and function with purpose.
Spotted this link to an intriguing ATM prototype experiment by BBVA in the comments on Khoi Vihn’s post on ATM design
ATMs were first introduced over 40 years ago and since then many features have been incrementally added to the machines, in order to fulfill the dream of a truly “automated teller”. Modern ATMs offer a wide range of banking transactions; nevertheless the actual interaction has remained largely untouched.
- Google makes an art form out of holidays by changing their logo to suit the mood. Almost one-upping their Pac-Man anniversary logo, they have created a Buckyball in full animation using only DHTML and, more specifically, HTML 5. Google's doodles are always a hit, and the Pac-Man Doodle was certain...
- Even at this likely early stage of your Web development career, chances are you're already attempting to sketch out the features of a long-desired custom application. An e-commerce store perhaps? An online community forum devoted to stamp collecting? Or maybe something a tad less interesting but non...
Con l’introduzione di Ping, sorta di funzionalità da “social network” integrata in iTunes, presentata ieri da Apple, l’azienda di Steve Jobs punta decisamente sull’aumento del consumo di musica. Seguito magari a ruota, grazie ai nuovi accordi commerciali con alcuni network statunitensi, dal consumo di video, di film e serie tv.
Il senso di Ping è quello che, d’ora in poi, potremo commentare e “votare” le canzoni dei nostri amici e far votare le nostre, scambiarci commenti (il Post ne riassume funzionamento e le possibilità). Il tutto con un’assunto molto semplice: gli scienziati sociali hanno scoperto che il consumo di media aumenta se è condiviso con altri. Cioè se è in qualche modo “socializzato”. Così sull’iTunes Store si potranno comprare, sperano probabilmente in Apple, più canzoni di quanto non si faccia finora (come ci ricorda Craig Hockenberry, anche se attualmente sono “hot” le applicazioni per iPhone, è bene notare che le Apps disponibili sono 225.000, mentre le canzoni su iTunes sono oltre 13.000.000… un mercato molto, molto più esteso, già interamente a disposizione di Apple).
Socialità sovrana e consumo di contenuti
I fantomatici “contenuti”, quelli che avrebbero dovuto essere “sovrani” nell’epoca di internet (o almeno così pronosticava Bill Gates in un articolo ormai introvabile del 1996: “Content is king”) sono stati finora assai meno profittevoli del previsto. Certamente molto meno di quanto internet non sia stata profittevole per i fornitori di connettività. Complici tanti fattori: dal peer to peer, a schemi di business poco attraenti, fino ad una gestione dei DRM a dir poco miope (anche da parte di Apple stessa). Se la gente online cerca soprattutto relazioni, non c‘è dubbio che però i contenuti condivisi possono essere al centro di una nuova rete relazionale. Ecco la scommessa al centro dei produttori di contenuti nell’epoca dei social network. Ne avevamo già parlato in gennaio. La mossa di Apple ora non fa altro che confermare che questa rientra nelle strategie persuasive di molti player.
Il modello di business di iPod è a rischio?
Ma significa anche che il modello di business di iPod ha bisogno di una rinfrescata: i concorrenti non mancano, a partire dalle radio online e dai servizi di Music Discovering. Che, con dispositivi portatili “always on”, potrebbero anche ridurre la necessità di “possedere” musica sul proprio dispositivo. Cosa che “metterebbe a dura prova”: http://stevekrampf.squarespace.com/blog/2010/4/26/apple-is-now-outflanked-on-their-itunes-business-model-for-m.html il modello di iPod/iTunes. In pratica, sono proprio le possibilità di connessione (in particolare 3G: non parliamo dunque tanto dell’Italia, ma negli Usa è un tema di una qualche attualità) di iPod e iPhone che rischiano di mettere in pericolo il modello di business di iPod. Riuscirà la “socializzazione” della musica a ridurre questo rischio?
Da noi, nel frattempo, stiamo ancora attendendo di veder sospesa quell’obbrobrio di Legge Pisanu che impedisce di fatto il wi-fi pubblico…
Una delle feature più controverse emerse durante la scorsa estate (tarda primavera, in realtà…) è il Reader incluso in Safari 5.
Nelle pagine di destinazione abbastanza lunghe, fa comparire un tastone “reader” nella casella degli indirizzi. Premendolo, il contenuto dell’articolo viene estratto e presentato in una modalità “ad alta leggibilità” su uno sfondo smorzato che ricorda in tutto e per tutto le gallerie lightbox.
Sono applicate diverse migliorie per l’usabilità:
- Colonna unica di testo sufficientemente grande e ridimensionabile
- 85 caratteri circa per linea
- Margini ai lati del testo
- Attenuazione della luminosità dello sfondo per ridurre l’affaticamento
Il testo così ottenuto è stampabile con il nuovo layout.
Per i più intraprendenti il CSS del Reader è modificabile, andando nel package di Safari (nelle Applicazioni) e con il tasto destro scegliendo “Mostra contenuto pacchetto”, aprendo la cartella “Contents/Resources” e il file Reader.html.
La funzionalità è basata su uno strumento open source, Readability un bookmarklet che può essere installato su vari browser e personalizzato.
Piccoli problemi
Ci sono anche alcuni aspetti che non funzionano bene. In particolare, il tentativo che fa il Reader di capire se un articolo è diviso in più pagine (espediente scomodo ma che alcuni siti adottano per aumentare il numero di pagine viste, solitamente collegato ad un modello di business basato sulla pubblicità). Se il reader ritiene che l’articolo sia diviso in più pagine, carica il contenuto di tutte le pagine nella colonna del reader stesso, rendendo lettura e stampa più agevoli. Purtroppo alcune pagine vengono erroneamente considerate parte dello stesso articolo anche se non lo sono. Accade con gli articoli correlati in fondo alla pagina su molti siti. Questo, per esempio (non in tutte le pagine), ma anche in siti come il New York Times!
Il meccanismo è insomma decisamente da migliorare.
E’ giusto prendere il controllo del design della pagina?
Sebbene il Reader sia una miglioria per la lettura di testi lunghi, ha scatenato polemiche circa la potenziale distruttività per i modelli di business legati alla pubblicità. Eliminando il design del sito e gli elementi di contorno, di fatto funziona come ad-blocker. Con una differenza: gli ad-blocker normali evitano il caricamento dei banner, mentre il Reader viene attivato a posteriori, quando la pagina è già caricata, e solo su iniziativa dell’utente. La scelta vale per la singola pagina, e deve essere eventualmente ripetuta su tutte le pagine.
Personalmente ritengo che i browser facciano troppo poco per migliorare l’esperienza utente. Da tempo sostengo che dovrebbero anche fornire strumenti di controllo del contrasto e dei colori per accomodare problemi di accessibilità. Questo è un piccolo passo nella direzione giusta, ma è vero che anche le perplessità sono in qualche modo fondate.
E’ giusto “spogliare” i contenuti del design fornito dall’autore? In realtà è quanto già avviene con i feed RSS (dove tuttavia la pubblicità può anche essere inserita). Ogni redistribuzione del contenuto lo spoglia del contesto. La differenza è che per la prima volta questo avviene – se il lettore lo vuole – anche nel sito originale.
Davvero, dunque, questo strumento è un modo per ridurre le già scarse revenue pubblicitarie del web “in chiaro”, e incoraggiare così sempre più autori ed editori ad adottare i modelli chiusi, basati su Apps, che Apple spinge per i suoi dispositivi mobili? Tutto può essere. Ma al momento è difficile credere che questo Reader avrà un qualche impatto per la maggior parte dei siti. Ma può essere un altro tassello di una tendenza ad un uso più personalizzato del web, aumentandone la frammentazione e la variabilità di resa che fin dagli esordi accompagna questo ambiente.
Per il momento attendiamo miglioramenti al Reader e magari qualche proposta alternativa, anche in tema di accessibilità, che renda le personalizzazioni più facili e convenienti. Fra qualche mese potremo capire di più sulla reale adozione di strumenti del genere: rimarranno opzioni di nicchia per geek o diventeranno uno strumento nelle mani dell’utente medio? C‘è il rischio che la diatriba venga superata da altre, più importanti novità. Ma è pur sempre un’evoluzione da tenere d’occhio.
Introduction
In our company, code reviews play an integral part in the development process for making quality software. We opt for a mentor style approach with Wufoo, where a developer works on a segment for a period of time and then passes it up to a more experienced developer for review. We really like this approach because it means more developers become familiar with the foundation of different code level services. More importantly, they act as an additional safeguard against security holes, memory leaks, poor queries and heavy file structures. Unfortunately, these reviews are also very time consuming and in a small team can sometimes be an inconvenience to the reviewer — another developer with their own todo list to accomplish.
Given that all reviews check against the same list of requirements, we’ve found ourselves repeating the same tasks over and over again. We spend a lot of time echoing queries, memory stats and objects to the browser just to see how they are being used in the code. To reduce this repetition, we invested some time creating something we’ve called the PHP Quick Profiler—we call it PQP for short. It’s a small tool (think Firebug for PHP) to provide profiling and debugging related information to developers without needing them to add a lot of programmatic overhead to their code. Now, we only need to toggle one config setting to true and our reviewers have access to an automated tool to help create a faster and more consistent review experience. Since anyone can use it, PQP also gives the initial developer an idea of where their code stands before the review.
We’ve been using PQP for a while now with Wufoo. It’s been so useful that we decided to take some time to package everything, write out some documentation and offer it up for anyone to use.
See it in Action
We’ve created an online example showing a landing page with PQP turned on. The profiler contains a 5 tabbed interface that presents pages for logging messages, measuring execution time, analyzing queries, revealing memory used and showing the files included.
Thanks to Kevin’s help, who did a great job of designing and encapsulating the interface, there’s no need here to add links to external CSS files or Scripts to make it show up right. When included on a page in PHP, PQP automatically inserts the markup, CSS and JavaScript needed to make the interface show up and just work. PQP should work with Internet Explorer 6 and up, Firefox and Safari.
Getting Started
We’ve provided a zip file which contains the entire setup for PQP and some basic instructions for installation.
Download: pqp.zip
Once you’ve downloaded the zip, upload the contents to a PHP enabled web server. Navigating to the root directory in your browser will show the same online example we linked to above. At this point, each tab should work except for the database tab, which requires some additional configuration.
Once you get the example working, the next step would be integration with your own project. It’s important to note that dropping the folder into your own project directory will not work. This is because 5 different aspects of the code are being looked at, and you may handle those situations differently than we do. That said, integration is pretty straightforward, and by following the guidelines for each section below, you should be up and running in no time.
Using It In Your Code
The easiest way to make PQP work in your own code is to include PhpQuickProfiler.php into the page you want to see it on. That alone will enable the console, memory and file logging. Speed and database logging take a bit more work, which we’ll cover later. Now, enabling the default logging is great, but nothing will display to the screen by just including the file. To display to the screen, a bit more knowledge on what’s happening is required.
As code is being executed, details are being logged and analyzed in PQP. Once the code is finished, PQP finishes up also, and displays the output to the screen. The tricky part is knowing when the code is finished, since in an ideal world this tool would work with as little developer input as possible. In this example, we determine that the code has finished by looking at when the parent object runs its destructor. So a timeline would be:
- Landing Page constructor declares an instance of
PhpQuickProfiler. - Landing Page executes all needed code.
- Landing Page destructor tells the
PhpQuickProfilerto cleanup and display output.
Of course, this setup would cause PQP to always display, which isn’t ideal for production. To make it more useful, we created a Config flag in our code (debugMode = true) that checks to make sure it is set to true before displaying. Below is a sample class that can perform the steps we just covered:
class ExampleLandingPage {
private $profiler;
private $db;
public function __construct() {
$this->profiler = new PhpQuickProfiler(PhpQuickProfiler::getMicroTime());
}
public function __destruct() {
if($debugMode == true) $this->profiler->display($this->db);
}
}
Logging to the Console
Given the code shell above, PQP is configured and ready to be used. We can start referencing the helper functions, starting with logging. The console log is just a step above an echo statement in that it condenses and formats the output using print_r. This is useful for reviewers because it provides a way to view debugging information without blowing up the layout of the page. To output data to the console, just statically call the function:
Console::log($data);
The static function call accepts any data type and is available as long as the PhpQuickProfiler.php class is included. We chose to implement this with a static call so that the class does not have to be instantiated before use. The downside to a static call is that we store the log history in a global php variable. Should you wish to avoid globals, the Console.php class could always hold the log as a member variable given that it is instantiated. But as is, the class just acts as a read and write wrapper around a global PHP variable.
On top of logging variables, the console also has four additional functions.
Console::logError($exception);
Console::logMemory();
Console::logMemory($variable, $name);
Console::logSpeed();
Let’s start with logError(). Logging an error is useful for displaying information related to a PHP exception. In our code, we’ll use a catch block for handling errors so we can silence an exception. We do this because we want that error to be ignored and not affect what the user is doing. An example of this would be logging data that isn’t crucial. If that log fails, the users shouldn’t have to stop what they’re doing. Now, in development, it’s still nice to know those exceptions were thrown, so in the catch block a call to logError() can be made to display the information to the console like so:
try {
// Execute non critical code
}
catch(Exception $e) {
Console::logError($e, 'Unable to execute non critical code');
}
Additionally, the console can provide even more value by using some of the helper functions that PHP natively provides. For example, logging debug_backtrace() will print related information about the script at a given point in time. PHP also provides us with magic constants like __LINE__, __FILE__, __FUNCTION__, __METHOD__ and __CLASS__, which allows for printing of script data. Take a look at the screenshot below to see some example usage of this:
Watching Memory Usage
Object oriented PHP is a beautiful thing to behold, but there are definitely a few concerns to keep in mind when it comes to memory usage. These concerns tend to rear their heads when dealing with recursive output (i.e.: exporting to Excel), if there’s a leak in the creation of the objects or if objects aren’t being destroyed properly. All of this can lead to unexpected resource usage and fatal errors that serve to aggravate the end user.
The debugger aids with memory management by displaying the maximum amount of memory used by the script. A simple call to the built in memory_get_peak_usage() is where the data originates. The system setting for memory allowed (through ini_get()) is also shown to see how much wiggle room there is. If an overview isn’t enough, you can drill down into your resource usage with a point in time memory call.
Console::logMemory();
Console::logMemory($variable, $name);
Calling logMemory() in your code without any parameters will output the current amount of memory that PHP is using when the function is called. This is perfect for watching a loop in your script to see if memory is building up during each iteration. Likewise, a variable and a name can be passed in to the function. Doing so will output the memory used by the variable to the console. Knowing that a script is hogging memory is wonderful, and knowing which variable is doing the hogging allows the problem to be fixed. Take a look at the screenshot below to see an example of string concatenation that is slowly eating up memory.
Runaway Includes
Similar to memory getting out of control, included files (especially on large complex projects) can multiply and take over your app before very quickly. Even worse, too many includes don’t throw the hard errors that memory usage does. Instead, the page just slows down and resources get eaten up on every request served. Avoiding this pitfall is pretty easy—just make sure the same file isn’t included multiple times, and catch any excessive includes of unnecessary files.
The PQP files tab shows the total files included with a count call on get_included_files and their total sizes are summed up. The names and sizes of the individual files are output to the console for easy scanning as well. The largest file included is noted on the left, which clearly points out if a large library is being used when it shouldn’t be. For example, on Wufoo we found out that we had a script always including htmLawed, a fairly decent sized file, when it wasn’t needed.
Also, keep in mind, autoloading classes or using require_once will usually alleviate any problems with file includes. That said, it never hurts to be aware of the situation, especially when using plugins, old code, or borrowed code.
Page Execution Time
Emphasis is always placed on database optimization when it comes to performance considerations (rightfully so), but that doesn’t mean PHP execution time should be ignored completely. The standard method for calculating load time is to find the difference between the time when the script starts and then again when the script finishes. This is where the integration of the debugger into your own project becomes tricky. Since the debugger is called on the destruction of the parent page, we know when the script is ending. But since every project is different, the start time can vary. The example code that you can download sets the start time in the construction of the parent object with a call to PQP’s getMicroTime(). This will work in most cases, but if you have a lot of code going on before the parent is constructed, be sure to specifically set the start time when needed.
$this->profiler = new PhpQuickProfiler(PhpQuickProfiler::getMicroTime());
Given the page execution time, the next step would be to find meaning in the information. A quick glance will show if the time falls into an acceptable range. Assuming it doesn’t, how would we go about debugging the problem? Using the query section of the debugger, we can rule out query execution time (explained more in the next section). If queries aren’t the problem, then some portion of the script is. We can find this with the console.
Console::logSpeed();
A call to logSpeed() will tell us how long the script has taken up until that point in time. For example, imagine we have an object factory that constructs complex objects from a database. We also have an object engine that returns the object names from a database. When displaying 100 objects names to the screen, we would use either the factory or the engine. But using the engine would be much faster because we only need the names, and do not need the logic processing of object creation. If the developer did use the factory, logSpeed() would reveal the slowdown in the display loop, which ultimately identifies the problem.
On a similar note, we recently discovered that xCache improves our page execution time by over 60%. This was compared against other benchmarks by having all of our developers run quick tests against the code they were responsible for using PQP.
A Glance at Database Activity
Getting the debugger to report database information is the hardest part of integration with your own project. This step will only work if your database interaction is abstracted in some way. We talked about a simple database class awhile back, and have also released an example with the zip download (MySqlDatabase.php — you can follow the code in there to see a full implementation). The reason a class is so important is because information about each query must be stored as it happens, and a class allows the queries to each go through the same analysis without additional work by the programmer.
As a query is called, the database wrapper class stores the query and logs the time. The simplified code looks like this:
function query($sql) {
$start = $this->getTime();
$rs = mysql_query($sql, $this->conn);
$this->logQuery($sql, $start);
return $rs;
}
function logQuery($sql, $start) {
$query = array(
'sql' => $sql,
'time' => ($this->getTime() - $start)*1000
);
array_push($this->queries, $query);
}
Using that concept, the class will have an array of all query information available to it. Then, the debugger can take that array and print out the information. The information that is currently stored is the query itself, and the time to execute. The time to execute is not exact — it is the microtime until PHP has a handle on the recordset, which will be slower than the query time if there is network latency with the database server. Viewing the queries at a glance is an easy and helpful way to look for queries that would affect more records than intended, that are being duplicated or those that open themselves up to SQL injection.
One of the most useful database features added to the debugger is the ability to EXPLAIN each query run. Each query is run again using the explain statement, and the results are presented below the query. This makes it easy to identify which queries are using their indexes properly.
Wrapping Up
The end goal of this debugging tool is to present a summary of useful information in an automated format. Usually, finding out about certain aspects of the code would require manual work and thought. And then if a problem is encountered, the debugger will hopefully make narrowing down the problem easier through the use of the extended Console functions. With that in mind, this tool is just an aid and is in no way meant to replace the standard, thorough procedures available to developers. The slow query log, PHP error log and full fledged debuggers and profilers are encouraged on top of this high level view to supplement the tools available to developers.
Several months ago, Infinity Box, our company, and thus Wufoo were listed in a publication targeted at investors, angels and venture capital firms as a promising young startup. We have, unfortunately, not been able to track down the source of this recommendation (investors seem odd about keeping their sources mysterious), but what followed for us has been a series of emails and phone calls over the last few months that have come from associates of various VC firms.
Now, our funding situation is that we took some initial seed money ($18,000) from Y Combinator and then followed that up with a small angel round ($100,000) to get us to launch. That’s all the money we’ve taken and that was all done within the first 4 months of 2006. Since then, we’ve been blessed to have Wufoo do very well out there and we’ve been able to grow our team, product, user base and profits solely off of the service’s revenues. We did not take VC money because 1) we like control and shares and 2) we just weren’t interested in getting big fast, which meant VC money seemed like overkill to us in regards to our plans for growth. So when these calls started coming in, our stance was (and still is) that we’re not interested in seeking additional funding, but we’d be happy to talk because, well, you never know.
Of course, before every one of these phone calls, we would look up the firm’s web site, we would read their history, we would look at their portfolio, we would look up the associate that we’re going to talk to (there’s always a photo and there’s always a bio) and we would even look up some of the companies their firm had invested in. If the associate we’re going to talk to had a Facebook, Twitter or Linkedin page, we would look at that too. We think of it as basic research and it’s just how we do things. It’s how we write the articles on this blog and it’s how we make all of the decisions in our company. We’re like boy scouts. We like being prepared.
Additionally, we think it’s a basic form of courtesy to show someone else a level of concerted interest, if they’re showing interest in us. This way, hopefully, time would not be wasted on posturing and excessive introductions. Unfortunately, it’s become very clear to us after every one of these exchanges (there are no exceptions I’m afraid) that these investors and associates do not do the same. All of the associates we talk to seem to have three goals in mind when they contact us:
To put us into a database of companies their firm is aggregating. From what we understand, most VC firms send out an army of these associates to just gather basic research on companies, but for some reason, their flavor of choice for data collection is via a phone call rather than actually using the Internet to scrape most of the mundane stuff that they’re asking us. We’ve actually had conversations where we can hear them typing into a spreadsheet in the background as we talked to them.
To regurgitate the firm’s history and mission statement from their web site. We noticed this early on and that’s why we started going over them ahead of time so we could skip it, but apparently this information must always be passed on orally to a potential company regardless of whether the company is able to finish their sentences.
To let us know that they were different, that they give more than just money and that we should keep them in mind when we do decide to take on more funding. Needless to say, we find it very odd (if not funny) to hear every firm state how different they were in exactly the same way as everyone else.
Obviously, we are not against gathering research. We are not against unsolicited introductions. And we actually think the intention of the act—to start an earnest conversation or relationship with a company that appears promising is a great idea. We’d love that. But the execution of these exchanges completely baffle us. Every associate asks us the same surface questions that can easily be answered by reading a few short pages on our web site (specifically our FAQ and our About pages—they are definitely not hard to find). In fact, we’ve actually had people call us with promises of expertise and advice that’s never even created an account with Wufoo or know how we made money (that we have a freemium software-as-a-service subscription model).
Now, we understand that the typical relationship regarding a startup and a VC firm is to have the startup pitch to the VC. It is the startup’s job if they want money to convince the VC that they are worthy of investment. We also understand that the associate that’s calling us is making like a million of these calls a day. It’s probably just a job to them. We get that. We do.
However, if it’s the VC firm that initiated an unsolicited conversation and the company indicated ahead of time that it wasn’t interested in more money, and the VC firm insisted on talking anyway…well, then it’s sort of not cool to not do your homework and effectively make the company do the pitch anyway. Then we’re doing your job. Then, when you show the company how not different you are from everyone else following what is apparently the same lead, you’ve accomplished the exact opposite of what you intended: We do not think you’re different. We are not confident in your ability to establish strong relationships with companies. And we will probably not think of you when we need funding later on.
I know. That’s really harsh stuff. In fact, I’m unfortunately notorious for being rough on venture capitalists during meetings when we were based in Silicon Valley. Which is why 1) I’m not allowed to sit across from potential investors during lunch/dinner meetings so they can’t see the reactions on my face and 2) Chris, Ryan and I rotate returning these calls to VC inquiries. And so, thankfully, it’s not just me. We all feel surprised, which means these firms are probably giving the same impression to countless other companies.
What we find surprising is how every single one of these associates miss the opportunity to be a hero—to truly make an impression. Because, honestly, it’s so bad out there, that it would probably take very little to actually impress us even a little bit. All you would have to do is indicate to us that you’ve at least read the marketing materials on our web site (the thing that you want to pump money into) and tried out our service (the thing that’s potentially going to make you more money).
At least then, you’d be in a decent position to have a conversation that has give and take—maybe even provide criticism that we might find valuable. And that would be the event that would have me write down your name. The moment someone tells me, a person that’s been thinking obsessively about how to improve my company 24/7 for the last 3 years, something insightful about my business, product or future that I haven’t thought of before would be awesome. Also, bonus points would probably be given to the investor that calls us with knowledge of any of the number of articles we’ve labored over for this blog.
Anyway, the take away from all this for venture capital firms is that we’re not really complaining. I mean, technically that’s all I’ve been doing, but I also want you to know that we are definitely honored to be in a position to have VCs that want our attention. We know that’s a rare position to be in and we don’t take it lightly. Which is why we’re actually rooting for you. For that hero associate out there to get a hold of us and maybe knock our socks off with a little insight or even just some good ol’ fashioned genuine enthusiasm. For good reasons, we don’t want our time wasted. And we really do want you to accomplish your goals, which is to be remembered. You don’t have to be our biggest fan. We don’t expect that at this point, but we do think that if you’re asking us to consider handing over a percentage of our soul (a soul that we’ve cultivated with our own blood, sweat and tears) in the hopes of capitalizing on our now apparent successful trajectory, then we’d hope that you’ll at least do us the honor of reading our words and learning our craft.
As some of our regular readers have guessed, yes it is true. Digital Web Magazine has ceased publication. For the reasons cited in Time To Change, it was clear to us that what we had was no longer working.
We called upon both our staff and readers for ideas on what we could change. We received a lot of good feedback. One thing that resonated with me was that out of all of the ideas that had the most potential to solving our current problems, none of them were about insignificant changes to what we have.
It doesn’t make sense to take what we have here and try to change it into something it is not. It makes more sense to simply start something else that is new. For this reason I feel that Digital Web Magazine will always be what it is; an online publication about the web industry.
So, today, I am sad to say that Digital Web Magazine has officially ceased publication. The site will remain in place with all of its articles hopefully far longer than their value is recognized.
I will continue to curate the site, maintaining it so it remains online and fixing broken links and typos. Most of my effort and time, just like the rest of the former staff, will be put into other projects, other websites and other publications.
I want to take a moment to personally thank each and every staff member, editor, designer, photographer, illustrator, information architect, database developer, web developer, web programmer, contributing writer, columnist and last but perhaps most important, each and every reader who ever read our publication. We couldn’t have made it this far without you. I genuinely mean that.
If you want to respond with your thanks and appreciation, feel free to leave a comment here, post to twitter, post on Facebook, or you can always email me directly. If you prefer to say something in person, find me and the rest of the staff at SXSW Interactive. Thanks again everyone! Last one out turns off the lights.
As 2009 comes to a close and we enter our annual winter hiatus I am proud to present our 500th article, Time To Change, written by yours truly. With every year that passes we look back at the year and all of the things we have accomplished and then we set goals for ourselves for the year to come. This article is not unlike that. Digital Web Magazine is about to undergo the most significant change in its ten-year history as a publication and we want your input. This is your chance to influence the future structure and focus of Digital Web. Please take a moment to read this week’s issue and weigh in with your thoughts. Thank you for a great year, and a magnificent past ten years.
Everybody wants to use CSS 3 now that even Internet Explorer will support parts of it once IE 9 is out. But since parts of CSS 3 are still subject to change, most browsers use a vendor prefix for many CSS 3 properties to signal that their implemenation is “experimental” and may change in a later version of the browser.
This means that for a property like border-radius to work cross-browser you need to specify it several times with different vendor prefixes, like this:
.box {-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;}
A couple of months ago I advised people to Be careful with non-ascii characters in URLs. We’ve been discussing that at work lately, more specifically whether characters like ":" and "/" are allowed unencoded in query strings or not.
I may well have made mistakes trying to understand the specification, so any help clarifying any errors in the following would be appreciated.
The summary of my previous post is this:
In essence this means that the only characters you can reliably use for the actual name parts of a URL are
a-z,A-Z,0-9,-,.,_, and~. Any other characters need to be Percent encoded.
But what about those query strings? After studying RFC 3986 - Uniform Resource Identifier (URI): Generic Syntax I’ve come to the following conclusions.
Posted in Web Standards.
The Yahoo! YUI is an incredibly feature-rich JavaScript library with a LOT of functionality but getting your head around all of those features can be tough. The YUI team wants to help developers get up and running more quickly and announced yesterday the release of SimpleYUI; a basic and more streamlined version of the YUI library.
SimpleYUI will contain basic DOM access and manipulation including support for CSS 3 selectors in the selector engine, animations via the new transition module, the event system, Ajax and JSON support.
The great thing is that when you're ready to leverage more advanced features like managed attributes and custom events, you still have the ability to do on-demand loading just like you'd expect from the full-featured version of YUI. This includes any YUI 2 or 3 component or YUI 3 Gallery module.
<script>
Y.use('dd-drag','yui2-datatable', 'gallery-accordion', function(Y) {
// here you can use YUI 3 Drag and drop, YUI 2 DataTable, Accordian or any other control contributed to the gallery by the community
});
</script>
YUI team member Eric Miraglia put up a nice post about SimpleYUI which shows you some of the goodness include.
Josh Duck has put together a fun and useful list of the 104 elements currently in the HTML5 working draft but organized like a periodic table of elements:
When you click on one of the tags more information appears:
Who says chemistry can't be fun?
















