Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some suggestions #312

Open
NicholasLYang opened this issue Mar 2, 2021 · 4 comments
Open

Some suggestions #312

NicholasLYang opened this issue Mar 2, 2021 · 4 comments

Comments

@NicholasLYang
Copy link
Contributor

NicholasLYang commented Mar 2, 2021

Hi, original author here (well, one of them). I've been keeping an eye on the code and the various maintainers. It's really great that you guys are keeping this running. Honestly I kind of impressed that it's lasted this long.

There's a few lingering problems that we never got around to fixing. I'd recommend looking into them:

  • Bundle size. Right now first contentful paint is pretty darn slow. Part of that is the pretty large 1.16mb bundle. This is partially our fault. We pulled in a lot of libraries that inflated our bundle significantly. I'd look to see if you can trim it down using tools like webpack-bundle-analyzer. If not that, then at least make sure that the server is using gzip on the bundles.
  • TypeScript. We wrote most of the code in vanilla JavaScript. I know that some work has been done to move it to TypeScript, but a full migration would go a long way to fixing bugs.
  • Backups. This is pretty important. The database afaik is hosted on RDS, which does do automatic backups. However, someone should also try to do a full dump to a secondary location.
  • Database. We chose postgres because it's commonly used with Rails and because we mistakenly thought it was necessary. In retrospect, we probably could have used SQLite and been just fine. RDS is super expensive for very little gain. With SQLite, you don't have to use a secondary server and backing up is a file copy.
  • Styles. One of us (cough not me cough) managed to design the majority of this site without knowing flexbox or grid. Therefore there's a lot of brittle, old fashioned styles in the code. I'd highly recommend learning flexbox and grid, then rewriting a lot of the styles.
  • Hooks. The code was written in 2016-2017 which makes it ancient by front end standards. Back then the standard way to add functionality to components was Higher Order Components. These days it's hooks and tbh they compose way nicer and work way better with TypeScript. I'd recommend moving off HOCs, especially since libraries are probably deprecating them.
  • Dead code. There's a bunch of dead code in the repo, mostly around comments. I'd strip it out just for cleanliness. Oh yeah, also we used a template written by my friend. Some of the code in that template isn't needed anymore. Not exactly sure what, but you can try deleting stuff and seeing what happens.
  • Font. I noticed y'all changed the masthead font back. I'm not necessarily opposed to that but the reasoning behind that change was literally everybody mentioned how the site looks like the New York Times (which it doesn't btw, it looks like a cross between the New Yorker and NYT). Changing the font was an attempt to move away from that. If I could change more of the site, I'd make it more like The Paris Review or possibly Harpers.

Hope these notes are helpful. If you want any more feedback or help, feel free to reach out!

Nicholas

@AndySok
Copy link
Contributor

AndySok commented Mar 2, 2021

Holy cow! Thanks for such a long list of suggestions Nicholas! The fact that you even bothered to take a look at the code is what I'm grateful for. I'm going to add most of the suggestions that you've put here into the todo list document, and we're also most likely going to discuss some of the proposals like the font and the styles during future spec classes. But still, we appreciate the feedback c:

@AndySok AndySok added this to To Do in SpecWeb 2021 via automation Mar 2, 2021
@NicholasLYang
Copy link
Contributor Author

Sure thing! Glad to help. I'm mostly interested in keeping this site alive and running for as long as possible. Or at least until another set of upstarts decides to rewrite haha.

@DJankauskas
Copy link
Member

Personally I agree with all of Nicholas' points. One thing I'd add on: trying to rewrite all the styling of the site would be pretty daunting, so I'd suggest starting with the homepage. It honestly could use a redesign, and it has issues like out of date and repeated articles as well.

I really recommend reaching out to Nicholas; he was an extraordinarily helpful person to talk to back when I was an editor. If you want any advice, code review, or anything else, feel free to reach out to me as well! Like Nicholas I want to see this site grow and improve for as long as possible.

Darius

@jsonkao
Copy link
Member

jsonkao commented Mar 12, 2021

Hello all. Original author here. Well, one of them. So I am your great-great-grandfather? I agree with all of Nich's points. Proud of all of you for going through high school rn, and also keeping this alive.

selfie-0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

4 participants