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

He is using convoluted presentational HTML interleaved with logic. This makes it a mess. For example, the upper half of the code seem to be some kind of tabular data, while the lower half seem to use table-markup without any reason at all. This could be made much simpler by using clear semantic markup. He is even mixing style info into the HTML by using things like   and class="gray" - this shows a complete misunderstanding of the concept of separation of content and presentation.

Now, there may be legitimate reasons why you would use presentational markup - e.g backwards compatibility with old browsers, or very complex layout or effects. In that case a transformation should be done - using XSLT, custom tags, or whatever is appropriate for the framework. This markup transformation should be separated from the logical markup just like CSS is.

The code is a bit ugly too - the f and c variables see to be used to switch styles for the first row and for every other row. Again, this is presentational and should be handled by CSS or some kind of transformation system.

Lots of comments suggest that the code could be improved by using round or square brackets instead of pointy bracket. This does nor really reduce the complexity though, the important thing is to simplify by abstracting styling and layout away from logic and structure.




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

Search: