Gui Ferreira
Gui Ferreira
  • Видео 130
  • Просмотров 537 954
You Should Know This Before Using Page Numbers on Your API
💎 Be a Patreon to get the source code: patreon.com/gsferreira
What can go wrong with using page numbers in your API.
💌 Free Developer Insights: guiferreira.me/newsletter
#softwaredevelopment #softwarearchitecture #restapi
Просмотров: 2 337

Видео

How to Ace Developer Job Interviews: 8 Tips
Просмотров 650День назад
Ace your software developer job interview with these 8 behavioural tips! 💌 Get Free developer insights like this in your mailbox: guiferreira.me/newsletter ⏲️ CHAPTERS 00:00 Intro 01:18 Tip 1 01:57 Tip 2 02:28 Tip 3 04:38 Tip 4 06:25 Tip 5 07:54 Tip 6 10:39 Tip 7 11:52 Tip 8 14:15 Bonus Tip #softwareengineer #programming
How to Debug .NET in Cursor AI (and How TDD Ruined my latest Review)
Просмотров 2,2 тыс.14 дней назад
💌 Get Free developer insights like this in your mailbox: guiferreira.me/newsletter In this video, let's see how to debug .net code using Cursor AI. 🔗 Issue .NET Debugger: github.com/dotnet/core/issues/505 🔗 NetCoreDbg: github.com/Samsung/netcoredbg 🔗 Extension: open-vsx.org/extension/muhammad-sammy/csharp 🔗 For macOS: github.com/dgokcin/dotnet-cursor-debugging-with-breakpoints?tab=readme-ov-fil...
Every .NET Developer Needs to Try This (Cursor Review)
Просмотров 10 тыс.21 день назад
💌 Get Free developer insights like this in your mailbox: guiferreira.me/newsletter 💎 Be a Patreon to get the source code: patreon.com/gsferreira #dotnet
How to Organize Your ASP.NET Program.cs File
Просмотров 5 тыс.Месяц назад
Join me as I show you how I organise my Program.cs in large ASP.NET Applications 💎 Be a Patreon to get the source code: patreon.com/gsferreira 🚨 KEY LINKS 🤝 Support me on Patreon (and get access to source code) here: patreon.com/gsferreira 💌 Free Developer Insights: guiferreira.me/newsletter 📘 Courses: guiferreira.me/courses/ 👨‍🏫 Workshops: guiferreira.me/workshops/ 🔗 GET IN TOUCH LinkedIn: www...
How to Set Up a GitHub Repo for an Amazing Developer Experience
Просмотров 1,8 тыс.Месяц назад
Here are 10 actionable tips to improve the developer experience on any GitHub repository. 💎 Be a Patreon to get the templates: patreon.com/gsferreira 🚨 KEY LINKS 🤝 Support me on Patreon (and get access to source code) here: patreon.com/gsferreira 💌 Free Developer Insights: guiferreira.me/newsletter 📘 Courses: guiferreira.me/courses/ 👨‍🏫 Workshops: guiferreira.me/workshops/ 🔗 GET IN TOUCH Linked...
Building better DTOs in C#
Просмотров 6 тыс.Месяц назад
How to build better DTOS in C# dotnet 💎 Be a Patreon to get the source code: patreon.com/gsferreira 🚨 KEY LINKS 🤝 Support me on Patreon (and get access to source code) here: patreon.com/gsferreira 💌 Free Developer Insights: guiferreira.me/newsletter 📘 Courses: guiferreira.me/courses/ 👨‍🏫 Workshops: guiferreira.me/workshops/ 🔗 GET IN TOUCH LinkedIn: www.linkedin.com/in/gferreira Twitter: twitter...
Clean Architecture vs Hexagonal Architecture: Which One Should You Choose for Microservices?
Просмотров 2 тыс.Месяц назад
Is it better to use Hexagonal Architecture or Clean Architecture for microservice applications? 💎 Be a Patreon to get the source code: patreon.com/gsferreira 🔗 Reddit: www.reddit.com/r/softwarearchitecture/comments/1esjc0z/clean_architecture_vs_hexagonal_architecture_for/ 🚨 KEY LINKS 🤝 Support me on Patreon (and get access to source code) here: patreon.com/gsferreira 💌 Free Developer Insights: ...
I added Azure Active Directory B2C to ASP.NET Core
Просмотров 2,2 тыс.Месяц назад
How to add Azure Active Directory B2c to an ASP.NET web application 💎 Be a Patreon to get the source code: patreon.com/gsferreira 🚨 KEY LINKS 🤝 Support me on Patreon (and get access to source code) here: patreon.com/gsferreira 💌 Free Developer Insights: guiferreira.me/newsletter 📘 Courses: guiferreira.me/courses/ 👨‍🏫 Workshops: guiferreira.me/workshops/ 🔗 GET IN TOUCH LinkedIn: www.linkedin.com...
Developers need a Code of Conduct?
Просмотров 6432 месяца назад
💎 Be a Patreon to get the source code: patreon.com/gsferreira 🚨 KEY LINKS 🤝 Support me on Patreon (and get access to source code) here: patreon.com/gsferreira 💌 Free Developer Insights: guiferreira.me/newsletter 📘 Courses: guiferreira.me/courses/ 👨‍🏫 Workshops: guiferreira.me/workshops/ 🔗 GET IN TOUCH LinkedIn: www.linkedin.com/in/gferreira Twitter: gsferreira GitHub: github.com/gsf...
REST, gRPC, or GraphQL: Which Should You Use?
Просмотров 2,8 тыс.2 месяца назад
Join me as I share with you the pros and cons of REST, gRPC and GraphQL for a Request-Response API. 🎟️ Enter to win a ticket to NDC Porto 2024: guiferreira.ck.page/ded62a461b 🚨 KEY LINKS 🤝 Support me on Patreon (and get access to source code) here: patreon.com/gsferreira 💌 Free Developer Insights: guiferreira.me/newsletter 📘 Courses: guiferreira.me/courses/ 👨‍🏫 Workshops: guiferreira.me/worksho...
"Should I write Unit Test for a Repository class?"
Просмотров 2,5 тыс.2 месяца назад
Join me as I share what I think about this Reddit question, about testing Repositories. 🎟️ Enter to win a ticket to NDC Porto 2024: guiferreira.ck.page/ded62a461b 🔗 www.reddit.com/r/dotnet/comments/1ecl31r/should_i_write_unit_test_for_a_repository_class/ 🚨 KEY LINKS 🤝 Support me on Patreon (and get access to source code) here: patreon.com/gsferreira 💌 Free Developer Insights: guiferreira.me/new...
Goodbye Exceptions! Hello Result Pattern!
Просмотров 9 тыс.2 месяца назад
Join me as I show you what is the Result Pattern. ⭐️ Coupon Code TELEMETRY20 to get a 20% discount: dometrain.com/course/from-zero-to-hero-open-telemetry-in-dotnet/?coupon_code=TELEMETRY20 🚨 KEY LINKS 🤝 Support me on Patreon (and get access to source code) here: patreon.com/gsferreira 💌 Free Developer Insights: guiferreira.me/newsletter 📘 Courses: guiferreira.me/courses/ 👨‍🏫 Workshops: guiferre...
5 Tips for Maintainable OpenTelemetry in .NET
Просмотров 1,5 тыс.3 месяца назад
5 Tips for Maintainable OpenTelemetry in .NET
When do I throw an Exception or Return an Error
Просмотров 3,8 тыс.3 месяца назад
When do I throw an Exception or Return an Error
How to Test RabbitMQ with Testcontainers in .NET
Просмотров 1,3 тыс.3 месяца назад
How to Test RabbitMQ with Testcontainers in .NET
How do I Stay Organized as a Developer
Просмотров 2,4 тыс.3 месяца назад
How do I Stay Organized as a Developer
Building Complex Objects in a Simple Way with C#
Просмотров 9 тыс.4 месяца назад
Building Complex Objects in a Simple Way with C#
The Testing Feature YOU DIDN'T KNOW YOU NEEDED
Просмотров 3,1 тыс.4 месяца назад
The Testing Feature YOU DIDN'T KNOW YOU NEEDED
18 VS Code Tips to Code FASTER
Просмотров 2,4 тыс.4 месяца назад
18 VS Code Tips to Code FASTER
How to Write Readable Tests (7 SIMPLE TIPS!)
Просмотров 1,5 тыс.4 месяца назад
How to Write Readable Tests (7 SIMPLE TIPS!)
Let's stop calling them 3 Pillars of Observability
Просмотров 1,1 тыс.4 месяца назад
Let's stop calling them 3 Pillars of Observability
Getting Started with Test-Driven Development
Просмотров 2,7 тыс.5 месяцев назад
Getting Started with Test-Driven Development
The Missing TDD Skill according to Kent Beck
Просмотров 1,9 тыс.5 месяцев назад
The Missing TDD Skill according to Kent Beck
The Best Practical Book to Learn Clean Code
Просмотров 2,4 тыс.5 месяцев назад
The Best Practical Book to Learn Clean Code
Think About this Before Creating a New Mock
Просмотров 3,1 тыс.5 месяцев назад
Think About this Before Creating a New Mock
8 Reasons Your Talks are Not Accepted at Conferences
Просмотров 5066 месяцев назад
8 Reasons Your Talks are Not Accepted at Conferences
Coupling and Cohesion to Write BETTER C# CODE
Просмотров 3 тыс.6 месяцев назад
Coupling and Cohesion to Write BETTER C# CODE
This Book Changed how I Refactor Code
Просмотров 6 тыс.6 месяцев назад
This Book Changed how I Refactor Code
Coupling and Cohesion Explained
Просмотров 6 тыс.6 месяцев назад
Coupling and Cohesion Explained

Комментарии

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

    typeof(string)

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

    True to the core. BDD can acts as source of truth

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

    What if I need to navigate between pages non sequentially? Aka: Page 1 -> Page 6

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

    So @9:30 you mention you might want to hash to continuation token so as not to expose internal id's. But I can't go back from the hash to the actual id unless I keep a list on the server. Also in the example you use an order integer Id, but what when I want to page through a filtered set of results that messed with this integer or any orderer key values. The way back is even harder. Let's assume SQL. Continuation could be just Id > continuationToken, but going back you would need to do Id< continuationToken and add an order by on the Id column with of course a limit/top restriction. This also ties what you can select to the Id order field. The less efficient Skip/Take query can easily manage forward and backward paging, and still works when you have filtering involved, or even ordering on a specific value. That generic solution might be less efficient but it makes working with pagination a lot easier.

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

    These are amazing tips. I really liked your motivation when explaining them. Well done!

  • @ashleyrfernandez
    @ashleyrfernandez 3 дня назад

    amazing class thankyou brother

  • @omarsadiq1623
    @omarsadiq1623 3 дня назад

    Thank you very much for this informative video. This all is new for me.

  • @SpkSpkS
    @SpkSpkS 3 дня назад

    Cursor have it..pls check beta in settings

  • @xaberue
    @xaberue 3 дня назад

    that's an excellent explanation and use case that all of us have faced at some point... thanks Gui!

  • @zikkrype
    @zikkrype 3 дня назад

    this may be useful when you're building some feed (e.g: instagram), but definitely, when building some adult content website, where people need some more precise navigation

  • @Rob_III
    @Rob_III 3 дня назад

    Pagination sucks when, during someone or some process paging your data, the data is modified. Let's say you're paging employees and you've just gone from page one to page two. Meanwhile, while you were looking at page one, an employee was added on the first page. Now you've "missed" the first employee and on page two you're seeing the last employee of page one as first entry. These 'continuation tokens' don't solve that either. Also, for every API request you're sorting the entire thing only to determine which records go on which page and to then only return a fraction of the data. And then the user / process asks for the next/prvious/other page and it all needs to be done all over again. It's horrendously inefficient. Whenever you can, try to avoid paging.

    • @Novascrub
      @Novascrub 3 дня назад

      So what is the alternative? Unbounded result sets? Also... paging and sorting over indexed columns is not that inefficient.

  • @GuillermoArellano
    @GuillermoArellano 3 дня назад

    Nah. 👎. Too complicated.

  • @psycho.2u
    @psycho.2u 4 дня назад

    It would be great if you could explain the underlying mechanism of this approach. What sets this apart from traditional pagination I have never worked with NoSQL. I assume that it's kind of index organized table. In the traditional method, - we start reading from the beginning - count to the offset - and then fetch records until we reach the page size With this new approach, we can use the index to directly jump to the starting point, improving performance. However, how does this work when we need to apply a filter and then skip and take records? Please explain clearly. Else, this video is not useful at all. We don't want to follow something just because an expert says to do it. We need to know the reason to think if it is worth implementing for our use case

    • @Novascrub
      @Novascrub 3 дня назад

      The raison d'etre for continuation tokens is that they provide a stable api. Regardless of how your implementation of paging works, the state needed to make paging go is a) not stored anywhere on the backend, and b) opaque to the client. That means that however you might need to change that logic is fair game. Whether you find yourself moving to a different datastore, or aggregating results from multiple sources, or anything else, there's no state stored, and nobody can depend on that structure, so there is no breakage. You can also extend this idea of encoding server state in an opaque token to facilitate _any_ stepwise, stateful process, not just paging. At least any that play out in interactive time. Because again, the key enabling points are: a) no state is stored on the backend b) the state is opaque to the client

  • @mrdrummer2564
    @mrdrummer2564 4 дня назад

    Surely you'll still need to do a second query to get the total?

  • @robertmrobo8954
    @robertmrobo8954 4 дня назад

    You Should Know This Before Using Page Numbers on Your API (with non-relational databases)

    • @deleted-u5g
      @deleted-u5g 3 дня назад

      explain?

    • @Novascrub
      @Novascrub 3 дня назад

      Nah, I think continuation tokens are a good practice to avoid breaking changes to the api, not for any implementation reason. They just make the pagination state opaque to the client so that it can evolve. Moving to a non-relational store is just one of the options it makes available.

    • @robertmrobo8954
      @robertmrobo8954 3 дня назад

      ​@@Novascrub Then it depends on the requirements, if one of the requirements is to allow users to jump into any page, and also alow them to select display size, then continuation tokens are not enough. Or you have to do a bit more that you would have if you didn't use them. Think of a view with a grid, which you can jump to any page and also have an option to select page size

    • @Novascrub
      @Novascrub 3 дня назад

      @@robertmrobo8954 I can do all that with tokens. Think about it for a second.

  • @haraheiquedossantos4283
    @haraheiquedossantos4283 4 дня назад

    Is this similar or equals to cursor pagination?

  • @lldadb664
    @lldadb664 4 дня назад

    Today I learned: test containers. Thanks for the lead to the concept and the modifications!

  • @KevinBecker-p4u
    @KevinBecker-p4u 4 дня назад

    Is this technique a forward only process? Otherwise, you would have to keep track of the continuation tokens as you go along.

    • @Novascrub
      @Novascrub 3 дня назад

      The token just encodes the next step. You can provide a forward token, a back token, or tokens that jump to particular places. I usually provide a forward and back token in each page result. The point is that it holds _all of the pagination state needed for the backend to produce the next step_ and that it is _opaque to the client_. If you observe those two things, then you can change any pagination logic and your api remains stable.

  • @codeantlers485
    @codeantlers485 6 дней назад

    A great video! In fact all the videos I've seen from you are high quality 🤌. I have a question though: if the green arrows represent the flow of control, what do the purple arrows represent?

  • @OeHomestead
    @OeHomestead 6 дней назад

    So the application became harder to maintain, harder to understand and with more code lines.

  • @Lunolux
    @Lunolux 7 дней назад

    thx for the video didnt know any of them

  • @BarbarosYurttagul
    @BarbarosYurttagul 7 дней назад

    Hey Gui, What is the tool that you used for drawing rectangles in screen?

  • @simonos777t
    @simonos777t 8 дней назад

    2:40 The choice of words here makes a confusing subject harder to understand

  • @robertpalmerjr
    @robertpalmerjr 9 дней назад

    You say you will answer the question “which IDE” but you never do. I see in the comments “Rider” but I hear you mention Jetbrains. I’m not familiar with either. But I’ll go look them up

  • @davidmontilla6466
    @davidmontilla6466 9 дней назад

    Love your video, I'm having an interview next week and I thought I was wrong if I ask questions about what they expect of me in the position but you just clear my mind

  • @matheusaugustodasilvasanto3171
    @matheusaugustodasilvasanto3171 10 дней назад

    Seems I have found another connoisseur of package by feature, not by layer. It's a shame industry standards still side with the latter! Excellent video, excellent code, excellent explanation. I only have one comment: it seems that for the current scope of the feature, Fakes might be a bit too much. After all, you only want to validate interactions between the repositories and the service, so stubs and spies should be enough. Fakes are the most powerful (tied with mocks) test doubles there are. The downsides of this power are: 1) complexity, as fakes need to emulate the behavior of a real system, and their code can spiral out of control; sometimes you can end up needing testing for your fakes! 2) performance, as using fakes for thousands of unit tests can make your test crawl to a halt. Fakes are best reserved for tests higher in the testing pyramid such as component, integration, system, acceptance, ... That being said, I am not against their application in this video. The code is "simple" enough where fakes are a perfectly fine choice. Furthermore, introducing two test double types (stub for the basket repository, spy for the order one) may be overwhelming for the target audience of this video. TDD is already hard enough! Furthermore, I am not familiar with the .NET world (I've only worked with Python professionally), and using fakes might be an industry standard I am unaware of. If that's the case, it's another good reason to have used fakes in the video!

  • @arkexplorer9328
    @arkexplorer9328 10 дней назад

    Hi, I do not think you can compare nUnit and xUnit, nUnit is Unit testing, xUnit is Integration testing, with xunit, you test the full api , in nUnit you only test that unit? As far as I know you cannot do Integration testing with nUnit?

  • @usernamename2978
    @usernamename2978 10 дней назад

    Enable subtitles to understand him.

  • @num1nex337
    @num1nex337 11 дней назад

    Hello, could you tell me name of the tune that plays in the background ?

  • @carlossouto9310
    @carlossouto9310 11 дней назад

    Tenho hoje uma entrevista, isto veio mesmo a calhar. Obrigado!

  • @baebcbcae
    @baebcbcae 11 дней назад

    not working good in long-term perspective

  • @OeHomestead
    @OeHomestead 11 дней назад

    It's all good and fun until you realise you have to start testing and returning the Result all the way up to the GUI. And all your void functions all of a sudden have to return Result. It'll get messy very fast.

  • @SinnerSam_
    @SinnerSam_ 13 дней назад

    I'm too confused now :) but maybe it's because imma jr.

  • @kitsurubami
    @kitsurubami 13 дней назад

    Yay design patterns! I love your accent by the way. "Margherita Director" has such beautiful pronunciation. I will definitely be using the builder pattern to help reduce redundancy in my tests. Thank you!

  • @kitsurubami
    @kitsurubami 14 дней назад

    What is this "public transportation system" you speak of? Just kidding :) American joke.

  • @kitsurubami
    @kitsurubami 14 дней назад

    Excellent! Thank you Gui!

  • @HansMilling-xm2nz
    @HansMilling-xm2nz 15 дней назад

    Shouldn't you have written the test for IsDivisibleBy first before implementing the method? And you cantually did not implement a test for it at all. Anyway, great video that explains the principle of test driven development.

    • @gui.ferreira
      @gui.ferreira 15 дней назад

      Minute 11:15? If so, I don't want to add new tests during a refactoring. It was just an internal implementation detail that changed and the external behaviour was still covered by the existing tests 😉

  • @Guillen8606
    @Guillen8606 15 дней назад

    Great explanation! Just a sugestion, please give it one more second when you drop code to be read. It always shows and then jumps of to another screen lol

  • @WDGKuurama
    @WDGKuurama 15 дней назад

    I would at least make it useful by turning it into a monad with a Map and Bind method..

  • @СергейИванченков-ДляСвоих

    I like this structure, looks obvious and clean. However, you have forgotten to demonstrate how each of these endpoints gets DI dependencies injected: Repositories, Logger, TelemetryClient, DBContext, whatever else real life app needs. And then again, there is never a practical app without Authentication/authorization. You need to show how to apply those in this pattern as well, otherwise this remains just a dead-end concept without practical guidance.

  • @erickgeneric
    @erickgeneric 16 дней назад

    Well explained. Thank you!

  • @kitsurubami
    @kitsurubami 17 дней назад

    Love this video. Thank you!

  • @mattymattffs
    @mattymattffs 17 дней назад

    Why bother with cursor? It's absolute trash

    • @주인석-m5q
      @주인석-m5q 12 дней назад

      Why do you think the Cursor IDE is trash?

    • @mattymattffs
      @mattymattffs 11 дней назад

      @@주인석-m5q because I have a brain

    • @SpkSpkS
      @SpkSpkS 3 дня назад

      Use ur brain 😂😂 let us progress !

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

      @@SpkSpkS and yet all data shows code quality trending downwards with AI. Maybe you should use your brain more

  • @keyboard_g
    @keyboard_g 17 дней назад

    The language, sdk, and runtime are all open source. The debugger is the tool that uses them. Both facts can be true.

  • @F2H16
    @F2H16 18 дней назад

    While I agree, all the exception-handling stuff can be moved into the global exception interceptor. The fluent validation type can be inferred by pattern matching in the TryHandleAsync method of IExceptionHandler. With that, we won't need to call the _validator.ValidateAsync on each HandleAsync.

  • @geraldmaale
    @geraldmaale 18 дней назад

    It sometimes doesn't make sense when you throw the word `Open Source` thinking someone should spend time and money to create something entirely free without benefits. If 'Cursor AI' thinks it needs to cater for .NET developers, they should be creative to create their own debugger, just as JetBrains did. Microsoft isn't doing things because they love us but to benefit as well.

  • @gui.ferreira
    @gui.ferreira 19 дней назад

    I didn’t cover debugging in this video, but you can find it here: ruclips.net/video/vbMe7NgQ9FQ/видео.htmlsi=Z0ZkBhBMS3ZHviBQ

  • @John.Oliver
    @John.Oliver 19 дней назад

    All good mate. Thank you for the update and the great videos.

    • @gui.ferreira
      @gui.ferreira 19 дней назад

      Thank you for the support 🙏

  • @caribouroadfarm
    @caribouroadfarm 21 день назад

    Cursor is limited to only its own IDE. Copilot can work with anything.

  • @CuriouslyContent
    @CuriouslyContent 22 дня назад

    I'm using all 3 IDE's (Cursor, Rider and VS). Do I need to? No, but I feel more productive with all 3. I have my solution open in all three and I jump between them for their strengths. Thankfully they all detect and process external changes reliably (at least they have for me). For blasting out code I already know how to write, Rider. For debugging, performance tuning and legacy code VS. For new frameworks or for areas where my experience is minimal, I use cursor to get me started in flushing out the bones of what I need, then I jump over to rider once I get my head around whatever the AI showed me. If Rider starts to emulate cursor with it's AI offering (right now I found it clunky), I think I agree with you Gui, I would fallback to just using Rider and VS.

    • @gui.ferreira
      @gui.ferreira 22 дня назад

      I was not expecting this comment :) 3 seems a lot, but I like how you are using them as specialised tools!