Posts Tagged ‘book’

An awesome book for Scala

March 10, 2015 Leave a comment

scalaI decided to learn Scala as a new language. I’ve heard a lot of good things about it. I looked at some basic stuffs in it and it seems to be a cool language. It’s based on the JVM, thus it stands on the shoulders of giants :)

I found an excellent book for learning it called “Scala for the Impatient” (Amazon link). Here you can download the first 9 chapters legally, and they nicely cover the basics that let you get started. I just finished the first chapter (13 pages) and it teaches you a lot. At the end of each chapter there are exercises, so you can test your knowledge and you have a feedback of your progress. I think a programming book without exercises is worthless.

Last week I started to work with the book “Programming in Scala” 2nd ed., which is written by the author of the language. I read the first four chapters (116 pages) but it goes in all directions. It talks about advanced stuffs at the beginning and it doesn’t explain the basics well. After the four chapters I had the impression that I still know nothing about Scala…

“Scala for the Impatient” seems better to my taste. I should buy the complete book.

Cracking the Coding Interview

October 30, 2012 Leave a comment
Categories: Uncategorized Tags: , ,

The Architecture of Open Source Applications

September 3, 2012 Leave a comment

In these two books, the authors of four dozen open source applications explain how their software is structured, and why. What are each program’s major components? How do they interact? And what did their builders learn during their development? In answering these questions, the contributors to these books provide unique insights into how they think.

If you are a junior developer, and want to learn how your more experienced colleagues think, these books are the place to start. If you are an intermediate or senior developer, and want to see how your peers have solved hard design problems, these books can help you too.

reddit thread

Categories: Uncategorized Tags: , ,

List of freely available programming books

June 14, 2012 Leave a comment
Categories: Uncategorized Tags: , ,

The Debian GNU/Linux Desktop Survival Guide

March 20, 2011 Leave a comment

“The Debian GNU/Linux Desktop Survival Guide covers many topics. This is an ongoing work and the varying depth of coverage of different topics indicates this! The book is organised alphabetically over very many separate HTML pages. The top level topics are listed below. A PDF version, as a single document (over 700 pages) is available from Togaware.” (source)

Table of contents:

Read more…

Categories: Uncategorized Tags: , ,

Convert your wordpress blog to a PDF book

March 5, 2011 6 comments


You have a wordpress blog (.com or .org), and you would like to convert the whole blog to a PDF book. That is, convert every post to PDF and then join the pieces. The final result should be a single PDF, like a book.

Related work

An easy, simple, and free solution is offered by LJBook. Just upload your exported blog, and they generate a single PDF out of it.
However, I had a problem with it. My blog contains lots of source codes and unfortunately those blocks are not treated correctly by LJBook. So, I had to find another solution.

My solution

Here is a sample PDF and my whole blog (up to March 6, 2011). With my method, you can generate such an output.

The current version of the script (written in Python) is available here.

Steps to follow:

  • Download the script above and put it in a directory. In this directory, create a subdirectory called “pieces“. The script will download the HTML files here, and the PDF outputs are also stored in this subdirectory.
  • Customize the beginning of the script: blog name, username, password, etc.
  • The HTML to PDF conversion is done with WKhtmlToPDF. Here you will find more info about this tool and how to get it. Download it and store the binary here: /opt/wkhtmltopdf/wkhtmltopdf-i386.
  • Optional: disable the side bar on your wordpress blog. I don’t think you want to see the side bar on each page in the PDF book :) Refer to this post to figure out how to hide the side bar.
  • Now everything is set, you can launch the script. If everything is fine then the script will download each public post on your blog and convert them to PDF. Warning! When you launch the script, it will delete all *.html and *.pdf files in the directory “pieces“!
  • Once you have all the PDFs, enter the directory “pieces” and join the PDFs: “pdftk *.pdf cat output book.pdf“. If you don’t have pdftk, install it (sudo apt-get install pdftk).
  • When ready, don’t forget to set back the side bar on your blog.
  • You might want to edit the final PDF. It is almost sure that it will contain some empty pages; you can remove them with a PDF editor.

Getting started with the D programming language

January 17, 2011 2 comments

Ignore all the people who tell you it can’t be done. Telling you it can’t be done means you’re on the right track.” (Walter Bright, creator of D)

New year, new language to learn :) I heard about D some years ago but I forgot about it. Last weekend I was browsing some computer books in the library when I found The D Programming Language by Andrei Alexandrescu. “Wow, I heard about it…” I read the preface and I decided to dive into it. So in the future I plan to make some posts about D.


D has two versions, D1 (which is old), and the new D2 (which is recommended for new projects). Visit the page and download the package that is suitable for your platform. There is a .deb package for Ubuntu, a Windows installer, etc.

Hello, World!

To try D, let’s start with the classis example (hello.d):

import std.stdio;

int main()
    writeln("Hello, World!");
    return 0;

Compile it:

dmd hello.d

It will produce an executable (hello) that you can run with ./hello.

Hello, World! as a script

It is also possible to write “scripts” in D. Just add the shebang line to the beginning of the source:


import std.stdio;

int main()
    writeln("Hello, World!");
    return 0;

Notice that this time rdmd is used instead of dmd! Make the source file hello.d executable (chmod u+x hello.d) and launch it with ./hello.d. The source will be compiled and the produced binary file will be cached. If you launch hello.d again, the source won’t be compiled again unless you modified it.


Digital Mars D compiler
Based on the Digital Mars compiler suite. I showed its installation above.

Gnu D compiler
Based on the Gnu compiler collection.

sudo apt-get install gdc

LDC compiler
Based on the LLVM compiler.

sudo apt-get install ldc

LDC doesn’t support D2 or Phobos, but D1/Tango.


Recommended books

The author of D

Walter Bright is the guy who designed the D programming language. Check out his home page where you can learn more about D.

Here is an interview with him.


Opinions / Discussions


Categories: d programming language Tags: