Programming Leftovers
-
Paweł Świątkowski ☛ Booleans Are a Trap
As developers, we love our booleans. They map perfectly into how computers work at a low level and play nicely with if statements, our primary control-flow tool. They are simple to reason about. What's not to like?
We actually like them so much that we use them for domain modeling. And that's where things get problematic. I would like to show you some examples of a mess we land in because of using booleans and to offer a better approach.
-
Dirk Eddelbuettel ☛ Dirk Eddelbuettel: inline 0.3.20: Mostly Maintenance
A new release of the inline package got to CRAN today marking the first release in three and half years. inline facilitates writing code in-line in simple string expressions or short files. The package was used quite extensively by Rcpp in the very early days before Rcpp Attributes arrived on the scene providing an even better alternative for its use cases. inline is still used by rstan and a number of other packages.
-
Python
-
Rlang ☛ Build a Python CLI with Click+Cookiecutter (repost)
In the spirit of Learning in Public, I wanted an excuse to explore (1) click for creating command line interfaces, (2) Cookiecutter project templates, and (3) modern tools in the Python packaging ecosystem. If you’re primarily an R developer like me, I recently wrote about resources for getting better at Python for R users.
-