Spent 3 hours debugging a production issue last week. Turned out someone had named a variable "data" inside a function that also used an outer "data" variable. No error. No warning. Just completely wrong output silently the whole time. Please, for the love of everything, give your variables actual names. "data", "info", "temp" and "obj" are not variable names, they're apologies. #SoftwareEngineering #CleanCode #Programming #DevLife #CodingTips
Muhammad Ghulam Azad Ansari’s Post
More Relevant Posts
-
Debugging is a skill. And most developers never learn it properly. Juniors: → randomly change code → add console logs everywhere Seniors: → isolate the problem → reproduce consistently → form hypotheses The difference? One guesses. The other investigates. If you can’t reproduce the bug, you don’t understand it yet. #DeveloperTips #Debugging #Programming #Engineering
To view or add a comment, sign in
-
🚀 Testing your C fundamentals! Can you predict the output of this nested loop? for(int i = 1; i <= 3; i++) { for(int j = 1; j <= 2; j++) { printf("%d%d ", i, j); } } Drop your answer in the comments 👇 #CProgramming #EmbeddedSystems #CodingChallenge #Loops #LearningInPublic
To view or add a comment, sign in
-
In this action class handle method, the process begins by calling a daily trending function to retrieve the top 5 repositories based on a specific date. Following this, repository details are fetched. The initial call to the daily trending function provides the necessary data to then query the trending repositories for comprehensive row information. This entire dataset is then processed and sent forward. Full video: https://lnkd.in/d6kAGMqw #SoftwareDevelopment #APIDesign #CodeQuality #Programming #Tech
To view or add a comment, sign in
-
🚀 Constructors and Destructors: Object Initialization and Cleanup (C++) Constructors are special member functions in C++ that are automatically called when an object is created. They are used to initialize the object's data members and ensure that the object is in a valid state. Destructors are also special member functions that are automatically called when an object is destroyed. They are used to release any resources held by the object, such as dynamically allocated memory, preventing memory leaks. Constructors and destructors are crucial for proper object lifecycle management. #c++ #programming #coding #tech #learning #professional #career #development
To view or add a comment, sign in
-
-
Every great programmer starts with the basics. Diving deep into Singly Linked Lists — understanding how nodes connect, how memory is managed dynamically, and how operations like insertion and deletion actually work behind the scenes. It’s not just about code, it’s about building logic. awareness of hardware-level behavior like cache alignment and data locality. #Multithreading #Concurrency #Programming #SoftwareEngineering #BackendDevelopment #CPP #CppProgramming #ModernCPP #Multithreading #Concurrency #ParallelProgramming #STL #SystemProgramming #SoftwareEngineering #CodingLife #DSA #Coding #LinkedList #TechLearning #ProgrammerMindset
To view or add a comment, sign in
-
-
Ever merged modulo with dynamic programming and watched the problem shrink instantly? In competitive programming, the difference between a good solution and a great one is often not speed alone, but state reduction. This is learned from CodeForces itself. This problem is a clean example: instead of thinking in terms of all subset sums, we only care about the remainder after division by k. That shift matters in contests because it saves both time and mental bandwidth and some key ideas that can help you- • Read the problem as a subset-sum divisibility check, not as a full-sum enumeration problem. • Recognise that modulo preserves addition and other operations, so every number can be replaced by its remainder. • Analyse constraints early: a full combinatorial DP is too large, but a remainder-based state fits. • Select the right approach: dp[r] tells whether a remainder r is reachable. • Implement with state compression: update from dp[i][r] to dp[r] carefully. • Debug edge cases like r = 0, repeated values, and transitions that wrap around k. Try solving this problem for instance - https://lnkd.in/gJBE8Qdi What most people miss is that CP improvement is rarely passive practice. It is pattern recognition under pressure. The same mindset appears in real engineering: reduce the state, constrain the search space, and optimize what truly matters instead of brute-forcing every possibility. How often do you pause and ask whether the problem can be redefined before you try to solve it? Follow Vishu Kalier for more such insights. #CompetitiveProgramming #DynamicProgramming #ModuloDP #DSA #Algorithms #ProblemSolving #Coding #SoftwareEngineering #cfbr #Eternal #Leetcode #Codeforces
To view or add a comment, sign in
-
-
⚠️ 𝗪𝗵𝘆 𝘁𝘄𝗼 𝗰𝗼𝗿𝗿𝗲𝗰𝘁 𝗼𝗽𝗲𝗿𝗮𝘁𝗶𝗼𝗻𝘀 𝗰𝗮𝗻 𝗰𝗿𝗲𝗮𝘁𝗲 𝗮 𝘄𝗿𝗼𝗻𝗴 𝗿𝗲𝘀𝘂𝗹𝘁 Imagine two processes running at the same time. Both access the same data. Individually: ✅ correct ✅ valid Together: ❌ unexpected result That’s called a **race condition**. It happens when: ⚙️ operations depend on timing 🔄 execution order is unpredictable Example: Two users updating the same value at once. Result? Data inconsistency. 𝗧𝗶𝗺𝗶𝗻𝗴 𝗶𝘀𝗻’𝘁 𝗮𝗹𝘄𝗮𝘆𝘀 𝘂𝗻𝗱𝗲𝗿 𝘆𝗼𝘂𝗿 𝗰𝗼𝗻𝘁𝗿𝗼𝗹. That’s why systems use: 🔒 locks ⚙️ synchronization 📊 controlled access Have you ever faced a bug that only happens “sometimes”? #Programming #Developers #SoftwareEngineering #Concurrency #SystemDesign #Debugging #TechExplained #CodingLife #LearningInPublic #ITStudent #DeveloperLife #ComputerScience #ProblemSolving
To view or add a comment, sign in
-
-
🚀 Day 4: C Programming Journey Today I explored how control statements guide the flow of execution in a program. 🔹 Conditional Statements: if...else, else...if, switch 🔹 Looping Statements: for, while, do...while 🔹 Jump Statements: break, continue, return, goto Each plays a vital role in decision‑making, repetition, and flow control — forming the backbone of structured programming. #CProgramming #CodingJourney #LearningSeries #SoftwareDevelopment #ProgrammingBasics #CodeFlow
To view or add a comment, sign in
-
-
Invert Binary tree Approach: check if node is null or not if null return null swap left node and right ( not value complete node ) go to left (recursively) go to right (recursively) return node TC: O(N) SC:O(N)- recursive stack #DSA #programming #coding #problemSolving
To view or add a comment, sign in
-
-
Is your 2026 tech stack already outdated? It’s easy to keep using what we know, but some of our favorite tools are officially becoming bottlenecks. Here are 5 things we should probably stop doing this year: • Stop building "REST-only" APIs • Stop writing every test manually • Stop using SPA-only rendering • Stop relying on massive Bash scripts • Stop using LocalStorage as a database The goal is to reduce friction and build products that actually scale. Which of these is the hardest one for you to let go of? #WebDev #Coding #SoftwareEngineering #TechTrends #Programming
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
How did a function that constantly returns incorrect values end up in production?