If you are working with computing and don’t have access to Safari Books Online, you are probably not going as fast as you can.
If you subscribe, you should change some habits.
- Prefer it over Googling
- Prefer it over StackOverflow and
howdoi
- Combine books with video courses
- Search for libraries in (ie. pandas, urllib, argparse or logging) to see how professionals use them
- Highlight and export your highlights
- Work with your highlights in a Jupyter notebook and ultimately upload the notebooks to GitHub
There’s video courses. I always seem to understand the text better after I’ve seen a demonstration.
What’s a safari, anyway?
from Arabic safara “to travel”
Exporting
You can export your notes to a CSV file. A fun and easy way to browse a
CSV file is to use xsv
and fzf
:
xsv table safari-annotations-export.csv | fzf
You can use something like browsercookie
to help you download the CSV
automatically:
from clint.textui import progress, puts
import blindspin
import browsercookie
import requests
jar = browsercookie.firefox()
url = 'https://www.safaribooksonline.com/a/export/csv/'
puts('\nWaiting for download to begin... (may take a while)')
with blindspin.spinner():
r = requests.get(url, stream=True, cookies=jar)
total_size = int(r.headers.get('content-length', 0))
filename = 'safari.csv'
with open(filename, 'wb') as out_file:
for chunk in progress.bar(r.iter_content(chunk_size=1024), expected_size=(total_size/1024) + 1):
if chunk:
out_file.write(chunk)
out_file.flush()
puts(f'File saved to {filename}\n')
Maybe put this thing in a pex and run it in a cron job once in a while and send a push notification with ntfy just because you can.
safari.pex && ntfy send 'Downloaded Safari highlights CSV!'
Working with CSV data? My favourite tools are tad, xsv, csvkit, Pandas and SQLite.
Python
Here are some of my favourite Python resources. If you check these out, you will end up writing beautiful Python code.
Raymond Hettinger
- Modern Python LiveLessons: Big Ideas and Little Code in Python
- Beyond PEP 8 - Best practices for beautiful intelligible code
- Transforming Code into Beautiful, Idiomatic Python
- Modern Dictionaries
Brett Slatkin
Luciano Ramalho
Kenneth Reitz
Kenneth Reitz wrote Requests and creates APIs for humans. README driven development.
- The Hitchhiker’s Guide to Python by Kenneth Reitz and Tanya Schlusser
- The Hitchhiker’s Guide to Python! (online)
Miguel Grinberg
William Wesley McKinney
William Wesley McKinney is one of the creators of Pandas. Here is his blog.
Mahmoud Hashemi
Author of boltons and a very cool logging framework called lithoxyl. Also, more recently: glom.
- Enterprise Software with Python
- The Packaging Gradient from PyBay2017
Harry J.W. Percival
Other
- Python Cookbook
- Python Programming Language
- Mastering Object-oriented Python - Using ChainMap for defaults and overrides
- Modern Python Cookbook
- Modern Python Solutions - Finding Configuration Files
- Modern Python Solutions - Making REST Requests Using urllib
More specific:
- REST APIs with Flask and Python
- Pandas Data Analysis with Python Fundamentals by Daniel Y. Chen.
Linux
If man
is getting you down, try a book instead. Soak in some extra
knowledge. Then read the
ArchWiki.
- How Linux Works
- Red Hat Certified System Administrator (RHCSA) with Virtual Machines, Second Edition
- The Cathedral & the Bazaar
- The Linux Command Line
- The Linux Programming Interface. A great book. Also recommended by Kenneth Reitz.
- UNIX and Linux System Administration Handbook
- Using Docker
Programming philosophy
- Code Complete
- The Pragmatic Programmer: From Journeyman to Master
- Pragmatic Thinking and Learning
- Clean Code
Operations and monitoring
I have not met anyone who has monitoring and alerting figured out. There is always some edge case that throw off all your dreams. Monitoring is tough!
- Effective Monitoring and Alerting
- Practical Monitoring
- Prometheus: Up & Running
- Site Reliability Engineering
- Splunk Operational Intelligence Cookbook
- The Art of Monitoring
- Web Operations
Other
- Code: The Hidden Language of Computer Hardware and Software
- Ultimate Go Programming
- Software Architecture Fundamentals Understanding the Basics
- Software Architecture Fundamentals, Second Edition
- Head First Statistics
- Practical Vim
- Modern Vim
- Regular Expressions Cookbook. Use this for fun overkill regex patterns that catch corner cases you’d never think of.
- Mastering Bitcoin by Andreas M. Antonopoulos.
Alternatives?
Perhaps an open source HTML epub reader? You miss out on the discoverability though.
Let me know if you have any suggestions or have done something similar.
Benefits
It’s in your browser. That’s also a downside. The browser becomes a better source of knowledge.
Downsides
O’Reilly can data mine everything you read.