Carpe diem

I was watching an episode of Vikings, and there was a scene where King Ecbert was reciting a Latin poem to his daughter-in-law. It said:

Don’t ask, we may never know, Leuconoe, what the Gods plan for you and me. Leave the Chaldees to parse the sentence of the stars. Of expectations, life’s short. Even while we talk, time, hateful, runs a mile. Don’t trust tomorrow’s bough for fruit. Pluck this. Here. Now.

In my curiosity I looked for the original text, and found it was one of Horace’s odes, to be specific Ode 1-11. Its full text is here:

Tu ne quaesieris, scire nefas, quem mihi quem tibi
finem di dederint, Leuconoë, nec Babylonios
temptaris numeros. Ut melius, quicquid erit, pati!
Seu plures hiemes, seu tribuit Iuppiter ultimam
(quae nunc oppositis debilitat pumicibus mare
Tyrrhenum). Sapias, vina liques, et spatio brevi
spem longam reseces. Dum loquimur, fugerit invida
aetas. Carpe diem, quam minimum credula postero.

Now, the translation in the Vikings was probably meant to be poetic, and therefore slightly different. Also, the last few sentences in the translation refer to the last two lines of the poem, so the middle body has been cut out.

Here is how I would have translated Horace’s poem (with a little help from a few other sources):

Don’t ask, for we don’t know, what ending the gods
will give me or you, Leuconoë, nor try to make sense
of the Babylonian numbers. How much better it is
to accept it, whatever it will be. Whether Jupiter gives us
many winters to come, or whether this is the last one
(currently weakening the shores across the Tyrrhene
sea). Be wise, strain the wine, and for life is short
cut back on your far-flung hopes. As we talk, so flies away
our hateful age. Seize the day, with little trust in tomorrow.

Zend Framework 1 Extension Library and Composer

Maybe I am a bit late to get on the Composer bandwagon, but a colleague was adamant about it and convinced me to use Composer in our projects. The benefit of using Composer with your PHP applications is that it will download any library dependencies for you, and take care of the autoloading of classes. So I enabled Composer in my Zend Framework 1 Extension library, with a Zend Framework 1.* dependency. Read on how to get the libraries using Composer!

Continue reading Zend Framework 1 Extension Library and Composer

Enumerations in PHP

In the C programming language, enumerations are handy little data types, which add more linguistic context to the code. They make code more readable, and enforce variables to have certain values. The latter is certainly true, if you have ever assigned string-valued codes to your variables and made a typo somewhere. For example assigning 'white' to the variable $color, and then make a typo somewhere in the code by using 'whiet' or something like that. The program would still compile or run, and not complain at all, while there is something fundamentally wrong with the code.
Continue reading Enumerations in PHP

tmux – an awesome little tool

If you do a lot of programming from the Linux console, you’ll certainly appreciate the power of tmux. It is a terminal multiplexer, which means that it can create multiple virtual consoles within a single terminal shell. Since these virtual consoles are not bound to a terminal, they will keep running in the background, even if you close the terminal you started it in. This means that you can detach these consoles, and re-attach them in another terminal session.

For example, imagine you are working on some project on a development server. You log into that server over SSH from your office, create a tmux session, and do your coding in vim in there. Then you detach the session, and log out from the server to go home. Back at home, you log into the development server again, and re-attach the tmux session, and you see the vim session back where you left it. Not that I suggest you to work from home, but it is a good example of how you can continue your work or session from anywhere.

Tmux in action. Two vim sessions and a MongoDB console.
Tmux in action. Two vim sessions and a MongoDB console.

Another great thing about tmux is that you can create multiple sessions within the same terminal window, and move between them, something like alt-tabbing between terminal windows, except it is much faster and with less visual distraction. An added bonus is that tmux is able to subdivide the visible portion of your terminal window into parts, so you can have multiple virtual consoles, all visible within one window. Very useful if you have lots of screen estate at your command, so that you can code in vim in one, access a MySQL console in another, and doing a sass --watch in yet another, for example. All the information you need, everything visible in the same window, for optimal productivity.

Continue reading tmux – an awesome little tool

Job interviews – how to positively communicate your deafness

I have a profile on LinkedIn, and from time to time I get approached by recruiters, who sometimes have a pretty interesting offer I’d like to know more about. As it is a profile to show the best of you, positivity is an important factor, and that is the reason I do not write that I am deaf – which unfortunately has the negative connotation that you can not hear. However, I add under Languages the fact that I know several sign languages, with “native or bilingual proficiency”. This is one of the examples I’d like to share with you on what to do to improve your position on the job market as a deaf professional.
Continue reading Job interviews – how to positively communicate your deafness