Tuesday 29 July 2014

Embryonic ideas

G'day:
This is gonna have to be quick, as I've spent my "before work" blogging window chatting on Twitter / Skype with various people. So I need to get this out the door in the next 30min.

Over the last week, a coupla interesting (well...) ideas have been presented to me by way of community projects. Which I might undertake.


Firstly Judith Barnett made this observation in a comment against my article "Oh dear: tags vs script":

Every single programmer that I have attempted to convince to move from tags to script has the same complaint. A complete lack of coherent documentation that shows the script syntax for the tags. Does such an animal exist?
Very good point. The official ColdFusion docs still treat CFScript as an after thought, rather than the core of the language. This succeeds only in marginalising CFScript, and helps perpetuate this situation in which CFML devs still favour tags to write all their code in. They simply don't have useful, coherent and thorough docs to help them get up to speed and use as a reference. It's also a right PitA for the likes of me who like to help people get up to speed with CFScript, but need/want to point people to helpful documentation.

So I think I might document CFScript properly. I'm probably one of the chief proponents of it, I seem to like writing, and people seem to be able to follow along with what I'm saying, most of the time. Obviously my approach to documenting something would not be as flippant as it is on this blog.

I was thinking how best to approach this, and I think I might try to knock together a site using PresideCMS to maintain it. All I need is a place to put it. And to work out how to use Preside ;-) Whilst I sort that out, I might just start writing the docs here, and migrate them when I settle on a solution. But a blog is not the right place for docs (nor, IMO, is Github nor a wiki type arrangement, hence going with a CMS idea).

This plan only started forming last night, so it's not very fleshed-out yet.


The second idea came from Phillip Senn, in another comment, this time against "<?cf ?>":

So many decisions to make...

In the cfml craftsman group, we're thinking about polling decisions like "Do you put one <cfoutput> block around the entire file's contents". I think maybe if people were given 100 points to spread out over multiple answers, then let's say for this particular question, I would put 95% on "Yes, around the entire file's contents" and the remaining 5% on "Only at the point where it's needed".

I can envision that the poll would not be anonymous. Let's say a newbie wants to learn the "Phillip Senn" opinionated way programming. They could look up how I've answered each of questions and compare that to the rest of the community.

If you were to start a project from scratch today:

How much do you use cfscript for logic prior to the html tag? (90% Yes, 10% No)
How much do you use cfcs for querying? (99% Yes, 1% No)
What editors do you use (Dreamweaver, 99%, NotePad++ 1%)
What SQL editor do you use (Management Studio 100%)
How do you style your html (external 95%, inline: 5%)
What ajax commands do you use? ($.ajax 100%)
What photo editor do you use? (Fireworks 100%)
I like the idea of having a community-based CFML style guide, where anyone is welcome to register and offer their opinions on any of a range of topics. I think there's also merit in being able to weight people's opinions (voting-up, voting-down), and basing it on reputation too. Kind of like Stack Overflow, except the "questions" are style guide topics, and the "answers" are people's opinions. This way we'd not just have me barking my opinion about how everyone should do [whatever], and no-one should do [some other thing].

This would be more of an undertaking, and I'd want to get buy-in from the various doyens in our community (Sean, Ray, some Bens, Luis, Brad etc) too. Thoughts on this? Whilst on the train I figured a PresideCMS-run site might work well for this too: sections for the topics, pages for the opinions. And a voting widget. That said, I think Stack Exchange let people set up their own sites using their engine, so perhaps that might be easier? I haven't looked into that, and don't even know if I'm right about that.

However I've given a sum total of about 30min thought about this, and it probably needs more than that.

Plus I'd like your thoughts too..?

Righto (that took 25min, phew).

--
Adam