Software Developer Diaries
Software Developer Diaries
  • 132
  • 1 265 569
Low-Level JavaScript Performance Best Practices (Crash Course)
Optimizing your JavaScript code can be tricky, as there are many pitfalls one can run into even before implementation. Let's learn about those in order to keep your JavaScript app performant.
======⚡⚡⚡======
Consider becoming a member of the channel by joining me ❤️
ua-cam.com/channels/qAL_b-jUOTPjrTSNl2SNaQ.htmljoin
☕ Buy me a coffee: www.buymeacoffee.com/softwaredeveloperdiaries
🙌 Become my Patreon and get exclusive perks: patreon.com/softdevdiaries
💼 Follow me on LinkedIn and drop me a message if you'd like: www.linkedin.com/in/gadirovgs/
💻 Also, let's connect on GitHub: github.com/gusgad
📚 Resources:
Original article: romgrk.com/posts/optimizing-javascript
JavaScript Memory Model: www.zhenghao.io/posts/javascript-memory
JavaScript Set vs. Map vs. Object vs. Array: medium.com/@dm_md/unveiling-the-speed-of-javascript-collections-set-vs-map-vs-array-vs-object-3f6e44f24505
JavaScript Linked Lists: medium.com/nerd-for-tech/why-use-a-linked-list-instead-of-an-array-f75cdebaad22
Code: github.com/gusgad/youtube-tutorials/tree/js-perf-best-practices
🕒 Timestamps:
(0:00) Intro
(0:45) String comparison
(8:34) Object shapes
(11:57) Array Object methods
(14:53) Object access
(16:16) Cache misses
(21:22) Large objects
(23:31) String mutations
(25:43) Specialization
(28:12) Data structures
And don't forget to subscribe for more videos like this 😊
Переглядів: 1 584

Відео

I liked ranking these Design Patterns: Singleton, Module, Adapter, Decorator
Переглядів 1,5 тис.День тому
Design patterns such as Singleton, Adapter, and Decorator are common patterns extensively used in many programming languages including JavaScript and Node.js. We're gonna learn all about them and try to rank simultaneously. ⚡⚡⚡ ☕ Buy me a coffee: www.buymeacoffee.com/softwaredeveloperdiaries 🙌 Become my Patreon and get exclusive perks: patreon.com/softdevdiaries 💼 Follow me on LinkedIn and drop...
Promises have just gotten nicer! (withResolvers)
Переглядів 3,5 тис.28 днів тому
Promise.withResolvers() lets you create Promises in a more elegant way just by calling one function. ⚡⚡⚡ Consider becoming a member of the channel by joining me ❤️ ua-cam.com/channels/qAL_b-jUOTPjrTSNl2SNaQ.htmljoin ☕ Buy me a coffee: www.buymeacoffee.com/softwaredeveloperdiaries 🙌 Become my Patreon and get exclusive perks: patreon.com/softdevdiaries 💼 Follow me on LinkedIn and drop me a messag...
Figma's migration journey to TypeScript
Переглядів 1,2 тис.Місяць тому
How did Figma rewrite it's Skew code into modern TypeScript while keeping the performance? ⚡⚡⚡ Consider becoming a member of the channel by joining me ❤️ ua-cam.com/channels/qAL_b-jUOTPjrTSNl2SNaQ.htmljoin ☕ Buy me a coffee: www.buymeacoffee.com/softwaredeveloperdiaries 🙌 Become my Patreon and get exclusive perks: patreon.com/softdevdiaries 💼 Follow me on LinkedIn and drop me a message if you'd...
I'm trying to rank Design Patterns (again): Chain of Responsibility, IIFE, Factory, DP
Переглядів 2 тис.Місяць тому
Design patterns such as Factory, Dependency Injection, and IIFE are common patterns extensively used in many programming languages including JavaScript and Node.js. We're gonna learn all about them and try to rank simultaneously. ⚡⚡⚡ ☕ Buy me a coffee: www.buymeacoffee.com/softwaredeveloperdiaries 🙌 Become my Patreon and get exclusive perks: patreon.com/softdevdiaries 💼 Follow me on LinkedIn an...
Microservices with Databases can be challenging...
Переглядів 17 тис.Місяць тому
Check out Eraser: eraser.io ⚡⚡⚡ Here are 5 microservice patterns that can facilitate working with databases. Among them: Saga patter, CQRS, Even Sourcing, as well as other useful theory on database transactions and Event-Driven Architecture. ☕ Buy me a coffee: www.buymeacoffee.com/softwaredeveloperdiaries 🙌 Become my Patreon and get exclusive perks: patreon.com/softdevdiaries 💼 Follow me on Lin...
A Beginner's Guide to Event-Driven Architecture
Переглядів 5 тис.Місяць тому
In this gentle introduction to Event-Driven Architecture, we will explore real-world use cases and main concepts such as Event Notification, CQRS, Event Sourcing, etc. We'll discuss common technologies and patterns, such as Messaging with RabbitMQ and Streaming with Kafka. ☕ Buy me a coffee: www.buymeacoffee.com/softwaredeveloperdiaries 🙌 Become my Patreon and get exclusive perks: patreon.com/s...
All you need to know about "child_process" in Node.js
Переглядів 3,4 тис.2 місяці тому
Child Process module in Node.js lets you spin up new isolated processes, which can help you in many ways. It is similar to Worker Threads in its usage but there is a big difference in its purpose. Let's learn all of that! ⚡⚡⚡ The blackboard in the video: eraser.io ☕ Buy me a coffee: www.buymeacoffee.com/softwaredeveloperdiaries 🙌 Become my Patreon and get exclusive perks: patreon.com/softdevdia...
Here's what awaits beginner software developers
Переглядів 1,4 тис.2 місяці тому
Want to learn programming and become a software developer? In this video, I'll share some things you should be aware of and as you will be progressing in your career as a developer. ⚡⚡⚡ ☕ Buy me a coffee: www.buymeacoffee.com/softwaredeveloperdiaries 🙌 Become my Patreon and get exclusive perks: patreon.com/softdevdiaries 💼 Follow me on LinkedIn and drop me a message if you'd like: www.linkedin....
Solving Common Backend Issues: Crashes & Downtime
Переглядів 2,1 тис.2 місяці тому
Sometimes services crash and things happen during the downtime. How to deal in these situations and how to ensure high availability and resilience in general? ⚡⚡⚡ Consider becoming a member of the channel by joining me ❤️ ua-cam.com/channels/qAL_b-jUOTPjrTSNl2SNaQ.htmljoin ☕ Buy me a coffee: www.buymeacoffee.com/softwaredeveloperdiaries 🙌 Become my Patreon and get exclusive perks: patreon.com/s...
Node.js Security Best Practices #3: child processes, security hardening, leaking server information
Переглядів 2,6 тис.2 місяці тому
Node.js security best practices such as security hardening of frameworks and libraries, managing env files and secrets, using child processes carefully are going to be covered in this video. ☕ Buy me a coffee: www.buymeacoffee.com/softwaredeveloperdiaries 🙌 Become my Patreon and get exclusive perks: patreon.com/softdevdiaries 💼 Follow me on LinkedIn and drop me a message if you'd like: linkedin...
Here's why implementing a Payment System can be so hard
Переглядів 3,1 тис.3 місяці тому
Check out Cryptomus: cryptomus.com/? Cryptomus on Telegram - t.me/ eo6zMdgekJRhNzcy ⚡⚡⚡ Designing and building an in-house Payment System is not trivial. In includes many components that communicate asynchronously in an event-driven manner, usually with Kafka, meaning there are many different ways the system can malfunction. We're going to cover the major components of a system, what reconcilia...
Is Service Mesh a MUST-HAVE for your Microservices?
Переглядів 2,5 тис.3 місяці тому
In this video I'll explain what a Service Mesh is, why you would use it, what the difference between a Service Mesh and an API Gateway is and how it works together with Kubernetes. ⚡⚡⚡ 👉 Check out Eraser: eraser.io/ ☕ Buy me a coffee: www.buymeacoffee.com/softwaredeveloperdiaries 🙌 Become my Patreon and get exclusive perks: patreon.com/softdevdiaries 💼 Follow me on LinkedIn and drop me a messag...
API Gateway vs Load Balancer vs Reverse Proxy: when to use what?
Переглядів 7 тис.3 місяці тому
Check out Lunar.dev: www.lunar.dev/ ⚡⚡⚡ What is the difference between an Reverse Proxy, a Load Balancer and an API Gateway? All of them seem to be doing similar things within the networking ecosystem. But there are subtle differences that every Software Engineer and Architect should be aware of. ☕ Buy me a coffee: www.buymeacoffee.com/softwaredeveloperdiaries 🙌 Become my Patreon and get exclus...
How do microservices find each other's IP addresses?
Переглядів 4,2 тис.4 місяці тому
How do microservices find each other's IP addresses?
Solving Common Backend Issues: Deadlocks & Queues
Переглядів 1,9 тис.4 місяці тому
Solving Common Backend Issues: Deadlocks & Queues
I tried ranking Node.js Design Patterns: Builder, Observer, Command, Prototype
Переглядів 6 тис.4 місяці тому
I tried ranking Node.js Design Patterns: Builder, Observer, Command, Prototype
Under the hood of Slack’s real-time messaging at scale
Переглядів 1,5 тис.4 місяці тому
Under the hood of Slack’s real-time messaging at scale
Node.js "Event Emitters" Explained
Переглядів 6 тис.5 місяців тому
Node.js "Event Emitters" Explained
This is how you protect your backend from a Retry Storm
Переглядів 1,2 тис.5 місяців тому
This is how you protect your backend from a Retry Storm
How are software teams organized in large companies?
Переглядів 1,9 тис.5 місяців тому
How are software teams organized in large companies?
How to avoid the "Noisy Neighbor" problem in your software architecture?
Переглядів 1,6 тис.5 місяців тому
How to avoid the "Noisy Neighbor" problem in your software architecture?
Can an "Anti-Corruption Layer" save your bad software architecture?
Переглядів 1,9 тис.6 місяців тому
Can an "Anti-Corruption Layer" save your bad software architecture?
Node.js Security Best Practices #2: non-root user, payload size limiting, auth limits
Переглядів 4,7 тис.6 місяців тому
Node.js Security Best Practices #2: non-root user, payload size limiting, auth limits
The Secret Weapon Behind Resilient Distributed Systems
Переглядів 9146 місяців тому
The Secret Weapon Behind Resilient Distributed Systems
Here's why you need Nginx as a Reverse Proxy for your Node.js app
Переглядів 18 тис.6 місяців тому
Here's why you need Nginx as a Reverse Proxy for your Node.js app
The Broken Senior-Only Developer Market
Переглядів 212 тис.6 місяців тому
The Broken Senior-Only Developer Market
Node.js Security Best Practices: JWT blacklisting, rate limiting, schema validation
Переглядів 14 тис.7 місяців тому
Node.js Security Best Practices: JWT blacklisting, rate limiting, schema validation
How to make your application scalable?
Переглядів 2,6 тис.7 місяців тому
How to make your application scalable?
What the hell is JavaScript's Intl API?
Переглядів 2,7 тис.7 місяців тому
What the hell is JavaScript's Intl API?

КОМЕНТАРІ

  • @survivelikehoneybadger
    @survivelikehoneybadger 9 годин тому

    Is that in nett or gross?

  • @Serjgap
    @Serjgap День тому

    Speed optimization advices here are ok, but code style is very bad and inconsistent. You should have cleaned it up a bit instead of directly copying the article

  • @GoetzGehgetz
    @GoetzGehgetz День тому

    t-10 ;)

  • @prashlovessamosa
    @prashlovessamosa День тому

    Great

  • @NathanielBabalola
    @NathanielBabalola День тому

    Thank you, can you please drop the links to the jsbenchmarks ?

    • @SoftwareDeveloperDiaries
      @SoftwareDeveloperDiaries День тому

      Unfortunately they are not persisted, but you can find the approx. results in the original article linked in the description

  • @sindhu1522
    @sindhu1522 День тому

    Hi i have an issue with my nestjs application even there is no api calls from day 1,the cpu usage is increasing gradually, could you please share any idea how to fix that

  • @gamingwolf3385
    @gamingwolf3385 День тому

    I was waiting for this video , thank you a lot I am learning C# , i see some new concepts like domain entity , value objects and this stuff , can you explain hiw to do it in node ?

  • @bombardo2489
    @bombardo2489 День тому

    man this exactly what i needed. could you spoil us further and make us video about user auth on enterprise level that would be sick

    • @SoftwareDeveloperDiaries
      @SoftwareDeveloperDiaries День тому

      Happy to hear, mate! I'll put that on my list 😉

    •  День тому

      This one sounds really good

  • @papa_ethan
    @papa_ethan День тому

    Confusing in the end.

  • @judgebot7353
    @judgebot7353 2 дні тому

    just found your channel it's amazing man. Thanks a lot

  • @joachimzayana1744
    @joachimzayana1744 2 дні тому

    Please continue making video! Explanation are clear, introduced at the right pace, looking forward watching the others

  • @ShujaatAli-sx1ou
    @ShujaatAli-sx1ou 3 дні тому

    Can you explain a bit more about the ledger and user wallet? First question: Are we going to store user credit/debit card information in the ledger? In the user wallet, we will store the user transactions (amount, discounts, etc.). Second question: How do we reconcile between these two modules, the ledger and the user wallet?

  • @AdityaParmar-dr7gu
    @AdityaParmar-dr7gu 3 дні тому

    You are great ! thanks for content almost seeing all video of advance nodejs of yours

  • @kooshaforoughi8778
    @kooshaforoughi8778 3 дні тому

    Man i love your videos, you're a very good teacher, you teach advanced topics clearly and with ease. thank you for teaching me! keep going!

  • @prajwalmandlik3517
    @prajwalmandlik3517 4 дні тому

    If anyone has a good source for learning this, please share it in the comments.

  • @imtiazux
    @imtiazux 5 днів тому

    Thank you so much. Everything are now clear like water. 👌

  • @mohabnabil1962
    @mohabnabil1962 6 днів тому

    Can i worf from my country as frontend Developer?

  • @channaveerhakari7319
    @channaveerhakari7319 8 днів тому

    I am handling my NodeJS ExpressJS errors, unhandled exceptions, unhandled rejections with simple middleware. This works amazing for me :) ``` app.js ------ const express = require("express"); const app = express(); const errorHandlerMiddleware = require("./middlewares/error-handler.middleware.js"); /** Customer authentication routes */ app.use("/api/auth", require("./routes/auth/auth.js")); //...Other API's /** * Error handling middleware * Handles all the errors, unhandled exceptions, unhandled rejections */ app.use(errorHandlerMiddleware); module.exports = app; error-handler.middleware.js -------------------------- /** Custom winston logger */ const log = require("../helpers/logs/log.helper"); module.exports = function (error, request, response, next) { /** My custom meta data handler */ log("error", error.message, { error }); return response.status(501).json({ status: "error", message: error.message, }); }; ```

  • @richiemugambi9487
    @richiemugambi9487 8 днів тому

    Criminally underrated

  • @s8x.
    @s8x. 8 днів тому

    you can combine them too like event driven with micro services

  • @stillmattwest
    @stillmattwest 8 днів тому

    This video should really be a playlist. It would be great if you slowed down and gave some specific examples for each of the major points. It seems like your target audience is new Node developers, but you move way too fast for them to keep up with you.

  • @alienmars2442
    @alienmars2442 8 днів тому

    I wonder if InventoryService processes fails, but EmailService sends email successfully, how should we gonna do ?

  • @gamingwolf3385
    @gamingwolf3385 9 днів тому

    This decorator design pattern is it the same used in nestjs or angular with @ ?? Or maybe in other languages to add more properties to the original object

    • @SoftwareDeveloperDiaries
      @SoftwareDeveloperDiaries 9 днів тому

      Yes, it is the @ from Angular! I’m not familiar with Nest.js so can’t tell for sure 😀

  • @gamingwolf3385
    @gamingwolf3385 10 днів тому

    Hello thank you for the video , for now no need for the book written by the gang of four You are the gang of four 😂😂 Ok , i want to know something can you go deep in opensource projects maybe we can discuss how they implement this feature , this helper functionn.... And for performance purposes are functions better or classes , and why typeof CustomClass and typeof Function the two of them return function hhhh crazy js news Thank you a lot , بارك الله فيك

  • @kenzo3477
    @kenzo3477 10 днів тому

    Am patiently waiting for your rabbitmq video

  • @m.x.
    @m.x. 10 днів тому

    Funny how React developers end up recognising that Angular encouraged architecture is the way to go from the very beginning. And it's not an Angular merit, but rather decades of industry experience. React always late.

  • @mohit84604
    @mohit84604 10 днів тому

    Hey brow can you teach DDD(domain driven design in typescript)

  • @callanambulancebutnotforme5702
    @callanambulancebutnotforme5702 10 днів тому

    12:48 got me checking my wifi😂😂

    • @gamingwolf3385
      @gamingwolf3385 9 днів тому

      True , i taught it was a bug detected in the code 😂

    • @SoftwareDeveloperDiaries
      @SoftwareDeveloperDiaries 8 днів тому

      Ah damn hahaha there was a loud car passing by and I forgot to cut out that segment 😄

  • @SoftwareDeveloperDiaries
    @SoftwareDeveloperDiaries 10 днів тому

    Which of these design patterns do you use the most?

    • @markoffk
      @markoffk 10 днів тому

      I would like to mention, that it depends on what you mean by "use". For example, in modern JS development with React (and all it's helper libs) and nodejs - singletons are everywhere starting from ES modules. But I never had to manually define Singleton.

    • @gamingwolf3385
      @gamingwolf3385 9 днів тому

      I like the builder method , for now i am using nestjs so i am using singeleton and dependency injection by default 😅 , there is also the dependency inversion you didn't explain it yet its also used in nestjs

  • @paperC_CSGO
    @paperC_CSGO 11 днів тому

    Please do a video about performance tests in node! Testing locally + setting up tests for CI/CD

  • @nirnayjain2277
    @nirnayjain2277 11 днів тому

    We have nestjs framework in javascript which uses dependency injection

  • @mct_gyssels
    @mct_gyssels 11 днів тому

    g in gRPC doesn't stand for google...

  • @mscfit
    @mscfit 12 днів тому

    you say pact is the best cdct framework - did you do an evaluation that you could share. We are currently debating SCC vs PACT

  • @tryzack
    @tryzack 12 днів тому

    hi, i have a problem here, I've done everything like in the video but the workers wont work? the loadtest was arguably the same as the first time, so to check by myself i made another route without any load to check if i could make a get from that one while the heavy one was still loading and the answer was no, it waits for heavy get to complete before actually doing the main get, its like everything was going to the same worker instead of trying to use different workers, i have 12 cores so it should work...

  • @prasannabiswas681
    @prasannabiswas681 13 днів тому

    sir can you do a same playlist for nextjs also need some glimpse of how senior software devs are writing code and folder structure in nextjs with scalability for future propects.

  • @rajsatraroxor9603
    @rajsatraroxor9603 13 днів тому

    In last example, while changing from fruit instanceof to isTasty in, last keyword "Banana" should be changed to parameter "fruit", to check isTasty exisits or not in fruit which is passed into that function

  • @MusaabIsmael
    @MusaabIsmael 14 днів тому

    Thank you so much, i understood the concept behind it from the playstation example.

  • @igetknock11
    @igetknock11 15 днів тому

    Where can i get this boostrap form layout ? as it doesnt appear in my browser

  • @yousafraza9347
    @yousafraza9347 15 днів тому

    Really love this methodology of deep diving a specific topic. Glad I found this channel

  • @vovandarius
    @vovandarius 15 днів тому

    A great overview! Thank you!

  • @mansoormasoudifard8624
    @mansoormasoudifard8624 16 днів тому

    I learned a lot 👌

  • @internetexplorer7880
    @internetexplorer7880 16 днів тому

    Wait i thought pm2 spawns only 1 if you use that command

  • @AViStudioMoldova
    @AViStudioMoldova 16 днів тому

    Very clean and good explanation! You're good! Keep going! Thanks!

  • @user-gd5lq8qj5z
    @user-gd5lq8qj5z 18 днів тому

    apollo graqhQL for the client, grpc json on the server. That's it.

  • @sohaibnoor6610
    @sohaibnoor6610 18 днів тому

    I have 3.5 years of Experience as a Node js Developer. But I feel I knew nothing. Thank you so much man. This is mind blowing. Love every of it

  • @TheSadilek
    @TheSadilek 18 днів тому

    Learned a lot and it helped me relax on a Friday night. Thanks man

  • @marksmith2540
    @marksmith2540 21 день тому

    > as long as you use it perfectly it will work (paraphrased, about GraphQL) Strictly speaking this can be said or anything.

  • @yogiHalim
    @yogiHalim 21 день тому

    wow Thank you

  • @Joel-do3oi
    @Joel-do3oi 22 дні тому

    Thanks for the tips!