Sunday, November 17, 2013

HP printer on Ubuntu Linux

I used the add printer dialogue on Ubuntu Linux but I didn't manage to install a HP deskjet 2514 printer. Following a recommendation read on Ubuntu-fr doc I installed the HPLIP tools (HP Linux Imaging and Printing). And it worked, I can now print and scan from Ubuntu on this cheap Deskjet printer. Once HPLIP is installed, new HP printers can be installed using the command: hp-setup.

Printers installed on the local computer can be accessed through: http://localhost:631/printers/

Next step is to plug the printer to my internet router to enable printing through the wifi. My internet router has a windows printer sharing capability. On Lubuntu I needed to install the smb client to be able to access a printer shared on a Windows network.


-----
HPLIP Installer ver. 5.1
[...]
Enable the universe/multiverse repositories. Also be sure you are using the Ubuntu "Main" Repositories. See: https://help.ubuntu.com/community/Repositories/Ubuntu for more information.  Disable the CD-ROM/DVD source if you do not have the Ubuntu installation media inserted in the drive.  During the install process you will be added to the lp and lpadmin group, please quit the installer before the setup stage, log out, log back in, and run hp-setup to complete the install.

Wednesday, November 06, 2013

Code documentation

"I believe that the time is ripe for significantly better documentation of programs, and that we can best achieve this by considering programs to be works of literature."
—Donald Knuth, “Literate Programming

Inspired  roxygen

Further quotes from Literate Programming by Donald Knuth:
"first [...], I thought that I would be designing a language for “top-down” programming, where a top-level description is given [...] and successively refined. On the other hand I knew that I often created major parts of programs in a “bottom-up” fashion, starting with the definitions of basic procedures and data structures and gradually building more and more powerful subroutines. I had the feeling that top-down and bottom-up were opposing methodologies: one more suitable for program exposition and the other more suitable for  program creation.  But after gaining experience with WEB, I have come to realize that there is no need to choose once and for all between top-down and bottom-up, because a program is best thought of as a web instead of a tree. A hierarchical structure is present, but the most important thing about a program is its structural relationships.
[...]
Thus, WEB may be only for the subset of computer scientists who like to write and to explain what they are doing. "