The definitive guide to start with ClojureScript
Yesterday, while my working machine was crunching tons of numbers, graphs and maps to produce some (hopefully) meaningful data for a research work, I was looking for a simple guide to build a simple web page with ClojureScript. Unfortunately, I was not able to find something that was at the same time straightforward, simple, minimal and explained! So, I decided to write something by myself to avoid my pain to some future young clojurist. The main problem with the guides I’ve found online were:
- They didn’t use Leiningen or any other build system. Now, this can also be good, but Leiningen is, in practice, a standard for Clojure developer, so I’d like to learn how to setup a project as soon as possible.
- They are outdated.
- They are not well explained. For sake of simplicity, they assume a lot of things. But I want to know what I’m writing!
- They are not simple. I don’t want to write a full featured web application with a lot of dependencies and plugins! I want an hello world!
So, I hope to cover all this points. Let’s start!
My peek on Atom
People who know me already know: I’m a tool maniac. I can spend hours searching for the perfect configuration of keys, plugins, colors, themes, debugging tools and so on, and unfortunately this is how I waste a lot of time every now and then. Text editors and IDE are one of these big tools that I cannot stop searching for the perfect one. The real problem, though, is that I cannot find satisfaction for more than a month on a particular editor, so, during my life as a coder I used with a certain degree of experience tons of editors such as Vim, Emacs, Sublime Text, GEdit and much more. Honestly! Look at this! If I had spent less time on tweaking my editors and more on coding, now I would have more side projects completed for sure. Anyway…
I have a certain envy for those developers that are able to stick on, for instance, Vim for more than 20 years. They are happy and enthusiastic of their editor! Lucky them! But I’m not in this way. Maybe I find the exploration more rewarding. I don’t know.
So, coming back to the topic, when I used Linux I was happy too and my favourite editor was by far Vim. Yes, the learning curve is steep as hell but this thing has never scared me (I try to learn too many newborn and cryptic programming languages to be scared by a text editor, complex or not that may be. Then, a couple of years ago, I moved back to Windows and I started to work on bigger project. For some reason, my pleasure and muscle memory in using Vim began to disappear.
Now, there is a long story made of IDE and text editors but I don’t want to spend too much time talking about my evolution (or devolution, your call) in the world of programming editors. The real goal of this article is to explain why, for now, I’m happily landed on Atom, the text editor mad in GitHub.
Global Game Jam 2015 Postmortem
First of all, some time ago I stated that I would like to start writing more. Unfortunately, a combination of personal issues, flu and other psychological breaks did not allow me to respect this promise. But I’ll be back soon. I swear.
Second, it is now time to talk about the game we developed for the Global Game Jam 2015 (and obviously valid as a January entry for my One Game A Month challenge!) I’m very happy with this game also if it is not a real “game” because (little spoiler) it is an online game who require a big amount of users to be interesting. I’ll never have so many users connected at the same time, so it is useless in practice. The good thing is that it was a big technical challenge and to be able to complete everything in less than 30 hours was really exciting. But first things first.
The most promising languages of 2015 - Part 2
In the the previous post we have seen what are the general trends of the previous year with regard to the fascinating world of programming languages. To summarize, we can say the there are two strong trends: 1) more functional-inspired elements in programming languages 2) more statically strong typed languages that can be compiled in machine code.
Now, in the current article, I want to list all the languages which have attracted interests in the last years and that represent the implementation of these trends. Obviously, as I said in the previous article, these are not languages on which to bet their careers: these are new trendy languages but the real world does not work on “trends”, but on software, oil, commerce, health care and an hundred of categories in which the actual programming languages are doing great with an huge amount of per-existing codebase.
However, it is nice to explore the “future”, so, let’s take a look.
The most promising languages of 2015 - Part 1
At the very beginning of a new year, it is customary to try to predict what will happen in the future. That is the selling point of each big astrology book which pollute bookstores and newsstands in this part of the year.
Personally I’m not a fortune teller, but I think that can be interesting to try to set the route of the new year on the basis of the one just past. Obviously, I do not pretend to talk on every possible kind of events, but for the one I’m interested in, I think I can say something interesting or, at least, start a discussion.
So, let’s try to spend some words on the trends regarding programming languages and software development.
One Game A Month - December 2014
The new year is come, full of good resolutions and appealing feelings of renovation. For my part I have two main target. The first one is to write a bit more. I always feel that I have a lot to say but, for some reason, I usually get stuck in a kind of writer’s block every time I finally found time for writing. So, because the only way to beat a writer’s block is to write, and write and write, I decided to spend at least January into a more strict scheduling. Maybe there will be a good impact in the blog post frequency too.
The second “resolution” is to beat the One Game A Month challenge for 2015. The goal is to complete a game each month. You don’t have to realize the full game in one month, you just have to complete and release it. I think it is a nice opportunity to challenge myself on some specific game development aspect while forcing some deadline (that is always a good thing).
However, taking advantage of the Ludum Dare jam on December, I started this challenge a bit in advance. :) So, now I’m going to do short post-analysis of my game for the previous month.
LowPoly in Blender
Recently I started exploring the low poly modeling in Blender. Well, there is this guy on youtube that is simply amazing. I really love his work and I’d suggest to watch his tutorials. For now I just leave here an appetizer.
On developer anxiety
You are finally back home. During your work day your mind was totally a volcano of creativity. You have so many cool ideas to implement (or at least to sketch). You go to your machine and you start to thing to the technical details. Many questions reach your mind. Maybe too many. Is it better to use Python or Haskell, or maybe C++? I have to start implementing my game prototype with Unity or with some other engine?
Random Maps with Cellular Automata
In the spirit of the ProcJam2014 (that unfortunately I have to skip because of a ton of academic duties :<) I’m presenting to you a simple algorithm to generate maps: the cellular automata generator. In particular, cellular automata are very well suited for cave-like environment and, in general, natural maps. It works both in 2D than in 3D and can be easily implemented in no more than 20 minutes. From the theoretical point of view, a cellular automata is a discrete model that consist in a regular grid of cells.
Towards the ProcJam 2014
Procedural Contents Generation (PCG) is a family of techniques, algorithms and procedures used for generating contents in an automatic way rather than manually. In other words, using PCG, game contents can be created by the host computer instead of pre-design everything at development time. In recent years, PCG is having an increasing popularity among the academic and game development communities. There are two big reasons behind this success: first, it allow the designer to generate an near-infinite amount of contents without the effort of manually design each element by hand (and that’s why the indie scene love PCG), second it increase the game longevity and replayability value of the game (because, for instance, the game it is always different after each run and so it can be replayed more).