March 8, 2011

Can’t see cross-domain images in your Flash file? Make a crossdomain.xml

March 8, 2011 - Categories: geek

My mom recently noticed that images weren’t loading in the Flash viewer on www.adphoto.com.ph, but they were loaded on adphoto.com.ph. A quick look at the Javascript console showed that crossdomain.xml was missing. The Macromedia Flash 10 plugin is stricter about this than previous versions were, so if you don’t have a crossdomain.xml set up, you might find your older sites breaking for new browsers.

Here is a straightforward crossdomain.xml that allows requests from everywhere, useful for development:

<?xml version="1.0" ?>
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>

You can specify domains like this:

<?xml version="1.0" ?>
<cross-domain-policy>
<allow-access-from domain="adphoto.com.ph" />
<allow-access-from domain="www.adphoto.com.ph" />
</cross-domain-policy>

More information: http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security.html

When debugging a website, it is often helpful to use Chrome or Firefox’s developer tools, such as the Javascript console. In this case, the request for crossdomain.xml and the resulting 404 (not found) helped me find out what was going on.

2011-03-08 Tue 08:01

Quick notes from Emacs Org-mode talk at GTALUG

March 8, 2011 - Categories: emacs, presentation, speaking

My Emacs Org-mode talk at GTALUG was a lot of fun. I had made a quick outline of things I wanted to cover, and the discussion took us to all sorts of places – really more like a romp through the world of Emacs. I kept my talk plan small and tightly-focused – not even Org-mode, just note-taking in Org-mode – but I ended up talking about all sorts of things because they were cool and that’s where the discussion took us. This means that my outline isn’t much use for reconstructing the talk, but maybe whoever recorded it can share the audio and the video. =)

Unexpected wow moments of the day, completely not in my outline:

I’ve given two Emacs talks so far, and both of them had delightful audience interaction – among the best of any of the talks I’ve given. I think it’s because with Emacs, even people’s jokes give me a starting point to mention something I’ve learned about or come across or built. The energy of the session is really something different. It’s almost like an infomercial-ish “But wait, there’s more!”, but everyone’s in on the joke, they’re part of what’s happening. It’s an adventure.

I don’t want to give the impression that Emacs is just about fun. ;) Of all the software I’ve ever used, I think Emacs has contributed the most to my productivity and my learning. Not only do I find the direct benefits useful, I also really appreciate the inspiration I get from all these other people who use and improve Emacs.

So the key question I want to address with more thought is: where does one find the time to learn these things? I think you answer this the same way you make the time for things that matter – strategic optimization. Like in code, premature optimization doesn’t work. You need to figure out what actions are important and where improvements would have the most effect – where your moments of truth are. For example, it really pays to improve my abilities in programming, writing, and note-taking, because I do that a lot and it creates a lot of value at work and in life. On the other hand, I don’t stress out about typing even faster, because that’s not my bottleneck. And I also make sure to invest time into all sorts of other aspects of life, because those are important to me too.

Back to Emacs and the presentation. My goal for the talk wasn’t to convert anyone or show people specifically how to set up their environment. I wanted to give people an idea of what my workflow looks like, expose them to some of the things Emacs can do, and perhaps inspire people to learn more about their tools. (I made sure to mention lots of cool things about vi, too!) We started at 7:30 and had a great discussion for two hours (two hours!) that flew by until the organizers suggested it was time to wrap up. Quite a few people came up to me afterwards and told me that they were inspired to learn more about Emacs. Whee!

That was tons of fun. I’d do it again. It has to be an interactive group, somewhat casual (so that people feel free to interject questions) and technical (helps to have a few other Emacs users in the audience, and a general interest in tools). Voice is probably a huge component of it – both being able to communicate enthusiasm and for the conversational aspect of the discussion. Screen-sharing or projection is vital; this kind of talk wouldn’t have worked with slides. So it’s probably a talk I’d need to give in person, considering webconference interaction patterns and screen-sharing delays. Hmm…

(Maureen: there is a screenplay mode for Emacs. Isn’t that amazing? Might be worth learning Emacs. More writing resources on the EmacsWiki. If you’re intrigued by it, check out the Emacs Newbie resources.)

2011-03-08 Tue 23:40