Daniel Bergholz
Daniel Bergholz
  • Видео 170
  • Просмотров 541 819
Elixir crash course #21: ExUnit (unit testing)
Check my website:
bergdaniel.com.br/
Documentation:
hexdocs.pm/ex_unit/
Course content:
0:00 - Intro
0:21 - The "wrong" way of testing
2:14 - Running tests with "mix test"
4:20 - Writing tests for the Users module
4:44 - Test script inside mix.exs
5:59 - The "use" macro
7:30 - Running tests in parallel
8:03 - doctest (testing code inside documentation)
9:30 - Testing Users.new/0
12:05 - Testing Users.new/2 (with "Daniel")
13:57 - Contexts
15:00 - Callbacks (setup and setup_all)
17:23 - Pattern Matching the context
18:35 - Test coverage
Просмотров: 222

Видео

Next.js is driving me crazy
Просмотров 2,9 тыс.19 часов назад
Check my website: bergdaniel.com.br/
How to become a 10x developer
Просмотров 1,1 тыс.День назад
Check my website: bergdaniel.com.br/
Elixir crash course #20: Structs
Просмотров 352День назад
Check my website: bergdaniel.com.br/ Documentation: hexdocs.pm/elixir/structs.html Course content: 0:00 - Intro 1:05 - defstruct 3:00 - Default values 3:42 - Mandatory fields (@enforce_keys) 5:04 - Refactoring the existing code 6:40 - Pattern matching 9:22 - Examples on TechSchool
How to increase Elixir adoption?
Просмотров 1,2 тыс.14 дней назад
Check my website: bergdaniel.com.br/ Original tweet: x.com/danielbergholz/status/1852705718429790579
What is Phoenix LiveView? Is it similar to React?
Просмотров 2,7 тыс.14 дней назад
Check my website: bergdaniel.com.br/ Video content: 0:00 - Intro 0:22 - What is LiveView? 0:54 - LiveView example 1:33 - Inspecting the WebSocket 3:47 - Next.js example 5:34 - React VS LiveView code 7:16 - UI code from LiveView 8:40 - mount() 9:22 - handle_params() 10:05 - handle_event("load_more") 13:00 - Every user opens a WebSocket connection???
Elixir crash course #19: Anonymous functions
Просмотров 23714 дней назад
Check my website: bergdaniel.com.br/ Documentation: hexdocs.pm/elixir/anonymous-functions.html Course content: 0:00 - Intro 0:19 - What is an anonymous function? 0:58 - Multi-line function 1:18 - Shorter syntax with "&" 4:09 - Using a named function 6:38 - Examples on TechSchool
Phoenix got authentication right
Просмотров 5 тыс.21 день назад
Check my website: bergdaniel.com.br/ Resources listed: - github.com/lucia-auth/lucia/discussions/1714 - hexdocs.pm/phoenix/mix_phx_gen_auth.html - dashbit.co/blog/a-new-authentication-solution-for-phoenix
My tech stack for 2025
Просмотров 2,9 тыс.21 день назад
Check my website: bergdaniel.com.br/
Elixir crash course #18: Enums (map, each, filter)
Просмотров 27521 день назад
Check my website: bergdaniel.com.br/ Documentation: hexdocs.pm/elixir/enumerable-and-streams.html Course content: 0:00 - Intro 1:20 - Enum.filter (in lists) 5:34 - Enum.map (in lists) 8:40 - Enum.each (in maps)
The only frontend frameworks worth your time
Просмотров 3 тыс.28 дней назад
Check my website: bergdaniel.com.br/
Frontend developers are in trouble
Просмотров 6 тыс.Месяц назад
Check my website: bergdaniel.com.br/
Elixir crash course #17: Recursion
Просмотров 325Месяц назад
Join this channel to get access to perks: ruclips.net/channel/UCnmbV9eyMwIl50Ji1ObFxqgjoin Check my website: bergdaniel.com.br/ Documentation: hexdocs.pm/elixir/recursion.html Course content: 0:00 - JavaScript example 0:57 - Recursion 2:29 - Example: Count 6:36 - Example: Total
Indie hacking became the next gold rush
Просмотров 733Месяц назад
Check my website: bergdaniel.com.br/ Source: x.com/adamc0dez/status/1843699599162184064
Stop Ignoring OG Images
Просмотров 1,6 тыс.Месяц назад
Check my website: bergdaniel.com.br/ Websites mentioned: highperformancesqlite.com/ remix.run/blog/merging-remix-and-react-router github.com/remix-run/remix-website/tree/main/app/routes/img.$slug
Elixir crash course #16: Conditionals (case, cond, if)
Просмотров 404Месяц назад
Elixir crash course #16: Conditionals (case, cond, if)
React Router v7 will save your legacy SPA
Просмотров 3,5 тыс.Месяц назад
React Router v7 will save your legacy SPA
Stop wasting time learning new React.js frameworks
Просмотров 3,1 тыс.Месяц назад
Stop wasting time learning new React.js frameworks
DHH is right about (almost) everything
Просмотров 1,9 тыс.Месяц назад
DHH is right about (almost) everything
What and how to test frontend applications
Просмотров 1,5 тыс.Месяц назад
What and how to test frontend applications
Why I migrated my website from Astro to Next.js
Просмотров 2,6 тыс.Месяц назад
Why I migrated my website from Astro to Next.js
How I replaced social media with books
Просмотров 1,5 тыс.Месяц назад
How I replaced social media with books
Node.js has a built-in test runner!
Просмотров 657Месяц назад
Node.js has a built-in test runner!
Moving back to JavaScript after my Elixir journey
Просмотров 4,7 тыс.Месяц назад
Moving back to JavaScript after my Elixir journey
Elixir crash course #15: Guards
Просмотров 3732 месяца назад
Elixir crash course #15: Guards
Elixir crash course #14: Pattern matching
Просмотров 3392 месяца назад
Elixir crash course #14: Pattern matching
Elixir crash course #13: Debugging
Просмотров 5133 месяца назад
Elixir crash course #13: Debugging
Elixir crash course #12: Pipe operator
Просмотров 4533 месяца назад
Elixir crash course #12: Pipe operator
Elixir crash course #11: Module attributes
Просмотров 4253 месяца назад
Elixir crash course #11: Module attributes
Elixir crash course #10: Import and alias
Просмотров 3763 месяца назад
Elixir crash course #10: Import and alias

Комментарии

  • @Zizaco
    @Zizaco 12 часов назад

    What makes Theo overlook AdonisJS? Is it the allure of Vercel’s sponsorship? or the convenience of the built-in S3 integration that scares him? 🤔

    • @DanielBergholz
      @DanielBergholz 10 часов назад

      In other videos, he mentioned that having a framework generate lots of files scares him, so maybe it's because of that? 😂

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

    I like the idea behind Elixir/Phoenix, but the language is not widely adopted. In my previous startup incubator, it's now forbidden, only Python and TS are allowed (to maintain consistency).

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

    Thanks for your wisdom

  • @jay.jarosz
    @jay.jarosz 3 дня назад

    Love it, thank you for sharing!

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

    AFTER: You're absolutely right about the attitude - that is what makes or breaks this whole thing, and everything gets derived from that.

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

    BEFORE: 10x developers are overhyped, but there competency is a spectrum. A person is good at some things, and really bad at others. For example I'm decent at figuring out what stakeholders want, and then couple together libraries and tools to build the features and functions to suit their needs. But ask me to do some low-level graphics programming and I'll just go and cry in the corner instead.

  • @PanTek-r8g
    @PanTek-r8g 4 дня назад

    Awesome. Exactly right. Logical architecture first

  • @PanTek-r8g
    @PanTek-r8g 4 дня назад

    Great content Daniel. Visually very clear. Null vs nil...null like seaGULL, nil like blackPILL...

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

    Thanks, keep up with the elixir content, the internet is already full of js content, its hard to find some good content like yours!

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

      Thank you! Elixir definitely needs more free content on RUclips 🚀

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

      @@DanielBergholz Definitely. If I can give a suggestion: I'm starting to learn elixir, and its my first functional language, so I still need to adjust the way of thinking in a elixir way. Would help a lot to see someone solving some problems using elixir, I already watched a lot of talks, and did almost every tutorial, but there are very few coding content out there. I would love to see Advent of Code in elixir, I think that would help to think through a problem using elixir. Thanks!

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

    My opinion on this and what i'v been looking lately is more coding content, because the syntax is unfamiliar so we need to adapt our way of thinking to solve problems. Advent of Code is a nice one, but we need more side projects coding to show how to solve problems in a elixir way.

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

    estou estudando ruby on rails e é delicinha

  • @realitydesigners
    @realitydesigners 5 дней назад

    skill issue

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

    One important feature you left out that I found interesting is the Inertia.js package. It allows you to bind your view pages with your backend without using rest api or graphql. I believe this eliminates the need for cache handling and pending states.

  • @Joshua.Developer
    @Joshua.Developer 6 дней назад

    Great video!@

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

    I actually understand this now! Nice video! Really enjoying the elixir content.

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

    Whats crazy about this video is that at any point you tried to read the docs...

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

    Thanks for all your elixir videos. The problem with Elixir/ Phoenis is that if you want to learn it, you almost immediately have to pay for courses, because there is far too little available for free on RUclips. Especially when you look for free Phoenix tutorials, you will see far too few. I would like to learn elixir/phoenix and live view, but I don't feel like throwing 100 euros or so on it right away. Don't get me wrong, I think you should pay for quality, but there should be a free step where you learn enough to start your own app from coding to installing it on a VPS. Unfortunately I don't see it and that's why I'm busy learning Rails because there is plenty out there about it. Rails has a complete framework including installation on a VPS. I think that's the path elixir needs to take as well if you want to get new "lonely" coders. I just think it's a shame that you don't have any content on Rails, because something about you makes you a great instructor

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

      Spoiler alert, I think you will enjoy my next free crash course 👀

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

    As the years go by, I increasingly believe that the web is heading in the wrong direction, trying to solve problems that have already been solved, creating new problems to justify this! Of course, there are scenarios where tools like Next.js are a possible solution. However, I believe that it does not exceed 10% of the market! The rest is the same as microservices: it became the standard because they thought it would be better.

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

    To be honest Nuxt 3 js isn't any better. it also has it's bugs.

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

    So good content! I'm happy to have discovered it today:)

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

    I am really struggling with understanding the use case for next.js and I run next.js in production with paying users.

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

      @@nickross4059 😂 that’s relatable, every time I use nextjs I question my decision

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

    Just move to Vue/Nuxt. There are many jobs, at least in the north east of the US, and all of this crap doesn't happen much at all.

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

    The fix is in the docs, you can find it in route segment config, it states: The values of the config options currently need be statically analyzable. For example revalidate = 600 is valid, but revalidate = 60 * 10 is not.

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

      Nice, thanks a lot!

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

      ​@@DanielBergholzcan you confirm please if that works?

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

      @@adrian110288 it worked!

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

      Awesome, I have learnt something new today 😊thanks for tryint

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

    JS ==Just ShootMe

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

    What are the theme and font that you use on vscode?

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

    ive had similar problem i didnt find a way to make page static with timer on revalidate only way i find to update the data was making page dynamic that wasnt what i wanted but didnt find other solution that worked. Tell me if you find out!

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

    Have you tried sveltelive and Phoenix?

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

    I cannot express in words the amount of frustration i've had when creating a personal project to learn Next, I had so much problems with cache in dev server that I didn't even want to see how it would work in production, just this experience alone was enough for me to quit on next/react ecossystem

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

      @@vinizote1209 I should have stopped with Next.js the moment I realized caching was a nightmare

  • @createbusiness-p6u
    @createbusiness-p6u 7 дней назад

    you can try using the revalidatepath which i think should invlidate the cache and fetch the new data

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

      @@createbusiness-p6u I think you’re supposed to use that whenever you update something any type of record on the codebase, and I’m not doing that, I’m just fetching playlists from the RUclips API

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

    Put nextjs in trash and use Astrojs

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

    While watching, I wanted to say if it does not work then you should apply for a new job as a Senior NextJS Ambassador / DevRel person. 😁 So that's my take at this point. 😁

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

    Does using Tanstack Query or Redux solve this? I'm new to Next.js and finding that anything specialised by Next.js is better handled by Tanstack or Redux, such as validation and caching.

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

    Try to use the next 14 with the pages router. It doesn't try to look like a frontend and backend framework; it's just a frontend framework with a small BFF layer, and that works just fine.

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

      @@nullush I don’t think “downgrading” my code is a good idea. Next.js has historically been horrible maintaining legacy features. Real soon they will deprecate the pages router or best case scenario, just stop working on it (with bug fixes and security updates)

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

      @DanielBergholz what makes you think that it'll be ever deprecated? It's still getting updates. You can use pages router with next.js 15. For me as a frontend developer, app router is a downgraded version. Because it doesn't have router events. It'll never have full support for view transitions API. The only way to achieve fast navigation in app router is by prefetching every link. It's easier to create waterfalls and security vulnerabilities.

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

      @@DanielBergholz overall, I think that making router server-centric was a bad idea. I think Remix/tanstack-start chose right direction

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

    Next JS 15 will solve all your problem, because now the default of all Next JS caching is "no-store"

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

      @@ibnurasikh it’s funny how everyone always says something like: “don’t worry bro, next js version 439 will fix it all!”, but most problems still persist. I like the fact that everything is dynamic by default, but I think “use cache” is extremely confusing

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

    I come from a Ruby on Rails background, which has received a lot of criticism over the years for being opinionated. Sure, Rails has many complex default behaviors, but you can easily override or skip them, and in over 10 years of running production applications, this has never been an issue. Next.js, on the other hand, takes being opinionated to another level. There are many things you have to do exactly the way Vercel devs intended, or you won’t be able to do them at all.

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

      @@adamk8724 exactly! And JS devs say rails has “too much magic” while they have an extremely complex and 0% transparent caching mechanism

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

    I'm feeling the same. But I'm feeling super homeless in the JavaScript ecosystem. I'm thinking of saying fuck it and going to Laravel/Django and doing it the old-fashioned way.

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

      @@jamilawada389 I did exactly this but with Elixir and Phoenix

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

    Theo the terrible

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

    What is driving me crazy is that you didn't just do a git revert when changing back the code 😂

  • @2viniciusms
    @2viniciusms 8 дней назад

    E o inglês tá o fino do fino

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

    Another reason I use Angular, its so under rated now, definitely recommend you try it :)

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

    have you thought about using remix

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

      @@madhatter2744 yes! Remix is actually going to become react router V7, I’ll make content about it in the future!

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

      Remix is basically React Router + Vite, so they've suspended Remix work to focus on React Router.

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

    I noticed you are using next.js 14.x.x, they recently made version 15 stable and think they fixed many of these cache issue

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

    Going through the same thing at work with NextJS. It never acts the way you expect it to. It's always different.

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

      @@Hypawolf no matter how much we read the docs, there is ALWAYS some magic going on underneath that we don’t understand

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

      @@DanielBergholz I am not a NextJS user but from the outside it seems to me that they literally do not even try... I mean it is just not the focus... The focus is to make people think they are the problem... Glad to see what Remix / React Router does though...

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

    Heres what i thought was going on, export const revalidate is just a "syntactic sugar" for cdn caching using the s-maxage, but then you changed to ssr for courses route and it worked. Wait what ??? 😭. It shoudnt have worked and now i am even more confused. Specially now there is a fking "use cache" thing thats a one for all thing, thats more confusing to me as i know there cant be a one for all thing, because there are multiple types of caching, from server caching on redis(or any other external source like KV), then there is http caching, cdn caching, route cache. I think it was better earlier everyone started to understand it but now i am fu*ked 😡

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

    I moved from next to tanstack start and never looked back. It's been amazing. Highly recommend it!

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

    "Cached data is persisted across deployments, unless invalidated through revalidate or programmatically calling revalidateTag or revalidatePath. It is not updated at build time. When invalidated, it will be updated at run time with the next new request to the path that was invalidated." The data cache is working as intended. Just because you added a revalidate on that fetch call doesn't mean the request changed... the vercel data cache layer still recognized the fetch (likely just by the url path as the cache key) and served up the cached data. It's the framework's job to bust the cache and tell vercel's data cache to serve updated data. After you built again with the revalidate added in and then when you visited to live page the Next.js server started its timer to revalidate the data cache in ONE DAY from then. Which means the next request to hit that page will cause the next.js server to re-render that "static" route and serve it up from the cache until the next revalidate call.

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

      Then why did it work when he, removed revalidate and changed the route to SSR?

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

      @@dwolrdcojp I literally waited 1 entire week before recording this video, my revalidate of 1 day was completely useless

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

      @@DanielBergholz lol fair. throw next in the bin

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

      As I understand 1day revalidate is working like you need to make a request after 1 day to start revalidation and only next request will be updated @DanielBergholz

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

      @ I was visiting my website everyday to check if the Phoenix crash course was there, and it wasn’t

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

    Well, in development we have to delete the .next folder in case this caching bug happens, idk how to do this i production in vercel.

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

      @@matheuspegorari1094 once you find out, please let me know 😅

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

    I think the problem is that you're not using nvim. Thank me later

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

      @@rinseyaron from now on I’ll just use neovim (BTW)

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

    Boa pronúncia do inglês e bom video, topp