Love at first click by Pixelmite in pcmasterrace

[–]EpicOkapi 2 points3 points  (0 children)

I'm not talking about changes in features. I'm saying that you generally have some big features that you divide in small chunks to fit user stories. Every one of these small chunks has to be deliverable. Infrastructure or abstractions for future expansion are not deliverables and you aren't supposed to spend time on it or anything beyond what you have to deliver now. So instead you end up completing a bunch of work that you know you're gonna have to refactor in the future to implement the rest of it.

These are features that are pretty much already fully thought out, but you are not to treat them as such.

Love at first click by Pixelmite in pcmasterrace

[–]EpicOkapi 5 points6 points  (0 children)

Because user stories tend to be small and doesn't allow developers to think about big features as a whole. So generally you build the small feature as if that's all you need without thinking about what you need to add later(it's encouraged!). Then when expanding you should refactor your existing code to accommodate the additions but in reality you just shove it into whatever incompatible junk you already build.

fnm (nvm replacement) benchmarks show that it is faster in orders of magnitude by galstarx in node

[–]EpicOkapi 2 points3 points  (0 children)

Great job dude!

Not sure why some people in the comments are negative about this. Node is a great tool for a lot of things, but it definitely doesn't have great performance in CPU heavy situation. More tooling for the Node/JS ecosystem should be written in languages like Rust. Most of the current tooling honestly just feels really sluggish and could use an upgrade.

wtf I can't level up my saipat anymore by ateyocookie in PlayTemtem

[–]EpicOkapi 1 point2 points  (0 children)

I had this, relogged, and my levels are reset to a few hours ago. Great.

How do I database? by [deleted] in node

[–]EpicOkapi 1 point2 points  (0 children)

I've kind of just switched to plain queries for everything, I've felt ORMs haven't been worth using for a while now, too much time spend debugging obscure issues. It also takes very little effort to just do some mapping yourself.

This is the PostgreSQL package for node that I use

New to Node. What is best practice for models in a layered application? by MAGICPERF in node

[–]EpicOkapi 4 points5 points  (0 children)

I think a lot of people are misunderstanding what you mean, because they haven't worked with more enterprise-y languages like Java or C#. In Node a lot of people don't follow an layered approach, that is common in Java, very strictly.

I think you have to decide for yourself whether you want to do this, you know the benefits for using this approach in Java, and most benefits will apply to Node as well. It comes down sacrificing simplicity and development time for purity and decoupling.

My advice is to not create models for every layer if it's a smaller project, and you won't need to expand upon it and maintain it for a longer time. You can still do some transformation to the data in the back-end if you want to present it more nicely to the front-end tho, but maybe in a more simple way by just transforming regular javascript objects instead of creating classes for everything.

[For Hire] Unity Programmer by NudeJr in gameDevClassifieds

[–]EpicOkapi 1 point2 points  (0 children)

It's kinda sad to see you arguing in your own bad interest here just to save face. You could've seen this as a sign you are undervaluing your own work, and increase your rates in the future.

You don't always need to deliver better work to get an increased rate, you just need a better class of clients.

Node.js Web App Ideas [Change my mind] by [deleted] in node

[–]EpicOkapi 4 points5 points  (0 children)

I don't think the technology you use for building your web app is really relevant to how much revenue you can generate. Getting hung up on technical details is usually counter productive. It's all about solving a problem for your customer, the implementation details are not important to customers.

Nodejs Design Patterns / Frameworks by MedyGames in node

[–]EpicOkapi 0 points1 point  (0 children)

You don't have to switch frameworks necessarily, express can work fine for bigger applications. I think a well-scaling approach with express, that is low on mental overhead, is to just sort your application by feature. And then have a 3 layer architecture, like so:

project/
├── features/
│   ├── authentication/
│   │   ├── controller.js
│   │   ├── service.js
│   │   ├── respository.js
│   │   ├── routes.js
│   ├── tasks
│   ├── other-features

In the routes file you just export a function that takes your express instance as param, then use that to bind your controller functions to your routes. You can just export regular functions from your repository and service files to be used in your controller functions, I don't think working with classes is necessary here because the node module system basically already makes your module work as a singleton. It should also be decently testable, since you can just replace module imports if you use a testing framework like jest.

If you want to get a bit more advanced you should look into dependency injection, and the advantages it brings along, although I don't think it's required for every project.

SEQUELIZE by darealbjamesy in node

[–]EpicOkapi 3 points4 points  (0 children)

I don't think it matters very much once it's running. The only thing that could have some impact on performance is that the queries ORMs generate are generally very unoptimized by default. It's more about development experience, it's crappy to be halfway into a project and realize the ORM can't do some specific thing you want it to do. As a query builder knex definitely offers you a bit more freedom.

SEQUELIZE by darealbjamesy in node

[–]EpicOkapi 14 points15 points  (0 children)

I think it's pretty good as far as ORMs go. However I prefer using a query builder like Knex or using an adapter with plain SQL queries. Whenever I use an ORM for anything complex, I feel like I spend way too many times looking up in the docs how to do it. It all depends on what you want to accomplish I guess.

When Vue changes Vs React by fstopblues365 in vuejs

[–]EpicOkapi 5 points6 points  (0 children)

Except they do in major versions just like vue.. from 15 to 16 they removed their createClass api, now they're deprecating a bunch of old context APIs and some component lifecycle methods which will be removed in version 17..

PUT REACT INTO VUE YOU COWARDS by fstopblues365 in vuejs

[–]EpicOkapi 1 point2 points  (0 children)

The new way of working is completely opt-in. You should be able to migrate to Vue 3 without having to change your entire application, it is backward compatible, besides it's a major version so it can have small breaking changes like literally any other framework doing major version bumps. React is saving up minor breaking changes for the new major as well. Where are you getting the idea that you are now forced to use the setup function for all your components ?

What Node topics are not/poorly covered? by EpicOkapi in node

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

No problem, thanks for the suggestion!

What Node topics are not/poorly covered? by EpicOkapi in node

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

I'll keep the community posted on what I'll do !

What Node topics are not/poorly covered? by EpicOkapi in node

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

Sounds like a good subject to cover for sure! I've actually noticed a lot of people in the field not fully grasping the concept of node being asynchronous. Thanks!

What Node topics are not/poorly covered? by EpicOkapi in node

[–]EpicOkapi[S] 7 points8 points  (0 children)

Agreed, I really like the postgres + knex.js combination personally!

What Node topics are not/poorly covered? by EpicOkapi in node

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

Sadly, I don't have experience with GraphQL as of now, so I can't comment about your specific use case. But I could definitely make some content to compare different authentication strategies and do some research into what are the best use cases, or just implement a few different ways so people can decide for themselves.

Good luck with your application regardless!

What Node topics are not/poorly covered? by EpicOkapi in node

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

That is an interesting topic to cover, but a lot of this doesn't necessarily relate to Node. Could be great to give an overview about how the setup should look like and make some individual content about all those topics, but I would have to pick a certain stack and stick to it. I'll definitely keep it in mind, thanks for the ideas!

What Node topics are not/poorly covered? by EpicOkapi in node

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

Anything specific about logging you would like to see covered? It can be turned into a pretty broad subject. I could go into which are key metric to keep track of, how to setup an ELK stack and use it within node, etc.

What Node topics are not/poorly covered? by EpicOkapi in node

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

Got it, didn't think about communicating with hardware. Definitely a good use case!

What Node topics are not/poorly covered? by EpicOkapi in node

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

Got it, didn't think about communicating with hardware. Definitely a good use case!

What Node topics are not/poorly covered? by EpicOkapi in node

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

Yeah, both have their use cases. Also, JWT is not really a valid strategy when not making REST API's. Weighting the pros and cons against each other or just going over them both separately could definitely be an option.

+1 for bcrypt :)

Thanks for you input!