Programming Leftovers
-
Validating HTML - Jim Nielsen’s Blog
To bluntly answer the question: I validate, but only when I encounter a perplexing cross-browser issue I can’t seem to solve.
In those cases, I’ll copy the one-off HTML document I’m dealing with and paste it into the W3C’s browser-based markup validation service to check for any errors I can’t seem to spot.
While that service is useful for manually validating individual documents, it’s not particularly practical for systematically validating HTML as part of an automated software development pipeline.
That said, a while back I discovered the W3C Nu HTML Checker which also validates HTML. It has a HTTP API which you can leverage to automate the process of validating multiple HTML documents.
I wrote a little script to interface with the API and check the HTML files output by my static site generator, but it kept returning 503 errors on many of the files.
-
Death: A Terminal Experience | Saif [blogs.perl.org]
A program being executed, self terminating on encountering an non-viable condition is a typical scenario in Perl programs. The death sentence can deliver information about the departed application to the user as justification and demand appropriate resolution for the subsequent reincarnation.
Now I know my code fails more often than it succeeds, and it is for this reason I am planning an alternative wake for the programmed parting of my future terminal applications. As a once-in-a-run-time event, death might be more elaborately delivered, something to be celebrated. The last words of a dying application softens the developers ensuing grief, while encouraging resuscitation with an appropriately delivered injection of code.
-
BaCon 4.5.1pre and utilities now compile in OE
-
Setting up Emacs for OCaml Development - (think)
I’ve promised you articles about OCaml and here they come! The first order of business when learning a new programming language is to setup Emacs for effective programming in it.
-
More recursive definitions
-
GSOC Update 3
These last few weeks have been a good learning experience with Krita as I try to implement a node visitor and save context classes. First we want to create a saveContext class for svg called KisScalableVectorGraphicsSaveContext that will be used to save to the file when visiting all nodes. This class is fairly cookie cutter and takes a KoStore to use to write to a specified file. The real work will happen in our node visitor class KisScalableVectorGraphicsSaveVisitor. Most of this right now includes some template visit functions like visit(KisPaintLayer *layer) that just calls saveLayer(KisLayer *layer) to save the specific type of layer. One small quirk here was when trying to find out where vector layers are processed. After experimenting with the ora plugin I found out this would be visited under the group layer function visit(KisGroupLayer *layer) so I similar for the svg plugin.