JSJ 399:  Debugging with Async/Await with Valeri Karpov

JSJ 399: Debugging with Async/Await with Valeri Karpov

Valeri Karpov is a maintainer on Mongoose, has started a few companies, and works for a company called Booster Fuels. Today’s topic debugging with Async/Await. The panel talks about some of the challenges of debugging with Async. AJ, however, has never encountered the same problems, so he shares his debugging method. Valeri differentiates between .catch vs try...catch, and talks about why he prefers .catch. There are two ways to handle all errors in an async function without leading to an unhandled promise rejection. The first is to wrap the entire body of the async function in a try...catch, has some limitations. Calling an async function always returns a promise, so the other approach is calling .catch on the promise to handle any errors that occur in that function body. One of the key differences is if you return a promise within an async function, and that return promise is wrapped in a try...catch, the catch block won’t get called if that promise is rejected, whereas if you call .catch on the promise that the function returns, you’ll actually catch that error. There are rare instances where this can get tricky and unintuitive, such as where you have to call new promise and have resolve and reject, and you can get unexpected behavior.The panel discusses Valeri’s current favorite JS interview question, which is, “Given a stream, implement a function called ‘stream to promise’ that, given a stream, returns a promise that resolves to the concatenation of all the data chunks emitted by the stream, or rejects if the stream emits an error event.” It’s really simple to get this qustion right, and really simple to get it wrong, and the difference can be catastrophic. AJ cautions listeners to never use the data event except in the cases Val was talking about, only use the readable event.The conversation turns to the function of a readable event. Since data always pushes data, when you get a readable event, it’s up to you to call read inside the function handler, and then you get back a chunk of data, call read again and again until the read returns null. When you use readable, you are in control and you avoid piling functions into RAM. In addition, the right function will return true or false to let you know if the buffer is full or not. This is a way to mix imperative style into a stream.The next discussion topics are the differences between imperative style and reactive style and how a waits and promises work in a normal four loop. A wait suspends the execution of a function until the promise is resolved. Does a wait actually stop the loop or is it just transpiling like a promise and it doesn’t stop the loop. AJ wrote a module called Batch Async to be not as greedy as promise.all but not as limited as other options.The JavaScript panelists talk about different async iterators they’ve used, such as Babel. They discuss the merits of Babel, especially since baseline Android phones (which a significant portion of the population of the world uses) run UC Browser that doesn’t support Babel, and so a significant chunk of the population of the world. On the other hand, if you want to target a large audience, you need to use Babel.Since frameworks in general don’t handle async very well, the panel discusses ways to mitigate this. They talk about different frameworks like Vue, React, and Express and how they support async functions. They discuss why there is no way for you to actually cancel an async option in an actual case, how complex canceling is, and what you are really trying to solve for in the cancellation process. Canceling something is a complex problem. Valeri talks about his one case where he had a specific bug that required non-generic engineering to solve, and cancelling actually solved something. When AJ has come across cancellation issues, it’s very specific to that use case. The rest of the panelists talk about their experiences with having to cancel something. Finally, they talk about their experience with async generator functions. A generator is a function that lets you enter into the function later. This makes sense for very large or long running data sets, but when you have a bounded items, don’t complicate your code this way. When an async generator function yields, you explicitly need to call next in order for it to pick up again. If you don’t call ‘next’, it’s essentially cancelled. Remember that object.keys and object.values are your friends. Panelists
  • Christopher Buecheler
  • AJ O’Neal
  • Charles Max Wood
With special guest: Valeri KarpovSponsorsLinks Follow DevChatTV on Facebook and Twitter PicksAJ O’Neal:Christopher Buecheler:Charles Max Wood:Valeri Karpov:Special Guest: Valeri Karpov.

Support this podcast at — https://redcircle.com/javascript-jabber/donations

Privacy & Opt-Out: https://redcircle.com/privacy

Become a supporter of this podcast: https://www.spreaker.com/podcast/javascript-jabber--6102064/support.

Episoder(726)

Interactive Coding Tutorials with Tomek Salkowski: Enhancing Developer Experiences - JSJ 651

Interactive Coding Tutorials with Tomek Salkowski: Enhancing Developer Experiences - JSJ 651

AJ and Steve dive deep into the world of interactive coding tutorials alongside guest, Tomek Sułkowski. They kick off with a brief chat about the weather before delving into Tomek's expertise in creating engaging and interactive tutorials—shedding light on everything from the history of coding tutorials to the technical wonders of web containers, brought to prominence by platforms like Stackblitz.They explore the innovative "tutorials kit dot dev," a revelatory tool for developers, and discuss the triumphs and challenges in building these interactive learning experiences. Plus, discover amazing tech insights from AJ, development updates from Tomek, and a whole lot more. SocialsLinkedIn: Tomek Sułkowski PicksAJ - Rocky Mountain ATVAJ - pg-essentialsAJ - SSH now has IncludeAJ - DeepSeek-Coder-v2Tomek - Component partyTomek - IconesBecome a supporter of this podcast: https://www.spreaker.com/podcast/javascript-jabber--6102064/support.

1 Okt 202457min

Optimizing SQL and ORM Practices for High-Performance Applications - JSJ 650

Optimizing SQL and ORM Practices for High-Performance Applications - JSJ 650

In today's episode, Charles, Steve, and AJ, are joined by back-end engineer and team lead at Homebound, Stephen Haberman. We delve into the fascinating world of SQL c and its revolutionary approach to managing SQL queries with dedicated SQL files, delivering benefits such as reduced typing errors and pre-deployment checks. Stephen also walks us through the advantages and limitations of ORMs versus query builders like Prisma and Drizzle, sharing insights into Joyce ORM's unique philosophy and simplified CRUD operations.They explore the intricacies of Domain Driven Design (DDD), its emphasis on ubiquitous language, and how it shapes business logic and storage management. AJ contributes by discussing the potential of SQL c and Slonik for dynamic query building. Additionally, they discuss Steven's innovative work with GraphFileWorker and GrafAST, highlighting the performance improvements in GraphQL backends. Whether you're intrigued by the technicalities of ORMs, the evolution of database tools, or just love a good anecdote, this episode packed with technical insights and lively discussions is one you won't want to miss. Join them on this journey into the world of database management and development!SocialsLinkedIn: Stephen HabermanPicks AJ - TypeScript to JSDocAJ - MySQL to TypeScriptAJ - sqlcAJ - Slonik (Node + Postgres)AJ - SwiftUI EssentialsAJ - Introduction to SwiftUI AJ - Trump, but not saying dumb thingsCharles - Biblios | Board GameCharles - FreeStyle Libre 3 System | Continuous Glucose MonitoringStephen - Grafast | GrafastBecome a supporter of this podcast: https://www.spreaker.com/podcast/javascript-jabber--6102064/support.

24 Sep 20241h 31min

Mentorship in Tech: Balancing Professionalism and Friendship for Maximum Growth and Accountability - JSJ 649

Mentorship in Tech: Balancing Professionalism and Friendship for Maximum Growth and Accountability - JSJ 649

They dive deep into the world of mentorship, personal growth, and problem-solving with our special guests, Joao and Manny, alongside our insightful panelists, AJ and Charles.In this episode, they explore the transformative power of weekly accountability meetings (WAM), where tasks are committed and followed up with a yes or no, no excuses allowed. Joao and Manny share their journey of mentorship that crossed borders, forging a strong bond through adversity and mutual respect. We'll also delve into how their dynamic friendship amplifies professional standards, and the importance of balancing personal and professional relationships.We discuss the profound impacts of structured problem-solving methods, specifically George Polya's renowned four-step process. Joao and Manny highlight how this systematic approach has refined their coding skills and overall problem-solving abilities. Alongside, we touch upon the fascinating intersection of human learning and AI, emphasizing the unique capacity humans have for generalizing new problems from limited data.In addition, our speakers will share their roadmap for continuous learning, curriculum development, and practical exercises—highlighting tools like Trello for task management and Anki for reinforcing learning. AJ O'Neil offers his unique perspective on the talent it takes to thrive in programming and how personal enjoyment is crucial for sustained success.Later, we'll transition to our Picks section, where AJ, Charles, and the guests share their latest recommendations, from essential productivity tools and engaging books to top-notch apps and board games.Finally, we'll wrap up with some valuable insights on time management, consistent study habits, and the importance of finding a mentor who truly cares about your growth. Whether you're a seasoned developer or just starting out, this episode is packed with practical advice and inspiring stories that you won't want to miss. So, tune in for all this and more on Top End Devs!PicksAJ - Apple EarpodsAJ - SwiftUICharles - Biblios | Board GameCharles - FreeStyle Libre 3 SystemManny - Jaco: The Extraordinary and Tragic Life of Jaco PastoriusManny - Baldur's Gate 3 on SteamBecome a supporter of this podcast: https://www.spreaker.com/podcast/javascript-jabber--6102064/support.

17 Sep 20241h 19min

Unpacking Deno 2: Code Stability, Free Speech, and more - JSJ 648

Unpacking Deno 2: Code Stability, Free Speech, and more - JSJ 648

Today, Charles, Dan, AJ, and Steve dive into a range of fascinating discussions. Joining this episode is special guest, Ryan Dahl, the visionary creator behind Node.js and Deno.In this episode, they traverse an eclectic mix of topics, from humorous offbeat news and dad jokes to in-depth tech discussions. They explore the complexities and legalities surrounding free speech, offering diverse perspectives on its implications in the modern digital landscape.But the heart of our discussion is Ryan Dahl's exploration of Deno 2, the latest evolution in JavaScript's runtime environment. You'll hear about its distinctive features, including the revolutionary JSR project, and how it aims to simplify and secure modern JavaScript development, addressing challenges and limitations found in Node.js. They also discuss the intricacies of TypeScript support, Deno’s security model, and the future potential of JavaScript in data science.Join them for a lively conversation packed with insights, technical deep-dives, and plenty of humor. Whether you're a seasoned developer or just starting your coding journey, this episode is sure to offer valuable takeaways and an entertaining ride through the world of modern web development.Sponsors Wix StudioSocialsLinkedIn: Ryan DahlTwitter: @deno_landDenoPicksAJ - SwiftAJ - DenoCharles - Challengers! | Board GameRyan - GrainBecome a supporter of this podcast: https://www.spreaker.com/podcast/javascript-jabber--6102064/support.

10 Sep 20241h 34min

Opinionated Core Web Vitals - JSJ 647

Opinionated Core Web Vitals - JSJ 647

Dan Shappir takes the lead this week to discuss Core Web Vitals and how Google is pushing the web to be faster.He leads Chuck, Aimee, and AJ through the ways that developers can measure and improve the performance of websites based on the statistics specified by Google as components of Google rankings.Sponsors Wix StudioLinksWeb VitalsPicksAimee- GitHub | treosh/lighthouse-ci-actionAimee- GitHub | GoogleChrome/lighthouse-ciAJ- Classless CSSAJ- One FinanceAJ- JCS - Criminal Psychology - YouTubeAJ- Auth Library Live StreamCharles- Atlas Shrugged Charles- Dev Influencers | Devchat.tvDan- Core Web Vitals Technology ReportDan- Math Has a Fatal Flaw - YouTubeBecome a supporter of this podcast: https://www.spreaker.com/podcast/javascript-jabber--6102064/support.

3 Sep 20241h 10min

Beyond JavaScript: Master TypeScript at Scale at SquiggleConf  - JSJ 646

Beyond JavaScript: Master TypeScript at Scale at SquiggleConf - JSJ 646

Dan together with Josh Goldberg, a prominent open-source maintainer and author of "Learning TypeScript, dive into the world of TypeScript and JavaScript with a special focus on the upcoming Squiggleconf. In this episode, they'll detail the conference format, including its dedicated days for talks and workshops, and highlight the impressive lineup of speakers who will cover topics like ASTs, TypeScript at scale, and essential documentation practices.Josh also shares insights into the evolution and practical application of TypeScript ESLint. Expect a deep dive into TypeScript's latest features, such as generics and specific lint rules that enhance code quality and developer experience.SocialsLinkedIn: ‌Josh ‌GoldbergPicksDan - Dan's favorite standalone fantasy booksDan - Despicable Me and MinionsJosh - NeuromancerJosh - WitcherBecome a supporter of this podcast: https://www.spreaker.com/podcast/javascript-jabber--6102064/support.

28 Aug 20241h 10min

Deep Dive into Metrics and Monitoring with Prometheus and Grafana - JSJ 645

Deep Dive into Metrics and Monitoring with Prometheus and Grafana - JSJ 645

Dive into a fascinating discussion blending the worlds of literature, gaming, and tech. In this episode, Chuck and Dan explore the intriguing connections between The Hobbit and The Lord of the Rings, including an extraordinary tale about Israeli pilots translating The Hobbit during wartime. They share insights into Guy Gavriel Kaye’s standalone novel Tigana, inspired by Renaissance Italy, and discuss the complexities and strategies of board games like Monopoly and Letters from Whitechapel.But that’s not all. The episode takes a technical turn as the speakers delve into the dynamic world of application monitoring with Prometheus. They unpack the mechanics of event loop lag, heap usage, and GC storms, and share how Prometheus's query language (PromQL) and integration with Grafana can proactively manage and solve performance issues. Hear about real-time alerting, sophisticated querying, and the practical applications of these tools in companies like Next Insurance and Sisense.This episode is packed with information - from managing performance metrics and alerting systems to insightful discussions on favorite standalone fantasy novels and the productivity hacks that keep our hosts on top of their game. So, sit back and join us for an engaging and informative session on Top End Devs!SocialsLinkedIn: Chuck WoodLinkedIn: Dan ShappirPicksCharles - Letters from Whitechapel | Board GameCharles - TrainingPeaks | Empower Your TrainingBecome a supporter of this podcast: https://www.spreaker.com/podcast/javascript-jabber--6102064/support.

20 Aug 20241h 25min

Crafting Code and Community: AI, LeetCode, and Meetups - JSJ 644

Crafting Code and Community: AI, LeetCode, and Meetups - JSJ 644

In this episode, they dive deep into the world of coding, meetups, and the evolving landscape of technical interviews. Join them as they explore the fascinating use of OpenAI's technology for coding assistance, the challenges of setting up impactful meetups, and the intricacies of mastering LeetCode problems.Our experts share invaluable insights—from leveraging AI tools like GPT to generate code effectively, to the essential strategies for problem-solving during high-pressure technical interviews. They also touch on the importance of deliberate practice, group support, and finding the right mindset for tackling coding challenges. Plus, hear personal stories about the benefits of taking breaks, the role of LeetCode in honing coding skills, and the shift in interview styles towards speed and pattern recognition.Sponsors Wix StudioSocialsAnatoliy D. ZaslavskiyLinksNYC LeetCode SquadPicksAJ - Yumi and the Nightmare Painter by Brandon SandersonAJ - The ChosenAJ - Beauty & The BeatAnatoliy - Authentic relatingAnatoliy - Neurodivergent Guide to the WorkplaceCharles - Challengers! | Board GameSteve - Myspace celebrates its 21st birthday. Do we still need it?Become a supporter of this podcast: https://www.spreaker.com/podcast/javascript-jabber--6102064/support.

13 Aug 20241h 9min

Populært innen Business og økonomi

stopp-verden
dine-penger-pengeradet
e24-podden
rss-penger-polser-og-politikk
rss-borsmorgen-okonominyhetene
tid-er-penger-en-podcast-med-peter-warren
finansredaksjonen
pengesnakk
utbytte
livet-pa-veien-med-jan-erik-larssen
pengepodden-2
morgenkaffen-med-finansavisen
stormkast-med-valebrokk-stordalen
rss-markedspuls-2
rss-sunn-okonomi
lederpodden
rss-impressions-2
shifter
okonomiamatorene
rss-andelige-tanker-med-camillo