projects | blog


[all the things] [rss]

May 27, 2024 4:30 PM

Jigsaw puzzles

I used to love doing jigsaw puzzles. I remember the first 1000 piece jigsaw puzzle I ever finished. I was in middle school. It was a collage of stamps. It was honestly a pretty easy puzzle, but I swear it took me months. I was immediately hooked though, and people around me must have noticed it too because I started getting puzzles as gifts.

_______ |_ _| _) (_ (___ __\ (_)

One Christmas, I remember getting one of those huge boxes with 12 jigsaw puzzles in them, 500 - 1000 pieces each. I would finish a whole jigsaw puzzle in one day, and I was done all of them by the time winter break was over. My family would keep all the finished puzzles, intending to eventually hang them up one day. We never did. I never cared for the finished product. I just thought that putting pieces in their proper place was fun.

_ _( )_ | | ) ( |_ _| (_)

I didn't really do as much jisgaw puzzling once I left college, but the craze started up again when one of the admins at work left a jigsaw puzzle out in the cafe. I thought it was just going to be a one-time thing, but when we finished the puzzle, another one was brought out. And another one after that. And we're still getting new jigsaw puzzles in the cafe today!

_ __ _/ Li | (_ _ C \_( )_;

My favorite one was a photo of a hot air balloon, and the reverse side of the puzzle was that same hot air balloon, but rotated 90 degrees. It was a really hard puzzle, and many of my co-workers frequently put pieces in the wrong place, and I had to fix them. I was known as one of the most avid jigsaw puzzlers at work.

__ _ _| l_j |_ (_ _ _) |__/ }_/

But then something happened. I don't know if I could really pinpoint when it happened, but I stopped working on the puzzles. There were too many, and I was way too busy with actual work things. GSG broke me.

_ _( )_ |_ | _) | |_ _| (_)

Every once in a while, I would walk over to the current puzzle, and I'd put a single piece in its place. That was all I could ever do at once. I wasn't really feeling the puzzles, but my co-workers would often work on them together, and I wanted to be a part of it. So I tried to just contribute at least one piece to each new puzzle that came out.

_ _ _| U \_ (_ _) l_n_j

And that continued for years. Once COVID hit, barely anyone was coming into the office, and the same puzzle would sit unfinished for many, many months.

_ _( )_ |_ ;_ _] __) |_ _\ {_)

And then all of a sudden, just about a month ago, another switch seemed to go off in my brain. I was coming into work more regularly again, and I noticed that the puzzle in the office was a really pretty painting of the beach, with a turtle and a bunch of colorful seashells. I did my usual connecting of two pieces together, but instead of going back to my computer, I picked up another piece. And another. And another. I wanted to keep working on the puzzle. And the next time that I was in the office, I wanted to work on it again until it was done.

______ ______ | _| | | (_ _ | |__ _|__( )_| | (_) |_ | | _) | |______\______|

I knew it wasn't just this particular puzzle that grabbed me, because after I finished the beach puzzle, I felt a little tinge of excitement when I saw that there was a new puzzle sitting out.


February 27, 2023 5:58 PM

Commits

I've heard that a lot of programmers sometimes get "in the zone". They're working on implementing something new, and they've got all these ideas in their brain and they're just pounding out lines and lines of code, and the hours just melt by. They don't want to get up. They just want to keep coding until they're done, even if it's past End-Of-Day.

I mentioned a few posts ago that I don't really get in the zone when I'm writing code. But I think the closest I ever get to feeling that way is when I'm done making all my code changes and I start making commits. Git commits.

I don't think I have strong opinions about too many things in the tech space, but I care a lot about commit messages. Every time there's a new dev on my team, and I review one of their PRs for the first time, I always point them to How to Write a Commit Message. I know I'm never going to get the hundreds of developers at the company to abide by these guidelines, but damnit I'm gonna try.

I rarely ever make a pull request with just one commit in it. I start with a gigantic diff, and I try to break it apart into smaller, easier to digest pieces. "Okay, first, I'll commit changes I made to the schema of this table, and then I'll make this change to the model layer, and then I'll work on the controller,..." When I make bug fixes, I start by adding a commit that adds a failing assertion, and I commit it by itself:

Exposes a bug in the code. This will fail as of this commit

The order matters too. If I made changes to five different files, what order do I want the reviewer to look at them in? I want to be able to guide the person, and not have them feeling overwhelmed because there are so many changes. I want them to know why I made certain choices in the code, and what parts of my change I feel unsure about.

The act of organizing everything helps me find places in my code that could be improved as well. Does this method need better documentation? Can I easily read this from top to bottom?

And I'll even throw in pointers for looking at a diff:

Look at this diff with the -w option, and you'll see that the only things I changed here were whitespace.

Use the --color-moved flag to see that I didn't add any new logic, just moved it from one spot to another.

And when I can't make something easy to digest, I'll say that too

This diff is kind of a mess, so I'd just recommend looking at the method in the file itself.

In the end, if I'm happy with everything, it feels like I've created something beautiful. At least to me.

Sometimes I wonder, is it really worth it for me to take an extra four hours just for committing? I know for a fact that some people I work with don't even read the commits. They just look at the full diff in bitbucket. And then I get a comment like this:

Why did you remove this line?

And in my head I'm thinking "Well if you read the commit message that went along with it, you'd know exactly why I removed it >.>"

But this scenario is slowly becoming less and less common.

A few weeks ago, everyone on my team was tasked to find an example of good documentation in the code. And one of my co-workers brought up my 30+ commit pull request, and said that even though it was large, it was very easy to follow. It was easy to see which parts of it were simple, and which other parts required a more thorough review. I think I spent a whole day putting those commits together, and it made me feel so good to know that it made a difference. For me, it was one of the most thoughtful comments I've ever gotten about my code.


May 17, 2021 6:19 PM

The food blog before the food blog

This is a set of 9 10 blog posts that I wrote in 2018, detailing the food the I made and ate over the course of 9 10 weeks. I had a very specific goal of having a $30 a week food budget, and I basically failed that because I always do :P I had considered just inserting these entries at the time that they were written, but I decided I wanted one long-ass blog post instead. With commentary!

Weekly Food Review 1: 8/10 - 8/17

Welp, one week in, and I've already failed to stay within my food budget. It really wasn't too bad considering I did stay under $30 in groceries, but I gave myself a special birthday treat and I was also obligated to get coffee at a programming meeting. (Girl Develop It! I miss those meetups)

Groceries: $29.08
Coffee: $2.94
Eating Out: $11.28
Total: $43.30

90% of the meals I make are from Budget Bytes (If you've never checked out this blog, you need to. It's amazing. I think it actually changed my life.) So this week I made three different dishes:

If you actually read through those recipes carefully, you'll notice that I stretched out the chicken skillet to 5 meals--one of the meals just didn't have much chicken, and I supplemented it with an egg. I actually still have one more meal of this left. I also really stretched out the salmon meal, but that's because I bought over a pound of salmon and a pound of green beans.

I don't know if it was because I ate way too much in the two weeks prior to this, but I was feeling really hungry a lot of the time. For next week, I'm going to plan four dishes and make the portions a little larger. I know, I still need to stay within my budget. Salmon was about a third of the grocery bill, so I think I can replace that with something cheaper and more filling. For this first week, I didn't actually think about how much each meal would cost, nor did I utilize much that was already in my kitchen or think about what foods were on sale.

My eating out meal was at a fancy restaurant because I had a $30 off birthday coupon! (Man I also miss birthday coupons) Of course I still ended up spending a lot on it because of tips. I've already committed to a meal out next week, but I'll actually try and see if I can keep my grocery bill under $20 for this next week.


May 16, 2021 12:26 PM

Ascii art

I first learned about ascii art back in the days of AIM when I would talk to SmarterChild. My middle school self thought that this chatbot was so cool. Obviously it was programmed to just talk to you, but it also had some other fun content like facts and games. It had a section filled with ascii art, and I spent one day just looking through every single piece of art it had.

After that, I went googling around to look for other ascii art, and I stumbled upon a really cute story which is something that I still consider one of my absolute favorite pages on the internet. Unfortunately it doesn't exist anymore, and it took me a while to even find that link. Thank goodness for the internet archive.

I was so inspired by "Fixed Width Days" that I wanted to create my own ascii art. I had created a site on GeoCities where I would put all the ascii art I typed up. Unfortunately, that doesn't exist anymore either, and it was taken down at a time in a my life where I guess I had other distractions, so I didn't save anything D: One of these days I'd like to present my own ascii art story.

_ _ .-~-. .-~-. ( `v' ) .-~-. .-~-. `-...-' `-...-' `. .' `-...-' `-...-' " Because I have to put some amount of ascii art in a post about ascii art

Until then, I'll keep making little pieces of ascii art here and there. I don't know anything about art, but there's just something I find so satisfying about using text to form pictures. I feel the same way about websites that look like they haven't been updated since the 90s. I've always wanted my own space on the internet that captured this feeling (while still somehow being mobile-friendly, because I guess that's important :P) and I think I've finally been able to do that with this personal site.


January 6, 2021 9:12 PM

Rubik's Cube

A few weeks ago, one of my coworkers told me he learned to solve a Rubik's Cube. I learned how to solve one in middle school, but I was never able to get really fast. One day, after I was kind of exhausted from work, I decided to pick mine up again to see if I remembered how to solve it.

I think it's like riding a bike.

.-'`'-. .-'`'-. .-'``'-., ,.-'``'-. .-'``'-., ,.-'``'-. .-' `'-., .-'` `'-., .-'``'-. .-' `'-., .-'` `'-., .-'``'-. ("=. ,.-'``'-., ,.-'``'-. ,.=") ("=. ,.-'``'-., ,.-'``'-. ,.=") | |"=., .-'` `'-., .="| | | |"=., .-'` `'-., .="| | | | |`"=.,.="`| | | | | |`"=.,.="`| | | |`-.,| | # | |,.-'| . |`-.,| | # | |,.-'| | |`-.,| # |,.-'| | -----|`. | |`-.,| # |,.-'| | | | |`-.,#,.-'| | | -----|,' | | |`-.,#,.-'| | | |`-.,| | # | |,.-'| " |`-.,| | # | |,.-'| | |`-.,| # |,.-'| | | |`-.,| # |,.-'| | ( | |`-.,#,.-'| | ) ( | |`-.,#,.-'| | ) '-. | | # | | .-' '-. | | # | | .-' `'-.,| # |,.-'` `'-.,| # |,.-'` `'-.#.-'` `'-.#.-'` Was this tedious to color? Absolutely. But it was a little better since I used my colorizer tool.

So, I suddenly decided on a new goal for the holidays. I would try to get a lot faster at solving the Rubik's cube. The method that I already knew is a layer by layer method that goes like this:

  1. Make a green cross
  2. Solve the first two layers
  3. Make a blue cross (2 possible algorithms, possibly performed twice)
  4. Orient the blue corners (1 algorithm, possibly performed twice)
  5. Get all blue on the top (2 algorithms, possibly performed twice)
  6. Fix the top edges (1 algorithm, possibly performed twice)

This beginner method works in a way such that you don't have to memorize too many algorithms. Some algorithms need to be performed multiple times to make this work, but it's easy to learn. I was able to solve the cube in just under 2 minutes this way. There are a lot of websites out there that teach this (though most go white -> yellow instead of green -> blue).

So, how was I going to get faster? Learn more algorithms and take less steps. When I was younger I wanted to learn the Fridrich method, but it was way too much for my 11 year old brain to handle. I would have to learn 53 algorithms. That still sounds like too much for my 28 year old brain to handle. But, I started with the most common algorithms and slowly started adding more to my brain.

I first had to go and learn all 13 last layer permutations. Except it's more than that because some of these you might have to perform backwards or flipped. There were actually 19 permutations that I needed to learn. But I just started with the most common ones and slowly added more to my memory. I also realized that this was a really good use for utilizing Anki flashcards. Once I got this down, I was able to completely remove step 4.

I also wanted to change step 5 from "possibly 2 actions" to "only ever 1 action". It was actually pretty common for this to require 2 separate actions. When I get to this step, I definitely have the blue cross. Looking at all the orientations, there were only 5 other patterns that have a cross on top. I don't know if it was because I had flexed my memory muscles with 19 algorithms already or because the orientation algorithms were just simpler, but adding 5 more patterns to my memory bank was actually really easy.

So at this point, I've shaved my Rubik's cube time down to about a minute. I think I've learned enough patterns to satisfy myself, and I'm just practicing it every day and logging my times in a spreadsheet to see if I can get faster.