Programming Leftovers
-
Python Design Patterns
I’m Brandon Rhodes (website, Twitter) and this is my evolving guide to design patterns in the Python programming language.
-
The Universe of Discourse : More notes on deriving Applicative from Monad
A year or two ago I wrote about what you do if you already have a Monad and you need to define an Applicative instance for it. This comes up in converting old code that predates the incorporation of Applicative into the language: it has these monad instance declarations, and newer compilers will refuse to compile them because you are no longer allowed to define a Monad instance for something that is not an Applicative. I complained that the compiler should be able to infer this automatically, but it does not.
My current job involves Haskell programming and I ran into this issue again in August, because I understood monads but at that point I was still shaky about applicatives. This is a rough edit of the notes I made at the time about how to define the Applicative instance if you already understand the Monad instance.
-
What's this search algorithm usually called?
Is the history of this algorithm lost in time, or do we know who first invented it, or at least wrote it down? I think it sometimes pops up in connection with coin-weighing puzzles.
-
Paper: 'EpiLPS: A fast and flexible Bayesian tool for estimation of the time-varying reproduction number' - Stats and R
A colleague (and friend) of mine recently published a research paper entitled “EpiLPS: A fast and flexible Bayesian tool for estimation of the time-varying reproduction number” in PLoS Computational Biology.
I am not in the habit of sharing research paper to which I did not contribute. Nevertheless, I would like to make an exception with this one because I strongly believe that the method developed in the paper deserves to be known, especially for anyone working in epidemiology.
Below is the motivation behind the article, as well as an illustration on simulated and real data (US hospitalization data). More information can be found in the paper and on the accompanying website.
-
RObservations #40 : Packaging My Route Map Code! Introducting mapBliss. - bensstats
Around last year I started blogging about Atlas.co and how its possible to imitate their product in R with a some readily available packages and the MapBox API. Recently I managed to take some time and refine and organize the code I had to make the package I call mapBliss.
I’m really happy with the package so far because it pretty much offers almost all the features for making the type of maps that you can find on Atlas.co and similar sites. In this blog I share some of the features available, basic usage and potential next steps for the development of the mapBliss package.
-
September 2022: "Top 40" New CRAN Packages
Two hundred and two new packages made it to CRAN in September. Here are my “Top 40” selections in fourteen categories: Computational Methods, Data, Genomics, Machine Learning, Mathematics, Medicine, Pharmacology, Psychology, Science, Social Science, Statistics, Time Series, Utilities, and Visualization.
[...]
kimfilter v1.0.0: Provides an Rcpp implementation of the multivariate Kim filter, which combines the Kalman and Hamilton filters for state probability inference. The filter is designed for state space models and can handle missing values and exogenous data in the observation and state equations. See Kim et al. (1999) for details and the vignette for examples.
SparseChol v0.1.1: Provides a C++ implementation of sparse LDL decomposition of symmetric matrices and solvers as described in Davis (2016). See README for an example.
-
Scrum, agility and the human factor | Mardy
I've been working in Scrum teams for 15 years now, give or take. Different companies, different approaches, from loosely following the agile principles to a stricter implementation of the Scrum methodology. The only invariant being that in practice Scrum is never followed by the book, but every company and team makes its own adaptations, which makes it hard for everyone to voice statements and critiques that could be considered universally true. That's why I will refrain from taking this road, and instead I'll try to point out a few aspects and behaviours that I've personally noticed during my career, good and bad ones (but of course, since I'm old and bitter, more bad than good).
Scrum's focus on communication is, in my opinion, where most of its value lies on: it's indeed important that other team members know what you are doing, and that management has an idea of the progress being made. Hence daily standups and the scrum board, and demos and retrospective at the end of each sprint.
It makes sense, on paper. And in practice as well, if you find yourself in a team which is not really a team but a group of individuals with communication problems. But that should not be the rule, and that's my main criticism of Scrum: it's a very good system for managing poorly skilled developers.
In a highly skilled team, all of the benefits that Scrum is supposed to bring are already a given: back in 2006-2008, in Nokia, most of our communication was occurring in IRC and mailing lists. The fact that some of our co-workers were remote indeed acted as a push for this choice. The same occurred in my early years at Canonical, where (at least in my team) we had a video conference only once per week: if the communication is already happening in an open (to the team members) place, there's no need for further synchronisation points. And if the managers and product owners are also monitoring these discussions, they know perfectly well how the situation is and can report it further up.
-
What “Work” Looks Like - Jim Nielsen’s Blog
I recently had a conversation with a long-time colleague, someone I know and respect. I found it interesting that even he, who has worked in software since the 90’s, still felt odd when he wasn’t at his computer “working”. After decades of experience, he knew and understood that the most meaningful conceptual progress he made on problems was always away from his computer: on a run, in the shower, laying in bed at night. That’s where the insight came. And yet, even after all these years, he still felt a strange obligation to be at his computer because that’s too often our the mental image of “working”.
-
Performance "Seasons" Are Useless — Use Anniversary Reviews Instead - Jacob Kaplan-Moss
I was catching up with a friend yesterday, an engineering manager. He vented for a bit about how swamped he is because he’s in the middle of “performance season”: he’s going to be spending the next few weeks writing performance reviews, reviewing them with his manager and with HR, delivering them to the team, and slogging his way through his organization’s terrible HRIS to record the reviews. And this heavy workload will be made more difficult by a big dose of emotional labor: even if every review is well-received, they’re still stressful to deliver.
-
A Flexible Framework for Effective Pair Programming — Culture (2022)
Pair programming is one of the most important tools we use while mentoring early talent in the Dev Degree program. It’s an agile software development technique where two people work together, either to share context, solve a problem, or learn from one another. Pairing builds technical and communication skills, encourages curiosity and creative problem-solving, and brings people closer together as teammates.
In my role as a Technical Educator, I’m focused on setting new interns joining the Dev Degree program up for success in their first 8 months at Shopify. Because pair programming is a method we use so frequently in onboarding, I saw an opportunity to streamline the process to make it more approachable for people who might not have experienced it before. I developed this framework during a live workshop I hosted at RenderATL. I hope it helps you structure your next pair programming session!
-
Getting Started to Rust Programming on Ubuntu
You might want to learn Rust on Ubuntu. Rust is a new computer programming language in the same categories as older ones namely C, C++ and Java. Using it, one can make programs for desktop, laptop, web and server as well as embedded computers. Created by Mozilla in 2010, Rust is now growing to be used to develop many critical software including some you use everyday, such as Firefox's Quantum engine, a FOSS remote desktop called RustDesk, and a new operating system called Redox OS. This tutorial will help you install required tools and write code in Rust. Don't worry to exercise as we also include uninstall steps too. What are you waiting for? Now let's try Rust for sure.