My 1st GitHub experience (plus a LiveStreet CMS plugin)

My job involves a lot of discussion, document studying, phone calls, diagramming, thinking and sending questions back and forth — since most of the time I perform task analysis and specification (as well as further clarifications, conflict resolution and all the fun stuff that happens in the real world between customers and developers :)).

Yet I love to keep my practical skills too, since that's why I actually got into this line of work in the first place. I love coding, I love constructing working systems (however simple), I love seeing results of my work — how it all ticks, shifts and, well, runs.

This is why I have a mix of practical (sometimes perhaps too practical) and theoretical (too theoretical) posts here.Yet I've never used GitHub (or Git, for that matter) before, even though it seems to be (a) center of hobby / freeware / enthusiast developers of all shapes and sizes.

No more — today I created and populated my first repository on GitHub! Some thoughts below.

Scary scary Git

My first caution that got shattered — is the complexity of Git and putting / getting stuff on GitHub. Most articles that I glanced across previously had pictures of command line madness. I love command line, don't get me wrong, for tools I already use — getting to know a new one could take time and patience, so I was procrastinating that.

For the uninitiated — GitHum is an online version-control service, which allows hosting unlimied open repositories (this is why it is deservedly loved by a big chunk of the open-source community), and also offers closed repositories for a monthly fee (which to me looks quite reasonable, even though I don't need it right now).

Back to its alleged complexity — turns out, my fears were unjustified (as is often the case), since GitHub developed their own client (for PC and Mac), which looks and works very well indeed. Perhaps there are commands that still require typing in (and there is a handy link to command line from within the client), but I didn't need any so far — and I've created a repository, uploaded files (and then downloaded to another location), edited and re-committed them, and reviewed history details, all from the cool GUI tool. In one word — neat.

It does look great, doesn't it?

So, write that down — Git is not scary. Plus, they link to a Git crash-course, which quickly got me up to speed on the basics. There are still things to learn, sure, but this is enough to get me started.

Scary scary world

I will need to report on this later, but there was (and still is) a slight psychological barrier for me to put my code out there for the whole wide world to see (like it cares). For free!

Yet in this case it is not much of a concern, while putting my work out I get a chance for the following:
  • I may get some feedback on my project — and, since my constant goal and pleasure is to learn, that would be splendid. Problem with today's Internet is that there is so much of everything, but not a very high signal to noise ratio. Hopefully my contribution doesn't decrease it further, and by posting it openly I get a slight chance to hear back on it.
  • If this project proves to be useful to someone, I get a chance for someone to actually contribute to it — even if I become too busy and can't improve it any further — someone could. That would be like seeing your child go to school (i.e. — scary and empowering, and the same time).
  • While at it, I increase the chances for the project to be useful, by posting it openly.

I also get a good chance to receive nasty critique and bashing, but that chance is always present, and really shouldn't bother me that much. Usually the loudest people on the Net aren't the smartest or the most interesting ones anyway, so one would benefit from learning to ignore them (or at least filter out).

So — I post it to the open. If this results in something interesting — I'll share.

The project

What's the project, you may ask? Ah, yes, it is the Comment Filter plugin for LiveStreet CMS. It allows filtering topic comments by their rank, on the client side. A good friend is working on converting his website (MMOzgoved) to this platform*, and as part of this conversion we improve the CMS' functionality — one of the features is the filtering of comments, and shape it as a separate plugin so others can reuse it.

Here's how the filter control looks (above it is the standard “Options” control, below — “Refresh Comments” control):
Upside-down “A” means “All”. That's an easter egg for math-heads.

And this is how the list of filtered comments looks (filtering out comments below rating 1 in this case):

Filtered comments are collapsed and greyed-out,
but it is possble to expand them with a single click.

This can be improved further, but first I learn to walk — then I'll run.

I am still new to LiveStreet, but it looks like a very good tool for its job. It is built around abundant event hooks and overrideable actions, with a handy templating engine, which makes it easily extendable.

In this case, I added a handler to “topic_show” hook (yes, you can see it in the source code itself!), which adds the filter control block to the sidebar area, and includes its custom JavaScript and CSS files (where all the magic of comment filtering happens — that's my favourite realm).

It works well on the test sites, but we'll see what kind of feedback I get from other people who may want to try it.


* — I'll wait till the project's launch to announce the plugin on the LiveStreet site, to perhaps gain some additional attention. Wait for the opportune moment, as Cap'n Jack Sparrow would say.


Popular Posts