nc

JSJ 388: Functional Programming with Brian Lonsdorf

Sponsors

Panel

  • Aimee Knight 

  • Chris Buecheler

  • AJ O’Neal

With Special Guest: Brian Lonsdorf

Episode Summary

Brian Lonsdorf works for Salesforce, specializes in functional programming, and wrote a book called Professor Frisby’s Mostly Adequate Guide to Functional Programming. Brian talks about when he got into functional programming and when in their career others should be exposed to it. He talks about the fundamental tenets of functional programming (static mathematical functions), how it differs from object oriented programming, and how to manipulate data in a functional environment. The panel wonders if it is possible to use functional and object oriented programming together and discuss the functional core imperative shell. Brian talks about what is ‘super functional’ and why JavaScript isn’t, but includes methods for making it work. He shares some of the trade-offs he’s found while doing functional programming. Brian defines a monad and goes over some of the common questions he gets about functional programming, such as how to model an app using functional programming. The show concludes with Brian talking about some of the work he’s been doing in AI and machine learning. 

Links

Follow DevChat on Facebook and Twitter

Picks

Aimee Knight:

Chris Buecheler:

AJ O’Neal:

Brian Lonsdorf:




nc

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 Karpov

Sponsors

Links

Follow DevChatTV on Facebook and Twitter

Picks

AJ O’Neal:

Christopher Buecheler:

Charles Max Wood:

Valeri Karpov:




nc

JSJ 400: The Influence of JavaScript Jabber

JavaScript Jabber celebrates its 400th episode with former host Dave Smith and some other familiar voices. Each of the panelists talks about what they’ve been up to. Dave hasn’t been on the show for 3 years, but he and Jameson Dance have started a podcast called Soft Skills Engineering where they answer questions about the non-technical side of engineering. When he left the show he was the director of engineering on Hire View, and currently he works for Amazon on Alexa. 

Christopher Buecheler has been on several JSJ, RRU, and MJS episodes. His time is divided between contracting for startups and his own company closebrace.com, a tutorial and resource site for JavaScript developers.  Dan Shapir has also been on JSJ as a guest, and is currently works for Wix doing performance tech. He enjoys speaking at conferences, such as JS Camp in Bucharest, Romania and the YGLF conference. Steve Edwards was previously on MJS 078. He started on Drupal in the PHP world, switched to JavaScript, and then a few years ago he started looking at Vue. Now he does Vue fulltime for ImageWare Systems.

As for Charles, his primary focus is the podcasts, since DevChat.tv produces around 20 episodes per week. 5 new shows were started in July, and he talks about some of the challenges that that brought. One of his most popular shows recently was JSJ 389: What makes a 10x Engineer? This helped him realize that he wants to help teach people how to be a successful engineer, so he’s working on launching a new show about it. 

The panelists share some of their favorite JSJ episodes. They discuss the tendency of JSJ to get early access to these fascinating people when the conversation was just beginning, such as the inventor of Redux Dan Abramov, before their rise to stardom. The talk about the rise in popularity of podcasting in general. They agree that even though JavaScript is evolving and changing quickly, it’s still helpful to listen to old episodes. 

Charles talks about the influence JavaScript Jabber has had on other podcasts. It has spawned several spinoffs, including My JavaScript Story. He’s had several hosts start their own DevChat.tv shows based off JavaScript Jabber, including Adventures in Angular and The DevEd Podcast. JavaScript Jabber has also been the inspiration for other podcasts that aren’t part of DevChat.tv. There aren’t many podcast companies that produce as many shows as they do and they’re developing their own tools. DevChat.tv moved off of WordPress and is in the process of moving over to Podwrench. Charles talks about all the new shows that have been launched, and his view on ‘competing’ podcasts. Charles is also considering doing an audio drama that happens in a programming office, so if you would like to write and/or voice that  show, he invites you to contact him. 

The show concludes with the panel talking about the projects they’ve been working on that they want listeners to check out. Christopher invites listeners to check out closebrace.com. He also has plans to write a short ebook on unit testing with jest, considered doing his own podcast, and invites people to check out his fiction books on his website. Dan talks about his involvement with Wix, a drag and drop website service, that recently released a technology called Corvid which lets you write JS into the website you build with Wix. This means you can design your user interface using Wix, but then automate it, add events functionality, etc. Dan is also going to be at the Chrome Dev Summit conference. Dave invites listeners to check out the Soft Skills Engineering podcast, and Charles invites listeners to subscribe to his new site maxcoders.io. 

Panelists

  • Dan Shapir

  • Christopher Buecheler

  • Steve Edwards

  • Dave Smith

  • Charles Max Wood

Sponsors

Links

Follow DevChatTV on Facebook and Twitter

Picks

Steve Edwards:

Christopher Buecheler:

Charles Max Wood:

Dan Shapir:

Dave Smith:




nc

JSJ 428: The Alphabet Soup of Performance Measurements

JavaScript Remote Conf 2020

May 14th to 15th - register now!

Dan Shappir takes the lead to explain all of the acronyms and metrics for measuring the performance of your web applications. He leads a discussion through the ins and outs of monitoring performance and then how to improve and check up on how your website is doing.

Panel

  • AJ O’Neal
  • Aimee Knight
  • Steve Edwards
  • Dan Shappir

Sponsors

____________________________________________________________

"The MaxCoders Guide to Finding Your Dream Developer Job" by Charles Max Wood is now available on Amazon. Get Your Copy Today!

____________________________________________________________

Links

Picks

AJ O’Neal:

Aimee Knight:

Dan Shappir:

Follow JavaScript Jabber on Twitter > @JSJabber




nc

Yearbook of China city competitiveness 2012 [electronic resource] / Gui Qiangfang, principal editor and evaluator




nc

Years of plenty, years of want [electronic resource] : France and the legacy of the Great War / Benjamin Franklin Martin

Martin, Benjamin F., 1947-




nc

Yellow crocodiles and blue oranges [electronic resource] : Russian animated film since World War Two / David MacFadyen

MacFadyen, David, 1964-




nc

Yellowface [electronic resource] : creating the Chinese in American popular music and performance, 1850s-1920s / Krystyn R. Moon

Moon, Krystyn R., 1974-




nc

Yemen [electronic resource] : dancing on the heads of snakes / Victoria Clark

Clark, Victoria, 1961-




nc

Yeshiva fundamentalism [electronic resource] : piety, gender, and resistance in the ultra-Orthodox world / Nurit Stadler

Stadler, Nurit




nc

Yet I loved Jacob [electronic resource] : reclaiming the biblical concept of election / Joel S. Kaminsky

Kaminsky, Joel S., 1960-




nc

Yet more everyday science mysteries [electronic resource] : stories for inquiry-based science teaching / Richard Konicek-Moran ; botanical illustrations by Kathleen Konicek-Moran

Konicek-Moran, Richard




nc

York University [electronic resource] : the way must be tried / Michiel Horn ; colour photography by Vincenzo Pietropaolo

Horn, Michiel, 1939-




nc

You should see yourself [electronic resource] : Jewish identity in postmodern American culture / edited by Vincent Brook




nc

Young adults deserve the best [electronic resource] : YALSA's competencies in action / Sarah Flowers for the Young Adult Library Services Association

Flowers, Sarah, 1952-




nc

Young children, parents and professionals [electronic resource] : enhancing the links in early childhood / Margaret Henry

Henry, Margaret, 1931-




nc

Young driver accidents and delinquency [electronic resource] : modeling and general theories of crime / Steven J. Ellwanger

Ellwanger, Steven J., 1971-




nc

The Young Lords [electronic resource] : a reader / edited by Darrel Enck-Wanzer ; foreword by Iris Morales and Denise Oliver-Velez




nc

Young minds in social worlds [electronic resource] : experience, meaning, and memory / Katherine Nelson

Nelson, Katherine




nc

Young people and the environment [electronic resource] : an Asia-Pacific perspective / edited by John Fien, David Yencken and Helen Sykes




nc

Young people living with cancer [electronic resource] : implications for policy and practice / Anne Grinyer

Grinyer, Anne, 1950-




nc

Young people's experiences of loss and bereavement [electronic resource] : towards an interdisciplinary approach / Jane Ribbens McCarthy

Ribbens McCarthy, Jane




nc

Youngest recruits [electronic resource] : pre-war, war & post-war experiences in Western Côte d'Ivoire / Magali Chelpi-den Hamer

Chelpi-den Hamer, Magali




nc

Your chemical science thesis [electronic resource] : an introductory guide to writing up your research project / [written and edited by Natalie Mansfield]

Mansfield, Natalie




nc

Your Google game plan for success [electronic resource] : increasing your web presence with Google AdWords, Analytics and Website Optimizer / Joe Teixeira

Teixeira, Joe




nc

Your options handbook [electronic resource] : the practical reference and strategy guide to trading options / Jared A. Levy

Levy, Jared, 1976-




nc

Youth employment and joblessness in advanced countries [electronic resource] / edited by David G. Blanchflower and Richard B. Freeman




nc

Youth employment and training programs [electronic resource] : the YEDPA years / Charles L. Betsey, Robinson G. Hollister, Jr., and Mary R. Papageorgiou, editors ; Committee on Youth Employment Programs, Commission on Behavioral and Social Sciences and Ed




nc

Youth gangs [electronic resource] : causes, violence and interventions / John G. Cooper, editor




nc

Youth in a changing world [electronic resource] : cross-cultural perspectives on adolescence / ed. Estelle Fuchs

International Research Conference on Adolescence, Oshkosh, Wis., 1973




nc

The Youth labor market problem [electronic resource] : its nature, causes, and consequences / edited by Richard B. Freeman and David A. Wise




nc

Youth [electronic resource] : pathways to decent work : promoting youth employment - tackling the challenge / International Labour Conference, 93rd session, 2005

International Labour Conference (93rd : 2005 : Geneva, Switzerland)




nc

Youth policy in Ukraine [electronic resource] : conclusions of the Council of Europe international review team / Ewa Krzaklewska, Howard Williamson, members of the Council of Europe International Youth Policy Review Team

Krzaklewska, Ewa , author




nc

Youth violence prevention through asset-based community development [electronic resource] / Pedro R. Payne

Payne, Pedro R., 1964-




nc

Youth violence, resilience, and rehabilitation [electronic resource] / Joan Serra Hoffman

Hoffman, Joan Serra, 1960-




nc

Zambia [electronic resource] : public expenditure management and financial accountability review




nc

Zambia [electronic resource] : social protection expenditure and performance review and social budget




nc

Zambian crisis behaviour [electronic resource] : confronting Rhodesia's unilateral declaration of independence, 1965-1966 / Douglas G. Anglin

Anglin, Douglas George




nc

Zanzibar [electronic resource] : social protection expenditure and performance review and social budget




nc

Zapotec science [electronic resource] : farming and food in the Northern Sierra of Oaxaca / Roberto J. González

González, Roberto J. (Roberto Jesús), 1969-




nc

ZBrush character creation [electronic resource] : advanced digital sculpting / Scott Spencer

Spencer, Scott, 1975-




nc

Zeb Vance [electronic resource] : North Carolina's Civil War governor and Gilded Age political leader / Gordon B. McKinney

McKinney, Gordon B., 1943-




nc

Zen sanctuary of purple robes [electronic resource] : Japan's Tōkeiji convent since 1285 / Sachiko Kaneko Morrell, Robert E. Morrell

Morrell, Sachiko Kaneko, 1930-




nc

Zinc, copper, or magnesium supplementation against cadmium toxicity [electronic resource] / Vesna Matović ... [et al.]




nc

Zinc orthophosphate [electronic resource]

American Water Works Association




nc

Global Differences in Characteristics, Precipitants, and Initial Management of Patients With Heart Failure

This cohort study compares the characteristics and management of acute heart failure in global regions comprising 44 countries.




nc

Incorporating the Patient Voice Into Shared Decision-Making for the Treatment of Aortic Stenosis

Increased attention has focused on shared decision-making (SDM) and use of decision aids for treatment decisions in cardiology. In this issue of JAMA Cardiology, Coylewright et al report the results of a rigorously performed pilot study on the use of a decision aid to facilitate SDM for patients with symptomatic severe aortic stenosis (AS) at high or prohibitive risk for surgery considered for transcatheter aortic valve replacement vs medical therapy. Comparisons were made between encounters before clinicians were trained to use a decision aid and the first and fifth encounters after a decision aid was used. The patient-clinician interactions were audio recorded and later coded by independent reviewers using a validated measure to assess SDM. This mixed-methods study found that SDM significantly improved in a stepwise manner from the initial usual care encounter (before use of a decision aid) to the first and then fifth encounters after implementation of the decision aid. Along with this improvement in SDM, patients (n = 35) demonstrated increased knowledge about their treatment choices and reported increased satisfaction in their care with no increase in decisional conflict. In contrast, clinicians (n = 6) reported that they believed they already engaged in SDM prior to use of the decision aid and, after multiple uses of the decision aid, believed patients did not understand or benefit from this tool. The disconnect between clinician and patient perspectives was sobering and has implications for the adoption of decision aids or other tools to facilitate SDM in the clinical setting. Notable limitations of the study, which are acknowledged by the authors, include (1) small sample size (of clinicians and patients); (2) the decision aid is most useful for the relatively smaller number of patients at high or prohibitive risk for surgery for whom transcatheter aortic valve replacement and medical therapy may both be reasonable options; and (3) the lack of diversity in the clinicians (all male), which reflects the current demographics of interventional cardiology and cardiac surgery.




nc

Improvement of Cardiovascular Functional Research After Kidney Transplant

In this issue of JAMA Cardiology, Lim and colleagues report on cardiovascular functional reserve in people with end-stage renal disease before and after kidney transplant. They performed a 3-arm, prospective, concurrent cohort study to assess change in cardiovascular functional reserve after kidney transplant using state-of-the-art cardiopulmonary exercise testing (CPET). They also assessed left ventricular morphologic findings 1 year after transplant. They enrolled 81 participants with stage 5 chronic kidney disease (CKD) who underwent kidney transplant, 85 wait-listed participants with stage 5 CKD who had not undergone transplant, and 87 controls treated for hypertension only. The authors quantified cardiovascular functional reserve using CPET in parallel with transthoracic echocardiography. One year after transplant, a significant improvement in maximum oxygen consumption was found in the transplant group compared with the nontransplant group. Moreover, left ventricular function improved but not the body mass index.




nc

Cardiovascular Functional Reserve Before and After Kidney Transplant

This cohort study assesses cardiovascular functional reserve before and after kidney transplant in patients with end-stage renal disease.




nc

Syncope in a Woman Returning From a Long Flight

A 58-year-old woman presents with no relevant medical history with syncope, elevated troponin and D-dimer levels, and multiple large bilateral pulmonary emboli. What would you do next?