Hacker News new | past | comments | ask | show | jobs | submit login

> Text parsing for programming languages is NOT a difficult problem

Counterpoint: Ohloh tried to build a simple line counter. After 7 years even with community support they never really got it right.


I don't know what Ohloh is but it looks like it's some kind of web software, in which case I am totally unsurprised.

Are you confident that the same programmers could have successfully built a line-counter if they built it using parser tools?

Saying "it's not a difficult problem" and then turning around and implying "... but only if you're not one of those lousy web programmers" sure sounds like moving the goalpost.

Well, I think a lot of web programmers do not really know how to program.

If someone is going to be offended that a potential employer asks them to reverse a linked list in an interview -- something that seems a bit trendy in the web world lately and several such articles have made the HN front page -- then look, that person does not really know how to program, so of course they think it's hard to do basic stuff. Such a person's opinion on how hard things are is not that relevant to how hard they are given a reasonable background education.

Probably this sounds snobby to some people, but look, programming well is a never-ending pursuit, you can spend your whole life getting better, but it won't help anyone advance if we all pretend that everyone is good already.

The directory I linked shows Ragel lexers. It was a command line tool that fed a web app. All it had to do was count lines of code, blank lines, and comment lines for a variety of languages.

It took years and they never got it right. Partly because every technical decision was based on neato-tool-of-the-month in the early Ruby/Zed Shaw era. But mostly because it's hard.

Care to explain why you think it's hard? (For someone with a basic education in programming, say, someone with a bachelor's degree from a reasonable school). Exactly what part of this problem is hard?

You seem to be treating this like "Knuth solved it in 1965, how hard can it be?" I provided a link to 100 language parsers with commit history. A quick Google reveals the most frequent committer has a CS degree from Caltech. Either it's hard or they're idiots. (I suppose we both can be right.)

Personally I wouldn't want to write something that can parse the Javascript embedded in the HTML emitted by a PHP script.

Subtle details like "screw that, life's way too short" can conspire to make "easy" things hard.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact