Archive

Posts Tagged ‘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

http://www.aosabook.org/en/index.html

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

Problem

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.

Installation

D has two versions, D1 (which is old), and the new D2 (which is recommended for new projects). Visit the page http://www.digitalmars.com/d/download.html 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:

#!/usr/bin/rdmd

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.

Compilers

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.

Links

Opinions / Discussions

Blogs

Categories: d programming language Tags:
Follow

Get every new post delivered to your Inbox.

Join 71 other followers