DEV Community

How I broke on my First PR

Today I made my first PR to, which lets you add options to glitch embeds. I struggled to install the requirements and build the app, wrote unit tests for the new features, learned my first bits of ruby, and after a few hours of playtime, submitted the PR. It was quickly accepted, โœจTHANKS, @ben !๐ŸŒŸ

That's when I noticed that every single glitch embed on the entire site was broken


Thanks to @rhymes , for pointing the problem out:

I think there's a bug somewhere, because now if I try to embed this:!/familiar-violet

with {% glitch familiar-violet %} or {% glitch familiar-violet app %} I get the 404 page


a glitch indeed :P

The solution was as face-palmy as the bug itself: I left out the # which designates an interpolation in ruby strings:

-    src={@uri}
+    src=#{@uri}
Enter fullscreen mode Exit fullscreen mode

A fun learning exercise for me. I sincerely hope that my oversight didn't cause any inconvenience.

New PR is in flight, once the fix is live I'll write a regression test.

Discussion (8)

ben profile image
Ben Halpern

Ah crap. I did not review this carefully enough. Merging the fix.

bennypowers profile image
Benny Powers ๐Ÿ‡ฎ๐Ÿ‡ฑ๐Ÿ‡จ๐Ÿ‡ฆ Author

no biggie. < 30 minute turnaround for the hotfix is pretty good, i'd say. Thanks for the merge !

citizen428 profile image
Michael Kohl

What editor are you using? These two should highlight differently, which makes it a lot easier to spot mistakes like this one:

vscode highlighting

bennypowers profile image
Benny Powers ๐Ÿ‡ฎ๐Ÿ‡ฑ๐Ÿ‡จ๐Ÿ‡ฆ Author

Totes. I've got a fairly intense atom setup including Ruby highlighting. Thing about cognitive load is that the error could be literally right in front of your eyes and right under your fingertips and you still might not catch it.

codingmindfully profile image
Daragh Byrne

Respect for your ownership of this! I'd rather work with someone who made mistakes and owned up to them than someone who never tried things.

First week on one job I made a mistake that was released to production by my line manager, ended up costing the company $100k or so... reviews are important!

rachelsoderberg profile image
Rachel Soderberg • Edited

Haha, nice job! I've missed a good number of similar characters - when it happens I remember the advice my manager gave me "The longer you stare at a problem, the smaller it is".

Yesterday I could not figure out why I couldn't update to a certain SQL table. Turns out SalesOrderId "108110" is very different than the "180110" I was attempting to query. When I asked him for his input, all he did was repeat the query back to me and I immediately realized I was a goof. :)

bigj1m profile image
Jean-Michel Plourde

Errors happen. Usually that's what review are for, catching bugs before release. It's not entirely your fault if it went live ;)

bennypowers profile image
Benny Powers ๐Ÿ‡ฎ๐Ÿ‡ฑ๐Ÿ‡จ๐Ÿ‡ฆ Author

Totally. I'm grateful for the chance to work in the open and participate in transparent, blameless post-mortems. That's the future of working relationships, and what better place is there to practice it than here?