funbike

joined 2 years ago
[–] funbike 2 points 2 years ago

The best path depends you how much you like to tinker, your preferences, and your target platform. The learning curve is massive for either, and even after that it will take a lot of plugins and configuration to get close to feature parity of an IDE.

You might consider an IDE plugin at first. For example, there's a VSCode plugin that integrates actual Neovim as the editor. There's a Jetbrains (intellij, android studio, webstorm) plugin, IDEAVim, that very closely emulates Vim.

All that said, I use Neovim and prefer it over Emacs. The excellent Lua support in Neovim has eliminated the biggest complaint I had with Vim (vimscript vs LISP). Neovim has LSP support and can communicate with the same language backends that VSCode uses.

No matter what you do, learning Vim keybindings can be very useful as a lot of websites and local apps support it (e.g. gmail, github, less, lazygit).

[–] funbike 1 points 2 years ago

Look into "Hexagonal Architecture", similar/synonymous to clean/ports&adapters/onion. As someone else said, combine it with "Repository" pattern.

I use hex arch in front end and back end. It adds a couple of layers, but it makes apps much easier to test and maintain.

[–] funbike 3 points 2 years ago* (last edited 2 years ago)

Yes, but it's a very rare event. Maintaining state (form fields) makes it less of an issue. As I said, most deploys are at 4am at extremely low usage (usu zero), and even then a refresh is only needed if the backend has had breaking changes. A severe bug requires a mid-day deploy, but in my experience most severe bug fixes are only a few lines and therefore aren't a breaking change so don't require a refresh.

Our way wouldn't work well if you had 24 hours of heavy load, but most apps I've written have been US-only with low nightly usage (HR, K-12 admin, power grid, medical).

[–] funbike 6 points 2 years ago (2 children)

Zero downtime deployments can get very complex for heavy usage apps, such as blue-green deployment.

We decided to avoid the complexity with some practical workarounds.

  • Most deployments happen at 4am. "develop" branch merges deploy at 4am, and "master" branch merges deploy immediately.
  • We force browser refresh if the front end detects the back end has had breaking changes. We attempt to re-populate form field values.
  • During database migrations, we send 503 with Retry-After header in response to POSTs. Our client code knows to wait for that time and try again. If the time is too long, the user gets a friendly message that it will try again in X seconds. GETs are handled by an available read-replica, if possible.
[–] funbike 2 points 2 years ago

TIL about "@" and git blame -M/-C. Thanks!

[–] funbike 5 points 2 years ago* (last edited 2 years ago)

Here's my simple formulas based on how much I would normally make: Short term hourly = Yearly Salary / 1000. Long-term (2+ months) hourly = Yearly salary / 1500.

So, if your salary before being a contractor was $200K, then you would charge $200/hr for short term work. For a 6 month job, you would charge $133/hr

[–] funbike 1 points 2 years ago* (last edited 2 years ago)

This sounds like vertical slicing (incl bounded contexts), which is my preferred architecture for a monolith. It gives you the flexibility to pivot architecture more easily.

I suggest you look into Evolutionary Architecture, with can help keep vertical slicing

We've gone all-in with SSR+FaaS (aka JAMStack) with multiple projects. You get similar benefits to microservices, but without the complexity. However, hosting can be more expensive under high loads.

[–] funbike 2 points 2 years ago

I found TDD make programming more fun because it results in less debugging. Debugging can be frustrating and depressing when you get stuck.

I've found ChatGPT makes coding more fun, as I don't get stuck as often on hard problems and it can generate boilerplate quick than I can.

Watch videos by Primeagen on Twitch and YT. He's very high energy. Although successful, He has also struggled with depression, drugs, and ADHD in his past, which might be helpful to you. It's inspiring.

[–] funbike 7 points 2 years ago

Buy a work laptop and only use it for work.

Don't do any work on your existing personal desktop system, and don't do any fun non-work activities on your work laptop. Further, you shouldn't work at the same desk as your desktop. Keep work and play 100% separate.

You should be able to write off the laptop on your taxes.

view more: ‹ prev next ›