4 ms·
I always find it funny how people tell how to code great (like now, in CSS), and yet their website is totally messed up on my phone--the logo floating somewhere
by bashzor 14y ago
I always find it funny how people tell how to code great (like now, in CSS), and yet their website is totally messed up on my phone--the logo floating somewhere in the middle of the text and scrolling while I scroll. So much for good code.
- dazbradbury 14y agoCross-browser compatibility is often the reason "good code" turns into messy code! You develop in one browser, and then make adjustments to it to make sure it works in all major / mobile browsers. This step often introduces some dubious workarounds and mess because it can be such a painful process. That isn't to say one shouldn't try to write re-usable and maintainable code in the first place. But I also agree with your more general point (just not in css), that neat/maintainable code != correct code.
- bashzor 14y ago> Cross-browser compatibility is often the reason "good code" turns into messy code! I think that too depends on how you code it. You can code mechanics, or you can code logic (quoting an earlier blogpost title which was also on HN). var hr = new httprequest(); //Where the httprequest function is defined elsewhere versus 10 lines of code right here to support all browsers since IE5 or so. This might be even more readable as when you'd only write it for one browser. (I couldn't think of a similar example in css.)