Nick Chapsas
Nick Chapsas
  • Видео 500
  • Просмотров 33 860 584
The Only .NET Scheduler You Should Be Using!
Get 20% off our new Deep Dive: Domain-Driven Design course on Dometrain: bit.ly/44pf7sE
Get the source code: mailchi.mp/dometrain/4wurs-67mb0
Become a Patreon and get special perks: www.patreon.com/nickchapsas
Hello, everybody, I'm Nick, and in this video I will introduce you to Hangfire. The best .NET library for task or job scheduling in .NET.
Workshops: bit.ly/nickworkshops
Don't forget to comment, like and subscribe :)
Social Media:
Follow me on GitHub: github.com/Elfocrash
Follow me on Twitter: nickchapsas
Connect on LinkedIn: www.linkedin.com/in/nick-chapsas
Keep coding merch: keepcoding.shop
#csharp #dotnet
Просмотров: 33 128

Видео

The New Collection Access Feature of C# 13
Просмотров 37 тыс.12 часов назад
Until the 30th of April, use code BIRTHDAY40 for 40% off any course, BIRTHDAY20 for 20% off any bundle and BIRTHDAY15 for 15% off your first year of Dometrain Pro: bit.ly/4aUVR8l Become a Patreon and get special perks: www.patreon.com/nickchapsas Hello, everybody, I'm Nick, and in this video I will show you the brand new Implicit index access feature coming in C# 13 and .NET 9! Workshops: bit.l...
The Right Way to Write if Statements in C#
Просмотров 45 тыс.19 часов назад
Until the 30th of April, use code BIRTHDAY40 for 40% off any course, BIRTHDAY20 for 20% off any bundle and BIRTHDAY15 for 15% off your first year of Dometrain Pro: bit.ly/4aUVR8l Become a Patreon and get special perks: www.patreon.com/nickchapsas Hello, everybody, I'm Nick, and in this video I want to talk about if statements in C# and which version of if statements .NET developers should be us...
Lists Are 3 Times SLOWER in .NET 9!
Просмотров 25 тыс.День назад
Until the 30th of April, use code BIRTHDAY40 for 40% off any course, BIRTHDAY20 for 20% off any bundle and BIRTHDAY15 for 15% off your first year of Dometrain Pro: bit.ly/4aUVR8l Become a Patreon and get special perks: www.patreon.com/nickchapsas Hello, everybody, I'm Nick, and in this video I want to talk about a performance regression in .NET 9 regarding the Add method of Lists which is only ...
"Repositories in .NET Only Need Two Methods!" | Code Cop #017
Просмотров 39 тыс.День назад
Until the 30th of April, use code BIRTHDAY40 for 40% off any course, BIRTHDAY20 for 20% off any bundle and BIRTHDAY15 for 15% off your first year of Dometrain Pro: bit.ly/4aUVR8l Become a Patreon and get special perks: www.patreon.com/nickchapsas Hello, everybody, I'm Nick, and in this video of Code Cop I will take a look at LinkedIn advice that tells people to use just two methods in their rep...
"Stop Using LINQ in .NET!"
Просмотров 60 тыс.14 дней назад
Until the 30th of April, use code BIRTHDAY40 for 40% off any course, BIRTHDAY20 for 20% off any bundle and BIRTHDAY15 for 15% off your first year of Dometrain Pro: bit.ly/4aUVR8l Become a Patreon and get special perks: www.patreon.com/nickchapsas Hello, everybody, I'm Nick, and in this video I want to talk about one of the most insane things I've seen on Reddit regarding employers banning the u...
.NET 9 Fixed Exceptions but Still Don’t Use Them
Просмотров 37 тыс.14 дней назад
Until the 30th of April, use code BIRTHDAY40 for 40% off any course, BIRTHDAY20 for 20% off any bundle and BIRTHDAY15 for 15% off your first year of Dometrain Pro: bit.ly/4aUVR8l Become a Patreon and get special perks: www.patreon.com/nickchapsas Hello, everybody, I'm Nick, and in this video I will show you how Exceptions got much faster in .NET 9 and explain why I still don't think that they a...
You Need to Update Your .NET Solution Files!
Просмотров 71 тыс.21 день назад
Until the 21st of April, buy ANY Dometrain course and get the From Zero to Hero - LINQ in .NET course for free!! dometrain.com/courses/ Become a Patreon and get special perks: www.patreon.com/nickchapsas Hello, everybody, I'm Nick, and in this video I will introduce you to the new Solution Format that is coming with the latest Visual Studio Preview. This new format is called .slnx and it is a s...
Await Async Tasks Are Getting Awesome in .NET 9!
Просмотров 80 тыс.21 день назад
Until the 21st of April, buy ANY Dometrain course and get the From Zero to Hero - LINQ in .NET course for free!! dometrain.com/courses/ Become a Patreon and get special perks: www.patreon.com/nickchapsas Hello, everybody, I'm Nick, and in this video I will introduce you to a brand new await async and Task feature coming in .NET 9! Workshops: bit.ly/nickworkshops Don't forget to comment, like an...
"Stop Wasting Memory on Strings in C#!" | Code Cop #016
Просмотров 66 тыс.Месяц назад
Use code CLEAN15 and get 15% off the brand new "From Zero to Hero: Writing Clean Code with C#" course on Dometrain: dometrain.com/course/from-zero-to-hero-clean-code-with-csharp/?coupon_code=CLEAN15 Become a Patreon and get special perks: www.patreon.com/nickchapsas Hello, everybody, I'm Nick, and in this video I will take a look at really bad advice related to string allocations in C#. Not onl...
Ranking Every Programming Language Ever (OBJECTIVE, NOT BIASED)
Просмотров 28 тыс.Месяц назад
Use code EASTER25 for 25% off any course, EASTER15 for 15% off any bundle or EASTER10 for 10 off your first year of Dometrain Pro on Dometrain: dometrain.com Become a Patreon and get special perks: www.patreon.com/nickchapsas Hello, everybody, I'm Nick, and in this video, I will rank every programming language ever in an objective, non-biased way. This is the definitive list and if you disagree...
I messed up. I'm sorry.
Просмотров 58 тыс.Месяц назад
Use code EASTER25 for 25% off any course, EASTER15 for 15% off any bundle or EASTER10 for 10 off your first year of Dometrain Pro on Dometrain: dometrain.com Become a Patreon and get special perks: www.patreon.com/nickchapsas Hello, everybody, I'm Nick, and in this video I will address a mistake I did in my previous video regarding search values. Workshops: bit.ly/nickworkshops Don't forget to ...
The Fastest Way to Search Gets Even Better in .NET 9
Просмотров 50 тыс.Месяц назад
Use code CLEAN15 and get 15% off the brand new "From Zero to Hero: Writing Clean Code with C#" course on Dometrain: dometrain.com/course/from-zero-to-hero-clean-code-with-csharp/?coupon_code=CLEAN15 Become a Patreon and get special perks: www.patreon.com/nickchapsas Hello, everybody, I'm Nick, and in this video I will show you how .NET 9 improves the SearchValues class to make it one of the mos...
“Stop Using Good Names in Your Code” | Code Cop #015
Просмотров 29 тыс.Месяц назад
Subscribe to Dometrain Pro: dometrain.com/dometrain-pro/ Become a Patreon and get special perks: www.patreon.com/nickchapsas Hello, everybody, I'm Nick, and in this episode of Code Cop, I will take a look at terrible code naming practices. Your variables and code, in general, should have clear, long and self-descriptive names, and the advice in this video is everything but that. Workshops: bit....
“Turn All Your Enums Into Bytes Now!” | Code Cop #014
Просмотров 33 тыс.Месяц назад
Use code KUBE20 and get 20% off the brand new "From Zero to Hero: Kubernetes for Developers" course on Dometrain: dometrain.com/course/from-zero-to-hero-kubernetes-for-developers/?coupon_code=KUBE20 Become a Patreon and get special perks: www.patreon.com/nickchapsas Hello, everybody, I'm Nick, and in this episode of Code Cop, I will talk about enums and how turning them into bytes instead of in...
“.NET 9 Is Killing MediatR, MassTransit & Wolverine!”
Просмотров 75 тыс.Месяц назад
“.NET 9 Is Killing MediatR, MassTransit & Wolverine!”
The Ultimate .NET Developer Roadmap in 2024
Просмотров 90 тыс.Месяц назад
The Ultimate .NET Developer Roadmap in 2024
Getting Started with OpenTelemetry in .NET
Просмотров 42 тыс.Месяц назад
Getting Started with OpenTelemetry in .NET
How to Deploy .NET Apps to Kubernetes
Просмотров 32 тыс.Месяц назад
How to Deploy .NET Apps to Kubernetes
"Stop Using Properties in C#, Just Use Fields" | Code Cop #013
Просмотров 72 тыс.2 месяца назад
"Stop Using Properties in C#, Just Use Fields" | Code Cop #013
Make Your LINQ Up to 10x Faster!
Просмотров 51 тыс.2 месяца назад
Make Your LINQ Up to 10x Faster!
"The readonly Keyword Is Useless!" | Code Cop #012
Просмотров 35 тыс.2 месяца назад
"The readonly Keyword Is Useless!" | Code Cop #012
Why Developers Already Hate .NET 9
Просмотров 70 тыс.2 месяца назад
Why Developers Already Hate .NET 9
The Pattern You MUST Learn in .NET
Просмотров 72 тыс.2 месяца назад
The Pattern You MUST Learn in .NET
Build Messaging in .NET with Wolverine
Просмотров 57 тыс.2 месяца назад
Build Messaging in .NET with Wolverine
The Awesome New LINQ Methods Coming in .NET 9!
Просмотров 53 тыс.2 месяца назад
The Awesome New LINQ Methods Coming in .NET 9!
"Don't Use Loops, They Are Slow! Do This Instead" | Code Cop #011
Просмотров 60 тыс.2 месяца назад
"Don't Use Loops, They Are Slow! Do This Instead" | Code Cop #011
Why .NET's Most Ambitious Feature Might Fail
Просмотров 38 тыс.2 месяца назад
Why .NET's Most Ambitious Feature Might Fail
Microsoft Is Abandoning C# for Rust! Now What?
Просмотров 87 тыс.2 месяца назад
Microsoft Is Abandoning C# for Rust! Now What?
The Easiest Scheduling for Your .NET Applications
Просмотров 66 тыс.3 месяца назад
The Easiest Scheduling for Your .NET Applications

Комментарии

  • @wuketuke6601
    @wuketuke6601 Час назад

    I despise that multi line if statement for guard clauses. Often i have several if statements in a row, and that makes the multi line one unreadable

  • @marcotroster8247
    @marcotroster8247 2 часа назад

    I've found that the information to noise ratio is crucial. So don't feel too bad about deleting excessive braces. I used to do it the standard Microsoft way during my junior years, but now I actually like the 2 line version best. In case ternary is possible I'd even use that over if statements. I have to admit though that I worked with Python a lot, so the braceless version feels a lot more natural to me.

  • @cubbucca
    @cubbucca 2 часа назад

    I use all but the third one, bracket on same line. Honesty open your compiled libraries and you'll see all your efforts wasted as they will now all look the same.

  • @tacticalassaultanteater9678
    @tacticalassaultanteater9678 3 часа назад

    Use an autoformatter and #1; the formatter will unindent the second statement, highlighting your mistake.

  • @zeeshanmustafa7818
    @zeeshanmustafa7818 3 часа назад

    Since dotnet core, when hosted inside IIS, Hangfire goes down when app/api goes idle. Hence scheduled jobs are not executed on time. None of the solution worked for me ever and I moved to dotnet background workers (WS). Did anyone else faced similar issue, or was it only me doing something silly?

  • @KeithGraves
    @KeithGraves 5 часов назад

    I like having the brackets on their own lines, so I can easily see the start and end of the block by just scanning the left side of the screen. But I also use the single line for short statements, like guard clauses at the start of a method.

  • @nubdevice7404
    @nubdevice7404 9 часов назад

    C# and JS code is easily visible with free tools. If you care about keeping your code 'secret', that's a downside.

  • @TheWoodad
    @TheWoodad 13 часов назад

    Have used Quartz, HF and Coravel and for me personally, choosing one over another depends on the environment and app requirements.

  • @jblf1327
    @jblf1327 14 часов назад

    A valuable component !! Thanks

  • @jjgangi
    @jjgangi 14 часов назад

    You've essentially recreated checked exceptions.

  • @Tony-dp1rl
    @Tony-dp1rl 15 часов назад

    What a pointless addition to the language.

  • @anass9157
    @anass9157 16 часов назад

    D

  • @heavymetal116
    @heavymetal116 18 часов назад

    I also wonder why Blazor hasn't really taken off despite the fact it also a good front-end technology alternative to React or Angular.

  • @lolyasuo1235
    @lolyasuo1235 20 часов назад

    How about securing dashboard (exposing it only to authenticated users) and splitting it from the project to a different domain?

  • @ricodomonkos3053
    @ricodomonkos3053 21 час назад

    Just finished a Tibero (oracle clone) connector for Hangfire. :)

  • @wahebbenzaid543
    @wahebbenzaid543 23 часа назад

    I think people hate C# because it's not a beginner friendly language, people want to be seniors without making any effort to understand software engineering complex concepts, I encourage all the developers to take a look to C#/Java to understand and practice OOP at least!

  • @sinus3256
    @sinus3256 23 часа назад

    I prefer Quartz. It's really reliable, simple and well established.

  • @olegilyin6002
    @olegilyin6002 23 часа назад

    very buggy lib, this is a promotional video

  • @denielalain5701
    @denielalain5701 День назад

    Hello! I sometimes use one liners to code that is often the same. For example a null check in Equals override looks always the same one liner. There are important decisions, and even if the decision takes no longer than a "null check return", i will prefer the fourth. Years before when i started to learn programming i often resolved to break that one line into the second example. Even before that i learned java as one of my first programming languages, and i used the third example. Later on when i started to learn c#, our teacher was formatting it the java way in the class. In the class we often raced for the less lines of code not knowing we can just write everything after one another. Over time the fourth way grew on me because when i was using visual studio fresh "out of factory", it would be very convenient to press certain keys. Also i could see the scope immediately instead of searching for it these days (looking at java-like formatting for example). I have factored code in visual basic, and python, and those are very conveniently look similar to the c# way with the fourth example. Even before any of these i learned Comenius Logo with requiring one liners in console. I have got other console-like experience with one liners too

  • @airkami
    @airkami День назад

    Thanks for skipping the part new people won't know. bye I'm back to save people time Go to the csproj file and add 3 lines to <PropertyGroup> <PackAsTool>True</PackAsTool> <ToolCommandName>Weather</ToolCommandName> <PackageOutputPath>./nupkg</PackageOutputPath> Then run the command 'dotnet pack' Then, to install it globally you type 'dotnet tool install --globally' if done locally also add to that command '--add-source ./nupkg' then give the proj name 'weather.cli'

  • @ChamiCh
    @ChamiCh День назад

    I use the "brace-less multi-line" form for single statements, as long as the if statement is standing on its own. Which means no using it with 'else', and no using it where it might create ambiguity with nested ifs. If more statements need to be added, I add braces. If I reduce a multi-statement block to a single statement, I remove the braces. I don't buy the "stacked requests create ambiguity" argument, personally. Scope rules in C# are pretty darn consistent. It's not like C or JS where scope can be ambiguous or inconsistent at times. There's a limit to how idiot-proof it's worth making code before it starts actively becoming cumbersome to read through. Issues like the "double stacking" or placing multiple statements on a single lines aren't faults of whether or not braces are used; they're formatting issues of their own. If these are really becoming problematic for you, you're likely to have bigger issues already... I also use the inline 'using' syntax, but typically only when the enclosing scope is limited enough that including the extra braces is redundant, such as within an if block or a short method. That one has a bit more functional implication since it controls when the resource is disposed, so there are times when it makes more sense to want to have precise control over that.

  • @eglintonflats
    @eglintonflats День назад

    What language does he speaks?

  • @rrfarmer2000
    @rrfarmer2000 День назад

    Would very much like more info on this! Looks really nice, especially since it's not a windows service!

  • @dheerajyadav8134
    @dheerajyadav8134 День назад

    If a developer knows all these, atleast the green one, he is the entire dev team !

  • @peter_kiss
    @peter_kiss День назад

    Hangfire still executing everything (jobs, interacting with the storage) synchronously which is a big bummer. Everything will be a blocking call under the hood.

  • @dde-fz7ih
    @dde-fz7ih День назад

    When I was a 30 years old developer I would have chosen Option #4, for the same reasons you explain in this video. Now that I am a 50 years old developer, I tend to choose option #2, if the statement inside is trivial and short for readability which is IMHO the most important criteria. If the statement is a bit complicated or long, I go for option #4, again for readability. I let you choose if it's selinity or wisdom :).

  • @EminoMeneko
    @EminoMeneko День назад

    I am fine with all. One really need to stack another line of indented code to argue number 1 is bad. Even then, everybody knows that braceless syntax mean only the next line is considered. Never forget that as much as silence is an important part of music, spacing is an important part of formatting code. So to me such syntax means an empty line after. I however saw something in the production code of a professional project that's pretty bold. Braceless if followed by a foreach or it was something of that kind. I would never though about it myself. And probably many would be horrified, but it is understandable. (But I would refactor it should I have any subject in that part of code). This codebase was also the 1st time I met using without braces. Didn't knew it was possible. Took me a few minutes to understand but eventually got it. I had quite a bad time in a team where everyone was coding their own way. Changes just because one person have another code style set in VS... Boring as hell. I never had the occasion yet, but it seems we can force settings with editor config.

  • @yunietpiloto4425
    @yunietpiloto4425 День назад

    I've been using this one for a while now and it has everything I need. Great recommendation

  • @user-sn4ul4uy4m
    @user-sn4ul4uy4m День назад

    Please make a video to show all possible things we can do with Hangfire. I love your content so much.

  • @DynamicalisBlue
    @DynamicalisBlue День назад

    I dunno if I'm missing something here as I fail to see what this achieves. Reflection is cool because it lets you do things you otherwise cannot do, but with this Unsafe stuff, it's practically the same as calling a method directly. I can see that it's a hack to access a private method but there's probably a reason why it's private. If you don't think it should be private, in most cases, you can modify the library from source instead of relying on Nuget. This is far safer than introducing this Unsafe accessor that could just break when you update the dependent library because they changed something that they didn't expose.

  • @DynamicalisBlue
    @DynamicalisBlue День назад

    The first language I learned was C# when I was 14 and I'm glad coz it pays off a lot. Anyone who teaches JavaScript as a first language should be in hell. JavaScript is a broken and messy language, and makes it difficult to transition to another (better) language.

  • @F1nalspace
    @F1nalspace День назад

    I live in two worlds: I do C99/C++ and C# programming. For C#, i always use the preferred version of microsoft with curly braces on a new line. However, for single line statements i always remove the curly braces and leave the statement on the second line, because its much more easy to read and i can debug it much easier. In the C world, i always use the first version of the reddit post - moving the starting curly braces at the end of the condition. This also saves a bit of space, which is important for me because my libraries i write are massive in code lines due to its single-header-file-style - so i dont have to scroll that much. Regard the keyword "using" -> I do the same thing, i intentionally use the scoped version instead of the shorter one - because i want to see the code flow.

  • @oleksiia
    @oleksiia День назад

    Is it next possible ? - have web API with Hangfire as described in the video but only for job registrations - have a separate service (several may be) on different host\hosts connected to the same Hangfire database but actually processed registered by API jobs.

    • @spacemanjack777
      @spacemanjack777 6 минут назад

      Yes. Hangfire separates the client (job scheduling) from the server(s) (job processing). They don't have to run on the same host. Common approach is to deploy a Windows Service as a server instance. You can have multiple servers that are processing the jobs. They just need access to the Hangfire data storage. And for each server you can specify if it should only process jobs from specific queues (default is to process from all queues).

  • @Thial92
    @Thial92 День назад

    Why tho ? Why try to reinvent the wheel with no real benefit other than obscuring what the code is actually doing behind various symbols ?

  • @Sergio_Loureiro
    @Sergio_Loureiro День назад

    Can you do a video about whether at this time RestSharp is still relevant compared to the actual encarnation of the native .Net HttpClient? Tks in advance.

  • @canergurelsoy6875
    @canergurelsoy6875 День назад

    how about compiring hangfire to Coravel ??

  • @IldarIsm
    @IldarIsm День назад

    This is not the video i have searched for, Google

  • @user-zp6pk4lc1o
    @user-zp6pk4lc1o День назад

    Why just do not use a message broker with default dotnet background worker (hosted service)?

  • @arekxv
    @arekxv 2 дня назад

    If you are writing the repository pattern just to abstract away the database "because it might change" tomorrow, stop. That was just a poor example people used to explain it. Real power of Repository pattern comes in abstracting the data retrieval and storage logic. When you write the function in a way which this linkedin post doesn't recommend (which is a bad advice of course), you say that those functions are what people using the repository MUST use and they SHOULD NOT think about internal logic of how repository does it. Why? Because that is internal code and when people are not passing stupid things like predicates, you have freedom to change, optimize and do whatever INSIDE the repository and not affect anything outside of the repository. THAT is the real power it. Now to be fair, there is a compromise solution for the linked in post. Instead of passing a predicate, require the user to pass an object of filters, a class where each public property is optional (unless you require some) and nulled by default. Then in the implementation you use that filter object to decide how YOU want to build that query. In other words, you turn the database into kind of a REST API with requests and responses except way more simpler. You get the best of both worlds. :)

  • @Philippe42460
    @Philippe42460 2 дня назад

    Thank you for making this video which made me understand how to start with Hangfire. I had a look at it and it is really interesting. At my work we use Quartz especially for recurring jobs. I had a deeper look at Hangfire for this feature and saw that Hangfire cron expressions do not support seconds whereas Quartz do. I find it really deal breaker for Hangfire because all the other features are really cool especially the ability to not run all the jobs concurrently which is not supported by Quartz. Quartz is only able to avoid two identical jobs run concurrently but not two different jobs whereas Hangfire can do it.

  • @larsp5109
    @larsp5109 2 дня назад

    Hopefully integration with Aspire will become available soon.

  • @vertigosoft
    @vertigosoft 2 дня назад

    I had to dump hangfire for quartz net because hangfire retry policyfor schedule jobs doesn't work as expected, and it does not allow me to run jobs in parallel.

  • @grimmersnee
    @grimmersnee 2 дня назад

    HF just works and fairly simple and easy to setup

  • @JoshOlsonDev
    @JoshOlsonDev 2 дня назад

    I introduced Hangfire into the last company I worked at, and at first it was amazing. Once we started using some of the more advanced features, it started annoying us more and more. It would frequently lose logs. Jobs would die and the exception details would not be captured. We put it on the SQL Server instance for the rest of our app, and it would frequently kill the performance for our users just because it was checking the status of various jobs. I'm happy to hear everyone else in the comments have had good experiences with it, but I will never touch it again

    • @JoshOlsonDev
      @JoshOlsonDev 2 дня назад

      More thoughts... We would have jobs that would succeed, all the while under a single SQL Server transaction, and then somehow it'd rerun the successful job, causing all kinds of problems. You have to make quadruple sure every single piece of code you write is idempotent. But even then, it would sometimes be difficult because a single job ID would be executing 3 times concurrently. It was terrible. Granted, we had 12 servers all leveraging the same Hangfire database, but according to the docs, the way we had it configured, it should have been 👌🏻👌🏻. Oh, btw, if you want to blame our config, we would log which server picked up the job, and server 5 (let's say) would run the job to successful completion, then look for more work to do, grab the exact same job, run it again and corrupt s***. Thanks, Hangfire

  • @luc9volts
    @luc9volts 2 дня назад

    What if the prod user is iis don't have permission of create table?

  • @BozCoding
    @BozCoding 2 дня назад

    Really interesting, I'd love to see more in-depth preview, especially since I've been looking at Microsoft's Durable Functions, but also been wanting to move away from requiring MSSQL (esp since they don't support an ARM64 Docker container atm).

  • @hafizabdullah7488
    @hafizabdullah7488 2 дня назад

    Hangfire is great to do background job but the dashboard becomes really slow after some time because of past data.

  • @leknyzma
    @leknyzma 2 дня назад

    there is so much ways to create background threads, I would not use this lib at all. Only if I had to

  • @stephenyork7318
    @stephenyork7318 2 дня назад

    Hangfire is terrible. I’ve had cases where I’ve disabled schedules and they still run. The database has a fully qualified namespace to a method that will run and it invokes them when it shouldn’t.

  • @joephillips6634
    @joephillips6634 2 дня назад

    I've never heard anything bad about hangfire so I started using it recently and... I ran into problems with it, particularly with long-running tasks. I'm guessing it's because I should have been using background jobs instead of regular(?) jobs