CS 373 Fall 2019: Week 10

Edmond Gagnon
Nov 4 · 3 min read
I’m starting to worry about all of my sore joints. Turns out walking five miles a day and sleeping three hours a night isn’t the greatest plan for not feeling like an old man.

I’ve planned a camping trip to an observatory I’ve always wanted to visit over the winter break. Now I just have to not die over the next six weeks.

What did you do this past week?

I spent, oh, sixty hours on Phase III — well, it’s really more of a “Phase II 2: Electric Boogaloo.” So many things were left undone at the end of the last phase, and a not-insignificant fraction of the team has been unresponsive to my requests for them to work on the many, many issues I wrote up and assigned. I learned that the backend team had failed to RTFM for Restless and thus done far, far more work than was actually necessary to run the backend. Given half the team’s chronic absences, I was so righteously indignant at this inefficiency that I rewrote perhaps 70% of the backend in idiomatic Restless overnight. I started at about midnight last night and stopped at 6:00 am because one of our scraping APIs went down and I was stuck until that came back up. I handed off the rest to the backend team with a hearty helping of documentation to avoid repeating past mistakes.

What’s in your way?

The number of hours in a day. The lethal dosage of caffeine. My laptop’s death rattle. The four or five miles I walk every day. The inexplicable one-byte difference that’s causing my OS project to fail a test. Databases in general. Lacking CI minutes. The 500-call-per-month ceiling on one of our vital APIs. Postman’s unbelievably frustrating interface.

What will you do next week?

I’ll likely finish the two OS projects I have due and pull a few more twenty-hour shifts cleaning up the Phase III codebase, rebuild the development stack for the third time, sacrifice credit card numbers to the Dark Lords of the Realtor.com API, and make absolutely certain that the project is done by the deadline, no matter the death toll.

What was your experience of SQL?

At the company for which I interned over the summer, the backbone of one of their core services was essentially a thousand-line string-interpolated Transact-SQL statement. Everything else was in stored procedures. I’ve too much trauma associated with raw SQL queries to enjoy writing it at this point.

On the other hand, SQLAlchemy and Restless make dealing with the database a breeze.

What’s your pick-of-the-week or tip-of-the-week?

In my fit of furious rearchitecting of the backend last night, I learned of a lovely little Python library called simple-rest-client. It allows you to interact with a proper REST API using actual HTTP verbs rather than the homebrewed trainwreck we had set up previously.

I rewrote most of the backend in Restless to allow automatic configuration of HTTP methods, then rewrote the scrapers to use simple-rest-client, completely eliminating the app context required to interact with the database. Everything is much cleaner and more separated.

    Edmond Gagnon
    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade