Speaking about Fire Eagle
Last month I spoke about Yahoo! Fire Eagle at the Emerging Communications Conference. Lee did a great job putting together the conference, and had everything recorded. I feel i did an ok job explaining Fire Eagle, but perhaps i had too much coffee to make up for being on the tail end of a dozen straight days of conferences.
So if you’re interested in Fire Eagle as it relates to the mobile and telephony world, this is a good talk. The slides are online at slideshare.net.
It’s humbling to see a video of yourself speaking. Public speaking is really hard. I’ve been trying to work on my presentations, and i’m getting better over time.
Next week i’m going to be speaking at xtech in dublin in a longer talk about Fire Eagle. I’ll get in to the actual api’s and bit about building apps with Fire Eagle. In July i’ll be co-speaking with Kellan about using jabber for web services in Beyond REST? Building Data Services with XMPP PubSub at OSCON 2008. In between i’ll be at Google IO and Rails Conf / Caboose Conf, but thankfully i won’t be speaking, unless i get inspired to do a lightning talk.
Funny OLPC Story - How do you delete files?
So today i sat in on a meeting with some folks in the Uruguayan government who were trying to get ebook type educational material to laptops of the kids who have them now in uruguay. There are about 200,000 laptops being distributed, and it would cost too much to print books with the material, so they figured these laptop things might be a good way of doing it. In the discussion they told me this little story about tech support and the OLPC or Project Ceibal as it’s called in Uruguay.
It seems that during the first trial in the Florida Department of Uruguay they were having a problem. The kids it seems were downloading too much stuff from the internet. The laptops have a 1 gb flash drive, so it’s pretty easy to see how it could fill up. So the teachers told the ceibal folks that this was a problem, the drives were filling up and nobody knows how to delete files.
Well this is a problem, so there were meetings, and more meetings, how to delete files, they called up the University of Uruguay’s Engineering Faculty and investigated further. After four months of back and forth they had the answer and somebody traveled up to Florida (the uruguayan florida) with the answers and a training to teach the teachers how to delete files. It was after all what they asked for.
When they got there the teachers said, “oh, that! The kids figured out how to delete the files and manage them months ago.” Which is of course the whole point of OLPC, the kids can use the tech, it’s open, hackable, and explorable.
Another story is a friend of mine was visiting his cousin and the cousin was excited because he just got one of the laptops. But he said there was a problem, some of the interface was in english. My friend, being a programer, sat down and tried to figure it out. It seems that was some problem with the packages, he’s not exactly sure what’s wrong. But at one point “Save” was translated as “Salvar” instead of “Guardar” Salvar does mean save, but in the kind of way that Jesus Saves. Not the kind of thing you’d do with files, which is Guardar which might literally be translated something more like ‘to put away’ than ‘save’. I asked the OLPC folks about it on irc, and they said that perhaps the build being shipped out in uruguay is out of date with what they currently have released. Clearly they need a good logistics person / team to do release management and handling lots of branched distributions. Not an easy task.
On the whole people seem excited about OLPC. It would be good if the Uruguayan government could do something about class size, 1 teacher for 40 students is the REAL education problem, but the laptops help.
Two conversations about tests and software development
I’ve had the privilege of working with many developers over the years on a diversity of projects. I like tests, i think they make the software development process more reliable and help keep code from being unmaintainable disasters. So i find it interesting to see why inspires people to write tests, and why they give up on them.
Recently i had a very similar conversation with two very different developers, one i’ll call TestFail and the other i’ll call TestHeavy.
Rabble: “I see there are tests on this project, but they don’t seem to pass anymore.”
TestFail: “Yes, I was writing tests but then things got busy and I couldn’t keep them up. The tests feel out of sync with the application 6 months ago. I was the only developer on the project and i just couldn’t keep up the tests and getting releases out the door.”
Then i had another conversation with a different developer on the same subject.
Rabble: “I see there are a lot of tests for this project.”
TestHeavy: “Yes. The thing is when a project gets really pressured for time it’s the tests which make it possible to add features and keep moving forward. Normally I just develop on my own and don’t tend to work with other developers on projects. I found having tests means i can keep getting releases out the door.”
In both cases i’m paraphrasing from memory, but the thing which struck me is that two smart developers used the same two reasons to come up with totally different conclusions around testing. The two principal points are, i’m working on my own, and there is heavy time pressure on releases.
The code bases in question, i’ll keep this all anonymous to respect privacy, are also really different. First off, the applications do totally different things, but it’s enough to say that they are both fairly complicated web applications built in rails.
TestFail’s application has 44075 lines of application code and 778 lines of tests. Over the last year the code base has grown by over %50. On the other hand, TestHeavy’s code base is 4014 lines of application code and 4802 lines of tests (technically specs as it uses rspec). TestHeavy’s code base is younger, but over the last 6 months it’s only added a couple hundred lines of new code. Many new features have been added, but the size of the application has stated more or less the same.
While i clearly prefer TestHeavy’s approach, what puzzles me is the path taken by TestFail. There are many interesting things to be learned by watching the techniques of an effective test driven developer, but that’s kind of an easy problem. Just watch what they do and document it.
Harder is to understand why somebody fails. When somebody starts writing tests but finds they aren’t a useful part of their software development practice. It could be considered the ‘falling off the wagon’ problem. Really to me it’s a question of why is testing not the path of least resistance. What needs to happen for a developer to internalize testing.
If tests are written, and they are relevant to the the functionality of the application, the code base stays smaller, faster, and is more maintainable. But telling people that it’s a good idea to write tests, even getting them started and using tests isn’t enough. Figuring how to help people continue is even more important. I suspect that a large part of the problem is that people partially start using tests, but they don’t ever get a development environment which is setup to encourage testing. It’s painful and difficult as opposed to making debugging easier and development faster.
Does anybody have experience with trying and failing to stick with testing. Why was it?
Building flex 3 (flash) swc libraries on mac os x with ant and flex builder 3
I strongly believe in learning new languages and platforms. While i’m super happy with the ruby / rails / merb world, I know it has it’s limits. Most of the time when i look farther afield i think of hacking on lua, erlang, or smalltalk… But recently i had an app idea which struck me as something which really was a good fit for Air. Adobe’s version of Flash to run desktop applications. Let me say at first I though Air was stupid, but over time i’ve come to realize that for some applications, it makes lots of sense. It’s similar to my thinking Flash was stupid until it changed the world of online video, and ActionScript was some stupid director derived toy language until I realized that these days it’s EMCA script, basically the same damned thing as Javascript.
So i set out on the path of building an Air app. I asked my old buddy, Dom and he said there were two IDE’s for Flex development, flex is the updated version of flash which is more programming like vs Director scripting like. Flex draws on the java world’s traditions more than the scripting world, a sin may be forgivable if i am able to build this cool app i’ve thought up. For Flex there are two IDE’s Apatna (free and ‘professional’ edition) and Adobe’s own Flex Builder 3 which is payware, but you get a 90 free trial to play with. The core is actually free, the SDK to build flex apps and it comes with no IDE, but just command line tools.
Flex draws on Java, there are tools like ant which are used for all the build processes. Really the IDE’s are both based on customized versions of eclipse. I’m not a fan of IDE’s they seem to be needed when the development processes has gotten to complicated to fit inside your head and try and make everything point and click. Silliness. Flex can use html to render an interface, but it also has it’s own proprietary xml for laying out interface elements. It creates a dom like thing, which you can attach action script events to… Once you get over how different it is from real web development, at some level it’s the same damned thing. It’s worth stating, that you can make flash as standards compliant, open, accessible, etc as html and unobtrusive javascript, but nobody seems to actually do it. Just yesterday i was noticing that yahoo map’s flash app wouldn’t let me paste in an address. Just like rails and django encourage you to do the right thing by default, flash defaults to clunky custom interface elements with broken accessibility.
Anyway, back to what i was saying. How to make this stuff work. There are it seems a lot of people with flash / flex development blogs which is useful, but on the whole i’ve been very unimpressed with the documentation. There’s a HUGE amount about how to do various UI widget things, and very little about toolsmithing, libraries, building out flex as a platform.
The thing is, i know how a rails app works, how php plays with apache and a load balancer. I don’t know how these flex apps come together. It found lots of tutorials on building toy apps, but not a one ever mentioned using a library you find online and incorporating it in to your application. I suspect it’s because the open source tradition is pretty week in the flash world. Just like in VB and Java, because you pay for the IDE, it creates a culture of pay to play. It stands in stark contrast to the scripting world of Perl, PHP, Python, and Ruby. In the scripting world we build libraries for our own uses, then release them for the community to use and help maintain. The only libraries i’ve found to be released so far in the flex world, come from Adobe employees themselves. Clearly it’s a failure of community that there is repository of open source libraries like CPAN, Ruby Gems, PEAR, and the Python Package Index. What the adobe does have is RIA Forge, as far as i can tell RIA is some term Macrodobe made up. The thing is, RIA forge is just a directory linking to libraries around the web, kind of like RAA. It has no build process, no clearly defined way in which libraries are included in your larger application. It solves the, how do i find what’s out there problem, but not really the how do i easily include it in to what i’m building.
Which brings me to the whole reason i wrote this blog post. I spent the last day or two trying to figure out what to do with libraries like these: as3corelib and as3awss3lib. They are the core action script 3 libraries for things like md5 hashing, json serialization, and general string, date, and time functionality. The second one is action script 3 library for working with amazon web services. Pretty useful and straight forward stuff. Don’t ask my why the as3corelib isn’t just included for use everywhere all the time, it’s an extreme case of batteries not included. In ruby i’d run ‘sudo gem install aws-s3’ and i’d magically get the libraries i need. There are pretty straight forward alternatives php, python, and perl.
But these libraries aren’t distributed as binaries, packages, nor anything easily installable. What do you do get is a note saying: “There is currently no zip archive available. Please check the code out using subversion. ” That’s pretty much it. When you do check out the svn repo you get this:
bas1:~/code/as3awss3lib-read-only rabble$ tree .
.
`-- src
`-- com
`-- adobe
`-- webapis
`-- awss3
|-- AWSS3.as
|-- AWSS3Event.as
|-- Bucket.as
`-- S3Object.as
5 directories, 4 files
For files, in a nested set of directories which seems pretty straight forward. I want to be able to access these files from my app, so i simply did the obvious thing, from a scripting background, copied the whole com dir and children over to my lib directory in the app i’m building. Needless to say that didn’t work. I tried moving around the files to various other directories and that didn’t work either. I read everything I could find in the documentation and on various community created sites, dead ends. I tried asking in the #flex irc channel, nobody seemed to even understand my question. I tried pinging friends who work on flash stuff at Adobe as well, i got blank stares and silence.
What was going on here? Clearly somebody at Adobe had build this library, clearly it was intended to be used. No where did i find any documentation on how to build these things. The as3awss3lib had more files than as3awss3lib, but still there was no clear path as to what to do with it. Adobe has spent millions of dollars on documentation, help, blogs, building libraries, and trying to create a community around their platform, and I couldn’t figure out how to use a simple library to add to my code?
I think a lot of it comes down to assumptions. People in flash/flex are mostly focused on user facing eye candy and not on the underlying libraries. There isn’t a lot of discussion about the libraries or the work which goes in to them. Many apps are build and left running as they are. They aren’t things which are maintained and run over time with updates.
Eventually i tracked down what i needed to do. It is assumed that although the repositories are called libraries, the thing you want to do is compile them in to swc files. You can’t just include other people’s code as libraries in to your own code tree, you’ve got to compile them. These compiled libraries and ‘assets’ (i guess you can have a ‘library’ of non-code things like images) are called swc files. These files need to be compiled and included in your application, before and separate from the build process for your own code. Again this is a little java like. Not necessarily wrong, but quite different from how most dynamic languages work. ActionScript is a dynamic language, somebody at Adobe clearly fell in love with java as the way enterprise professionals do things, and added some clunky extra steps to the process.
So now that we know that you can’t just include code in the lib directory of your app and have it be available to your app at run time. This is a big leap. It’s part of why i’ve found nobody who understood my questions. Once i made the leap then it was pretty easy to figure out that i needed to use ant to build the app i tried running ant and got errors. A command line utility and errors, that’s something i can debug! To run ant you simply cd to the build directory and type ant.
bas1:~/code/as3corelib-read-only/build rabble$ ant Buildfile: build.xml properties: lib: BUILD FAILED /Users/rabble/code/as3corelib-read-only/build/build.xml:63: Execute failed: java.io.IOException: C:/Program Files/Adobe/Flex Builder 2 Plug-in/Flex SDK 2/bin/compc.exe: not found Total time: 0 seconds
This brings me to my other issue which i find so surreal about the Flash / Flex / Adobe world. It’s a windows world, everybody else is an after thought. It’s full of arcane paths, and executables have their own funny little suffixes so that the OS can figure out that they are executable. In the unix world, which includes linux, bsd, cygwin on windows, and of course mac os x, there are standard conventions for figuring out the paths to libraries, executables, etc…
Ant didn’t seem to like spaces in file names so i fixed that, but then there was still a big problem.
## Change this: # The location of the Flex 2 SDK on your sytem. flex2sdk.bin.dir = C:/Program Files/Adobe/Flex Builder 2 Plug-in/Flex SDK 2/bin flex2sdk.lib.dir = C:/Program Files/Adobe/Flex Builder 2 Plug-in/Flex SDK 2/frameworks/libs ## To this: # The location of the Flex 2 SDK on your sytem. flex2sdk.bin.dir = /Applications/Adobe_Flex_Builder_3/sdks/3.0.0/bin flex2sdk.lib.dir = /Applications/Adobe_Flex_Builder_3/sdks/3.0.0/lib
And and now ant gets a little farther down the path of working.
bas1:~/code/as3corelib-read-only/build rabble$ ant
Buildfile: build.xml
properties:
lib:
[exec] /Applications/Adobe_Flex_Builder_3/sdks/3.0.0/bin/compc.exe:
/Applications/Adobe_Flex_Builder_3/sdks/3.0.0/bin/compc.exe: cannot execute binary file
[exec] Result: 126
BUILD SUCCESSFUL
Total time: 0 seconds
Don’t let the BUILD SUCCESSFUL message trick you! It didn’t actually work. This time it found compc.exe but as you’d expect, this is a mac, and on mac (and it’s unix cousins) exe files don’t run. At first i thought maybe Adobe was doing some craziness where they just decided to make all the executables on every platform .exe. Turns out that wasn’t the case, setting the executable flag didn’t help. What adobe does is include a separate file, sans .exe, which is the version of that app for normal operating systems. So it requires another change to the build.properties file.
#change
asdoc.exe = ${flex2sdk.bin.dir}/asdoc.exe
compc.exe = ${flex2sdk.bin.dir}/compc.exe
mxmlc.exe = ${flex2sdk.bin.dir}/mxmlc.exe
#to
asdoc.exe = ${flex2sdk.bin.dir}/asdoc
compc.exe = ${flex2sdk.bin.dir}/compc
mxmlc.exe = ${flex2sdk.bin.dir}/mxmlc
Again if it wasn’t assumed that these libraries would be built in a mono-platform windows only world, then the ant build.xml file would be written in such a way to look in the obvious places. Once everything is in place, then ant works!
bas1:~/code/as3corelib-read-only/build rabble$ ant
Buildfile: build.xml
</p><p>
properties:
</p><p>
lib:
[exec] Loading configuration file /Applications/Adobe_Flex_Builder_3/sdks/3.0.0/frameworks/flex-config.xml
[exec] /Users/rabble/code/as3corelib-read-only/bin/corelib.swc (79242 bytes)
</p><p>
BUILD SUCCESSFUL
Total time: 7 seconds
As far as i can tell, the ./libs/ directory is a good place to put these kinds of libraries. Presumably they get bundled in to your application you build an air / flash swf for distribution. I haven’t gotten that far yet. If i stay motivated and keep moving forward with this project, i’ll keep blogging my way through this mess. I am tempted by the shiny bobble of pretty and small cross platform GUI desktop apps which lies on the other end of this journey.
It appears that some libraries need to be compiled, like corelib, while others, the as3awss3lib can just be dropped in the src directory with their full path, ./com/adobe/webapis/awss3 What’s not clear is why it’s one way or another.
txtmob gets subpoenaed - data retention in the surveillance era
Tad’s TxtMob has been subpoenaed by the new york police department demanding the records of everybody using the service during the RNC protests in 2004. I got to know Tad through our collaboration on various projects related to activism and emerging telephony. I even poked around and did a little work on the txtmob code.
All that is to say, i know a thing or two about the background, how txtmob works, and issues of data retention and privacy. Nothing i’m saying here is based on privileged information you can’t get from reading the source.
The reality is today, we live in a world where much more information about our daily lives are collected than ever before. There is this scary nightmare scenario, the corporations / state know where everybody is all the time, what they are doing, who they talk to, etc… Most of the time this information is being used for marketing sell more stuff. While it’s slimy, it’s not really evil. What happens when the state starts to use the same information to suppress free speech and dissent, things get much more serious.
This is nothing new, things evolve, but it’s a world we’ve been dealing with for a while. Years ago there was one phone company, they had records of everything, you couldn’t know if somebody accessed your records because the phone company wouldn’t tell you. With the internet, and now emerging voip / open source telephony, the ability to run your own telecommunications infrastructure has emerged.
The work of the anarchist geek community for the last decade or so has been to build this autonomous infrastructure. Indymedia’s been a big part of this task, to create a privacy enhanced participatory media network. Another has been blasterisk an asterisk based phone system with dial in numbers around world for activists to use to make phone calls and do international coordination. For email there is riseup which provides email hosting and mailinglists for hundreds of thousands of activists. Social networking tools for collaboration and organizing, crabgrass. My own, protest.net, a calendaring service, etc… While txtmob has been compared to twitter, txtmob predates twitter and was very explicitly talked about as a model to be copied / learned from in the creation of twitter.
What all of these services have in common is they are providing critical infrastructure to social movements and they take privacy seriously. New tools have been build to allow for making privacy easy.
Txtmob is included in those sites because it does things right. First when you delete your account, remove your phone number, etc… it really does remove it. No record left of your messages, your login, your phone number. Secondly txtmob does not use a short code, nor is there a legal agreement between txtmob and the carriers. Rather txtmob uses the path of least resistance to deliver messages, finding holes and cracks in the sms system to let messages pour through. Tracking txtmob messages is more like tracking p2p traffic than the american idol voting via sms. This not following the rules is probably why the NYPD went to txtmob instead of the carriers. The data is many places, but txtmob is the easy place to get it, if it’s there.
The task of going to the carriers or the NSA to get the txtmob data is much harder than getting it directly from the source. First it’s a HUGE data mining task. It’d involve using something like hadoop or google’s map/reduce to load up the data, and then tracking down a few thousand sms’s out of a stream of trillions. Most of the time operators are lazy, it’s easy to get them to comply with even questionably legal orders for data, my employer is a great example. Service providers tend to log MUCH more data than they need, in the name of security, potential datamining, etc. If we don’t have that data, then we are both able to follow the law, and protect our users.
() It’s worth noting, that there are new EU rules / laws which require extensive data retention. It’s much worse than the situation in the US. So much for the EU being concerned about privacy.
Fire Eagle talk at the Emerging Communications 2008 Conference
I gave a talk on Thursday to the Emerging Communications conference. It was my first chance to speak publicly about Fire Eagle.
| ViewIt's Danger Day, Fire Eagle Flies
Today we let loose the developer’s launch of fire eagle a location broker platform from yahoo brickhouse. It’s what i’ve been working on for the last 6 months and is the first publicly facing rails app to launch at Yahoo!
I’m really excited by Fire Eagle. It’s a system which lets you collect your location from any number of sources, such as your cellphone, and then provide that back out to other applications. Fire Eagle then lets you fuzz your location and control who is using it. Share the city you’re in with dopplr, the neighborhood with facebook, but let the taxi locator see your exact location.
I’m proud of the work i’ve done fire eagle and to have worked with a great team, including Tom, Seth, Jeannie, Skylar, Schuyler, Ayman, Kevin, Marc, Phil, Salim, Mor, and Sam.
We’ve got an irc channel, #fireeagle on irc.freenode.net, wiki, twitter bot, and mailinglist. Come join us and play.
Launching a ruby on rails app at yahoo has been an incredible experience. We’ve had to figure out how to marry a stable mature platform with the agile, test driven, DRY model of development which Rails has popularized. I’m particularly excited that we were able to adopt oauth and open standards like georss and geojson.
