Tag Archive for 'Singularity'

Dr. Woohoo, Generating Artwork, and some Python code to massage user submitted content (specifically, images).

Cotton Candy Corral ReefThe cool thing about user submitted content is that you can't always predict what you're going to get. Our speakers at the Singularity Web Conference, for example, submit and update their own bios and session descriptions on the site. Yesterday, I noticed that Dr. Woohoo had put up an image of one of his awesome generative artworks in his session description.

Of course, since I hadn't considered images in session descriptions, this had the side-effect of breaking the layout of the sessions page.

(In case you're wondering, yes, this is the way I like to work. Instead of over-engineering things, I like to see how people actually use stuff and then evolve them to meet their needs.)

So tonight I wrote a bit of code to massage and tame how images in session descriptions are displayed and I thought I'd share it with you in case it helps anyone else. (Another, more complicated way to go about things would have been to grab the images using urlfetch, store them in the datastore, and resize them via the image API -- but that would have been overkill for my needs.)

# Copyright (c) 2008 Aral Balkan, Singularity Web Conference
# http://www.singularity08.com
# Released under the open source MIT license.
 
from markdown import Markdown
 
image_tag_width_re = r'(?P<img><img.*?width=")(?P<width>\d*?)"'
image_tag_height_re = r'(?P<img><img.*?height=")(?P<height>\d*?)"'
image_tag_re = r'(<img)(.*?)>'
image_tag_src_re = r'<img.*?src="(.*?)"'
image_tag_alt_re = r'<img.*?alt="(.*?)"'
 
image_tag_width_rc = re.compile(image_tag_width_re)
image_tag_height_rc = re.compile(image_tag_height_re)
image_tag_rc = re.compile(image_tag_re)
image_tag_src_rc = re.compile(image_tag_src_re)
image_tag_alt_rc = re.compile(image_tag_alt_re)
 
IMAGE_SAFE_WIDTH = 160.0
 
def massage_images(html):
	"""Helper: Alters dimensions of any images in the passed HTML to make them safe for the site's design."""
	image_tag_widths = image_tag_width_rc.findall(html)
	image_tag_heights = image_tag_height_rc.findall(html)
	image_tag_srcs = image_tag_src_rc.findall(html)
	image_tag_alts = image_tag_alt_rc.findall(html)
 
	for i in range(len(image_tag_widths)):
		# Reduce the width of any found images to 160px so as not to break the layout
		original_width = int(image_tag_widths[i][1])
 
		maintain_aspect_ratio = True
		try:
			original_height = int(image_tag_heights[i][1])
		except IndexError:
			# Mismatched width/height pairs on image tags. We won't be
			# able to maintain aspect ratio.
			maintain_aspect_ratio = False
 
		if maintain_aspect_ratio:
 
			aspect_ratio = float(original_width)/float(original_height)
			new_height = int(IMAGE_SAFE_WIDTH/aspect_ratio)
 
			# Substitute the new height
			html = image_tag_height_rc.sub(r'\g<img>'+repr(new_height)+r'"', html)
			logging.info(html)
 
		# Substitute the new width
		html = image_tag_width_rc.sub(r'\g<img>'+str(int(IMAGE_SAFE_WIDTH))+'"', html)
 
		# Add float:left and slight margin so that text flows around the image
		html = image_tag_rc.sub(r'\1 style="float:left; margin-right:.5em;" \2>', html)
 
		# Finally, add a link to the original image if people want to see it larger
		html = image_tag_rc.sub(r'<a href="'+ image_tag_srcs[i] + '" title="'+image_tag_alts[i]+r'">\1\2></a>', html)
 
	return html
 

There are a couple of basic but helpful regular expressions in there and you might find the snippet useful if you want to manipulate image tags generated from user submitted content.

Oh, and before I forget, Dr. Woohoo is going to be talking about Generating Artwork at the Singularity Web Conference. Check out his bio and session and the other sessions at the conference.

(You can find out more about Dr.Woohoo on his web site and take a look at his latest book, Color Visualizations: Exploring the Circle, vol 02.)

If you haven't booked your ticket for Singularity yet, hurry, as the $99 early bird discount ends at the end of this month.

Screencast demonstrating the first Google App Engine data export solution (full backup and restore)

This is a quick screencast to show you the data export solution I've created for Google App Engine that lets you backup your application's datastore and restore it either locally on your development machine or on the same Google App Engine application on the deployment environment or on a different Google App Engine application (which you can use as a staging environment).

That's right, this solves one of the big criticisms I've seen levelled at Google App Engine, which is that there is no way to export your data from your applications.

With this solution, not only can you export your data but you can also easily restore it.

I am going to be sharing the solution with you in the coming days as a separate open source project in the form of a Django application that you can plug into your own applications as part of the Singularity Web Conference Open Initiatives program (stay tuned for updates on that front).

In the meanwhile, watch the screencast to see how the backup and restore solution works.

View the full-resolution screencast on screencast.com

Smells like Singularity

Godin Needs Singularity

I can't believe I missed this when it first came out (it was probably because I'd just started on the my crazy two-month trip to simultaneously learn Google App Engine, brush up my Python, and build the new Singularity web site):

Brooks Andrus from Techsmith, whom I always end up having a lovely conversation with whenever I'm at a geek conference, wrote about the Singularity web conference a few months back in response to a post by Seth Godin titled The new standard for meetings and conferences. (Brooks, I hope you don't mind that I stole your excellent graphic for the post.)

In his post, Seth states:

If oil is $130 a barrel and if security adds two or three hours to a trip and if people are doing more and more business with those far afield...

and if we need to bring together more people from more places when we get together...

and if the alternatives, like video conferencing or threaded online conversations continue to get better and better, then...

I think the standard for a great meeting or a terrific conference has changed.

In other words, "I flew all the way here for this?" is going to be far more common than it used to be.

I love Brooks's reply:

Seth Godin meet Aral Balkan and welcome to Singularity.

Looking at the comments for the post, I did see a common misconception voiced by several people that Singularity is an online conference. I can see how this came to be, as early on, I was calling it that too. But, as it has begun to take shape, I realize now that it's not an online conference, Singularity is a global web conference.

What's the difference? Here's a quote from the comment I left on Brooks's post:

I just have to clarify that Singularity is not an online conference, it’s a _global_ conference. The big difference here is that we have local conference hubs around the world, some being organized by venue sponsors like Yahoo! and the BBC and others — community hubs — being organized by community groups. People meet up _locally_ as part of a global event.

We definitely use the Internet but it’s our communication medium. It’s what ties all the local groups together. Sure there will be people experiencing and interacting with the conference from the comfort of their own rooms — and some speakers will even be presenting from whichever hotel room they happen to be at the moment — but we are concentrating heavily on having a good speaker and audience presence at the various local hubs. I feel this is essential to the character of the conference.

I truly feel that we are traversing some uncharted terrain here, building the first Conference 2.0, as it were. And I hope that other conferences follow suit because the type of conference we’re creating is environmentally friendly.

Thank you, Brooks, for writing up such a cool post on Singularity.

Ticket sales for the Singularity web conference started yesterday with the launch of our new site on Google App Engine. Tickets during the early bird discount are just $99 (inc. VAT). You can also micro-sponsor the conference for just $199 (inc. VAT). So what are you waiting for? Join us in making history with the world's first global web conference.

Singularity Web Conference ticket sales and micro-sponsorships kick off!

New Singularity Web Conference web site

Tickets and micro-sponsorships for the Singularity Web Conference have started!

Reserve your ticket today!

Details

Tickets cost just $99 (inc. VAT) during the early bird discount. Micro-sponsorships cost $199 (inc. VAT) and include one ticket to attend singularity. You can purchase a micro-sponsorship as an add-on on the tickets page.

This also marks the launch of our new web site on Google App Engine, which I'll be writing more about both here and on O'Reilly InsideRIA in the coming days. I can't wait to share what I've been learning about developing on Google App Engine with you.

A special note for the initial (pre-announcement) Singularity badge-holders

When I first announced Singularity, I didn't tell anyone what it was. Instead, if you put a badge on your web site before it was revealed, I promised that we would have a little "thank you" for you. About two hundred of you put the badges up. It was an overwhelming response. You guys were there from the beginning and I appreciate your support more than you can know. And I want to take extra special care of you.

Update: If you're in this group, please see this post for instructions on how to claim the thank-you present I promised you in February.

To infinity, and beyond!

Yay! The launch of ticket sales is just the beginning. Our focus this year with Singularity is in delivering a solid experience. As such our attention is squarely on creating infrastructure and our guiding design mantra is "form follows function". I feel that the site has strong foundations and I look forward to revealing a couple of simple social features in the coming days. From here on, the site will be evolving constantly.

We are also working with Ayo Binitie and John Dalziel to create the conference application and the conference schedule. Expect updates on those fronts in the coming days also.

New speakers

We have a wonderful line-up of confirmed speakers that we haven't announced yet -- expect announcements in the coming days. And don't forget to check out our excellent group of announced speakers.

Up and running!

I want to say a special thank-you to those of you who have already signed up for tickets and our first micro-sponsors (I announced ticket sales on Twitter and on the Singularity RSS feed an hour ago and I'm so happy that we're having such a strong response from the very beginning.) If you haven't already signed up, I hope you will join us in making history as we launch the world's first global web conference.

Check out the new Singularity web site and reserve your ticket today!

New Singularity site: status update

This past week has seen yet another week of heavy development on the new Singularity web conference site.

A lot of what we're doing this year is building infrastructure. Singularity is a new breed of conference and we are doing a lot of work behind the scenes to ensure that we have the solid foundations we need not just to run it this year but to build upon for future years. My friends and fellow team members will probably tire of hearing the worlds "focus", "form follows function", and "solid foundations" over the course of the next few months if they haven't already. Our focus is on building a stable, functional platform to host global conferences on. There won't be any frivolous bells and whistles and whizz-bang eye-candy. Instead, we are building a minimalist, accessible social site and a stable and functional conference application. As I keep telling myself and everyone around me: focus, focus, focus!

Last week also saw the release of yet another Singularity-contributed project: the European VAT Number Validation API. This new API joins Open Country Codes and the GAE SWF Project on the list of Singularity-contributed projects to the community as part of Singularity's focus on openness.

It would be an understatement to say that I'm working feverishly to get the site ready for release and ticket sales started for Singularity. Originally planned for July 1st, I delayed things for a week to give us some more time to test and refine the site and, thanks to a last-minute change in how we're handling VAT, I'm going to push things further by another week as I don't feel comfortable releasing the site tomorrow. The new date for ticket sales is July 14th. Which, coincidentally, is my wonderful girlfriend's birthday, so it will be cause for a double celebration at Singularity HQ.

VAT, or Value Added Tax for those of you blissful enough to not have to deal with it, is a hugely complex issue that plagues companies in the UK and the EU, especially those selling goods and services online. Different rules exists depending on the location of your customers and where your services are consumed. Almost no one has a solid understanding of the rules. Accountants even tiptoe around the subject. My accountant, who is a partner in her firm, for example, was hesitant to offer me advice, preferring to refer me to their dedicated VAT specialist instead.

Hopefully, the additional week will also mean that we will the content from the existing site completely transferred to the new site and our speakers have already begun to add their session descriptions so there will be new content there too when the site launches.

Following the launch, I will be adding features to the site constantly as it evolves to become a community site that supports and compliments the conference.

We also have really cool list of confirmed yet unannounced speakers and I look forward to making it public following the launch of the new site.

Finally, we are working with Ayo Binitie and Influxis on the Flex, Flash, and Flash Media Interactive Server-based conference application itself and I'll be updating my design diary on InsideRIA very soon and asking Ayo to contribute an article there to detail our approach and give you some insight into the architecture of the conference application.

So hang in there for a little longer. The new site and ticket sales are coming.

_scuttles off to code_

Announcing Singularity’s latest platinum sponsor: Adobe

Adobe

I'm happy to announce that Adobe is sponsoring the Singularity web conference as a platinum sponsor. Our sponsorship agreement also gives Adobe global rights for venue sponsorship.

A big thank-you to Kevin Lynch, David Mendels, Michelle Turner, and Ted Patrick who kindly gave me their support and encouragement from the earliest days.

As global venue sponsors, Adobe can now be involved in organizing local conference hubs anywhere in the world and we are going to be working closely with Adobe and the various Adobe User Groups around the world to this end.

Adobe joins Influxis and Lynda.com as the third and final platinum sponsor for Singularity. We do still have regular sponsorship and venue sponsorship positions available. See the Singularity web conference sponsorship page for more information.

Thank you for supporting Singularity :)

Singularity ticket sales starting this Monday

To give ourselves a bit more time to test things, we're pushing tickets sales for the Singularity web conference to Monday, July 7th.

I also have an exciting announcement to make but that requires it's own post...

Building Conference 2.0 on O’Reilly InsideRIA

OReilly InsideRIA

I just started my development diary for the Singularity web conference on O'Reilly InsideRIA. Check out my inaugural post: Building Conference 2.0.

Singularity web conference: register your interest and help me test with the new teaser on Google App Engine

Singularity web conference new web site teaser

Take a sneak peek at the new Singularity web site on Google App Engine. You can sign up for the site, which will go live in July, and register your interest in the conference and help me test out the deployment environment. (And yes, Singularity is inverting its colors for the second half of the year.)

The current teaser is a glorified "coming soon" page but with one important difference: You can pre-register for the new site using your Google account.

If you have a moment, please sign up for the new site and help me test the deployment environment before we open up the actual site in July along with ticket sales.

I would really appreciate your feedback if you notice any issues (especially quota-related errors). I hope that Google will be removing the quotas for our application but I haven't heard anything definitive back from them yet.

The registration process currently asks you for your name, your email address (if you'd like to use a different one to the one on your Google account), and for your location.

The location data is really important for us as we create the schedule for the conference. The conference is going to run for 48 hours straight, over three days and be attended by people from around the world so the more location and timezone data we have, the better we can create a schedule that meets your needs. You can give as little or as much detail as you like for your location (country/city/town/even postal code) and we do our best to calculate your timezone based on that and on what your computer tells us your timezone is. (I'm using the Yahoo GeoPlanet API for much of this and I am _very_ impressed by it.)

Check out the new Singularity web site teaser and sign up to join the Singularity community.

Singularity web conference speaker spotlight: Tim O’Reilly

Tim o Reilly speakering at the Singularity Web Conference

I'm honored and humbled every time I look through the list of stellar speakers we have confirmed to present at the Singularity web conference. As such, I want to take a moment every week to highlight a new speaker, starting this week with Tim O'Reilly.

I had the honor of meeting Tim several years ago during a talk he was giving in London on the Open Source Paradigm Shift. In his talk, Tim predicted the mainstream commoditization of the web. Four years later, we stand as witnesses to the birth of the Commodity Web with Google's release of Google App Engine. (Simon Wardley, recently chronicled this very subject with great eloquence at his keynote speech at XTech.)

Several years later, I was in an elevator at the Venetian hotel in Las Vegas, heading to watch the keynote. There was one other person in the lift with me and I turned to ask him if he knew where the keynote was (the Venetian is huge). He told me that he was heading over there too and that I could follow him. Looking closer, I recognized Tim (he had a beard that hadn't been there in London) and re-introduced myself. Only later did I realize that Tim's conversation with Bill Gates was to be the highlight of the keynote. I guess it made sense that he knew where the keynote was after all.

Tim O'Reilly truly doesn't need any introduction. He is, of course, the founder and CEO of O'Reilly -- the most highly-regarded computer book publisher in the world. He is a true visionary who has both predicted and helped craft the state of the art on the world wide web -- not least by coining the term Web 2.0 to describe the social web of open data and applications that the World Wide Web has evolved into. (Few memes have had such lasting mindshare on the web today as Web 2.0 has.)

Find out more about Tim and our entire line-up of stellar speakers on the web site for the Singularity web conference and read Tim's thoughts on his blog.

The Singularity web conference is everywhere October 24-26, 2008. Tickets are scheduled to go on sale this month at $99 to coincide with the launch of the new web site on Google App Engine.






Bad Behavior has blocked 0 access attempts in the last 7 days.