I’ve often had to sort strings into alpha order but had problems with sorting the ones starting with “The”. Here’s how I solved it within the SQL query.

SELECT     partnerID,
           partner,
           partnersort =
                CASE LEFT(partner,4)
                WHEN 'the' THEN RIGHT(partner,LEN(partner)-4)
                ELSE partner
                END
FROM       partners
ORDER BY   partnersort

Pretty happy with that!

I was recently working on a project where there were tables edited in a database so I had no control over the colours of the various cells (and didn’t want to have to do the striping manually). I eventually found the following code and altered it to suit my needs:

if(window.addEventListener){
   window.addEventListener('load', stripe, false);
}else{
   window.attachEvent('onload', function(){ stripe(); });
}

function stripe() {
   var evenColor = "#eee";
   var oddColor = "#fff";

   var tables = document.body.getElementsByTagName('table');
   for(i=0;i<tables.length;i++){
      if(tables[i].className == 'press'){
      var even = false;
	 var tbodies = tables[i].getElementsByTagName("tbody");
         for (var j = 0; j < tbodies.length; j++) {
            var trs = tbodies[j].getElementsByTagName("tr");
	    for (var k = 0; k < trs.length; k++) {
               var tds = trs[k].getElementsByTagName("td");
	       for (var l = 0; l < tds.length; l++) {
                  var mytd = tds[l];
	          mytd.style.backgroundColor = even ? evenColor : oddColor;
               }
	       even =  ! even;
	    }
	 }
      }
   }
}

The first part of this code causes the function to run automatically when the page finishes loading.

The function loops over all table tags, then finds the ones with a class of ‘press’ (this table held a list of press releases), then loops over all the tbody tags, then the tr tags, then all the td tags. When we reach the td we just add the backgroundColor style for the colour we are currently using.

You just need the following script in your <head> and make sure your tables have the correct class and are properly coded;

<script type="text/javascript" src="stripe.js"></script>
<table class="press" cellspacing="0">
    <thead>
        <tr>
            <th scope="col">Released on</th>
	    <th scope="col">Title</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td class="date">[date]</td>
            <td>[title]</td>
        </tr>
        <tr>
            <td class="date">[date]</td>
            <td>[title]</td>
        </tr>
        <tr>
            <td class="date">[date]</td>
            <td>[title]</td>
        </tr>
        <tr>
            <td class="date">[date]</td>
            <td>[title]</td>
        </tr>
    </tbody>
</table>

And there it is!

In the Gold Lotto you are required to choose 6 numbers from 40, in any order, to win the top prize. The odds of doing so are;

6/40 * 5/39 * 4/38 *3/37 * 2/26 * 1/35 = 720/2,763,633,600 = 1 in 3,838,380.

I still buy a ticket every week.

http://www.discoverymetals.com.au

Another D10 site, nice one too. Not much time to write about it but it was generally smooth to build and get up, hopefully not too many changes in the coming weeks.

World Population: 6.6 billion

World of Warcraft Players: 8.5 million

6,600,000,000 / 8,500,000 = 776.4705.

Or to put it differently – one in every 776 people in the world plays World of Warcraft.

Can this be correct?

I was feeling sick a few days ago and consequently decided to do my usual trawl through the various RSS feeds I look at. I eventually ended up looking at the Razorfish site (they came up because the company has just been bought by Microsoft). Razorfish was one of the big players in web design maybe 10 years ago, and still are I suppose, although I hadn’t seen anything by them for a long time.

Anyway, I was looking at their folio and noticed they had a site listed as a Communication Arts site of the week (it was Red Bull). So I went to look at the CommArts site, and their site of the week lists. And almost everything I saw listed there was Flash.

Now I don’t mind Flash, but I am not a fan of the 100% flash site. I fall squarely on the standards side of that fence. So why is it that so many of these “site of the day” kind of sites continue to feature them? I was annoyed when I first started building sites that web design books were always full of sites that actually looked better in print than they were when you tried to use them. They looked good and didn’t work – kind of like Myspace in reverse.

http://www.cannonlinks.com.au

Another new site! This is just a little guy, only 10 or so pages. It was all done in record time too – I was told it was a reskin and then when it showed up the whole thing had been redesigned!

http://www.3speed.com.au

I made this site live yesterday. It’s nice, took some time to get the navigation working correctly across the top, also the opacity thing when you look at case studies. It’s basically lightbox but of course it had to be customised to suit the design.

Sometimes I enjoy building sites from other people’s designs – this is by D10 – but more often than not these kinds of projects take much longer than expected. They usually finish as better products though, since the thinking that has gone into the interface has not been influenced by the difficulty of implementing it.

I like fonts but (like everyone I guess) I have my favourites.

Here’s a list I was just reading, I thought I would post it here so I don’t forget where I found it. Helvetica is not a surprise, but some of the newer ones are!

http://www.inspirationbit.com/16-best-loved-font-bits-in-web-design/

Re: boagworld.com article
In short i am coming to the conclusion that wherever possible the designer should be involved in the writing of a development brief.

I think what usually happens is that the client comes in and the brief changes as the development is undertaken.

 

January 2012
M T W T F S S
« May    
 1
2345678
9101112131415
16171819202122
23242526272829
3031  
Follow

Get every new post delivered to your Inbox.