DEV Community


Posted on

Taming Phoenix (Framework)'s Wild West amid the crippling indifference of Lockdown San Francisco

Skip ahead to the part about software

The pandemic gave all of us trials we never expected to face. For some, going to bed became an uncomfortable, surreal struggle, while others had a hard time leaving bed completely behind once they had to start their day. Everyone got lonelier (in the U.S., at least), and some people confused small pieces of cloth over their mouth for threats to democracy. Then many of those same people threatened democracy. And, of course, all of this happened against the backdrop of a lot of people getting sick and dying, both of which make it really tough to grease the wheels of Industry by throwing ourselves onto the gears1.

But I was one of the lucky ones. A person who, even before to the pandemic, had weird dreams aplenty, and no reason to put on pants in the morning; who could distinguish between a public health precaution and an attempted violent overthrow of a peacefully-elected government; who had known loneliness ever since childhood and therefore regarded all of this sheltering-in-place as just another snow day. Most importantly, of course, was the fact that I did not succumb to the horrible illness ravaging the planet. So everything was golden and there were no problems.

Or weren't there? As it turns out, having the most significant events of my life in 2019 be that my best friend abandoned me over a misunderstanding on Independence Day; a company whose work I really believed in fired me in my first 10 days there (and a week before my birthday); another company — who made their offer (for more money) before the first job had even made theirs, and were gracious enough to hold the offer open for me — fired me in my first 3 months there (and a week before Christmas)2; and the few spokes of my support system being flung near and far around the world, meant that I spent all of 2020 and a few months of 2021 wrestling with the towering impression that… maybe the people most important to me, and so many colleagues, could so easily discard me because I truly was worthless, and discardable, to anyone and everyone, and that was how I would always be.

It wasn't at all helpful, either — while people would tell me the usual unemployment insurance requirement of looking for work was suspended in light of the fact that, well, nobody could go look for work, and then later that the unemployment office was offering additional financial support to every unemployed person regardless of circumstance — that despite filing for unemployment well into the throes of the pandemic, my benefits were still bound by the unsympathetic, mechanically-administered requirement of, yes, being able to prove I was looking for work, amid shelter-in-place mandates. I have no idea how much unemployment I was even awarded; I only know that I never received any of it. I was disposable, not only to the first real friend I'd made in the five years I'd been living in the Bay Area, and to both of the companies I'd worked for since mid-2018, but to California itself. It felt like I was being told, "You're emotionally devastated, and unsure of whether you even have any redeeming qualities? Well Tough. If you can't muster the energy and nerve to jump through hoops nobody else is being asked to jump through, then maybe you deserve to be going through debilitating emotional devastation."

Being a huge gamer, my first reaction was to bury myself in the quick satisfaction of challenge-reward loops and cleanly-packed, fully resolved internal narratives that only a PS4 and Nintendo Switch could provide3. Being a programmer, my second reaction was to start putting together a business I could build, scale, and maintain by myself.

And having those three goals – short feature turnaround as complexity increases, graceful (and inexpensive) scaling as the user base grows, and low maintenance and upkeep requirements as its usage ramps up – meant that I might not want to remain in my typical, Ruby on Rails, wheelhouse. A maverick doesn't need vibrant communities gathered around tried and true frameworks with incomparable stores of ready-built solutions to the implementation questions I might face.4

These goals would actually be best achieved by building my app in Elixir5 and the Phoenix Framework!6

Or would they actually? As it further turns out, having little to no guidance through the deep processes that are revealed by not-working-in-Rails has given me firsthand appreciation of just how mountainous, jutting, and craggy the terrain really is underneath the leveled-out, perfectly-trimmed lawn that not-not-working-in-Rails provides developers. In my comfy Rails homestead, questions like "How should I integrate with Github?", "What do I do to verify a webhook payload's signature?", and "OAuth?" weren't a matter of digging through reams of esoteric API documentation, and weren't even a matter of digging through one gem's esoteric readme, but were usually a matter of deciding which gem sparkled brightest amid's gleaming sea of options; each one eager for recognition, praise, and also, possibly, donations in order to help sustain the developer's basic need for survival idk.7

But dagnabbit, I've come this far with my ErlangVM-powered, stubborn, sometimes completely inscrutable functional programming workhorse. I'll be darned if I'm gonna let a little wandering through the desert as I'm dying of thirst make me turn around and reach for Ruby's object oriented, rocket-propelled horseless carriage, that's as configurable, simple, and easy to use as a LEGO playset with thorough, highly detailed instructions and examples. LEGO blocks are toys. I'm not building a toy, I'm building a robust, self-healing, high-uptime software application as a service (SAAaS)! User authentication is better when it takes you two weeks to implement!

But since I did have to figure out so much of this process through my own research, struggle, and persistent reiteration, I figure there might be other people out there, foolhardy enough to say "Maybe my next project would be a good fit for Elixir/Phoenix 🤔." You may be right, you beautiful dreamer, and to help you through some of the rough parts you might encounter, I'm gonna go ahead and tell you how I've been forging my trail. If it helps you cut your own path through this rugged, recursive frontier, then I've made a difference.

You can expect this series to receive regular8 updates about the snags, slowdowns, and showstoppers I've pushed through on my way to building a SAAaS9 on Phoenix in Elixir. That being said, if you felt concerned at all for my livelihood from reading that section I let you skip over, or if you find yourself appreciating the writing style of these tutorials, any amount you could donate to me through Ko-Fi would make you an honest lifesaver. I'm working on launching my business as fast as I can, but if I want to see it become profitable, first I need to be able to keep my head above water as rent, utilities, internet, phone, food costs, unforeseen expenses, the student loans I'm still repaying a decade later, and (last, but only second to rent in being the farthest thing from "least") interest on repayments all threaten to drown me.

In the meanwhile, soon I'll be publishing my first tutorial in this series, "Taming Github OAuth integrations with Überauth and Guardian (but then actually no just Überauth)", and will update this post with a link as soon as that went up fast! Read it here.

Donate to me through Ko-Fi, and be proud that you're keeping me alive

Being alive is nice!

  1. I think that's how that expression goes. 

  2. eeeeeyup. Not long stories, but ... not for here, not right now. 

  3. If you've never played Dragon Quest XI, Persona 5 (base or Royale), Watch Dogs 2, or Assassin's Creed either Odyssey or Valhalla … definitely don't start playing any of them during the long, dark night of your soul. 

  4. I would, of course, later come to question and regret my decision to eschew ready-built solutions to the implementation questions I have faced 

  5. Elixir is a great language on a great runtime, and once I have a production server up and running, I'm sure I will discover just how great. 

  6. Phoenix is similarly a great framework, but as I have learned, and as you will come to find, it suffers from both a substantial gap between features it provides and features you have to find for yourself, as well as a substantial gap between documentation that's quickly referencable and provides the answers you're looking for, and the documentation that it has. That's not to deride Phoenix or its documentation; explaining a piece of software is hard work, and I'm grateful for the literature its maintainers provide about its ins and outs; it's not as comprehensive as the Rails guide, but Rails has also been downloaded over 295 million times (from Rubygems, which is not where Rails was hosted for the first 45 versions it had) to Phoenix's 56 million total downloads. Bear witness to the network effect in action, people. 

  7. please donate to me via Ko-fi

  8. "Regular" in terms of once the data is smoothed out for irregularities, of course 

  9. I know it's not the abbreviation I'm just trying to be funny. I'm just trying to be funny, y'all 😢 

Discussion (0)