# Saturday, 05 July 2008

Another interesting thing that happens during work. We receive some content to be entered onto a webpage from our copywriters, we copy the text from the mail, and paste it into our webpage. It looks fine when we pasted it in Visual Studio but then when other people look at it they see SOMETHING like this.

image

So you take a close look at the file and notice that where all the weird symbols were appearing is basically where an approstophe.. (Damn I can't spell it.. the ' in 's and 're)  is supposed to be, so the correct text should look like this.

image

So... what went wrong? Let see another example.

image

See the difference now? Still not yet? Look at the ', doesn't it look different between the 2 lines? Even the double quotes are actually different but they don't seem to be affected that much.

So... why is there a weird ' in the sentence? It's a very simple answer, just ask the person who prepared the document did he do it in MS Word? Now... dig into Word's auto correct options and you'll find something like this (varies depending on which version of Word you're looking at)

image

See the part about "Straight Quotes" with "smart quotes"? With that option on, basically when you use a non interesting " or ' Word will replace it with more pleasant looking ones, curvier ones, ones that look nicer when you print. But of course doesn't always work when you put it on a webpage, or a page designed to be viewed from a phone.

Just another one of the weird things you learn after developing web sites for a while


Saturday, 05 July 2008 01:32:50 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
# Friday, 04 July 2008

When you work with designers, it's very likely that sooner or later they'll come up with a web page design that uses multiple images that need to be joined together to form a display say something like this.

image

Where the yellow cell is actually where your content goes, and the cell below it is supposed to perfectly join up to the cell above to form a single unbreaking image. (Why does my sample suck? Because I can't draw! :P) But sometimes you'll end up with something like this. (The image below is simulated cause I can't get the error to show when I WANT it to! :P)

image

You'll see a gap between your supposedly perfectly joined cells (Usually about 1 pixel, I deliberately enlarged it so it's more visible right now).

Your HTML seems to be fine, with no additional cells, and the fact that you've already turned off cellpadding and cellspacing.

<table cellspacing="0" cellpadding="0" width="300">
        <tr>
            <td>
                <div style="background-color: yellow">
                    I'm in a TD
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <img src="footer.jpg" />
            </td>
        </tr>
</table>

So you're scratching your head wondering what went wrong. The next time you see a problem like this, remove ALL spaces between the TD tags. So essentially make your HTML look like this.

<table cellspacing="0" cellpadding="0" width="300">
    <tr>
        <td><div style="background-color: yellow">
                I'm in a TD
            </div></td>
    </tr>
    <tr>
        <td><img src="footer.jpg" /></td>
    </tr>
</table>

Why does it happen? I have no idea, but to fix the problem it's always the same thing. Remove all whitespace from the TD tags. If that still doesn't fix it or you're feeling paranoid, close up the TRs as well.

<table cellspacing="0" cellpadding="0" width="300">
    <tr><td><div style="background-color: yellow">
                I'm in a TD
            </div></td></tr>
    <tr><td><img src="footer.jpg" /></td></tr>
</table>

Again.. I have no idea why it just happens sometimes, but it does, and here's how I fix the problem. More little tips from the trenches to follow.


Friday, 04 July 2008 00:45:36 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
# Monday, 30 June 2008

When your son starts playing around with the recliner ejector switch you know someone's gonna get hurt by it someday.

Upon seeing WZ play with the chair, mommy casually remarks that he's gonna get his fingers caught in the switch one of these days. As if on cue WZ promptly gets his fingers caught in the switch. :P


Monday, 30 June 2008 10:31:24 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
# Sunday, 29 June 2008

So I finally was able to put in the finishing touches on the little Silverlight thingy that I've been working on. Basically it's something to help make video podcasts a little more interesting. Do remember you need to install Silverlight 2 Beta 2 to view this. But if you don't have it installed you'll see a nice little button to install it anyway.

The whole backend that runs this system is an interesting item for discussion at a future date.


Sunday, 29 June 2008 11:56:55 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  | 
# Monday, 23 June 2008

I've just been so busy for the past few weeks, and damn.. there's just so many things I want to post! WZ videos.. pics.. reviews of 2 pieces of gear I recently got.

Not to mention I need to repost ALL my Deep Zoom stuff since Silverlight Streaming is now finally Silverlight Beta 2 capable!! woohoo!!


Monday, 23 June 2008 00:49:18 (Malay Peninsula Standard Time, UTC+08:00)  #    Comments [0]  |