👨🏻💻 Personal Dev Setup (openFrameworks XCode..)
Tons of things have happened in the last months.. The most important one being that I'm currently in London doing an MA in Computational Arts!
Maybe I'll write an article about it, but as for now you can just have a sneak peek here: http://doc.gold.ac.uk/compartsblog/index.php/work/popup2018/
No, let's get back into topic. It has been some time since I started programming, and I changed my workflow and IDEs many times, adapting to different fields.. web development, python, realtime stuff with openframeworks..
Now I feel I found a mature enough setup, and I want to share it with everyone who's interested!
First of all, I'm on a Mac. However most of the things I'm saying I think will be helpful also if you're on linux.
Recently I had to work on windows machines and I was forced to use git bash.. it's not as bad as I initially thought but I really missed a TRUE native unix shell like bash or zsh. I also worked with some raspberry pis and they're nice machines, but for my needs still to limited. Instead, I did some projection mapping tests with my UDOO board running on Ubuntu (https://www.udoo.org/udoo-x86/) and I was quite happy with the Ubuntu ecosystem. But still, iCloud is pretty much still a winning point for the things I need to do!
Starting from the basic stuff, my favourite shell is zsh, together with https://github.com/robbyrussell/oh-my-zsh.
With a nice shell, you need a nice package manager.. and I'm still quite happy with brew. It appears to be the most supported one plus it has a nice website and most of the tutorials you find online are using it. I don't know ruby so I really cannot say more than this. If anybody has any good tips to share on MacPorts or other packagers, please do!
Then, getting to the core of this post.. Visual Studio Code!
I'm not a Windows guy but when they do things the right way I have to acknowledge it. So trust me when I say that VSCode is currently the best text editor for my needs! Plus, it's open source so there's a nice community around it. And it has really tons of useful extensions, too.
In the past I always had so many extensions installed and every time I switched to a new computer I had to reinstall all of them again. Not ideal. But then I found Settings Sync!
This nice little extension uses your Github account in order to create a gist that keeps track of all your installed extensions, themes, preferences and shortcuts! This is the killer-app of all visual studio code extensions.
Moving on, currently I'm doing a lot of openframeworks stuff.
I personally like to have as much as a "transparent" view of what all of the code that I need does, and that was my first reason that got me leaving Xcode and moving to the make system. I'm really not qualified to talk about it (it is a broad topic and there are a lot of tutorials on it) but the important thing is that I'm quite comfortable in using it in order to compile all of my openframeworks apps. Basically, everything you need to do is:
make && make RunRelease
in order to compile and run the app (only if the compiling went well).
If you have additional addons, you can easily add them to the addons.make file or use the project generator import feature.
Plus, I recently discovered that you can compile and run apps even when you're outside the OF root directory. You need to specify the OF_ROOT variable like this:
Then you can type:
OF_ROOT=/your/of/root/path make RunRelease
in order to run the app.
This helps me to organise my code independently of the location of my openframeworks folder structure, which is a really cool bonus you get when working with make files.
Obviously it is a bit tedious to type all the path every time, but luckily Visual Studio Code has a simple way to create custom build tasks. You can create a new openframeworks build command in 3 steps:
- Press CMD+SHIFT+B to open build menu, then select 'Others'
<li>Edit the json file as showed in the gif (just edit the name and the command using the <em>make..</em> one)</li>
<li>From now, when you will press CMD+SHIFT+B in this project your will have the chance to trigger your build command!
You can see the full tasks.json file here:
And for now that's all! I showed you my personal dev setup with my daily tools (openframeworks, vscode, etc..) and I hope it has been even a little bit helpful.
Cheers!