Day 73/100 Logging (Very Important) 📝 Today I focused on something that often gets ignored but is critical in real-world applications — logging. Learned: Why logging is important for debugging and monitoring applications Different log levels and when to use them (INFO, WARN, ERROR) Key takeaway: Logs are not just for debugging, they help understand what’s happening inside the application without stopping it. Starting to realize that good logging is a must for building reliable backend systems. #BackendDevelopment #Java #Logging #LearningInPublic #100DaysOfCode
Why Good Logging Matters for Backend Development
More Relevant Posts
-
🚀 Day 7 – Exception Handling: More Than Just try-catch Today I focused on how exception handling should be used in real applications—not just syntax. try { int result = 10 / 0; } catch (Exception e) { System.out.println("Error occurred"); } This works… but is it the right approach? 🤔 👉 Catching generic "Exception" is usually a bad practice 💡 Better approach: ✔ Catch specific exceptions (like "ArithmeticException") ✔ Helps in debugging and handling issues more precisely ⚠️ Another insight: Avoid using exceptions for normal flow control Example: if (value != null) { value.process(); } 👉 is better than relying on exceptions 💡 Key takeaway: - Exceptions are for unexpected scenarios, not regular logic - Proper handling improves readability, debugging, and reliability Small changes here can make a big difference in production code. #Java #BackendDevelopment #ExceptionHandling #CleanCode #LearningInPublic
To view or add a comment, sign in
-
Traditional Loops vs Streams in Java When working with collections, developers often face this choice 👇 Traditional Loops - Imperative approach (how to do it) - Step-by-step control - More verbose and manual Streams - Declarative approach (what to do) - Functional style (filter, map, collect) - Cleaner and more expressive code Key Insight Streams shift the focus from iteration to transformation, making code easier to read and maintain. * When to use what? - Use loops when you need fine-grained control - Use streams for cleaner, pipeline-based data processing There’s no one-size-fits-all — choose based on readability, performance, and use case. #Java #CleanCode #Streams #SoftwareEngineering #BackendDevelopment
To view or add a comment, sign in
-
-
🚀 Day 21 of #128DaysOfCode 🔍 Key Learnings: Efficient searching in O(log n) Using low & high to narrow the range Finding correct position even if target is absent 🧠 Approach: Compare mid with target → move left/right → return index or insert position Consistency is key 🔥 #DSA #Java #CodingJourney #PlacementPreparation
To view or add a comment, sign in
-
-
Day 65 — LeetCode Progress (Java) Problem: Find All Numbers Disappeared in an Array Required: Given an array of size n containing numbers in the range [1, n], return all the numbers that are missing from the array. Idea: Compare the expected range [1…n] with the actual elements to identify missing values. Approach: Initialize a set containing all numbers from 1 to n. Traverse the array: Remove each element from the set The remaining elements in the set are the missing numbers. Time Complexity: O(n) Space Complexity: O(n) #LeetCode #DSA #Java #HashSet #Arrays #Algorithms #CodingJourney #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 𝐃𝐚𝐲 91/100 – 𝐌𝐚𝐱 𝐂𝐨𝐧𝐬𝐞𝐜𝐮𝐭𝐢𝐯𝐞 𝐎𝐧𝐞𝐬 🔍 𝐊𝐞𝐲 𝐋𝐞𝐚𝐫𝐧𝐢𝐧𝐠: Keeping track of a running count helps efficiently solve problems involving continuous sequences. 💡 𝐂𝐨𝐫𝐞 𝐈𝐝𝐞𝐚: Traverse the array Count consecutive 1s Reset count when 0 appears Track maximum count 𝐖𝐡𝐲 𝐢𝐭 𝐰𝐨𝐫𝐤𝐬? We only care about continuous 1s, so resetting on 0 ensures we start counting a new sequence. ⚡ 𝐀𝐩𝐩𝐫𝐨𝐚𝐜𝐡: Initialize count = 0 and max = 0 Loop through array: If 1 → increment count Else → reset count Update max at each step ⏱️ Time Complexity: O(n) 📦 Space Complexity: O(1) #Day91 #100DaysOfCode #Java #DSA #LeetCode #Arrays #CodingJourney
To view or add a comment, sign in
-
-
Day 66 — LeetCode Progress (Java) Problem: Find the Difference of Two Arrays Required: Given two integer arrays, return: Elements present in nums1 but not in nums2 Elements present in nums2 but not in nums1 Idea: Use sets to remove duplicates and quickly check membership. Approach: Convert both arrays into sets Iterate over nums1 set: Add elements not present in nums2 set to result1 Iterate over nums2 set: Add elements not present in nums1 set to result2 Return both lists Time Complexity: O(n + m) Space Complexity: O(n + m) #LeetCode #DSA #Java #HashSet #Arrays #ProblemSolving #CodingJourney
To view or add a comment, sign in
-
-
Day 95/200 – LeetCode Challenge. Problem: Remove Duplicates from Sorted List II (Java) Today’s focus was eliminating all duplicate values from a sorted linked list while keeping only distinct nodes. Implemented an efficient two-pointer approach with a dummy node to handle edge cases cleanly. Linked lists require careful pointer management. Dummy nodes simplify boundary conditions. One-pass solution ensures optimal performance. Continuing the 200-day journey, one problem at a time. #LeetCode #Java #CodingChallenge #200DaysOfCode #ProblemSolving
To view or add a comment, sign in
-
-
Day 64 — LeetCode Progress (Java) Problem: Remove Element Required: Given an array nums and a value val, remove all occurrences of val in-place and return the new length of the array. Idea: Use a two-pointer approach to overwrite unwanted elements while maintaining the order of remaining elements. Approach: Maintain a pointer k to track the position of valid elements. Traverse the array: If the current element is not equal to val, place it at index k Increment k All valid elements are moved to the front of the array. Return k as the new length. Time Complexity: O(n) Space Complexity: O(1) #LeetCode #DSA #Java #TwoPointers #Arrays #Algorithms #CodingJourney #100DaysOfCode
To view or add a comment, sign in
-
-
Day 42 of consistency 💻🔥 Solved Add Two Numbers using linked lists — a classic problem that really tests understanding of pointers, carry handling, and edge cases. Key takeaways: Handling carry efficiently is crucial Dummy nodes make list problems much cleaner Iterative approach keeps space optimal Not the fastest runtime yet, but improvement is a process — optimizing step by step. Consistency > Perfection. #Day42 #LeetCode #DSA #Java #CodingJourney #ProblemSolving #100DaysOfCode
To view or add a comment, sign in
-
-
⚠️ The Hardest Bugs Aren’t in the Code One thing backend systems taught me: Most critical issues aren’t due to wrong logic — they’re due to unexpected system interactions. Examples: • A slow query impacting multiple services • A retry mechanism causing duplicate processing • A small config change increasing latency The challenge is rarely “what the code does” It’s “how the system behaves as a whole” Understanding interactions > writing isolated logic. #backendengineering #systemdesign #java
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