My Teaching Blog

I don’t have the best track record establishing new blogs, but I just made another one. Yes, I know I have been completely neglecting Limelog for about an eternity and a half. I just ran out of shitty movies to review, plus I felt like I wasn’t really doing anything cool with that site. I really didn’t have any distinguishing quality or gimmick other than the “reaction shots”. Also I ran out of movies because… Well, I don’t watch that many movies. The ones I do watch tend to be Terminally Incoherent material, rather than Limelog material. That said, I would like to revisit that site and do something worthwhile with the idea. I think shittier movies, and less formulaic, more rambling and angrier reviews could be a good way to go.

In the meantime however, I created another little blog out there. It is called I Teach 109 and as you can imagine it is school related. I more or less outlined my goals here, but I can summarize them here for those of you who are lazy. The basic premise is that it is a hyperlocal blog with the target audience being my students, my peers and other members of the MSU community. I envisioned it as a resource containing three types of blog posts:

  1. Teaching aid type posts in which I expand upon, or provide background for some of the topics I mention in class.
  2. Posts in which I share resources, techniques and ideas for teaching my class that can be used by other faculty.
  3. Technical posts in which I talk about tools/services available to students and faculty, and MSU related lifehacks.

That said, the first two items can be easily used by anyone.

I’m hosting it on the university provided space, so I’m keeping it clean and professional (unlike here, where I try to maintain my average quota of swear words per page). For that reason I kinda chickened out on comments. From my experience, everything with text area boxes will be abused when exposed to students. It’s not that I don’t trust them, it’s just that I don’t fucking trust them.

The interesting part is that the webspace we get from the university is just a WebDav directory. There is no server-side scripting available, which is not an ideal environment for creating good looking websites. In the past, I dealt with this by doing clever things with Javascript. This time I opted for doing it with Jekyll by adopting my 5 minute bootstrap.

This is my first “bigger” Jekyll blog, and so far I find working with it very enjoyable. Part of it is that I’m writing my blog posts in Markdown, which makes them very, very clean. Terminally Incoherent posts tend to be typed in raw HTML (sans p tags, which WordPress adds itself) because as you know, I can’t deal with WYSIWYG editors. HTML has been working for me for years, but whenever I start adding inline links, lists or images the text becomes a tad difficult to scan and skim. Whenever I write Markdown I use the “footnote” notation for links, which means long URL’s are contained into a single enumerated list, at the end of my post without introducing visual clutter.

The other part is that the work-flow for that blog is very unixy. I create the posts in Vim, and use the command line to test and deploy my changes. For some reason this seems more elegant and sophisticated than the pedestrian web forms of WordPress or Tumblr. Of course in a true unix fashion, this work-flow also has tendency to punish you for your mistakes. For example, few days ago, I typed my command wrong, and Jekyll happily clobbered the wrong directory. I ran this:

jekyll --no-auto /mnt/webdav/

What I wanted to run was this:

jekyll --no-auto /mnt/webdav/blog/

The end result was deletion of all the files I had in the entire web-accessible directory. It, gets better though – I never bothered to back any of those files up because they were living on a remote server and therefore in the “cloud” and thus supposedly safe from my machinations. Lesson learned – if you spent more than 15 minutes creating it, it ought to be under source control, period. Have you done anything this stupid recently? Share your command line mishaps in the comments.

Also, let me know what you think about the blog. It was a rather fun little side project and I figured it would be nice to share it here.

This entry was posted in school and teaching. Bookmark the permalink.

6 Responses to My Teaching Blog

  1. I noticed this new blog when you started the repository for it on GitHub. As one of your followers I get a message every time you start a new repository. :-)

    I don’t understand, how did you clobber files in the parent directory? Didn’t Jekyll just create a _site directory with a copy of all your files?

    I notice you’re specifically using --no-auto while your config has auto turned on. Why do you do it this way? When I’m working on a post, I use auto specifically so I don’t have to go run a command every time I want to check my work. (I actually run Jekyll as an inferior process to Emacs, so no terminal is involved at all.) Jekyll will update the website every time I save so all I need to do is refresh the browser. My current problem is that my blog is large enough that it takes Jekyll a couple minutes to generate. I think I mentioned this before.

    Finally, since I never exit Emacs, if somehow my work gets clobbered on the file system I still have a volatile backup of my work in the form of Emacs’ buffers. This has saved me 10-15 minutes of effort a couple times when my work was accidentally clobbered (typo in a Makefile, etc.) before I committed it to Git.

    Reply  |  Quote
  2. Luke Maciak UNITED STATES Mozilla Firefox Windows Terminalist says:

    @ Chris Wellons:

    Ok, there was an existing site living at the root directory. Before my little “accident” if you went to /~maciakl there was stuff there. So when I created the blog, I put it in /~maciakl/blog.

    And yes, when I’m writing new entries I just run jekyll –server locally – hence the auto in the config. The issue was when deploying the site to the server.

    The WebDav directory has some weird file-locking issue going on. Initially I had a simple rsync script that would sync _site to the remote directory. But somehow the server would panic when that happen and issue some sort of temporary write-lock. So every time I would end up with a half-uploaded site, and had to wait about an hour or two and manually copy over missing files.

    Eventually I discovered that if I just do jekyll –no-auto /remote/dir/blog this did not happen. Somehow the locks would not get triggered and Jekyll would just build my site in the production folder and all would be well.

    Until the time I mistyped the command and it clobbered the directory.

    The stuff that was there was the old website – one I wasn’t working on at the moment so I did not have it in any open buffers. :P

    Reply  |  Quote
  3. JuEeHa FINLAND Links Linux says:

    Hello from consoleland! I was once installing some software from source. (I don’t remember what software but it was quite old unix utility.) I had used su -c ‘make install’ and for some reson it didn’t have default prefix set as / or /usr but rather current working directory. Well I didn’t want it there so I just ran “rm -rf ./bin”. Well actually I forgot the “.” and resuts weren’t pretty. Luckily once I had suffered my first hard drive crash and lost almost all of my data I have taken my backuping seriously and I had complete copy of my system. It was actually kinda interesting to restore system using only stuff in /usr/bin (no coreutils on busybox system) and staticaly built toybox (like busybox but with less utilities and better (more permissive) license). It wasn’t that bad but I kinda missed cp.

    Reply  |  Quote
  4. Luke Maciak UNITED STATES Google Chrome Linux Terminalist says:

    @ JuEeHa:

    Whoops. Gotta love Unix for even letting you do something like that. Was this a remote system? If it was local, I would just power it down and boot it of any available live CD and restore /bin that way.

    Oh, and thanks for mentioning busybox/toybox. TIL :) It seems like these apps can be lifesavers.

    Reply  |  Quote
  5. k00pa FINLAND Mozilla Firefox Windows Terminalist says:

    I have messed up badly couple of times with the rm command…

    My own site is build using Jekyll also, but I always run it from the directory where my site is in, so I don’t accidentally make the same mistake :D If possible I always run all commands on the same directory I am in if there is even small change of destroying files.

    Mostly because I am lazy and its easier to stay in the directory where the project/files are.

    Reply  |  Quote
  6. JuEeHa FINLAND Links Linux says:

    @ Luke Maciak:
    It was my local system. That old ThinkPad T20. And busybox and toybox aren’t just for system rescue and embedded systems. I used to use just busybox as my coreutls package, now I use combination of toybox and busybox.

    Reply  |  Quote

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>