Roosting at home

All those years I advocated for doing XML namespaces by the book. We’re going to want to do stuff with namespaces in the future. All those years no one else thought there was no way we’d ever want to do that and that namespaces introduce unnecessary complexity. All those years of being outvoted.

Today, bitches. Today is what I was trying to prevent. And who is going to clean this up?

Sometimes being right sucks.

Funner than it looks

A thing I’m working on is supposed to interact with a Scheduled Task [1] if it exists. Instead of writing out my own parser for this backwater of the Windows operating system I found something lying about at CodePlex [2]. As far as documentation goes, this one is pretty decent [3]…for a CodePlex project. Then again, that bar is pretty low.

So this afternoon has been brought to you by the method Console.WriteLine()

Don’t know what a thing does? Console.WriteLine( THING ) is great. If it’s a string, it’ll tell you what it represents. If it is something else, it’ll give you a clue as to how that method/object reference is employed. It’s nowhere near as cool or useful as Python's dir() [4] which is what I was really jonesing for this afternoon. Still, half an hour of iterating over Console.WriteLine( THING ), compile, run test executable made quick work of finding a solution.

Eventually I found Microsoft.Win32.TaskScheduler.Task.Definition.XmlText and this all the bait I need to make this an XML-based solution. Why use an object wrapper with moderately unhelpful documentation when you can just do a simple XPath operation? Pretty sure about half of the solutions I come up with eventually dump into XML and then leverage XPath. It is the very best hammer because it can turn virtually anything into a nail.

[1] http://msdn.microsoft.com/en-us/library/windows/desktop/aa383614%28v=vs.85%29.aspx
[2] http://taskscheduler.codeplex.com/
[3] http://taskscheduler.codeplex.com/documentation
[4] https://docs.python.org/3/library/functions.html?highlight=dir#dir

Holy Tagmaster, Batman!

How long has it been since I’ve written CSS? Quite the stroll down memory lane today as I prettified some XSL transformed XML reports.

Relatedly, I’d forgotten just how short browser implementation has come on the promise of serving XML and letting the client render things prettily. I’m all for stopping XSS attacks but good lord, DQ’ing an XSL file just because it comes from a different port on the same machine? Heavens forfend!

To summarize:

  • XSLT processing strategy: 79%
  • XSLT processing implementation: 7%
  • Beautification: 5%
  • Blogging about it afterwards: 9%

Of course, I don’t have the generator tool work even started. I smell a flunked story on the horizon…