diff --git a/_posts/2021-10-25-two-years-in-linux.md b/_posts/2021-10-25-two-years-in-linux.md
index 3ff25b9..796461d 100644
--- a/_posts/2021-10-25-two-years-in-linux.md
+++ b/_posts/2021-10-25-two-years-in-linux.md
@@ -11,9 +11,9 @@ redirect_from:
## Interactions with other operating systems
Since my childhood, I used many versions of Microsoft Windows. When I went to
-college I didn't have much money, so I bought a cheap windows laptop which did
+college I didn't have much money, so I bought a cheap Windows laptop which did
the job. I have screwed it up by spilling beer on it, which resulted in a fried
-logicboard and me nearly losing my college assignment work. This was a great
+logic board and me nearly losing my college assignment work. This was a great
opportunity to build a much better spec PC, so I bought all the components and
built my first computer, which in theory was able to run macOS (and become a
hackintosh) - though that happened much later. I installed Windows 10 on it and
@@ -25,25 +25,25 @@ concerns expressed by other people on the Internet around the time when Windows
Around that time I also bought my first iPhone and I immediately fell in love
with it. I decided to try out one of the iMacs in the university library and I
-decided to give a hackintosh route a try. Somehow I managed to get it installed
-and I could tell that macOS was much more polished that Windows, which made me
-not want to touch Windows ever again. I also bought a MacBook which I still
-regard as a great machine.
+decided to give the hackintosh route a try. Somehow I managed to get it
+installed and I could tell that macOS was much more polished than Windows, which
+made me not want to touch Windows ever again. I also bought a MacBook which I
+still regard as a great machine.
### My gripes with macOS
I think macOS is a great OS for an *average* user. It gets unnecessarily
complicated any time you want more control, or you want to do something your way
instead of the Apple way of doing things. Because macOS doesn't come with any
-package manager, you need to rely on very slow [homebrew][1] package manager.
-Everything you download and want to install needs to be approved time after
-time. There is also no easy way to bootstrap your development environment easily
+package manager, you need to rely on the very slow [Homebrew][1] package
+manager. Everything you download and want to install needs to be approved time
+after time. There is also no easy way to bootstrap your development environment
(tweaking system settings on a new machine etc.). To give an example, one week
-ago my girlfriend asked me to help her install LaTex on her macbook. I thought
-installing it via hombrew will all that's needed. Turns out that once you
+ago my girlfriend asked me to help her install LaTeX on her MacBook. I thought
+installing it via Homebrew would be all that's needed. Turns out that once you
install it, you need to add it to path manually, which didn't work in my case,
-and I had to install it by downloading MiKTeX distribution from a website, which
-solved a problem. And of course any installed that you download form the
+and I had to install it by downloading the MiKTeX distribution from a website,
+which solved the problem. And of course any installer that you download from the
internet is treated as if it was a high security risk that requires you to
confirm that you want to open that file.
@@ -53,23 +53,24 @@ I think I started getting more and more intrigued by using Linux when I picked
up web development. I decided to look at different distributions and pick one to
run on my old laptop; I remember trying out [Ubuntu][2], but I really didn't
like GNOME desktop environment, so I decided to give [Linux Mint][3] a try.
-Although my laptop was fairly old and it only had 4GB RAM, it works surprisingly
-fast. All the tools I needed worked like on any other OS, so I decided to start
-install it on my hackintosh and dualboot alongside macOS. For that task I picked
-up [Majaro][4] with [KDE desktop environment][5]. I liked it so much so that
-each time I had to choose between macOS and Linux, I'd go for the latter. About
-a year ago I build a new PC exclusively for Linux so I can do all data science
-projects I want on it. Right now I'm running [Arch Linux][6], which is a very
-minimalist distribution. I will discuss my choice in future posts. After using
-it full-time for about a year here's what I do and don't like about.
+Although my laptop was fairly old and it only had 4GB RAM, it worked
+surprisingly fast. All the tools I needed worked like on any other OS, so I
+decided to start install it on my hackintosh and dualboot alongside macOS. For
+that task I picked up [Manjaro][4] with [KDE desktop environment][5]. I liked it
+so much that each time I had to choose between macOS and Linux, I'd go for the
+latter. About a year ago I built a new PC exclusively for Linux so I can do all
+data science projects I want on it. Right now I'm running [Arch Linux][6], which
+is a very minimalist distribution. I will discuss my choice in future posts.
+After using it full-time for about a year here's what I do and don't like about
+it.
## The good
-Linux is the best operating machine for software development. Due to having a
+Linux is the best operating system for software development. Due to having a
robust package manager built into a distribution, you can easily get the
software you need and manage your updates. Some of the best development tools
were written with UNIX machines in mind, so programs like Emacs work much better
-that they do on Windows or macOS. Some other applications like Docker were
+than they do on Windows or macOS. Some other applications like Docker were
written on and for Linux specifically, so everything works much better here.
I like the fact that there is so much variety when it comes to different desktop
@@ -86,18 +87,19 @@ whatever you like with your system. Linux won't start calling home all of a
sudden and even if it did, people would be able to notice this and remove that
part when compiling a kernel.
-Lastly, Linux doesn't suffer from all malware and viruses that are created for
-Windows, so your environment is much safer.
+Lastly, Linux doesn't suffer from all the malware and viruses that are created
+for Windows, so your environment is much safer.
## The bad
The only drawback that I experienced from using Linux day-to-day is the fact
that big proprietary applications such as MS Office and Adobe aren't available.
This is not an issue with the operating system itself but people and many
-industries are used to certain type of workflows. My dayjob relies heavily on
-MS365 and it would be difficult to do some of that work on Linux. There are free
-an open source alternatives, but it takes time and effort to sway large
-organizations to start using these, especially if all they know is Windows.
+industries are used to certain type of workflows. My day job relies heavily on
+Microsoft 365 and it would be difficult to do some of that work on Linux. There
+are free and open source alternatives, but it takes time and effort to sway
+large organizations to start using these, especially if all they know is
+Windows.
I also realize that although some distributions are very easy to use as someone
who knows nothing about computers, it still might be difficult to solve some
@@ -111,8 +113,8 @@ on Linux, or issues with it. Because most distributions rely on Xorg, a very old
display server created a long time before 4K monitors were commonplace, it's
difficult to implement HiDPI scaling correctly. This is also exacerbated by the
fact that there are 2 types of GUI applications on Linux: Qt and GTK and both
-work slightly different, so some applications require some tweaking to get them
-to scale. Xorg also doesn't allow different scaling factors on multiple
+work slightly differently, so some applications require some tweaking to get
+them to scale. Xorg also doesn't allow different scaling factors on multiple
displays, so you need to either go full in with multiple HiDPI displays or stay
with standard monitors. To combat these issues, an alternative and potential
successor is being developed, but that also doesn't solve fractional scaling
@@ -120,12 +122,12 @@ problems among other things.
## Epilogue
-Concluding, I'm very happy that I made a switch to Linux. I can definitely say
+Concluding, I'm very happy that I made the switch to Linux. I can definitely say
that my productivity as a developer increased and I feel that my privacy is
being respected. Even though it isn't perfect, I think that everything in life
is a matter of compromise. On this occasion, I'm ready to compromise the visual
prettiness and access to proprietary software in favor of a highly functioning
-operating system that makes my life easier. In the future blogpost I will
+operating system that makes my life easier. In a future blog post I will
outline my desk setup and specific software I use, so stay tuned for that one.
[1]:
diff --git a/_posts/2022-04-23-r-native-placeholder.md b/_posts/2022-04-23-r-native-placeholder.md
index 8761e6c..57165d5 100644
--- a/_posts/2022-04-23-r-native-placeholder.md
+++ b/_posts/2022-04-23-r-native-placeholder.md
@@ -8,7 +8,7 @@ redirect_from:
- /general/2022/04/23/r-native-placeholder.html
---
-Yesterday (that is on April 22, 2022) R 4.2.0 was released and among
+Yesterday (that is, on April 22, 2022) R 4.2.0 was released and among
other things, this release brought major improvements when using the
native pipe operator (`|>`).
@@ -18,11 +18,11 @@ You might be wondering: what is the native pipe anyways? Well, it's the
base equivalent of `%>%` pipe from the `magrittr` package, heavily
endorsed and used across `tidyverse` packages. It pipes a value forward
into an expression or function call. This practice is common in other
-programming bd languages like F# or Elixir. Using pipes compared to
+programming languages like F# or Elixir. Using pipes compared to
regular nesting of functions within each other allows for more readable
code, since each step is presented in chronological order. Nested
functions need to be read from the inside out to figure out what was the
-fist function used. Consider this example:
+first function used. Consider this example:
``` r
library(tidyverse, warn.conflicts = FALSE)
@@ -44,8 +44,8 @@ Hornet Sportabout 19 8 360 175
Valiant 18 6 225 105
```
-By only using three functions it's not easy to find go from the inside
-out to find out where you started and where are you going with functions
+By only using three functions it's not easy to go from the inside
+out to find where you started and where you are going with functions
applied. Pipes make it much easier.
``` r
@@ -112,7 +112,7 @@ mtcars |> lm(mpg ~ cyl, data = .)
Error in is.data.frame(data) : object '.' not found
```
-One way to go around this problem was to write an anonymous function
+One way to get around this problem was to write an anonymous function.
``` r
mtcars |> {\(df) lm(mpg ~ cyl, data = df)}()
@@ -120,18 +120,18 @@ mtcars |> {\(df) lm(mpg ~ cyl, data = df)}()
You can see that this is not as elegant or easy when compared to a
simple `.`. This is why this release of R introduces the `_` placeholder
-for handle with this problem.
+to handle this problem.
``` r
mtcars |> lm(mpg ~ cyl, data = _)
```
-One thing that is different than the `.` placeholder is the fact that
+One thing that is different from the `.` placeholder is the fact that
you need to pass the name of the argument that will receive the `_`
placeholder, therefore syntax like `mtcars |> lm(mpg ~ cyl, _)` won't be
valid.
I really like the new `_` placeholder and I will continue using the
native pipe. I hope that some tidyverse functions will adapt to this so
-there's no need to return to margittr pipe in situations where base pipe
+there's no need to return to magrittr pipe in situations where base pipe
and `_` placeholder don't work.
diff --git a/_posts/2024-03-10-split-keyboard.md b/_posts/2024-03-10-split-keyboard.md
index 5c421d9..3dd9a81 100644
--- a/_posts/2024-03-10-split-keyboard.md
+++ b/_posts/2024-03-10-split-keyboard.md
@@ -32,27 +32,27 @@ go to the office and to be able to utilize the programmability of these
keyboards, so I can assign keys how I like. I decided that I wanted to build my
own split keyboard, and I started to look for information on how to do it. My
research concluded that there were 3 options which would be ideal for me:
-[Lilly58][1], [Corne][2], and the [Cantor][3]. I decided to go with the Cantor
+[Lily58][1], [Corne][2], and the [Cantor][3]. I decided to go with the Cantor
because it was the cheapest overall and required the least amount of parts.
The Cantor is a 40% split keyboard with 42 keys. It was inspired by Corne and
other similar keyboards, but it has a stronger column stagger which is useful
-for those with larger hands, like mine.It is a very simple keyboard and it was
+for those with larger hands, like mine. It is a very simple keyboard and it was
designed like that on purpose to keep the price low and the assembly process
simple.
## Hardware
-The Cantor repo on Github contains all information you need. Almost every part
-with the exception of the PCB can be bought from Aliexpress. The PCB can be
+The Cantor repo on GitHub contains all the information you need. Almost every
+part with the exception of the PCB can be bought from AliExpress. The PCB can be
ordered from either JLCPCB or PCBWay. I ordered mine from JLCPCB and it cost me
-£16.47 for 5 PCBs. All parts cost me £80.61, but the the price per one assembled
-keyboard was around b£66. Some of these parts are sold in lots, so you are left
+£16.47 for 5 PCBs. All parts cost me £80.61, but the price per assembled
+keyboard was around £66. Some of these parts are sold in lots, so you are left
with a few spare ones, but there is no other way of getting around this, unless
-you order a DIY kit from vendors who sell those. Ordering parts from Aliexpress
+you order a DIY kit from vendors who sell those. Ordering parts from AliExpress
is still a cheaper way to buy them compared to those kits! I wanted to try
building one keyboard and perhaps in the future experiment with more, so I went
-this route. There are however vendors who sell pre-assembled keyboards, so if
+this route. There are, however, vendors who sell pre-assembled keyboards, so if
you do not mind paying extra for this service, this is a good way to check if
this sort of keyboard is for you. Here is a table with the parts and their
prices:
@@ -63,7 +63,7 @@ prices:
| STM32F401 Blackpill Controller | 2 | 2 | 6.96 | 6.96 |
| TRRS Cable | 1 | 1 | 3.92 | 3.92 |
| TRRS Port | 10 | 2 | 2.61 | 0.522 |
-| Khail Choc Brown Key Switches | 50 | 42 | 26.3 | 22.092 |
+| Kailh Choc Brown Key Switches | 50 | 42 | 26.3 | 22.092 |
| PBT keycaps | 50 | 42 | 22.43 | 18.8412 |
| 6mm x 2mm rubber feet | 100 | 16 | 2.15 | 0.344 |
| Soldering kit (soldering iron, soldering silicone mat, solder) | 1 | 1 | 6.77 | 6.77 |
@@ -73,18 +73,18 @@ prices:
### Soldering
-Unlike all keyboards that you can buy from a store, the Cantor is a DIY, so you
-need to be comfortable with soldering, or you need to learn how to do it. I had
-never soldered before, so I had to learn how to do it. I watched a few videos on
-youtube and I thought that it isn't that complicated. If you are in the same,
-position like I am, I would recommend you to buy a soldering kit which contains
-thin solder wire 0.5mm or thinner. Anything thicker and it will be difficult to
-contain how much solder you put and you can end up ruining your PCB or other
-parts. I also recommend you to buy a silicone mat and a magnifying glass. The
-mat will stop you from burning your table and the magnifying glass will help you
-to see what you are doing. I didn't buy a magnifying glass and I regret it.
-After staring at tiny PCB elements for a couple of hours my eyes were tired and
-I was beginning to make mistakes by trying to finish the job quickly.
+Unlike all keyboards that you can buy from a store, the Cantor is a DIY board,
+so you need to be comfortable with soldering, or you need to learn how to do it.
+I had never soldered before, so I had to learn how to do it. I watched a few
+videos on YouTube and I thought that it isn't that complicated. If you are in
+the same position as I was, I would recommend you to buy a soldering kit which
+contains thin solder wire 0.5mm or thinner. Anything thicker and it will be
+difficult to contain how much solder you put and you can end up ruining your PCB
+or other parts. I also recommend you to buy a silicone mat and a magnifying
+glass. The mat will stop you from burning your table and the magnifying glass
+will help you to see what you are doing. I didn't buy a magnifying glass and I
+regret it. After staring at tiny PCB elements for a couple of hours my eyes were
+tired and I was beginning to make mistakes by trying to finish the job quickly.
The entire build process took me about 6 hours. Fortunately, Cantor's build
guide is very straightforward and easy to follow. Once you do one part, the
@@ -111,10 +111,10 @@ and run the following make command after plugging the controller into your
computer:
```bash
- make cantor:vial:flash
+make cantor:vial:flash
```
-Remember to repeat this process for the other side of they keyboard on the other
+Remember to repeat this process for the other side of the keyboard on the other
controller.
If you are not on Linux, you can use the GUI to flash the firmware. Download the
@@ -125,11 +125,11 @@ these binaries weren't tampered with, so use your own judgement.
## Software
Once you have done this, you can plug the controller which will be the master
-into your computer and use the GUI or a chromium-based browser
+into your computer and use the GUI or a Chromium-based browser
[configurator][11] to configure your layout.
-After few trials and errors, I ended up with a layout that I was happy with. It
-looks like this (each picture is a different layer):
+After a few trials and errors, I ended up with a layout that I was happy with.
+It looks like this (each picture is a different layer):
{: loading="lazy" }
@@ -144,9 +144,9 @@ looks like this (each picture is a different layer):
When I started using the Cantor I could not touch type. Being used to a standard
keyboard layout, I was making a lot of mistakes and I was very slow. Even with a
layout printed out and placed in front of me, I was still making mistakes. I
-decided to improve my typing by practicing. Firstly, I stared doing exercises on
-[keybr.com][12], which would teach me to type common word combinations. Once I
-spent few weeks doing those for 30 minutes a day, I decided to move to
+decided to improve my typing by practicing. Firstly, I started doing exercises
+on [keybr.com][12], which would teach me to type common word combinations. Once
+I spent a few weeks doing those for 30 minutes a day, I decided to move to
exercising by typing words out. I found a website called [monkey-type][13]. I
set my settings to typing 50 random words and I started to type. I did this for
a few weeks and I noticed that I was getting better. I was making less mistakes
@@ -172,17 +172,17 @@ is great. There are a few things that I would change if I were to build another
keyboard. I would use a different color of switches, because the brown ones are
not light enough. I had to lube them which was time consuming and although it
improved them by a lot, they still feel a little too heavy. I learnt my lesson
-and bought a switch tester, and decided that pink/gChoc switches are the best
-for me. I would also invest in a plastic case to cover the PCB. I did not do it
-to save money but I can see that dust collects on controllers and it difficult
-to remove if it gets between solder points which are too close together to use a
-brush or blow the dust with a can of compressed air.
-
-These minor issues aside, I am very happy with a switch to a 40% keyboard and I
-don't see myself getting much larger one in the future. I also think I won't be
-going back to a traditional keyboard. If you are thinking about getting a split
-keyboard, I would recommend you to do it. It is a fun project and it is very
-rewarding.
+and bought a switch tester, and decided that pink Choc and gChoc switches are
+the best for me. I would also invest in a plastic case to cover the PCB. I did
+not do it to save money but I can see that dust collects on controllers and it
+is difficult to remove if it gets between solder points which are too close
+together to use a brush or blow the dust with a can of compressed air.
+
+These minor issues aside, I am very happy with the switch to a 40% keyboard and
+I don't see myself getting a much larger one in the future. I also think I won't
+be going back to a traditional keyboard. If you are thinking about getting a
+split keyboard, I would recommend you to do it. It is a fun project and it is
+very rewarding.
[1]:
[2]:
diff --git a/_posts/2024-03-15-cpp-notebooks-org-mode.md b/_posts/2024-03-15-cpp-notebooks-org-mode.md
index 55b4c1b..016454c 100644
--- a/_posts/2024-03-15-cpp-notebooks-org-mode.md
+++ b/_posts/2024-03-15-cpp-notebooks-org-mode.md
@@ -8,7 +8,7 @@ description: "Writing C++ documentation as executable notebooks in Emacs Org mod
I recently had to write some documentation for people who are not familiar with
C++ but know other programming languages and understand the basics of working
-inside notebooks. I thought to myself that org mode could be a good tool for
+inside notebooks. I thought to myself that Org mode could be a good tool for
this, as it can compile the code and put the output right next to it in an HTML
or PDF format.
@@ -21,13 +21,13 @@ maintaining TODO lists, planning projects, and authoring documents with a fast
and effective plain-text system. It is also an authoring system with unique
support for literate programming and reproducible research. It is a simple
markup language that can be exported to HTML, PDF, and other formats. It is a
-much more powerful version of markdown.
+much more powerful version of Markdown.
## How to use Org Mode's C++ code blocks
-This article would be too long if I were to explain all the features of org
+This article would be too long if I were to explain all the features of Org
mode, how to set it up, and how to use it. Instead, I will focus on how to use
-org mode to write C++ code blocks and export them to HTML or PDF. For a beginner
+Org mode to write C++ code blocks and export them to HTML or PDF. For a beginner
friendly setup, try [Doom Emacs][3]. It is a pre-configured version of Emacs.
Org mode, similar to Jupyter notebooks, allows you to write code blocks in the
@@ -44,27 +44,27 @@ int main() {
#+END_SRC
```
-The block will be compiles and executed when you press `C-c C-c` on the block.
-The `:results output` part tells org mode to display the output of the code
+The block will be compiled and executed when you press `C-c C-c` on the block.
+The `:results output` part tells Org mode to display the output of the code
block. The output will be displayed below the block.
```shell
Hello, World!
```
-Other than `:results output`, you can also use add many [other options][4] to
+Other than `:results output`, you can also add many [other options][4] to
the block. For example, you can add specific compiler flags, include paths, and
libraries. You can also use the `:exports` option to control if the block should
be exported to the final document.
-When it comes to writing documentation, org mode is a very powerful tool. In
-addition C++ code blocks, you can add most if not all programming languages to
-the document. It also supports LaTeX, so you can write mathematical equations in
-the document.
+When it comes to writing documentation, Org mode is a very powerful tool. In
+addition to C++ code blocks, you can add most if not all programming languages
+to the document. It also supports LaTeX, so you can write mathematical equations
+in the document.
I am going to use it to show simple or not so simple C++ functions and describe
them in more detail, so it is easier for people to understand. I think for this
-tasks, it would be difficult to find another tool which is as easy to use as org
+task, it would be difficult to find another tool which is as easy to use as Org
mode.
[1]: https://orgmode.org/
diff --git a/_posts/2024-04-13-firefox-customization.md b/_posts/2024-04-13-firefox-customization.md
index f60bb39..65b345e 100644
--- a/_posts/2024-04-13-firefox-customization.md
+++ b/_posts/2024-04-13-firefox-customization.md
@@ -8,12 +8,12 @@ redirect_from:
- /general/2024/04/13/firefox-customization.html
---
-## Firefox's popularity around 2010's
+## Firefox's popularity in the 2010s
When I was growing up, Firefox was the browser to use. It was the most popular
-browser (at lest in Poland), with a market share above 50%. It was fast, secure,
-and customizable. It was the browser that you could trust. It was the browser
-that you could make your own.
+browser (at least in Poland), with a market share above 50%. It was fast,
+secure, and customizable. It was the browser that you could trust. It was the
+browser that you could make your own.
Fast forward to 2024, and Firefox's usage has been declining for years and years
and its users are often seen as a dying breed. But I still use Firefox as my
@@ -35,14 +35,14 @@ Firefox has a hidden configuration menu called `about:config` that allows you to
change a lot of settings that are not available in the regular settings menu.
Once these settings are changed, they are saved in a file called `prefs.js` in
your profile directory. This file is a simple JavaScript file that you can edit
-manually if you want to. If you have a firefox account, it also syncs these
+manually if you want to. If you have a Firefox account, it also syncs these
settings across all your devices. These settings allow you to increase your
privacy and security.
### userChrome.css
-If you want to change the way Firefox looks, and I mean if you don't like any
-elements of the UI, you can use `userChrome.css` file. This file allows you to
+If you want to change the way Firefox looks, and I mean if you don't like some
+elements of the UI, you can use a `userChrome.css` file. This file allows you to
change the appearance of Firefox's UI using CSS. You can change the colors, the
fonts, the sizes, the positions, and the visibility of almost every element of
the UI. You can make Firefox look exactly the way you want it to. You can make
@@ -52,15 +52,15 @@ I use a dynamic tiling window manager, so for many years I had a custom
`userChrome.css` that removed the title bar as well as the tab view (I opt for
vertical tabs which I'll get to later on).
-If you search on github, you can find many `userChrome.css` projects with
-thousands of stars. Lately, I've stumbled upon [Lepton][1]. This projects aims to make
-the Firefox UI more minimalistic and modern. It's a great starting point. I only
-removed the title bar and the tab view from it.
+If you search on GitHub, you can find many `userChrome.css` projects with
+thousands of stars. Lately, I've stumbled upon [Lepton][1]. This project aims to
+make the Firefox UI more minimalistic and modern. It's a great starting point. I
+only removed the title bar and the tab view from it.
Speaking of using window managers, Firefox has this annoying feature where the
settings and right click menus show an ugly border around them. To fix this, you
-need to add the following to your picom config (assuming you're using X11 based
-window manager and picom as a compositor):
+need to add the following to your picom config (assuming you're using an
+X11-based window manager and picom as a compositor):
```bash
shadow-exclude = [
@@ -104,9 +104,9 @@ which is easier on the eyes in dark environments. For spell checking I use
[LanguageTool][11], which is a grammar and spell checker that works in multiple
languages.
-#### Youtube
+#### YouTube
- To limit my usage of YouTube, I use [SponsorBlock][12] to skip sponsored
+To limit my usage of YouTube, I use [SponsorBlock][12] to skip sponsored
segments in videos. I also use [Enhancer for YouTube][13] to make the video player
more minimalistic, without recommendations, play next, and playlists.
diff --git a/_posts/2024-04-20-why-r-is-a-terrible-language.md b/_posts/2024-04-20-why-r-is-a-terrible-language.md
index 4255a8f..140f351 100644
--- a/_posts/2024-04-20-why-r-is-a-terrible-language.md
+++ b/_posts/2024-04-20-why-r-is-a-terrible-language.md
@@ -6,7 +6,7 @@ tags : [R, Software, Data Science]
description: "A long-time R user's honest critique of R as a programming language — and what keeps me using it anyway."
---
-Recently I have been contemplating about how I feel about R as a programming
+Recently I have been contemplating how I feel about R as a programming
language. Even though I have been using it for many years now, I have never been
able to shake the feeling that apart from several nice packages, R is an
inferior language.
@@ -14,7 +14,7 @@ inferior language.
Over the years there have been many criticisms of R, some of them are valid,
-like the [R Inferno book][1], some of them are not, like many medium articles by
+like the [R Inferno book][1], some of them are not, like many Medium articles by
freshman year data science students who just discovered Python and R. More
recently I read a [blog post][2], where the author echoes many of my own views
about R, so I thought I would write my own take on the subject and give reasons
@@ -116,12 +116,12 @@ curve(predict(logistic_model, data.frame(x = x), type = "response"), add = TRUE,
```
If you want to send this code to someone else, you can easily put the data into
-a [quarto][3] document and render the code into a PDF or HTML report. It is very
-similar to [Juptyer notebooks][4] in Python, but I find it easier to use and
-quarto's predecessor, [RMarkdown][5], pioneered this concept within the data
-science community. I am aware that quarto is not as popular as Jupyter notebooks
-are and that it also supports Python, but both quarto and Rmarkdown have more
-mature ecosystems that Jupyter notebooks and are text based, so they are easier
+a [Quarto][3] document and render the code into a PDF or HTML report. It is very
+similar to [Jupyter notebooks][4] in Python, but I find it easier to use and
+Quarto's predecessor, [R Markdown][5], pioneered this concept within the data
+science community. I am aware that Quarto is not as popular as Jupyter notebooks
+are and that it also supports Python, but both Quarto and R Markdown have more
+mature ecosystems than Jupyter notebooks and are text based, so they are easier
to version control.
### Plotting
@@ -140,7 +140,7 @@ dozens of extensions that make it even more powerful.
There are many packages that are very good and that are not available in other
languages. For example, the [data.table][7] package is one of the fastest data
manipulation packages in the world. It is very easy to use and it is very
-powerful. It is also very easy to use it in parallel, so you can speed up your
+powerful. It is also very easy to use in parallel, so you can speed up your
code by using all the cores on your machine. The package is also very well
maintained and it is very popular. The package is so good that it is used by
many other packages as a backend because it is so fast and does not have any
@@ -180,7 +180,7 @@ depending on what you want to achieve, or you can use a 3rd party package called
Crazy right?
R developers appear to be a fairly small group of people who are not very open
-to the work that they do or new ideas. The only reason to find what they are
+to the work that they do or new ideas. The only way to find out what they are
working on is to follow the mailing list, which for many younger developers is
an archaic way of communication. This makes it very hard to get involved in the
core community. Many of those core contributors are also academics, so the whole
@@ -190,12 +190,12 @@ process of getting involved in the community gives off ivory tower vibes.
Although R is at version 4, it never had a major split like Python 2 and Python
3 did. As a result of this, there are many features built into the language that
-maintain feature consistency with language called S, a proprietary language from
-Bell Labs, which R is based on. In my opinion, S was far from a perfect language
-and it definitely wasn't the best thing that came from Bell Labs. Because some
-of these features are still in R, it makes the language very hard to use and
-they make little sense to people in 2024. There even was a [meme account][10] on
-Twitter that made fun of these features.
+maintain feature consistency with a language called S, a proprietary language
+from Bell Labs, which R is based on. In my opinion, S was far from a perfect
+language and it definitely wasn't the best thing that came from Bell Labs.
+Because some of these features are still in R, it makes the language very hard
+to use and they make little sense to people in 2024. There even was a
+[meme account][10] on Twitter that made fun of these features.
### R users are not software engineers
@@ -208,8 +208,8 @@ to zero knowledge about software engineering, good coding practices and using
version control. Many R users are not even aware that there are tools that can
help them write better code, like linters, formatters, etc. This is why many R
packages are very poorly written and barely usable and not very well maintained.
-That is why there are many [threads on StackOverflow][11] that ask for help with
-Rstudio instead of R, and often do not even know the difference between the two.
+That is why there are many [threads on Stack Overflow][11] that ask for help with
+RStudio instead of R, and often do not even know the difference between the two.
Same goes for git and GitHub, it is shocking how long it took me to explain the
differences between the two to my colleagues at work and they still get it wrong
when speaking to Software Engineers.
@@ -234,7 +234,7 @@ one way to do OOP.
One of the most important tools for a software developer is the search engine.
When you are stuck on a problem, you can just google it and you will find the
answer if your searching skills are good enough. This is often not the case with
-R. The reason behind is that the language is called R, so you get a lot of false
+R. The reason is that the language is called R, so you get a lot of false
results or references to Reddit, because each community there starts with `r/`.
This is a small gripe, but it is a very annoying one, and I would say it is a
large obstacle for beginners, judging from the number of times junior
@@ -248,19 +248,19 @@ not support LSP*. Up until not too long ago it didn't have an option to store
settings in a file, so every time you wanted to use a new machine you had to set
up everything from scratch. Although it is open source, it is not very easy to
contribute to it, as the development is done by a company that also offers
-closed source products build on top of the open source core.
+closed source products built on top of the open source core.
To be completely fair, there are other IDEs that you can use for R but they
aren't much better or have different set of problems. For example, ESS is a
package for Emacs that is very powerful but it is very hard to use and it is not
-very user friendly. The development cycle of the package moves at a snail pace
+very user friendly. The development cycle of the package moves at a snail's pace
and there are many bugs that remain unfixed at the time of writing this post.
-VScode is a very good IDE for many languages, but it is not very good for R.
+VS Code is a very good IDE for many languages, but it is not very good for R.
(Neo)Vim is a very good text editor, but it is not very good for R.
The overall quality of the development tools for R is very poor, compared to
other languages like Python, C++, Java, etc. There is only one code formatter
-that kind of works, but it doesn't cover all edge cases are is quite slow
+that kind of works, but it doesn't cover all edge cases and is quite slow
because it was written in R itself, the LSP support in the most popular IDE is
nonexistent and so is tree sitter support. This makes it very hard to write good
code as a team because everyone is doing their own thing and you end up with the
@@ -270,41 +270,41 @@ about an average R user, you can imagine how bad the code can get.
### One company hijacking the ecosystem
If you rewind back to late 2000s and early 2010s, you will see that R was a very
-tiny community. It was simpler times when statisticians did not call themselves
-data scientists. A company called RStudio came along and made a very good IDE.
-Along with it came several packages like ggplot2 that made R very popular. Those
-prominent people in the community joined RStudio and they started making more
-tools and packages for R. Over the course of years they created a lot of
-packages and one meta-package the Tidyverse. Unfortunately, the IDE hasn't been
-getting better and better and those many packages were dependent on each other
-making everything bloated. Many new people who are new to R did not make a fuss
-about that and many established R contributors did but because of slow paced
-development of the base R, Tidyverse packages became insanely popular, creating
-a schism between writing base R code and a Tidyverse-friendly equivalent (based
-on piping the data from one function to another).
+tiny community. They were simpler times when statisticians did not call
+themselves data scientists. A company called RStudio came along and made a very
+good IDE. Along with it came several packages like ggplot2 that made R very
+popular. Those prominent people in the community joined RStudio and they started
+making more tools and packages for R. Over the course of years they created a
+lot of packages and one meta-package the Tidyverse. Unfortunately, the IDE
+hasn't been getting better and better and those many packages were dependent on
+each other making everything bloated. Many people who were new to R did not make
+a fuss about that and many established R contributors did but because of slow
+paced development of the base R, Tidyverse packages became insanely popular,
+creating a schism between writing base R code and a Tidyverse-friendly
+equivalent (based on piping the data from one function to another).
This is quite a unique position a language can find itself in. The standard way
defined by using the standard library gets rejected over a 3rd party solution
-that is based on hundreds of many different dependencies. Many people do not
+that is based on hundreds of different dependencies. Many people do not
care about those when working on one-off analyses, but once you move to
production and want a stable environment, dealing with them becomes difficult to
manage.
-In 2022 Rstudio rebranded themselves as Posit, giving reasons that they also
+In 2022 RStudio rebranded itself as Posit, giving reasons that they also
want to focus on Python as well as R, and the old name was confusing. Many
people were concerned that this probably means that they will want to pivot
themselves from R to Python as this is the language of data science now. They
-obviously denied it it needs to be said that their departure from R to Python
+obviously denied it. It needs to be said that their departure from R to Python
can be seen in the number of latest RStudio IDE releases and R package releases.
-On top of it, they layed off the creator or RMarkdown after trying to move
+On top of it, they laid off the creator of R Markdown after trying to move
people to Quarto, which is a more language agnostic platform leveraging similar
technologies.
It appears that they want to diminish their activity within the open-source R
community and focus more on Python in production because this is where the money
is. This is quite transparent when you look where their promotion and funding
-goes to. They sponsor Python related podcasts like Talk Python to Me, but I
-can't say that they do the same with the only R related podcasts which is R
+goes to. They sponsor Python-related podcasts like Talk Python to Me, but I
+can't say that they do the same with the only R-related podcast, which is R
Weekly Highlights. It remains to be seen where they end up being in a couple of
years but my impression is that they will stay engaged with R but to a much
lesser extent.
@@ -330,7 +330,7 @@ not compatible. On top of this, CRAN does not provide binaries on Linux, so you
need to compile them from source, which sometimes takes a lot of time and
resources.
-There are competing 3rd party package "marketplaces" like ROpenSci, Posit
+There are competing 3rd party package "marketplaces" like rOpenSci, Posit
Package Manager, GitHub. They are much easier to use and they are much faster
than CRAN when it comes to submitting a package. Some of them even provide Linux
binaries, so they are a good alternative to CRAN.
@@ -341,7 +341,7 @@ party packages like `renv` and/or `groundhog` and even they can't guarantee it.
Because of this, the only way to ensure reproducibility is to use Docker images.
This is also a problem with Python as well, but people using Python don't have
issues with it because they are more likely to be software engineers and they
-know how to write good code. On the other hand, an average R user haven't heard
+know how to write good code. On the other hand, an average R user hasn't heard
about Docker.
## Alternatives to R
@@ -355,7 +355,7 @@ implemented in Python, so if you want to use them, you need to use Python. Even
though Python is not as good as R for statistics, it is good enough for most use
cases. Python is quite fast, thanks to C and C++ libraries and more recently
Rust. If you want to write tools for Python or you are interested in HPC and
-machine learning in general, C++ is still king. Python and C++ compliment each
+machine learning in general, C++ is still king. Python and C++ complement each
other very well, so you can use Python for data manipulation and C++ for heavy
lifting.
@@ -364,11 +364,11 @@ lifting.
If you are planning to learn R, I would advise against it. There are not many
reasons to learn R if you want to be a data scientist. Learn Python first and if
you feel like you need to use a package from R that is not available in Python,
-you can use LLMs like chatGPT to write the code for you. Once you go deeper than
+you can use LLMs like ChatGPT to write the code for you. Once you go deeper than
fiddling with spreadsheets and databases and need true speed, low memory usage
as well as good type safety, you can learn C++. The combination of Python and
C++ is the best of both worlds and it is much better than R. C++ is a difficult
-language to learn but one you get over that hurdle and write some code in it,
+language to learn but once you get over that hurdle and write some code in it,
you will have much deeper understanding of how computers work and how to write
good code. Python on the other hand is very easy and it will allow you to
abstract these low level details and focus on the problem you are trying to
diff --git a/_posts/2024-11-17-cli-file-managers.md b/_posts/2024-11-17-cli-file-managers.md
index d8046a1..3b3fd84 100644
--- a/_posts/2024-11-17-cli-file-managers.md
+++ b/_posts/2024-11-17-cli-file-managers.md
@@ -16,7 +16,7 @@ user interfaces are unavailable or unnecessary.
Among the diverse options available, **Yazi** and **Midnight Commander (MC)**
stand out as two of the most interesting choices for very different reasons. In
-this article, we’ll explore their features and delve into why **Midnight
+this article, we'll explore their features and delve into why **Midnight
Commander** is a particularly powerful ally for handling complex tasks.
@@ -40,7 +40,7 @@ unique advantages, such as:
**Yazi** is a relatively new CLI file manager that has quickly gained attention
for its minimalistic yet powerful design. It combines traditional CLI speed with
modern usability, borrowing design ideas from graphical environments. For those
-who used ranger or nnn, Yazi will feel familiar.
+who have used ranger or nnn, Yazi will feel familiar.
### Key Features of Yazi:
@@ -51,7 +51,7 @@ who used ranger or nnn, Yazi will feel familiar.
view in macOS Finder, allowing you to see multiple levels of the directory
structure at once. This feature makes it easy to understand your filesystem's
hierarchy and move quickly between deeply nested folders.
-3. **Fuzzy Searching**: Locating files is a breeze with Yazi’s intelligent,
+3. **Fuzzy Searching**: Locating files is a breeze with Yazi's intelligent,
fuzzy search system, perfect for sprawling file systems.
4. **Lightweight and Cross-Platform**: Yazi is highly portable and works
seamlessly on Linux, macOS, and Windows.
@@ -60,7 +60,7 @@ who used ranger or nnn, Yazi will feel familiar.
### When to Use Yazi:
-If you’re seeking a **modern CLI experience with a familiar visual
+If you're seeking a **modern CLI experience with a familiar visual
representation of directories**, Yazi excels. Its columnar view of nested
directories is particularly useful for users accustomed to graphical file
managers like macOS Finder, while its lightweight design ensures it stays true
@@ -103,7 +103,7 @@ MC has proved invaluable:
game-changer. When working on a project requiring assets from various
locations, I can easily view, compare, and move files without repeatedly
switching directories.
-2. **Copying Bulk Files**: MC’s straightforward copy and move operations make
+2. **Copying Bulk Files**: MC's straightforward copy and move operations make
transferring large numbers of files painless.
3. **Accessing Remote Servers**: The ability to work directly with remote
filesystems through SFTP has saved me hours of time when managing servers.
@@ -139,6 +139,6 @@ developers, sysadmins, and anyone managing a large number of files. For these
reasons, **Midnight Commander remains my go-to file manager for day-to-day
tasks**.
-Yazi’s minimalist and modern approach might suit users with simpler needs, but
-when the workload gets heavy, Midnight Commander’s depth and reliability make it
+Yazi's minimalist and modern approach might suit users with simpler needs, but
+when the workload gets heavy, Midnight Commander's depth and reliability make it
an indispensable tool.
diff --git a/_posts/2024-11-20-docker-for-R.md b/_posts/2024-11-20-docker-for-R.md
index a4df6ec..7ed15b7 100644
--- a/_posts/2024-11-20-docker-for-R.md
+++ b/_posts/2024-11-20-docker-for-R.md
@@ -26,7 +26,7 @@ For R users, Docker offers a way to ensure that your code runs exactly the same
anywhere, from your laptop to a cloud server. No more "it works on my machine"
excuses!
-You may be thinkging, "But I alredy have R installed on my computer and I use
+You may be thinking, "But I already have R installed on my computer and I use
renv. That's enough, right?" Well, not quite. While renv is excellent for
managing R package dependencies and ensuring reproducibility at the package
level, it falls short in addressing system-level dependencies, R versioning, and
@@ -43,7 +43,7 @@ comprehensive solution for full-stack reproducibility and deployment.
### Step 1: Install Docker
Docker is available for Windows, macOS, and Linux. You can download it through a
-package manger of your choice or directly from the [Docker
+package manager of your choice or directly from the [Docker
website](https://www.docker.com).
### Step 2: Create a Dockerfile or get familiar with the Rocker project
@@ -52,7 +52,7 @@ A `Dockerfile` is a simple script that tells Docker how to build your
environment. The easiest way to get started is to use the
[Rocker](https://www.rocker-project.org) and go with a versioned R image. If you
look at my default R project setup, you will see that I use the `rocker/r-ver`
-and also install extra applications and version packages tied to specific date.
+and also install extra applications and package versions tied to a specific date.
This ensures that the environment is reproducible and that the project will run
the same way in the future.
@@ -66,7 +66,7 @@ LABEL org.opencontainers.image.licenses="GPL-2.0-or-later" \
org.opencontainers.image.authors="Carl Boettiger "
ENV PANDOC_VERSION=default
-# specify which vesrion of quarto to install (default is the latest)
+# specify which version of Quarto to install (default is the latest)
ENV QUARTO_VERSION=default
RUN /rocker_scripts/install_pandoc.sh
@@ -122,13 +122,13 @@ RUN install2.r --error --skipinstalled --ncpus -1 \
&& rm -rf /var/lib/apt/lists/*
# update data.table to the dev version to use the latest features. NOTE that
#this will pull any changes from the data.table repo, so it isn't recommended if
-# you want to maintein a stable environment and keep reproducibility
+# you want to maintain a stable environment and keep reproducibility
# RUN R -e "data.table::update_dev_pkg()"
# install all packages used by rio for I/O
RUN R -e "rio::install_formats()"
# Once you have scripts to run, they can be added to the image and run during
-# the image build process (as opposed to image rung time).
+# the image build process (as opposed to image run time).
# RUN Rscript file.R
```
@@ -156,7 +156,7 @@ This starts a container where your R script will execute exactly as defined.
Docker is a powerful tool with many features and integrations. There are many smart people out there who created nice base images and scripts to help you get started. The Rocker project is a great place to start, but you can also explore other images and scripts on GitHub.
-Additionally, you should read [Building reproducible analytical pipelines with R](https://raps-with-r.dev/) by Bruno Rodrigues. He goes into more detail about how to use Docker for R projects and how to create a reproducible workflow. I have my own [small setup](https://github.com/davidbudzynski/R-project-bootstrap) which uses Makefiles to build the Docker image and run the container. This way I can easily share the project with others and ensure that the environment is the same for everyone. The most important thing is to start and learn as you go. Once you keep using docker, you will see the benefits and how it can help you in your daily work.
+Additionally, you should read [Building reproducible analytical pipelines with R](https://raps-with-r.dev/) by Bruno Rodrigues. He goes into more detail about how to use Docker for R projects and how to create a reproducible workflow. I have my own [small setup](https://github.com/davidbudzynski/R-project-bootstrap) which uses Makefiles to build the Docker image and run the container. This way I can easily share the project with others and ensure that the environment is the same for everyone. The most important thing is to start and learn as you go. Once you keep using Docker, you will see the benefits and how it can help you in your daily work.
## Closing thoughts
diff --git a/_posts/2024-11-21-mini-pc.md b/_posts/2024-11-21-mini-pc.md
index faa9a48..ad8d68c 100644
--- a/_posts/2024-11-21-mini-pc.md
+++ b/_posts/2024-11-21-mini-pc.md
@@ -15,28 +15,28 @@ and why you should consider getting one.
-## What is a mini pc
+## What is a mini PC
Mini PCs are small form factor computers that are designed to be compact. They
are usually smaller than a Mac mini. The reason why they are so small is that
they use a low-power processor, usually designed for laptops. Because they are
-not so space-constrained like laptops are, they usually have better cooling
+not as space-constrained as laptops are, they usually have better cooling
which means they can run slightly faster with better temperatures. Although
these are small very tiny PCs with laptop chips, not all of them are low
performance, low power machines. There is a wide variety of mini PCs available
in the market, ranging from low power consumption PCs ideal for server
applications to high performance desktop replacements.
-## Low power consumption pc
+## Low power consumption PC
-I already have a spare desktop PC that I don't use anymore. It's a it's a nearly
+I already have a spare desktop PC that I don't use anymore. It's a nearly
10-year-old machine with an Intel Core i5 6600K processor. It's still a decent
machine, but it's not very power efficient. It consumes around 100 watts of
power when idle. I wanted to replace it with something that consumes much much
less power, so it can stay on all day without costing me too much. I started
looking for low power consumption PCs and came across the Intel N100 processor.
This chip consumes around 5-10 watts of power when idle, which is 10 times less
-than my old desktop PC. Essentially, it's a modern version of the my old Skylake
+than my old desktop PC. Essentially, it's a modern version of my old Skylake
processor, but with a much lower power consumption and modern features like
quick sync and hardware decoding for 4k video.
@@ -47,11 +47,11 @@ is single channel) for around £150.
I was pleasantly surprised by how well it performed. It was able to handle all
the tasks I threw at it, including web browsing, video streaming, and
-downloading stuff in the background. For the most part it fairly quiet, so you
-could sleep beside it. The only time it gets loud is when you're installing
+downloading stuff in the background. For the most part it is fairly quiet, so
+you could sleep beside it. The only time it gets loud is when you're installing
something or running a heavy task. I was very happy with my purchase and decided
to keep it. It came with Windows 11 preinstalled which I immediately replaced
-with Arch Linux and KDE Plasma. I decided for a regular desktop environment
+with Arch Linux and KDE Plasma. I decided on a regular desktop environment
because it wasn't going to be used just by myself, but also by my fiancée.
### The setup
@@ -70,17 +70,17 @@ quite powerful. I do not have a need for a Mac, so I wouldn't recommend them as
they aren't great value for money. The second alternative is a mini PC with an
AMD 8845HS 8 core processor or an older AMD 7940HS processor which is basically
very close to the 8845HS. These chips are very powerful and can handle most
-things you throw at it. Of course, they won't be any good for machine learning
+things you throw at them. Of course, they won't be any good for machine learning
or compiling massive projects, but they are great for everyday tasks.
-### ssf pcs
+### SFF PCs
There are also small form factor PCs that are a bit bigger than mini PCs but
also more powerful. These are usually called small form factor PCs or SFF PCs.
-They require you to pick all the components yourself, but it seems like a the
+They require you to pick all the components yourself, but it seems like the
best alternative if you want a powerful gaming PC in a small form factor.
Overall this isn't the most cost effective solution, but there are some
-cheap,good quality components available. I saw people building nice rigs with
+cheap, good-quality components available. I saw people building nice rigs with
[S300 8L case][2] which looks really good, is very small and isn't overly
expensive.
@@ -89,7 +89,7 @@ expensive.
This month, Apple released a new Mac mini with an M4 chip. The base model is
probably the best value for money Mac mini ever released and I would seriously
consider it if I needed a Mac and was looking for a new computer. It's insanely
-small with built in power supply and is very powerful. You can probably also
+small with a built-in power supply and is very powerful. You can probably also
expect good support from Apple for the next 5-7 years, low fan noise and low
power consumption. The only downside is that upgrading RAM or storage is very
expensive.
diff --git a/_posts/2026-09-01-renv-vs-docker.md b/_posts/2026-09-01-renv-vs-docker.md
index d5068c4..031480f 100644
--- a/_posts/2026-09-01-renv-vs-docker.md
+++ b/_posts/2026-09-01-renv-vs-docker.md
@@ -44,7 +44,7 @@ with its version number and where it came from:
Anyone with your project and your lockfile can run `renv::restore()` and end up
with the same package versions you had. For most day-to-day breakage — an update
-to a package changing behavior under you — renv solves the problem completely.
+to a package changing behaviour under you — renv solves the problem completely.
It is lightweight, fast to adopt, and stays out of your way. If you are not using
it yet, there is little excuse: it takes about five minutes to add to a project.
@@ -86,16 +86,18 @@ once:
```dockerfile
FROM rocker/r-ver:4.4.2
-RUN Rscript -e "install.packages(c('data.table', 'ggplot2'))"
+# noble == Ubuntu 24.04, the distro inside rocker/r-ver:4.4.2
+RUN Rscript -e "install.packages(c('data.table', 'ggplot2'), \
+ repos = 'https://packagemanager.posit.co/cran/__linux__/noble/2025-02-27')"
COPY analysis.R /project/analysis.R
CMD ["Rscript", "/project/analysis.R"]
```
-Here `rocker/r-ver:4.4.2` pins Ubuntu and R, the package repository URL points
-at a dated P3M snapshot so installed packages never move, and the image itself
-pins the result. Rebuild it in five years and you get the same environment back.
-This is what people mean by "it runs the same everywhere".
+Here `rocker/r-ver:4.4.2` pins Ubuntu 24.04 and R, the `noble` snapshot URL in
+the install line freezes every package at CRAN as it looked on that date, and
+the image itself pins the result. Rebuild it in five years and you get the same
+environment back. This is what people mean by "it runs the same everywhere".
## When renv is enough