Things you didn’t want to know about Excel, part 37 of many

3 Sep 2007

, ,


When you try to open a text file or a comma-separated variable (CSV) file in Excel, you may receive the following error message:

SYLK: File format is not valid

This problems occurs because the first two letters in the file are uppercase “I” and “D”

Yes, that’s right – if you output data to a comma-separated text file and if the first fieldname is “ID” then Bang! Crash! Kaboom! Unhelpful error message! Confused user!

MS knowledge base article about the problem http://support.microsoft.com/kb/323626 confirms that this is a problem with Excel 97, 2000, 2002, and 2003. Two possible fixes: you can change the uppercase “ID” to a lowercase “id” or you can put an apostrophe in front of the “ID”.

A few other things I have done this evening:

  • Uploaded pdf files for a customer. (New to the job, got a website to look after, and it’s all rather daunting.)
  • Set up example html pages to demonstrate how width of the browser window will affect the page design and layout.
    For this site, the designer’s original concept filled the page, and it was liquid, so when you resized the browser the webpage changed to fit. This affects text and image placement in ways which people never understand when they’re looking at a jpg or if you’re trying to explain it to them over the telephone; they’ve got to see a real-life example. So I made one.I used my pictures of a knitted dalek instead of the standard stock images – oddly satisfying.
  • Php Problem with one of my sites
    Hosting company upgraded to latest version of PHP (5.2.4) over the weekend, and there’s a bug (http://bugs.php.net/bug.php?id=42523) which means that PHP_SELF isn’t giving the correct name for the executing script.
    Result : none of the forms work properly.
  • Email Problem
    Some emails from site are not arriving. Tracked down to a smtp mail relay problem.
    Note to self: Should have been picked up in testing last week. In future always test with mail to and from addresses which are outside my main domain.
  • Maximum upload size in IIS 6
    Trying to explain settings for AspMaxRequestEntityAllowed and MaxRequestEntityAllowed.
  • Looking at configuration options for a suite of shopping carts, where we may (or may not) want to show prices, quantities, price + quantity (as a dropdown) or none of the above. It all depends. And it’s confusing.
  • Deleted 309 spam comments from the blog moderation queue.
    The usual porn, but there were a suprising number about cars and ringtones. Have downloaded and installed the TanTanNoodles Spam Filter
    http://tantannoodles.com/toolkit/spam-filter/

And my mother is under the impression that I spend my time making websites.

Getting ready for hackday

8 Jun 2007


Hack Day: London, June 16/17 2007

Got the invite and now wondering what on earth I’ve let myself in for. Panic time.

Friday afternoon update

It’s almost here. I’m not ready at all. I’ve booked an hotel (I’m too old to crash out on the floor in a sleeping bag), checked maps and train timetables, bought some little oranges to see me through the day and started panicking. I’m now having visions about 500 programmers, all of whom know each other, and all of whom know what they’re doing. And I’ve just realised that I do not have a digital photo of myself anywhere, so I’ve updated my backnetworkprofile with evil Alice.

My big problem is thinking of something to do – I can take other people’s ideas and run with them, and build an application which works, but I’m not great on inspiration from a standing start. I need an inspirer. Or (honest to God, I didn’t make this word up), some idearation

Children, don’t try this at home

7 Jun 2007

,


Advice on personal productivity from Marc Andreessen (co-founder of Netscape):

… don’t keep a schedule … By not keeping a schedule, I mean: refuse to commit to meetings, appointments, or activities at any set time in any future day.

When someone emails or calls to say, “Let’s meet on Tuesday at 3”, the appropriate response is: “I’m not keeping a schedule for 2007, so I can’t commit to that, but give me a call on Tuesday at 2:45 and if I’m available, I’ll meet with you.”

Of course, this advice comes with lots of caveats, and apparently it doesn’t work for everyone (you don’t say), although it does work for that well-known guru of business productivity, Arnold Schwarzenegger.

I’m still boggling.

Who needs web design?

5 Jun 2007


I loved this – www.noonebelongsheremorethanyou.com Breaks soooo many rules about web design and accessibility blah-blah-blah, but I loved it. Essentially an online ad, but such a witty one.

Getting real with subversion

,


I’m getting serious about using source control (although you can call it version control if you want to) for my projects.I’ve been using subversion for about a year now, and have had a few applications under source control, but since I’m a sole developer there’s never been the urgency you get in a shared environment. In other words, I’ve never had the kind of major disaster which really convinces a development team to take source control seriously. (Usually happens after one programmer realises that their code has been overwritten and tries to murder the culprit.)
But even on my own I’ve found it very very useful.

  • I like the separation between the repository and my working folder
  • I like being able to get a historical list of changes made. And yes, I do log sensible comments, not just ‘code updated’

So, from now on, all live projects are going into source control.

Eric Sink on Source Control

Php Swift Mailer

4 Jun 2007


I’ve recently been using Php Swift Mailer and will now be using it for all my php applications which require email.

The initial impetus was I needed to send mail via a SMTP server which required authentication, and I also wanted to setup and post multipart (text + html) messages and messages with attachments. Swift Mail does both of these very nicely.

It also checks for mail injection attacks, which php mailer doesn’t, so I’ve ditched my own message checking code in its favour. This matters, because I’ve been noticing a LOT of mail injection attacks / site hacking attempts on one of my php sites recently.

Failing with grace and artistry

1 Jun 2007

, ,


One of the problems I’ve always had with PHP error handling is catching the fatal errors. If a php script encounters a fatal error it stops, and the desired error handling code does not get executed.

So the user will (usually) be confronted with a blank screen and, worse still, since the error isn’t logged I don’t know about it and therefore can’t fix it.

It’s a rare and confident user who will report a blank page or other such glitch; people are so used to working with a certain level of pain when using a computer that they just assume it’s unavoidable or that it’s been caused by their own inadequacy in some way.

Anyway, (thank-you PHP London user group) I now have a solution using the register_shutdown_function()

<?
register_shutdown_function('cleanExit');

// ... go and do all sorts of exciting stuff ...

$running = false;

function cleanExit() {
	if ($GLOBALS['running'])) {
		// script is still running - it's an ERROR
		// tell Bronwen about the error
		// tell user it's not their fault
	}
}
>

Table names in MySQL

13 Apr 2007


To quote from the manual

In MySQL, databases correspond to directories within the data directory. Each table within a database corresponds to at least one file within the database directory (and possibly more, depending on the storage engine). Consequently, the case sensitivity of the underlying operating system determines the case sensitivity of database and table names. This means database and table names are case sensitive in most varieties of Unix

I always get bitten by this and am now making a blog entry in the hope that I’ll remember.

I have one client where their ecommerce system was setup using SquirrelCart. I came along later and built an admin module so they could manage the rest of the site. The squirrelcart has tablenames in mixed-case, but I always use lower-case for all table and field names.

Occasionally I’ll write some code to query squirrelcart tables. (E.g. squirrelcart lets people use discount codes but it doesn’t report on how often the discount codes are used, so that’s an add-on) My code always works when I test it on the development machine, but flips when I upload it. And it’s because I type the squirrelcart table names in lowercase.

New laptop stand


My standard machine is now a laptop, and at home I’m fine. I’ve bought a laptop shelf for my desk and the laptop sits at the correct height and it’s all very ergonomic and I am not having any back problems. (Two years I had a trapped nerve in my back, and it hurt. Physiotherapy and attention to posture and working environment helped, but I’m now very careful.)

The problem comes when I’m in someone else’s office or working away from my desk. The standard laptop working position leaves you hunched over the keyboard like a vulture crouched over road kill, and peering down at the screen. I like the screen at eye level. I need the screen at eye level.

So I need a laptop stand. Piles of books are at best a temporary measure.

Criteria:

  • The stand has to get the laptop screen up to the height of an LCP monitor. I’m not interested in anything which raises the laptop a miserly three inches off the table, or any product which describes itself as ‘laptop feet’
  • It has to be adjustable.
    I’m in charge and I want to be able to control position, and height.
  • My laptop is portable. My laptop stand must also be portable.
    And when I say portable, I mean it must fit in the rucksack with the laptop and all the cables, add-ons, and dinky gadgets. So I’m not interested in the stylish brushed aluminium design which will “enhance your working environment”

Last week I bought a folding laptop stand. It works. It does what I want. I’m a happy customer.

Hints for the home worker:
Over Christmas I spent some time on the sofa with the cat on my lap and the laptop balanced on the arm of the sofa. Bad idea. My neck hurt for the next two days. If you’re going to stroke a cat and browse the internet, put the cat on the desk with the laptop.

Amendment July 2007
Janet has recommended Bakkerel Huizen

Lorem Ipsum Garbage

22 Mar 2007


Sometimes you read something and just go “Yes!” to it. The following articulated perfectly my grudge against Lorem Ipsum filler text – basically no one wants to read this garbage so it ends up at 8px white text on a black background.

By not having the imagination to imagine what the content “might” be, a design consideration is lost. Meaning becomes obfuscated because “it’s just text”, understandability gets compromised because nobody realized that this text stuff was actually meant to be read. Opportunities get lost because the lorem ipsum garbage that you used instead of real content didn’t suggest opportunities. The text then gets made really small, because, it’s not meant to be used, we might as well create loads of that lovely white space.

From I hate Lorem Ipsum and Lorem Ipsum Users by Tom Smith

And I found Tom Smith’s blog entry via Getting Real by 37Signals; a collection of essays where I find myself saying “Yes!” a lot!