Doing The “Right Thing”

Sometimes, doing the right thing is, well, the right thing to do. Other times when the Wrong Thing is done when trying to do the Right Thing, then the Right Thing is clearly and deeply Wrong.


Confused? I thought so. I will now use a clever real life example to show how Microsoft yet again does the Wrong Thing.


This time I’m not even going to bitch about the interoperability, as I’m using all MS products.


You see, it seems that MS wants everything to be passed around in HTML, or at least their version of it, to everything else. So when you copied and paste from one application, it internally formats what you’ve copied as HTML and when you paste it into another application, it pastes it in and does the Right Thing, because that application understands HTML and does what is expected, wanted and needed.


Oh if only it were true. I’m developing a web application with MS-Access (to talk to an MS-SQL Server), MS-Frontpage, testing it with MS-Internet Explorer, and communicating with the rest of the team via MS-Outlook Express (sometimes passing documents in MS-Word format), all done on an MS-Windows XP based computer. Everything should be ok right? Ha!


See, when I copy an SQL query in MS-Access and paste it into MS-Frontpage (HTML source code view) and what do I get? Not the plain, simple text that is visible in the text box in MS-Access (not formatted at all), but ugly, MS-Formatted HTML. I wouldn’t be as pissed off if it happened from MS-Word, or another app that had formatted text, but the text I copied was just in a box, no formatting, no nothing.


Example two would be similar. I head over to copy some javascript and ASP to use. Do you think that when I copy the text from the page I get the text that is copied? No chance baby! Instead I get the HTML formatted version of the HTML code. IE: Even though the screen shows me “<table>etc…”, when I paste it pastes “&lt;table&gt;etc…”


The only way I have found to get around this is to copy, paste into notepad, copy in notepad, and paste into your app. For some reason that removes all the “extra” formatting (or “shit” as I like to call it).

6 Comments on “Doing The “Right Thing””

  1. πŸ™‚ Ya, this bugs the hell out of me too.;). Copy from MS app, into UltraEdit and then to the other MS product… I think a paste special might work come to think of it.. perhaps I’ll try it today.:)

  2. Ok Darren, that’s fine, so how come it works “Right” when I copy and paste into notepad? Even if the page uses “&lt; &gt;” it still shows < > on the page, and I should be able to copy what I see, not what is behind it.
    If this wasn’t the case, you’d have big problems cutting and pasting images (and getting reams of data instead of a picture πŸ™‚

  3. of course, the source of that linked page uses the character entities…. so you /are/ getting what you’ve copied… πŸ˜‰

  4. …and it would seem the problem rests with FrontPage, who is replacing the < and > with &lt; and &gt; “for you”.
    Which is, of course, the reason why a /real/ web guy wouldn’t use Frontpage. πŸ™‚ duck

  5. Because, like I said, it would be Frontpage replacing the brackets with their character entries…. it thinks “Oh, this is web text he wants displayed, so I better format it for web display” instead of “Oh, this is code he wants to enter”…. so it’s not that it figured out the page you’re copying from was using character entities — it’s that it’s taking it upon itself to insert character entries for you, because it ‘knows’ it was copied from a web document (when you copy text, Windows’ clipboard stores more than just the text – it also stores the data type)
    Notepad sees “Oh, here’s some copied text”, because it doesn’t know about character entities or web data type.

  6. Darren: still, it’s a case of MS programs doing what they think is the Right Thing, when in fact, it’s exactly the opposite. Why would the data type from Access’s text dialog be HTML though? It has less formatting than notepad!
    And as far as real web guys using frontpage, that’s exactly correct. However, programmers, when employed in a project that uses FP, will πŸ™‚