Author Archives: daniel

Sneaky popups at Fairfax

The Age and SMH web sites have seen the writing on the wall for popup adverts, with browser popup blockers now blocking most ads that don’t occur as a result of direct user action.

So you know what they’ve done? Triggered a popup if you happen to click on part of an article window which normally wouldn’t be considered clickable, such as on a non-hyperlinked word. It’s a user action, so the popup gets around the blocker. It only seems to be triggered to happen occasionally though, so you don’t notice how the popup is triggered. Sneaky.

How to embed a Word document in another Word document

How to embed a Word document (or other file) in another Word document

Sometimes it makes sense to embed one Microsoft Word document in another, rather than include a link to it, or paste the contents in. This is especially useful when sending multiple documents to people who can’t access your shared files. (Though only, of course, in environments where you can be sure everybody has Microsoft Word. If that’s not assured, you should be using something more universal, such as PDF.)

For some reason Word makes it quite tricky to do, its interface preferring to send you down the path of taking the contents of your second document and pasting them into the first.

The easiest way I’ve found:

  1. Find your second file (the one to be embedded) in Windows Explorer. Copy it (Ctrl-C)
  2. Go to the spot in the document you want to embed it in
  3. On the menu: Edit, Paste special, paste as Word document (or as file), then turn on Display as icon. (Ignore the gibberish where it claims to be pasting as a bitmap picture.) (Note in the screen grab below how short filenames live on in WinXP/Word 2003, ten years after long filenames were introduced into Windows)
  4. Click Change icon
  5. Change the caption to something meaningful, as Word’s default behaviour is to give it the incredibly useless caption “Microsoft Word Document”
  6. If you want you can change the icon, though unless you’re deliberately trying to confuse people, the default is probably fine.
  7. OK, OK. It should be done. Test by double-clicking on the icon

Microsoft today started previewing the next version of Office. Ten bucks says it won’t make this process any easier than it is now.

Dialog box for embedding documents

Acquisitions galore

Oracle acquired Siebel.

eBay acquired Skype. Paypal was a logical acquisition for eBay, but I’m not sure this makes much sense. There’s speculation they’ll be convincing buyers and sellers to talk to each other via Skype to speed up transactions, but would that be a huge benefit over email? There’s some speculation prospective buyers could call sellers, too, but is all this worth the billions (US$2.6 billion, plus stock plus performance bonuses) eBay is forking out?

Oh well, Niklas and Janus (Skype creators) must be pleased. Now, why can’t I think up something cool like that?

Me? I acquired a chocolate bar.

Why Google is the new Apple

They’re not Microsoft

They innovate

People watch everything they do

They’re cool amongst da people

Despite being cool, they’re quite secretive (no Google blogs apart from an official one… no Apple blogs at all)

They don’t speculate on their products until they launch them, catching their opposition by surprise

I’d love to think of some more, but I’m late for dinner.

Apple announces iPod Nano (and some other stuff)

iPod NanoWell, after much speculation, this morning (AU time) Apple announced a swag of new stuff, including:

  • the quite ludicrously tiny iPod Nano (I reckon I’d lose it)
  • the very expected Motorola ROKR mobile phone, the first to include iTunes (shame it’s a Motorola. I hate Motorolas.)
  • a shiny new version of the iTunes software, featuring parental controls (woo hoo, does this mean no more Lenny Kravitz’s What The F%$# are we saying for my kids?), syncing data with Outlook (at smeggin’ last), playlist and shuffle enhancements
  • some exclusive content to the iTunes store, which therefore means we CAN’T BUY IT IN AUSTRALIA (grumble)

Out to lunch

Windows XP Task managerYou know what really bugs me about Windows and Office sometimes? Sometimes a process will just decided to grab all the CPU and go out to lunch for minutes at a time. I don’t know what it thinks it’s doing — re-indexing its data, re-compiling itself, contacting Mars, something like that. Whatever it is, it’s not paying much attention to what I want it to do.

Outlook just did it. I was in the middle of writing an email. Voom, out to lunch. I managed to save it and exit. And the process kept running till I killed it. WTF? And before you ask, yes, my antivirus and firewall are primed, up-to-date and running. Latest releases, latest service packs of everything. This stuff should be stable.

Annoying, that’s what I call it.

Documenting Oracle databases

We all know what a right PITA it is keeping database documentation up to date. You’ll get a column added to the schema, and make a mental note to update the docs with the intricacies of how it works, then you’ll get distracted by something, never get around to it, then six months later you’ll be trying to remember the details.

Fortunately, the newer versions of Oracle have a rather marvellous commenting feature for tables and columns, so you can document it at the same time as you build it.

To put a comment on a table:

COMMENT ON TABLE xyz IS ‘This is a table for recording xyz usage’

Or on a column

COMMENT ON COLUMN xyz.frequency IS ‘Frequency of xyz usage’

Now, this might be of limited use if you couldn’t get the information out easily. Fortunately, you can. Apart from turning on the comments options in schema browsers such as TOAD, you can get a list of table names with their comments like this:

SELECT t.table_name, t.comments
FROM all_tab_comments t
WHERE t.owner = ‘tableowner’
AND t.comments IS NOT NULL
ORDER BY t.table_name

…and the following will generate a nice list of tables, columns, column types and their comments:

SELECT c.table_name, c.column_name, ac.data_type, ac.data_length, ac.nullable, c.comments
FROM all_col_comments c, all_tab_columns ac
WHERE c.owner = ‘tableowner’ and c.column_name = ac.column_name and c.table_name = ac.table_name
ORDER BY c.table_name, ac.column_id

Mind you, the data length field comes out a bit funny for CLOBs and Numbers. Still, with a little imagination you can write up a quick program to format this output nicely in HTML or WikiText or whatever, for your database documentation.