My ProgrammingLearning Org-ModeConfiguration Corner ] Toggle Dark Theme

I’m slowly trying to get back into programming after years of inactivity (i dropped out of university after a breakdown, and didn’t do anything for a while). I doubt i’ll ever be employed at this as most tech jobs are never publicly advertised and personal networking is not my thing, but it’s still a useful skill and something i used to enjoy.

# Web pages

2D Progress Charts Generates printable diagrams of square-shaped folded up progress bars you can use to track your progress when reading difficult books.

Image Grid Overlays I’m trying to learn digital painting by copying photographs.

# Firefox Extensions

(I still use Firefox because Google Chrome can’t yet simply show your tabs bar vertically, which is essential for me. See also.)

Metafilter in-page favourites viewer Trivial practice extension, adds the ability to see who favourited a Metafilter comment without leaving the page.

Browser personal activity tracker Like RescueTime but much more detailed, and can cope with multiple windows open at once, and doesn’t send your data to the clown but to a folder on your own machine.

Before this extension will work you need to run a Python script to tell Firefox where to store your activity logs.

I haven’t yet written a thing to display analyses of your browsing history, but collecting the info is the first step...

# Python scripts

FTP upload if newer Connects to your web host, recursively scans the directory it’s invoked from, and uploads files and directories which are newer than those on the server. It never deletes anything but may overwrite stuff. It’s used to update the static parts of this very site after they’re generated from markdown files and m4 macros by a Makefile!

To practice scraping web pages, I’ve written:

DnD podcast episode downloader Downloads 15 episodes at a time of the Drunks and Dragons podcast. Had to use the Selenium programmatically controlled browser to render the audio player and discover the download links.

O'Reilly Open Book retriever These free ebooks come with each chapter as a separate .pdf, so this downloads them all into an appropriately named subdirectory.

Library loans list Logs in to the LibrariesWest website, retrieves your list of loaned books, can optionally mark when they’re due back on your emacs calendar. Can also keep track of every book you’ve ever borrowed and when.

In Our Time downloader Downloads ten episodes at a time of this old BBC Radio 4 show. After writing this i noticed they have an alphabetic index which might have been better to use but oh well.

Youtube video grid to text list Turns a Youtube channel’s video archive grid page into a more readable text list format (as the video titles are not truncated after two short lines).

# Bash scripts

Tiny convenience scripts which Linux and Mac users can right-click → "Save Link As...", chmod +x script_name , then put in a directory listed in their PATH environment variable.
These are mostly to save me from having to remember command line flags, or having to do the same things over and over.

makeclass Creates a C++ header file and class file pair in the current directory, named for the first argument the script is called with, and opens both in Sublime Text.

renameclass Uses grep and sed to search and replace strings in source files, and renames .cpp and .h files if present. Stuff any IDE can do.

e Opens the argument in emacs and returns immediately; inspired by this article’s wise comment

You should periodically examine your frequently used commands, and find ways to execute them quickly. In many cases, a one-letter alias (e.g. e for emacs) is surprisingly effective..

You also need to put the function call (server-start) somewhere in your ~/.emacs file.

epubextractor This sort of ebook is just zipped HTML files, which on a computer i prefer to read in a browser instead of an e-reader app which pointlessly paginates the text. They’re not in a directory with in the zip file though, so this script makes one based on the name of the .epub file.