Blog

MongoDB is totally unsuitable for anything that requires ACID—but for things that don’t, it is unbelievably awesome. It’s even me that excited “kid in a candy store” feeling which (being a jaded software engineer) I haven’t experienced in a long time. It’s amazingly fast and seems to be smartly written, providing the perfect balance between schemaless document storage and powerful querying capabilities.

I can’t give enough kudos to its rockstar developers for being incredibly responsive to user feedback, too. I reported a bug about an assertion failure I was experiencing, and in 2 days, it was fixed. Two days! By way of comparison, I’ve been waiting upwards of two years for some bugs in Zend Framework that cause database failures to be patched (despite providing patches).

MongoDB even has an automated nightly build system, so it’s stupidly easy to test out the latest features and fixes. I’m certainly interested to see what it can get up to in production (especially its auto-sharding, since distributed clusters have typically been a big headache for me in MySQL) but so far during testing it’s been sheer joy to work with.

Problem

Trying to save images using Save For Web onto an NFS share using Photoshop CS4 11.0.1 in Mac OS 10.5.8 only works for one overwrite.

Steps to reproduce

  1. Save a file using Save For Web to an NFS share
  2. Save the same file again, choosing to overwrite
  3. Save the file a third time, choosing to overwrite

Expected results

File saves successfully! No other software has a problem with this. Not even Photoshop itself, which can save PSDs over and over again without event. Only Save For Web is broken.

Actual results

On third write:

Could not write the file. A file-system error has occurred.

On all subsequent writes:

Could not write the file. The file was not found.

YuMeWrapper is an ActionScript 3 wrapper around YuMe Network’s library SWF for publishers. It provides a consistent abstraction of their ActionScript 3 SDK, as well as much more thorough documentation of the YuMe SDK than what YuMe themselves provide.

This wrapper supports all of the standard YuMe library functionality, including pre-roll, mid-roll, overlay, and post-roll advertisements, with two exceptions: midroll playlist prefetching is not supported, and extra fullscreen options are not supported. It also provides loads of additional fixes and functionality that does not exist in the YuMe library core.

Get more information and download YuMeWrapper

If you are trying to use asdoc and all it does is spit out a completely useless “Error: null”, check to make sure that there are no Mac OS resource fork files (file starting with ._) hanging around in the source directories that you are trying to document. asdoc barfs on them and will throw this error if they exist. (No data is stored in the resource fork of ActionScript files anyway, so delete away!)

I had a need for abcdump, which is a bytecode decompiler for ActionScript 3. Unfortunately, most of the instructions on the Web right now regarding how to compile this particular piece of software seem to refer to older versions of the Tamarin codebase and so no longer work. It took about an hour to piece together information to get the compilation process working again. So, here are some up-to-date instructions on how to compile abcdump from source. (No doubt that these instructions will become wrong too at some point in the future!)

  1. Follow the official Tamarin Build Documentation to get a working version of avmshell (formerly known as avmplus). You may need to modify the Makefile that configure.py generates, changing -fstrict-aliasing to -fno-strict-aliasing, in order to get it to compile successfully. (This is required only if you get the error “dereferencing type-punned pointer will break strict-aliasing rules”.)
  2. Get a copy of asc.jar, either by building it, or by downloading the latest version of the Flex 3 SDK. Copy it into the tamarin-central/utils directory.
  3. Re-compile the builtin library: cd tamarin-central/core; java -ea -DAS3 -Xmx200m -DAVMPLUS -classpath ../utils/asc.jar macromedia.asc.embedding.ScriptCompiler -d -builtin -out builtin builtin.as Math.as Error.as RegExp.as Date.as XML.as. Failing to do this will result in “The definition of base class Object was not found.” on the next step.
  4. Compile the ByteArray library: cd tamarin-central; java -jar utils/asc.jar -import core/builtin.abc shell/ByteArray.as
  5. Compile abcdump: cd tamarin-central; java -jar utils/asc.jar -exe objdir-release/shell/avmshell -import core/builtin.abc -import shell/ByteArray.abc utils/abcdump.as

Following these instructions, you should now have a stand-alone, executable abcdump.exe in the utils directory. One caveat to note is that you will need to pass “--” as the first argument when you try to run the stand-alone executable, since otherwise the virtual machine interprets the arguments as its own instead of passing them to the application. Happy hacking!