What have you tried?
It seems the whole of dev planet is in love with Stack Overflow these days.
It's not 'overly' (see what I did there?) hard to see why; it's undeniably a comprehensive resource for resolving issues we developers come up against on a daily basis.
Hello, world - please do my homework, ta
Lately I've taken to answering questions, mostly on XSLT, JavaScript and REGEX. (Yes, I'm a REGEX sadist). Anyone who has also given up their time in this cause will have come across a certain kind of question that roughly translates as "just hurry up and do the task for me, won't you?"
Well, no, actually, I won't. I will help you, but not do it for you.
To imagine that Stack Overflow - and of course other development community sites - is just full of people with nothing to do but complete your homework for you, is naive in the extreme.
And so many posters, me included, respond to such questions thusly: "What have you tried so far?"
There's a quasi-seminal essay (well, sort of) on the reasons behind this, and I encourage you to read it. But the gist is: "At least meet me half way. Show us what your attempt is, and we will help you. We're not going to just do your homework."
This view has its proponents and opponents. Some of the arguments against it do have some mileage, it must be conceded.
Like the one about how, even if the user posts his attempt, we, the "experts", will just end up re-writing it anyway if it's that bad (and it might be, since the questioner's attempt clearly doesn't work, else he wouldn't be posting.)
E-ti-quette - seriously, look it up
In this vein, asking the user to post his attempt is a sort of call to etiquette. If the experts are resigned to the possibility of having to re-write the user's attempt, there's no time saving involved.
The response is also suited better to some questions than others.
"I have the following input XML [...] and I want the following output XML [...]. What XSL do I need to achieve this?" is clearly a good candidate. It's brazen - you have to give them that.
"Which jQuery method gets all parent/ancestor nodes, rather than just the parent?" is clearly not a candidate for this.
But the etiquette argument is the clinching one for me. It's not that I really want to see the questioner's code, in order to base my answer on it (though I might). I just want to see that there's an appreciation, an attempt to meet half way.
No one that answers questions on SO could pretend they do so entirely out of a sense of charity. There is the minor issue of boosting one's standing and prominence in the dev community. But nonethtless, people are being helped, and it's good to at least show some etiquette.
We live in a time when manners and courtesy are fusty old words whose meaning - far less their physical manifestation - is being eroded all the time. (Does no one say "excuse me" anymore when walking between you and the supermarket shelf you're choosing from?)
But it doesn't necessarily have to be like that - especially if you end up with a solution to your dev problem!
post a commentXMLPlayground.com - my new project
So I finally got this off the ground. Months in the making, this is a sandbox environment for XML development, including (E)XSLT, XQuery (to a point), DTD, Schema and more.
It's sort of a JS Fiddle for XML. Sessions can be saved, resumed and shared. Output is generated and optionally styled with CSS.
I built it primarily because in my current job I'm working a lot with XSLT (1.0 - the horror) and found I could do with a test environment.
To that end it's probably XSL it's best suited to. XSL includes are supported and parameters can be passed into it. Your generated output can also pass parameters back into your XSL, allowing your output to be dynamic and responsive.
The downside is it's built in PHP, which is never the best choice for XML technologies.
For a start there's no XSL 2.0, nor any support for XQuery. The latter is mitigated to a point by the use of XQIB (XQuery in the Browser).
Here's a demo session showing how XML, XSL and CSS combine to make a sortable table of Soviet composers.
post a comment