On Mon, Oct 10, 2011 at 5:49 PM, Mike Meyer <m...@mired.org> wrote: > On Mon, Oct 10, 2011 at 8:20 AM, Stephan Beal <sgb...@googlemail.com>wrote: > >> But what better reason could there possibly be ;). >> > > Providing the reader a better experience. > > Yes, I know you weren't really serious. But enough web authors seem to take > that attitude seriously that it's a sore point for me. >
Actually.... i was only half kidding :). Every line of code i write outside of the office is written because it sounds like a fun way to spend my time, not because it's something the world needs. i've written TONS of code which will never be used by anyone, but i nonetheless enjoyed writing it. But i sympathize with your sentiment. In the defense of web developers everywhere: they add all the fluff _normally_ because the marketing department forces them to. Such things are generally there to hide the fact that the content isn't > worth reading. In this case, there's useful information there, so why not > actually present it? > True enough. > Personally, I find the "colorize the code on the client" hacks incredibly > wasteful. You could colorize it once when you generate it, but instead you > colorize it every time someone wants to read it? Talk about a silly waste of > CPU. Or has CPU really gotten so cheap that this is now acceptable, and I'm > doing nothing more than showing my age by worrying about it? > One could just as easily argue that doing it server-side is wasting server CPU cycles and "why not make the client work a bit for his presentation?" i'm not arguing either way (they're both valid), just playing Devil's advocate. The JSON API, as a whole, is intended for use in clients where a server-side colorization process is most likely just troublesome noise (i.e. non-HTML clients). In this case, you're generating the diff at read time, so there's no savings > in avoiding doing things in JS. But if you're going to do that, at least > take the opportunity and let the reader control what they see. > If the client gets a raw text diff he can control (with complete granularity) what he wants to see. Again, i'm not arguing against your (perfectly valid) points, just pointing out opposing viewpoints (because that's my nature - one of my old teachers once recommended that i become a arbitrator). (i have yet to meet a woman who appreciates such a quality in a man. ;) (and that time i'm most definitely not kidding ;) -- ----- stephan beal http://wanderinghorse.net/home/stephan/
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users