Пікірлер
@abahiduh3246
@abahiduh3246 Күн бұрын
This is the best JavaScript video I have ever watched and I have almost the best video of most of the well know tutors from udemy, LinkedIn,pluralsite, etc HMMM
@JanHesters
@JanHesters 14 сағат бұрын
That's so kind! Thank you 🙏
@mchaelkha
@mchaelkha Күн бұрын
I would write swagger/OpenAPI to drive the API design. Makes everyone's life easier with a standard plus you can mock API responses with an API client. Any methodology that doesn't have a strict structure requires upfront time to understand.
@JanHesters
@JanHesters 14 сағат бұрын
Swagger is perfect for API design! 🙏
@yyegor
@yyegor Күн бұрын
I was just preparing to design the API for my project and accidentally encountered this video.
@JanHesters
@JanHesters 14 сағат бұрын
Hope it helps! 🔥 Curious, what kind of API will you design? 🤔
@dixalex02
@dixalex02 Күн бұрын
This is good general information for pipelines and orchestration, but, you were remise not to touch on the implications of AI. Learn to read the room. You were better off explaining what a markdown file is and how to best build up all the information it needs that an AI can use to maintain concise context. Take my advice with a grain of salt as I'm sure your target audience may already know to convert this information to AI. Edit: thanks for the video
@JanHesters
@JanHesters Күн бұрын
You're welcome! And you're right. RDD is close to A.I. Driven-Development. Buuut, A.I. isn't there, yet. It still needs a human in the loop.
@Sozzah
@Sozzah Күн бұрын
"blink if you're gay" typa video
@JanHesters
@JanHesters Күн бұрын
What? 😄
@Sozzah
@Sozzah Күн бұрын
@JanHesters you're not blinking at all for the whole video for some reason Relax a bit and blink
@ile911
@ile911 6 күн бұрын
what is this in fn.apply(this,args) from where this come?
@JanHesters
@JanHesters 2 күн бұрын
This is just a fancy way to call a function that preserves the "this" context. Here is a more simple way to write it: const result = fn(...args);
@Itaysid
@Itaysid 6 күн бұрын
Great content thank you for sharing
@JanHesters
@JanHesters 2 күн бұрын
You're welcome!
@chad_giga6934
@chad_giga6934 8 күн бұрын
Programming Andrew Tate, lol no hate here bro. I just find your approach interesting, something that is not common in this space
@JanHesters
@JanHesters 2 күн бұрын
Thank you! I wanted to try something new haha! 🙏
@jamescbender43081
@jamescbender43081 10 күн бұрын
I hate Husky, and we don't allow it in our shop. It just creates more friction, and you can do everything Husky does as part of your pipeline when someone sends a PR.
@devyb-cc
@devyb-cc 8 күн бұрын
i use webstorm, i see no reason to use husky 😅
@jamescbender43081
@jamescbender43081 8 күн бұрын
@@devyb-cc I've never used WebStorm, so I don't know how they compare, but I HATE the idea of Git pre-commit hooks in general.
@devyb-cc
@devyb-cc 8 күн бұрын
@@jamescbender43081 well, jetbrains products all have something like hook. i usually do it only to analyze my code, in case i left some TODOs or unused imports.
@JanHesters
@JanHesters 2 күн бұрын
Interesting! How do you do it? Do you just run linting and type checks in CI/CD and let people push even with linting or type errors?
@jamescbender43081
@jamescbender43081 2 күн бұрын
@@JanHesters Yeah, we let developers send PRs up with linting errors. Before anyone even reviews it, it will run through the CI/CD pipeline, so linting, and all tests (unit, E2E, etc.) get run automatically and have to pass before the PR can be approved, no matter how many votes it gets. We do this for a few reasons. First, I want all the long-running/resource-intensive steps to run on the server so they can run faster without blocking the developer from working on something else. This also ensures that the branch will integrate with the existing branch. The other big reason, and why we stay away from pre-commit hooks (like Husky) is that I want my developers to be able to commit (locally) frequenty, even if these commits are "work in process" commits, aka "I want to commit what I have so that if the next thing I try to do totally f's things up, I can go back to the last commit." and making them conform to a bunch of rules designed to protect the main branch causes a lot of friction, and discourages these kinds of commits. As log as the "last" commit that's part of the PR conforms to the rules, as enforced by the pipeline, I don't care what the previous commits in that PR do.
@alvierime
@alvierime 14 күн бұрын
Internationalization needs a dedicated tutorial
@JanHesters
@JanHesters 14 күн бұрын
Will create one! 👍
@sefatanam
@sefatanam 15 күн бұрын
That was a banger, dude! Keep it up-you’re gonna level up for sure! 🔥
@JanHesters
@JanHesters 14 күн бұрын
Thanks for the kind words!
@peepoclown5838
@peepoclown5838 18 күн бұрын
This video gave me a headache...
@JanHesters
@JanHesters 17 күн бұрын
Why? 😄
@vinkrins
@vinkrins 19 күн бұрын
I liked this video, it have explained many javacript concepts, but the code suggested at 30:56 is not working correctly, inspite of addition via add3, its returning NaN, because pipe(...fns) .... is not able to pass all params to add3(), add3 is able to receive on first param only, @Jan Hesters, pls check,
@Pushpaje2130
@Pushpaje2130 20 күн бұрын
Amazing video ❤
@JanHesters
@JanHesters 19 күн бұрын
Thank you!
@mattymattffs
@mattymattffs 20 күн бұрын
Question, are the terrible shirts a requirement too?
@JanHesters
@JanHesters 19 күн бұрын
Right into the feels! 💔😄 Wear whatever you want 😉
@dreamsachiever212
@dreamsachiever212 21 күн бұрын
You gotta love YT algorithm. Spent 3 days setting up a monorepo using turborepo, hell of a pain... Could you create a similar video on setting up for production for a monorepo?
@JanHesters
@JanHesters 19 күн бұрын
Absolutely! But it will take a few months, I have a bunch of other topics planned first. Thank you for the compliment and the suggestion! 🙏
@HowieRhee
@HowieRhee 21 күн бұрын
Well done. Very good video. And thank you for posting the code in GitHub.
@Myhic-lt4xy
@Myhic-lt4xy 22 күн бұрын
This is a rare channel, and I love the atmosphere your in.
@JanHesters
@JanHesters 19 күн бұрын
Appreciate it! I like shooting outside because we are inside enough as developers haha
@mehmethanifierenler3612
@mehmethanifierenler3612 22 күн бұрын
very very thanks
@JanHesters
@JanHesters 19 күн бұрын
You're welcome! 🙏
@husseinkizz
@husseinkizz 22 күн бұрын
Functional Programming oof, thanks surely, am subscribing!
@JanHesters
@JanHesters 19 күн бұрын
Thank you! 🙏
@markschneidermann
@markschneidermann 23 күн бұрын
dope style & crazy gold nuggets bro !
@JanHesters
@JanHesters 19 күн бұрын
I have the privilege of working with the best when it comes to style 😉 Thanks!
@niyasp5265
@niyasp5265 26 күн бұрын
wow ..Best explanation ..
@JanHesters
@JanHesters 25 күн бұрын
Thanks so much!
@nicolasfiore
@nicolasfiore Ай бұрын
Just one question: where you in the movie Split by M. Night Shyamalan?
@JanHesters
@JanHesters Ай бұрын
A few of me were, yes 😉
@CottidaeSEA
@CottidaeSEA Ай бұрын
In your curry function you copy memory four times just for the sake of immutability, which is already guaranteed by just doing 1 + 1. You'll have awful performance and you're using it for a simple addition? At least use a good example. I also really do not agree that this code is any more or less testable than OOP code. The problem is always state and keeping it correct at all times. That is usually not due to any one function being incorrect, it is due to developers making simple logic mistakes. Most bugs I've found in production are impossible to find with unit testing, because that's not where the bug is. Most of all, I just think JavaScript is a candidate for FP due to performance reasons. You don't really have to do much in order to get JavaScript to absolutely chug and lock down the browser, and on the server there's just so many more performant options. Even Java is more performant, then there's Kotlin even in the JVM world which tends to be more performant. C#, C++, Rust, Go, all of them are more performant. That's for the languages not even specifically for FP.
@JanHesters
@JanHesters Ай бұрын
Absolutely agree. I said at the end of the video that the examples in this video are contrived and optimized to be understandable. I disagree that OOP coder is easier to test because by default class inheritance is the tightest form of coupling and frequently requires mocking. But if you have good examples for OOP code that is easier to test than pure functions, please kindly point me to it 🙏 And regarding performance, IMO you should favour readability over performance UNTIL performance becomes a bottleneck. I can't speak to those other languages you mentioned because I'm specialized in JavaScript.
@CottidaeSEA
@CottidaeSEA Ай бұрын
​@@JanHesters Easily testable OOP code honestly follows the same guidelines. Given the same input, you should get the same output. The thing that tends to get people thrown off is that with OOP and stateful classes, you'll have adjusted one of the inputs if you run the same method twice. In order to replicate the same thing you also need to replicate the class instance. Just with a really basic class (pure garbage I'd never write normally, so sorry about it being a bad example): class Addition { value; constructor(initial) { this.value = initial; } execute(value) { this.value += value; return this; } } assert(new Addition(2).execute(2).value, 4) would be 4, every single time you run it; same as FP. If you chain it like new Addition(2).execute(2).execute(2).value then you've fundamentally changed what it does, just like FP. Same principle, different execution. The class example is extremely stupid though, wouldn't write code like that normally, state is best stored in DB regardless. One of the benefits to using classes in JavaScript is that while it looks as if the objects all have their own methods, they are all only allocated once, which is a major benefit to anonymous functions added to objects which need to be allocated every time. This is not as important now with imports and exports being a thing, but look into how stupidly much memory is used in a regular application due to all of the object nonsense JavaScript injects since it needs to treat everything like a nondescript object. That's not the case in Java or C# for example, where they only keep the bare minimum to identify the class. As for why I think a lot about performance, it's because I work with larger datasets frequently, so I have to walk the tightropes of readability and performance a lot. This is true for both backend and frontend things; where updating/inserting 50k DOM elements is hell and takes ages even in a best case scenario, whereas remaking the entire HTML structure as a string and replacing all of it takes a few seconds. However, it only takes a few seconds under the assumption that I reuse memory through not allocating anything extra. This means reusing variables and pre-allocating memory as much as possible. I do enjoy FP though, I reach for it whenever possible, but only when I can afford doing so. I never do anything particularly crazy with it either, but the idea of passing functions to other functions is something I use regardless of FP or OOP. Command pattern is just that. The Addition class I gave as an example would be one of the classes one would pass to something that processes it. Somewhat unreadable, but with enough complexity in the business logic, it's totally worth it. Sorry about the long reply, not sure if you're going to read it either, but I hope my sleep-deprived brain didn't spew out too much nonsense.
@JanHesters
@JanHesters Ай бұрын
@@CottidaeSEA Thanks for the long reply! I for sure read it 🙏 Got it. As you said, the code you gave as an example is different from how you'd write it, but let me still address it because it demonstrates one of the problems I had with testing (and reading / understanding classes) as opposed to FP - even in production codebases with "real" code examples: You need to set up the internal state to run the different functions, and it's hard to understand a method in isolation. For example, if you had another method on that class, that would only do something if `value` was three, you'd need to either call `execute` three times, complicating the test. Or you'd need to manipulate the class directly, which then would obfuscate the test so it resembles the real usage less. With FP and pure functions, they usually map one input to an output, making it trivial to write tests for them and truly test them in isolation. And thank you for clarifying where you come from. Totally makes sense that you think about performance so much! 👍 I've been a fullstack dev for most of my career and over time I learned the best approach to browser performance is "fix it if it breaks, otherwise favor good DX (testability, readibility etc.)". (Most) Browsers are so fast nowadays that it doesn't matter if you take up extra memory. > I reach for it whenever possible, but only when I can afford doing so This pretty much sums it up! 😊 And in my experience, in most JS server and browser codebases, you don't need to optimize for performance so granularly. (Especially on the backend, if performance mattered, the teams switched to Rust or another fast language haha) Thanks again for your thoughtful reply!
@privacyvalued4134
@privacyvalued4134 Ай бұрын
0:13 Nope! Using the splat operator = automatic fail. Simply put, you don't understand how expensive that operator is and that it should only ever be used very sparingly. Go write a DSL from scratch in a real programming language and implement the splat operator as part of it to learn how wrong your first 15 seconds of this video is. Splat may be convenient but trash like that it is why my web browser is chugging 10GB RAM half of the time. The rest of your example is what I call "symbol soup." It's unreadable because it uses symbols instead of words. Good coding practices balance words and symbols in a pleasing, easy to read/understand experience.
@JanHesters
@JanHesters Ай бұрын
The examples in this video are NOT meant to be production code, but just to teach the concepts of FP. (I mention it at the end of the video.) But your comment is good advice, I hope more people read it!
@basedest4451
@basedest4451 Ай бұрын
I remember struggling with memoization 2 years ago doing related task on my first job. I wish I had this video back then. S-tier content. You deserve more subsribers bro
@JanHesters
@JanHesters Ай бұрын
Thank you for the kind words! 🙏 That's exactly the target audience. So far, this video received less views than my other ones, but I hope people who really need to find it, find it through SEO :)
@demarcorr
@demarcorr Ай бұрын
functional programming is the kind of programming i do at 3am after being awake for 20+ hours. jokes aside, FP is great but just like OOP, going too heavy and far into FP and you just end up in a different web of frankly painful complexity. I get the piping and composing and currying but man I can absolutely see how someone would be utterly lost looking at that, and its not fun to try and understand. FP and OOP compliment each other well, and I've personally found myself writing my "best" or at least "better" code by using FP and OOP together, but never going to far into one or the other. Def a good vid though very succinct, I would prob reco up to about 25:44 for most people
@JanHesters
@JanHesters Ай бұрын
Thank you for the kind words! And I agree, always choose the right tool for the job and take into account what your team knows! 👍
@xyangst
@xyangst Ай бұрын
Insane thumbnail
@JanHesters
@JanHesters Ай бұрын
Thank you!🙏
@KeganVanSickle
@KeganVanSickle Ай бұрын
Exposing all the "magic" under the hood. This was very helpful in understanding memoization. Great video!
@JanHesters
@JanHesters Ай бұрын
Thank you and you're welcome! What topic would you like to see covered next?
@StupidInternetPeople1
@StupidInternetPeople1 Ай бұрын
You wish you looked like that thumbnail 😂
@deatho0ne587
@deatho0ne587 Ай бұрын
Do not assume that JS GC is always fast and that the new array/object is minor time spent. When it comes to million+ those things matter in terms of speed. I am not saying you should avoid functional programming in most cases, just know your rough max cases when dealing with Map, Set, Array stuff, and functional programming.
@JanHesters
@JanHesters Ай бұрын
Absolutely! Basically: Readability > Cleverness > Performance as long as performance doesn't matter. As soon as it does, the order switches.
@petemoss3160
@petemoss3160 Ай бұрын
Wait, I thought this was Aphex Twin music video ;)
@JanHesters
@JanHesters Ай бұрын
Avril 14th - all day!
@szeredaiakos
@szeredaiakos Ай бұрын
FP patterns are the best way to write class methods :D
@JanHesters
@JanHesters Ай бұрын
I see what you did there lol
@coolaj86
@coolaj86 Ай бұрын
But at what cost? Clear > Clever. (the video was well done, but I walked away more firmly in the camp of "we should never allow this in a shared codebase")
@JanHesters
@JanHesters Ай бұрын
I mostly agree! But I disagree in certain circumstances. If you cannot train the team for whatever reason, then "yes," you should go with the best solution that everyone understands. Or if functional programming would objectively be the worst solution, then also "yes," you shouldn't use these techniques. But, if you have a team with a culture of mentorship and functional programming is the best solution, you should definitely level the team up and implement the cleanest solution.
@coolaj86
@coolaj86 Ай бұрын
@@JanHesters Have you ever tried to level up a team? Just getting basic automatic formatting, linting, and PR reviews implemented for the code that's there already is an absolute war of attrition. Well... I guess those are all boring things. There's probably a bigger market for people trying some new cool thing and feeling special about how smart they've become than doing the essential and tedious work of figuring out why core functions of the application are failing, seemingly at random, and any tiny change to something that changes the timing of database calls creates cascading failures... Of course, a big problem in the code base I'm thinking of is that they did use so much fp - but in all the wrong ways - using reducers to filter and create new objects, using maps to iterate over and mutate objects... most people aren't disciplined enough to use any of it correctly. They would be better of just sticking to for loops rather than creating things that no one else (or even they themselves) can read. You know what would be a really useful video? How to reset VSCode to a default working state after years of use. So many people disable all of the linting and other code tools and then things that should "just work" don't - because they've been disabled. If you're working with really next-level, hyper-intelligent people of a similar mindset I imagine that fp could be really fun and not hinder productivity, but we're at a state in technology where it's too much to expect people to get a contact form to work reliably. The hello worlds are failing. We need the simple for loops so that people can read what they wrote themselves. Most people need fewer tools, that they know how to use correctly, not more tools that they don't understand the nuance of. When I was young and all of that was being added to JavaScript, I used to think all those things were so cool and even used some of it correctly. Now... htmx is starting to look better all the time.
@coolaj86
@coolaj86 Ай бұрын
What tools do you have for leveling up a team? How do you approach it? How do you get people interested in quality and correctness over coolness and "if it fits it ships"ness?
@JanHesters
@JanHesters Ай бұрын
​@@coolaj86 > What tools do you have for levelling up a team? In my opinion, one-to-many and one-on-one mentorship is the most important tool for any dev team. > How do you approach it? Make sure that you have regular mentorship sessions with your team. Lead by example. > How do you get people interested in quality and correctness over coolness and "if it fits it ships"ness? Show them your arguments. If they agree, your arguments are good. If they disagree, that might be because you have a blind-spot. To answer all of these questions, might take its own proper video. I'll put in my backlog. Thanks for the idea! But I hope this somewhat answered your questions. If you have follow up questions, let me know. And if you disagree, I'd also be interested in your view! 🤓
@abdelhadiamhamdi
@abdelhadiamhamdi Ай бұрын
Thank you for your amazing content! I've found it incredibly helpful and was wondering if you could assist me with some topics related to arity.
@JanHesters
@JanHesters Ай бұрын
Sure! If you want, you can drop your question here, or DM me on X: x.com/janhesters
@muesli2kanal585
@muesli2kanal585 Ай бұрын
Now I want currywurst
@JanHesters
@JanHesters Ай бұрын
Don't forget the Sauerkraut! 😄
@rakeshgadave
@rakeshgadave Ай бұрын
Is this video going to help me to learn React?
@JanHesters
@JanHesters Ай бұрын
Implicitly yes, absolutely! A good understanding of the language helps you understand any JS framework better. And for React specifically, it can help you clean up your code in general. It'll also help you to understand higher-order components, selectors in Redux, and why thinks are rendering (closure).
@rakeshgadave
@rakeshgadave Ай бұрын
​@@JanHestersThank you.
@Teneedev
@Teneedev Ай бұрын
Thank you Jan
@JanHesters
@JanHesters Ай бұрын
Let's go 🔥
@lookasinsky
@lookasinsky Ай бұрын
I know that you wanted to show functional programming, but the example at the very beginning of the movie requires a lot of cognitive load so I would not say that we should write code like this. I've seen some projects where functional programming was in use and unfortunately I have to say that some parts of the project were too advanced in terms of the way how function currying was used. Thumbs up anyway.
@JanHesters
@JanHesters Ай бұрын
Thank you for your feedback! I agree and this is one of the last points of the video at the end 👍 Many of the examples are contrived to be as easy as possible. The goal of this video is to learn FP as opposed to real world use cases.
@kairollmann
@kairollmann Ай бұрын
Great presentation! But please everyone, be mindful when you're working in a team. It'll be rare that others in your team have studied and understood fp as much as you did. "Real" senior developers understand the value of easy-to-read, easy-to-maintain code. Junior devs create simple code for everyone on the team. Mid-level devs create opinionated, seemingly "so efficient", "so elegant" code. Senior devs create simple code again. I'll always remember how everyone on a team hated that one guy who added Ramda to the codebase and now they all had to work with it after he left. He was clearly smart and knew what he was doing, but he wasn't mindful of the team or of anyone coming after him. If in doubt, don't be that one guy who adds Ramda.
@JanHesters
@JanHesters Ай бұрын
I totally agree! Code readability and maintainability should always be a top priority. It's a balancing act between writing efficient code and ensuring that everyone on the team can understand and maintain it long-term. 1.) Sometimes, you want to use the best patterns AND teach the people who don't know them those patterns. (Especially in a mentorship-culture.) 2.) In other cases, you want to reach for the best tool that everyone knows. ("When in Rome, do as the Romans do.") My mentor taught me both.
@-N0PE-
@-N0PE- Ай бұрын
This is the best Javascript Video I've ever seen. (And I've been coding in JS since 8 years). Big kudos!
@JanHesters
@JanHesters Ай бұрын
Thank you for the kind words! 🙏
@cCubify
@cCubify Ай бұрын
Thanks for the explanation, left a like!
@JanHesters
@JanHesters Ай бұрын
Thank you so much!
@kaicooper9421
@kaicooper9421 Ай бұрын
I feel attacked the way he put 'senior' in quotes. Where can I go to get a better understanding, I was kinda lost towards the end. Great video, I learned a lot though
@JanHesters
@JanHesters Ай бұрын
Thank you! What is unclear? Maybe I can help you after the fact! 🙏
@kaicooper9421
@kaicooper9421 Ай бұрын
@@JanHesters Maybe I just need to write a few examples and fail abit :D Thank you!
@JanHesters
@JanHesters Ай бұрын
@@kaicooper9421 Let's go 🔥
@oluwatobilobaibuola5950
@oluwatobilobaibuola5950 Ай бұрын
This is sweet
@gland_du
@gland_du Ай бұрын
Bro your videos are just top notch. Much love from france ♥
@JanHesters
@JanHesters Ай бұрын
Thank you! Really appreciate it. Did you learn something fun new?
@gamingwolf3385
@gamingwolf3385 Ай бұрын
I like your content and your outfit bro continue
@JanHesters
@JanHesters Ай бұрын
Thank you! 🙏 Trying out things differently.
@zinda__bad
@zinda__bad Ай бұрын
good post. would be nice to see more positive examples rather than things not to do, or better yet, how to change your design/test thinking to fulfil the desideratum. appreciate that it's a lot of content to cover tho, nicely done
@JanHesters
@JanHesters Ай бұрын
Will create many future videos with testing best practices. Stay tuned!
@denisroo
@denisroo 2 ай бұрын
Nice energy and setup! 🔥
@JanHesters
@JanHesters Ай бұрын
Thanks!
@Septrba
@Septrba 2 ай бұрын
The number of times he said "Higher Order Component" is: 81 Which makes ~4,6 "Higher Order Component" / minute
@JanHesters
@JanHesters 2 ай бұрын
Reminds of Daft Punk saying "Around The World" 144 times lol
@kaicooper9421
@kaicooper9421 2 ай бұрын
Is this the same thing as 'currying'. you might want to start a course or something to btw
@JanHesters
@JanHesters 2 ай бұрын
A detailed video on functional programming including currying is coming soon 👍