Category: Sci/Tech

Lead-free soldering (by )

In the UK right now, just about every electronic component, PCB, or whatnot is being labelled RoHS Compliant.

In particular, this means that Maplin, the only local place I can just drive to to pick up electronic components and tools, is now only selling lead-free solder.

Read more »

The structure of network protocol suites (by )

It's always struck me as odd that IP routes a packet to a transport-level protocol such as UDP, ICMP, or TCP and then lets that protocol handle routing it to an application process.

Since an application is likely to require a few different types of service for different parts of its operations, shouldn't the specification of the target application be more important than the transport mechanism?

Wouldn't it make sense to be able to send a UDP request to 'port 80' just as easily as you can send a TCP request, rather than requiring the web server to bind separate UDP and TCP listener sockets?

These chains of thought led me to design the MERCURY protocol.

Read more »

Protected methods (by )

In Object-oriented programming, things defined in a class can have one of (usually) three access levels: public, private, or protected. Public things are accessible to all users of the class, private things are only accessible from other things defined within the same class - and protected things are accessible from within the class and its subclasses.

However, I have noticed that protected methods are often rather insufficiently documented.

Read more »

XML (by )

For ages I've been considering writing an egotistical "ha ha I was right" post about how, back in the day, I was the devil's advocate on the XML-DEV mailing list for continuously bickering about how people kept hyping XML as a data interchange file format, rather than as a document markup language; while nowadays, the idea that XML is better than various alternatives for data interchange is no longer widespread, and many consider it somewhat unpleasantly heavyweight compared to JSON, YAML, CSV, and so on.

Seriously, sometimes people get the idea that XML is lightweight and simple - "it's just text, plus angle brackets that make up elements and stuff" - but they don't realise that a standards-compliant parser has to have a hell of a lot of character encoding logic; compliant parsers must reject documents containing Unicode characters not in an extensive list, must accept various different character encodings (yet a valid XML document may use ANY character encoding, meaning that a standards-compliant parser is not guaranteed to be able to decode a standards-compliant document), etc. And that's before we get into the higher-level semantics of What Do Namespace URIs Mean? and Should I Use Attributes Or Child Elements? and Does Giving Each Element Or Attribute An English Name Make XML Self Documenting? and so on.

Uhoh, I just started to rant. Sorry. The point of this posting is meant to be that I was going to have this big long rant about all the problems with XML as a data interchange language (although, for the record, I quite respect it as an actual markup language; XHTML and DocBook are nice), and how I was actually accused by an XML fan of being part of a conspiracy of folks who were pushing "inflexible complicated nonportable binary formats" as being better than XML purely because we recognised that XML was the Wave of the Future and would destroy the market for our software (alas, I've yet to find a link to that message in the XML-DEV archives, perhaps partly due to XML-DEV changing list host - or was it an offlist discussion? Can anyone remember it?)

...but as I was preparing my big XML rant, I came across a much better-written (meaning: less bile-ridden) writeup that lists pretty much every problem I have with XML for data.

So go and read that instead, and leave me to mutter darkly.

Although I can't resist quoting:

The Web as we see it has stagnaged since Microsoft wiped out Netscape. But all of the most innovative emerging technologies on that front are XML-based: RSS, SVG, XUL, XForms. It is way too early to say that XML didn't change the Web. Give it five years.

...from 2002, nearly 5 years ago, when I suggested that XML wasn't going to change the Web as we knew it - RSS is widespread, SVG still needs a special browser plugin, dunno about the others, and the Web looks pretty similar to me.

Splay trees, compression, encryption, and embedding (by )

There's a little-known data structure with some useful properties; the Splay tree.

It's quite a useful data structure in its own right, but it also has interesting applications in data compression, and cryptography...

Read more »

WordPress Themes

Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales
Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales