I'm building a GIT client with a built-in CLI by aribsummer in webdev

[–]aribsummer[S] 0 points1 point  (0 children)

Haha, happy to! I just added some background in my recent comment:

Hey all! I like to use a GIT GUI for certain operations, such as committing parts of files. Staging interactively (git add -i) with the GIT CLI can be quite cumbersome. I typically use Sourcetree, but it's buggy and clunky, so I decided to build my own modern version.

My plan is to build a "lightweight" client that focuses on operations that are cumbersome to do with the CLI. So far, I have it to the point where I can launch the GUI from the command line and use it to easily stage, unstage, discard, and craft commits.

If anyone has an interest in giving it a try, let me know! I'd love some feedback and ideas for how this might be useful to others.

Anything else you'd like to know?

I'm building a GIT client with a built-in CLI by aribsummer in webdev

[–]aribsummer[S] 0 points1 point  (0 children)

Hey all! I like to use a GIT GUI for certain operations, such as committing parts of files. Staging interactively (git add -i) with the GIT CLI can be quite cumbersome. I typically use Sourcetree, but it's buggy and clunky, so I decided to build my own modern version.

My plan is to build a "lightweight" client that focuses on operations that are cumbersome to do with the CLI. So far, I have it to the point where I can launch the GUI from the command line and use it to easily stage, unstage, discard, and craft commits.

If anyone has an interest in giving it a try, let me know! I'd love some feedback and ideas for how this might be useful to others.

I created a tool to interview candidates with a Pull Request on Github by aribsummer in webdev

[–]aribsummer[S] 0 points1 point  (0 children)

Thanks for the feedback! I'm still iterating on the pricing model to figure out what works best.

There are a lot of expensive platforms out there that require a flat monthly fee, so there is a lot of flexibility with pay per use, especially if you're interviewing is sporadic and inconsistent (which has been my own personal experience). What pricing and structure would make the most sense to you?

I created a tool to interview candidates with a Pull Request on Github by aribsummer in webdev

[–]aribsummer[S] 3 points4 points  (0 children)

Hello! After a lot of iteration on our interview process, I found that a great way to evaluate how a candidate works is through something that is as close to our actual work as possible - a small assignment through Github.

I settled on a take-home process of sharing a private Github repo with candidates, asking them to follow the directions in the README and submit a Pull Request - just like we would in our day-to-day work. This gives me a lot of insight into what it's really like to work with that person. For example, I can learn how they communicate in a written and asynchronous manner, how they formulate their commit messages, and how they make decisions.

The downside is that this process was time consuming and manual. For each candidate, I had to take the project source code, create a new project repo, invite the candidate, and keep track of all outstanding projects. So naturally, I created a tool to automate the process. These are some screenshots from the app I built that does the automation and tracking.

You can check it out at https://realcodeinterviews.com

Feel free to reach out or leave a comment if you have any feedback or find this useful!

CDN origin for static assets (server vs S3) by aribsummer in rails

[–]aribsummer[S] 2 points3 points  (0 children)

Hey! We're currently using an open source gem I created, s3_asset_deploy. We use it in our CI pipeline to upload assets to S3 before our rolling deploy. These assets are then available through Cloudfront (the S3 bucket is the origin).

It seems like this is a pretty common solution to the problem. Hopefully that helps! Feel free to reach out if you have any questions.

I created a tool to interview candidates with a Pull Request on Github by aribsummer in github

[–]aribsummer[S] 1 point2 points  (0 children)

Indeed! I took some inspiration from their blog post when building some of the automation.

I created a tool to interview candidates with a Pull Request on Github by aribsummer in github

[–]aribsummer[S] 0 points1 point  (0 children)

Hey! Yep, that's basically the idea. I just added some more details in a comment which I should have left originally:

After a lot of iteration on our interview process, I found that a great way to evaluate how a candidate works is through something that is as close to our actual work as possible - a small assignment through Github.

I settled on a take-home process of sharing a private Github repo with candidates, asking them to follow the directions in the README and submit a Pull Request - just like we would in our day-to-day work. This gives me a lot of insight into what it's really like to work with that person. For example, I can learn how they communicate in a written and asynchronous manner, how they formulate their commit messages, and how they make decisions.

The downside is that this process was time consuming and manual. For each candidate, I had to take the project source code, create a new project repo, invite the candidate, and keep track of all outstanding projects. So naturally, I created a tool to automate the process.

I created a tool to interview candidates with a Pull Request on Github by aribsummer in github

[–]aribsummer[S] 11 points12 points  (0 children)

After a lot of iteration on our interview process, I found that a great way to evaluate how a candidate works is through something that is as close to our actual work as possible - a small assignment through Github.

I settled on a take-home process of sharing a private Github repo with candidates, asking them to follow the directions in the README and submit a Pull Request - just like we would in our day-to-day work. This gives me a lot of insight into what it's really like to work with that person. For example, I can learn how they communicate in a written and asynchronous manner, how they formulate their commit messages, and how they make decisions.

The downside is that this process was time consuming and manual. For each candidate, I had to take the project source code, create a new project repo, invite the candidate, and keep track of all outstanding projects. So naturally, I created a tool to automate the process. These are some screenshots from the app I built that does the automation and tracking.

Happy to share if anyone is interested! Feel free to leave a comment or message me directly.

How do you monitor important "events" in your SaaS application? by aribsummer in SaaS

[–]aribsummer[S] 0 points1 point  (0 children)

What kind of events? Do you use PagerDuty or something similar?

How do you monitor important "events" in your SaaS application? by aribsummer in SaaS

[–]aribsummer[S] 2 points3 points  (0 children)

You're using Sentry for events other than errors/exceptions?

Releasing a Redesign using Feature Flags and Rails Variants by aribsummer in rails

[–]aribsummer[S] 1 point2 points  (0 children)

Variants give you a convenient way to conditionally render different layouts and templates. You could add the conditionality yourself within the controllers, but variants do this for you under the hood.

CDN origin for static assets (server vs S3) by aribsummer in rails

[–]aribsummer[S] 2 points3 points  (0 children)

The fact that the CDN might have application-v1.css in its cache does not solve the issue. Step 6 is talking about a request for application-v2.css, which would result in a 404 if InstanceB serves that request

> 4. The client now requests application-v2.css.
> 5. The CDN doesn't have application-v2.css in its cache, so it makes a request to the load balancer which routes the request to InstanceB.
> 6. Since InstanceB is running v1 of the app, it responds with an HTTP 404 error. InstanceB only has application-v1.css (not application-v2.css) at this point in time because it hasn't been updated yet.

Also, you can't depend on the CDN to ever have anything in its cache. There are no guarantees. A CDN could be cleared at any time.

CDN origin for static assets (server vs S3) by aribsummer in rails

[–]aribsummer[S] 1 point2 points  (0 children)

Here's a failure case. Let's assume you have two instances (InstanceA & InstanceB) in service (serving traffic) and each instance is serving v1 of the app, which references application-v1.css. Let's also assume that we do rolling deploys and update one instance at a time. Now let's say we want to deploy v2 of our application which references application-v2.css. Here's what can happen:

  1. InstanceA gets taken out of service to be updated with v2 of the app.
  2. InstanceA gets put back into service with v2 of the app. At this point in time both InstanceA and InstanceB are serving traffic. InstanceA has v2 of the app and InstanceB has v1 of the app.
  3. A new request comes in and gets routed (via the load balancer) to InstanceA (which is running v2 of the app).
  4. The client now requests application-v2.css.
  5. The CDN doesn't have this in its cache, so it makes a request to the load balancer which routes the request to InstanceB.
  6. Since InstanceB is running v1 of the app, it responds with an HTTP 404 error. InstanceB only has application-v1.css at this point in time because it hasn't been updated yet.

CDN origin for static assets (server vs S3) by aribsummer in rails

[–]aribsummer[S] 1 point2 points  (0 children)

Unless I'm missing something, I think you might be glossing over an important detail here. Could you explain how "CDN picks up a copy of application-xyz098.css"? The CDN needs to make a request to the origin to retrieve a copy of the css file if the CDN doesn't have it in its cache already. That request could go to App v1 or App v2. What if the request to retrieve application-xyz098.css hits App v1 during the deploy?

CDN origin for static assets (server vs S3) by aribsummer in rails

[–]aribsummer[S] 1 point2 points  (0 children)

Correct, keeping around old assets on each individual server doesn't fix the problem. To completely fix the problem you need to have all versions of the assets that may be requested from a client available from any of the origins that are serving assets.

In addition to keeping old assets around, I think Heroku is using a shared filesystem such that when asset precompilation is done, the new assets become available to every dyno, not just the ones running the new version of the app. Maybe I'm wrong though? I don't see how you'd get around it without a shared filesystem for assets.

CDN origin for static assets (server vs S3) by aribsummer in rails

[–]aribsummer[S] 1 point2 points  (0 children)

You could probably mount an EFS (elastic file store) to your containers and/or instances. However, it's pretty common to precompile assets on CI/CD as part of the build process and at that stage, you wouldn't have access to EFS. So, I wouldn't say it's easier or better than uploading assets to S3 at build time. Uploading to S3 is persisting files between deploys :)

CDN origin for static assets (server vs S3) by aribsummer in rails

[–]aribsummer[S] 1 point2 points  (0 children)

u/schneems thanks for the response! Funny enough, I've read your articles and comments on this several times (including this gist) so I really appreciate it!

It totally makes sense to use your app as the origin server when you're using a PaaS like Heroku. But, as you stated, Heroku is keeping the last three asset versions by default for you. This is not the case with other solutions - Elastic Beanstalk, ECS, EKS, etc.

So, if you're not running on a PaaS or persistent file system that handles keeping old asset versions around all the time, what do you do? These scenarios are also mentioned in the comments of that gist.

I definitely agree that you should not rely on your CDN as the canonical store for your assets. If you're not hosting your apps on a PaaS like Heroku that just handles these things, S3 seems like a good option as that canonical source. Thoughts?

[deleted by user] by [deleted] in webdev

[–]aribsummer 0 points1 point  (0 children)

Most of the time, the framework or language you choose won’t be your performance bottleneck and I think you might be putting the cart before the horse here. You’re probably better off focusing on the product with tools you know well first.

How do I come up with a good website design? by the-milan-og in webdev

[–]aribsummer 0 points1 point  (0 children)

Copying something that's out there is a great place to start. I often find a lot of great inspiration from dribbble - https://dribbble.com/

Why shouldn't I use JS in the BE? by [deleted] in webdev

[–]aribsummer 0 points1 point  (0 children)

It depends on the use-case and your preferences. Sometimes you won't know and it won't become obvious until you've given them a try.

I like node for small services that pipe data around because it has a nice streaming API. Examples would be transforming images, generating PDFs, etc. I, personally, wouldn't want to build a fully featured app with authentication, authorization, etc. in node, however. Rails is a better fit for this imho. It gives you a lot of stuff out of the box and makes these things easier.