New to JavaScript — ES2022

New to JavaScript — ES2022

In this episode of Syntax, Scott and Wes talk about all the new stuff in ES2022 — what it is, why you might need it, and how to use it. Sanity - Sponsor Sanity.io is a real-time headless CMS with a fully customizable Content Studio built in React. Get a Sanity powered site up and running in minutes at sanity.io/create. Get an awesome supercharged free developer plan on sanity.io/syntax. LogRocket - Sponsor LogRocket lets you replay what users do on your site, helping you reproduce bugs and fix issues faster. It’s an exception tracker, a session re-player and a performance monitor. Get 14 days free at logrocket.com/syntax. Auth0 - Sponsor Auth0 is the easiest way for developers to add authentication and secure their applications. They provides features like user management, multi-factor authentication, and you can even enable users to login with device biometrics with something like their fingerprint. Not to mention, Auth0 has SDKs for your favorite frameworks like React, Next.js, and Node/Express. Make sure to sign up for a free account and give Auth0 a try with the link below: https://a0.to/syntax. Show Notes 04:50 - Regex indicies New d flag in a regex https://regex101.com/ This will tell you the indexes (indicies) of the regex matches Handy if you need to highlight or replaces matches in a string We can ask for the start and end positions of each matched capture group 07:16 - Class updates Private fields Properties and Methods to be kept private Prefix them with a # =Helpful for internal state and methods which should not be accessed directly or at all by external In React how we have __INTERNTAL_NEVER USE THIS class ColorButton extends HTMLElement { // All fields are public by default color = "red" // Private fields start with a #, can only be changed from inside the class #clicked = false } const button = new ColorButton() // Public fields can be accessed and changed by anyone button.color = "blue" // SyntaxError here console.log(button.#clicked) // Cannot be read from outside button.#clicked = true // Cannot be assigned a value from outside Getters and setters introduced in es5 https://www.w3schools.com/js/js_object_accessors.asp class Person { #hobbies = ['computers'] get #hobbiesGetter() { return this.#hobbies } #getHobbies() { return this.#hobbies } getHobbiesPublic() { return this.#hobbies } } const scott = new Person(); scott.#getHobbies(); // doesn't work scott.getHobbiesPublic(); // works 09:07 - Class fields This may seem super old because we have been polyfilling it forever Right now if you want an instance field on a class, you need to declare it in the constructor Now we can just declare them inside the class 10:36 - Static fields and methods As above can also be static with the static keyboard Works for methods too Explain what a static method is 13:17 - Top level await So handy in modules. Need to pull in some data? Simple. 15:19 - Ergonomic brand checks for private fields Used for checking if a private field on a class exists using the in keyword 16:00 - .at() method Strings and arrays - we can use square brackets to reference items of the array Super handy for grabbing the last item of an array // 🔥 New .at() method on arrays and strings const toppings = ['pepperoni', 'cheese', 'mushrooms']; // The old way to grab the last item toppings[toppings.length - 1]; // mushrooms // using .at() method with a negative index toppings.at(-1); // mushrooms // works with any index toppings.at(0); // pepperoni toppings.at(-2); // cheese // and with strings! 'Meeting Room: B'.at(-1) // B Why not use array[-1]? We used to use slice(-1) What about indexOf? 21:34 - Handy hasOwn method https://github.com/tc39/proposal-accessible-object-hasownproperty 24:51 - Class static block A static block allows you to run code before creating an optional static property during initialization https://github.com/tc39/proposal-class-static-block Links https://github.com/tc39/proposals/blob/master/finished-proposals.md ××× SIIIIICK ××× PIIIICKS ××× Scott: Ultraloq Smart Lock Wes: Magnatiles Shameless Plugs Scott: Web Components Course - Sign up for the year and save 25%! Wes: All Courses - Use the coupon code ‘Syntax’ for $10 off! Tweet us your tasty treats! Scott’s Instagram LevelUpTutorials Instagram Wes’ Instagram Wes’ Twitter Wes’ Facebook Scott’s Twitter Make sure to include @SyntaxFM in your tweets

Episoder(968)

832: Potluck: When to Use a Framework × Goodbye Webpack × Custom Events in React + More!

832: Potluck: When to Use a Framework × Goodbye Webpack × Custom Events in React + More!

Scott and Wes answer your burning questions! They cover everything from moving off create-react-app and the benefits of Next.js, to transitioning from junior to senior dev, working with QA teams, and even dive into game development with Godot. Show Notes 00:00 Welcome to Syntax! 00:31 DenverScript. 03:14 Brought to you by Sentry.io. 03:54 Question 1: Moving off create-react-app. Proposal: TC39 Import Attributes. HTML iframe srcdoc Attribute. 09:10 Question 2: Working together with QA teams. 13:46 Question 3: Benefits of React with Next.js Framework. Svelte Turnstile. Next.js Pages Router vs Next.js App Router. 17:38 Question 4: What are your real names? 19:22 Question 5: Thoughts on RTO and WFH. 27:50 Question 6: Where can I find you Sick Picks? Sick Picks. Sick Picks Scraper. 29:34 Question 7: From JR developer to SR developer. 31:41 Question 8: Godot and game development. Godot Engine. GDScript. Phind. 39:37 Question 9: Inherent advantage between Callbacks and Events. 44:44 Question 10: Transitioning to freelance with corporate experience. 49:44 Question 11: Dealing with negative feedback. 57:05 Sick Picks & Shameless Plugs. Sick Picks Scott: audiobookshelf, Plappa App. Wes: New Syntax Swag. Shameless Plugs Scott: Syntax on YouTube. Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott: X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

9 Okt 20241h 2min

831: Preventing Spam and Fraud

831: Preventing Spam and Fraud

From CAPTCHAs to shadow banning, Scott and Wes break down the best strategies for keeping your app safe from spam and fraud. They cover tools like email verification, rate limiting, shadow banning, and more to protect your users and data. Show Notes 00:00 Welcome to Syntax! 00:15 The problem. 02:47 Brought to you by Sentry.io. 04:23 CAPTCHA. 06:24 Data collection. 07:11 Stripe Radar score calculation. 09:12 Rate limiting. 11:34 Shadow banning. 13:53 Email verification. 15:38 Tie to accounts. 16:23 Tied to real identity. 19:36 Manual approval. 21:19 Blocking ASN. 23:17 Honey pot field. 24:28 SMS verification. 25:05 Mechanical Turk. Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott: X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

7 Okt 202426min

830: GitHub and Code Reviews with Sarah Vessels

830: GitHub and Code Reviews with Sarah Vessels

Scott and Wes talk with GitHub’s Sarah Vessels about the ins and outs of code reviews, their critical role in collaborative development, and tips for making your reviews more effective. Show Notes 00:00 Welcome to Syntax! 00:59 What is a code review? How to review code effectively: A GitHub staff engineer’s philosophy 04:18 Strategies for an effective code review processes 06:59 Should you test and fix in the same pull request? 07:57 How to ask for code reviews 12:12 Feature flags and their role in code management flipper scientist scientist - JS 20:03 Who should do code reviews? 23:34 Should you review your own code? 25:04 Brought to you by Sentry.io 25:29 Code comments vs pull requests 27:35 Dealing with egos in the code review process 30:18 What automations are essential? project-pull-mover 34:35 Underutilized tools GitHub Protips: Tips, tricks, hacks, and secrets from Sarah Vessels 36:25 Commit strategies and squash 39:30 GitHub’s branching system 41:14 Git gone wrong 42:30 What is the correct way to merge into main? 43:47 What was it like working on GitHub Sponsors? GitHub Sponsors thanks.dev 46:58 Sick Picks & Shameless Plugs Sick Picks Sarah: https://store.steampowered.com/steamdeck Shameless Plugs Sarah: https://github.com/sponsors Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott: X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

4 Okt 202451min

829: 14 Web Development Tips I Wish I Knew Sooner

829: 14 Web Development Tips I Wish I Knew Sooner

Scott and Wes share 14 game-changing tips they wish they’d known earlier in their web dev careers. From embracing tools to learning by doing, these insights will help you level up your skills faster! Show Notes 00:00 Welcome to Syntax! 02:09 Brought to you by Sentry.io. 03:45 13 Web Development Tips I Wish I Knew Sooner. 03:49 Number 1 - No one is all-knowing. 05:39 Number 2 - People with extremely strong opinions. 11:13 Number 3 - Using tools to help you isn’t a bad thing. 12:34 Number 4 - Approach new technology with a mixed dose of skepticism and open-mindedness. 16:05 Number 5 - Things make more sense the more you actually use them. 18:40 Number 6 - Willingness to change your mind is a strong skill. 20:06 Number 7 - Doing is better than reading or watching. 22:29 Number 8 - Asking questions is good. 26:45 Number 9 - Everyone doesn’t learn the same. 30:41 Number 10 - You don’t need a SAAS for everything. 35:53 Number 11 - You don’t need to worry about scale. 37:49 Number 12 - Learning the fundamentals will always pay off. 40:07 Number 13 - Working in public will make you more hireable. 42:48 Number 14 - You can interview without accepting a job offer. 45:29 Sick Picks & Shameless Plugs. Sick Picks Scott: Glasses. Wes: Oxo Whisk, Danish Whisk. Shameless Plugs Scott: Syntax on YouTube. Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott: X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

2 Okt 202450min

828: Logging in Verification: Magic Links, 2FA, SMS Codes

828: Logging in Verification: Magic Links, 2FA, SMS Codes

Scott and Wes serve up the pros and cons of modern authentication methods like magic links, 2FA, and SMS codes. Learn how each technique works, the security trade-offs, and what might be the best approach for your apps. Show Notes 00:00 Welcome to Syntax! 00:11 Brought to you by Sentry.io. 00:34 Logging in Verification. 01:09 Magic Links. 01:24 Pros of magic links. 03:50 How magic links work. 04:25 Cons to magic links. 06:21 Magic Sessions. 06:37 Using email verification. 07:12 Using code verification. 07:55 Previously trusted device verification. 08:14 Classic email and verification process. 09:54 Email Code. 10:51 Gmail verification options. 12:01 OAuth. Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott: X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

30 Sep 202415min

827: Career Development with Topher Martini

827: Career Development with Topher Martini

Scott and Wes talk with Topher Martini, a former Engineering Program Manager at Apple, about his extensive experience over two decades in the tech industry. Topher shares his journey at Apple, from starting as an intern in 2001 to working on groundbreaking products like iPhone, iPad, and Vision Pro. Show Notes 00:00 Welcome to Syntax! 00:40 What it was like working on the first iPhone 04:47 How Topher landed at Apple early in his career 08:40 How Apple’s culture has changed over time 11:03 What makes a great employee? 16:37 Tips for better communication 17:54 Are meetings a good means of communication? 20:05 What makes a bad employee? 22:21 What does it take to get hired at a company like Apple? 26:16 Brought to you by Sentry.io 26:55 The relationship between passion and career 29:08 Topher’s advice for growing in your career 31:50 What is a sabbatical? 33:36 Teaching tech to kids 35:49 Topher’s work on self-driving cars Aurora 39:33 AI’s impact on tech and the future 41:22 What can developers do to stand out and be relevant in a world of AI? 43:30 Topher’s thoughts on career development One Small Step Can Change Your Life: The Kaizen Way Paul Copplestone 44:47 What is a light field camera? 46:47 Spatial media and Vision Pro 48:10 The nifty stuff in Topher’s background 49:53 Something wild that happened while Topher was at Apple 51:34 Sick Picks & Shameless Plugs Sick Picks Topher: Bambu Lab P1S 3D Printer Bento 3D Shameless Plugs Topher: Topher’s YouTube Channel Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott: X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

27 Sep 202456min

826: You Need These 30 Apps - PART 2

826: You Need These 30 Apps - PART 2

In part 2 of covering the best apps for web developers, Scott and Wes dive into must-have tools that will level up your workflow. From screenshot utilities to development tools and video production apps, this episode is packed with recommendations to boost your productivity and creativity. Show Notes 00:00 Welcome to Syntax! 01:44 Brought to you by Sentry.io. 02:30 Utilities. 02:48 BetterTouchTool. 09:31 Hyperkey. 11:46 Amethyst. 12:51 Klack. 13:47 Bottom (Btm). 14:54 Pearcleaner 16:40 App Cleaner. 17:35 Rocket Emoji. 20:27 Clippy. 23:37 Screenshots and Screen Recordings. 24:05 Dropshare. 25:29 OBS with Source Record. 29:20 Screen Studio. 30:58 Detail.co. 31:22 Cap. 32:08 Kap. 32:46 CleanShot X 34:15 Video and Production. 34:24 DaVinci Resolve. 37:46 Affinity Pro. 39:42 PrincipleForMac. 40:39 Inkscape. 41:34 Development tools. 41:38 DBngin. 43:12 TablePlus. 45:48 MongoDB Compass. 46:14 Proxyman. 47:00 Wireshark. 47:31 Polypane. 48:30 Setapp. 49:44 SVG Grabber. 51:42 Sick Picks & Shameless Plugs. Sick Picks Scott: Untold Sign Stealer. Wes: Magentiles Marble Run. Shameless Plugs Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott: X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

25 Sep 202456min

825: Syntax Assistant Desktop App

825: Syntax Assistant Desktop App

Scott walks Wes through the new Syntax Production Assistant Desktop App, designed to streamline and automate their complex publishing process. From tech stack choices like Svelte5 and Rust to AI-driven features, they dive into how this tool keeps everything consistent. Show Notes 00:00 Welcome to Syntax! 00:44 Brought to you by Sentry.io. 01:37 What was the idea? 05:42 The tech. Svelte5, Tauri, Rust, FFMPEG. 08:32 Markdown editor. ink-mde, Dillinger. 09:32 Epoch timestamps. Epoch.vercel. 10:01 Updating front-matter. 10:10 Dexie.js function. 11:25 Backing up data. 11:58 Rust functions. 12:58 Why a desktop app and not a website? 14:38 Some small AI features. 16:26 Challenges with OAuth. 20:03 Publishing challenges. 23:29 Could this work on Windows? 23:54 Debugging. 26:23 Deciphering Apple logs. Hit us up on Socials! Syntax: X Instagram Tiktok LinkedIn Threads Wes: X Instagram Tiktok LinkedIn Threads Scott: X Instagram Tiktok LinkedIn Threads Randy: X Instagram YouTube Threads

23 Sep 202428min

Populært innen Politikk og nyheter

giver-og-gjengen-vg
aftenpodden-usa
aftenpodden
forklart
popradet
stopp-verden
det-store-bildet
fotballpodden-2
dine-penger-pengeradet
nokon-ma-ga
lydartikler-fra-aftenposten
rss-gukild-johaug
bt-dokumentar-2
hanna-de-heldige
aftenbla-bla
unitedno
frokostshowet-pa-p5
rss-penger-polser-og-politikk
e24-podden
rss-ness