How to Set a Cron Job 24 Hours from Now

On the latest project I am working, a mobile app, upon a certain action of the user on the server, I need to schedule a task to run exactly 24 hours later. Cron to the rescue! My first, naive idea, however, was to add a new cron job to the crontab whenever a user hit […]

Two Great Tools to Build and Test Your API

My latest mobile project relies heavily on an API, so a lot of development time was spent defining, implementing and testing the API. During the process I used two tools mainly, and they were very helpful. Below you’ll find them in case you are in a similar position. 1. This neat little tool helps […]

Halloween Party Problem Solution in Lisp

The problem: Alex is attending a Halloween party with his girlfriend Silvia. At the party, Silvia spots a giant chocolate bar. If the chocolate can be served as only 1 x 1 sized pieces and Alex can cut the chocolate bar exactly K times, what is the maximum number of chocolate pieces Alex can cut […]

Solution to Gem Stones Problem Using Lisp

The problem: John has discovered various rocks. Each rock is composed of various elements, and each element is represented by a lowercase latin letter from ‘a’ to ‘z’. An element can be present multiple times in a rock. An element is called a ‘gem-element’ if it occurs at least once in each of the rocks. […]

Utopian Tree Solution Using Lisp

The following problem comes from HackerRank: —– The Utopian tree goes through 2 cycles of growth every year. The first growth cycle of the tree occurs during the monsoon, when it doubles in height. The second growth cycle of the tree occurs during the summer, when its height increases by 1 meter. Now, a new […]

Should I Learn Common Lisp or Scheme?

First of you, if you are considering to learn functional programming, I highly recommend it. It’s one of the few programming paradigms that is really different from the usual imperative/procedural style. Depending on the language you choose it will definitely force you to think about programming in new ways. Lisp is a great choice for […]

C vs. Lisp Program Example

I was curious to see how a program to solve the same problem would look like in C and in Lisp. I went ahead and solved the problem below in both languages, using a very similar approach. Take your own conclusions! ——— James got hold of a love letter that his friend Harry has written […]