𝗣𝘆𝘁𝗵𝗼𝗻'𝘀 𝗠𝗥𝗢 𝗶𝘀𝗻'𝘁 𝗷𝘂𝘀𝘁 𝗮 𝘁𝗿𝗶𝘃𝗶𝗮 𝗾𝘂𝗲𝘀𝘁𝗶𝗼𝗻 — 𝗶𝘁'𝘀 𝘁𝗵𝗲 𝘁𝗵𝗶𝗻𝗴 𝘁𝗵𝗮𝘁 𝗯𝗶𝘁𝗲𝘀 𝘆𝗼𝘂 𝗶𝗻 𝗽𝗿𝗼𝗱𝘂𝗰𝘁𝗶𝗼𝗻 𝘄𝗵𝗲𝗻 𝗮 𝗺𝗲𝘁𝗵𝗼𝗱 𝘀𝗶𝗹𝗲𝗻𝘁𝗹𝘆 𝗿𝗲𝘀𝗼𝗹𝘃𝗲𝘀 𝘁𝗼 𝘁𝗵𝗲 𝘄𝗿𝗼𝗻𝗴 𝗽𝗮𝗿𝗲𝗻𝘁. Most codebases with deep inheritance chains rely on MRO without knowing the exact resolution order. C3 linearization guarantees consistency, but only if you actually trace it. 🔹 MRO resolves left-to-right, depth-first, with C3 ensuring no base appears before its subclasses. Calling 𝗥𝗲𝗰𝗼𝗿𝗱.𝗺𝗿𝗼() prints the exact chain Python uses. 🔹 The Golden Rule: If you can't determine the resolution order without running the code, your inheritance tree is too implicit. 🔹 Surface it, flatten it, or better yet: favor 𝘤𝘰𝘮𝘱𝘰𝘴𝘪𝘵𝘪𝘰𝘯 𝘰𝘷𝘦𝘳 𝘪𝘯𝘩𝘦𝘳𝘪𝘵𝘢𝘯𝘤𝘦 to keep your architecture predictable. #Python #SoftwareEngineering #BackendDevelopment #SoftwareArchitecture #CleanCode
Thomas Cionek’s Post
More Relevant Posts
-
🚀 Day 85 of #100DaysOfLeetCode 🔍 Problem Solved: Ransom Note (LeetCode 383) Today’s problem was all about efficiently checking whether one string can be constructed from another — a classic hashing / frequency counting concept. ⚡ What I Learned: - Importance of frequency maps (hash tables) - Writing optimized solutions over naive approaches - How built-in methods can simplify logic but may impact performance 📊 Performance: ✅ Runtime: 0 ms (Beats 100%) ✅ Memory: Efficient usage 🔥 Takeaway: Small optimizations and choosing the right data structure can make a huge difference, even in easy problem #Day85 #LeetCode #CodingJourney #Python #DataStructures #ProblemSolving #100DaysOfCode
To view or add a comment, sign in
-
-
Index replication is a strategy that lets investors mimic the performance of market indices. Sound like something only the Wall Street Elite can do? Think again. You can build your own portfolio with Python: And yesterday, I showed 28,185 people how. They got: • Step by step instructions • Real Python code (that works) • A portfolio that replicates the S&P500 All free. Sound interesting? Check it out: https://lnkd.in/eAxHparm
To view or add a comment, sign in
-
-
🚀 Day 38 – LeetCode Journey Today’s problem: Gray Code ✔️ Generated sequence using bit manipulation ✔️ Applied formula: "i ^ (i >> 1)" ✔️ Ensured only one bit changes between consecutive numbers 💡 Key Insight: Gray Code is useful in minimizing errors in digital communication, as only one bit changes at a time. Using bitwise operations makes the solution both elegant and efficient. This problem improved my understanding of bit manipulation and binary patterns. Exploring deeper into low-level concepts 🔥💪 #LeetCode #Day38 #BitManipulation #Binary #Python #ProblemSolving #CodingJourney #100DaysOfCode
To view or add a comment, sign in
-
-
Just solved “Second Largest Digit in a String” on LeetCode — and here’s the simple approach I followed 👇 Instead of overcomplicating it, I focused on clean thinking + Python basics: 🔹 Converted the string into a set → removes duplicates instantly 🔹 Filtered only digits using isdigit() 🔹 Stored them as integers in a list 🔹 Sorted the list → easy access to largest & second largest 🔹 Edge case check: if less than 2 digits → return -1 💡 Key takeaway: Sometimes the most optimal solution isn’t about complex algorithms — it’s about using the right built-in tools smartly. 🚀 What I’m improving with each problem: • Writing cleaner logic • Thinking in steps instead of rushing • Handling edge cases early Consistency > Complexity. #LeetCode #DSA #Python #ProblemSolving #CodingJourney #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 Day 20 of #DSAStreak 📌 Problem: Partition Linked List (LeetCode 86) 🧠 Problem Summary: Given a linked list and a value x, rearrange the list such that: ✔ All nodes with values less than x come before nodes greater than or equal to x ✔ Maintain the original relative order 💡 Approach: Partition Technique 🔥 ✔ Traverse the list once ✔ Separate nodes into two groups: → smaller than x → greater than or equal to x ✔ Finally, connect both parts 🎯 Key Takeaway: 👉 Break problem into smaller parts (divide & merge) 👉 Using proper pointers makes linked list problems much easier 👉 Clean logic > complex implementation ⏱ Time Complexity: O(n) 📦 Space Complexity: O(1) #LinkedList #DSA #LeetCode #CodingJourney #100DaysOfCode #Python
To view or add a comment, sign in
-
-
🚀 Day 41 – LeetCode Journey Today’s problem: Add Binary ✔️ Implemented binary addition manually ✔️ Handled carry propagation efficiently ✔️ Worked with string manipulation and indexing 💡 Key Insight: Binary addition follows the same rules as decimal addition, but with base 2. Managing the carry correctly is the key to building the final result. This problem improved my understanding of bit-level operations and string handling. Step by step, mastering the fundamentals 🔥💪 #LeetCode #Day41 #Binary #Strings #Python #ProblemSolving #CodingJourney #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 Day 66 / 200 – Consistency is the real power 💡 Today’s challenge: **Implementing Pow(x, n)** using an optimized approach ⚡ Instead of the brute-force method, I used **Binary Exponentiation (Fast Power)** to reduce the time complexity from O(n) to O(log n). This approach efficiently handles both positive and negative powers, making the solution scalable and interview-ready. 🔹 Key Learnings: * Breaking problems into smaller subproblems improves efficiency * Handling edge cases (like negative exponents) is crucial * Optimization matters just as much as correctness 📊 Result: ✔️ 307 / 307 test cases passed ⚡ Runtime: 1 ms 🧠 Memory Efficiency: Top 2% Small improvements every day lead to big results over time. Staying consistent and sharpening problem-solving skills one challenge at a time 💪 #Day66 #100DaysOfCode #200DaysChallenge #LeetCode #Python #DSA #CodingJourney #ProblemSolving #Consistency
To view or add a comment, sign in
-
-
When you start working with APIs in Python 🧪 one of the most common ways to see results is with Flask. Just like in a laboratory, you experiment with flasks and ampoules. Here, the Flask is your container. You pour in routes, logic, requests. You observe what comes out. Simple. Lightweight. Immediate feedback. No heavy setup. No complex structure at the beginning. Just you… testing ideas in real time. And that’s exactly why it works so well early on. Because before scaling, before architecture, before optimization… you need a place to experiment. Flask is that place. #Python #Flask #APIs #SoftwareEngineering #BackendDevelopment #DeveloperLife #ContinuousLearning #RotterdamTech
To view or add a comment, sign in
-
🚀 Just solved the “Valid Number” problem on LeetCode! This problem looks simple at first glance—but handling edge cases like decimals, signs, and exponents makes it a great test of attention to detail and logical thinking. ✅ Key takeaways: Careful handling of edge cases is crucial Validating input step-by-step can simplify complex parsing problems Writing clean, readable logic beats overcomplicated solutions 💡 Performance: ⚡ Runtime: 3 ms 🧠 Efficient space usage ✅ All test cases passed Problems like this remind me that consistency in practice is what builds strong problem-solving skills. On to the next one! 🔥 #LeetCode #Coding #Python #ProblemSolving #SoftwareEngineering #AIEngineerJourney link of #Solution :- https://lnkd.in/ga9b5pVb
To view or add a comment, sign in
-
-
I wrote about building a RAG pipeline in Go from scratch. Not the architecture. Not the tech stack. The part that actually taught me something staring at scores that looked like this: 0.0164, 0.0161, 0.0158 for every query, across every chunk, and figuring out why. The article covers: - Why I built this in Go instead of Python - Why vector search alone wasn't enough and how RRF solves the score normalization problem - The reranking bug and what flat scores actually tell you - Two bugs I introduced myself that were invisible until I read the raw JSON - What I still haven't built (the eval directory is empty) Link in comments. #golang #rag #buildinpublic
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
Great insight, thank you for your post :)