Beautiful Terminalation - Ohmyzsh on Ubuntu

I frequently use the command line because of its speed and am using ohmyzsh to make the experience more valuable and enjoyable. I configure ohmyzsh to use the powerlevel9k theme which provides lots of useful information as well as looking fancy.

Ohmyzsh with powerlevel9k theme in action

We are more connected to the work we do if its an enjoyable experience.

Read on for details on how to configure Ubuntu with zsh, ohmyzsh and powerlevel9k theme.

Read More

camcorder.el - Creating Animated Gifs & Videos for Spacemacs

Using animated gifs are a lightweight way to show Emacs in action, as can be seen at Emacs Gifs.

I am creating a workshop on developing Clojure with Spacemacs, so here is a little guide as to how I create animated gifs and videos for this workshop directly from Emacs itself using camcorder.el.

There are several different ways to create animated gifs and so far I have found camcorder.el to be the easiest. This approach has been tested on Ubuntu Linux 16.10.

Read More

Kanban in Emacs Org-Mode to Get More Work Done

A Kanban board is a way to visualise your work and help you get more work done. You organise your work into tasks that need completeing and use the board to show the state of each card. Kanban encourages you to get work finished before starting new work.

The amazing Emacs Org-mode can be used to create a very fast and easy to use Kanban board that is with you where ever you are.

Update: Using Org-mode doesnt give me everything I want from a Kanban board, but it was an interesting exersice. For now, I am just sticking to my list view of a Kanban board.

Org-mode is built into Emacs / Spacemacs so there is no need to install any packages or layers for any of the following.

Read More

Call for Speakers: London Clojurian Conference 2016

December 2016 we celebrate the sixth birthday of ClojureX, a two-day conference organised by the London Clojurians and SkillsMatter. Submit your talk ideas by 30th August to take part in the fun.

ClojureX CFP deadline - 30th August

Previous conferences have included a diverse range of topics and speakers in the areas of Clojure, Clojurescript and Functional Programming. At last years conference we were quite surprised how many people are already using Clojure at work. In 2014 we ran a poll of our audience and 18% were using Clojure on a daily basis. For the same poll in 2015, 78% were using Clojure for their daily work. What will the 2016 poll reveal?

The London Clojure community continues to grow and we want to hear all your stories and learn from your experiences, no matter how long you have been working with Clojure. So please consider submitting a talk (or several talks) to the ClojureX conference in London on the 1st & 2nd December.

If you have never spoken before or want some handy hints on presenting and getting your talk accepted for Clojure eXchange, then join our workshop on Giving your first Meetup or Clojure eXchange talk on 2nd August, 2016 (video coming soon).

Anyone accepted to speak at the Clojure eXchange conference gets a free ticket, or re-imbursed if you have already purchased a ticket. You also get a free ticket for a friend. A 25% discount on ticket purchase for anyone who submits to the CFP but does not get accepted.

Read More

Spacemacs - Adding Custom Snippets to Yasnippet

Using yasnippet saves time by avoiding the need to write boilerplate code and minimising other commonly typed content. YASnippet contains mode-specific snippets that expand to anything from a simple text replacement to a code block structure that allows you to skip through parameters and other sections of the code block. See YASnippet in action in this Emacs Yasnippet video.

To use a specific snippet simply type the alias and press M-/. For example, in html-mode typing div and pressing M-/ expands to <div id="▮" class="▯">▯</div> and places the cursor so you can type in the id name, then TAB to the class name, finally TAB to the contents of the div.

You can also combine yasnippets with autocompletion select snippets from the autocompletion menu.

Spacemacs has lots of snippets for most of the languages and modes it supports. However, YASnippets also uses a simple template system in plain text, so its pretty easy to learn. Lets look at how to add your own snippets with Spacemacs.

In regular Emacs, yasnippets expand funciton is usually bound to TAB, but that key is used already in Spacemacs so M-/ is used instead.
If you just want text replacement you can also use Emacs Abbrev mode.

Read More

Clojure Dojo: Celebrity Name Smash - June 2016

The June 2016 edition of the London Clojurians coding dojo set the challenge of building a celebrity name smash, taking two “celebrities” and smashing their names together to make a weird or ammusing gestalt name.

For bonus points the challenge would include this celebrity name smash as a service and even more bonus points if using the new clojure.spec library to put specifications around data structures and functions.

Bonus points are non-redeemable, sorry!

Although our group didnt get get any of the bonus levels, here is the blow by blow development of our code for the Celebrity Name Smash.

Read More

Transducers in Clojure: Getting Started

Transducers are built upon the design princlple in Clojure of composing functions together, allowing you to elegantly abstract functional composition and create a workflow that will transform data without being tied to a specific context. So what does that actually mean and what does the code look like? Is there a transducer function or is it just extensions to existing functions. These are the questions we will explore and answer.

If you are in the early stages of learning Clojure, then I suggest getting your head around functions such as map & reduce and composing functions with the threading macros before diving into Transducers.

This is my interpretation of the really great introduction to Transducers from Clojurescript Unraveled, expanded with additional code and my own comments.

Read More

Thinking Functional With Clojure at DevoxxUK 2016

Many languages new and old provide a way to write code using functional programming concepts, however learning those concepts can take a little time especially when they are joined with OO concepts in the same language.

As Clojure has a simple syntax, many find it easier to focus on learning the concepts and design of functional programming. Then either taking those concepts back to other languages or continuing with Clojure.

At DevoxxUK 2016 I have the pleasure of running a workshop where I can help developers understand the core functional concepts, using Clojure (and Spacemacs) as simple tools.

Read More

Publishing for Developers With Gitbook.io

The tools for writing books and workshops have become so much easier and open. Even some enlightened publishing companies are moving with the times and not forcing you to write books in seperate word files. However, having to manage the expectations of a publisher can make book writing very unattractive.

Self publishing is much more fun and can be done at your own pace, using tools a developer can understand. Its also much easier to talk to a publisher when the book is mostly done.

I use GithubIO/gitbook, a node.js project to create my books and workshops. Gitbook generated a responsive design website as well as ebook formats in pdf, epub, etc.

All the content is written in markdown and can be managed with Git. There are also a range of Gitbook.io plugins that enhance the readers experience in terms of content style and user interaction.

You can also distribute your books via the self-publishing platform of Gitbook.io where you can sell your books on its marketplace.

Advantages of Gitbook.io

  • Simple to use tools, requiring only node.js to be installed
  • Writing content in markdown keeps it human readable as you write it
  • 100+ plugsins help you style the book, applying different styles to the range of formats
  • Content can be managed in Git and collaboration can be done in services such as Github or Bitbucket
  • Website versions can be published on any webserver, Github Pages works well for these.

Lets set up Gitbook.io and go through the content workflow.

Read More