Reverse-Engineering Everything to Get Rid of Trust Issues

Rate this content
Bookmark

Like it or not, those days lots of things around us run on JavaScript. Web, mobile and desktop apps, TVs, fridges and space rockets - you name it! I will talk about how to put this to good use by utilizing the forbidden craft of "disassembling". We'll also talk about not knowing things, trusting facts and becoming a better engineer.

Mikhail Korolev
Mikhail Korolev
20 min
17 Jun, 2024

Comments

Sign in or register to post your comment.

Video Summary and Transcription

JavaScript's power and versatility make it the programming language of choice for consumer applications worldwide. A JavaScript engineer should understand how things work, even if they don't know everything. The Talk discusses modifying websites, uncovering game rigging through developer tools, analyzing fetch requests and overrides, refactoring and state management, and website modification. The speaker shares personal experiences and highlights the importance of understanding and being able to modify code in real-time.

1. JavaScript's Power and Versatility

Short description:

Hi there, JS Nation. Thank you for tuning in. As a JavaScript engineer, you might have seen this classic interview question about the order of console logs. It's okay not to know everything, but it's nice to understand how things work. JavaScript has become the programming language of choice for consumer applications worldwide. It's versatile and allows you to modify and change code at runtime.

Hi there, JS Nation. Thank you so much for tuning in, and I hope you are having a fantastic day today. Regardless of if you turned in just for the remote section or you got a chance to maybe meet me in person, in which case, hello again.

Right. So as a fellow JavaScript engineer, you might have seen an interview question similar to this. This is your classic old one, which is what's the order in which the console log is going to pop out, right? And if you're an interviewer, maybe you've even asked a question like this during the interview, and in which case, kind of shame on you, but who am I to judge? And I think the correct, good way in my opinion to answer this question is, I have no idea, but I know how to find out. And my name is Mikhail, and I work as a developer experience engineer in a company called TopTel.

Right? These days, I'm mostly obsessed with developer happiness and frontend infrastructure. I usually talk about silly things, but today, I want to state that you don't have to know everything. You know, every other week, there's something crazy happening in the JS world, and you feel like you're going to miss out if you don't jump right into it, right? For instance, of course, if you are a React developer, you've obviously used hooks, and I hope you do use them now. And do you actually know how the hooks work under the hood? Do you know how those magical functions appear? How do they know when to get called, right? Or what is the source of swell to reactivity? How does it work? What's this magic dollar sign? And I think it is okay to not know. With time and experience, you accumulate all the, you know, all the edge cases, how to use them, how to not use them. With any tool, you learn how to use it, but you don't actually have to know, to understand it works under the hood in order to use it effectively, right? But it's nice to know, isn't it?

Anyway, however, I don't know how many last years that JavaScript has taken all over the world as a programming language of choice for consumer application space. It's very easy to find JavaScript developers to build your desktop app, mobile app, website, web app. It's on the edge, in the cloud, everywhere. We even sent JavaScript to space and I'm not blaming the business for that because, you know, it's relatively cheapish to find a nice developer that's gonna do a lot of stuff in the same time. That is good. Mostly, those use cases are good enough for JavaScript, right? And no matter how you cook it, at the end, it's always the JavaScript that comes out. It can be TypeScript, ReasonML, any other superset of JavaScript, but what's runs in the runtime is always JavaScript. There's no way around that. Some of you may hate it. I could say I've been in a similar camp myself, right? Like you don't know, you don't need those 150 megabytes of extra browser with your Slack, right? And all those JavaScript is slow and yada yada yada. You know that well, right? But I actually think that JavaScript, everything running on JavaScript gives you the never before seen power to modify and change the code at runtime. You can inspect everything. You can override everything. It's kind of like, you know, this changing the car tires. You go. I have a very good example. So for instance, let's say you want to look up what are the browser cookies. You, you know, usual thing.

2. Modifying Websites and Daily Lottery

Short description:

You go on Google, find an article, but something prevents you from browsing further. In a native app, you can't modify the website. Storytime: a US-based healthy food store offers a promotion page where customers can enroll in a daily lottery by spending $200. After logging in, flipping cards reveals discount offers. Users can buy vegan bars at a discount. I experienced discounts ranging from 40% to 87%.

You go on Google, you find a nice article, you start reading it, blah, blah, blah. Something happens. And that is something that prevents you from browsing further. And you know what, what I usually do, I hope I'm not the only one who does that, but I just go to the developer tools and just remove that, right? Maybe something about my ad block or whatever else, but there's that you just do, you just done that you just modify the website. Imagine doing this in a native app. It is not possible whatsoever.

Okay. Storytime. There is a website called the garden.com.us, which is a US based healthy and expensive food store. And there is a promotion page on the website, which is assumed to facilitate the sales for every $200 spent. You get a chance to enroll into a daily lottery. That looks like this. So you go in, you log in as a respectable customer. You log in with your loyalty ID, you press the login button, then start the game. You flip some cards, get a discount offers. It's all good. Then my user can go and buy your vegan bars with 40% discount in the store in person. The next day you come back, there's a 24 hour cool down, and then you come back to the store, you do all the thing again. Right? I was like, okay, that's fine. It seems okay. That was interesting. There's 40%, there's 35%. That was good. It looks like I could get some pretty good discounts here. 60%. 87%. Imagine getting that. That is good. So I did that. Then I left.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Modern Web Debugging
JSNation 2023JSNation 2023
29 min
Modern Web Debugging
Top Content
Few developers enjoy debugging, and debugging can be complex for modern web apps because of the multiple frameworks, languages, and libraries used. But, developer tools have come a long way in making the process easier. In this talk, Jecelyn will dig into the modern state of debugging, improvements in DevTools, and how you can use them to reliably debug your apps.
The Future of Performance Tooling
JSNation 2022JSNation 2022
21 min
The Future of Performance Tooling
Top Content
Our understanding of performance & user-experience has heavily evolved over the years. Web Developer Tooling needs to similarly evolve to make sure it is user-centric, actionable and contextual where modern experiences are concerned. In this talk, Addy will walk you through Chrome and others have been thinking about this problem and what updates they've been making to performance tools to lower the friction for building great experiences on the web.
A Framework for Managing Technical Debt
TechLead Conference 2023TechLead Conference 2023
35 min
A Framework for Managing Technical Debt
Top Content
Let’s face it: technical debt is inevitable and rewriting your code every 6 months is not an option. Refactoring is a complex topic that doesn't have a one-size-fits-all solution. Frontend applications are particularly sensitive because of frequent requirements and user flows changes. New abstractions, updated patterns and cleaning up those old functions - it all sounds great on paper, but it often fails in practice: todos accumulate, tickets end up rotting in the backlog and legacy code crops up in every corner of your codebase. So a process of continuous refactoring is the only weapon you have against tech debt.In the past three years, I’ve been exploring different strategies and processes for refactoring code. In this talk I will describe the key components of a framework for tackling refactoring and I will share some of the learnings accumulated along the way. Hopefully, this will help you in your quest of improving the code quality of your codebases.

Debugging JS
React Summit 2023React Summit 2023
24 min
Debugging JS
Top Content
As developers, we spend much of our time debugging apps - often code we didn't even write. Sadly, few developers have ever been taught how to approach debugging - it's something most of us learn through painful experience.  The good news is you _can_ learn how to debug effectively, and there's several key techniques and tools you can use for debugging JS and React apps.
Building a Voice-Enabled AI Assistant With Javascript
JSNation 2023JSNation 2023
21 min
Building a Voice-Enabled AI Assistant With Javascript
Top Content
In this talk, we'll build our own Jarvis using Web APIs and langchain. There will be live coding.
Power Fixing React Performance Woes
React Advanced Conference 2023React Advanced Conference 2023
22 min
Power Fixing React Performance Woes
Top Content
Next.js and other wrapping React frameworks provide great power in building larger applications. But with great power comes great performance responsibility - and if you don’t pay attention, it’s easy to add multiple seconds of loading penalty on all of your pages. Eek! Let’s walk through a case study of how a few hours of performance debugging improved both load and parse times for the Centered app by several hundred percent each. We’ll learn not just why those performance problems happen, but how to diagnose and fix them. Hooray, performance! ⚡️

Workshops on related topic

React Performance Debugging Masterclass
React Summit 2023React Summit 2023
170 min
React Performance Debugging Masterclass
Top Content
Featured WorkshopFree
Ivan Akulov
Ivan Akulov
Ivan’s first attempts at performance debugging were chaotic. He would see a slow interaction, try a random optimization, see that it didn't help, and keep trying other optimizations until he found the right one (or gave up).
Back then, Ivan didn’t know how to use performance devtools well. He would do a recording in Chrome DevTools or React Profiler, poke around it, try clicking random things, and then close it in frustration a few minutes later. Now, Ivan knows exactly where and what to look for. And in this workshop, Ivan will teach you that too.
Here’s how this is going to work. We’ll take a slow app → debug it (using tools like Chrome DevTools, React Profiler, and why-did-you-render) → pinpoint the bottleneck → and then repeat, several times more. We won’t talk about the solutions (in 90% of the cases, it’s just the ol’ regular useMemo() or memo()). But we’ll talk about everything that comes before – and learn how to analyze any React performance problem, step by step.
(Note: This workshop is best suited for engineers who are already familiar with how useMemo() and memo() work – but want to get better at using the performance tools around React. Also, we’ll be covering interaction performance, not load speed, so you won’t hear a word about Lighthouse 🤐)
Building a Shopify App with React & Node
React Summit Remote Edition 2021React Summit Remote Edition 2021
87 min
Building a Shopify App with React & Node
Top Content
WorkshopFree
Jennifer Gray
Hanna Chen
2 authors
Shopify merchants have a diverse set of needs, and developers have a unique opportunity to meet those needs building apps. Building an app can be tough work but Shopify has created a set of tools and resources to help you build out a seamless app experience as quickly as possible. Get hands on experience building an embedded Shopify app using the Shopify App CLI, Polaris and Shopify App Bridge.We’ll show you how to create an app that accesses information from a development store and can run in your local environment.
React Performance Debugging
React Advanced Conference 2023React Advanced Conference 2023
148 min
React Performance Debugging
Workshop
Ivan Akulov
Ivan Akulov
Ivan’s first attempts at performance debugging were chaotic. He would see a slow interaction, try a random optimization, see that it didn't help, and keep trying other optimizations until he found the right one (or gave up).
Back then, Ivan didn’t know how to use performance devtools well. He would do a recording in Chrome DevTools or React Profiler, poke around it, try clicking random things, and then close it in frustration a few minutes later. Now, Ivan knows exactly where and what to look for. And in this workshop, Ivan will teach you that too.
Here’s how this is going to work. We’ll take a slow app → debug it (using tools like Chrome DevTools, React Profiler, and why-did-you-render) → pinpoint the bottleneck → and then repeat, several times more. We won’t talk about the solutions (in 90% of the cases, it’s just the ol’ regular useMemo() or memo()). But we’ll talk about everything that comes before – and learn how to analyze any React performance problem, step by step.
(Note: This workshop is best suited for engineers who are already familiar with how useMemo() and memo() work – but want to get better at using the performance tools around React. Also, we’ll be covering interaction performance, not load speed, so you won’t hear a word about Lighthouse 🤐)
Build a chat room with Appwrite and React
JSNation 2022JSNation 2022
41 min
Build a chat room with Appwrite and React
WorkshopFree
Wess Cope
Wess Cope
API's/Backends are difficult and we need websockets. You will be using VS Code as your editor, Parcel.js, Chakra-ui, React, React Icons, and Appwrite. By the end of this workshop, you will have the knowledge to build a real-time app using Appwrite and zero API development. Follow along and you'll have an awesome chat app to show off!
Hard GraphQL Problems at Shopify
GraphQL Galaxy 2021GraphQL Galaxy 2021
164 min
Hard GraphQL Problems at Shopify
WorkshopFree
Rebecca Friedman
Jonathan Baker
Alex Ackerman
Théo Ben Hassen
 Greg MacWilliam
5 authors
At Shopify scale, we solve some pretty hard problems. In this workshop, five different speakers will outline some of the challenges we’ve faced, and how we’ve overcome them.

Table of contents:
1 - The infamous "N+1" problem: Jonathan Baker - Let's talk about what it is, why it is a problem, and how Shopify handles it at scale across several GraphQL APIs.
2 - Contextualizing GraphQL APIs: Alex Ackerman - How and why we decided to use directives. I’ll share what directives are, which directives are available out of the box, and how to create custom directives.
3 - Faster GraphQL queries for mobile clients: Theo Ben Hassen - As your mobile app grows, so will your GraphQL queries. In this talk, I will go over diverse strategies to make your queries faster and more effective.
4 - Building tomorrow’s product today: Greg MacWilliam - How Shopify adopts future features in today’s code.
5 - Managing large APIs effectively: Rebecca Friedman - We have thousands of developers at Shopify. Let’s take a look at how we’re ensuring the quality and consistency of our GraphQL APIs with so many contributors.
0 To Auth In An Hour For Your JavaScript App
JSNation 2023JSNation 2023
57 min
0 To Auth In An Hour For Your JavaScript App
WorkshopFree
Asaf Shen
Asaf Shen
Passwordless authentication may seem complex, but it is simple to add it to any app using the right tool.
We will enhance a full-stack JS application (Node.js backend + Vanilla JS frontend) to authenticate users with One Time Passwords (email) and OAuth, including:
- User authentication – Managing user interactions, returning session / refresh JWTs- Session management and validation – Storing the session securely for subsequent client requests, validating / refreshing sessions
At the end of the workshop, we will also touch on another approach to code authentication using frontend Descope Flows (drag-and-drop workflows), while keeping only session validation in the backend. With this, we will also show how easy it is to enable biometrics and other passwordless authentication methods.