Archive for December, 2004

The Perfect HTML Editor

Monday, December 27th, 2004

…There’s no such thing. Or at least as far as I can tell…or not free anyway..

The thing is, that as far as HTML editors go, my requirements are fairly simple, but most editors seem to be full of the flashy extra crap like GUI tag editors and lack the basic things required to make doing the every day stuff simple.

So here’s what I think is essential in an HTML editor -

  • Proper concept of a project – not just a directory you point it at, but a real concept of a project, with all the settings and layout saved in the project, allowing you to get right back where you left off. Also, I don’t want to see a messy tree of my filesystem on the left – the site I’m working on will account for less than 0.01% of my filesystem – why show me all the rest of the crap? Just give me an overview of the project directory structure.
  • Simple Remote synchronisation – Each project should be able to have a remote location associated with it, and publishing to the site should be a one click operation. Also, synchronisation should work two ways – external changes to the remote site should be detected and the user given the option of merging or overwriting. This should support FTP at a minimum, and probably WebDAV too. Support for source control systems such as Subversion and CVS would be a bonus.
  • Flexible tabbed multiple document interface – the ability to split views in arbitrary ways allowing multiple documents on the screen at once without the mess of traditional windows based MDI
  • Syntax Highlighting Full support for all HTML standards through to XHTML as well as CSS and javascript is essential.
  • Site management functions – Create directories and move / add / copy / delete files through the editor’s interface – have these changes propagated to the remote site when the publish button is pressed.
  • Keyboard shortcuts – HTML is text based, and text based means typing – so working on an HTML page should not require you to take your hand off the keyboard any more than is absolutely essential. There should be good keyboard based navigation including marked locations (or bookmarks) as well as shortcuts for all menu and toolbar operations. ESPECIALLY the publish function.

To add to that, here are the Nice To Haves…

  • Code completion – I want the editor to understand (X)HTML to the point where it can autocomplete for me – and particularly show me a list of valid options for the current cursor location. This includes (X)HTML tags, attributes and CSS.
  • Macros – two ways of doing this – either by assigning each macro to a key combination (CTRL+something, etc), or by assigning them to words, and then having a macro expansion keypress – or tie it in to the code completion system.
  • Extra synchronisation remoteprotocol support Support for publishing via rsync, CVS, Subversion, SSH/SFTP, and any other remote protocol or source control system would be good.
  • Refactoring – If I move or rename a file it would be good if the editor could update all the links to it in the project
  • Flexible syntax highlighting – The ability to install custom highlighting rules, so as to make support for things like server side scripting or CMS templating languages would be useful
  • Code Folding – This could be based on block level elements or indentation
  • Code formatting options – Configurable formatting options for tidying the code
  • Automatic validation – formatting errors and style warnings should be highlighed as I type, with a description of the problem, and maybe even suggested fixes where possible.
  • Spell checker- There should be a built in spell checker
  • Preview – If a preview mechanism is built in, then it should update automatically as I type. If I have to press a button then I might as well use an external browser. Also to be useful, the preview window should be able to be along side the code window – it’s no good if you have to switch views to get to the preview. Multiple rendering engines should be able to be used (at least IE and Gecko, or KHTML and Gecko on Unix and Mac systems) and it should be possible to use them all at once.
  • Image management – Some degree of image management would be useful – even if it’s just a thumbnail representation of the image in the project structure, with the ability to view it full sized in the main pane by clicking on it. Providing resize / rotate and format conversion options would be useful, and so would an easy way to launch a pre defined external editor.
  • Templating system – a lot more advanced, and not anywhere as important as everything above would be a decent templating system, allowing you to define and include common components, and have it generate pages for you from them. The generated pages would be protected by the editor, which would either prevent you from directly modifying them, or warn you strongly against doing so.

Features that are _not_ useful. Or at least not at the expense of any of the above are the following -

  • Predefined tag toolbars – seriously, how difficult is it to type <h1>? Tag toolbars are a waste of valuable screen space. It’s usually far quicker to just TYPE the damned thing than to take your hand off the keyboard, grab the mouse, find the right pallete, click the button, and put your hand back on the keyboard, and with code completion and macros the buttons would be completly irrelevant.
  • Tag property dialogues – These always end up being more confusing than helpful, and provide nothing that decent code completion and validation don’t provide. More GUI means more mouse, which means less work done and more RSI.
  • Script libraries / HTML fragment databases – Not as easy as macros and not as powerful as a real templating engine – Both of these can be replaced by a keyboard driven macro system – remember, it doesn’t save you time if you have to pick up the mouse and then dig through multiple levels of folders

Of all the tools I’ve tried, the ones that come closest to what I want are not HTML editors, they’re programmers editors – Vim, Kate (KDE), and Eclipse.
Of these, Eclipse shows the most potential – it has the best tabbed MDI interface I’ve ever seen, it has inherent support for macros, code completion, syntax highlighting and refactoring. It uses projects rather than just directories, and has excellent remote synchronisation capabilities. The only problem is that most of those features only work with Java code and Java projects. There are a few projects trying to provide those features for web developement – the Eclipse Web Tools project for start, and the excellent commercial MyEclipseIDE package. However, the former is still in very early stages yet, and the later concentrates on features for J2EE development, so doesn’t really cater for standalone web site development. (it has very good HTML and CSS completion/highligting/validation though).
Remote synchronisation support is only really good with CVS too, and Subversion – which isn’t quite as appropriate for simple web development. There do exist ftp and WebDAV Team plugins, but I’ve never had much luck actually getting them to work.

The other issue with Eclipse is that it’s very large, and full of features not necesary for static web development. However I think that it’s still probably the best bet in the long run. Either that, or I’m going to have to write my own. Right after I learn Swing or SWT….heh

So if anyone reading this knows of an editor that meets at least the essential items at the top, and is free (beer, speech, whatever) or less than $AU100 then let me know!

In the mean time I’ll stick to editing static sites using Kate, and JSP/Servlet web apps with Eclipse and MyEclipseIDE

Christmas redux

Sunday, December 26th, 2004

Had fun, didn’t eat too much, didn’t get enough sleep, and Caitlin got enough presents to run a toy store for a year.

Pictures here

Don’t sleep…shop!

Saturday, December 18th, 2004

…It’s good to see that Westfield has got the true meaning of Christmas nailed down…

I’d almost consider wandering down there at 3am on friday morning, just to see who on earth would be up and shopping at that time…..but I don’t think I will.

Today I was thwarted, on many fronts.
To start with I headed off to the computer fair to see if I could pick up that $40 second hand motherboard with a PIII 533 in it that I saw last week, or failing that, something similar to upgrade Caitlin’s computer with.
But there was nothing! There were only a couple of very sparsely populated second hand tables, and didn’t really have anything worth buying – although I strongly considered spending a couple of hundred on a complete used system instead, but fortunately willpower won out, and I left empty handed.
Well, empty except for the inevitable egg and bacon roll that is…

So, having failed at that task, I instead headed off to the mall to see if I could finish off….or start….my Christmas shopping, but was again thwarted at every turn. I’d had plenty of ideas last night when we wandered around the Canberra Centre, but unfortunately nothing I thought of could be found in Belconnen – even though the stores I’d seen them in were also in the mall.
Along the way I wandered in to Dymocks, and accidently wandered out with Shadowmarch – which I hadn’t intended to buy yet, but that’s what I get for walking in to a bookshop with money in my wallet…heh

I guess I’m going to have to head in to Civic tomorrow – so for today, I think I’ll go work on some music.

Toys and Chocolate!

Wednesday, December 15th, 2004

….I didn’t just spend the evening playing with Caitlin’s Christmas Present…honest!

well, maybe I did…….just a little bit…

But it’s all packed away again now ready for wrapping, now that I’ve thoroughly iinspected it.
I had originally planned on getting her the 4″x5″ model – as that was only around $130 – the 6″x8″ was about $200 at the cheapest – but when I finally went in to Harvey Norman today to buy it, they didn’t have any 4″x5″ ones. Instead, they had stacks of the Digital Photography Kit ones and plain 6×8 ones.
The Digital Photography kit ones were $150, and I assumed they were 4×5 – and since it was for drawing, not photo manipulation that I expected her to use it for, I was about to leave and go look somewhere else.
But then I noticed that it appeard to be the 6×8 version. I looked closer and it very definitely was 6×8.
They had the plain 6×8s there for $200, so what was different about the Digital Photography Kit versions (apart from being silvery) that made it so much cheaper? (and only $20 more than the plain 4×5). I examined the box carefully, and it still came with a drawing / sketching / painting program, and also included Photoshot Elements, which the 4×5 ones didn’t. So as far as I could tell, it was a far better package than the plain 4×5, and much cheaper than the plain 6×8 – so still rather bewildered, I bought it.

When I got back to work, I did some more research and the RRP for the DPK is $267 – and every web site and store I found had it for at least $250, even those that had the plain 4×5 and 6×8 for less than Harvey Norman.
There was no indication that it had been marked down or anything at Harvey Norman, so I have a very strong suspicion that it was incorrectly priced – by about $100
I’m definitely not complaining about that – I hadn’t been too sure about the small drawing area of the 4×5, so havingthe 6×8 fall within the realms of affordability was a nice bonus.
So I guess if you’re in the market for a 6″x8″ Wacom Graphire 3 – I’d have a look at your local Harvey Norman, RIGHT NOW, before they figure it out and change the price.

In other news, the Within Temptation CDs I ordered last week appeared in my letter box either Monday or Tuesday (I didn’t check the mail till tuesday) – Which means they arrived either 2 or 3 days from when I received the dispatch email, and only 3 or 4 days from placing the order. Over a weekend, during the Christmas period, from a UK based web site (CD-Wow).
The packages themselves came from Hong Kong, which explains some of the speed – but not all of it. I would have expected the Australian leg of the journey alone to take that long.
I’m not sure if they have a few distribution centres around the world to speed up delivery (and probably lower their costs – as they don’t charge for delivery) or if they actually run out of HK. I’m guessing the former, as they do appear to be very much UK based.
The CDs were cheap too – about 8 pounds each, so I got two import CDs – one of which was a special edition for a total of $AU42 – I think I’ll definitely be looking at using their service again.

And speaking of deliveries – I just got a hamper full of Chocolate from my landlord, lots of yummy stuff, from chocolate dipped fortune cookies, to very deadly fudge, to some “Strawberries and Cream” – which are dried whole strawberries coated in white chocolate. I don’t think I’ve ever tasted anything like it. Very, Very yummy…hehehe

muzzy…

Sunday, December 12th, 2004

(I’ve really got to stop with the one word titles).

anyway, it’s 1pm and I just got out of bed – for the second time today, as I first got up at about 8:30 after going to sleep at about 3:30 – then I came home and went to bed.

So as a result, I’m kinda not with it right now….but at least I feel a little bit more ready to face the world…

And yes, in case you can’t tell, last night was pretty good….heh

Amazing Feats of Self Control….

Saturday, December 11th, 2004

I went to the computer fair today, and wandered around for about two hours, and DIDN’T BUY A THING.

I didn’t buy a Graphics tablet for $55, or even one for $49 – I didn’t buy the $44 wireless headphones, I didn’t buy a wireless mouse.
I didn’t buy the Pentium III 533 motherboard & CPU for $40, nor did I buy one of the three very nice little compact second hand Pentium II 400 complete systems for $100 each.
I didn’t buy a $40 bluetooth USB adapter, or a $55 802.11g card.
I didn’t even buy some DVDRs.
I had even gone in there with the vague intention that if I saw an 802.11g access point for $100 or less, that I would buy it. So in otherwords, I was mentally and emotionally prepared to spend $100, and I STILL didn’t buy anything!.
I was so restrained, it’s scary.

I did buy a bacon and egg roll before I left…but that doesn’t count…heh

Then I headed to the mall with the intention of looking in Myer to see if they had any more of the Country Road shirts I’d been buying – it’s the work Christmas party tonight, and I’ve worn my blue shirt a few times now, and the green one along with my grey pants makes me look like a park ranger or something. So I was hoping to find a dark red sort of colour. Unfortunately it’s kind of out of season for heavy long sleeve cotton shirts, so all they had was a probably too bright red in either Small or Extra Large, so I didn’t bother.
Blue it is!

So that’s another $100 I didn’t spend!
Also, on the way to the mall, Queen’s “I want it all” came on (yes I do damnit!, and right now!) – and I noticed just how much of an awsome 80s hard rock air guitar inspiring piece it is, and so decided to buy the album if I could find it.

I looked in JB, but whilst they had a few Queen albums, and not just the Best Ofs they didn’t have that one. The Music Shop had all three Best Ofs, and two live albums, but no studio albums. This kind of pissed me off a little – If a band is good enough to have THREE best of albums, and a whole bunch of live albums, then surely they are good enough for a decent music store to stock ONE OR TWO of their actual studio albums – you know, the ones the band laboured hard over, spending hours in the studio recording, and choosing the right tracks. Not the ones some producer threw together to generate a quick revenue boost….Gah!

I also looked in Sanity, but 10 seconds in there and it occured to me that I didn’t know why I ever bother stepping foor in that store. I’d probably have more luck trying to find real music in Bras n Things than Sanity. The Virgin Music store in Myer was pretty much the same.

So another $20 saved – though not exactly a feat of self control, ’cause I REALLY tried to spend it.

While I was in JB I also noticed that the RotK collectors edition is out.
So I popped in to EB to try to layby it, but unfortunately they didn’t have any. I figure I’ll just buy it outright next week.

So money spending thwarted again!

Although, I must admit that I accidently ordered two Within Temptation albums (Mother Earth, and the new one – The Silent Force) from a UK web site earlier in the week. But they do free delivery and the two albums together only came to $45 so that’s not too bad – but it does mean I’ve broken my No Buying Music Online rule.
Oh well.

Oh, by the way – yes I’m still alive, and no, I haven’t posted much lately.
You get that.