Yeah thats a nice xmldict you wrote there, except it doesnt do anything good at all. Try to parse this with it, <html>hello</lol>world</html>. So much for your A* search and algorithmic knowledge.
I am no good with algorithms but would know to stop at such an idea as to make my own xmldict parser in that way. I would instead learn about parsing and the algorithms for successful parsing, instead of a half-assed approach.
> Try to parse this with it, <html>hello</lol>world</html>.
Parsing invalid xml with a xml parser throws an error like it should.
I am using cElementTree for parsing and this is what will happen with your input.
In [1]: import xml.etree.cElementTree as ElementTree
In [2]: ElementTree.XML('<html>hello</lol>world</html>')
---------------------------------------------------------------------------
ParseError Traceback (most recent call last)
/home/rahul/musings/python/<ipython-input-2-54e782b0af58> in <module>()
----> 1 ElementTree.XML('<html>hello</lol>world</html>')
/home/rahul/musings/python/<string> in XML(text)
ParseError: mismatched tag: line 1, column 13
> make my own xmldict parser in that way
What is that way you are talking about? There isn't a xmldict implementation for Python(at least I can't google it), I needed one, so I wrote a recursive descent parser. A recursive descent parser is a popular choice provided your grammar is LL(k) - Python, Perl et al run on hand-coded recursive-descent parsers. Also, recursive-descent parsers are easiest to handroll.
PS - There is a way to disagree. Your's isn't the right way.
There is nothing 'just' about moving a non-trivial database from one rdbms to another. First there is no doubt a huge amount of incompatibility between the dialect of SQL the two speak. Then there's all the platform specific features that the other database is either lacking or implement completely differently. On top of that, once you get everything up and running, you'll notice that the performance characteristics between the two are very different which means you're going to have to redo much of your optimization work to get back to even close to the level of performance you had before the switch.
you would think MS would cut them a super deal on licensing, being that S.O. is such a major site utilizing and promoting their platform, (and its demographics match who they'd want to promote to). If S.O. goes down or has problems due to a SQL server issue like this, (or them not affording another license) that looks pretty bad.
I'm inclined to agree. If you have to spend any time at all figuring out how to fit the cost of a SQL Server license into your business plan, that's the entrepreneurial equivalent of a code smell.
You might not necessarily agree with the extent the word "hacker" is applied to nowadays, but considering you are in a site called "hacker news" you probably should
Yeah I remember it back in the beginnings, it was quite friendly. Now I see people get yelled at in #archlinux for having an opinion on x vs y which is opposite of what the majority of #archlinuxers think. The forums are like "not my problem fix it noob, here is half a wiki page"
I agree somewhat, but I tend to find that it's newbies who have managed to migrate away from MyFirstLinux™ that make all the annoying noise coming from the Arch community; so perhaps it's not fair to judge Arch users as a whole.
I am no good with algorithms but would know to stop at such an idea as to make my own xmldict parser in that way. I would instead learn about parsing and the algorithms for successful parsing, instead of a half-assed approach.