Charles Engelke’s Blog

July 23, 2010

Fantastic Friday at OSCON

Filed under: Uncategorized — Charles Engelke @ 3:43 pm
Tags:

Well, they saved the best for last.  In general I found this year’s OSCON to be pretty weak in content, but today has been great.  In particular, Simon Wardley’s keynote was excellent (and clearly much longer than it was expected to be, but well worth the time), and Tim Bray’s talk on Practical Concurrency was the best of the conference.

We will close out with what is sure to be an entertaining talk on the world’s worst inventions from Paul Fenwick, and then be on our own for the rest of the day until our red-eye flight home late tonight.

July 22, 2010

Node.js at OSCON

Filed under: Uncategorized — Charles Engelke @ 8:12 pm
Tags:

Tom Hughes-Croucher is going to tell us about Node.js, a JavaScript web server.  He starts by offering a doughnut to anyone asking non-awful questions.

Why server-side JavaScript?  Well, first there are a lot of JavaScript programmers.  Pretty much all web programmers use it, because that’s all they have available on the client.  So why not use it on the server, too?  And why write things twice, separately for the server and client sides?  And progressive enhancement is free (close enough to free).

JavaScript runtimes include V8 (Google) in C++, Spider Monkey (Mozilla) in C++, Rhino (Mozilla) in Java, JavaScript Core (Apple) in C++.  V8 is significantly faster than Spider Monkey (at the moment), but Mozilla is coming back with Trace Monkey.  Google’s success with V8 has sparked a speed war among JavaScript and browser builders.

Node.js is a server-side JavaScript process that uses V8.  It runs on anything POSIX-enough. (May be okay on Cygwin on Windows.)  It’s non-blocking and event driven.  It uses the CommonJS module format (we’ll find out soon what that means).  Node is very fast.  It’s almost as fast as nginx, which is all native C and highly optimized.

Here’s some code (I think I got it down right):

var http = require('http');
http.createServer(function (req, res) {
   res.writeHead(200, {'Content-Type': 'text/plain'});
   res.end('Hello, World\n');
}).listen(8124, '127.0.0.1');
console.log('Server started.\n');

There are plenty of packages available for Node.js, which can be installed with NPM, the Node Package Manager.  Which is itself written in JavaScript.

He shows more examples, and explains how to use things.  A very good session.

JavaScript at OSCON

Filed under: Uncategorized — Charles Engelke @ 3:07 pm
Tags:

I’m starting day 2 here with session on JavaScript.  First up is Programming Web Sockets by Sean Sullivan, to be followed by a talk on jQuery UI by Mike Hostetler and Jonathan Sharp.

Web sockets are a lightweight way for web servers and clients to communicate instead of using full HTTP.  Think of it as a push technology.  We start with an example of a multi-player game.  There are two specs to learn: the API and the protocol.  As a programmer, we care more about the API, which is how we use the facility.  He gives it all on one slide, which I don’t have time to show here.  Basically, instantiate a new WebSocket object, set some handlers for various events on it (like receiving and handling data: onopen, onmessage, onerror, onclose), and put data into it with a send method.  Eventually, call the close method to stop using the web socket.  It does look quite simple.

But how do I program the server-side?  That’s more fluid right now; the protocol specification is changing in incompatible ways.  On the browser side, we have support in Chrome 4.0.249.0 and later, Safari 5.0, Firefox 4.0.  IE 9?  Still not known.  Apparently (per a tweet from yesterday) Apple used to support web sockets in iOS, but now no longer does.  On the server side, there’s an enhancement request in for Apache httpd.  There’s a Python extension called pywebsocket available, though.  Django supports web sockets, and maybe some Ruby stuff, too.  Jetty has it.

No actual coding examples, which is a disappointment to me.  We’re finishing early, and have a long gap until the jQuery UI talk (which I think may be pretty full).

It is pretty full, but not standing-room only.

We start with effects, which are pretty ways to show changes on elements.  There’s not much meat here.  Now we move on to interactions, which are more functional.  For example, make an element draggable and attach handlers to various events related to that.  There’s also making a list sortable.

This is all great stuff, but I think I see why I have a hard time getting into it.  There isn’t a grand core idea here, but instead an enormous number of small, focused helper tools.  So a talk like this touches on one and then moves on right away.  Forty minutes of that is hard to stay focused on.  But now we’re getting a more complete coding example.  I don’t know; I like the functionality and appearance, but the necessary coding seems very complex for the examples.

It’s convinced me to use it, anyway.

Android Hands-on at OSCON

Filed under: Uncategorized — Charles Engelke @ 12:37 am
Tags: ,

Well, I really didn’t think Google would do it (again) but they handed out free phones to everyone attending this three hour evening session.  We all got a Nexus One, on AT&T frequencies by default, but you could ask for a T-Mobile one.  It only matters for 3G data; 2G data and voice are the same on both.

So now I’ve received four free phones from Google over the last 14 months.  I’m using one as a phone, two others for development and sharing with co-workers, and now I have to figure out whether I’m going to migrate to this fourth one, or pass it on to a co-worker, and use it just for development.  I’m sure not complaining, though.

I took an Android development class at Google IO in May, but it only last an hour and really just gave us time to take an existing app and uncomment code bit by bit to see what it did.  I’m hoping to get a bit deeper tonight.

We’re starting with design principles, not jumping right into programming.  Mobile apps are a bit different from desktop ones, and Google says that they want people to create great ones.  Though I don’t know how much attention folks are paying to the speaker; they’re unboxing and setting up their phones.

Some good UI points: don’t just port your UI from other platforms; your app should behave like other apps on the same platform.  Don’t do positioning and sizing that won’t adjust to different devices.  Don’t overuse modal dialogs.  Of course, DO support different resolutions, handle orientation changes, support non-touch navigation, and make large, obvious tap targets.

[Yes, I swear I'm paying attention.  But I'm also updating my new phone to FroYo!]

Design philosophy: choose clear over “simple”.  Focus on content, not chrome.  Enhance the app through use of the cloud (Yes!).

Show feedback: have at least four states for all interactive UI elements: default, disabled, focused, pressed.

Avoid confirmation dialogs (are you sure?).  Instead, support undo.

(By the way, we’re back on the OSCON_BG wi-fi tonight, and it’s performing very badly again.  Of course, that might be due to everyone downloading FroYo to their phones via wi-fi, since they didn’t come with SIMs.)

Some new UI design patterns: Dashboard, Action Bar, and Quick Actions.  They’ll show them in the context of the new Android twitter app.

This is all good content, but I’m ready for the “hands-on” part.  Let’s build something.

Tim Bray just announced that Android is now shipping 160,000 phones a day, which comes to more than 50 million a year.  So developers should be interested in creating apps for it, and tools to create apps for it.  (Nobody’s mentioned AppInventor yet, though.)

Now we’re going to talk about how to have your app interact with RESTful services.  I missed that session at Google IO (too much competing content there) and I care deeply about this, so I’m really glad to see this.  First issue: why a native REST Client versus a Mobile Web App?  Basically because web apps can’t do all the things a native app can do.  Yet.  Google’s working on it making web apps more and more capable, but there are still things you can’t do on your phone with a web app that you could do with a native app.

First up for REST: how not to do it.  Start up a new thread to talk to the remote server, save results in memory, and then have your main thread take that data out of memory and use it.  Why is this bad?  Well, the OS can shut down the process any time the user navigates away from it (since the device has limited memory).  So if you haven’t finished the fetch, or processed the data fetched to memory, it’s gone and you’ll have to do it over.  Instead, you need to start a service for this, which the OS won’t kill as easily, and if it does kill it, the OS will save and later restore the state.

Now we’ll see step by step how to do that.  There’s a diagram showing with 11 steps involved to have your activity create and use a service to perform a REST method.  The specific example is getting a list of photos in an album, or saving a new photo to an album, accessed via a RESTful web service.  Some other tips:

  • Can use the new built-in JSON parser in FroYo
  • Always enable gzip encoding.  If the server supports it, it will not only download faster, but use the radio (and hence the battery) less.
  • Run the method in a worker thread
  • Use the Apache HTTP client library

The whole thing starts when the Service receives the Intent sent by the Service Helper and starts the correct REST method.  Then the Processor that actually makes the request is done it triggers a callback, and then the Service Helper invoices the “Service Helper binder callback”.  (I think I know what they mean by that.)  It can queue multiple downloads.

That was how the Service responds to the Service Helper.  Where does that come in?  It’s what your Activity actually invokes.  It’s a singleton that exposes a simple (asynchronous) API to be used by the user interface.

(Again, good information.  But where’s the hands-on?  I’ve already created the Hello, Android example and pushed it to the new phone, but I want to create something tonight!)

I’ve been to a couple of short session on programming Android, and created the baby Hello, World app, but I’m barely keeping up at this point.  I strongly suspect that this example is way too complicated for the majority of people here who just don’t have any Android context to put it in yet.

Okay, we’ve finally finished the description of how that would work.  Now we’re going to hear how to use the ContentProvider API.  Which is apparently much simpler.  Okay, now we have the background to understand all the stuff the Content Provider is doing for us.  And finally, the third option is to use something called a Sync adapter.  Those are new in Android 2.0+, and they are important.  Use them!  They’re battery efficient, but not instantaneous due to queueing.

Well, we’re moving on the Android NDK development kit (for native C/C++ code instead of using Java).  I no longer believe that there will be any hands-on this evening.  Good information, though.  However, I have no intention of programming Android in C/C++.  Still, there are nice advances.  You can now debug NDK application on retail devices, starting with Android 2.2.  But we’re now seeing the original Tetris code (from Russia, from a long time ago) running natively on an Android phone using it.  Cool, but I’m still not going to do it myself.

And that’s it.  No actual hands-on, except what I’ve done myself during gaps in the talks.  But still a great session (even without the free phone, but FroYo is cool.)

July 21, 2010

OSCON Infrastructure

Filed under: Uncategorized — Charles Engelke @ 5:29 pm
Tags:

The wi-fi is working great today.  (Maybe it wasn’t offered as wireless-N yesterday?  The access point was just called OSCONBG.)  But now the air conditioning is no good.  For the first time I’m uncomfortable.  It must be over 80.  The temperature isn’t so bad, but the air is completely stagnant.

Devops

Filed under: Uncategorized — Charles Engelke @ 4:55 pm
Tags:

Or is is DevOps?  Regardless, it still looks like an ugly name to me.  I’ve been hearing this word for two days now, and nobody ever bothers to define it, nor give the derivation of the word.  From context, the word is clearly combined from Development and Operations, and seems to refer to managing operations for applications deployed in the cloud.

It seems like a good idea to me.  I know I have long found that developers with some operations experience, or at least perspective, really bring a lot to the creation of easily deployed and managed systems.

Mobile Apps with HTML, CSS, and JavaScript

Filed under: Uncategorized — Charles Engelke @ 4:51 pm
Tags:

This morning’s talk by Jonathan Stark was excellent.  In particular, I’m definitely going to be using jQTouch, and probably will use PhoneGap.  In fact, I think I’d like a version of PhoneGap for Windows – let me deploy a web application inside a native wrapper, with extensions that let me manipulate the machine via JavaScript.

OSCON Begins

Filed under: Uncategorized — Charles Engelke @ 1:43 pm
Tags:

Yesterday’s Cloud Summit was pretty good.  I didn’t get a lot of detailed, concrete information, but acquired a good overview of what’s going on and how the pieces all need to connect.  But today, the real conference begins.

The morning began with “keynotes”.  I put that in quotes, because they were more like lightning talks.  But since the speakers were mostly executives instead of technical staff, they each needed ten minutes to make their points, not just the five usually allocated to a lightning talk.  The talks were okay, and whenever one dragged it was over soon, but they didn’t add much.  If they just skipped them, and had one or two real, deeply interesting keynotes, for the entire conference, that would be a lot better.  As it is, the conference itself doesn’t get started until nearly 11:00 AM.

For the rest of the morning (actually, the middle of the day) I’m going to attend sessions on programming for mobile devices.  First up is Android, the Whats & Wherefores by Dan Morrill of Google.  I’m already somewhat familiar with Android, so may not see much new.  But the second half the session is about Building Mobile Apps with HTML, CSS, and JavaScript, by Jonathan Stark, and I am very deeply interested in that topic.  I like all mobile platforms, but I don’t want to have to master lots of different technologies.  I think web technologies are mature enough to meet my development needs.

July 20, 2010

Trying OSCON’s Wi-Fi Again

Filed under: Uncategorized — Charles Engelke @ 5:55 pm
Tags:

Let’s see if things go better this afternoon.  We’re going to have a few debates in the afternoon, starting with one about the importance of open standards for cloud computing.  Sam Johnston of Google (his blog is here) starts the debate, speaking in favor of the importance of open standards.  After he’s had 15 minutes to present his case, Benjamin Black will have 15 minutes to make the opposite case.  Then there will be 15 minutes of back and forth, between the speakers and with a “jury” and audience members.

The “for” argument isn’t very interesting to me, because I already agree with what he’s saying.  I need to hear some contrary information when the opposition comes on.  Which is now starting.  Black starts by pointing to the dysfunctional processes often behind defining and agreeing to standards with a Monty Python video (the fish-slapping dance).  Then: what’s important?  Utility.  If it doesn’t solve my problem, I don’t care about standards.  Then interoperability.  Then being free of vendor lock-in (independence).  Those three aren’t all equal.

Some problems don’t need go past utility.  For example, SQL (in reality, not in theory).  His point seems to be that there is no meaningful interoperability between SQL implementations, yet we still use SQL.  Well, I don’t think I agree with the premise there.  A lack of perfect interoperability doesn’t mean that there isn’t any interoperability!

Suppose something new comes out with massive utility and a lot of imperfection.  People will adopt it rapidly.  Then you get lots of competition and exploration, and lots of “standards” that are all different from each other (think networking in the early days).  Eventually, the different islands begin to interoperate with each other as demanded by their users.  That’s where the cloud is now.  So it’s too early to define what the correct standards should be.

That happens in the next stage: maturation.  That’s where we worry about independence, not earlier.  Successful standards formalize what is already true.  ”Standards are side effects of successful technology.” “All successful standards are de facto standards.”

All good points.  But is there nothing in cloud computing ready to benefit from the independence?  His next point is that, even if so, it’s too early.  Because as things become more standardized, the rate of innovation has to drop, and we aren’t ready for that to happen in the cloud.  Very good quote: Standardize too soon, and you lock in to the wrong thing.

Excellent speaker, and I agree with his points.  But not necessarily all his conclusions.  Mainly, I think some cloud issues are more mature that he seems to be saying, and are ready to improve interoperability, and perhaps even independence.  But he makes a great case.

There’s some back and forth and questions next.  It seems that they favor the “against” position.  But it seems that the question has changed a bit over the talk.  Now people are agreeing that a priori standards are bad.  But the question was about whether any standards were needed.

The next debate is on whether Open APIs are enough to prevent vendor lock-in.  George Reese will argue that they are; James Duncan will say that they aren’t.  Of course, the question starts with trying to determine just what would make an API “open”.  But that’s dismissed early on as not the core question.  It seems that the “pro” advocate is arguing against it: even if the APIs are open, if the platform itself isn’t, then you can’t take your top layer and move it elsewhere.

I don’t find this debate very interesting, though.  Nothing really new or useful for me.  But the first debate was excellent.  It’s a good format.

On the plus side, the conference Wi-fi is kind of working now.  It’s not great, but not dead, either.  I notice a lot of non-conference access points are now gone; I wonder if interference, rather than bandwidth, was the major problem.

No more blogging at OSCON

Filed under: Uncategorized — Charles Engelke @ 2:13 pm
Tags:

I’ve had to switch to my phone because wifi is unusable. They say they have 60Mb/s, which sounds like a lot until you divide it by a few thousand users.

Swype on android is great, but requires too much attention while trying to listen.

OSCON Cloud Summit

Filed under: Uncategorized — Charles Engelke @ 1:31 pm
Tags:

It’s my first day at OSCON, and I’m starting off with the Cloud Summit.  This post isn’t going to be real reporting or notes on the entire session.  Much of the material isn’t new to me, so I’m just going to record things new to me that I want to be able to remember and find more about later.

The introduction is by Simon Wardley, giving background and introducing the speakers and topics we’ll see the rest of the day.  He compares Cloud Computing to the evolution of electricity as a utility, and references Douglas Parkhill’s 1966 book The Challenge of the Computer Utility.

Mark Masterson is talking about cloud computing and the enterprise.  Risk is the likelihood of failure times the cost of failure.  Business has almost totally focused on the first term in the equation, trying to reduce the likelihood of failure, because they viewed the cost of failure is more or less a fixed amount.  But it’s not, and cloud computing is one thing that can reduce that cost.  If you focus on reducing the odds of failure, you have to lock in your decisions very early, and can’t explore some options.  If instead you accept a higher chance of failure, and pursue options that have a low cost of failure instead, you give yourself more options.  And you manage your risk just as well as the other way.  (This sounds a lot like agile development methodologies to me; don’t try so hard to not fail, instead fail early and cheaply and correct your path as you go.)

Subar Kumaraswamy of eBay is talking next, about Security and Identity in Cloud.  He starts with a slide showing a frightened manager, surrounded by scary orange dangers of using cloud computing: Compliance, Rogue Administrator, Governance, and many others.  But this is followed by a slide of a focused and contented developer, surrounded by soothing green virtues of cloud computing: iterative in hours, self service, empowered developers, and more.  The rest of his talk is focused on one key area: identity management.

On to John Willis.  ”Cloudy Operations.”  In a cloudy world, the prime constraint should be the time it takes to restore your data.  Because you can rebuild all the infrastructure on demand, even in case of a disaster.  But you can’t be up and running until your instance data is live.

“Cloud Myths, Schemes and Dirty Little Secrets” by Patrick Kerpan up next.  Focus has been on making the physical virtual – Citrix on the desktop, VMWare on the server or Amazon EC2.  Dirty little secrets.  Ephemeral versus persistent images.  Ephemeral images disappear, but persistent ones too easy to treat like metal, errors accumulate, history of changes lost.  If you have a lot of data in the cloud, you can’t get it out quickly.  State is the monster (sounds like the last talk).

What is generally happening around us now is the beginning of the long, slow migration of the traditional enterprise to agile infrastructure; whether public, private or hybrid cloud.

The last talk before the break is called “Curing Addiction is Easier” by Stephen O’Grady.  Everybody has an API, but what about interoperability?  He mentioned Delta Cloud initiative (or maybe that’s δ-cloud), which is a layer on top of the API, for that reason.  No one has portability, but it’s not really a problem.  Most businesses want a solution now, and will defer worrying about tomorrow if they can solve their problem today.

That concludes the Cloud Scene theme for the day.  Not a lot of new stuff for me, but it’s supposed to set the scene and get us all on the same level.  Between the break and lunch we’ll see some Future Thinking.

May 18, 2010

Google Chrome Extensions 101

Filed under: Uncategorized — Charles Engelke @ 11:48 pm

My second Google IO Bootcamp session, presented by Antony Sargent.

I hope I can find his slides on-line. They are based on this HTML5 presentation that’s been floating around. At least, it looks like it.

Chrome Extensions are written using HTML, CSS, and JavaScript. HTML5 is giving you many more capabilities already, even without writing new extensions. Native code is coming; it runs in sandbox of the browser. But that’s not what we’re talking about now.

There’s a gallery of extensions at chrome.google.com/extensions. In general, you can post any kind of extension there. No review process unless your code uses certain restricted APIs (in which case you’ll have to sign something indemnifying Google).

Extensions are easy to install. Click on a link and download.

Writing extensions is “Like writing a website” (where all your users have a really fast, standards-compliant browser). But they add some simple APIs for things a regular web page can’t do.

  • bookmarks
  • history
  • i18n
  • processes
  • tabs/windows

Start an extension with manifest.json file

{
   "name" : "Sample manifest file",
   "version" : "1.0",
   "permissions" : [...],
   "description" : "My first extension",
   "icons" : {
      "48" : "icon-48.png",
      "128" : "icon-128.png"
   }
}

Permissions is an array of permissions you need. For example, you can say you want to use cross-site Ajax requests.

You develop extensions right in Chrome itself. You need a text editor, nothing else special.

Enter the URL chrome://extensions/ (or use a menu choice to get to Extensions manager). Click on “Developer mode” to get buttons for development. Put your work in a single folder, and point to it here.

“Isolated Worlds”. Your content script for your extension can see the DOM, but not JavaScript locals in your own page.

Introducing the background page. Not displayed anywhere, but “rendered” by the browser in a hidden page. This is where you’re going to register listener functions, etc. There are APIs for this background page and your content page to communication with each other.

Much of the API is asynchronous.

Experimental APIs need to be enabled with command line options when launching Chrome.

We went very fast and covered very detailed items without enough time, but detailed documentation is all on-line. Seems easy for web developers. I’m not sure why I want to do this, though.

Android 101: Writing and Publishing Android Applications

Filed under: Uncategorized — Charles Engelke @ 6:43 pm

I’m attending the first IO Bootcamp at this year’s Google IO. It’s just starting, and my first session is Android 101, presented by Roman Nurik from the Android Development Team. These are my very rough notes.

This talk is about writing your app and then publishing it (hence the name).

Writing your App

  • platform features
  • surfacing your UI
  • intents (“awesome” pay attention)
  • speech, location, sensors
  • native development

Publishing your App

  • registering
  • targeting
  • buying and selling
  • other distribution

Android is an open platform, and open source. So is the SDK.

Mostly Java and XML (C/C++ available for native development with NDK).  It’s not native Java bytecode. The bytecode is further compiled to “Dalvik”.

You can replace the core apps with your own.  See http://source.android.com. Almost all (the speaker thinks all) apps are using only public APIs.

More than 60,000 Android devices are shipping each day.

There are many different devices with different screen sizes, resolutions, and pixel densities. Grid of 9: small, normal, large screen by low, medium, high dots per inch.

As of May 17th (prior 14 days), almost nothing with small/low dpi, all the rest with normal screen size. About 2/3 medium pixel density, 1/3 with high density.

An app is collection of several components, defined in AndroidManifest.xml.

  • screens, services, programs, types of things it listens to, types of content it provides
  • Activities
  • Services
  • Content Providers
  • Broadcast Receivers

Surfacing your UI

Launcher icons, status bar notification, widgets (very little code, mostly just a simple UI), quick search box (since 1.6), live folders and live wallpapers.

Concurrency

Users can multitask. Their apps get paused, not closed.

Background services are invisible apps with no GUI, but unobtrusive event notifications.

Intents

Pay attention! Intents “link” activities, services, and receivers.

Consist of

  • an action (e.g., ACTION_VIEW)
  • categories (e.g., CATEGORY_DEFAULT)
  • a URI (e.g., content://contacts/people/123)
  • “Extras” metadata
  • Can also be hard coded class names (com.foo.FooActivity).

Example: press a button. Creates and intent, Uses a URI. You launch the activity. System looks for everything that can handle that intent. “Do you know how to edit a contact?” (Answer is in manifest.)

Intents are both intra- and inter-app.

Example apps: WHERE and OpenTable. WHERE finds a restaurant. You can click “reserve now” in WHERE, and it will fire an intent to OpenTable to make the reservation. Note that WHERE only shows this button if there’s some app installed that can handle the intent.

“Shortest introduction to the important parts of Android” that he’s ever done (less than 30 minutes).

Speech Input

  • voice to text, processed by Google returned to device (and app).
  • Fire an intent. Also every text input box has this automatically with the microphone icon.
  • Understands English, Mandarin, and Japanese.

Location and Mapping
LocationManager service that determines location and bearing.  App can register for periodic updates by time and distance.

Google Maps library

Be sure to target the SDK with maps enabled.

Example: Places directory. Shows you distance and compass bearing. Then can view in Map View, which is very similar to the Google Maps applications.

Hardware and Sensors

  • Camera
  • Microphone
  • Accelerometer
  • Compass

Examples: Layar, Google Goggles

Native Development Kit (NDK)

  • Use in conjunction with the SDK (I guess, not “instead of”)
  • Performance critical code
  • C/C++
  • Also re-use existing code

developer.android.com is the place to get everything. Code, information, it’s all there.

Download the SDK,
Install Eclipse and ADT (Android Developer Tool) plug-in
Look through tutorials and samples
Run them on the emulator or a real device

Strong developer community.

Publishing your app

Register at market.android.com/publish/ to use the market. Has a nominal fee. ($25 when I checked just now.)

Takes only a few minutes from uploading your app until it’s available to all.

“Don’t update too often because then your end users will be pretty pissed.”

Targeting Options:

  • Device capabilities (SDK level, minimum and maximum, Screen size
  • Location
  • Target countries
  • Operators (if applicable, generally discourage this)
  • Matches to user’s service provider

Only certain countries for sellers (9 including US, UK, Japan, some EU).  4 currencies only ($, pounds, euro, yen).

Only a dozen countries for buyers, who must have Google checkout account.  Prices in seller’s currency. Then confirmation, then estimated price in buyer’s currency, then choose payment method.

Can also distribute via USB, or downloading from any website.

Application is in a .apk file, can put it on any site. Users visit the URL of the .apk file, and Android will install it (if “Unknown sources” is checked in device settings).

Very high level overview. I want to understand the specific mechanics of intents a lot better.

April 26, 2010

WS-REST 2010

Filed under: Uncategorized — Charles Engelke @ 10:56 pm

I attended WS-REST 2010 today, the First International Workshop on RESTful Design.  It was a one day affair, co-located with WWW2010, in Raleigh, North Carolina.  I haven’t been to an academic conference in decades, pretty much since I left academia, and it was an interesting experience.  It was somewhat different in tone and focus than the kinds of conferences I usually attend, giving me a different perspective on the material.  It was quite worthwhile.

Craig Fitzgerald and I actually wrote a short paper that the workshop accepted.  I presented it today, on Replacing Legacy Web Services with RESTful Services.  My presentation slides are posted at the conference program page.  The paper itself will be available at the ACM Digital Library, though I can’t find it there yet.  There will be a charge to download it for non-ACM members; since ACM owns the copyright, I can’t post it myself.  However, as I read the copyright terms, it seems that I can provide copies on request.  If you’d like one, post a comment here or e-mail me at restpaper@(this web page’s domain), and after I check with our firm’s legal department to make sure it’s okay, I’ll send you a copy.

April 23, 2010

Browser Performance

Filed under: Uncategorized — Charles Engelke @ 8:13 am

I was talking to a colleague the other day about the performance of web software and I mentioned that there was a big difference in how fast different browsers were. I just dug up some recent benchmarks and figured they’d be of interest.  I’m particularly interested in how extremely high-end JavaScript intensive applications perform in different browsers.

First, IE 6 versus 7 versus 8. There’s not much recent, because benchmarkers are focusing on IE 8. But I did find an article from last year at PC Games Hardware. It shows IE 6 and 7 performing about the same, but IE 8 being nearly twice as fast.

Tom’s Hardware is one of the most careful sites about reviews, and its recent article is excellent. On JavaScript performance, one benchmark shows Google Chrome as 30 times faster than IE 8. Firefox is nearly 5 times faster than IE 8. On others, the Chrome:IE speed ratio was about 6:1, 3:1, and 10:1. The Firefox:IE ratios on those tests was about 3:1, 1:1, and 6:1. On tests involving the DOM we see Chrome:IE of 5:1 and Firefox:IE of 4:1. For CSS the benchmarks show Chrome:IE of 12:1 and Firefox:IE of 2:1.

A (possibly self-serving) set of tests by the Opera browser company shows results mostly consistent with Tom’s Hardware.

A less detailed but very good summary of a bunch of tests is available at Six Revisions. Click on the chart to see it better. The JavaScript speed, DOM selection speed, and CSS rendering speed results probably best reflect how high-end intensive web applications will perform.

April 9, 2010

Apple’s Control-Freakiness

Filed under: Uncategorized — Charles Engelke @ 9:15 am

With the new iPhone SDK 4.0, Apple puts even tighter control on users and developers.  It shouldn’t be a that surprising.  Woody Allen showed us 40 years ago what happens when the idealistic and charismatic revolutionary finally wins:

April 7, 2010

iPad Out-of-Box Experience

Filed under: Uncategorized — Charles Engelke @ 7:07 pm

I just got an iPad for trying things out at work.  I’m excited about it, especially as a web client.  But the out-of-box experience is pretty lousy.  I’m surprised I haven’t seen others talking about this.  It’s been over half an hour, and I’m still not actually using the thing!

First off, I opened the box, unwrapped the iPad, and pressed the Home button.  What happens?  The screen shows a sync cable and says “iTunes”.  Then I looked at the instructions in the box, and find out that before the thing can do anything at all, I have to sync it with iTunes.  Which is ridiculous.  Hasn’t Apple ever heard of the cloud?

So I download iTunes.  All 93.8MB, taking about 15 minutes.  (My home Internet connection is much faster than that; I guess Apple’s bandwidth is swamped.)  Of course, to download it I had to check that I agreed to all the terms and conditions.

Okay, now to install it.  I have to agree to more terms and conditions to do that, but finally it installs.  Even though I downloaded the 64 bit version, the installer says it’s going to install into Program Files (x86), where 32 bit programs go. instead of Program Files.  And though it installed something in the right location for 64 bit programs, it put a lot of stuff in the 32 bit directory.

Finally, iTunes is installed and running.  I’ve got to sign in to my (existing) iTunes account, requiring me to agree to still more terms and conditions.  Now I can finally connect the sync cable.

Hooray!  The iPad wakes up, I can run the web browser (which nicely prompts me to connect to my home network, pretty easily) and I’m off.  So now I’m off to the AppStore on the iPad to get the Kindle and Netflix apps.  But first I’m prompted to download the iBooks application, which I agree to.  It starts downloading, I search for Kindle and get it started, then search for Netflix.

At which point I’m prompted to agree to new terms and conditions for the iTunes store.  I’m now on panel 1 of 58 of those new terms and conditions.

Oh, well.  Eventually I’ll probably be able to use this new gizmo.  I just had to drop a note here about the tremendous failure Apple has here.  This is really ridiculous; nobody but Apple could get away with it.

March 29, 2010

Skype Minimize Annoyance

Filed under: Uncategorized — Charles Engelke @ 1:19 pm

Skype just installed an update today that changed its behavior on Windows 7.  You can’t close the Skype window without completely shutting Skype down.  So you end up with the Skype icon in the system tray (where it belongs, so far as I’m concerned) and another icon in your Windows 7 task bar (where it has no business being when I’m not actively using it).

This isn’t a big deal.  Except it’s been severely annoying me all day long.  I tried fiddling with all sorts of Skype options and searching for Skype help, all to no avail.  Finally I used what I should have tried first: Google.  And near the top of the first results page there was a blog post from My Digital Life that fixed it immediately.  In a nutshell, just run Skype in compatibility mode for an earlier version of Windows (I used Vista SP 2).  And it will start working the way it always has, and that I think it always should.

February 28, 2010

One Year with Kindle

Filed under: Uncategorized — Charles Engelke @ 12:51 pm

I got my first Kindle a year ago this week.  It arrived on February 24, 2009.  Here are some statistics about my book-buying (and book-reading) habits in that year.

I “bought” 176 Kindle books at a cost of $873.43 during that year.  I put “bought” in quotes, because a lot of the books, especially at first, were free or nearly so.  62 of those books cost $0.00 each.  Another 9 cost $1.00 or less.  I read only five of the free books, and four of the under $1.00 books.  Another six of of the free books, and the other five under $1.00 books, were books I’d read in the past and figured, hey, maybe I’ll want to read them again someday, and this is a good deal.

From here on out I’ll leave out the free books I was never seriously interested in.  I’ll also leave out the 6 non-free books my wife bought for her Kindle that I didn’t read.  (She’s read books I’ve bought and vice-versa, but for this post I’ll just treat everything I bought or read by itself.)  That leaves 112 books bought for $817.01, for an average price of $7.29.  The Kindle itself cost $359.00; amortized over just the first year, it added $3.21 to the cost of each book.  Of course the Kindle’s still going strong, and new ones are cheaper, so the actual cost of the hardware per book should be considered to be much lower.

The most common price I paid for a Kindle book was the famous $9.99 that’s always talked about.  41 books cost me that much; slightly more than a third of my purchases.  I paid more than that for 9 books: one was $15.83, three were $14.27, and the others ranged from $11.20 to $13.73.  Most of those books are now $9.99 or less (after all, many are now out in paperback), but two have gone up about $0.50 each.  The majority of books I bought were less than $9.99; they averaged $6.13.  Most of the Kindle books (80% or more) were fiction.

I’ve been pretty price-sensitive for the Kindle books.  I’ve notice that a lot of the prices over $9.99 fluctuate from day to day, so I’d watch and buy them only when they dropped enough for me.  It’s not that I’m not willing to pay more for a Kindle book, but I’m not willing to pay more than I think they should cost.  Which, despite what publishers and many authors insist, is significantly less than a paper book.  I’d say about a third less than a hardback.  (And that’s a third less than the price I actually pay for a hardback, not the list price.)  Say about 40% of the list price of a hardback.  I could go up to about 50% of list if they’d get rid of DRM and offer books in formats I could use on any device.  Why not more?  Well, I generally pay 65% of list for a physical book, and not having to print, handle, and ship the book should result in savings passed on to me.

What about other books I bought during that year?  Not counting gifts or books for work, I seem to have bought approximately:

  • 3 novels in Kindle compatible format for a total of $14.99, an average of $5.00 per book.  I wanted to buy all three from Amazon, but the publishers didn’t offer them that way.  One was bought directly from Baen books for $6.00 (I would gladly have paid $9.99), one from Fictionwise for $8.99, and one downloaded from Cory Doctorow’s personal site for free (again, I would have gladly paid).
  • 21 physical books from Amazon for $325.06, average price $15.48.  Some of these were special editions from small presses (Subterranean Press and University of Chicago Press) not otherwise available, one (Donald Westlake’s last novel) was sentimental, a couple were remainders cheaper than the Kindle editions, two just weren’t available in Kindle, and the others (travel and comics) had a lot of images not well suited to the Kindle.
  • 3 physical books bought from overseas because they weren’t yet published in the United States.  It’s a pain to look up their prices, bit I recall them being about $30 each, when shipping was included.
  • 14 technical books from Manning and Pragmatic Programmers, all in electronic format, for $332.86, an average of $23.78.  About half these books were both on paper and electronic, the rest only electronic.
  • A handful of paperbacks bought on impulse while traveling.

So, putting it all together, I bought around 158 books and spent about $1600, or $10 per book.  If you add in the cost of the Kindle itself, I spent about $2000 on books during the year.  And contrary to what some people think, I completed more of the books I bought on the Kindle (at least 95% of them) than the ones on paper, even if you only count fiction.

I have become very reluctant to read a novel in paper form, especially hardback.  They’re too heavy while reading and inconvenient to carry on trips.  If a book isn’t available on the Kindle, I’m very unlikely to buy it now.  Minotaur Books, you should take note.  You’ve lost a few sales to me I would have bought in hardback a year ago because you won’t offer Kindle editions.

January 31, 2010

Macmillan vs. Amazon (vs. Authors and Readers)

Filed under: Uncategorized — Charles Engelke @ 1:55 pm

Amazon.com and Macmillan publishing are playing hardball with each other.  As of right now, Amazon isn’t selling any of Macmillan’s books in any format.  This is very bad for writers and readers, and has drawn a lot of attention.  There have been a several good posts at John Scalzi’s blog, and a great one at Charlie Stross’s blog.  The New York Times Bits blog and Wall Street Journal have also covered this, but not with much clarity or depth.  Macmillan has publicly commented, but so far Amazon has not.

Most of the articles and comments (other than Charlie Stross’s post) say that this about e-b00k prices.  That doesn’t seem to be quite correct.  True, Amazon wants e-books to sell for about $10 and Macmillan wants them to be about $15, but that’s not what has triggered this extreme tactic.  It seems that Macmillan has offered Amazon a choice: sell our e-books as an agent instead of a retailer, or else wait 7 months after hardcover release to sell them at all.  It seems implicit that Macmillan will not allow Amazon to continue paying hardcover wholesale to retail the e-books right away (which is what they do now).

Those are both terrible options for Amazon. If they’re just one of many agents, all selling the exact same product for the exact same price, how do they beat their competition? Smoother payment and delivery systems help, but they’re not enough. And if e-books are delayed for 7 months, they’ll just plain fail as a product.

Amazon’s retaliatory move is extreme and is hurting a lot of bystanders. I don’t support it, but I do support their position that Macmillan’s offer (demand?) is unacceptable. Publisher-fixed pricing or 7 month delays would be bad for Amazon, bad for customers, and (I believe) bad for authors. It might even be bad for the publishers; businesses aren’t always great judges of how future market changes will affect them.

I think Amazon understands the e-book marketplace much better than Macmillan.  I even think they understand the traditional book marketplace better.  Let the market sort this out to see who is right.  Macmillan wants to take the market partly out of the equation: no retailers involved in pricing at all.  There are countries that work that way for physical books, and I think it works poorly there.  It protects incumbent publishers and stifles innovation.  Macmillan’s just wrong here.

Update: Macmillan has now directly posted a statement on Tor.com.  Among many other issues, they state that they are trying to encourage a business model that “encourages healthy competition” and is “is stable and rational”.  Later, it states that the disagreement is about “the long-term viability and stability of the digital book market”.  [Emphasis mine.]

A market with healthy competition is not stable.  A stable market doesn’t have healthy competition.  Macmillan is an incumbent and wants to stay that way, comfortably.  Amazon’s something of an incumbent itself, but it seeks change, not stability, because it has confidence that it can win in a changing world.  I favor Amazon’s point of view.

Next Page »

Blog at WordPress.com.