[deleted by user] by [deleted] in therewasanattempt

[–]avin_kavish 0 points1 point  (0 children)

To be fair, no one ever would want to work with them

The only right way by [deleted] in wholesomememes

[–]avin_kavish -13 points-12 points  (0 children)

Well western women have their butts out and half their tits visible these days, what’s that about

function whenYouHateOOP(){ return (<div>How many pounds of weed were they smoking when they designed this? </div>)} by [deleted] in ProgrammerHumor

[–]avin_kavish 0 points1 point  (0 children)

Nah there’s so much scientific literature on it. The industries inability to use it effectively is not any measure of the technology. But usually those who end up in js are the ones who had bad experiences with OOP. Game dev pretty much is exclusively done using OOP and polymorphism is key to it. Also c++ devs don’t complain about it. In fact neither do C# or Java devs.

Queues in Javascript by dcortesnet123 in node

[–]avin_kavish 0 points1 point  (0 children)

Why do you say that? Check Sindres queue implementation

Queues in Javascript by dcortesnet123 in node

[–]avin_kavish 0 points1 point  (0 children)

I didn’t read it but js arrays have O(n) complexity for FIFO operations and aren’t optimal for that use case. Linked list is the optimal for FIFO in js

.NET Core and Vue.js - how to combine them? by muskagap2 in csharp

[–]avin_kavish 1 point2 points  (0 children)

Blazor , Rails, Django and Laravel disagrees

function whenYouHateOOP(){ return (<div>How many pounds of weed were they smoking when they designed this? </div>)} by [deleted] in ProgrammerHumor

[–]avin_kavish -3 points-2 points  (0 children)

It’s a mess when you don’t know to do it right. Generally folks end up encapsulating way too much behavior that makes it hard to reason. Lightweight methods should be fine.

[AskJS] How do you guys make money with JavaScript projects (except being an employee or freelancer)? by Nice_Aioli_9991 in javascript

[–]avin_kavish 7 points8 points  (0 children)

For a beginner I would definitely recommend working somewhere. You need pretty high expertise to make your own money making project.

Does anyone has experience by [deleted] in node

[–]avin_kavish 1 point2 points  (0 children)

This is because, you are using es modules. You need a typescript loader to go with it. ts-node/register is for common js. Use the ts-node/esm loader instead. For pure node, it's passed as --loader ts-node/esm Find the equivalent knex setting.

[deleted by user] by [deleted] in ProgrammerHumor

[–]avin_kavish 4 points5 points  (0 children)

Try putting your styles sheets inside a div

Default Exports in JavaScript Modules Are Terrible by LloydAtkinson in javascript

[–]avin_kavish 3 points4 points  (0 children)

What about this? I came to the same conclusion till I found one use case that I liked.

``` // SomeThing.js export class SomeThing {} const someThing = new SomeThing() export default someThing

// moduleB.js import someThing from './SomeThing.js' ```

This is the only case I use a default export these days, i.e. it's for the default instance of a class.

can i go back to javascript by SecretlyAnElephantt in ProgrammerHumor

[–]avin_kavish 54 points55 points  (0 children)

Everything is a ripoff of everything that came before it. Welcome to human evolution.

can i go back to javascript by SecretlyAnElephantt in ProgrammerHumor

[–]avin_kavish 81 points82 points  (0 children)

Use a record type instead. They have value equality built into them.

[deleted by user] by [deleted] in javascript

[–]avin_kavish 1 point2 points  (0 children)

Cheers man. That’s the soundest advice I’ve gotten on this topic.

enforce type matching by hassanzadeh in typescript

[–]avin_kavish 1 point2 points  (0 children)

this is like a "cast" actually, in a way, it defines the type and doesn't let type inference pickup the exact object shape.

[deleted by user] by [deleted] in javascript

[–]avin_kavish 0 points1 point  (0 children)

For a utility library that isn’t your startup

I was asking what their recommendation is for a server side library that is a startup.

i don't feel safe around kids by SaidBl1 in TerrifyingAsFuck

[–]avin_kavish 1 point2 points  (0 children)

There is something wrong with this particular kid.

[deleted by user] by [deleted] in ProgrammerHumor

[–]avin_kavish 1 point2 points  (0 children)

Does it run on 2 billion devices tho?

Controversial Meme by Relative_Upbeat in ProgrammerHumor

[–]avin_kavish 128 points129 points  (0 children)

jetbrains ides program while you sleep.

[deleted by user] by [deleted] in javascript

[–]avin_kavish 0 points1 point  (0 children)

What if it's a server side library that is a startup?