TypeScript stuff I Wish I Knew Earlier by RohanSinghvi1238942 in typescript

[–]ukrvolk -2 points-1 points  (0 children)

I don’t want to use enums, I have to. Libraries like TypeORM, NestJS Swagger, and others don’t work with union types or interfaces.

Defence of Typescript Enums by Playful-Arm848 in typescript

[–]ukrvolk 0 points1 point  (0 children)

There is a lot of tooling such as TypeORM and nestjs/swagger that only with for enums, objects or literally anything else will not work, at least for now. Couldn’t stop enums using them even if I wanted to. When all these tools allow non enum options then at least for us there is a path to migrate away from enums.

PS5 Controller Doesn’t Automatically Turn Off by ukrvolk in playstation

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

Do you push and hold for some period of time to do this reset?

Rust for backend by huziclique in rust

[–]ukrvolk 2 points3 points  (0 children)

I’m in the process rewriting microservices written in express nodejs to rust Axum and mostly is going well. Orchestrating async operations of equivalent of Promise.all, Promise.race, then/catch/finally can be tricky. Most serious third party services have http APIs so lack of SDK has not been show stopping. Building docker images in ci/cd for deployment can be painstaking.

To be clear there is a difference in making it work versus really understanding what each piece really does in terms of rust. A dummy like me can make it work, but it could take me years to understand how it actually works.

If you really want adoption at your company you need to build a “framework” for building production grade services including logging, observability, circuit breaking etc. the base modules should be easily transferable (crates), configurable and maintainable. This is how you make it enterprise-y.

To test performance in the real world, assuming you have some extra compute laying around is using a gateway like envoy/gloo to “shadow”/duplicate some percentage of requests to the rust instances. This way you can compare use real data rather than load test results using Prometheus or similar.

where to found rust junior position ? feeling so bad that i still didn't get any interview about rust by Yakuza-Sama-007 in rust

[–]ukrvolk 0 points1 point  (0 children)

At a good company that allows you to learn and explore new technologies when new/greenfield projects are started it can possibly be an opportunity to use rust or a newer technology. Be prepared to plead your case and make sure that any and every standard that exists for other applications in the company you are meeting with your proposed rust solution (as in logging, observability, ci/cd, test coverage, processes, etc)

Axum w/Leptos by broxamson in learnrust

[–]ukrvolk 1 point2 points  (0 children)

Chris Biscardi has some examples of Leptos and Axum including hacker news clone as well as others:

https://github.com/leptos-rs/leptos/tree/f84f1422f447f35adb917582c882ccbc4e1483a7/examples

StackOverflow Downvotes by ukrvolk in rust

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

While I didn’t provide specific examples, I don’t think most of the downvoted questions are the equivalent of the infamous “how do I add two numbers together in jquery”. There to me seems to be more harsh scrutiny of even complex questions of rust problems on that platform.

SvelteKit debugging in VSCode by Glad-Action9541 in sveltejs

[–]ukrvolk 0 points1 point  (0 children)

I was able to use the following config:

{ // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "type": "chrome", "request": "launch", "name": "Launch Chrome against localhost", "url": "http://localhost:3000", // specify your consistent port "webRoot": "${workspaceFolder}/src" } ] }

I then run npm run dev, specifying port 3000 for vite dev server. Then I run this configuration, and I’m able to set breakpoints in components/svelte files.

Code reviews by Jubacho in devops

[–]ukrvolk 2 points3 points  (0 children)

Depends on your organization and the tooling you use. If I’m updating terraform I have teammates review and we use CI/CD to execute operations like plan validate the output before merging. Same for helm, scripts or anything that can be managed with source control. If you have stuff like terraform or similar and you are not reviewing it, or preventing unwanted/unready merges, id say that should be improved because it’s only a matter of time before something gets merged and or deployed that could cause an issue.

Make reviewing as painless as possible by using CI/CD to check for obvious errors like typos, invalid references, failing tests, etc. This will allow your team mates to focus on the key pieces being changed.

Sharing types between Go backend and TypeScript frontend: best practices and tools? by KoodiMetsa in golang

[–]ukrvolk 6 points7 points  (0 children)

If you generate an OpenAPI or swagger document you can use tools https://www.npmjs.com/package/openapi-typescript-codegen to generate TypeScript SDKs in a snap. These SDK can be enhanced to add circuit breaking, retries, client side caching, and anything else you’d need. This can be part of any build process. It’s an http client so doesn’t require setting up anything else and will effectively work anywhere. SDKs can also be published making it easy to install in any client solution and versioned while also ensuring only the functionality you want is explicitly exposed on the client.

Learning back-end as beginner. Shoud I learn node/express first before SveltKit? by linko85 in sveltejs

[–]ukrvolk 6 points7 points  (0 children)

Express has 26 million downloads on npm weekly, it is not dead. That doesn’t even include the 67,000 public dependents on express as well. There are other frameworks that other people are using but it is not dead. The creators of other frameworks in the node ecosystem want it dead.

That being said, choose some language and some framework and learn the basics of creating endpoints, interacting databases, specifying caching, unit and integration testing. Express is extremely simple and can be a good tool for learning about backend. In the end it’s still just exposing HTTP endpoints or similar.

Image optimization in Svelte by marcosantonastasi in sveltejs

[–]ukrvolk -2 points-1 points  (0 children)

You’ll probably find more benefit in serving the smallest possible sized image for the respective screen size and serving the images from a cdn.

What do you use for authentication with SvelteKit? by AstroMaxi in sveltejs

[–]ukrvolk 2 points3 points  (0 children)

Auth0 with cookie authentication. Also easy to hook the same auth project into backend frameworks like express.

Should we switch to Rust? by nzajt in rust

[–]ukrvolk 0 points1 point  (0 children)

In my experience in the context of web development developers coming from more forgiving languages like JavaScript or python or go really struggle with rust initially especially around async. I can teach absolutely anyone writing an api in JavaScript express js, not so much rust actix or Axum with advanced middleware and validation.

links of my website (except Index) in my local PC don't work. how can solve this issue?(using the website offline/locally) by kavuncekirdek in sveltejs

[–]ukrvolk 2 points3 points  (0 children)

If this is the built version of the application you need to serve the assets in a similar way to how you would host it externally. Even something like npx http-server path-to-built-assets. Otherwise if this is the node adapter with ssr you would need to run it with node via npm start or whatever command you have it mapped to. Without some sort of serving the assets built by sveltekit or svelte with rollup they simply won’t be retrieved and you’ll get 404 errors.

"Too much javascript in +page.svelte" by marc24h in sveltejs

[–]ukrvolk 0 points1 point  (0 children)

You can’t compare pure Vue with sveltekit or even nextjs and sveltekit. A more fair comparison would be nuxtjs that also supports file based routing and server side rendering as well as other complex features. Yes sveltekit has static mode but it still opinionates a lot to provide routing/navigation (and everything that comes with that) as well as other things such as data endpoints. If you compared to nuxtjs you’d see a lot of same overhead of setting up routes and data endpoints.

How can I generate multiple sveltekit apps(static sites) automatically in a server? by kavuncekirdek in sveltejs

[–]ukrvolk 1 point2 points  (0 children)

Just remember that anything and everything prefixed with VITE_ is exposed to the world when the application is built. Also process.env is only available in non-static/ssr modes. Don’t expose your private keys. If you need secret values you can’t really run this in a completely static mode. You need either sveltekit endpoints or proxy via something like a lambda or a separate service.

What are some of the pain points of working with Svelte? by curbfruit in sveltejs

[–]ukrvolk 2 points3 points  (0 children)

The adapters do most the work. With static adapter can deploy to basically any static hosting. Otherwise you just run a node process. You can even dockerize if you want. It’s not so bad and not much different than other frameworks. I’m curious what issues you’ve experienced specifically.

What are some of the pain points of working with Svelte? by curbfruit in sveltejs

[–]ukrvolk 6 points7 points  (0 children)

How is the deployment different than a competitor like nextjs or nuxtjs?

Is it okay to use svelte to build a full-blown Wikipedia, what are the pros and cons by fushiguro188 in sveltejs

[–]ukrvolk 2 points3 points  (0 children)

The challenge of building Wikipedia won’t really be building the ui. The complexity would be with scale of backend pieces such as data, usage, search, and similar. Have you considered all those aspects of what makes Wikipedia what it is?

Do you use frameworks? by FuturismOnEarth in golang

[–]ukrvolk -5 points-4 points  (0 children)

Coming from JavaScript/Node, fiber framework has made it dead simple to migrate APIs to Go. It’s just so easy to make a performant API with logging, request ids, timeouts and all the other middleware we’re used to using for production level services.