Skip to content

Commit

Permalink
Merge pull request #15 from bytes-zone/april-cools-and-tinyping-month…
Browse files Browse the repository at this point in the history
…-two

april cools and tinyping month two
  • Loading branch information
BrianHicks committed Apr 1, 2024
2 parents 4ebe332 + 9ef2583 commit 82170f6
Show file tree
Hide file tree
Showing 8 changed files with 167 additions and 5 deletions.
37 changes: 37 additions & 0 deletions content/micro/thing-a-month-04-01.md
@@ -0,0 +1,37 @@
+++
title = "tinyping month 2"
date = 2024-04-01

[extra]
project = "thing-a-month (awareness)"
+++

Let's talk about tinyping. The thing-a-month project is meant to be a thing a month, full stop. But sometimes life gets in the way: between illness and a long-scheduled and much-needed vacation, I didn't have the time I needed to do a good job on tinyping in March.

But I really think it's a good idea, and not such a big one. It's also pretty close to being usable! So this month I'm going to double down on it, breaking my own rules about the "things" only taking a month.

So here's a quick status report, and where I hope to get to in April:

<!-- more -->

- Ping caculation can be distributed among multiple clients in a reliable way, which should keep the right distribution from the two posts in early March ([1](@./thing-a-month-03-01.md), [2](@./thing-a-month-03-02.md))
- Style is... really not there yet.
- Neither is reporting.
- You also can't sync data anywhere, which is especially bad on mobile (and *especially* on mobile Safari, which will delete stuff in IndexedDB after only 7 days of inactivity if you don't pin the app to the home screen.)
- Nothing is deployed anywhere.

So here are the goals for April:

1. Get reporting working. This is a core thing—there's not much point entering the data if we can't get the results.
2. Get notifications on new pings. This is almost done, and just needs a little push to get it over the line.
3. Get some semblance of style. It's *really* rough right now, and nothing I'd want to show someone else.
4. Get syncing to a server, at least for backup. I might have to drop encryption to get this done in April; that's OK.

And the things I'm *not* going to do (unless I miraculously get the above done):

- Multiple tags per ping
- Bulk editing
- Integration into other systems
- Any kind of native or mobile app

My work's cut out for me; let's go!
97 changes: 97 additions & 0 deletions content/posts/kratky-in-the-basement.md
@@ -0,0 +1,97 @@
+++
title = "Kratky in the basement"
description = "Growing lettuce indoors with the power of hydroponics!"
date = 2024-04-01
+++

*Hello hello! Today is [April Cools](https://www.aprilcools.club/), which is like April Fools but for posting stuff outside what you normally write about instead of unfunny jokes. Hope you enjoy!*

I've been wanting to try out indoor hydroponic gardening for a long time now because I want to eat more salads, but:

1. Viral and bacterial outbreaks come up pretty regularly in the US food system. I don't feel super paranoid about produce where you can wash or avoid eating the skin, but I feel worse in cases where usually you eat the whole plant.
2. Large-scale farming techniques sometimes seem pretty dubious, even in products labeled as organic.
3. Because of how our food system is set up, produce is regularly transported hundreds of miles before being consumed.

Luckily for me, growing at home in my basement is a way around this:

<!-- more -->

1. I won't get listeria cross-contamination from pig farms or whatever—there are no pigs in my basement!
2. Growing indoors means I have precise control over the environment the plants are growing in. There is no need for pesticide or herbicide. (And I have lots of choice in what nutrients I use.)
3. I can walk downstairs to harvest lettuce which avoids all the waste and carbon emissions from transportation, plus the produce could literally not be fresher.

Plus I think hydroponics are cool,[^1] which is another helpful motivation!

Problem is, I've always overcomplicated things… for example, I've drawn up plans to turn the entire house into a hydroponic garden, feed the whole neighborhood, start a local plastic recycling and hydroponic produce market, etc. You get the idea.

So earlier this year, I decided to commit to doing something as small as I could: get at least one salad on a plate before the end of March. And I did it! Here's how.
## Hydroponics Crash Course

I'm still a beginner and I'll get some of this wrong for sure, but before I can explain how my setup works I need to share a little theory. Plants need like 4 things[^2] to thrive:

1. Water
2. Bioavailable nutrients
3. Light
4. Air

First up, water and nutrients are taken together in hydroponics. Mixing the right hydroponic nutrient solution could be a long post all by itself, so I'll just sum it up by sharing some details that I was confused by at first:

- Nutrient formulations are marked with three-number value like 10-10-10 or 8-15-36. Those values are nitrogen-phosphorous-potassium, or NPK. As I understand it, they're percentages: a 10-10-10 mix has 10% of each. That's a good starter mix for lettuce, but I've read that 8-15-36 will also work.
- You measure pH and electrical conductivity in the nutrient solution.
- You need to care about pH because if it's too high or low then plants can't actually absorb the nutrients from the water.
- You need to care about electrical conductivity because it's a good proxy for how much total nutrient is in the solution (since saltier water is more electrically conductive.) Too much and you'll get "nutrient burn" where the edges of leaves turn brown. Too little and the plant just won't grow correctly.

Light is usually a cost/value tradeoff. Good grow lights are expensive, and smaller ones usually have a price premium due to home marijuana growers in the US market.[^3] I bought mine from [spider-farmer.com](http://spider-farmer.com/) (got a pair of SF300s for $99 on sale, $135 normal price.) There is not a lot to think about if you're willing to accept this as the biggest cost of the initial setup, but the most important thing is that you have to have a full-spectrum light: plants grow best in reds and blues, basically (which makes sense if you think about it; leaves are green because they're reflecting those wavelengths instead of absorbing them for photosynthesis.)

That leaves air, which different systems adapt to in different ways. The basic problem is that plants can drown if you submerge their roots in water that isn't properly aerated. This is a problem in soil gardening too; it's why you need to ensure good drainage in your planting beds. In most systems I was looking at, there was some level of circulation or aeration which required a bunch of pumps and air stones. But it turns out that you don't need all that at a small scale: you can just use the Kratky method.

### The Kratky Method

So that all leads to Kratky: You basically take a bucket, make sure the plants can get their roots wet, and just let them grow. Plants will grow regular roots down into the reservoir, and send off air roots (they're hairier and shorter than the ones that absorb water) sideways above the waterline as the water evaporates.

The big benefit is that you don't need pumps, air stones, or any powered components aside from a light (and if you do it outside, you don't even need that.) That kind of simplicity is what I was after!

The big drawback is that the nutrient concentration will go up over time as the water evaporates, so you need to start lower. For lettuce, I've read that starting at half-strength nutrient concentration is fine. You also will probably not be able to cycle new plants into the system, as their roots will not be able to reach the lower water levels.

## My Setup

So here's how I put all that theory into practice. As a reminder, I wanted to get a single salad out of a system that was as simple as I could possibly make it.

Here's how things looked at the start of the grow. I only needed one light for six plants (which I calculated based on how much room a typical lettuce plant needs to grow.)

![a photo of six seedling plants with 1 to 3 small leaves each in individual holes in the top of a yellow 27-gallon bin underneath a grow light](/images/kratky-in-the-basement/kratky-27gal-20231226.jpeg)

Here's what it looked like near the middle of the grow below the waterline. You can see the air roots coming off the sides of the longer roots!

![a photo of a tray of six plants being lifted out of the the nutrient solution to show their roots. Most of the roots are long and slender, but near the tops they look hairy: those are the air roots.](/images/kratky-in-the-basement/kratky-27gal-20220122-roots.jpeg)

Then finally, here's how the plants looked near the end of the grow about 45 days in:

![a photo of the same six plants underneath a grow light, but with large healthy leaves.](/images/kratky-in-the-basement/kratky-27gal-20240219.jpeg)

They stayed at this stage for about another month while we used all the plants in salads. We did that slowly at first, because we weren't 100% sure if they were actually safe to eat, but we sped up pretty quickly as we didn't see any ill effects. I wish we had eaten them faster, though: the nutrient concentration went up in the reservoir and most of the plants ended up with nutrient burn that I had to trim off before eating.

The easiest way I found to harvest the plants was to cut them off at the stem with a sharp knife, then chop them the same as I would a grocery store lettuce. I plucked all the leaves off one as an experiment, though: it took me a lot longer, but then the plant was able to regrow most of its leaves for a second harvest. If it was easier to change the water in this system, I might do that more.

Anyway, here's the shopping list if you wanted to replicate something like this:

1. A reservoir. I used a 27 gallon (~100 liter) tote with holes drilled in the lid.
2. Net cups and grow media. I used some standard net cups off of amazon with some rockwool that I got from a local hydroponics shop.
3. Seeds.
4. Lights. I used Spider Farmer SF300s, which I plan to use for future grows as well. Link above.
5. Nutrient solution. I don't have a strong recommendation here—I bought some vegetative growth nutrient mix from the hydroponics shop. It's clearly designed for the vegetative phase of marijuana, but it has about the right NPK and it worked fine. I monitored the pH and conductivity for the first 30 days or so, but stopped once it stabilized.

I want to make some improvements already, though:

- I'm going to switch to 5 gallon (18 liter) buckets for future grows. 25 gallons of water weighs about 200 pounds (~90kg), and the tote isn't really set up for that much weight. Using small buckets would let me run different experiments with pH and nutrient composition as well.
- I did the grow in my basement. That meant a pretty constant temperature of about 60°F (15.5°C.) It might be worth getting some kind of grow tent with a small heater to raise the temperature.
- My hydroponics setups have a fan blowing on the plants to stimulate them in this kind of environment. I think I ought to try that!
- I'm not sold on rockwool as a grow medium—I found out while writing this post that I have not been sufficiently careful about handling it! I have coco pellets too, but I'm not sure how to start seeds in that.

So that's where I'm at on hydroponics! I'm really excited to improve on this, but I'm already pretty happy with where things are right now.

[^1]: If you don't think hydroponics are cool, that's fine. But if the other stuff in this list resonates with you, consider looking up local farmers markets or produce co-ops, which address some of these problems in similar ways.

[^2]: Ok, so there's actually a bunch more here. Plants need the right temperature, humidity, protection from insects or animals, a place to put down roots, etc. But you need to solve for these four to even get started.

[^3]: I call it the "weed tax", although I can't recall if I read that or came up with it.
10 changes: 6 additions & 4 deletions content/projects/thing-a-month-awareness.md
Expand Up @@ -2,20 +2,22 @@
title = "thing-a-month (awareness)"
description = ""
date = 2024-03-04
updated = 2024-04-01

[extra]
when = "now"
+++

It's March, and time for the second [thing-a-month](@/projects/thing-a-month.md) project.
The second [thing-a-month](@/projects/thing-a-month.md) project is a "random time tracker" I'm calling tinyping.

This month, I'll be exploring writing something like [TagTime](https://doc.beeminder.com/tagtime) that I (and others) can use for better awareness of moods and how we spend our time.
It works a bit like [TagTime](https://doc.beeminder.com/tagtime) and is good for getting a better awareness of moods and how I (and others) spend our time.

There are two big challenges here for me:

1. Understanding enough of the statistics to get useful results.
I think I've already go an OK understanding, but this will test that assumption.
However, it looks like the underlying math is actually fairly simple! ([1](@/micro/thing-a-month-03-01.md), [2](@/micro/thing-a-month-03-02.md))
2. Building something that can ask for discreet updates in enough places to be useful.
This probably means making a native app of some kind to use the right notifications APIs.
This probably means making a native app of some kind eventually to use the right notifications APIs.

Of course, part of the challenge here is to keep things as small and simple as possible, so we'll see how much work is actually necessary!
I started this in March and [continued into April](@/micro/thing-a-month-04-01.md) with the goal of getting something usable by the end of the month.
3 changes: 2 additions & 1 deletion content/projects/thing-a-month.md
Expand Up @@ -2,7 +2,7 @@
title = "thing-a-month"
description = "making cool stuff in a time-constrained way"
date = 2024-02-06T12:00:00-06:00
updated = 2024-03-04
updated = 2024-04-01

[extra]
when = "now"
Expand All @@ -22,3 +22,4 @@ Point is: they can't be huge years-long projects.
Thing-a-month projects:

- February 2024 (month 0): [setting the stage for the rest of the project with infra improvements](@/projects/thing-a-month-meta.md)
- March+April 2024 (months 1 and 2): [awareness through random time tracking](@/projects/thing-a-month-awareness.md)
25 changes: 25 additions & 0 deletions flake.nix
Expand Up @@ -153,12 +153,37 @@
'';
};

packages.bytes-zone-jpegs = pkgs.stdenv.mkDerivation {
name = "bytes.zone-jpegs";
src = builtins.filterSource
(path: type:
type == "directory" || builtins.match ".+jpe?g$" path != null)
./static;

buildInputs = [ pkgs.imagemagick pkgs.jpegoptim ];
buildPhase = ''
for file in $(find . -type f); do
mogrify -resize "2048x>" "$file"
jpegoptim --max=90 --strip-all --all-progressive --overwrite "$file"
done
'';

installPhase = ''
mkdir -p $out/share/bytes.zone
for file in $(find . -type f); do
mkdir -p $out/share/bytes.zone/$(dirname $file)
mv $file $out/share/bytes.zone/$file
done
'';
};

packages.bytes-zone = pkgs.symlinkJoin {
name = "bytes.zone";
paths = [
packages.bytes-zone-css
packages.bytes-zone-fonts
packages.bytes-zone-js
packages.bytes-zone-jpegs
packages.bytes-zone-pngs
packages.bytes-zone-public
];
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 82170f6

Please sign in to comment.