One of my main goals this year is to kick-start my enthusiasm and love for learning by programming more. I have been thinking about different tactics to get myself focused on achieving this goal. One of the first things I realized I needed to do was switch over from using Windows to a more unix-like operating system. Windows is fine for browsing the web and email and I have managed in the past to do many programming tasks using it adequately but it still seems to be a bit too restrictive and limiting to me when push comes to shove.
The reality is I am much more productive and comfortable configuring things using text files. Understanding the various ‘Unixisms’ takes a little getting used to at first for the uninitiated but it definitely is more rewarding. With Unix the learning curve may be a bit more steep but usually with a little bit of patience and resourcefulness you can usually find the information you are looking for on the Internet or in the documentation/manuals to resolve your problems or issues. Also, with a unix-like operating system there is always something new to learn and the previous knowledge you learned about doesn’t usually become obsolete but builds upon itself.
Therefore, to achive my goals the Unix philosophy is something I want to embrace this year and the only way to do that is to run a unix-like system full time. To accomplish this I ended up converting my laptop to Linux. I looked around at the various Linux distributions currently available on Distrowatch to see what was popular. The various distributions I was familiar with included Debian, Fedora, Ubuntu, Arch and Linux Mint. A strong case could be made for using Debian because of its apt-get package system and its stability but I wanted something more cutting edge. I ruled out using Fedora because I wasn’t as familiar with it anymore. Arch is bleeding edge and has pacman which is very good but requires a bit more effort than I was willing to invest to keep running on my laptop. So my choice came down to either choosing Ubuntu or Linux Mint.
Both these distributions are Debian based so you get the tried and tested apt-get packaging system. However, the main difference is in the default desktop environments provided. Ubuntu uses Unity and Linux Mint uses Cinnamon. Judging from the distrowatch rankings the community prefers the Cinnamon desktop over Unity but I wanted to give Unity a chance so I opted to stick with Ubuntu in the end. And for now Ubuntu suits me just fine on my laptop as it does what I need and stays out of my way for the most part.
For my desktop I am currently triple-booting Windows, Ubuntu and FreeBSD. I have Windows 8 installed on it for the odd time that I may really need to use it. Otherwise, I mostly want to use Ubuntu and FreeBSD full-time. I only just recently installed FreeBSD 10 on my desktop because it posed a bit of a challenge to install on my old desktop system. In the end, however, with a little bit of patience, some resourcefulness on my part and a little help from Google I managed to find the bit of magic that would alleviate the issues installing it to my computer and so my problems were solved. Now to explain why I chose FreeBSD. Foremost, I chose Freebsd because I was quite familiar with it from having run it as a desktop in the past. Secondly, I chose it because I wanted to diversify the systems that I run at home and diversify my knowledge. Also, since I am already running OpenBSD as a web server on one of my old computers it was logical and better to choose FreeBSD as something I wanted on my desktop.
Other things I have done to further my learning at the moment is creating a Github account. I realized that if I am going to improve my programming skills it seems essential nowadays to have a personal Github account to showcase your work for others to see. At the moment I still don’t know what if anything I will showcase there. However, today I realize with the global nature of the Internet that it is important to master and learn a distributed version control system if you want to do any meaningful programming collaboratively. Consequently, since Github uses Git I think I will start by trying to learn what I can about it and get comfortable using it. At the moment I admit I only know a few basic commands and I realize it can get a bit more complex once you get into using it for more complicated scenarios. However, I did manage to create a repository on my Github account to hold my emacs configuration file of my favourite editor by git pushing my init.el emacs file into the repository.
I managed to refactor and simplify my emacs init.el file before I pushed it into the repository. And I must say I got a lot of inspiration for this emacs configuration using Technomancy’s Better Defaults for Emacs as a guide. I also realize that this emacs file will probably change a lot from its current state as I incorporate and extend emacs to suit my needs in the future. But it will be fun to see what it will be like in a years time as my emacs lisp improves. So I will copy and paste it below so I can see what improvements I am able to make to it in the future.
My emacs Init.el File
;; Author: Robert Cina
;; Created: 2014-01-06
;; Description: My .emacs configuration file
;; To add directory to front of load path
;;(add-to-list 'load-path "~/.emacs.d/yourdirectoryname/")
;; Setup Package-Archives
;; Any add to list for package-archives (to add marmalade or melpa) goes here
'("gnu" . "http://elpa.gnu.org/packages/"))
'("melpa" . "http://melpa.milkbox.net/packages/"))
;; Set paren-mode to on
;; Setup keybindings for hippie-expand and ibuffer
(global-set-key (kbd "M-/") 'hippie-expand)
(global-set-key (kbd "C-x C-b") 'ibuffer)
;; Swap search keybindings for regular expression aware ones
(global-set-key (kbd "C-s") 'isearch-forward-regexp)
(global-set-key (kbd "C-r") 'isearch-backward-regexp)
(global-set-key (kbd "C-M-s") 'isearch-forward)
(global-set-key (kbd "C-M-r") 'isearch-backward)
;; Configure uniquify to identify two identically named files distinctly
(setq uniquify-buffer-name-style 'forward)
;;Turn on saveplace, to save location of the point when you kill a buffer and later return to it
(setq-default save-place t)
;; Configure Emacs colour theme, I prefer the solarized dark theme
;; Enable Znc to allow emacs to talk to znc irc server
;; Prevent emacs from cluttering current directory with auto-save files
;; of the form #files# by sending them to ~/.emacs.d/autosaves/ directory
;; Create new auto-save and backups directories if necessary
(make-directory "~/.emacs.d/autosave/" t)
(make-directory "~/.emacs.d/backups/" t)
;; Configure emacs to use backups and autosave directories
(setq backup-directory-alist '((".*" . "~/.emacs.d/backups/")))
(defvar autosave-dir (expand-file-name "~/.emacs.d/autosave/"))
(setq auto-save-list-file-prefix autosave-dir)
(setq auto-save-file-name-transforms `((".*" ,autosave-dir t)))
;; Configure ido mode, a mode that lets you interactively do things with buffers and files
(setq ido-enable-flex-matching t)
;; Make Erc emacs irc client to hide chat Joins/Parts/Quits
(setq erc-hide-list '("JOIN" "PART" "QUIT"))
;; Make Erc emacs irc client to highlight nicknames
(add-to-list 'load-path "~/.emacs.d/elpa/erc-hl-nicks-20130114.1648")
;; Configure emacs to use the w3m browser
(setq w3m-default-display-inline-images t)
(setq browse-url-browser-function 'w3m-browse-url)
(autoload 'w3m-browse-url "w3m" "Ask a WWW browser to show a URL." t)
(global-set-key "\C-xm" 'browse-url-at-point)
I am looking forward to learning and using Emacs as my primary editor as I program more and more this year. Besides the Emacs Manual,the Emacs Wiki and the book Learning GNU Emacs I already have two web sites bookmarked that I know will certainly come in handy and help me in my journey to becoming proficient at using emacs. The first one is Mastering Emacs and the other is Emacs Rocks. Some other web sites I plan on checking daily is Planet Emacsen and the Emacs Sub-Reddit. I also have to print out this reference card to use keep track of all the keyboard shortcuts and build up my mental muscle to remember the more important ones.
After reading a blog post at Mastering Emacs that Emacs 24.4. is just around the corner with a bunch of new features, including an integrate web-browser I really had to check it out for myself. So I managed to check out the development source code with the instructions provided here using bzr (Bazaar) with the following command:
bzr branch bzr://bzr.sv.gnu.org/emacs/trunk
Then did the usual steps to compile things by hand in a unix-like environment. First by entering the command configure and and then issuing the command make. After a bit I had the new emacs version version for myself to try out and discover the new features. I was most interested in integrated browser package eww of course and after trying it out I can definitely see it replacing my use of w3m. So I already know my emacs init.el file will be changing to accomodate this new package. I know there is a lot I still need to learn to before I can say I am an accomplished emacs user but like building a house it starts at the bottom with the foundation and it works its way up.
That’s all I think I will post for now. If you have any other really good emacs resources that I am not aware of I would love to hear about them.