summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2022-10-01 17:44:14 +0300
committereug-vs <eugene@eug-vs.xyz>2022-10-01 17:44:14 +0300
commit9a6c3a5f8beb854df291dd8b0d0815787edb4838 (patch)
treedf6186783befde7336847f2dd2adcbf3901b4708
parentb361d6b763ec1fbe7afe0b01b91e1b87f3552a3f (diff)
downloadeug-vs-xyz-9a6c3a5f8beb854df291dd8b0d0815787edb4838.tar.gz
blog: latest articles
-rw-r--r--src/blog/2022-09-26.md14
-rw-r--r--src/blog/2022-09-30.md59
-rw-r--r--src/blog/index.md5
-rw-r--r--src/public/emoji/hledger.svg22
-rw-r--r--src/public/emoji/warcraft.pngbin0 -> 196420 bytes
-rw-r--r--src/urls3
6 files changed, 101 insertions, 2 deletions
diff --git a/src/blog/2022-09-26.md b/src/blog/2022-09-26.md
new file mode 100644
index 0000000..2a8e8f8
--- /dev/null
+++ b/src/blog/2022-09-26.md
@@ -0,0 +1,14 @@
+# Branching sucks. Trunk-based development :git: will boost your project!
+I am now working on a cool startup and I'm really glad we adopt this model.
+
+## Trunk-based development :git:
+The idea of [trunk based development](https://trunkbaseddevelopment.com/) is to collaborate on a single branch called trunk and avoid creating long-lived branches.
+
+## Why is it so good?
+Trunk-based development helps to avoid many problems that extensive branching creates. Let's see why branching might be bad:
+ - Long-lived branches are a nightmare if you wanna move fast! Imagine a branch that is 4 days behind your trunk. Sometimes that might be more than 100 commits. Do you think you have any chance of merging that? This is unacceptable for a startup.
+ - Long-lived branches create multiple sources of truth. How do you know which changes to pick? But when you got your trunk it's deadly easy - it always represents the *current* state of your system - at any point in time! And it's guaranteed to work, especially if you practice continuous delivery.
+
+On top of that trunk-based development encourages you to rebase often. This means developers always have a clear view of how their changes interact with everyone else's changes.
+
+It also offers you an opportunity to skip Pull Requests entirely! This is an insane boost to development, but it only works if the developers trust each other and communicate frequently enough. If you do pair programming, there's really no need to do any code review!
diff --git a/src/blog/2022-09-30.md b/src/blog/2022-09-30.md
new file mode 100644
index 0000000..b9fdca4
--- /dev/null
+++ b/src/blog/2022-09-30.md
@@ -0,0 +1,59 @@
+# Plaintext accounting :hledger: is cool
+Accounting is ancient as hell. Even the cavemen knew how to keep their books. Do you tho?
+
+## Keep it simple
+[Plaintext accounting](https://plaintextaccounting.org/) is literally what it sounds like - a method to keep your records in the simplest and cleanest text form possible. I've been using plaintext accounting for more than half a year already and it's been an incredible quality of life improvement.
+
+## Software
+The go-to solution in the plaintext accounting world is [Ledger](https://www.ledger-cli.org/). There's also his Haskell brother - [Hledger](https://hledger.org), which actually I am using. Hledger uses so-called double-entry accounting system. Your plaintext journal file contains records in the form of transactions. A transaction is simply a transfer from one account to another. Here's what example transaction looks like:
+```bash
+2022-09-28 Pizza
+ expenses:food:delivery 22.90 B
+ assets:bank:bgpb
+```
+Basically this means: "**22.90 BYN** went from my bank account to the account of my expenses"
+Simple, isn't it? I'm not gonna dive deep into details - there's an *amazing* [documentation](https://hledger.org), guides, recipes and tons of other stuff on using Hledger.
+
+## My few tricks using Hledger
+Instead, here I'm gonna show you how Hledger can actually improve your life (besides countless amounts of reports of all sorts that help you analyze your expenses and adapt accordingly).
+
+### Tracking expenses from the phone
+Since the journal is a plaintext file - it's never been easier. Just use [Syncthing](https://syncthing.net)! When it comes to conveniently editing the file, I personally use [cone](https://play.google.com/store/apps/details?id=info.tangential.cone). It doesn't allow you to view reports and other fancy stuff, because it doesn't need to. It's just a tool for you to enter the transactions that happened during the day, so that you can analyze them later.
+
+### Tracking debts with friends
+If you hang out with your friends often, you know that tracking debts is a pretty nasty thing:
+> I paid for pizza, you brought some beer, that guy already owes me $20, I owe another guy etc...
+
+This can get really messy real quick. On top of that, usually you pay about equal amounts of money each time, e.g:
+
+>You bought the beer last time, now it's my turn.
+
+This keeps the actual debt between you close to zero, without needing to physically transfer any money. And in case it exceeds some amount (say 10 bucks), you actually do the transfer. But how can you be sure it's close to 0? You'd have to remember every payment happened before, which is incredibly dumb. Just offload this task to Hledger!
+
+Imagine this situation: We've been on a party with Bob and Alice, and I paid for food and drinks **81 BYN** from my bank account (it's always simpler to pay with one check and than sort out the story later). I know that my part here was around **30 BYN**. After the party Alice pays me her part - **40 BYN** in cash. But the other guy - Bob - does not! He has no money today, so we'll just remember that now he owes me his part. Here's how this transaction would look in Hledger.
+```bash
+2022-09-25 Party
+ assets:bank:bgpb -81.00 B
+ expenses:parties 30.00 B
+ assets:cash 40.00 B
+ assets:receivable:bob
+```
+Notice that in this transaction I don't even need to calculate Bob's expenses. Since the transaction has 0 sum, we can deduct his part: `-81 + 30 + 40 + x = 0`, therefore `x = 11`. Let's now verify that, running `hledger balance bob`:
+```bash
+ 11.00 B assets:receivable:bob
+ -5.00 B liabilities:debt:bob
+--------------------
+ 6.00 B
+```
+Hmm, what a surprise! Turns out, I already owe him **5 BYN** for the burger yesterday. Without Hledger I could easily forget about it. Now I know that he owes me **6 BYN**. And he doesn't even need to transfer it, he'll just pay next time, and I'll be the one who owes.
+
+
+### It's OK to skip sometimes
+In the August I completely ditched my accounting (for no actual reason other than my laziness). Is it the end of the world? No. Let's see how hard it is to comeback.
+```bash
+2022-09-01 Epic come back!
+ assets:bank:bgpb = 100 B
+ expenses
+```
+
+Yes! As easy as that. I just take the current balance on my account (say **100 BYN**), and whatever is the difference between this number and my balance at the end of July - goes into the expenses. That's it. The only thing I lose by not tracking the entire month is *granularity* - I don't know what types of expenses were there anymore, and can't analyze them in-depth. But at least I know my total expenses for the August, which is often what actually matters.
diff --git a/src/blog/index.md b/src/blog/index.md
index b4e6c32..ebfb9e3 100644
--- a/src/blog/index.md
+++ b/src/blog/index.md
@@ -2,6 +2,11 @@
## 2022
+### September
+
+- [Plaintext accounting :hledger: is cool](2022-09-30.md)
+- [Branching sucks. Trunk-based development :git: will boost your project!](2022-09-26.md)
+
### April
- [Creating Gentoo :gentoo: ebuilds is easy as fuck!](2022-04-24.md)
diff --git a/src/public/emoji/hledger.svg b/src/public/emoji/hledger.svg
new file mode 100644
index 0000000..90e0ea5
--- /dev/null
+++ b/src/public/emoji/hledger.svg
@@ -0,0 +1,22 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 199.7 184.2">
+ <style>
+ @media (prefers-color-scheme: dark) {
+ svg { fill: white; }
+ }
+ </style>
+<path d="M189.5,36.8c0.2,2.8,0,5.1-0.6,6.8L153,162c-0.6,2.1-2,3.7-4.2,5c-2.2,1.2-4.4,1.9-6.7,1.9H31.4c-9.6,0-15.3-2.8-17.3-8.4
+ c-0.8-2.2-0.8-3.9,0.1-5.2c0.9-1.2,2.4-1.8,4.6-1.8H123c7.4,0,12.6-1.4,15.4-4.1s5.7-8.9,8.6-18.4l32.9-108.6
+ c1.8-5.9,1-11.1-2.2-15.6S169.9,0,164,0H72.7c-1,0-3.1,0.4-6.1,1.1l0.1-0.4C64.5,0.2,62.6,0,61,0.1s-3,0.5-4.3,1.4
+ c-1.3,0.9-2.4,1.8-3.2,2.8S52,6.5,51.2,8.1c-0.8,1.6-1.4,3-1.9,4.3s-1.1,2.7-1.8,4.2c-0.7,1.5-1.3,2.7-2,3.7c-0.5,0.6-1.2,1.5-2,2.5
+ s-1.6,2-2.2,2.8s-0.9,1.5-1.1,2.2c-0.2,0.7-0.1,1.8,0.2,3.2c0.3,1.4,0.4,2.4,0.4,3.1c-0.3,3-1.4,6.9-3.3,11.6
+ c-1.9,4.7-3.6,8.1-5.1,10.1c-0.3,0.4-1.2,1.3-2.6,2.7c-1.4,1.4-2.3,2.6-2.6,3.7c-0.3,0.4-0.3,1.5-0.1,3.4c0.3,1.8,0.4,3.1,0.3,3.8
+ c-0.3,2.7-1.3,6.3-3,10.8c-1.7,4.5-3.4,8.2-5,11c-0.2,0.5-0.9,1.4-2,2.8c-1.1,1.4-1.8,2.5-2,3.4c-0.2,0.6-0.1,1.8,0.1,3.4
+ c0.2,1.6,0.2,2.8-0.1,3.6c-0.6,3-1.8,6.7-3.6,11c-1.8,4.3-3.6,7.9-5.4,11c-0.5,0.8-1.1,1.7-2,2.8c-0.8,1.1-1.5,2-2,2.8
+ s-0.8,1.6-1,2.5c-0.1,0.5,0,1.3,0.4,2.3c0.3,1.1,0.4,1.9,0.4,2.6c-0.1,1.1-0.2,2.6-0.5,4.4c-0.2,1.8-0.4,2.9-0.4,3.2
+ c-1.8,4.8-1.7,9.9,0.2,15.2c2.2,6.2,6.2,11.5,11.9,15.8c5.7,4.3,11.7,6.4,17.8,6.4h110.7c5.2,0,10.1-1.7,14.7-5.2s7.7-7.8,9.2-12.9
+ l33-108.6c1.8-5.8,1-10.9-2.2-15.5C194.9,39.7,192.6,38,189.5,36.8z M59.6,122.8L73.8,80c0,0,7,0,10.8,0s28.8-1.7,25.4,17.5
+ c-3.4,19.2-18.8,25.2-36.8,25.4S59.6,122.8,59.6,122.8z M78.6,116.8c4.7-0.1,18.9-2.9,22.1-17.1S89.2,86.3,89.2,86.3l-8.9,0
+ l-10.2,30.5C70.2,116.9,74,116.9,78.6,116.8z M75.3,68.7L89,26.2h9.8l0.8,34l23.6-34h9.9l-13.6,42.5h-7.1l12.5-35.4l-24.5,35.4h-6.8
+ l-0.8-35L82,68.7H75.3z"/>
+</svg>
+<!-- Original image Copyright Dave Gandy — CC BY 4.0 License -->
diff --git a/src/public/emoji/warcraft.png b/src/public/emoji/warcraft.png
new file mode 100644
index 0000000..80e98e7
--- /dev/null
+++ b/src/public/emoji/warcraft.png
Binary files differ
diff --git a/src/urls b/src/urls
index e7d6fb2..98fdd45 100644
--- a/src/urls
+++ b/src/urls
@@ -1,4 +1,3 @@
-https://lukesmith.xyz/rss.xml
https://drewdevault.com/blog/index.xml
-https://blog.codinghorror.com/rss/
https://100r.co/links/rss.xml
+https://blog.codinghorror.com/rss/