Category Archives: SDLC

Software Development LifeCycle

Cheap hardware fails: film at eleven

I was wandering through my local Coles supermarket last night and found a $40 M-TV brand SD Set-top box. I figured that sounded like a good deal so bought it. It plugged in, tuned up, worked well and supported my 16:9 TV. It proved that the digital reception issues I’ve been having are not the fault of the TV cards.

This morning the sound had almost died. Very quiet, and with popping and such overlaid.

In the hardware industry, this is called “infant mortality“. If the cost of handling returns is high, you try to catch the early failures by running a burn in test. We did that at my first job, because we were experiencing massive infant mortality rates – they all worked fine right out of the box, but run ’em for a day and poof! they were dead. So we built a rig to have them scan a barcode over and over again, and software to capture the results and check for accuracy. Shipped a bunch of duds back to the manufacturer, who smartened their game up, and stopped pissing off our customers.

I guess STBs sold by supermarkets don’t have high return handling costs.

This Is Broken is broken

This Is Broken used to be a terrific blog — simultaneously entertaining and educational (at least for those of us who have anything to do with building or implementing interfaces of any kind).

But now it’s broken. It’s all migrated into the Good Experience Blog, which might be okay in principle, but it dilutes all the Broken stuff that was the most fun. I don’t want to read job offers for North America. Nor am I particularly interested in many of the articles. And while you can view just the Broken articles on the web, there’s no RSS feed for just those posts.

(I’d leave a comment to this effect on the This Is Broken post that announced the change, but comments are closed. Which is also broken. Someone else left the same comment, anyway.)

So I’ve unsubscribed to the Good Experience RSS feed. There is a Flickr group that is still dedicated to broken stuff, though its attached RSS feed appears to link to an inactive discussion forum.

The Project

I started The Project primarily so I could learn PHP. I’ve been using ASP (classic and .Net) for a while now, but wanted to try another web development language, preferably one that would be compatible with my dirt cheap web hosting. The way I envisaged it, it would be straight HTML/CSS, no fancy AJAX, using PHP and database lookups.

For development, I set up a Virtual PC with Win2K on it (quickest, best, easiest basic Windows version I had an unused licence for) and put IIS and PHP and MySQL on it. All reasonably easy. For database admin I put on PhpMyAdmin; it’s what runs on my web ISP, and is reasonably easy to use. For the IDE I looked around at Zend and some of the other paid tools, but decided to try DevPHP, a freeware thing, until I figured out if this project was going to fly.

It was all going well until I wanted to do some mod_rewrite fiddling with .htaccess. There are a few things around the place that purport to make mod_rewrite (or an approximation of it) work in IIS, but nothing seemed to do it well. In a fit of rage I ended up removing IIS and going the whole hog and installing Apache instead. It actually runs very well on Windows, and (after re-installing PHP and doing some config fiddling) matches my web ISP much better than any version of IIS could.

After using it for a bit, I also got a bit fed-up with PhpMyAdmin, which is particularly laborious for entering data. It’ll only do two records at a time, and semi-regularly seemed to ignore the second. Then I found the MySql GUI tools, which by comparison are an absolute Godsend. Why did nobody tell me about this before? (Actually it looks like I found a bit of it some time ago, but hadn’t used it properly until now.)

The coding has been coming along nicely, and the basic functionality is ready. I’ve got a couple more enhancements I’d like to do before it goes public.

So what is The Project? Not telling. But it’s aimed at non-geeks, going to be free for users, with Google Adsense to try and pull in some income (and get it indexed quickly). Maybe it’ll pay for itself, maybe not. But even if not, it’s already been successful as a way for me to learn some PHP.

Update 2007-04-19: The Project is now live.

Busy

Too busy to post much. Major deployment this weekend. Though I’m not working as hard as some of the other guys; thankfully (and due in no minor part to our excellent tester) I think most of our stuff is under control.

Tell me how to fix the problem!

It timed out, or I closed something, or something. Then I tried typing, and Writely figured out I couldn’t prove I was me anymore:
Not logged in - fine. What do I do about that?
Not logged in – fine. But you’re meant to tell me how to fix the problem, or better yet, fix it for me.

Eventually I brought up the login screen in another tab, logged in, and all became good again.

Ajax = Chocolate = Happiness

FogBugz 4½ has been released, so that amazing new ajax features can ship:

In the last year or so a lot of web developers have been working hard on improving their applications using techniques now known as Ajax. These applications use JavaScript code so that when you click on something, you get immediate feedback, rather than waiting for the web server to send you a new page at its own leisurely pace. When they do need more information from the server, they often download the small fragment they need, rather than waiting for the server to build a whole new page. The net result is faster, crisper feedback that makes you feel in control and creates “subjective well-being,” a.k.a. happiness, a feeling that is biochemically NO DIFFERENT THAN EATING LARGE QUANTITIES OF CHOCOLATE.

Who doesn’t like chocolate?

Writely: a product review

(At least, the collaborative editing bit.)

    “Only if it were a little less disjointed.” The review that is, not the product. The review started as a test of Josh and Daniel concurrently typing all over a document.  For ease of reading, the first person has been used for both Josh and Daniel; a kind of gestalt entity, a multi-headed hydra, a two-headed knight that can’t agree if after the period at the end of a sentence you should have one or two spaces.  Not that it matters in the world of HTML (unless, like this product, you chuck in non-breaking spaces). If you are angered by any of the writing or formatting, Daniel Josh Daniel wrote that bit. Rabbit season.

A concurrent word processor – what’s that?
I’ve got this friend, Andrew.  He had a project back at Uni to write a concurrent word processor, which his team did in Ada with each keystroke being sent to all editors (I wonder if that ever became a viable product?).  Which means two people could work on the same document.  At once.  Even the same sentence, or word. When he told me about it, I thought that software like this would be cool, and relatively trivial to do, but until the Internet came along there wasn’t the always-on ubiquitous network that would make it workable for many people to edit something.  So, like an idiot, I promptly forgot about it.  And then Google didn’t buy me out.

Jokingly one might refer to such an idea as Edit Wars. But it’s not hard to see how useful realtime (or nearly realtime) collaborative editing could be. No continuous emailing of differing versions around the place to thoroughly confuse people, quicker turnaround on edits, and all in a near-WSIWYG environment.

Actually, this would work really well for wikinews (which actually does have Edit Wars). Actually, wikinews would have some problem with actual concurrent editing because MediaWiki (what wikinews runs on) has a change-and-publish model.  I wonder how the MediaWiki system deals with micro-changes – i.e. a keystroke at a time?  Anyways, the reason I mention wikinews is because for information on the 7/7 bombings on the tube I went to wikinews – It actually told me what was happening, where and gave maps and was constantly being updated. 

But with several edits a minute, actually getting any information into the article was very difficult – changes kept failing. MediaWiki doesn’t lock people out while a change is being written; it uses something like CVS, and if it detects concurrent editing gives you an error in response to a save.  Saves are manual.

Using VNC would allow two people to view a document while one edits it, or more precisely to allow multiple people watch a single one edit.  But multiple editors, that’s cool.

So, Writely seems to have functionality roughly on par with MS-Write.  Which, in my opinion, is plenty.  You get hyperlinks and insertable images.

Responsiveness
Writely’s first problem is the document editor can be slow to load. It’s obviously heavily dependent on network and browser speed. During one initial try at it, the network connection was as slow as mollases.

When someone else jumps in, an orange bar at the bottom of the screen tells you this. Once editing is happening, it only appears to pick up changes every minute or so (reflected at each end by the Saving prompt appearing in the top right). Arguably this is fair enough for most applications, but definitely not quite as nice as real time. I was hoping it would be character-by-character, like Andrew’s thing back at Uni.  That would be concurrent.  You could see what areas others are working on and watch, or avoid that area and work on another. Sending each keystroke would be a doddle bandwidth-wise, even the fastest typists run at around only 120wpm -> 720cpm, 12cps.  but with 10ppl going at it at once, that’s 120cps, but I guess the server could bundle them together before redistributing out.  You would have to include sequencing information in each packet to prevent out-of-order application of keystokes and other UI interaction.

But even if it’s not realtime (e.g. almost realtime), I can see the benefits, for many applications.  Like what?  It’s not too bad for knocking this into a coherent review, but something to provide hints about where the other editors have been touching stuff would be good.  It doesn’t appear to use visible revision marks. I find them a pain in the arse in Word, but at least you can tell who’s done what… even more important with multiple concurrent people all hitting the document. It does track all the revisions in the Revisions tab, which includes facilities to compare versions. Might be nicer if it showed show revision marks like Word, in the document itself.  With some sort of aging (maybe a coloured background that fades back to white?), and an ability to “accept” the changes – by which I mean tell the edit program to tell you if that text changes again.

Undo/Redo
There’s a chronological edit history type of view off on one of the tabs; I wonder if any thought has given to “replaying” the saved document to give you a feel for the evolution of the final document.  At the very least, it would demo well, even if no-one ever used that feature.

This has undo/redo; for typing it appears to act on the last sequence of typed characters.  And how does undo-redo work with multiple people editing?  You could keep a local buffer, but what does it mean to undo stuff if others have changed the text you were editing? We didn’t try too hard to find out.  The algorithms for that must be really scary, or really lame.

Writely is multi-user chat?
Perhaps this is only any good as multi-user chat. But, as multiuser chat, everyone would have to adopt different colours.  And, like in a wiki, people could be running all over the place changing the history of the chat.

Why did you call me a buffoon?
I didn’t!
Yeah you did, look back there.
<Huh?!>

Nah, it’s no chat tool.  It’s a not-too-bad collaboration tool.

Bugs / weirdness
This thing is beta, which is latin for “still doesn’t work”, but here’s some stuff we noticed in our half-hour of mucking around:

  • Save chops the trailing space off a line!  So if I’m typing, and stop for a bit to think, and it takes advantage of that to do a save, my space disappears and now I’m abutting the previous word.
  • I wonder what happens when the document gets so big that the different collaborators are on different screenfuls of it?
    Woah.  It does random scrolling type things to me!  Like, that jumping to the top thing.  That’s super-annoying.  It’s jumping to the top when Josh’s changes are picked up… at least, if I’m not typing.
  • Hitting delete on the end of a line that’s a bullet point at one point wouldn’t pull in the subsequent non-bullet point onto the bullet point.  Reproducing this failed.
  • Now I can’t scroll to the top of the document!  I’m off by one line, I’m on it, I can see the bottoms of the drop-down letters, but not the top.  At least the scrollbar works and I can get there with that. 
    Oh, and pageup gets me there too.  But ctrl-home doesn’t scroll me to the absolute top of the document.
  • This seems to be a difficult UI to get your head around – inviting someone else in to work on the document is non-obvious.
  • I got this error: Your most recent changes to “Random sharing document” conflict with changes just made by a collaborator, and have been discarded. This should only affect what you have done in the last few seconds.  [There was no text, I was dragging an image around, but didn’t drop it yet]
  • Tabs get turned into spaces – probably because the editor tries to match itself as being closest to HTML, rather than other formats.
  • I tried to right-click copy text, and it turns out that I couldn’t because of my browser settings.  Which is fine, instructions were given as to how to achieve it (use the browser menu).  The second time, the context menu still offered me the option of copying text – even though Writely now knew I couldn’t do that.

Dev SSL certificates

If you’re just mucking about with IIS, you don’t really want to pay a CA to get a legit certificate, do you?

No, of course you don’t. Fortunately these guys have a freebie certificate generator. Mucho handy.

Just don’t even think about using it in production code.

Oh, and don’t get the page to email you the certificate to a mailbox you can only look at via Outlook. Outlook’s dumbarse “protecting you from shadows” attachment filter won’t let you at the CER certificate file that comes through.

Naming Conventions

The cool thing about starting a new company, or having a child, or even a new project, is that you get to name it.

I fell onto Wikipedia’s list of laws, and found Diana Goodman’s Law, which says that in online discussions between women, eventually someone is accused of not having kids. Goodman is truly horrified by some of the names handed out to kids.

Unlike children’s names, with company names pretty much doesn’t matter what you call them. I’ve got one friend who named his company after a psychedelic drug, another who chose his hobby for a basis and a third after a Futurama character. Others pick some lame set of initials and add ‘consultants’ or whatever on the end. Myself, I went for truth-in-advertising: Intellectual Mercenaries. I was toying around Fictitious Deduction for a while, but rejected it as being a little dangerous in the accounts receivable department.

You’re not going to see truth-in-advertising in Project naming, no project Keeping Up With The Competition, or Dragging This Pile of Bones Kicking and Screaming into The 1990s. Acronyms seem to be very popular, even if a lot of the time the acronym becomes rather forced. Microsoft and Chip companies seem to like US Cities, perhaps because it doesn’t give anything away.

Project naming needs some flair. I suggest Pokemon Characters. I was going to suggest another Japanese franchise, but realised someone’s already gone down that path (sometimes my brain can’t keep up with my imagination).

What memorable namings have you seen (in any of the above categories)?

Dr Watson bites arse

I had a program that was crashing at the customer site, but not in any way I could reproduce back at the office. I wasn’t able to load up a dev environment on the affected box, but someone had the bright suggestion of running Dr Watson (DrWtsn32.exe), and checking out the stack trace. As we all know, if you know your codebase well enough, you can almost explain a crash just by where it happened.

So I created an exe with debug symbols and optimizations removed, and waited for the crash. The DrWtsn32.log contained, amongst other things, the dump of the thread that caused the program crash:


*----> Stack Back Trace < ----*

FramePtr ReturnAd Param#1  Param#2  Param#3  Param#4  Function Name
0100F9E8 00438172 01010460 0100FBE0 0100FB00 00D85698 !<nosymbols> 
0100FAF4 0048DD45 01010460 0100FC54 0100FBFC 00D85698 !<nosymbols> 
0100FBEC 004C3DBE 0106D028 00000114 0100FC60 0100FC64 !<nosymbols> 
0100FC54 004C3C17 00D8AFC0 00000114 0100FD60 0100FD70 !<nosymbols> 
0100FCDC 004CBDE9 010101F0 00000110 0100FDE0 0100FD70 !<nosymbols> 
0100FD60 004C6FC5 010101F0 00000110 0100FE44 0100FDF0 !<nosymbols> 
0100FDE0 004B63BD 010101F0 00000110 0100FEEC 0100FF00 !<nosymbols> 
0100FE50 004B61B6 010101F0 00000110 0100FF7C 0100FF00 !<nosymbols> 
0100FEEC 004B5C9C 010101F0 00000110 00000001 000001FB !<nosymbols> 
0100FF7C 1020BFD2 00D84058 000001FB 00130178 00D85698 !<nosymbols> 
0100FFB4 77E8B2D8 00D85698 000001FB 00130178 00D85698 !beginthreadex 
0100FFEC 00000000 1020BF20 00D85698 00000000 00000008 kernel32!lstrcmpiW 

Which added nothing to my understanding of what went wrong, beyond it happened at some point after the thread started. Great. Did I mention I’d done a debug build – the kind with all the symbols compiled in? Anyway, I figured switching to the binary output (which I understand is like a unix core file) may provide further explaination.

The format of the binary output from Dr Watson is lost in the mists of time. I had to go to an NT4 server install CD (you have to love the pack-rats who keep the German Server version of NT4 ©1999!) to locate the two necessary files for working with the user.dmp file it generates. The files are DUMPCHK.EXE and DUMPEXAM.EXE.

Running DUMPCHK.EXE gives a little output

C:\...\RetailGateway>dumpchk user.dmp

Filename . . . . . . .user.dmp
Signature. . . . . . .USER
ValidDump. . . . . . .DUMP
MajorVersion . . . . .5
MinorVersion . . . . .0
DirectoryTableBase . .0x0000014c
PfnDataBase. . . . . .0x00000004
PsLoadedModuleList . .0x00000018
PsActiveProcessHead. .0x0000009a
MachineImageType . . .NumberProcessors . . .7528
BugCheckCode . . . . .0x00001f65
BugCheckParameter1 . .0x000000a0
BugCheckParameter2 . .0x00000040
BugCheckParameter3 . .0x00001ca8
BugCheckParameter4 . .0x00d6df65

ExceptionCode. . . . .0xc0000005
ExceptionFlags . . . .0x00000000
ExceptionAddress . . .0x0045b4a9
ExceptionParam#0 . .0x00000000
ExceptionParam#0 . .0x00000000

At which point I got this dialog: DUMPCHK barfs reading the user.dmp file from Dr Watson
“Oh well,” I thought, “I’ll just head on straight to examining the dump, rather that checking it.” Unfortunately, DUMPEXAM.EXE wasn’t on my side. All I got was:

C:\...\RetailGateway>dumpexam user.dmp
unsupported processor type

Which is useless. Which is the sum value of the binary dump from Dr Watson. And, in this case, all of the output from Dr Watson.