BIT-101 Lab Source Link and … comments?


One of the key aspects of the lab has always been that it’s open source. The code is not particularly written in a manner conducive to education. It’s often the result of me hacking around until I find something that looks good. At that point, it’s done. No heavy duty refactoring, cleaning up, commenting. You get what is there, and if you can figure out what I’m doing, great. If not, feel free to ask, and maybe I’ll try to explain. Maybe not. I might have forgotten what the code does myself.

Anyway. I was looking at the flow. You see something in the lab you like, you have to take note of its number, somehow navigate to the github site, go into the dailies directory and find the js file with that number. Or, maybe you’ve cloned the repo. You can pull any updates and navigate to that spot on your file system.

But hey, that source file just lives at a standard url right? Why not give the nice viewers a link to click on? So there you go. Right up in the description box, there’s a “source” link that’ll take you right to where the code for that particular experiment lives.

I’m also trying to figure out a way to enable comments or discussions. Ideas I’ve had so far:

1. Disqus. I got it working easily enough, but the UI is not going to work out. I want each experiment to be full screen with only the home link and info box. I could make an additional link or button that opens up the Disqus UI in some kind of popup, but I wasn’t really liking where that was going.

2. A forum. That’s a possibility, but kind of a heavyweight one. I’ve run forums before. Not sure I really want to get back into that. And forcing people to make forum accounts and profiles, etc. Not into it.

3. Github wiki. I’m just not familiar with that. Could work out. One wiki page per experiment. Open to anyone editing. Open to abuse, I guess. Anyone have any experience with this?

Any other suggestions? I think a github-based solution would be great. Surprisingly there’s no straight up comment feature in github that I can see. There are issues and pull requests, sure. But is there something where you can just comment on a file or folder?

This entry was posted in JavaScript, Lab. Bookmark the permalink.

9 Responses to BIT-101 Lab Source Link and … comments?

  1. Darron Schall says:

    If each lab entry is a single atomic commit, you can comment on the commit itself. Today’s lab is

    This falls apart if you make changes to old labs for some reason or another, since the new comments won’t follow to the new commit. But maybe that’s not a problem?

    Essentially, commenting on a file is commenting on the state of the file at a certain commit. You can view the file history, pick the commit, and the comment on the file at a specific moment.

    • keith says:

      Interesting. Thanks! I thought there was some form of commenting in there I was missing. But it is entirely possible that I’ll be changing/fixing old experiments now and then. So not sure how well that’d work out.

  2. Jolyon says:

    What about each lab being a branch in a repo?

    That way you keep a clean history of commits and comments

  3. keith says:

    I’m starting to lean back towards disqus. Got the disqus ui in a hidden div that I can toggle on and off.

  4. keith says:

    OK, just pushed the disqus solution. If it works out, I’ll keep it there. If not, it will go away.

    • keith says:

      Brilliant! That’s just what I was looking for. Actually though, I already got Disqus set up, so we’ll see how that goes. This is a a good plan B though.

    • keith says:

      The more I thought about this, the more I liked it. Just switched over to the github issue comment system. Luckily, nobody had commented on disqus yet anyway. 🙂

Comments are closed.