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 every 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

Toronto DemoCamp 26, still going strong with noodles, Lean Marketing and 5 Demos.

Last night was the 26th in Toronto, and the 3rd held at Ryerson University’s Ted Rogers School of Management with a crowd of ~300 or so. We are now in our 5th year (Five!!) of DemoCamps and this one felt like it retained some of the spirit of the older days.

The pre Demo activity was food catered by Liberty Noodle which was some good beef/chicken/veg with noddles/rice and it a cost effective way to grab some grub before the main event (not always the easiest thing after a busy day) – plus per-event gossiping.

The main event was a keynote and 5 quick demo’s (the current DemoCamp format):

The Keynote was a interesting and informative talk by who related her experiences marketing with startups, and talked about customer development and product fit as it related to the Lean Startup.  (Call it Lean Marketing?) April has a summary of it up on her site at with links to the slides, but the really good parts were in the talk!
DCTo26 - 01

Then after a short break there where the demos :

  • First up was , as demo’d by Kristan “Krispy” Uccello, which would allow you, as a web site owner, to add new functionality or content to your site with the same look and feel. It currently (march 2010 ) has a few (free) search shopping and shopping applications, it also allows developers to build new many new applications and sell them on a marketplace, so there should be many more “Apps” in the near future. OpenAPps has done a amazing job of building a framework, which is as eay to use as it is powerful,and the beginnings of a marketplace for website plugins and/or micro applications. Krispy is a cereal serial presenter at DemoCamp and it’s always great to see him pull the whiz bang out of the hat!! OpenApps at DemoCamp
  • Next up were Chris Nguyen and Lee Liu who are also veterans of being 2 of 5 young founders (at the time Ryerson students, now alumni) having shown their site for the service industry, before going on to CBC Dragons Den TV show, and then acquired by onTargetjobs.
    Having learned a lot from their previous experiance, we where presented with a early look at the soon to launch (10 days?) a group buy – or Social Buying – web site. I’m looking forward to seeing this launched as it looked good and it sounds like they understand the infrastructure issues, plus who doesn’t like saving money!! I think they have another hit on their hands, this time in the direct Marketing space.
    TeamSave is Launched! BlogTo has a writeup Collective buying sites battle for the attention and wallets of Torontonians.
  • is a e books platform (iPhone, Blackberry, Palm Prē and Android, Desktop), as well a having their own slick eReader (regretting I did not try to play with it) and they showed off their upcoming iPad application. The eReader looks very nice with a good balance of features (like usb syc and sd card for data and eInk for the display) at a decent price (I’m hearing ~CND$ 149). If it was < $99 dollar I would so jump on it, but even at that price it's tempting
  • SWIX is a analytics for social media tool (currently in beta but soon to be launched) will give you metrics on a bunch of Social Media web sites. They have made it very easy to gather all this data in one place – none trivial – in a way that very easy to use. Try it! Now!
  • Last for the night was James Walker, another cereal serial presenter at DemoCamp, from . Status.net is the wordpress of Microbloging/Twitter/FriendFeed which might be better know for it’s Identica web site, a twitter micro-blogging like site/service powered StatusNet open source software. Status.net with let you run or own Twitter service either open or closed, within your firewall or outside, and let you run it in a federated or distributed manner, as opposed to Twitter centralized model (hence the Twitter fail whale issue).
    DCTo26 - 31
    After answering the what is Status.net question, James went on to talk about some of the underlining and emerging protocols used by Status.net and other services, covered by the wrapper protocol for Open Micro Blogging called OStatus which uses existing protocols like:

    • Activity Streams encode social events in standard Atom or RSS feeds.
    • PubSubHubbub pushes those feeds in realtime to subscribers across the Web.
    • Salmon notifies people of responses to their status updates.
    • Webfinger makes it easy to find people across social sites.

    Really cool and interesting stuff which will have a big impact in the next couple of years. Now big? Well early in that day a post come up on Read Write Web titled Cracking Facebook’s Dominance: New Cross-Network Commenting Protocol Could Be a Game Changer all about Salmon and Status.net.

    A great DemoCamp. DemoCamp TO

    (and that was before beers and Ben’s “the Hand in the Gum” incident).

    2 additional writeups to point to :
    Sandy Kemsley wrote an in-depth look at OpenApps at DemoCamp 26: Easy Functional Extensions of Your Website and Ian Chan reviewed all the Demos in DemoCamp26 : What You Missed

    Posted in DemoCamp, Social Networking, Startup, Toronto | 2 Comments

    IE 6 Death Watch gets a Funeral Service and at least a few more Nails in it’s coffin

    Part 2.
    Six Months ago I declared One Year to Go on the IE 6 Deathwatch

    In the beginning of this year it was disclosed that Google (as well as and 20+ other companies) had been the victim of Chinese cyber attack, attackers called the operation “Aurora” . Microsoft had admitted that Explorer was used in Google China hack (via BBC), and it now known that the attack took advantage of a zero-day vulnerability in Internet Explorer 6 – CVE-2010-0249 – to drop malware onto compromised systems. (via The Register)

    This has promoted France, Germany (and then Australia) to suggesting that its citizens switch from Internet Explorer.

    Thomas Kristensen, the chief security officer for Secunia a company that specializes in looking for security vulnerabilities, commented :

    “Currently it is evident that running IE6 on XP or Windows 2000 is a very bad idea, and any other browser would be a better choice for XP and Windows 2000 users,”

    In other news :

    Goggle has announced Modern Browsers for Modern Applications declaring :

    Many other companies have already stopped supporting older browsers like Internet Explorer 6.0 as well as browsers that are not supported by their own manufacturers. We’re also going to begin phasing out our support, starting with Google Docs and Google Sites. As a result you may find that from March 1 key functionality within these products — as well as new Docs and Sites features — won’t work properly in older browsers.

    But more importantly, Google-owned YouTube will end support for Internet Explorer 6 on March 13, just two weeks after ending support on Google Docs.

    This will have the effect of getting many non corporate users to upgrdae their browsers off of IE6, and more than a few off of Internet Explorer altogether.

    This has lead to the announcement that “Internet Explorer Six, resident of the interwebs for over 8 years, died the morning of March 1, 2010 in Mountain View, California, as a result of a workplace injury sustained at the headquarters of Google, Inc.”

    Hence, a funeral services for Internet Explorer Six will be held at 7pm on March 4, in Denver, Colorado.

    Can someone be sure to put a stake in it’s heart to ensure it does not come back? :)

    It’s still the most dreaded 3 letters in a web developers life.

    Beta New just published (March 1) Let the Internet Explorer 6 death watch begin will many amusing statements :

    IE6’s heart turned evil long ago. .. During IE6’s reign of terror Website designers paid tribute by using a DOCTYPE .. Meanwhile, IE6 amassed a great group of worshipers — malware writers looking to exploit security vulnerabilities for profit. .. IE6 will be missed by malware worshipers and enterprise IT managers too dependent on ActiveX controls to easily switch browsers.

    (and how soon till we can start the “Flash Death Watch”? It’s the IE6 of the 10’s!)

    Update March 5th : Post ie6 funeral report: IE6 Laid To Rest. Pictures, Videos, And Flowers From Microsoft. and Protesters (!?!).

    And see CSS Squirrel, Kyle Weems, for Goodbye, Six, and good riddance. So Say We All! and then read the related blog post.

    Posted in Code, Web | Leave a comment

    different behavior for Prototype JavaScript childElements() in FF and IE

    Or now to lose the rest of one’s limited hair  :(   …. I’ve come across a “doesn’t work as expect” issue while working in (”Easy Ajax and DOM manipulation for dynamic web applications” for sure!)

    1
    $('someIdName').parentNode.childElements()

    works fine in FireFox (v3) but not in Internet Explorer ( v6), in particular it seems the the

    1
    $('someIdName').childElements()

    fails giving a “Object doesn’t support this property or method”

    thankfully

    1
    $('someIdName').siblings()

    worked just fine. :) but I still worried about the Fail.

    I think the problem was that in some cases the

    1
    "ParentNode"

    was a

    1
    "div"

    element and strictly speaking Div’s do have children. Is this a difference in the DOM between IE and FF?

    perhaps $(’someIdName’).parentNode.childNodes would work?

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

    Agile Web Development with Rails, erratum

    from the Agile Web Development with Rails, Third Edition. (fourth printing), in Chapter 8.3 iteration C2: Creating a Smarter Cart (page 104), when creating the initial CartItem model class, the price function is defined thusly :

    1
    2
    3
        def price
          @product.price = @quantity
        end

    Unfortunately that sets the price to the number of items set in the cart (if you add the item 3 times the price is 3, not $99.88). It should be :

    1
    2
    3
    def price
        @product.price * @quantity
      end

    or you could do

    1
    2
    3
    def price
          @product.price
    end

    If you do it the second way, the total_price needs to be adjusted (8.5 Iteration C4:finishing the Cart, page 114) be modifying the total_price function from:

    1
    2
    3
       def total_price
          @items.sum { |item| item.price }      
        end

    to the correct :

    1
    2
    3
       def total_price
          @items.sum { |item| item.price * item.quantity }      
        end

    see http://www.pragprog.com/titles/rails3/errata for more corrections of this otherwise great guide.

    Posted in Ruby and Rails | Leave a comment
    • Follow

    • Archives (since 2003)

    • Categories

    • Recent Posts

    • Twitter Updates

    • del.icio.us links

    • Flickr

      Backyard Lettice PatchBackyard FlowersBackyard FlowersBackyard Flowers
    •  

      July 2010
      M T W T F S S
      « Jun    
       1234
      567891011
      12131415161718
      19202122232425
      262728293031  
    • Spam Blocked