Note: I had posted this earlier today, but it seems like weblogger mode overwrote this post with my new post about getting syntax highlighted code posts into my blog from Emacs. Weird.
Well, I’m thinking about going back to Uni. This is not the first time that I’ve thought about such things. I dropped out of Uni the first time I did it, wasn’t really in the right space for it at the time, to be honest I can’t really remember (I seem to have a very bad memory) why. Then, there was a brief period where I did one and a half semesters part-time at ECU.
First their motorsports course, when back into computer science. Computer science is my real love, it’s really what I wish I had a job doing. Anyway! My second time round at ECU I didn’t do too bad at all, at least I don’t think I did. Again, I pulled out of the computer science course, this time because, well, the Curtin course is far better than the ECU course.
Perhaps it would be more accurate to say that from what I remember of the Curtin course, didn’t make the ECU course seem interesting enough? Anyway, yesterday, the apprentice at work was asking me questions, and found out that I went to Uni, then asked “So you did accounting at Uni?”
Well, no, I never really intended to get into doing a bookkeeping job, it just sort of happened. I really would rather be sitting in my office here just coding, bookkeeping is boring and not really very challenging. So that got me thinking, along with my recent habit of reading Steve Yegge’s old blog posts. I should go back to Uni.
Of course, I have doubts, boy do I have doubts. I’m over 30 now and working full-time, that means at best I’m looking at taking at least six years to do the course, if I get in that is. But, I yearn for it, I don’t think I will ever manage or work at somewhere like Microsoft or Google, as much as that would be an interesting experience, I think I’ve become stagnant at I need to push myself.
So, there it is, I’ve made some calls, and filled out most of the application for now, just waiting on my transcript from ECU for the units I did complete, I hope that I can at least get some credit for that, then I’ll head into Curtin, and see what happens I guess.
Ok, this really isn’t my first bit of Emacs code, in that I can’t claim credit. It’s actually a smaller part of something someone else wrote, but I hacked it, and I mean HACKED it into something I can use. I need to correct it, refactor it, make it neater, but it’s something.
What is it? It’s just a little snippet so I can post code onto my blog posts and have it formatted as it looks like in Emacs. It’s just using the htmlize library with a bit of buffer trickery. Honestly, it’s not acceptable, but it was a quickish learning experience for me.
Also, workflow wise, it’s still not the best, but I hope to work on it a bit more when I get the time.
;; My own attempt at a minor mode for Emacs for blog writing functions. ;; Ripped off from: https://github.com/Inaimathi/emacs-utils/blob/master/blog-mode.el ;; All credit for good bits to them, all the crap is me. (require 'htmlize) (defvar blog-mode-map nil "Keymap for blog minor mode") ;;; key and mode declaration shortcuts ;; Copied from: https://github.com/Inaimathi/emacs-utils/blob/master/convenience.el (defmacro def-sparse-map (name &rest key/fn-list) `(when (not ,name) (let ((map (make-sparse-keymap))) ,@(loop for (key fn) on key/fn-list by #'cddr collecting `(define-key map (kbd ,key) ',fn)) (setq ,name map)))) (def-sparse-map blog-mode-map "C-c C-p" htmlized-region) (define-minor-mode blog-mode "This is a collection of useful functions, etc, for posting to my blog." nil " Blog" (use-local-map blog-mode-map)) ;; For now I'm just interested in getting the HTML of the given code ;; into a seperate buffer. (defun htmlized-region () "Takes a region and returns it though htmlize." (interactive) (let* ((start (region-beginning)) (end (region-end)) (result (htmlize-region-for-paste start end)) (htmlbuffer (generate-new-buffer "*code-html*"))) (with-current-buffer htmlbuffer (insert result) (goto-char 1) (re-search-forward "<pre>\n") (replace-match "<pre><code>") (re-search-forward "</pre>") (replace-match "</code></pre>")))) (provide 'blog-mode)
Up until recently, I’ve only ever used VIM, I really can’t narrow down to when I started to use it. But it’s been my editor of choice for a long time. Enter Clojure, Clojure is a LISP that runs on the JVM, I won’t got into too much, best to read the website for that. However, I really love working with Clojure, one of the things that you get with is a REPL, basically it’s a command line interface into your running program that lets you create, update, and basically fiddle with your program on the fly.
It’s really great fun, you can open up a REPL, and just slowly build up your program as you go, starting off with your simple functions which you then just build further up as you go. Anyway, this isn’t a post about Clojure, just that Clojure was the gateway drug into Emacs. Although you can use the REPL from the command line, it really comes into it’s own when you can use it from within your editor (or IDE).
Since I used vim, I naturally started there, I got Meikel Brandmeyer’s excellent VimClojure, I even submitted a bugfix (as I prefer Solaris as my UNIX OS of choice, well at the time I did). But, I really can’t remember, holy crap, I posted that way back in 2009?! Ok, well maybe saying I’ve been using Emacs “recently” might not be that recent as it might suggest…. Anyway, where was I?
Oh yes, so, I can’t remember when I decided to really give Emacs a go, but the Clojure SLIME/REPL experience over there is much more complete, because Emacs has had years over VIM in this area, because Emacs itself uses a LISP as it’s language, and some LISPers have been using Emacs as their IDE of choice for just as long. So, I decided to try it, and now I really feel unproductive without having a Clojure/SLIME session opened up when I’m working with Clojure. I’ve also recently come across Steve Yegge’s Effective Emacs post, which is simply one of the most useful articles you can read about getting more out of using Emacs.
So, I’ve pretty much resolved that I should be working towards becoming better at using Emacs for as much as I can, I’m typing out this post on WebloggerMode and I’ve been playing with Gnus for my e-mail (but I’m not sure if I should try something else?). So I think I will try to write horribly written posts on my Emacs experience, for nothing else but my own reference when I try to fix what I’ve broken.
I have a terrible memory, so I often forget things I’ve done, and I really need to make sure that I document everything that I can.
Well, I haven’t posted here for a long, long, time, AGAIN. I really should be posting to my blog more, but about what? Possibly some more crap about trying to work with MYOB?
I’ve been using Clojure to do little bits here and there, I could blog about that, but there’s already far better people posting about that, unfortunately for me, my job isn’t a programming job so I can’t devote the time I would really like to improving my skills.