The Hacker Ways
The Hacker Ways
$14.99
Minimum
$24.99
Suggested
The Hacker Ways

This book is 75% complete

Last updated on 2014-02-23

About the Book

There is a better way to deal with computers. Hackers have been developing and using it for at least 40 years: it is the way of the command line, of the conversation with the computer in languages that are neither human nor machine, but a carefully crafted middle ground. Hackers, by the way, is how we call people who know well their tools, who dare to explore, and who need to build things.

If you want to use the computer to solve problems and you are not comfortable in a UNIX command line environment you will benefit from this book: it will take you to a level of understanding from which you'll be able to move forward, a first but solid stepping stone in the way to profficiency with the tools of the hackers.  Having a firm grasp of the tools and the ways of working on the command line will make you more efficient, more productive, and able to tackle more challenging problems.  

The Hacker Ways will teach you all you need to know to get started.  You'll learn how the command line works, and you'll understand its logic; you'll learn to edit files in Vi and Emacs, the two classic text editors; you'll learn about programming, you'll write your first programs.  You'll learn tools to do math and data analysis.  And you'll start playing with it all, which is the key to real learning. 

I wrote most of the contents of this book in order to introduce a smart and motivated audience (my two sons) to the world of the command line, the classic editors, and the basics of programming.  It has already achived its first objective.  I would be very glad if it could help you as well. 

Table of Contents

  • §1 — Introduction
    • Why this book
    • The UNIX tools and environment
    • The development process
    • The Way of the Future
  • §2 — The way of the terminal
    • A note on following this book
    • The directory structure
    • Listing the contents of a directory
    • Asking for help
    • Creating a directory
    • Everything is text
    • A conversation with the computer
    • Building and manipulating files
    • Copying and moving
    • Deleting
    • Multiple names for files
    • Wildcards
    • Completion
    • Command line history
    • Clean up
  • §3 — Basic UNIX tools
    • Bring in some content
    • Bundling files with tar
    • Finding files with find
    • Looking for differences between files
    • Find text in files
    • Finding words in files of a particular type
    • Looking for help
  • §4 — The way of the editor
    • Editing with Vi
    • Editing with Emacs
    • Programs are text files —and documents can be as well
    • Why bother
  • §5 — From the shell to a program
    • Our first program
    • Running the program
    • Program permissions
    • Variables in the shell
    • Sourcing scripts
    • Environment variables
    • Initializing environment variables
    • Conditionals in the shell
    • Looping the shell
    • Programming and the shell
  • §6 — Speaking Python
    • Running Python
    • Functions in Python
    • Variables in Python
    • Defining your own functions
    • Exit Python: the end of file, C-d
    • Writing a Python program
    • Command line arguments for your Python program
    • The shebang
    • Programming Python
    • Compiled languages and interpreted languages
  • §7 — Making the computer work for you
    • The case for improving your work environment
    • Running things in parallel with screen
    • A remote server running screen
    • Python packages
    • Installing Python packages with pip
    • Improve your Python environment with IPython
    • Asking for help in Python
    • Playing with Python and math
    • Solve equations and plot graphs

About the Author

juan@juanreyero.com
Juan Reyero

Juan Reyero has been working as a research and development engineer at Hewlett-Packard for the last 18 years.  First HP-UX, then Linux, and now OS-X: he has always used the UNIX tools for his research, he's built key development tools with them, and he's been teaching and proselitizing them in the HP R&D community and beyond.

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Write and Publish on Leanpub

Authors and publishers use Leanpub to publish amazing in-progress and completed ebooks, just like this one. You can use Leanpub to write, publish and sell your book as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub