It was pretty strange for me to get a “CS0103: The name ‘AppliesToNode’ does not exist in the current context” from C# compiler for a code: class Copyrighted : IBackend { bool IBackend.AppliesToNode(string Uri) { return something; } … if (!this.AppliesToNode(Uri)) { …} while (this as IBackend).AppliesToNode(PexUri) compiles. On one hand, it’s pretty strange: Copyrighted [...]
Got a web reference to an article “Applied MVC Patterns. A pattern language” by Sergey Alpaev. Model-View-Controller is one of the most complex and pribably the most misinterpreted patterns among GoF’s. The article is a perfect classification, I recommend it as a must read for everyone who is confused about what is Controller for, and [...]
C# has closures, you know? A sample of how to use one.
Discussing Java vs C# coding conventions, I got an idea: Geek code for a coding conventions. Like: —–BEGIN GEEK CODE-CODE BLOCK—– GP:java,c,cpp,haskell Off:2S P:N Name:Camel Flex:2 ——END GEEK CODE-CODE BLOCK—— which means: GP:java,c,cpp,haskell – geek of programming languages (listed); Off:2S – prefer 2-space offsets; P:N – place parentheses on new line (opposed to S – [...]
Given: HTML code, non-valid and non-well-formed. Make it a well-formed XHTML, in Java. We considered JTidy, but it’s source looked too messy and hacky. I looked for a parser that could correct XML – not in sense of schema, but correct any mistakes, and pass out a well-formed XML and error list. I was able [...]