Spot the web RSS 2.0
# Monday, December 03, 2007

What is Snooth (http://www.snooth.com/)?

Snooth is a web-based social shopping experience that is simplifying how people select, interact with and purchase their favorite wines. It hopes to become a kind of Facebook for the wine world. It may not sell wine but it already has a database of more than one million reviews, from the public and established critics.

Snooth offers both casual and aspiring wine drinkers personalized wine recommendations, ratings & reviews, as well as a wine information search tool that seamlessly connects users to the websites of top online merchants and wineries worldwide.

The main screen:

Search results screen:

Monday, December 03, 2007 2:03:37 PM (Jerusalem Standard Time, UTC+02:00)  #    Comments [0] - Trackback
Site Reviews | Web 2.0
# Sunday, December 02, 2007

Dynamically Loading JS Libraries And Detecting When They're Loaded:

Sometimes it makes sense to dynamically load JavaScript library code only at the point at which it's required. If functionality which uses that library is used rarely then it makes little sense incur the overhead of an additional HTTP request or data transfer on page load.

We can dynamically load any JavaScript and add it to the document with the following function.

Making a dynamic request

  1. function loadScript(sScriptSrc) {
  2. var oHead = document.getElementById('head')[0];
  3. var oScript = document.createElement('script');
  4. oScript.type = 'text/javascript';
  5. oScript.src = sScriptSrc;
  6. oHead.appendChild(oScript);
  7. }

This approach isn't without problems though. The request will load asynchronously which means that any JavaScript which depends on code returned by the request may continue to run before the request completes resulting in errors.

Callback event handlers

As described in far greater detail in JavaScript Madness: Dynamic Script Loading browsers provide the ability to specify a callback function to run once the script load completes. In most it's as simple as assigning a callback function to the script.onload event handler.

  1. oScript.onload = callback;

Internet Explorer, as in so many cases, does things differently. It supports a onreadystatechange event handler to which we can assign a callback function. It's slightly more complicated than that used by other browsers as one has to check a return status before running the callback.

  1. oScript.onreadystatechange = function() {
  2. if (this.readyState == 'complete') {
  3. callback();
  4. }
  5. }

Combining the parts gives us:

  1. function loadScript(sScriptSrc, oCallback) {
  2. var oHead = document.getElementById('head')[0];
  3. var oScript = document.createElement('script');
  4. oScript.type = 'text/javascript';
  5. oScript.src = sScriptSrc;
  6. // most browsers
  7. oScript.onload = oCallback;
  8. // IE 6 & 7
  9. oScript.onreadystatechange = function() {
  10. if (this.readyState == 'complete') {
  11. oCallback();
  12. }
  13. }
  14. oHead.appendChild(oScript);
  15. }

Detecting script load with timeouts

Reading a number of sources however it seems that there is a lack of trust in the cross browser robustness of these event handlers. One could instead use timeouts to poll for the existence of required functions returned by the script request and run our callback once detected.

I wrote the following function to achieve just this recently. The function takes two main parameters, a string representing the function to poll for and a reference to the callback function to run once it's found.

  1. function onFunctionAvailable(sMethod, oCallback, oObject, bScope) {
  2. if (typeof(eval(sMethod)) === 'function') {
  3. bScope ? oCallback.call(oObject) : oCallback(oObject);
  4. } else {
  5. setTimeout(function () {
  6. onFunctionAvailable(sMethod, oCallback, oObject, bScope);
  7. }), 50
  8. }
  9. }

Two additional parameters allow one to define the scope of "this" within the callback function.

The hardest part of this function was working out how to detect the existence of a function from a string.

Sunday, December 02, 2007 5:07:15 PM (Jerusalem Standard Time, UTC+02:00)  #    Comments [0] - Trackback
Javascript
# Saturday, December 01, 2007

Using a Wiki as a project management tool is something that I have been thinking over quite alot recently.

But there is some nagging doubt in my head. Perhaps its because it requires self discipline to be able to work it properly, or that it we could be doing it better.

Wikis have some real advantages for project management:

  • A lot are free, with only hosting costs to contend with
  • Open access which can be restricted with ACLs
  • Anyone can view, edit and update at anytime. Easily.
  • With the proper infrastructure can easily break geographical boundaries.
  • Built in version control
  • Great for documentation
  • Open
  • Can be used as a document repository
  • Inbuilt document linking can build documentation as detailed or sparse as needed
  • Project information can be kept linked to technical information
  • Reduces the use of email.

The main feature of using Wiki as a project management tool is the ability to SEARCH. This means that you can easily search for changes that were made to a certain document and see what to do with the seach results.

In the mean while I will start testing the Wiki's software available as an open source and will update this post as I go along.

Just for the fun of it - here are some project management quotations:

  • "A badly planned project will take three times longer than expected - a well planned project only twice as long as expected."
  • "A minute saved at the start is just as effective as one saved at the end."
  • "A problem shared is a buck passed."
  • "A project is one small step for the project sponsor, one giant leap for the project manager."
  • "A two year project will take three years, a three year project will never finish "
  • "All project managers face problems on Monday mornings - good project managers are working on next Monday's problems."
  • "Any project can be estimated accurately (once it's completed)."
  • "Anything that can be changed will be changed until there is no time left to change anything."
  • "Everyone asks for a strong project manager - when they get him they don't want him."
  • "Fast - cheap - good: you can have any two."
  • "For a project manager overruns are as certain as death and taxes."
  • "God had a huge project and he got it in 7 days done."
  • "Good project management is not so much knowing what to do and when, as knowing what excuses to give and when."
  • "Good project managers admit mistakes: that's why you so rarely meet a good project manager."
  • "Good project managers know when not to manage a project."
  • "I know that you believe that you understand what you think I said but I am not sure you realise that what you heard is not what I meant."
  • "If it looks like a duck, walks like a duck and quacks like a duck, it probably is a duck."
  • "If there is a 50% chance of something going wrong then 9 times out of 10 it will."
  • "Managing IT people is like herding cats."
  • "Metrics are learned men's excuses."
  • "Murphy, O'Malley, Sod and Parkinson are alive and well - and working on your project."
  • "Never underestimate the ability of senior management to buy a bad idea and fail to buy a good idea."
  • "No plan ever survived contact with the enemy."
  • "No project has ever finished on time, within budget, to requirement - yours won't be the first to."
  • "Nothing is impossible for the person who doesn't have to do it."
  • ""Planning is an unnatural process, doing something is much more fun."
  • "Planning without action is futile, action without planning is fatal."
  • "Quantitative project management is for predicting cost and schedule overruns well in advance."
  • "The first 90% of a project takes 90% of the time the last 10% takes the other 90%."
  • "The most valuable and least used word in a project manager's vocabulary is "NO"."
  • "The nice thing about not planning is that failure comes as a complete surprise rather than being preceded by a period of worry and depression."
  • "There are no good project managers - only lucky ones."
  • "Too few people on a project can't solve the problems - too many create more problems than they solve."
  • "Users get the systems they deserve."
  • "Warning: dates in the calendar are closer than you think."
  • "Work expands to fill the time available for its completion - Parkinson's law."
  • "You can build a reputation on what you're going to do."
  • "Project management with lot of documents is not project management
  • "I love deadlines, I especially like the SWOOSHING sound they make as they fly past"
Saturday, December 01, 2007 4:08:12 PM (Jerusalem Standard Time, UTC+02:00)  #    Comments [0] - Trackback
Project Management
Navigation
Archive
<December 2007>
SunMonTueWedThuFriSat
2526272829301
2345678
9101112131415
16171819202122
23242526272829
303112345
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2010
Guy Levin
Sign In
Statistics
Total Posts: 63
This Year: 0
This Month: 0
This Week: 0
Comments: 14
Themes
All Content © 2010, Guy Levin