Archive for the ‘technology’ Category

The iPad is only a consumer device meme

Friday, January 29th, 2010

When I talked to my wife about the iPad I mentioned that I was glad I was a programmer because it would give me an opportunity to buy it, otherwise, I wouldn’t bother. I wouldn’t bother buying it because I saw it as a machine on which I couldn’t make stuff, which mostly meant I wouldn’t be able to program in it.

So there’s a meme out there that the iPad is mostly about consuming media, that you can’t really monkey with it because of its closed nature.  For example, in his post about the iPad, Alex Payne thinks that if this is the future of personal computing then he finds it to be disturbing.  He sees it as the possible “tinkerer’s sunset,” that it’s closed nature will prevent someone from messing with the machine, poke it, test out dangerous stuff, to develop  an interest in what makes it tick, and eventually lead them to discover programming. I’m a bit more optimistic, since I’ve been thinking about this since I wrote similar thoughts in another post, only then I had the iPhone in mind.  Let’s talk about how much things have changed and how much they have stayed the same.

A Consumer Device

The iPad looks like the ultimate consumer device.  You can watch video, read books, read the web.  Yes, they showed you can do spreadsheets and docs, that you can do work.  But can you really work?  During the presentation we saw Steve Prang demo his great Brushes application.  This is an application I use on my iPhone whenever I can’t take my pochade box or plein air watercolor kit with me.  Yeah, the screen is not pressure sensitive like my Wacom tablet, but I’m not looking for it to replace my dedicated Photoshop setup.  Restrictions like these have only given me a new way to learn to work with paint and a new way of having to think about how I approach a painting solution given that I’m missing certain capabilities I was already used to both from real life and from my Wacom table.  I’m always making drawings that I share with folks, and drawings that are studies of light and color.  It’s not a computer related activity, but it’s not just a consumer experience.  It doesn’t have garageband, but maybe someone will write an application that’s a scaled down version of Reason or just an entirely different application for musical live performances.  Something that is small and useful for on the go.  Again, it won’t replace your dedicated setup for the really professional work, but it’ll let engage in your work in contexts where you might otherwise have been limited.


If you’re in IE you won’t be able to see the above videos. Seems like I can’t get it to work in FF either. =(

Maybe someone will write a game like chipwits, where you control a tiny robot on rollerskates, and start some young person’s journey into computer science.  Even game consoles awaken the desire to learn how it works, to look under the hood, yet not only are game consoles systems on which you can’t build stuff, but they often require significant investment in time and money, AND the blessing of the company before you can develop on it.

I can imagine a photographer or a web designer showing up at a client’s with an iPad in hand and showing off their portfolio.

Here’s a quote from IO9: “But those activities are not the same thing as programming the device to do something new.”  That’s just lack of imagination.  Most computer users don’t open up a terminal and start programming.  They don’t install OS X dev tools, or download the free edition of visual studio, install python, or even do something as simple as open up a text editor and write .BAT file.  Can you do that on the iPhone or on the iPad?  Not in the same way.  Most likely because it’s in Apple’s business plan to keep people from writing applications that circumvent the AppStore approval process.  But the physical nature and mode of interaction doesn’t lend itself to that type of customization either.  I wouldn’t want to program anything on my iPhone and I probably wouldn’t want to write an extended program on an iPad.  Maybe there ought to be a way to upload stuff to the machine and make it do stuff.  But you can!  You can edit an HTML file on some server and load it on the browser, or you could download the SDK, pay $100 and upload to your own phone. I have written apps on my iPhone that my 19-month-old can play with.  Maybe your app won’t be approved for the AppStore, but you got the chance to mess with the device.

Human curiosity is enormous and we will always want to know what makes things work.  We’re still going to need developers and developer machines to write stuff for these slick, opaque, personal computing devices.

A Closed System

There’s no denying the iPhone and the iPad are closed systems.  You have to play by Apple’s rules (stated or unstated) or you’ll get booted or denied access to the system and your app will not see the light of day.  What if you want to jailbreak your iPad? Will Apple detect this and brick it? With DRM on products from the BookStore you’ll most likely not be able to share or loan your eBooks.  When it comes to books, it’s not all on Apple’s hands to force publishers to provide books without DRM.  And, like the Joe Hewitt and others point out, when it comes to control over apps, the door is wide open for webapps.

NIMBism

One thing I’m a little ashamed of is my NIMBism (Not in My Browser) when it comes to Flash.  I’m ashamed that I’m glad Apple has decided for me that I won’t have Flash content in the iPad’s browser.  I guess it just saves me the trouble of installing FlashBlock.  I could say that I don’t want Flash on my browser because it’s a CPU hog or because I’m annoyed by intro screens, but the truth of it is that my naive hope is that this will push forward HTML5 adoption by the sheer power of Apple’s muscle.

This feeling goes completely against my political, moral, and ideological leanings.  Nobody’s perfect ;)

Connected

The thing I see missing here, and the biggest weirdest thing that struck me while watching the presentation was that there was little talk about connecting to other devices.  You can synch up to your desktop.  But, that’s so old-timey.  Here’s where my desire was not fulfilled. I wanted the tablet to know there were other devices it could talk to and interact with them.  I wanted to do this wirelessly, instantly.  To be able to transfer information, collaborate and engage in activities, and begin to bring all those disparate little devices into a web.  I wanted a machine that would take a giant step towards a vision of ubiquitous computing.  Instead, I got a white cable.

A White Cable

Photo by: marketingfacts / CC BY-NC 2.0

So Now What?

I’m doubtful about iPad adoption.  The iPhone took off because there was a ready market out there: cell phone users.  Can the iPad reach people in the same way?  If it does, and it becomes the way most people interact with computers then I’ll be glad because it just might be the product that pushes other companies to make polite, pleasant, enjoyable computing devices.

As a developer, I see it as a tremendous opportunity to develop and try out applications for people in different contexts.

As a consumer, I could imagine it replacing my laptop.  But only if I had to travel often and I only if I didn’t need to code while traveling.

We all had too much riding on this.

Jason Robbins of Google at the first Los Angeles Google Technologies User Group

Wednesday, August 19th, 2009

One final reminder that today’s the first Los Angeles Google Technologies User Group. Jason Robbins of Google will talk about collaborative development environments like Google Code.

The talk is at the Google Santa Monica office from 7-9pm.

We’ll be raffling off the following books, courtesy of O’Reilly:

Using Google App Engine

Android Application Development

and

Erlang Programming

You can RSVP at the group website or just show up.

http://www.losangeles-gtug.org/

No more Flex Framework frameworks

Friday, August 14th, 2009

Let me start by providing examples of Flex Framework Frameworks (FFF): Cairngorm, PureMVC (I know, it’s not just Flex), Mate, Swiz.  You get the idea.  All these frameworks provide ways to deal with Event Handling, Command or Action handling, ease separation of concerns so you can code in MVC, some provide inversion of control, or some combination of Enterprise Patterns.

Developers who are looking for a solution to bootstrap their application development are looking at the wrong abstraction level when they evaluate these frameworks.  You can’t base an entire application on just these frameworks.  If you do, you’ll be coding at too low a level.

What is needed is a library or framework above MVC, a framework that provides a core set of services that are present in most run-of-the-mill applications you’ll code in Flex, and a standard way for you to write your app on top of these services.

What’s a run of the mill Flex application?  I’m talking about business applications that may be deployed over a browser or in AIR and that allow the user to enter information in a form, to create a dashboard.  I’m not talking about other types of online apps like Blogs where you just read information and post (sure, there’s a form, but whatever), advertisement sites like movie websites (these mostly use Flash and are highly interactive but the focus is not to gather information from the user.   I hope you get the picture.  If I had more time I’d come up with a better bullet point list.

So, what are the base services for these applications?  I’ll try to describe them without resorting to Enterprise pattern names like Commands or Actions and just describe what I want my app to do.

I want to …

  1. be able to have buttons, menu items, links, and other UI widgets through which the user can perform the same action.  So there might be an undo button, an undo menu item, and an undo menu item in a context menu and clicking or selecting it should execute the same action.  They should be enabled or disabled automatically for me, their visibility should be set to true or false automatically.  I should be able to declare their enablement/view states and their position on a toolbar or menu without my having to add any code or have any giant switch statements.
  2. have undo/redo
  3. handle long running operations with the ability to provide feedback to the user and the ability to cancel them
  4. have the same button or menu option perform what seems like the same action based on what thing I currently have selected or what view I currently have selected
  5. global item or resource selection handling
  6. Modularity so that functionality can be added by providing another module and not by recompiling the whole thing
  7. Context based action enablement

Ok, I’ll stop there because that last one is very jargony.  I’m basically talking about something like the Eclipse Rich Client Platform (RCP) but for Flex.  Moccasin, a Flex framework for graphical editor apps has history  management and editor functionality.  I want a library that goes further.

If you’re not familiar with the RCP, that’s OK, let me explain how this mythical framework might handle the features up there:

Commands and Handlers

The RCP has the concept of a Command, which is just a declaration of an intent to perform some action. It doesn’t actually do anything, it’s just a marker.  For example, “Cut” is a command.  It doesn’t actually know how to perform anything.

In order to actually do something you have to provide a Handler for a command and tell the framework when your handler should be invoked.  For example, let’s say your application has a tree on the left that shows a hierarchy of files.  And there’s a text editor on the right, which just shows the contents of the selected file.  If you currently have a file selected on the tree and you click on the “Cut” button then the Cut File Handler is invoked.  It knows how to take a file, delete it from the current location and store the contents in the clipboard.  If instead your text editor had focus and you had selected a piece of text then clicking on the Cut button would invoke the Text Editor Cut Handler which knows what part of the text is selected and can yank it out of the editor then store that in memory.

How did the framework know which handler to invoke?  When a handler is declared in the system you must also provide an “activate when” expression.  The activate-when for the Cut File Handler might be something like:

if Selection == Resource of type File

for the Text Editor Cut Handler it might be:

if selectedView == editor and and selection length > 0

Handlers can also be declared with “enabled-when” and “visible-when” expressions that allow the framework to dynamically, automagically enable buttons, menu items, links or whatever other UI widget is currently hooked up to a command, if the expression executes true.  ”visible-when” expressions would remove or add the widget if the expression were true.

That’s how we deal with 1, 4, and 7.

Undo/Redo - History Management

This one’s easy, but I haven’t seen any framework address it directly. It’s a pretty generic feature and even if your app is whiz bang it can still use the same basic generic solution.  The solution is simple:

Execute stuff in an undoable operation interface (call it IUndoableOperation).  Put it in some manager that has two stacks, an undo stack and a redo stack.  Implement an redo/execute method or methods and implement an undo method.

If you want to get fancy, use Undo Groups so that you can group together a set of operations that should be undone/redone as a group though each operation by itself may be undo/redone independently.  That takes care of 2.

In order to do this right in Flex, however, the history manager should anticipate having to perform its undo/redo/execute asynchronously because some operations may require network access and their completion can only be determined asynchronously.  Which brings us to my next topic:

Long Running Operation

In fact, the spark that started this post brewing in my head was when Ted Patrick tweeted about their being so many Flex Framework Frameworks.  The conversation turned into creating a library of useful patterns that Flex developers could use and feel confident in using them.  That the benefits it would provide would be to cut down on development because we wouldn’t have to reinvent the wheel, that we could share projects more easily because they wouldn’t depend on different libraries that performed the same thing though slightly different.

Anyway, one of the features or patterns requested was a way to perform long running operations, something that looks like threads (there’s a google code project for this in Flex).  I think this is a useful pattern that should be available in this framework I’m dreaming about.  And that there’d be support in the UI for monitoring its progress and canceling it.  It seems easy, have the method implement an ILongRunningOperation interface which can report progress as well as human readable information like the task it is currently performing.  This interface can take an IProgressMonitor interface object to which it can report its progress.

On the UI side, the framework can provide a simple, standard, sample progress bar that implements the IProgressMonitor and that is hooked into the Long Running Operation manager of the framework, so that all the developer has to do is declare a long running operation, give it to the manager, and the manager knows to perform this operation when all other ops are done, or maybe concurrently if the operation does not have to block.

That takes care of 3.

Global Resource Selection Handling

I’m not talking about the Flash global selection handler, I’m talking about a manager above that to which your views can set the selection of native objects in a standard way.  For example, if I have selected a node in the tree example above then the selection would show as an array of one object of type FileResource.  If I’d selected several nodes then the selection would be a flat list but would have an associated hierarchical selection.   If, instead I’d selected text in the editor it would be a one element array with an object of type TextRunSelection (or something) that encapsulated the start, end and any other attributes of the text.

This selection manager is an essential component that can be used by the command/handler framework when evaluating active-when, visible-when, enabled-when expressions.

That takes care of 5.

Modularity

This one obviously would use Flex modules at its core, but would add a layer above it that would provide the following:

Extension Points: Extension points are basically where you declare your application hooks and in which other modules or plugins can hook into to provide functionality.  An example extension point is an Editor, for example.  Let’s say that I can have different types of editors based on the extension of the file I have selected.  My main application would declare that there’s an extension point called editor through which other plugins or modules can add their own editors.

Extensions: These are the actual things that modules or plugins provide.  My XML editor plugin can provide an extension to the editor extension point that says: If you have selected a resource of type file with the filename ending in “.xml” then use this editor.

The framework would not provide a set of defined extensions, but just the ability to declare extension points.  And it would provide an easy way for applications to request what extensions are declared for some extension point.

If we wanted to get fancy, the plugin framework would allow the developer to provide all this in a plugin descriptor as well as initial proxy objects that would delay the actual loading or instantiation of a plugin until it was actually needed.  I think this level of delaying might not be desirable, however, as it would add a level of complexity to the extension user because they’d have to account for the asynchronous nature of module loading when accessing proxy classes.

One additional benefit of a layer above Flex modules is that developers would not have to worry about adding the latest best practices to flex module  handling that are discovered as bugs and other “features” of Flex modules pop up.  It would also relegate the need to deal with application security mostly to the plugin framework and away from the application developer.

That takes care of 6.

Stuck in the Weeds

My old business partner had a great expression: Whenever I’d start proposing solutions in terms of MVC or using httpservice vs. remoteobject he’d tell me: “Robert, you’re stuck in the weeds!”  It’s obvious what he means: I’m focusing too much in the details without stepping back and looking at the whole problem.  What am I trying to accomplish?

When I picked up Flex I started without a framework, then I started with Cairngorm.  The application grew in complexity and it seemed Cairngorm just made it too hard to keep going.  Then we stepped back and we thought about MVC and how we could use the basic stuff that Flex provided to code in MVC rigorously.  It worked, but we were still stuck in the weeds.  It was hard to add stuff to our application.  One sign of the problem with just thinking in MVC was that when we talked to the client they didn’t talk about views or models or controllers, they talked about editing things, loading resources, selecting stuff, undoing this, selecting that file, selecting this text.  Cutting and pasting that, adding a page.  (forget about use cases and user experience for now)

So I stepped back and started thinking about application level services.  I’d worked with Eclipse for a long time before Flex and I remembered how easy it was too think in terms of what the application does.  I’ve written some complex stuff in Eclipse and it wasn’t trivial but it was fairly easy.  Why couldn’t I do the same with Flex?

I don’t mean to say that the frameworks out there are focusing on the wrong things; they are targeted at the layer they are meant to target.  I think many Flex developers are stuck in the weeds, however.  They’re looking at the wrong level when they’re looking for a framework to build their apps on top of.  Where the focus is wrong, I think, is in the energy devoted to creating these frameworks and advocating their use as the solution to Flex application coding difficulties.

Why don’t I start this framework?  I may. I’m not sure what the level of interest is.  I felt the need to put this out there to see if I can make the case that the majority of Flex developers are stuck in the weeds.

Los Angeles Google Technologies User Group: Jason Robbins on Google Code

Friday, August 14th, 2009

I’m happy to announce that Jason Robbins will be our guest speaker for the first Los Angeles Google Technologies User Group. He’ll be talking about Google Code.

When:
8/19/2009, 7pm to 9pm

Where:
Google Santa Monica
604 Arizona Ave
Santa Monica (right by the 3rd street promenade)

What:
Jason Robbins on Google Code.

Find out more about Jason and the meeting at the LAGTUG home page: http://www.losangeles-gtug.org/

See you there!

My First Google Wave

Friday, July 31st, 2009

I just got my developer sandbox account for Google Wave.  I’m testing it out.  My dev wave account is robert dot cadena at wavesandbox dot com. If you don’t see the content between the two lines below then you don’t have Google Wave sandbox access. I’ll post a screenshot later.


[edited: the wave used to be here but I removed it after the beta period ended]


It’s a bit slow to show up and on Safari you get a huge white vertical space.

There are a few things I’m a little confused about but hopefully some docs will tell me what to do. For example, I thought I’d change my settings via the settie robot, but when I click on him nothing comes up. I’m not sure how to interact with settie.

I wanted to change my photo so I thought I could do it through that. But, it turns out you can do so by clicking on your photo on the bottom left “contacts” window and selecting Change Photo. Here’s a screen cap:

google_wave_change_photo

You then get taken to a Google Apps account where you can click on Settings and select change your photo.

These names are also something I’ll have to get used to. I’m trying to imagine myself saying: I sent you a blip, ma! Or, blip me the link. But, I guess I got used to saying “I twittered about it”.

Coming to LA - Google Technologies User Group

Wednesday, July 29th, 2009

Los Angeles GTUG

August 19th is the first meeting of the Los Angeles Google Technologies User Group in Santa Monica.

The meetings will feature presentations from Googlers and non-Google people on Google technologies like GWT, Android, Wave, and Chrome.

We’re still working on the topic for the first meeting and I’ll post an update on this blog about it and twitter about it.

The meetings will take place from 7-9pm on the 3rd Wednesday of every month at the Santa Monica Google offices at 604 Arizona Avenue.

Check out the website for updates http://www.losangeles-gtug.org/ and follow us on twitter @LosAngelesGTUG

Come by and introduce yourself!

Wooden Automata

Saturday, March 14th, 2009

I’m not at SXSW this year, so I’ve spent my time working on a few new media projects.  I was looking around for some ideas for putting together a mechanism for one of the projects and I came upon these wonderful videos of wooden automata on YouTube.

Below are some of my favorites:

The Barecats

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

Luppa Turca:

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

The Man from Limerick:

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

Manet’s Olympia:

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

Fertilisation:

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

You can see more from Cabaret Mechanical Theatre on their YouTube page: http://www.youtube.com/user/CabaretMechTheatre or at their site: http://www.cabaret.co.uk/

March 2009 - RIA Buzz >> NewsFlash

Wednesday, March 11th, 2009

The March 2009 issue Adobe’s NewsFlash is out.  This is the monthly newsletter for Flash Platform Developers that used to be called RIA Buzz.  I like the new name, as it points out that we’re talking about the entire Flash platform, including AIR, Flex, PDF, server side, Ajax, and more.

Check out the issue and sign up to receive an email announcement when the next newsletter comes out.

Also, I’m always looking for new content for my segment of the newsletter, so if you have any interesting leads send them to me: robert.cadena@gmail.com.

#tweetcoding winners announced

Wednesday, March 11th, 2009

The winners of the 1st round of #tweetcoding have been announced. #tweetcoding is a contest where you submit to twitter a bit of AS3 code that does something interesting in 140 characters or less.  @gskinner, @adobeted, and @NeoRiley had to comb through 250 interesting entries and decide on the winner.  It came down to a tie between two really cool apps.

Surprisingly, I didn’t have time to submit something in 140 characters but I did have time to write a couple of server side python scripts to download and compile the entries and put them up on http://tweetcoding.machine501.com/.

When the contest was really getting going and entries were coming in pretty frequently my scripts ran into the Twitter API rate throttling.  I asked twitter on a Friday afternoon for permission to whitelist my app and raise the limit.  To my amazement, they replied in just a few hours, right before the end of the day on the west coast, and let me know that the app could make calls above the throttle limit.  So, many thanks to the twitter folks for following up so fast.  This obviously increases the popularity of their system, even if just by a little bit.  In fact, I saw someone say they joined twitter just to participate in the contest.  Awesome.

This was a great experience with twitter.  I was pretty slammed with work at the time so sometimes the compiling process was stalled or failed and I couldn’t get to fixing the bug right away.  But, it was tons of fun.  @skiller asked if we’d thought about putting the contest up for public voting.  That sounds like an interesting proposition and I was thinking of using Django to code up something cool, as well as polishing up the interface.

#tweetcoding AS3 code in 140 chars or less

Wednesday, February 18th, 2009

#tweetcoding

@gskinner started off a little contest where the object is to create an interesting SWF in 140 characters or less of AS3 code.  

I went ahead and wrote a server side script that scans the tweets submitted to this contest and compiles the entries then makes them available here: http://tweetcoding.machine501.com/

There are already some interesting pieces submitted and Adobe has pitched in with a copy of Flash CS4 as a prize.

Check out the #tweetcoding rules

This was done easily with the Flex 3 SDK and some python scripts.  Many thanks to

BeautifulSoup for HTML entity parsing

Python Twitter Tools for a great, minimalist Twitter API that works on Python 2.3

And, of course, Twitter.

Oh, and the Flex SDK team