RSS

How to decrease the Maven build time of your Java projects


There are good resources on the web that shows how you can decrease the Maven build times of Java projects, but since I couldn’t find the following information in most of them, I wanted to note this down for future reference. One of the simplest things you can do to decrease the Maven build time is to add the following to your command line:

-Dmaven.javadoc.skip=true

But is it worth it? Let’s check. Take an example project such as Hadoop that is about 2 million lines of source code. Without skipping the generation of Javadoc, Read the rest of this entry »

 
2 Comments

Posted by on May 23, 2016 in java, Programlama

 

Tags: , ,

Turkish Mode for Emacs is now available as a package via MELPA


Turkish Mode for Emacs, developed by Deniz Yüret, is now available as a package via MELPA. This is for people trying to type Turkish documents on a U.S. keyboard using Emacs. The program provides a `turkish-mode` in which the correct Turkish accents are added to the ASCII version of the last word typed each time the user hits space. If you are using a recent stable version of Emacs that lets you use the Emacs package manager, and you’ve added MELPA as a repository, installing it is as easy as running:

M-x package-install turkish

and then putting the following line in your init file:

(require 'turkish)

Once you have done that, in any Emacs session you can toggle the Turkish mode

M-x turkish-mode

The same program has been converted to many different languages and available on many platforms such as a Python package, a Java package, a Perl CPAN package, an Ubuntu PPA package, a web application,  a Chrome plug-in, a Firefox add-on, and a Safari add-on.

 
Leave a comment

Posted by on March 29, 2016 in Emacs, Programlama

 

Tags:

How to comment your code: an example from Hadoop


How to comment your source code? This topic comes up every once in a while, and sometimes it leads to heated discussions. The consensus is something like “comment why, and not how”. Useful as it seems, I think it is important to give examples from real-world scenarios. So, let’s look at such a case.

I’ve been working on the integration between Hadoop and HGST Active Archive S3 Object Storage product recently, and while dealing with the internals of the S3A File System that we are improving at the company, as well its interaction with YARN,  I’ve come across an interesting piece of code in the Hadoop code base. Before going into its details, look at it without any comments:

Read the rest of this entry »

 
Leave a comment

Posted by on March 11, 2016 in java, Programlama

 

Tags: , , ,

Old Computers: A Trip Down the Memory Lane and History of Computing


A few weeks ago I went to the computer science building of KU Leuven for a Haskell meet-up. I was surprised to see a lot of very old computers beautifully put on an exhibition. It felt like a time travel in the history of computing. I captured a few of them using the camera of my smartphone, trying to imagine what the pioneers of computing back then would’ve thought if they had seen this smartphone in action (full resolution photos of these and many others are available in my Flickr album.)

Some of the computers were happily churning and crunching data long before I was born such as this one:

20151201_182649

Read the rest of this entry »

 
Leave a comment

Posted by on December 24, 2015 in Programlama

 

Tags: , , , , ,

Is there a high quality and free Text to Speech system for Dutch that runs on GNU/Linux?


Dear Text to Speech and open source experts:

For a toy / hobby project (non-commercial), I’m trying to find a suitable Text to Speech system for Dutch that I can run on GNU/Linux. So far, the situation does not look very promising. I’ve tried eSpeak, but using it for Dutch is not as good as I expect. I made my experiment using a file “computer.txt” that has the following contents:

Een computer is een apparaat waarmee gegevens volgens formele procedures zoals algoritmen kunnen worden verwerkt. Meestal wordt met het woord computer een elektronisch, digitaal apparaat bedoeld, maar er bestaan ook mechanische en analoge computers.

$ espeak -vnl+7 -s 170 -f computer.txt

Read the rest of this entry »

 
3 Comments

Posted by on December 3, 2015 in Linguistics, Linux

 

Tags: , , ,

How to edit remote files within Emacs when a program automatically runs after you SSH


If you are used to TRAMP functionality of Emacs to edit remote files without leaving the comfort of your beloved editor on your host machine, you do your best to keep it working even when different conditions arise. In my case, I’ve been recently working with virtual machines at work and the product that I’m working on is configured to run some program automatically right after I log into the machine via SSH. This prevents TRAMP functioning correctly with its default settings, because instead of receiving the shell prompt immediately, it receives from the machine the final line of the program that automatically runs and expects the user enter some response:

    ... some text menu options ...
    ...
    Please make a selection >>

Above that line, the text menu says that the user should enter 0 to exit the program or some other menu option to continue. Therefore, I had to find a way to tell Emacs that it had to send a 0 after it connects to the machine. The high-quality TRAMP manual was immediately helpful by providing a relevant example and I came up with the following: Read the rest of this entry »

 
2 Comments

Posted by on November 30, 2015 in Emacs, Lisp, Programlama

 

Tags: , , ,

How to detect Friday the 13th with full moon using Emacs


nrAlmost 21 years ago, in 1994, I bought the brand new edition of Numerical Recipes in C: The Art of Scientific Computing. As an engineering and mathematics student who was much into programming, I still remember my excitement then, as well as the bright red hard-cover.

The first algorithm presented in the book (and its implementation in C programming language) was about calculating the dates that were Friday the 13th and had full moon. Now that I’m approaching the 21st anniversary of that day, I wanted to share a similar program to detect if the current date is Friday the 13th with full moon. This time, my preference is for Emacs Lisp, and instead of re-implementing the same algorithm, I simply use the calculations already provided by Emacs. In other words, I rely on the lunar-phase-list function that returns the lunar phases of the upcoming dates given a month and a year.

It’s been ages since I’ve done Common Lisp programming and many years since I’ve practiced Emacs Lisp, so the code below is probably not optimal and idiomatic, but nevertheless it follows:

You can used the function defined above to see whether it is your “unlucky” day:

This will return “Good luck!” most of the time, luckily!:)

Can you come up with other ways of detecting Friday the 13th with full moon using existing utilities, such as GNU calendar program? Or, how would you calculate the next 10 Friday the 13ths that had full moon, using Emacs Lisp or some existing utility?

 

 
Leave a comment

Posted by on November 12, 2015 in Emacs, Lisp, Programlama

 

Tags: , ,

 
Follow

Get every new post delivered to your Inbox.

Join 69 other followers