Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That looks like autogenerated code. That's a different beast altogether.


It is. Mozmill is a testing framework. What we're looking at there is a file containing automated tests (which I think should be fairly obvious to someone looking at that file...)


I'm well aware of what it is. Like I said, I had to deal with it recently - I didn't just pull it out of thin air.

What you're looking at is a horror beyond comprehension. There's much better, more maintainable ways to write automated tests.


I guess we'll have to disagree, especially about this part:

> horror beyond comprehension

"Horror"? No, but I guess that's debateable (apparently). But "beyond comprehension"? Absolutely no. Even if we say the repetition offends our aesthetics, I can't even imagine what sort of issue you had to deal with where this file posed a problem. Anything you could possibly want to do with it should be serviceable inside of 5 minutes, except in the dumbest of Notepad-quality (i.e., little more than a text control) editors. That includes rewriting the whole thing to be less offensive, if that's your slant.

This file is nothing compared the types of things mentioned upthread, things which, again, exist in a context of actual production code.


If that is horror beyond comprehension then you are a very, very lucky person. The auto-generator even indents the code nicely!




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

Search: