Did you ever wonder how can programming in Erlang, C, Lisp etc can offer you the same benefits with a meditation session?
Software development (at least when it is done correctly) puts you “in the zone” which is actually a meditative state, meaning that you lose the sense of time, ego and you are 100% focused in what you are doing. Your mind is like a laser (instead of just a scattered weak light) and you can really solve difficult problems. Sadly, the average engineer can never reach this state (mostly due to interruptions - facebook, twitter, notifications etc) and you can see that in his code.
Most of the bugs I’ve seen, are due to losing your trails of thought, losing the big picture and finally solving a problem but creating another one a few functions further. And this is a pattern.
That pattern is the perfect recipe for anxiety, decision fatigue and not enjoying what you are doing. Translation: You hate your job.
What you can do is quite simple (at least it works for me):
First, always make a ritual when you want to sit down and start working. Meaning, get your glass of water/redbull, clear your desk, write your todos in a clean, empty piece of paper and start your playlist.
Then, close ALL non-work related pages (facebook, twitter, reddit) and dive into your thing.
Trust me on this one. Do this for a week, establish it as a habit and I can assure you that you’ll be a better and happier developer :)
Do you have any other suggestions?
My Chromebook is becoming my main traveling machine when I am road tripping with BugSense, because is light, with more than 7 hours of battery, excellent keyboard and is running ubuntu (with everything working) :D
The only problem I had, was that I usually change the Caps lock key to a Ctrl key (yes, I use emacs!). Try it and you’ll see that is feels more natural having a Ctrl key placed right next to your pinky finger.
In Ubuntu, it is just a click (make Caps lock behave like Ctrl) but it didn’t work because the “Search” key is actually a SuperKey (or Windows key if you like).
So, if you want to make it work, change do this:
and you are ready to go!
I’ve created a new live programming language (built using Clojure and Processing) for creating music on the fly, called music as data (MAD) and I am going to present it at Dynamic Languages 2011 conference in Sweden. So I was thinking ways that I could demonstrate the main principle of the language that music is code is data and I thought “Hey lets transform twits to music”!
And here we are! Every twit (mention) to @jonromero, will be converted to music and played (you can hear short examples at mad.emotionull.com) and the final piece will be played after my talk.
Let’s dive into code snippets now:
We are going to use clojure-twitter for getting mentions.
And then convert characters to notes.
You can hear an example at mad.emotionull.com and actually has a nice beat!
I also plan to map a markov-chains function so the final music can make more sense but hey, the code is online, clone, use and create!
I’ve created music-as-data because I really hated trying to write about sins, freqs etc all the time in order to produce a single note. Also, it was very difficult to add abstraction and extend AND having fun all at the same time. I think that (music [as data]) is disruptive in how we think and interact/transform music. Or maybe not.
So, one of the main advantages of having music as data as code, is that we can have our music commited to version control systems. So, what would happen if we form bands that are only using code to create music, and can fork, revert and exchange music snippets? Wouldn’t that be awesome? Well, who knows? It surely sound interesting.
This is a call to wannabe rockstars: Get music-as-data, create a repository in github, get your friends together and (why not?) form the first EmacsBand. Who knows? You might even become a GuitarHero game. Or maybe not.
Love to hear your feedback @jonromero
I’ve created a new live programming language (built using Clojure and Processing) for creating music on the fly, called Music As Data (MAD) and I am going to present it at Dynamic Languages 2011 conference in Sweden. It’s fun and I think it’s easier to grasp than SuperCollider, Chuck etc. Also, it’s trivial to extend. And its using Processing (so you can add nice cool visual effects).
So, if you are trying to use it, go to the website and twit your ideas @jonromero.
Have fun, create masterpieces!
We are working with the guys from NiobiumLabs for some cool Kinect installations, so I’ve started hacking around with OpenKinect.
The main problem is the libraries. You must download, configure and compile a lot of stuff (I really don’t know what I was going to do without apt-get) and finally all I was missing was a REPL.
I had the Java (processing version) working nicely (after alot of config and ln -s hacks), so I started working on a Clojure version.
The advantage of having a REPL is HUGE. You can play around, experiment and test many libraries on-the-fly.
So, I’ve requested a pull from the main openkinect branch and I’ll continue working on the clojure branch and give it some Lisp love. And all needed libraries are included (so you can start hacking RIGHT away).
Follow me around (and bug me!) @jonromero!
First of all, download Oracle Database 10g Express Edition (around 200MB) after you complete a free registration for Ubuntu.
If you don’t have 1GB of swap, then you cannot continue with the installation unless you create some:
$ sudo dd if=/dev/zero of=/swpfs1 bs=1M count=1000
$ sudo mkswap /swpfs1
$ sudo swapon /swpfs1
(taken from here)
Then after the installation is completed, you can install the python library (cx_Oracle) via easy_install. But before that, you must export some vars (taken from here)
$ export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
$ export LD_LIBRARY_PATH=$ORACLE_HOME/lib
$ export PATH=$ORACLE_HOME/bin:$PATH
$ sudo -E easy_install cx_Oracle
After that, you are ready to import cx_Oracle and hack away!
I had huge problems with my .emacs setup when I moved it to an Ubuntu 10.10 box. I could connect with slime-connect to my swank server but I couldn’t eval anything. I was going ballistic for a couple of hours (I have my .emacs setup on bitbucket and it works perfectly) until I tried to connect remotely to the swank server (so I could at least blame the server).
But remotely everything kept working. So, it was something else. After A LOT of hacking around, I found that having installed slime via apt-get, puts you in the heisenbug land.
So, you can either install slime via a patched version of package (https://github.com/technomancy/package.el) OR
and then add it to your .emacs
(add-to-list ‘load-path “~/opt/slime”)
Installing Clojure in Ubuntu can be found in a lot of places and that’s the bad thing. A lot of copy/paste and things that are out of date (like Java). I’ve been installing Clojure in a couple of Amazon servers for a cluster, so I gathered ALL the info in one big-huge line.
What this line does:
- Installs add-apt-repository (so we can add Sun’s Java 6 JDK - it’s not available by default)
- Installs ant, git, clojure and clojure-contrib (from sources), compiles them and installs lein
You only have to hit “y” and choose “ok” and “Yes” on a couple of screens during installation. Also, choose the java-6-sun when prompted (not the java-6-open sdk). Then, you just chill out and you are ready to go!
Here’s the bash line you can copy and paste in your terminal:
If you found and better/smarter way, I’ll be glad to hear about it!
Oh, thanks to http://riddell.us/ClojureOnUbuntu.html for the excellent tutorial on how to install Clojure.
Coming next, installing Emacs with Clojure [the easy way]