/
31.12.2019 at 09:03 pm
Cuttings

I intended 2019 to be a 'sabbatical' year of sorts.

It turned out to be one of the most productive/scholarly years of my life. I learned, acquired or improved upon many new and old skills in 2019.

The following is a concise summary of my learning events in 2019. Note that the items are unordered, and the length of the description does not reflect the actual level of effort expended:

  1. Became better acquainted with Python's standard library. I now routinely use the more 'advanced' modules/concepts like itertools, collections, functools, threading, generators and decorators. I want to improve my knowledge of concurrency and parallelism and hope to fully grok Fluent Python by the end of 2020.

  2. Used and improved my knowledge of SQLite. I wrote several database-related tools in 2019; each time I either wrote straight SQL code, or code via an ORM like SQLAlchemy or a glue library like dataset. I fell in love with DataGrip and particularly Sublime Text's minimalist SQLTools package.

  3. Applied rigorous testing. I wrote extensive unit and integrated tests whenever I could. I discovered that I really like Pytest's Pythonic style and parametrization features over unittest's Java-like style and features.

  4. Applied debuggers for source-reading and debugging. Four years ago reading foreign code was intimidating. I could barely trace the flow of code, I ran print() /assert statements for everything, and I easily lost track of things the moment I had to jump between modules. I've improved a lot since then, but in 2019 I've discovered that reading source code can be especially fun with debuggers, especially when the debuggers are as powerful as those in WingIDE/PyCharm. Comprehension is much faster when you can see the state and types of objects immediately, and when you don't have to hold the entire code architecture in your head while jumping across implementations/declarations and figuring out usages, calls and results of expressions. Certain Python features have also made it a lot easier to predict object behaviour (e.g. the implementation of insertion-ordered dicts in Python 3.7 and type-hinting in Python 3.5) which makes debuggers and the debugging process a lot more enjoyable.

  5. Became intimate with my main IDEs. I own professional versions of both PyCharm and WingIDE Pro, and have owned licenses for several years. But it was only in 2019 that I spent entire days becoming intimately familiar with their features and quirks - I read virtually all available documentation, experimented with tons of configuration changes and features/limitations, made many personal customizations, filed bug reports (many of which were accepted, yay), etc. I now lean heavily towards PyCharm once things gets too much for Sublime Text, but I still break out WingIDE every so often because of its fantastic debugger. PyCharm's Jupyter integration is becoming significantly better with each iteration, and I'm starting to rely it more than on pure Jupyter when doing exploratory data work.

  6. Adopted software engineering best practices. I now write prototypes and think ahead before writing bigger apps - "What's the architecture here?", "What's the best data structure?", "Which are the tightly-coupled modules?", "Do I need to apply a design pattern?", "Does the code smell wrong?"? et cetera. I do this even with smaller scripts sometimes. I find that thinking ahead often produces coherent code, which saves a lot of time when I need to review or improve upon them.

  7. Enforced use of virtual environments. Some tools I write have annoyingly large external dependencies. Some are rather fickle with their dependencies too - e.g. WeasyPrint, which uses Cairo and Pango and GDK. These libraries have a real tendency to become unwieldy, or to break/introduce bugs across version updates, which can take down other software and require me to do bug fixing in the midst of legal work. I've since realized the benefits of virtual environments, and now maintain different environments for different code using Python's venv. This helps somewhat fossilize completed code into stone, and prevents it from becoming unusable with a particular module/interpreter version. I'm also lucky that I never went with Python 2, so I never had to worry about sunsetting issues with my own code.

  8. Read through the source code of many libraries. I began studying and copying the styles of the master coders who write libraries. I found deep comfort in realizing that some of the solutions I discovered independently were not inefficient, and that I solved problems exactly like how more advanced coders would solve them.

  9. Expanded my knowledge of regular expressions. Pattern matching is extremely useful for legal work, being a text-heavy profession. I was lucky to be using regex even before I could code well, but 2019 was the year that I really leapt into the 'fancier' stuff like lookahead/lookbehind expressions, backreferences, word boundaries, etc. This applied not just to code but also to Sublime Text's filtering and highlighting packages, which meant it was easier to isolate legal texts and precedents whenever I needed them.

  10. Adopted type hinting. Type hints helps PyCharm's static analysis a lot, and I've found it helpful for introspecting an object's state and usage in functions quickly.

  11. Applied PEP8 standards and code formatting tools more seriously. I've since adopted Black, for both Sublime Text and PyCharm. I love how deterministic Black is, but it's very opiniated. I sometimes hesitate from using it before I finalize code, as it can cause structural changes to code flow, and can disrupt work involving multiple selection cursors.

  12. Adopted Sublimerge for source/text comparison. Legal work involves a lot of text comparison - we often have to assess changes between document drafts, compare differences between evidence and cause papers (e.g. pleadings, affidavits), and do all sorts of reviews/analysis. There are potentially-serious consequences if you accidentally overlook things, so I argue that comparison/merging tools are actually mandatory for the modern lawyer. Unless I have reams of text to print out (for which I apply other specialized software) I've found Sublimerge very convenient; if something more programmatic is needed, I use Python's difflib module for character-level diffing - this has been practical enough to once expose an opponent's unethical attempt to modify the contents of sworn statements in an ongoing trial's Notes of Evidence.

  13. Became enamoured with the Unix philosophy. I spent a lot of time refactoring and decoupling old code to make them more pliant, on the basis of this main philosophy:

    ...simple, short, clear, modular, and extensible code that can be easily maintained and repurposed...

  14. Wrote a lot of software. Most code I write will never see the light of the day, as they're either one-shot tools or software written for such specific purposes that I have no time to simplify or adapt them for other people to use. Litigation is almost always a zero-sum game, and I also have doubts about releasing software that could inspire litigiousness and abuse of process if it falls into the wrong hands.

  15. Adopted text-to-speech practices. Your eyes tend to tire after you've been reading for hours. It becomes much harder to spot typos and mistakes. You may tend to skim until you've rested and returned with fresh eyes. However, your ears tend not to tire as quickly; at least I find that mine doesn't. Noticing this, I wrote a text-to-speech engine glue app, applying Google Cloud's API and WaveNet as the backend, to read out my legal documents for me. Wavenet's generative model produces rather lifelike English voices - it's close to hearing an advocate (a better-enunciating one than me) submit my own arguments to me. I've found this to be excellent for proofreading purposes. It also improves arguments, as I can actually hear how my arguments sound when spoken, and I can cull or amend those that are long, convoluted, weak, or unsyllogistic.

  16. Adopted version control for all legal documents. I've enforced this rule for myself, and since last year I've managed every single legal document I produce with Git and Sublime Merge. This has afforded me control not just over legal drafting work, but other aspects of legal practice.

  17. Convinced another lawyer to work with me via Github. He was appreciative of the benefits of version control software once he understood what you could do with it collaboratively. That's good enough for me. (He hasn't the skill or interest to manage the repository, which is fine.)

  18. Experimented with generative art. Spent two days experimenting with generative art via Processing and Python's turtle and graphic libraries. I write a lot of useful RNG-based tools for personal use - and procedural art is absolutely fascinating and something I want to study and play with in 2020.

  19. Experimented with Qt/PySide. The signals/slots system was confusing compared to Tkinter, but manageable once I got the idiom. I also found QT's GUI Designer and other features interesting and worthy of further exploration.

  20. Learned Flask. I initially wanted to release a web-app. I spent about a month writing only Flask-related code and buffing up on my server skills. Things got hectic, so I eventually decided to postpone the matter and move on to other things first.

  21. Explored C#. I installed Rider and spent half a day-experimenting with the IDE and C#'s ecosystem. In the end I decided to postpone the exploration, as I'd rather fully master Python and SQL first before I dabble in new languages.

  22. Experimented with Pandas and Numpy, and maths/statistics. I've advanced far enough in my data science studies that I was able to apply Pandas to produce an analysis in a working paper for a legal committee. My data science experiments also led me to statistical modelling and machine learning attempts - but in the end I found that my math/statistics fundamentals were so lacking that I couldn't proceed further without working on those first. Those will be my focus in 2020.

  23. Invested months into creating/drilling 1000 mnemonic pegs. I first took about a month creating 100 mnemonic pegs, but then decided to follow the path of the world memory champions and worked on creating 1000 pegs. It was (at least) 10 times the effort, and I didn't realize just how massive this undertaking was to be. Now that the ordeal's over, I'm thankful that I persevered. The returns will be immense over the next few decades, both to my personal life and professional workflow. Memorizing statutes, caselaw and other things will be easier. Through my efforts I also learned much about the science of human memory, which I've found intriguing and applicable to how I manage knowledge and prepare my Anki cards.

  24. Built a concepts deck in Anki. I hate unnecessary complexity. I like to reduce facts or arguments to the most simple unit of abstraction possible; this helps me better understand and learn them. After a lot of experimentation, I finalized two versatile note types in Anki - one note type has 20 fields, and 24 separate front-back card pairs; the other is cloze-based, and has 11 fields with one conditional aspect for reading-only cards. I've consolidated many of my Anki cards into either of these two note types. Prior to this my management and linking of knowledge was rather scattershot; these days I can drill or build up on my existing knowledge in a very systematic fashion, and I've begun noticing just how quickly I can retain and link new concepts and knowledge.

  25. Applied the Zettelkasten method. I take down a lot of notes in plain text. A brilliant and kind soul out there had written a package for Sublime Text in adoption of the Zettelkasten method, and I've been using it heavily after a period of adaptation. Coupled with the Silver Searcher, it's amazing just how fast I can read, connect, organize, archive and review my notes. For legal work I find Zettelkasten especially useful, as it avoids redundancy, enforces single source of truth, and promotes reuse (and precedents are already a big thing in our line of work). Being a package, it also ties in with my Sublime Text workflow, which means that I get the whole ecosystem of packages that expedite things, plus syntax highlighting, text formatting, regular expressions, macros, specific key binding, Text Pastry, etc.

  26. Explored Linux. I've always intended a Linux setup to be my main machine, because of the freedom it would give (and because there's only so much head-banging you can suffer with Windows' constant forced updates). I spent about a month solely on a Linux system, becoming familiar with the terminal and rewriting tools to suit. I eventually decided to revert back to Windows as my main machine; too many people around me relied on Windows, and there was too much software I was accustomed to in Windows for work/productivity that were non-existent in Linux or which I had to re-engineer or customize to get them working, which took me away from other important things. In summary: I dislike fighting to get my tools to work. At this juncture the time spent to migrate is not yet worth it; maybe someday.

  27. Read many books. I read so many books in 2019 that I can't even count them without going through my time tracker and receipts. I spent thousands on book purchases alone, and used up most of my time on technical or scientific books. I consciously avoided fiction books. I made sure to finish all technical books and do all their exercises, which has turned out to be very helpful in furthering my understanding.

  28. Learned colour theory, the use of light/values, anatomy, perspective, and genre/stylistic differences. I spent a few cumulative weeks in various artistic areas, either learning or experimenting. I've never properly observed/practiced the arts before; now that I have, I've discovered a fondness for technical drawing and sharp line work, and would like to get into this area more.

  29. Improved skills with design/graphic tools. I now use Affinity Photo, Affinity Designer and Leonardo for both personal and professional work constantly. This has had interesting side effects:

    1. My professional work is now often visual. This is somewhat unusual for lawyers as we're generally reliant on text for, well, everything (except branding, marketing and primary evidence, I suppose). I've had clients and judges commend or thank me for my charts, graphs and illustrations, so I know that I'm doing something right. I think more lawyers should pick up basic graphic design skills - to draw something in a concise explanatory fashion often forces you to think syllogistically. I find that drawing also often reveals the persuasiveness of arguments, or the fallacies inherent in them - which are both desirable outcomes in court work.

    2. I now first sketch out legal strategies in drawing apps or via engineering-style branching flowcharts before I commit any legal advice or strategy to writing. This overview approach allows me to plan out litigation moves months or even years ahead (which leaves me rarely surprised) and to give branching options to clients (which seems to make them happier).

  30. Reverted to Breevy from PhraseExpander. I find the latter software overpriced, and I've serious doubts about security given its hooks on Windows' API and the snooping that the developer does and gives notification about. More importantly, PhraseExpander slows down my machines, which I've tested across at least 3 machines. My main issue when first moving to Breevy was the qualify-of-life features that were missing (particularly predictive multiple-choice suggestions), but I was able to reverse-engineer a similar feature using Python's Tkinter, FuzzyWuzzy, a fuzzy string matching library and some simple importance-weighting mechanisms.

  31. Improved my language-glossing app. I'm keen on becoming a polyglot. In 2018 I wrote a sentence-glossing app - which does some heavy tokenization/parsing behind the scenes against an SQLite database with exported EPWING dictionaries and against NLP features via NLTK. The glosser either outputs dictionary data or statistical analysis as I pore through Japanese or French text. In 2019 I tied the script into Breevy. All this has improved my Japanese reading abilities, increased motivation, made reading practice more efficient, and allowed me to have a concrete handle on my actual abilities rather than allowing me to falsely assume how competent I am.

  32. Learned 20,000 new Japanese words. I'm already college-level in terms of Japanese reading abilities. My goal in 2019 was to allow me to read specialised/advanced Japanese texts, which requires a larger working vocabulary. I worked hard and achieved it. (Sadly, my speaking ability remains lacking. I'll be improving on my speaking abilities in 2020.)

  33. Studied music theory. In 2019 I mostly focused on three things musically - chord construction, guitar fretboard mastery and intervallic studies. The last one particularly ties in with my newfound interest in composition. I learned quite a lot, but the time I spent on other things caused my repertoire knowledge to deteriorate, and left me very little for actual practice. In 2020, I want to get back to actually playing guitar, and playing it well. I'd like to get into jazz fusion this year if possible; jazz harmony may be a bit too advanced, but I'll pack it in if I have the time.

  34. Studied orchestral composition. I got into orchestral works composition (and de-composition) in 2019. I've always liked orchestral music, but never really got to understanding them until I spent some time this year purchasing, experimenting with and learning from various orchestral libraries, VSTs, and courses. I discovered I was biting off way more than I could chew, so I decided to postpone the exploration to 2020.

  35. Practiced sightreading. I've never been much of a sightreader. I'm not sure that I'll ever be (or want to be) a fluent one. But regardless, being able to read sheet music is an attractive skill to have, and useful in expanding repertoire, so I decided to try harder in 2019. I practiced sightreading using guitar, violin and saxophone books since they're all in the treble clef. I enjoyed the sessions, and look forward to practising more.

  36. Experimented with digital painting, drawing and photobashing. I love concept art, and landscape/environment paintings, and would like to create them someday. I spent many days improving my painting, vector, photobashing and photo-manipulation skills. All I discovered was just how little I know and how much I still had to learn.

  37. Experimented with 3D rendering and digital sculpting. I spent more than a weekend learning and practising with Blender 2.8. It was a good experience, but I've since decided that I've no interest or utility in the area.

  38. Improved sleeping habits. I began sleeping and waking-up earlier and more consistently. This has had significant boosts to my attention and energy levels.

  39. Lost 10kgs. Mostly through strict intermittent fasting in the early parts of the year, and controlled consumption in the latter part.

  40. Music. Got into synthwave, Japanese city-pop and various new prog metal bands. I'm still a bit hesitant on the neo-soul guitar movement, but it's not too bad.

  41. Acquired a love for Star Trek. I've never really been into Star Wars, and I think this Reddit comment explains the difference well:

    "...its episodic nature, its extended dialogue, its makeshift special effects - were exactly what made it special. Star Wars was a flashback to the swashbuckling era of science fiction, while Star Trek reflected the more intellectual turn the genre had taken in its Golden Age..."

  42. Animation. Explored creating 2D animation. Discovered that I have no interest in it.

  43. Video production. Explored this, and discovered that I have no interest in editing or producing videos.

Reflections on 2019

There just isn't enough time in the world to do everything. You need to prioritize. Realizing this, I better curated my priorities; after weighing the items considerably, I postponed less-important goals to 2020, and entirely abandoned those goals I found irrelevant or without utility.

All in all, I was steadfast to most of my resolutions in 2019. I failed my goals in various areas (i.e. most of my fitness goals, my musical goals, and explanatory legal writing goals), but I'm happy with what I managed to achieve notwithstanding that work kept getting in the way. I kept extensive time-tracking records, so I know that I was transparent.


Filed under:
#
#
#
#
#
Words: 3423 words approx.
Time to read: 13.69 mins (at 250 wpm)
Keywords:
, , , , , , , , ,

Other suggested posts

  1. 11.06.2022 at 09:09 pm / 大蛇に嫁いだ娘 - The Girl Married to the Giant Serpent
  2. 03.07.2021 at 10:31 am / Learning Forever
  3. 21.08.2018 at 10:59 am / Roses as Time
  4. 16.10.2015 at 12:00 am / Statements Without Data
  5. 12.07.2015 at 12:00 am / José Mujica's Humility
  6. 14.06.2015 at 12:00 am / Just the Two of Us (6-Bar Guitar/Sax Copy)
  7. 18.05.2015 at 12:00 am / Indian Judicial Writing
  8. 10.12.2013 at 12:00 am / Yellow Rails
  9. 22.04.2012 at 12:00 am / Ludicrous Ace
  10. 21.04.2012 at 12:00 am / Cinematic Mass Effect
© Wan Zafran. See disclaimer.