Lifestream http://life.ifabio.com/feed en-us http://blogs.law.harvard.edu/tech/rss Sweetcron me@ifabio.com melablog http://life.ifabio.com/items/view/1165/melablog

2 reviews

]]>
Wed, 10 Mar 2010 05:49:37 -0800 http://life.ifabio.com/items/view/1165/melablog
Django 1.2 release schedule http://life.ifabio.com/items/view/1162/django-12-release-schedule

Those of you that have been paying attention to the Django release roadmap will have noticed that the original estimated release date for Django 1.2 final has passed, but we haven't actually made a final release. Although Django's release cycle is generally date-based, we also try to keep our release dates flexible to account for bugfixing time. At the beginning of the development sprints at PyCon a few weeks ago, over 300 tickets were still open on the Django 1.2 milestone. Now it's down to 120 (we've been clearing out, on average, about ten tickets a day), but that's still a lot more than we're comfortable shipping; as a result, we're pushing back the final 1.2 release a bit.

Some of the tickets still open for 1.2 are documentation or translation updates; these will be dealt with before the final 1.2 release. Others are minor bugs or edge cases which are difficult to trigger or unlikely to cause serious problems in actual deployment; these tickets will likely be bumped to a pure-bugfix release in the 1.2 series, or to 1.3 as warranted.

Over the next couple of days, the Django core team will be reviewing all of the currently-open tickets, and identifying those which:

reveal a significant flaw in a feature added during the 1.2 cycle, or
have the potential to cause data loss or other serious consequences in actual deployment.

Tickets which don't meet these criteria may be removed from the 1.2 milestone, or may simply be left out of the final release. We won't forget about these issues -- they'll still be in Trac, and they will be addressed -- but bugfix work prior to the 1.2 release will focus in major issues fitting the criteria above. We're sensitive to the fact that during the Django 1.2 release cycle, we haven't paid as much attention to bugs and smaller features as we have done during previous releases. To address this, we're considering making Django 1.3 a "feature light" release -- that is, we will spend more time focussing on little features and long standing bugs, rather than adding lots of big features like we have done with Django 1.2. Once 1.2 lands, we'll have some more details about our exact plans for the 1.3 cycle. Until then, we'll be posting here every few days to give you a status update, letting you know how many tickets remain, any problems we foresee, and to provide an updated estimate of the 1.2 final delivery date. So: there are 120 tickets remaining, but quite a few of these of these will be bumped from the final release. It's difficult to know exactly how much work is left before we do the final ticket cull, but our first-cut revised estimate is for an RC1 release around March 22, with a final release around March 29. This is, for those of you who were following along during the early parts of the 1.2 cycle, roughly consistent with extra time added to the release schedule for the 1.2 alpha and beta milestones. As always, any assistance preparing, reviewing or testing patches is most welcome; the more help we get, the sooner we can release. If you want to help out, check out the 1.2 todo list, find something that sounds interesting and dig in!

]]>
Tue, 09 Mar 2010 16:36:15 -0800 http://life.ifabio.com/items/view/1162/django-12-release-schedule
if your mom were a collection class, her insert method would be public http://life.ifabio.com/items/view/1161/ifabio-if-your-mom-were-a-collection-class-her-insert-method-would-be-public ]]> Tue, 09 Mar 2010 06:45:59 -0800 http://life.ifabio.com/items/view/1161/ifabio-if-your-mom-were-a-collection-class-her-insert-method-would-be-public Spectrum Visualization with the HTML5 Audio Data API http://life.ifabio.com/items/view/1163/spectrum-visualization-with-the-html5-audio-data-api

The HTML5 specification introduces the and media elements, and with them the opportunity to dramatically change the way we integrate media on the web. The current HTML5 media API provides ways to play and get limited information about audio and video, but gives no way to programatically access or create such media. We present a new extension to this API, which allows web developers to read and write raw audio data.

The above quote is from the Audio Data API extension that joins a bunch of juicy developer work in Firefox 3.7. Thomas Sturm has taken that API and created a spectrum visualization a kin to some of the great work by Scott Schiller (using Flash).

There is a new onaudiowritten attribute: PLAIN TEXT HTML:

 

<audio src="song.ogg" controls="true"

           onaudiowritten="audioWritten(event);">

</audio>

 

that lets you get access to info such as the spectrum: PLAIN TEXT [removed]

 

      function audioWritten(event) {

        spectrum = event.mozSpectrum;

       

        var specSize = spectrum.length, magnitude;

       

        // Clear the canvas before drawing spectrum

        ctx.clearRect(0,0, canvas.width, canvas.height);

       

        for ( var i = 0; i <specSize; i++ ) {

          magnitude = spectrum.item(i) * 4000; // multiply spectrum by a zoom value

         

          // Draw rectangle bars for each frequency bin

          ctx.fillRect(i * 4, canvas.height, 3, -magnitude);

        }

      }

 

Add to that the ability to write audio.... PLAIN TEXT [removed]

 

var audioOutput = new Audio();

audioOutput.mozSetup(2, 44100, 1);

 

var samples = [0.242, 0.127, 0.0, -0.058, -0.242, ...];

audioOutput.mozAudioWrite(samples.length, samples);

 

Nice work all around.

]]>
Tue, 09 Mar 2010 03:20:07 -0800 http://life.ifabio.com/items/view/1163/spectrum-visualization-with-the-html5-audio-data-api
Flash and Standards: The Cold War of the Web http://life.ifabio.com/items/view/1164/flash-and-standards-the-cold-war-of-the-web

You’ve probably heard that Apple recently released the iPad. The absence of Flash Player on the device seems to have awakened the HTML5 vs. Flash debate. Apparently, it’s the final nail in the coffin for Flash. Either that, or the HTML5 community is overhyping its still nascent markup language update. The arguments run wide, strong, and legitimate on both sides. Yet both sides might also be wrong. Designer/developer Dan Mall is equally adept at web standards and Flash; what matters, he says, isn't technology, but people.

]]>
Tue, 09 Mar 2010 01:00:34 -0800 http://life.ifabio.com/items/view/1164/flash-and-standards-the-cold-war-of-the-web
Design - Toxel.com http://life.ifabio.com/items/view/1157/design-toxelcom ]]> Mon, 08 Mar 2010 12:58:50 -0800 http://life.ifabio.com/items/view/1157/design-toxelcom FeatherCode, Free PSD to HTML CSS http://life.ifabio.com/items/view/1158/feathercode-free-psd-to-html-css ]]> Mon, 08 Mar 2010 12:56:09 -0800 http://life.ifabio.com/items/view/1158/feathercode-free-psd-to-html-css 20 Unique and Creative Logo Designs http://life.ifabio.com/items/view/1159/20-unique-and-creative-logo-designs

21 reviews

]]>
Mon, 08 Mar 2010 12:51:55 -0800 http://life.ifabio.com/items/view/1159/20-unique-and-creative-logo-designs
Black Mirror / rorriM kcalB http://life.ifabio.com/items/view/1160/black-mirror-rorrim-kcalb

203 reviews

]]>
Mon, 08 Mar 2010 12:44:29 -0800 http://life.ifabio.com/items/view/1160/black-mirror-rorrim-kcalb
Books: ActionScript 3.0: Visual QuickStart Guide http://life.ifabio.com/items/view/1156/books-actionscript-30-visual-quickstart-guide

I finished reading ActionScript 3.0: Visual QuickStart Guide. All-in-all, it wasn't bad. I needed to learn ActionScript quickly, but not extremely deeply, and it helped me do that.This is the first time I've read a visual quickstart guide. The book was only about 300 pages, and each page was cut in two columns. The inner columns have code, and the outer columns have prose. Hence, there's only about 150 pages of prose. The code tended to be very basic and very redundant. Unsurprisingly, the author was a non-software engineer who learned how to code in ActionScript. I sort of expected that. The book wasn't perfect, but I definitely recommend it if you're a software engineer who needs to learn ActionScript in a hurry.That's enough for the book review. Now, let me say a few words about ActionScript. First of all, ActionScript 3.0 is a compiled language. ActionScript started life as ECMAScript, but by the time they hit 3.0, it had morphed into a pleasant mix of JavaScript and Java. It has static types like Java, but you can do a lot of the same tricks that you can do in JavaScript, such as treat objects as hashes and use closures. Like JavaScript, ActionScript revolves around event handling. Anyway, as I said, I think ActionScript 3.0 is pleasant.Now, let me cover a few of the things that were interesting enough for me to write down while I was reading the book.ActionScript 3.0 has three types of numbers: int, uint, and Number. Numbers are floats, and match the same number type that JavaScript has.One way to think of Flash is as a programmable version of Photoshop optimized for animated gifs. That's pretty much how it started life. Over time, they added layers and timelines. These days, ActionScript is a full featured language. Early on in the book, I couldn't understand how this graphical environment and this programming language worked together. Now I understand that Adobe Flash CS 4 is basically something like a paint program with a timeline that you use to create movies. ActionScript is bolted onto the side of it so that you can control things programmatically. However, early on, the most important use of the programming language was simply to control the timeline of the movie. (I could be getting some of this wrong since I've only been coding in ActionScript for a few months.)Using the open source Flex SDK, you can compile Flash from the command line. You can even shun Adobe Flash CS 4 entirely and code everything in Vim. Although there are rather nice Flash IDEs, I felt less out of my element by sticking to Vim. See my other three posts: Linux: Installing the Flex SDK, Vim: Editing ActionScript, and Linux: Installing the Debug Version of Flash on Ubuntu.Whereas in Java you might write "FooBar fooBar = new FooBar();" in ActionScript you write "var fooBar:Foobar = Foobar();". I think I have a mild preference for ActionScript's syntax.There is a widget hierarchy in ActionScript. As you go down the hierarchy, the widgets gain more behavior such as being able to accept events or being able to contain other widgets. MovieClip is pretty far down in the hierarchy and is used for almost everything. MovieClip doesn't actually have anything to do with playing videos. It's just a widget that can handle events, contain other widgets, and live in its own timeline.In C, to cast an int, you might write "(int) n", but in ActionScript, you write "Number(n)".TextFields in ActionScript do support HTML, but its very weak. They also support CSS, but that's pretty weak too."someArray.forEach(someFunction);" works.Just like JavaScript, you can write 'if (typeof(s) == "string")'. However, to test what type of object you have, you can also write 'if (someObj is MovieClip)'.Use "for (var i:String in someObj) { trace(someObj[i]); }" to loop over the indexes of an object.Use "for each (var value in someObj) { trace(value); }" to loop over the values of an object.Use "navigateToURL" (mentioned on p. 205) to make the browser go to a new web page.The way you dynamically load data from a web site varies wildly depending on whether you're loading sound, a DisplayObject, or data. I'm pretty sure these things were built by different engineers at different times.In summary, if you're familiar with JavaScript and Java, ActionScript will seem extremely straightforward. I managed to code quite a bit before picking up a book at all.

]]>
Sat, 06 Mar 2010 23:43:00 -0800 http://life.ifabio.com/items/view/1156/books-actionscript-30-visual-quickstart-guide
25 Amazing and Fresh jQuery Plugins http://life.ifabio.com/items/view/1155/25-amazing-and-fresh-jquery-plugins

Keeping up with the new jQuery plugin releases and developments sometimes feels like a full-time job! Every other day something new and better crops up that catches the eye and you think yourself “Wow, that looks good, I could use that!“.

]]>
Fri, 05 Mar 2010 16:50:04 -0800 http://life.ifabio.com/items/view/1155/25-amazing-and-fresh-jquery-plugins
Friday fun: Let’s translate YUI3 to jQuery http://life.ifabio.com/items/view/1154/friday-fun-lets-translate-yui3-to-jquery

I just came across this wonderful Gist on gitHub: PLAIN TEXT [removed]

 

var $;

YUI().use('*', function(Y){

  $ = Y.get;

  for(var p in Y) {

      $[p] = Y[p];

  }

});

 

// test

$('body').append("boo!");

 

In case you want to use YUI3 but really really like jQuery syntax :) OK, it breaks the whole sandboxing idea of YUI3, but that's a small price to pay, right?

]]>
Fri, 05 Mar 2010 05:52:01 -0800 http://life.ifabio.com/items/view/1154/friday-fun-lets-translate-yui3-to-jquery
<a href="http://blog.ifabio.com/2010/03/03/a-20-rows-filebrowser-ftp-client-script-in-php/">http://blog.ifabio.com/2010/03/03/a-20-rows-filebrowser-ftp-client-script-in-php/</a> http://life.ifabio.com/items/view/1151/httpblogifabiocom20100303a-20-rows-filebrowser-ftp-client-script-in-php

1 reviews

]]>
Wed, 03 Mar 2010 08:59:04 -0800 http://life.ifabio.com/items/view/1151/httpblogifabiocom20100303a-20-rows-filebrowser-ftp-client-script-in-php
<a href="http://blog.ifabio.com/?p=13">http://blog.ifabio.com/?p=13</a> http://life.ifabio.com/items/view/1152/httpblogifabiocomp13

1 reviews

]]>
Wed, 03 Mar 2010 08:56:50 -0800 http://life.ifabio.com/items/view/1152/httpblogifabiocomp13
A 20 rows filebrowser-ftp client script in PHP http://life.ifabio.com/items/view/1153/a-20-rows-filebrowser-ftp-client-script-in-php

An exercise to demostrate the minimum work to create a complete PHP file browser script / ftp client.

]]>
Wed, 03 Mar 2010 08:55:48 -0800 http://life.ifabio.com/items/view/1153/a-20-rows-filebrowser-ftp-client-script-in-php
listening to "Bomb The Bass - The Infinites" ♫ <a href="http://blip.fm/~m3wy5">http://blip.fm/~m3wy5</a> http://life.ifabio.com/items/view/1150/ifabio-listening-to-quotbomb-the-bass-the-infinitesquot-httpblipfmm3wy5 ]]> Wed, 03 Mar 2010 07:57:49 -0800 http://life.ifabio.com/items/view/1150/ifabio-listening-to-quotbomb-the-bass-the-infinitesquot-httpblipfmm3wy5 Touching Cloth; Canvas Fu http://life.ifabio.com/items/view/1149/touching-cloth-canvas-fu

Andrew Hoyer shows his canvas Fu with Cloth, a great experiment using nice physics.

What makes this simulation special is the speed at which everything is computed. Javascript (the language this is written in) is not exactly the most efficient language for this type of computation. This being said, much time was spent squeezing out every little detail that slows things down. The most computationally expensive part is trying to satisfy the constraints. To do this requires the calculation of distance between two points. This is easy to do with a little math, but that often involves an expensive square root. This is something that cannot simply be thrown out either, so what do you do? You approximate it. There are lots of mathematical tools for approximating functions, in this case I chose the first couple terms of a taylor expansion.

Check out his fast vector, constraints, and finally the cloth itself.

]]>
Wed, 03 Mar 2010 03:12:29 -0800 http://life.ifabio.com/items/view/1149/touching-cloth-canvas-fu
Readability - An Arc90 Lab Experiment http://life.ifabio.com/items/view/1148/readability-an-arc90-lab-experiment ]]> Wed, 03 Mar 2010 02:28:52 -0800 http://life.ifabio.com/items/view/1148/readability-an-arc90-lab-experiment Django Advent: Improved Bash Completion http://life.ifabio.com/items/view/1146/django-advent-improved-bash-completion

Django 1.2 comes with an improved Bash completion script that enables tab completion for custom management commands and command options. The main problem with the old Bash completion script was that the completions were hardcoded. This meant that only built-in management commands (like runserver or dumpdata) could be tab completed. Developers, however, commonly extend Django through custom management commands, which made the Bash completion script inconsistent. Tab completion worked for built-in management commands, but not for custom ones. The Bash completion script in Django 1.2 changes that. Instead of a hardcoded list of completions, the Bash script was modified to call a Python function in Django. This function dynamically generates a list of possible completions based on the actual project settings. It will take into account the custom management commands from applications listed in the INSTALLED_APPS setting.

Installation To get Django's Bash completion working, you'll first have to install the bash-completion package. It's a set of functions that enhances Bash's, otherwise very basic, programmable completion. You can install the package manually (check the "Installation" section of the projects README file) or through a package manager that is available on your operating system. MacPorts and all major Linux distributions have it available in their package repositories (it is usually called "bash-completion"). Ubuntu already ships with the package pre-installed. Next up, you'll have to source the django_bash_completion file. It can be found in the extras directory of an SVN checkout. source /path/to/django_bash_completion

If you installed Django through pip or easy_install, the extras directory will not be available. In that case, you'll need to manually download the file. The script can be sourced automatically at every login by writing the command in the ~/.bash_profile file.

Usage Once installed, Bash will generate completions for the django-admin.py, django-admin and manage.py commands. To trigger the completion you'll have to press the tab key twice after the respective command. For django-admin.py, the output should look like this:

$ django-admin.py <TAB><TAB> cleanup inspectdb sqlall startapp compilemessages loaddata sqlclear startproject createcachetable makemessages sqlcustom syncdb dbshell reset sqlflush test diffsettings runfcgi sqlindexes testserver dumpdata runserver sqlinitialdata validate flush shell sqlreset help sql sqlsequencereset

The same applies to the manage.py command of a project. Note that the manage.py file must be executable for this to work. If this isn't the case, you can run chmod u+x manage.py to make it executable.

$ ./manage.py <TAB><TAB> changepassword flush shell sqlreset cleanup help sql sqlsequencereset compilemessages inspectdb sqlall startapp createcachetable loaddata sqlclear syncdb createsuperuser makemessages sqlcustom test dbshell reset sqlflush testserver diffsettings runfcgi sqlindexes validate dumpdata runserver sqlinitialdata

As you might've noticed, there's a small difference between the generated completions. The manage.py completion will take your project settings into account. In the above example, the changepassword and createsuperuser commands were added because of the installed django.contrib.auth application. Another example is the django-extensions application, which adds some useful commands to your Django project. Once you've installed it and added 'django_extensions' to your INSTALLED_APPS setting, the Bash completion will include the new commands:

$ ./manage.py <TAB><TAB> changepassword help shell_plus clean_pyc inspectdb show_urls cleanup loaddata sql compile_pyc mail_debug sqlall compilemessages makemessages sqlclear create_app passwd sqlcustom create_command print_user_for_session sqldiff create_jobs reset sqlflush createcachetable reset_db sqlindexes createsuperuser runfcgi sqlinitialdata dbshell runjob sqlreset describe_form runjobs sqlsequencereset diffsettings runprofileserver startapp dumpdata runscript sync_media_s3 dumpscript runserver syncdata export_emails runserver_plus syncdb flush set_fake_emails test generate_secret_key set_fake_passwords testserver graph_models shell validate

Something that wasn't possible with the old completion script is option completion. You can press the tab key twice after a command to view all of it's options. For the runserver command, the output should look like this:

$ ./manage.py runserver <TAB><TAB> --adminmedia= --noreload --settings= --verbosity= --help --pythonpath= --traceback

The equal sign after an option name indicates that a value must be specified. When using the option completion you'll probably notice that a space character will be added after each completed word. This can be a little annoying for options that require a value, as you'll always have to press the backspace key to set the cursor to the correct position. Sadly, there's no solution for this. A Bash completion script is initialized with an option that either outputs a space character after each completed word, or doesn't. There's no backward compatible solution to change the option after the script was sourced. Even with the option disabled, you'd have to manually enter a space character after each completed word. Bash 4.0 fixed this by introducing a new 'compopt' builtin that allows completion functions to modify completion options dynamically. But since some operating systems ship with an old Bash version (yes, I'm looking at you Apple) this feature couldn't be used.

Tip: Enable single-tab completion If you have the Readline library installed, you can tell Bash to display the list of possible completions by pressing the tab key once instead of twice. This makes the tab completion even more pleasant to use. To change it, write the following in your ~/.inputrc:

enable single tab completion

set show-all-if-ambiguous on

End I hope this article has helped you to set up and understand the Bash completion script for Django 1.2. Hopefully it'll save you some keystrokes in the future.

]]>
Wed, 03 Mar 2010 00:19:10 -0800 http://life.ifabio.com/items/view/1146/django-advent-improved-bash-completion
Microsoft to Double Down on HTML5 With Internet Explorer 9 http://life.ifabio.com/items/view/1147/microsoft-to-double-down-on-html5-with-internet-explorer-9

With the latest releases of Opera, Google Chrome and Firefox continuing to push the boundaries of the web, the once-dominant Internet Explorer is looking less and less relevant every day. But we should expect Microsoft to go on the offensive at its upcoming MIX 2010 developer conference in Las Vegas, where, it has been speculated, the company will demonstrate the first beta builds of Internet Explorer 9 and possibly offer a preview release of the browser to developers. Several clues point to the possibility that the next version of IE will include broad support for HTML5 elements, vector graphics and emerging CSS standards. If Microsoft plays its cards right in Vegas, IE 9 could be the release that helps IE get its groove back in the web browser game. The biggest clue comes from the scheduled sessions for MIX, which takes place mid-March. There’s a two-part talk scheduled on HTML5, entitled HTML5 Now: The Future of Web Markup Today, by Opera Software’s Molly Holzschlag. Indeed, Holzschlag tells Webmonkey she expects Microsoft to step up HTML5 support in IE9. “Look especially for Microsoft to be working on browser storage and other HTML5 features,” she said in an e-mail. There’s also a session on IE and SVG, the vector graphics tools supported by pretty much every other browser. IE Senior Program Manager Patrick Dengler is scheduled to present on the Future of Vector Graphics for the Web. Couple these clues with a post from the IE team on its official blog late last year about increased JavaScript rendering speeds and CSS support, and the team’s recent push to provide better support for SVG graphics and animations, it looks like IE 9 will present a huge step forward for Microsoft into the realm of HTML5, CSS 3 and other modern technologies that drive the most forward-thinking web apps. Such a shift in thinking would be welcome. Picking on Internet Explorer Explorer is like fishing with dynamite — it’s just too easy to be fun anymore. In fact, many prominent forces on the web have stopped arguing against IE and simply started waving their hands in dismissal. It started with a few developers, but recently even Google has turned up its nose at IE, referring to it as a “non-modern” browser when talking about web standards and releasing its Chrome Frame plug-in to enable IE7 and IE8 users to run more advanced web apps. Worse, third-party developers have started to one-up Microsoft by hacking features into IE, like giving it the ability to display HTML5 video playback when none existed. The current release, IE8, which shipped on every Windows 7 desktop in 2009, caught Microsoft up to where other browsers were in 2007 with support for CSS 2.1 and a couple of token HTML5 tools — most notably the offline storage elements. But that’s where its support for emerging standards ends. At PDC09, Microsoft’s last big developer event, president of the Windows division Steven Sinofsky promised that Internet Explorer 9 was going to offer a “more modern” (there’s that word again) browsing experience and emphasized coming improvements in performance, JavaScript rendering, support for existing web standards and support for HTML5 and CSS 3. But Sinofsky tempered his statements by saying Microsoft will continue to be “responsible” about how much it supports HTML5, so that “we don’t generate a hype cycle for things that aren’t there yet across the board for developers to take advantage of.” While Microsoft is technically correct when it keeps saying that HTML5 isn’t finished, its failure to offer broad support for the new markup language has held IE back from the web’s cutting edge. The company has traditionally been reticent to support emerging standards, viewing them as a moving target and choosing only to concentrate on standards that have been ratified by the W3C, the web’s governing body. But delays at the W3C haven’t stopped the competition from forging ahead with HTML5, and if IE doesn’t start embracing the new laws of the land now, the browser’s dominance on the web is going to continue to crumble. We contacted a Microsoft rep for this story, but they chose to save any further talk of IE9 until MIX. See Also:

Microsoft Still Chasing the Competition With IE9 Developer Gives Internet Explorer the Gift of HTML5 Video A Brave New Web Will Be Here Soon, But Browsers Must Improve

]]>
Tue, 02 Mar 2010 17:29:32 -0800 http://life.ifabio.com/items/view/1147/microsoft-to-double-down-on-html5-with-internet-explorer-9