Google Street View 1

Posted by Bart Thu, 07 Jun 2007 06:25:00 GMT

Google has finally come out with Street View.

Yes, in addition to seeing and interacting with your maps, viewing a satellite image of your car in your driveway, flying through the air around our little plane on Google Earth, and marking the geography of your places and adventures, you can now check out the street of some cities in the US.

Looks like New York, San Francisco, Miami, Denver, and Las Vegas are the chosen ones.

I'll be in San Francisco next week on a street which presumably looks like this:

Some people are concerned, and anything Lewis Black has to say, is worth listening to.

I'm sure it's not the first attempt at something like this, but it's a big undertaking, and Google has pulled it off quiet nicely.



Podcast your presentation in a single click

Posted by Bart Wed, 18 Apr 2007 15:33:00 GMT

It's been a busy news day, first BlackBerries go down, then slowly go back up.. and now this!

For the past couple of months I've been working on podcasting lectures, and making it dead simple. One click to start, one click to end... Done! (ok I lied.. you need a 2nd click to end the presentation) We're merging a video of the presenter as well, so it's not just a simple slide show with voice over. Craig Codeiro is now a QuickTime API expert I believe.

Hossein Rahnama has been running the project which is a collaboration between the Computer Science Dept and the Roger's Media Centre at Ryerson University in Toronto.

"Instructors without a technology background will be able to use the service because it performs all the post-production work automatically"
- quote

Ryerson Web 2.0 Competition 1

Posted by Bart Sat, 07 Apr 2007 02:04:00 GMT

Ryerson University hosted it's first Web 2.0 Competition this passed Wednesday, which was organized by Hossein Rahnama, the instructor for CPS630 and Research Coordinator at the Ci2 Lab.

The Computer Science course focuses on the Web 2.0 Buzzword, and its participatory architecture and protocols. The main topics of discussion the students engage in were AJAX, Information Syndication, Pervasive Web, Rich Internet Applications and Service Oriented Architectures. Using these concepts, students had the task of conceiving and building a tool or service, which would be offered via the internet. The students had the opportunity of presenting their projects in front of academic and industry judges, and gaining an insight into creating and developing the ideas, applications and services which are actively and collaboratively defining the term Web 2.0.

The comments and criticisms brought up by Many Ayromlou and Hampton Catlin were very constructive and effective in terms of developing their projects further. Michael Glenn’s questions and suggestions on marketability gave each group a clearer and focused understanding of how to take their projects from the classrooms and make it a reality. Leila Boujnane’s presentation on the important and sometimes forgotten aspects of a startup put the realities of working in a successful group into focus. Bradley Fortner’s and Karl Moskowski’s helpful comments and suggestions were to the point, and allowed the students to see the potential of their ideas.

Thanks to the Ryerson Computer Science Dept. for allowing us to put the event together, and it's Chair, Dr. Ali Sadeghian for speaking to the students.

Congratulations to the 3 winners, and to all the groups:

  1. Find Your Game
  2. RyeWebTop
  3. SCS-Locator

DHH presents HAML

Posted by Bart Wed, 04 Oct 2006 15:08:00 GMT

I came across this pic of DHH demonstrating HAML at the Copenhagen Ruby meetup

A stamp of approval if I've ever seen one


HAML ... the new shimdizzle in HTML markups 179

Posted by Bart Wed, 20 Sep 2006 02:24:00 GMT

Hampton has finally made his HAML language public by presenting it at RailsConf Europe 2006.

Bigups to Unspace for getting him over there. DHH described it as an "Impressive show", along the side of UJS, JRuby, and Capistrano.

If this is ugly:

<div class="news_item">
<h3>Some news Item thingy! </h3>
  <p align="left"> (Toronto, July 14, 2006) I'm awesome! <a  
href="/news/2006/7/14/kiss_it">Read all</a>
  <span class="news_date">Posted: 2006-07-14</span></p></div>
.. and this is pretty
%blockquote{:cite => quote.citation_url}
  = quote.text
  %cite= h quote.citation
...give HAML a look see.



Also, my favorite slide quote from DHH during the conference, presumably referring to this Rails 1.1.6 vulnerability

Script.aculo.us - Effect.Appear display: and background: solutions 36

Posted by Bart Mon, 18 Sep 2006 15:57:00 GMT

There’s bit of a bug with Effect.Appear and IE. There’s a discussion open on it here.

Basically there are 2 issues discussed with Effect.Appear:

  1. doesn’t work if the display: property is not set to ‘none‘
  2. if the :background property is not set, the text is bolded while appearing, then switches to the chosen weight

The obvious remedy to both 1) and 2) is to set display: none; and background: #hex; before calling Effect.Appear. The problem with 2) occurs when you’re background is an image.

For my use, I needed to repeatedly call Effect.Appear using the Rails AJAX method periodically_call_remote. I’ve setup the following JavaScript function to handle 1) and 2). It can be used as a one time call before calling Appear, or repeated calls as in my use. See the quote fading in after a few seconds on the w2wwp implementation of my Simple CMS Rails app.

=> RHTML
  :complete => "myAppear('myDiv', '#ccc')" 

=> JavaScript
  function myAppear( mydiv, bckgrd)
  { 
    el = document.getElementById(mydiv); 
    el.style.background = bckgrd; 
    el.style.display = 'none'; 
    new Effect.Appear(mydiv);
  }

Need a Rails Cheatsheet? 2

Posted by Bart Tue, 15 Aug 2006 19:18:16 GMT

What's that? You DO need a Rails Cheatsheet? Here you go.

Courtesy of Blain Kendall

Protoype Effects with CSS and Tables 175

Posted by Bart Tue, 08 Aug 2006 22:48:00 GMT

One thing I’ve been struggling with the last day was how to incorporate Prototypes Effects into an HTML table. I need a well formatted list of records, something easily done with a <table>, but something that will take advantage of AJAXian effects. Here's the final product. Read on to see how I got it.


The problem is that IE doesn’t remove a table’s elements out of the DOM, and as of recently, Firefox doesn’t either, unless you walk through the DOM. There’s a great description of how to delete records through the DOM using JavaScript here. So to avoid tables, and for example use Effect.Fade to remove a record on deletion, I’d have to use pure CSS and struggle with the cross-browser inconsistencies. Searching the web, I found some great techniques for dealing with these issues, but not being a CSS god, I needed a simpler solution. Another great tool for record handling is SortTables from script.aculo.us. It allows you to move the records around. But still, not what I’m looking for.


So to only use Prototype (actually Effect.Fade is script.aculo.us, which is built on top of Prototype), I found that a combination of CSS and tables does the trick. What you need is a CSS Record id, and a CSS Column class element. Then create a table for each row in your database, assigning the entire table to your CSS Record id. You can equally wrap the entire table into a div. Next, set each <td>’s class to your Column Class. The key is to set the columns width: property in order to have a uniform layout. If each column’s width is the same, you only need one of these defined in CSS. For my example below, each column is different, so I defined 4 different column classes.


Here, I list User objects, with the option to Delete each record. I use link_to_remote with Effect.Fade to delete the record from the database, then fade the record out from the DOM.


If you’re using scaffold, here’s what you need:

CSS content

File: scaffold.css

#cssRecord{
  width: 700px;
  border-top:   1px solid #000000;
  border-left:  1px solid #000000;
  border-right: 1px solid #000000;
  background:   #ffffff;
}

#cssRecord th { 
  background: #dddddd; 
  font-size: 14px; 
  vertical-align: top; 
  text-align: left; 
}

#cssRecord td { 
  background: #eeeeee; 
  font-size: 12px; 
  vertical-align: top; 
  text-align: left; 
}

/** you’ll need a new set of these for each table type  **/
#cssRecord .cssUserCol1 { width: 15%; }
#cssRecord .cssUserCol2 { width: 15%; }
#cssRecord .cssUserCol3 { width: 60%; }
#cssRecord .cssUserCol4 { width: 10%; text-align: center; }

RHMTL Content

– see below for explanation of split_str method.

File: list.rhmtl

<h1>Listing users</h1>
  <table id="cssRecord" cellpadding="2" cellspacing="2"><tr>
    <th class="cssUserCol1">Name</th>
    <th class="cssUserCol2">Date</th>
    <th class="cssUserCol3">Description</th>
    <th class="cssUserCol4"></th>
  </tr></table>

  <% for user in @users -%>
  <div id="userObject<%= user.id %>">
    <table id="cssRecord" cellpadding="2" cellspacing="2"><tr>
      <td class="cssUserCol1"><%= link_to h(split_str(user.name), 10), 
           :action => 'show', :id => user, :controller => 'admin' -%></td>
      <td class="cssUserCol2"><%=h split_str(user.created_on.strftime("%d %B %Y"), 10) 
           -%></td>
      <td class="cssUserCol3"><%=h split_str(user.description, 50) -%></td>

      <td class="cssUserCol4"><%= link_to_remote 'Delete', 
                       :complete => "new Effect.Fade('userObject#{user.id}')",
                       :url => {:action => 'fake_destroy',
                          		:controller => 'admin',
                          		:id => user}, 
                        :confirm => 'Are you sure?', :post => true  
                    -%>
      </td>
    </tr></table>
  </div>
  <% end -%>

If your field content doesn’t wrap within the length you chose, it will realign the columns for that row only, which is messy and defeats the purpose. To remedy this, I created a method to split longer strings. It’s not the best way I’m sure, but works quite well. Just put it into your *_helper.rb file, and pass the object to it. I used it for the cssUserCol2 and cssUserCol3.


File: *_helper.rb

def split_str(str=nil, len=10, char=" ")
 work_str = str.to_s.split(//) if str
  return_str = ""
  i = 0
  if work_str
    work_str.each do |s|
      if (s == char || i == len)
        return_str += char
        return_str += s if s != char
        i = 0
      else
        return_str += s
        i += 1
      end
    end
  end
  return_str
end

BarCampTdot - Toronto May 13 - 14, 2006 3

Posted by Bart Mon, 07 Aug 2006 07:54:00 GMT

OK, I know this is really late for bloggin about, but since I've just launched my own site, I had to include a post about this BarCampTdot as it was one of my first exposures to Toronto's web community.


If you've ever seen my desk, and chances are you haven't, you'll see what I call an "organized mess". Having said that, I have to say that my first impression of BarCamp was an organized "mesh" of people helping each other, setting up their props, organizing their presentations and coming together in an organized collaboration to discuss the various aspects of today's web experience. Web 2.0 is no longer a buzz word, but a collection of content-driven, user interface focused sites. The presentations quickly turned into conversations with everyone adding their two bits, or 8, and contributing to one another's growth, development, which was more "knowledge-sharing" than any other buzz phrase I could muster. On Brian Oberkich's Weblogs WorkNotes, Lane Becker from Adaptive Path used the term Open Source Consultancy as a description of giving away intellectual property, techniques, ideas, and tools in the same way the open source community of developers share their code bits and full applications. To give you an example of what Open Source is capable of, this site's log license for Typo is Open Source. Hampton was the first to post a blog from BarCampTdot at justasloud.org, and his blog is WordPress, another great Open Source application.


This ad-hoc approach to sharing ideas is a large-scale version of the Socrates Café approach to discussions, in that the organizers don’t plan anything, just organize the location ( in this BarCamp's case an empty warehouse ) and format ("must give a demo, a session, or help with one"). Any one can come and start a topic, and with so many people involved, each topic’s importance is determined by its participants. If you suggest a topic on the board, and no one shows up, you move onto one that is attracting more interest and most likely learn how your own idea can be developed further. One such topic worth taking a look at was Email 2.0. Daniel, whom I met there had some great ideas and new features coming out for Email applications. Perhaps another great 2008 idea in 2006. People will catch on, they always do.