Apples part of the shifting Television screen.

There has been a lot of speculation this month about Apple TV, changes that make it more than a “Hobby” for Apple, including :

  • re-branding it as iTV -even though that is already a British TV network called ITV. Could the simply license its name to Apple, like what Cicso did with the iPhone?
  • running the same iOs as the iPhone, iPod Touch and iPad – rather that OS X as the current Apple TV and Mac mini do.
  • the talked about $99 price point seems designed to get it in people homes and it much cheap the the current Apple TV price of $229.

We do know that Apple is holding ’special event’ September 1st.
apple_2010090
The invitation shows acoustic guitar with an apple-shaped sound hole, which has some to believe the device is wireless but I think that the Cloud based iTunes will be launched.

It is worth going over the interview with Steve Jobs at the All Things Digital conference this year in June, and in particular what he said (and didn’t) about TV (video)

Nonetheless there is lots of room to speculate about:

  • Because it running a iOS, does this means running it on the same Chip as the iPhone and the iPad, the Apple A4? I have heard that the current chip design can not do 1080p decoding very well, so their may be a change there. Also this device does not have the power and battery considers that the mobile iPad/iPod/iPhone have so I would expect a heftier chip but with the limitation that it needs to be cheap (given the price point).
  • Having access to all those iOs application on your HDTV will be amazing and gives Apple a entry into the Gaming platform world. XBox and PS3 watch out! (and expect another price drop on those boxes!) But, will you be able to use a iOS mobile device as a controller?
  • I expect it will have a Apple Remote Control, but will it also allow (via a app) to be controlled with a iOS mobile device. the iPad as a remote!
  • I don’t expect it will happen, but it will be interesting to see if it has a port to connect your incoming Cable with, and someway to decode the signal. If Apple is serious about replacing your cable box, and reduce box, wire and remote clutter, then this will be there. If there is a Cable connector than I expect it will also allow the Apple TV to act as a PRV.

    There is also a big opportunity to change the TV program grid. View by actor, by director, share play lists of my friends (making TV a social activity again but a very different one), like this episode then : download the next episode from iTunes, the sequal from NetFlixs, buy the music.

    The counter argument to having it act a Cable and PRV device is that it runs counter to the digital bit’s model of getting you programs (in the tv entertainment sense) via itunes or NetFlix or even standalone apps. So Apple may not see it as something it wants or need to do, but it would be a big step in reducing the box clutter.

  • I really do not expect the new device to had a Buy-ray drive or even a DVD drive. Again because it’s counter to the digital bit’s model
  • Speaking of getting your TV Programing directly via App’s, there is speculation that the TV Networks might be interested in having App’s (a NBC App for example), by passing the cable companies (for the TV side at least, but not the Internet broadband access aspect), and monetized either with a free access but with Ads (Apple iAds), or an Ad free subscription la carte model (only pay for the TV stations you want).

    The more interesting aspect of this would be if it allowed independent content producers to do deals that cut out the big distribution networks (like NBC, HBO, etc) and the cable companies! Look at what he original web series “The Guild” has done. Would you pay for access to a “Joss Whedon” channel app? a “The Sopranos” app, a “Aaron Sorkin” or a Lady Gaga app for that matter. Lots of potential for celebrity driven and / or niche market content to be distributed and monetized closer to the creators.

    So in the short term this would allow the Networks to do an end run around the cable companies. This would have a big impact on the Fee-for-carriage debate. But in the longer run (which could be very short in this new environment!) to could allow content creators (certainly the established ones) to do a end run about the TV Distribution networks. This is what is happening in the music industry.

  • Integration with MobileMe would seem very desirable, so I can view and share photo’s on my HDTV, with friends and family
  • I wonder it they might but a “front facing” camera in the device to enable video chat functional? FaceTime TV? Also useful if they what to do fancy motion controller ( like Kinect for Xbox 360, also know as “Project Natal”) like things in future software.
  • iTv has been the suggested name for the device and that was actually the name that Apple TV was originally release under, but other moniker’s come to mind, depending on how ambitious Apple is, : iMedia; iPlay; and iHome.
  • And for that matter they need to be re Brand iTunes to something else. iMedia ?
  • In all of this Net Neutrality (how will your cable internet provide feel about you streaming TV once your stop paying your cable bill?) and bandwidth caps (what do you mean I can’t watch CSI, or my American Idol App!!) are going to become a very big issues. As will DRM.
  • Another point is that for all the (deserved) controversy around the iPad being a media consumption device and not a computing device, the TV has always been a media consumption device. This (might) make it a bit more interactive, a direction it’s being slowly going towards for 20 some years, but this (might) go it a big speed up!
  • Hopefully the Sept 1 event will also mean that the iPod Touch goes A4, retina display, back and forward cameras. a gps chip would be nicetoo to but I doubt it.
    It get a early start on the iPhone games, I going to say that next years model with support the next generation 4G phone network tech as well as GMS and CDMA, possible be dual core, and might have a Near Field Communication (NFC) or RFID function. It needs to be out on multiple carriers. It might be call 4G N (for Next)

So there is lots of room of this to be a game changing platform.

The other 500 pound gorilla is this September’s Google TV launch, which is software (Android?) paired with existing TV Set and Box Top manufactures. The TV manufacture people have been pushing 3D, now that HD is mainstream and a “standard” HD TV set is a “reasonable” price, so they are very interesting in working with Google in order to stay relevant. And Xbox and PS3 platforms are not standing still, so if Apple wants to the center of your Home it needs to get serious.

The game is changing, and your TV is either going to change or disappear.

Update Post Sept 1:Okay I got a lot wrong (no surprise).
Whats good :
the price is USD$ 99
the hardware is very small (4″ square), with A4 chip, quiet and fan less.
AirPlay will let these stream movies, TV shows, music, and photos from iPhone, iPod touch, and iPad to an Apple TV.

the bad:
only 720p not 1028p high definition. this is probably a trade of of size vs quality size it is streaming and very limited storage.
No apps!! This is a big one. And the iOs is completely hidden under a tv interface.
No iOs device remote control
No name change. it’s still Apple TV.

Apple did a very conservative upgrade, no more than want they needed to do to keep in the game but its still a hobby. They could still allow App’s or Streaming of App’s from other iSO devices, and if you have several Apple devices the $99 price point will be tempting to get it, but it’s not going to bring people to Apple, do anything more the Roku Digital Video box does, and Google could steal a march on them here.

Posted in Business, Digital Rights & Wrongs, Hardware, Media, Uncategorized | Leave a comment

Initialize max value with Ruby on Rails ActiveRecord, automagically, from fat controller to smart model

Problem :

you have a Object, lets call it “Item” with a “Display Order” Field, (called display_order, a integer) with controls the order which item are displayed.

When the item is created you could have the field blank and expect the user to know the right place to put it, but a better default is to always have it add to the end of the collection of item’s. Another assumption here is that you can not use a static default value.

I also expect that display_order is required and maybe should be unique – to avoid them all being 1 :)

Update : based on Loop’s comment (below) I would clarify that “Display Order” would be used when you don’t want to display the Item (or Page or …) by the “id” (which would be similar to creation order), or by Name (which makes it easy for us people to find things in a list).

Another use case would be in building a “To Do List” and having a unique and required numeric “Priority” setting; Adding new “To Do’s” to the bottom is one solution.

(if you have more use case suggests, please post in the comments)

In all these use cases, it is implied that there is some way to change the display order. In the best scenario that would mean a user friendly way to re-order the list on a more global index view (for local values of global) using some ajax manipulation of the order values.

So, how to ensure the default is not blank and unique, but always at the end of the collection?

Solution :

generally speaking, the solution is to find the current end value of the display_order, increment it by one and display that as the default value for a new item.

Implementation :

I going to present 3 4 5 working examples of code form “okay” to “good” to “better” all tested in Ruby in Rails 2.3.5 and Ruby 1.8.x

a) In the Fat Controller :


This is a standard generated “new” routine save for line 8 which calls a routine which :

1) uses the ActiveRecord Calculations .maximum method
2) sets the temp value to 0 if that is nil
3) otherwise increments the value by 1

and sets the display_order field in the newly created item object.

This works and is okay, except that, as alluded to in the section title, it makes for a Fat Controller!

Best practice calls for “Thin Controller, Fat Model” where controller only connects data with the view, and the model populates the values. It also increases the readability and testability of the code.

Check out Jamis Buck’s classic post from 2006 Skinny Controller, Fat Model, and a more recent – 2010 – post Rails Best Practices 1: Fat Model – Skinny Controller which talks about moving making the controller skinny.

b) In the Fat Model, the Local Way:

A standard rails model, with display_order being required and unique, except in the addition of a ActiveRecord Callback method after_initialize (see a a great description is in the wiki guide 10.4 after_initialize and after_find).

In the after_initialize, line 6 protects the values of any existing display_order values in the Item, so that default is only set on new Items. The other lines of the after_initialize do the same as the Fat controller version.

This works pretty well, for the simple case where you have only a little bit of edit activity and a small number of people or process’s adding Items. But it won’t scale. Image what would happen if 2 or more Items where created before any new item was saved! They would all have a display_order of X, and any items saved after the first item would get a validation error “Display Order not unique” though no fault of their own.

Lets look at how to save this…

c) In the Fat Model, the Server Way:


What’s different here is the use of a global variable $item_display_order_max_value to store a server level value which is initially tested and if it exists then incremented and used, and only if that is found to be nil then an inquiry is done to the database. This will have better performance because their is only a one ActiveRecord Calculations .maximum method call (which one be significant if the db table items was huge) on the first time a Item is created (and could be done on application start).

There are 2 issues to be aware of :

1) This implementation is only good when the application is running on one machine. if you have 2 or more instances running your application layer than you need to look at storing the value where they all can get at it. probably a shared database. (this this a use case for a NonSQL DB?). So this scales better but not unlimited.

2) It is very easy for non sequential values to get saved in display_order, if new item objects are created but some are not saved (abandoned). So it would be nice to expire the store globe variable after some time of non activity. The ‘best’ way to do this might be to store the date-time of the last update of $item_display_order_max_value and if this is older that X (say 10 minutes) than reset the $item_display_order_max_value with .maximum method. Non sequential values can also happen when items are destroyed / deleted. If this is a issue, it would be best to run a reordering routine in the background to lower values to fill the gaps when their is no edit or creation activity on items.

I’ve got a revised version of the code :


Which incorporates several comments and learnings :

a) rather than self.display_order.nil? I’m using self.new_record? , as per a suggestion.

b) rather than doing Item.maximum(’display_order’), I’m using self.class to get (in this case) ‘Item’ which means one less thing to change and one set closer to a Helper.

c) I’m tracking the dateTime of the last max_value set and discarding it (and going back to the db .maximum method) if it’s older than X seconds. The length of this persistence is depended on the activity, the complexity of the form, and the time to compute .maximum.

d) I simplified the code making it (hopefully) clearer with less duplication.

Another, final revision, with lots of AutoMagic :


What is going on here is I’ve remove all the hard coding that can be removed. The global variables for the values and the dateTime are now a global hashes with the class name being the key.

The only thing you might have to customize is the field name you want to do the initialize max default, be that “display_order” or “sequence_order” or “priority_order”, which is used in the self.class.maximum method call.

Otherwise you can just copy it into the model and step back!!

the only other odd thing going on here is the lines

1
2
$max_initialize_value = Hash.new() if !(defined? $max_initialize_value)
$max_initialize__value_dateTime = Hash.new() if !(defined? $max_initialize__value_dateTime)

which create the 2 global hashes, if they have never been defined before.

Next stop : Gem-Land? (please)

d) as a Active Model Helper

okay I haven’t done this yet :) but I would like to implement the “In the Fat Model, the Server Way” after_initialize as a plugin so that doing something like :

1
initialize_max_value :display_order

which would be really automagical.

I have been pointed to the default_value_for plugin which ‘allows one to define default values for ActiveRecord models in a declarative manner’, which adds static default values to the model. Worthy of further investigation. If I do make this a plugin, I expect it will have to be as a overloading (using ’special’) of the initialize, given the special case that after_initialize is (you can not register after_initialize or after_find using macro-style class methods), so it might not be possible – or easy for values of easy where Ian still has some hair :)

Posted in Code, Ruby and Rails | 1 Comment

Adding a “loading” image to (just about) any form on submit, with jQquery

under the category of the simplest thing that will actual work, I wanted to have one of those nice animate swilling icons running after the user hit the submit button so they knew that something was really happening.

The core code to this is very simple, using jQuery, just have a hidden image tag with the image (one on many “ajax loader images“, even though there is no Ajax involved in this case), use the jQuery .submit() function to bind the the event and show the image using the jQuery .show().

But want I wanted to do was use this across a large number of forms without customizing the forms or the javascript function very much or (even better) at all. Hence this code :

This is assuming there is only one form and only one submit type button.

The 3rd line is checking ( via ($(’#loading_image’).length == 0) ) to see if the image tag has been previously been added to the form, and if not (length==0) inserts the image tag just before the submit button.

Also 2 notes about the img tag I’m inserting (just before the submit or update button) :

  • using the alt=”loading” give me a fail back if the image do not load (probably a img path problem).
  • I could insert more elaborate HTML mark up, even going a far a view point centered lightbox sort of effect.

As an added bonus, the last line disables the submit button to stop the user from resubmitting (or double submitting the form). very very bad.

Posted in Ajax, Code, JavaScript, css | 1 Comment

Jazzing It Up At the Art Museum in Los Angeles, California

On-line travel site Trazzler is making use of my image (on flickr) in it article about free Friday evening Jazz at Los Angeles County Museum of Art (LACMA) in Jazzing It Up At the Art Museum in Los Angeles, California.

LACMA Los Angeles County Museum of Art friday night jazz

(Also, I’m now posting places my images are being used, under the LinkRoll Section and Images.)

Posted in Music, travel | Leave a comment

Quick links as of June 4th 2010

  • May 28
    Jeffery To’s Show Short Link GreaseMonkey Script displays an existing short link for the current page (in the bottom left corner of the window), taking advantage of the short link microFormat. Flickr, YouTube, TechCrunch and all WordPress blogs already use the rel=”shortlink” mircoFormat. Nice!
  • Clarify Your Story Excerpt is a set of questions will help you through the process of testing and validating your idea. Aimed at “Enterprise and Small / Medium Facing Businesses (EME)” they are equal valuable as a questions for any startup.
  • May 31
    Mathew Ingram does a great job puncturing gasbag Nick Carr in Nick Carr’s Retreat From the Internet Continues.

    Mr Carr likes to make big (big) contrary positions and watch as people read and buy his work. He does a service in setting up (some of) these debates, but they rarely seem to hold up.

    Nick Carr’s argues that links (aka HyperLinks, aka “the web”) are bad because readers might click on them and get distracted from the quality of the writing or argument. This looks like the 2010 version of Plato saying “Writing is bad because it causes people not to rely on memory but to rely on something external to them and depend on signs belonging to another.” (Phaedrus).

    This de-values the reader by not connecting them to the referred content, and de-values the writing in assuming the quality of the writing can not hold them or that the content (the argument) cannot stand up, either to the referred content, or to comments. Maybe in a age of finite page size and dead (fixed media), but this goes against the nature and the technology of the web. It also does not trust the reader. In this age, link to the primary sources, the raw data and to the debate. How to link may be a interesting question. But not linking is to show lack of trust and respect to your audience and to suggest you have something to hide.

    See also The Economist’s Tech Blogger Babbage in To link, or not to link? That is the question.

  • An interesting, and non trival test of Comparing E-mail Address Validating Regular Expressions using PHP’s ereg() and preg_match() function finds a winner (where it’s better to accept a few invalid addresses than reject any valid ones) :

    /^([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$/i

    I wonder if these results in torturing regexp email address recognizers will hold up given the variations in regular_expression engines?

  • June 2
    Twitter Exposes Intersections in the Social Graph like my Greasemonkey Follow Rank script http://userscripts.org/scripts/show/64286.
  • June 3rd
    via Geoffrey Wiseman, Git support in Eclipse getting stronger with the release of EGit and JGit 0.8.1
Posted in Code, GreaseMonkey, Startup, Web | 1 Comment

Building a Cascading Drop Down Selection List for Ruby on Rails with jQuery Ajax

A frequent need in building web site application is to have users select one value and then, based on that value, select another value. Real world needs for related values might be : Select a Country and then State or Province; Select a Car Manufacture and then a Car Model. Generically it’s about selecting some Category or Section and then selecting the Sub Category or sub Section, the selection of one field cascades the results in another related field.

Also called Related Drop Down fields or Dependant Drop Down lists or Dynamic Drop Downs or Dependent Drop Downs.

What you want to have happen is something that will look and act like this
If you select Veg’s
Select Veg
and then if you select Meat :
select beef

Also, in the underlying html select tag code, you want values stored and names displayed so you can a)change or correct the names, b) display the names in a different languages but keep the underlying key values.

In the bad old days you might have them select the first value and the go to a new page for the related values, or at best refresh the entire page. Thankfully this is the days of shinny and we haz ajax!! But we still need to get the ducks lined up and quacking in order for this to work. This is my code to do that.

Note that this solution has been tested with RoR 2.3.5 and jQuery 1.4.2 (standard flavours as of early 2010)

you need to have jQuery loaded on the page and the easest way (althought not always the best way) is to pull all the script for m the public/javascrip direcroty of your application with :

1
< %= javascript_include_tag :defaults %>

in the sample I assuming a Section field and a dependent Sub-Section field. From a data model perspective the Section mode has a Id and a Name and has_one :sub_section; and the SubSection has a Id, a Name and a Section Id and belongs_to :section

in the sub_sections controller

1
2
3
4
5
6
    def for_sectionid
      @subsections = SubSection.find( :all, :conditions => [" section_id = ?", params[:id]]  ).sort_by{ |k| k['name'] }    
      respond_to do |format|
        format.json  { render :json => @subsections }      
      end
     end

this is a pretty straight forward piece of code that uses an id passed in the parameters, returns all the subsection objects for that section_id, sorts that collection of subsections by the subsection.name, and renders that collection as a json object.

As per the notes on the rails wiki for SQL Injection, you need to sanitize the variables being passed as a parameter, and Ruby on Rails has a built in filter for special SQL characters which you need to apply, as above. :conditions => [" section_id = ?", params[:id]]

Note, you could also use a Dynamic attribute-based finders to get the subsection object :

1
 @subsection = SubSection.find_all_by_section_id( params[:id]).sort_by{ |k| k['name'] }

which is shorter code (less change of a syntax error?) and, as a bonus, automatically applies the sanitize countermeasure.

Further, you might want to create a custom json view for this routine with, only the sub section name and sub section id, if you a) have values want to keep private, or b) the SubSection objection has a lot of data (since we are only interested in 2 fields). That’s the reason its in the SubSections Controller, to keep related stuff together.

in the new or edit view for (in this case) gallery

1
2
3
4
5
6
7
8
9
10
11
12
< % form_for(@gallery) do |f| %>
...
  <p>
    < %= f.label :section_id %><br />      
    < %=  collection_select(:gallery, :section_id, Section.all, :id, :name , options ={:prompt => ""} ) %>
    </p>
  <p>
    < %= f.label :sub_section_id %><br />      
    < %= collection_select(:gallery, :sub_section_id, SubSection.find_all_by_section_id(@gallery.section_id), :id, :name, options ={:prompt => ""}) %>
  </p>
..
< % end %>

Again, a fairly typical piece of Rails ERB code for display a html select tag used to create a select list (or drop-down list).

The collection_select help used for the Section field displays all the valid value Name’s and stores the id’s, notes the selected value (as needed in a edit) and a empty string prompt (as needed in a new).

In the case of the Sub Section field the “extra” stuff is to populate the drop down for an edit of an exiting value.

That one line “< %= collection_select(:gallery, :section_id, Section.all, :id, :name , options ={:prompt => “”} ) %>” replaces all of my 2005 posting Building a Better Drop Down Selection List for Ruby on Rails written for Rails 1.x. That’s progress!!

There’s the magic sauce for all of this, assuming that you are including the jQuery javascript library (tested with version jQuery 1.4.2) on the page. I have this in a partial used in the new and edit pages for the gallery.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<script type="text/javascript">
    $(document).ready(function(){
        $("select#gallery_section_id").change(function(){
            var id_value_string = $(this).val();
            if (id_value_string == "") {
                // if the id is empty remove all the sub_selection options from being selectable and do not do any ajax
                $("select#gallery_sub_section_id option").remove();
                var row = "<option value=\"" + "" + "\">" + "" + "</option>";
                $(row).appendTo("select#gallery_sub_section_id");
            }
            else {
                // Send the request and update sub category dropdown
                $.ajax({
                    dataType: "json",
                    cache: false,
                    url: '/sub_sections/for_sectionid/' + id_value_string,
                    timeout: 2000,
                    error: function(XMLHttpRequest, errorTextStatus, error){
                        alert("Failed to submit : "+ errorTextStatus+" ;"+error);
                    },
                    success: function(data){                    
                        // Clear all options from sub category select
                        $("select#gallery_sub_section_id option").remove();
                        //put in a empty default line
                        var row = "<option value=\"" + "" + "\">" + "" + "</option>";
                        $(row).appendTo("select#gallery_sub_section_id");                        
                        // Fill sub category select
                        $.each(data, function(i, j){
                            row = "<option value=\"" + j.sub_section.id + "\">" + j.sub_section.name + "</option>";  
                            $(row).appendTo("select#gallery_sub_section_id");                    
                        });            
                     }
                });
            };
                });
    });
</script>

The Code is wrapped up in standard jQuery code for doing unobtrusive javascript, waiting for the DOM to finish load and then watching for changes on the select tag with the gallery_section_id tag id.

The first section of code (lines 5-9) just reacts if the Section field is set to my default prompt of blank, in which case it blanks out the sub section values and does nothing else.

The next piece (line 14-16) is the meat of the $.ajax request: setting the dataType to “json” (which ensures the controller routine renders as expected), doing “cache: false” is best for development but is someting to look at in production if your supporting data is very very static. setting the url is Key! in this case ” url: ‘/sub_sections/for_sectionid/’ + id_value_string ” so that it calls the “sub_sections” controller and the “for_sectionid” routine and passes the id string.

If the ajax returns successfully, then the code removes the exiting option’s (important! it works on the option part of the DOM) from the sub_section select tag, adds my default blank line, and than append the id and name values from the returned json object.

Using Firefox firebug extension will make your life much easier in debug this, in particular confirming the ajax request fires off the way (and to the url) you expected, and returns what you expect.

Update : thanks to Tom Meinlschmidt’s feedback I’ve added “.sort_by{ |k| k['name'] }” to the function in the sub_sections controller to return the results in order by the sub section name, as it should have been. (and I fixed up a typo!)

Posted in Ajax, Code, JavaScript, Ruby and Rails | 4 Comments

Mesh10 : five years of Meshing in Toronto

This was the week for MESH and MESH U,which is a Toronto based conference which looks at “The Web” and how it is affecting the media, marketing, business and society as a whole. Mesh is in its 5th year and Mesh U (which is a more focused one for the on design, development and management people who are building that “Web”) is in it’s second year.

Several thing stood out is this year (my 4th Mesh) :

Posted in Code, Media, Open Source, Social Networking, Toronto, Web | Tagged , | Leave a comment

Quick links as of May 21th 2010

  • May 15th:
    at Smashing Magazine comes a revisit of _why: Tale of a Post-Modern Genius, the sad tale of “Why the Lucky Stiff”, who made many vibrant and colourful contributions to the community, before deleting his online existence last August. The article is a great review of the whole arc and some useful links. He is missed, and I hope he is doing better.
  • May 18th
    Understanding node.js is helping me understand the activity that’s happening in the Node.js space. This could be very very big. Javascript has become very important in the last couple of years and this is the biggest push I’ve seen for Javascript on the server. With this JavaScript has become a first class Dynamic scripting languages up there with Ruby and Python.
  • May 17 to 19th:
    Most of the week was occupied by MESH and MESH U,which is a Toronto based conference which looks at “The Web” and how it is affecting the media, marketing, business and society as a whole. Mesh is in its 5th year and Mesh U (which is a more focused one for the on design, development and management people who are building that “Web”) is in it’s second year.

    I moved the details on to a seprate post : Mesh10 : five years of Meshing in Toronto

  • May 18th
    Via IE6 must die, Microsoft claims IE6 similar to old milk Microsoft stated, “You would not drink nine-year-old milk, so why use a nine-year-old browser?”
  • May 19th
    Very happy to hear that Cory Doctorow and Charles Stross are teaming up for a follow up to their “Jury Service” and “Appeals Court” stories and will be working on “Rapture of the Nerds”. Yeah!!
Posted in Canada, Code, Culture | Leave a comment

Another episode of “It’s Charlie’s Stross’s fiction, we are just living in it” : Will Wall Street require Python?

Saw “Will Wall Street require Python? | ITworld”, on the Hot Links website and thought “interesting”, and then I read the description !

“Charles Stross was right. “with Release 33-9117, the SEC is considering substitution of Python or another programming language for legal English as a basis for some of its regulations.”

I remembered the use of python in Charlie Stross’s novel Halting State , (which would seem to be the most relevant one), but I can’t recall that one!

I may need to do some greping on the BT text I have ;)

UPDATE : from the comments, Lee says : “The actual reference is in Accelerando – Manfred Macx’s swarm of robot companies have their regulations written in Python. (p. 41 in my copy)” Indeed! good catch, Lee! Accelerando (Singularity) it is :

Malice — revenge for waking him up — sharpens Manfred’s voice. “The president of agalmic.holdings.root.184.97.AB5 is agalmic.holdings.root.184.97.201. The secretary is agalmic.holdings.root.184.D5, and the chair is agalmic.holdings.root.184.E8.FF. All the shares are owned by those companies in equal measure, and I can tell you that their regulations are written in Python. Have a nice day, now!” He thumps the bedside phone control and sits up, yawning, then pushes the do-not-disturb button before it can interrupt again. After a moment he stands up and stretches, then heads to the bathroom to brush his teeth, comb his hair, and figure out where the lawsuit originated and how a human being managed to get far enough through his web of robot companies to bug him.

Although the use of code as a financial contract makes some sense since all non standard derivative contracts are excel spreadsheets.

A relevant quote (via a sub link on Prof. Jayanth R. Varma’s Financial Markets Blog The SEC and the Python ) from the SEC proposal :

“We are proposing to require that most ABS (asset backed securities) issuers file a computer program that gives effect to the flow of funds, or “waterfall,” provisions of the transaction. We are proposing that the computer program be filed on EDGAR in the form of downloadable source code in Python. … (page 205)”

The proposal also would require detailed asset level data in XML format, and that if there is a conflict between the software and textual description, the software should prevail. The purpose of the proposal being to allow an investor with the ability to programmatically input the user’s own assumptions regarding the future performance and cash flows from the pool assets.

Wired Magazine had a article in February 2009 on Road Map for Financial Recovery: Radical Transparency Now! which is worth a re-read.

My Python friends will be very very happy!

Update: I wonder if you could create a DSL (Domain Specific Language) for financial and legal contracts? Probably in Ruby, something Cucumber like? Or has it been done already?

Posted in Code, Sci Fi, Written | Tagged | 1 Comment

Social Networking for Small Businesses

This is the result of a couple of conversations I’ve had with small shop keepers. They may use some web technologies outside of their business for personal use : ebay, facebook, email, a few e-commerce sites. They may a iPod or smart phone. They may have a one page website for the store, and are listed on (one or more) business directories, they don’t see how a FaceBook page or Twitter is applicable to their business at all. They are, literally in some cases, “meat and potato” “brick and mortar” corner stores servicing a very local market.

This got me to thinking of the HOW, WHAT, WHERE, WHEN and WHY (The 5 W’s?) of Social Networks for Small Business, and in particular, the small retail business, as apposed to more service orientated businesses.

(this is likely be a expanding list and if you have additional suggestions then make a comment!)

The HOW.

So how are they going to do Social Networking? Probably either via the web browser on their smart phone (in the shop) or on their home computer at home.

They may not have a need for a Internet connection at work because it is so removed from what they do and their customer interaction, or (in the case of some coffee/bake shops) not something they would think of providing to their customers as a service or enticement.

They probably do some bookkeeping and inventory which ends up on the computer but their business are primarily paper based.

Many still have analog cash registers, and not computerized Point of Sells (PoS) systems. (This might be a cost issue of the hardware software?). The good news is that mobile computing is becoming easier and cheaper.

The WHERE

I would be tempted to lead with Twitter, because its open to all, and it does not take long to write 140 characters, although fitting everything into 140 characters can be very challanging.

And then place the same message on a public accessible FaceBook FAN with expended additional text, and an added an image (always good) about the product/person/thing.

I would also have the last several Twitter status messages (Twits) on the your website homepage, done auto-magically via a javascript tool.

You can have interesting discussion, (and a whole other posting) about if you need a web page at all now. At most these businesses might have a who are we, where are we, “when we are (our hours), “what are we” (our products, possibly just a high level list of products or suppliers). So 2 to X pages where X is a single digit. “who” and “what” can collapsed, as can “When” and “where”. The “what can be expanded to considerable details but be careful.

You might get away with only a FaceBook FAN page, if it’s open to Google but I’m a little nervous about putting to much of your on line marketing presence in FaceBook’s owned garden. From a medium to long term Marketing and Branding angle it just looks like a bad idea. But very short term is okay.

You probably don’t need to edit your company website more that once a year or season (for Seasonal product), but you do need to keep it up to date when things change. If you can’t update your web site content as easily as your FaceBook FAN page, your doing it wrong. One of the nice things about showing your Twitter stream on the home page (or on a side bar) is it is a trivially easy way to keep some fresh content on the web site.

It would be good to become aware of location based sites like of Yelp and Urban Spoon (or other in your category) as well a the newest up and comers FourSqure and GoWalla.

Seek out and learn about tools that let you know when other people mention you, and your brand.

Your Website should be usable on a mobile web browser. That means to allows for appropriate size and styling, and no flash! (restaurants and hotels are really bad at this!)

The WHAT.

What should you be messaging on?

  • The arrival of new products, a special shipment or season item.
  • Your having a sale.
  • You had to close the store temporally due to : medical emergency; water/gas leak; a holiday. But you will be open tomorrow!! (please visit)
  • You are back from the Holiday, hope you enjoyed yours and am eager to service you!
  • You are all out of stock, but more will be in on Monday! (don’t you wish you had come by earlier? Don’t worry you too can get one of these popular things on Monday, While supplies last)
  • Wish Dave a happy birthday and get a discount.
  • The First 4 people to say the secret word today, get a free Gadget-Thingy!!
  • This wonderful event is happening in the neighborhood! Check it out! (don’t we live/work in a great place?)
  • The store next door is having a promotion! (and come visit us too!)
  • We were mentioned in the local/national newspaper (with the link to the mention).
  • Here’s a interesting Fact about something we sell, it’s name comes from A meaning B, or it’s made from solvent green!!
  • Sharing information about your industry.
  • Re Twitter things that other people Twitted about your business or the neighbor. (and thank them)
  • Regular customer Sue is doing this big deal thing
  • Don’t be purely promoting your self, that is “traditional” marketing and quickly becomes being seen as spam. Do promote your neighbors and neighborhood, your customers; and promote your “industry” and peers. Grow the pie, not (just) your piece of it.

    You can do this in a funny manner, just be careful they share or understand your sense of humour. It should be done in a informal tone. Make it a win for your customers. Over all, it should be Sincere, Positive, and it should be you.

    The WHEN.

    This is a function of the HOW and the WHAT : At most daily (except for emergencies. and likely done at the beginning or the end of the work day.

    Of course, the lack of time is another reason these business don’t do “Social Networking”). Try to do it at minimum weekly (this is where the neighbourhood stuff and interesting facts come in handy) and never never less than monthly. Try doing a little learning about this “Social Networking” every day/week or month. It is a challenge to do these, when running your business is a full time job (or more). Ask for help! Pay someone (like me) for help!

    The WHY.

    Social Networking, done well, is the most cost effective advertising and marketing available.

    • Give them a reason to visit you.
    • Exceed their expectations;
    • Do not disappoint your customers (and potential customers);
    • Telling them your story and how your are different; but a face to your business.
    • Experiment, but remember the “Golden Rule” (Treat others as you would wish to be treated).
    • Showing them you are connected to the place(s) you share.
    • Be Patient.
    • Generate positive word of mouth.

    People are -probably- already talking about you, if you know about it you can : learn from listening, apologies for mistakes; correct errors; inform and educate; connect.

    It’s all about being Social!

June 14 update

Mashable post Why Small Businesses Shouldn’t Take Social Media for Granted makes some good points, including : “Simple Works”, and “Your Size Works in Your Favor” and makes a great suggestion :

Who are your most frequent customers? Make a Twitter List called “Regulars,” and add your regulars on Twitter to it.

To which I would add making a Twitter list of your (premium) suppliers!

Posted in Business, Social Networking, Web | 6 Comments
  • Follow

  • Archives (since 2003)

  • Categories

  • Recent Posts

  • Twitter Updates

    • I'm organizing and coordinating my Japan Trip with Google Wave. Seeing both the promise and the fail. of the product. 1 hour ago
    • I have failed my saving Throw against Shiny ... I new 32G iPod Touch is on order :) 18 hours ago
    • Phil Plait, the @BadAstronomer, new show "Bad Universe" is my new must watch tv . It's @MythBusters with more science and explosives BOOM! 19 hours ago
  • del.icio.us links

  • Flickr

    Hanging Gardens of KensingtonHanging Gardens of KensingtonMore Chocolate CakeMore Chocolate Cake
  •  

    September 2010
    M T W T F S S
    « Aug    
     12345
    6789101112
    13141516171819
    20212223242526
    27282930  
  • Spam Blocked