We call both #JavaScript and #Ruby object-oriented, but they don’t really behave the same way. So what does “object-oriented” really mean? I recently started exploring Ruby, and this question suddenly feels less straightforward than I thought. In Ruby, everything is an object. Numbers, strings, and even nil. You’re always calling methods on something. In JavaScript, things can behave like objects, but not everything actually is. Primitives get wrapped when needed, null and undefined break the pattern, and different paradigms coexist. Same #OOP label, but quite different mental models. I’m starting to feel like the debate isn’t really about whether a language is “true OOP”, but about how much structure a language enforces vs how much it leaves up to the developer. Curious how others think about this, especially if you’ve worked across both. #SoftwareEngineering #LearnInPublic #FullStack #JuniorDev
Victoria Lauri’s Post
More Relevant Posts
-
👉 Read the full article here: https://lnkd.in/dPBDH8fZ 🚀 New Article Published: Array Flatten in JavaScript Understanding how to work with nested arrays is an important skill for every JavaScript developer. In this article, I explained: • What nested arrays are • Why flattening arrays is useful • The concept of array flattening • Different approaches (built-in methods, recursion, loops) • Common interview scenarios I also included step-by-step explanations and visual thinking to make the concept easy to understand. This topic really helped me improve my problem-solving mindset while working with real-world data structures. Big thanks to Hitesh Choudhary Sir, Piyush Garg Sir and Chai Aur Code for continuous learning and guidance 🙌 #JavaScript #WebDevelopment #Coding #LearningInPublic #Developers #Frontend #100DaysOfCode
To view or add a comment, sign in
-
-
"TypeScript isn't just a language; it's magic. Advanced generics and type inference are the spells. Most devs are missing out on this powerful combo." Ever been knee-deep in code, wondering if your types are more complicated than your relationships? You're not alone. But when TypeScript starts predicting your next move better than your playlist? Pure gold. Advanced generics let you weave a safety net so fine, bugs don't stand a chance. And with type inference, it's like your code reads your mind. Imagine shaving hours off debugging because your types do the heavy lifting. I was skeptical at first. But diving into type-level programming flipped the script. It's like a superpower you didn't know you needed. Plus, with AI-assisted development, I can prototype entire features in a fraction of the time. Have you explored TypeScript’s type-level magic? What's your experience been like? #WebDevelopment #TypeScript #Frontend #JavaScript
To view or add a comment, sign in
-
-
🚀 Week 6 Backend Dev Challenge: Regular Expressions(Regex) This week, I worked on something that felt both nerdy and surprisingly exciting: validating a credit card number using JavaScript. Yes I know, credit card validation doesn’t sound exciting at first… but once you dive into Regular Expressions, your brain suddenly enters “detective mode.” 😅 I had a Verve card lying around so I decided to use it for this. I made some research and found out Verve cards had different prefixes. Some started with 5060, 5078 and 6500. To validate the card, I had to use a regex pattern. Think of regex as that strict friend who checks every tiny detail before letting anyone into the party. 😂 The pattern I used: ^(5060|5078|6500)[0-9]{12,13}$ What it does: ✅️Makes sure the card number starts with a valid Verve prefix ✅️Ensures the rest are numbers only ✅️Checks that the length is just right and blocks anything that looks suspicious 👀 It’s like building a mini-security gate with code. Instead of writing just a random function, I challenged myself to use Object-Oriented Programming which I’ve been learning recently. So I created a class, added properties, and built a validate() method inside it. Suddenly, my little validator felt more like a program and less like a quick hack. The cool part? Using OOP made it super easy to create multiple card objects: card1 → valid card2 → invalid Each one tested itself, like they had their own personalities. OOP really helps you write cleaner, more organized, and more scalable code. I finally get why people hype it so much. 😄 Honestly, this task made me appreciate how much detail goes into something as “simple” as validating a card number. #JavaScript #LearnToCode #Regex #OOP #CodingJourney #BackendDev
To view or add a comment, sign in
-
𝗜𝗯𝘂𝗶𝗹𝘁 𝗔 𝗥𝗲𝗮𝗰𝘁𝗶 v𝗲 𝗖𝗼𝗺𝗽𝗶𝗹𝗲𝗿 𝗳𝗼𝗿 𝗝𝗮 v𝗮𝗦𝗰𝗿𝗶𝗽𝘁 I tried to build a reactive compiler for JavaScript. My goal was to create a framework where you write simple code and the compiler handles the rest. - You write `let count = signal(0)` and `const doubled = count * 2` - The compiler makes it work with Solid-level performance and React-like syntax But I hit a problem. The compiler needs to do different things depending on where the code appears. - If you return a signal from a function, the compiler should pass the signal object - If you log a signal, the compiler should pass the current value - If you pass a signal to a child component, the compiler should pass the signal object - If you use a signal in an arithmetic operation, the compiler should pass the current value I found a principle to solve this: transfer the signal object only where the compiler controls both sides of the boundary. - If the compiler transforms both the sender and receiver, it can pass the signal object - If the compiler can't control the other side, it should pass the current value I designed a two-pass system to make this work. - Pass 1: Scan all files and collect metadata - Pass 2: Transform each file using the metadata But I hit more problems. - Barrel files and dynamic imports made it hard to collect metadata - Vite's plugin API didn't support my two-pass approach - TypeScript didn't understand my signal types without custom plugins I learned a lot from this experience. - A compiler can only bemagic within its own jurisdiction - If your types describe something that doesn't exist at runtime, someone will eventually find a bug - Server-side rendering and hydration are harder than they seem - Batching and reactive updates are tricky to get right In the end, I decided not to ship my framework. - The distance between a beautiful specification and a working framework is huge - I had a day job and couldn't dedicate the time and resources needed But I'm glad I tried. I learned a lot and became a better engineer. - Sometimes the best code you'll ever write is the code you decide not to ship - Life goes on, and you can always open a React component and keep coding Source: https://lnkd.in/gB5bgvSK
To view or add a comment, sign in
-
🚀 JSON vs JavaScript Object: Simple Breakdown! 🚀 Ever wondered what's the real difference? Check this visual! 👇 JavaScript Object 💻: Lives in memory, holds properties + functions (methods). Super flexible for your code! JSON 📄: Just text format for data sharing. No functions, strict rules – perfect for APIs & storage! JSON = Data transport. JS Object = In-app powerhouse! Dev friends, save this for your next API debug! What's your biggest JSON gotcha? Comment below! ⬇️ #WebDevelopment #JavaScript #JSON #Coding #Programming #Frontend #Developer #ReactJS #DevCommunity #LearnToCode #Innovation #Technology
To view or add a comment, sign in
-
-
𝗪𝗿𝗶𝘁𝗶𝗻𝗴 𝘁𝗲𝘀𝘁𝘀 𝗳𝗮𝘀𝘁 𝗮𝗻𝗱 𝘄𝗿𝗶𝘁𝗶𝗻𝗴 𝘁𝗵𝗲𝗺 𝘄𝗲𝗹𝗹 𝘀𝗵𝗼𝘂𝗹𝗱𝗻'𝘁 𝗯𝗲 𝗮 𝘁𝗿𝗮𝗱𝗲𝗼𝗳𝗳. But in practice, automation speed wins. You write locator('[data-testid="submit"]') instead of getByTestId('submit') and move on. It works. Over time the codebase fills up with inconsistent locators that nobody wants to clean up. The fix isn't a code review comment. It's a guardrail. Playwright Locator Lens is a VS Code extension that flags brittle locator patterns as you write and fixes them in one click. It also runs as a CLI so you can enforce standards across the whole team in CI. Works across TypeScript, JavaScript, Python, Java, and C#. Built and published to the marketplace in under 3 hours using Claude Code. Link in the comments. What locator patterns do you see most often in messy test suites? #Playwright #TestAutomation #ClaudeCode #AITesting #QAAutomation
To view or add a comment, sign in
-
Guys, you don't want to miss this one 👀 I recently found something interesting while reading an open-source project using Javascript. I noticed some engineers defining the same method twice on a single object — using two different notations: Obj.prototype.getValue = function() { ... }; Obj.prototype['get_value'] = Obj.prototype.getValue; At first, it felt… weird. Why would you create two names for the exact same function? So I dug into the build config and source code and it pointed me to something I hadn't explored deeply before: ✨ Google Closure Compiler ✨ Turns out, Google has this compiler that aggressively optimizes JavaScript — making the final bundle significantly smaller. But the most interesting part is the ADVANCED_OPTIMIZATIONS mode. This mode is very aggressive. It can: - rename both variables and properties into shorter names - remove dead code - inline functions Most minifiers only rename local variables. Closure Compiler goes further, it renames obj.getValue to obj.a. And here's the catch, it will also rename your public API methods. External code calling obj.getValue() would break because that name no longer exists in the minified build. That's where the two-notation pattern comes in. From what I found: - Dot notation (obj.getValue) → the compiler freely renames this to obj.a - Bracket notation with a string literal (obj['get_value']) → the compiler cannot see inside strings, so this name is preserved exactly So the dual naming isn't random — it's a deliberate technique. The dot-notation version is for internal use (gets minified for smaller bundles), and the string-based version is the stable public API that survives minification. It's not about camelCase vs snake_case. It's about how you access the property that determines whether the compiler can touch it. Still exploring this, but I find it really interesting how something as subtle as notation style can affect how compilers treat your code. Have you ever used Closure Compiler or similar aggressive optimizations before? Curious what your experience was 👀 #google #optimization #compiler
To view or add a comment, sign in
-
-
#React 19 isn't asking you to learn a new framework — it's finally catching up to what developers always wanted. The new React Compiler alone can eliminate thousands of lines of manual memoization, and new #hooks like "useActionState" and "useOptimistic" turn what used to be 20+ lines of boilerplate into just a few. If you're still writing "useMemo" everywhere and managing form state manually, it's worth taking another look. The best React code in 2026 is shorter, faster, and more readable — not because we got smarter, but because the tools got better. #OpenSource #Coding #Developer #Programming #SoftwareEngineering #SoftwareDevelopment #CodeNewbie #Dev #JavaScript #TypeScript #Frontend #FrontendDevelopment #WebDevelopment https://lnkd.in/da26iEBP
To view or add a comment, sign in
-
I used to rely only on Objects & Arrays… until I started facing real problems 👀 Duplicate data issues Limited key types Inefficient operations Then I discovered Map & Set in JavaScript — and things got much cleaner If you’re still not using them properly, this will help: https://lnkd.in/gSMDSM4q Would love your feedback 🙌 #javascript #webdevelopment #frontend #coding #learninpublic
To view or add a comment, sign in
-
-
You're still writing JavaScript the hard way. I was too until I saw what shipped in ECMAScript 2026. 9 features that replace patterns you've been copy-pasting for years: → Temporal API replaced new Date() finally → using keyword auto-disposes resources (no more try/finally) → Set methods: .union() .intersection() .difference() built in → RegExp.escape() no more that Stack Overflow snippet → Promise.try() sync or async, always a Promise → Math.sumPrecise() 0.1 + 0.2 = 0.3. Actually. → Iterator.concat() chain iterators, no generators needed → Float16Array 4× less memory for ML and WebGL → import defer lazy modules, zero async refactor Some of these I've been waiting for since 2018. Which one surprised you most? 👇 #JavaScript #ECMAScript2026 #ES2026 #WebDevelopment #Frontend #FrontendDeveloper #FrontendDevelopment #JS #Programming #SoftwareDevelopment #Developer #CodeNewbie #100DaysOfCode #LearnToCode #TechTwitter #WebDev #SoftwareEngineer #CleanCode #TypeScript #NodeJS w3schools.com
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development