7 karma · joined October 27, 2011
I'm not convinced that HTML is preferable to other representations of the DOM, particularly for representing UI's and applications (rather than documents). The clojure script wrappers for React I've seen seem to believe, for example, that lisp is better at representing the DOM than HTML and I tend to agree. Especially since any configured IDE should be pointing out missed commas and have rainbow parens.
One thing that is different between your examples and the DOM I've been creating with React is that I tend to make custom tags, and I don't end up with tons of repetitive looking stuff. Your last example is quite readable to my eyes, and would be even more so if perhaps decomposed into some helper functions and, of course, if loops were used and the DOM was populated from some data structure.
In other words, why is HTML like this:
<Group style={styles.group}>
<Image style={styles.image} src='http://...' />
<Text style={styles.text}>
Lorem ipsum...
</Text>
</Group>
Preferable to something like this (which can easily be done with some helper methods wrapping the verbose React DOM methods): $group({styles: style.group},
$image({styles: image, src: 'http://...'}),
$text({styles: style.text},
'Lorem ipsum...'));
No pre processing step required, and of course it's natural to imbed js in, er..., js.What am I missing? Why keep the HTML part in all this?
I haven't had too much experience with Domains, but I believe they are generally used for courser grain error handling (because it's a bit verbose to attach them all over the place). E.g., to catch most errors (it's no guarantee what 3p libs do to your context) generated in fulfillment of a particular web request.
Thanks for the pointers. I will read up on GIN and hstore.
If nothing else, duplicating an element from a doc column to a first class field seems reasonable. Also, even in mongo one must define indexes which is a schema of sorts and can be non trivial to change.
There's a lot here that seems to apply to equality in general, not just gender equality.
I have two daughters, bi-racial. I struggle with what I think the ideal world should look like and what our actual world needs to look like, today. For example, if there were not a historic misbelief that women are not good at math, there would be no reason to go out of our way to make women only events. But it happened, and it lingers. So I wonder -- how many women have a story about how these women-targeted events helped to open some doors? Def seems like we've swung too far sometimes, but what's the right middle ground?
At home I go for the ideal. My wife and I don't bring up race and gender. We don't attach it to things. My daughters are still under 4, so this is easy. I wouldn't want to say, "girls can do it, too" because I agree with the author -- the effect would be opposite of the intended one. But some day, there eyes will be opened to all those ignorant ideas, and the imperfect "bandaids" that we have. I mean, hell, they already get party bags that are "for girls, not the boy ones." They are already being influenced in ways they can't comprehend.
I believe that breaking up the code this way makes it easier to reason about the app (isolate probs, etc.) and provides more modularity and flexibility then when your primary division is layers. Not sure why, though, you'd want to go the extra step of physical isolation from the beginning. Why? Unless, perhaps, you feel it is the only way to enforce the separation of systems.
Right or wrong, an argument that does not address obvious rebuttals is not an argument, it's wishful thinking in an echo chamber.