From Guesswork to Evidence This week I open-sourced a small CLI tool: Activity Reporter. It scans a directory within a given time window and generates a human-readable report of file activity. But the real focus isn’t the feature. It’s the design principles behind it: • One-shot execution • Read-only • Append-only logs • No automatic judgment Most tools try to decide for you. I prefer tools that generate evidence and leave decisions to humans. To me, engineering is about reducing uncertainty — not adding abstraction. Repo link in the comments. #SoftwareEngineering #OpenSource #DevTools #Python #EngineeringMindset
Open-Sourcing Activity Reporter: Evidence Over Abstraction
More Relevant Posts
-
Reducing 3Sum from O(n³) to O(n²): The Power of Sorting + Two Pointers Most developers first approach 3Sum with nested loops, hitting O(n³) complexity. The breakthrough: sort the array first, then reduce it to n iterations of the Two Sum problem. For each element as the fixed anchor, use two pointers on the remaining sorted portion to find pairs that complete the triplet. Sorting unlocks directional movement (move left if sum too high, right if too low), collapsing a dimension of complexity. The Critical Detail: Duplicate handling isn't just about correctness — it's about recognizing that sorted order lets you skip duplicates in O(1) rather than using a HashSet for deduplication. The while nums[l] == nums[l-1] skip after finding a valid triplet prevents processing identical combinations. Time: O(n²) | Space: O(1) excluding output #AlgorithmOptimization #TwoPointers #Sorting #ComplexityReduction #Python #CodingInterview #SoftwareEngineering
To view or add a comment, sign in
-
-
Today I worked on “Remove Element” — and realized it’s not about removing… it’s about rearranging. At first, I thought we had to delete elements from the array. But the actual idea is different: 👉 Keep the valid elements and overwrite the rest in-place 💡 Core concept: Two pointers • One pointer scans the array • One pointer places valid elements forward Example: [3,2,2,3], val = 3 → [2,2,,] We don’t actually remove elements — we just make sure the first k elements are correct. 🔑 Key learning: Many array problems are not about deleting or creating new arrays… they are about efficiently reusing the same memory. This problem helped me clearly understand the pattern of: ➡️ Filtering elements in-place #100DaysOfCode #LeetCode #DSA #Python #ProblemSolving #CodingInterview
To view or add a comment, sign in
-
-
LeetCode 23: Merge k sorted list: You are given an array of k linked-lists lists, each linked-list is sorted in ascending order. Merge all the linked-lists into one sorted linked-list and return it. Approach: Simple and straightforward, iterate through each of the linked-list in the given list, push each node's value into a priority queue using heapq module, create a new linked-list using the elements of priority queue. Time complexity: O(n logn) where n is the total number of values. Space complexity: O(n) #Python #LeetCode #DSA #CompetitiveProgramming #DataStructures #Algorithms #ProblemSolving
To view or add a comment, sign in
-
-
Today I solved Majority Element, a fundamental problem that highlights efficient array processing and algorithmic thinking. 🔹 Problem: Given an array nums of size n, return the majority element. The majority element is the element that appears more than ⌊n/2⌋ times in the array. 🔹 Approach (Boyer–Moore Voting Algorithm): Instead of counting frequencies with extra space, we can use an elegant algorithm that works in O(n) time and O(1) space. Steps: Maintain a candidate and a count. If the count becomes 0, select the current number as the new candidate. Increase count if the element matches the candidate, otherwise decrease it. 🔹 Example: Input: [2,2,1,1,1,2,2] Output: 2 🔹 Complexity: ⏱ Time Complexity: O(n) 📦 Space Complexity: O(1) 💡 This problem is a great example of how clever algorithms can eliminate the need for extra memory while maintaining efficiency. #LeetCode #Algorithms #DataStructures #Python #CodingPractice #ProblemSolving #BoyerMoore #SoftwareEngineering
To view or add a comment, sign in
-
-
🚀 Day 35 of #60DaysCodingChallenge | ABTalks Today’s problem focused on the Sliding Window Technique (Variable Window) while solving the classic Longest Substring Without Repeating Characters problem. 🔍 Key Learning: Instead of checking all possible substrings (which would be inefficient), the Sliding Window approach allows us to dynamically adjust the window size while traversing the string. This reduces the time complexity significantly and helps build a more optimized solution. 💡 What I Practiced Today • Understanding the concept of Variable Sliding Window • Efficient string processing techniques • Optimizing brute force solutions into linear time algorithms ⚙ Approach Used Two pointers (left and right) maintain the window A data structure keeps track of characters inside the window If a duplicate appears, the window shrinks from the left Track the maximum window size without repeating characters 📈 Complexity Time Complexity: O(n) Space Complexity: O(n) Consistency is slowly building stronger problem-solving skills every day. The goal is not just solving problems but understanding the patterns behind them. Looking forward to Day 36 tomorrow. 🔥 ABTalksOnAI #ABTalks #60DaysChallenge #DSA #SlidingWindow #ProblemSolving #CodingJourney #Python #LearningInPublic
To view or add a comment, sign in
-
Day 3 / 100 🚀 Solved “Reverse Integer” — a problem that looks simple but actually tests how carefully you handle edge cases. At first, reversing digits feels straightforward. But the real challenge is handling 32-bit overflow without using extra space. 💡 Key learning: Before updating the result, always check if multiplying by 10 will exceed the allowed range. Core idea: rev * 10 + digit must stay within [-2³¹, 2³¹ - 1] Highlights: • Time Complexity: O(log n) • Space Complexity: O(1) • Correctly handles negative numbers and overflow This problem reinforced a critical habit: Don’t just make the logic work — validate boundary conditions. #100DaysOfCode #LeetCode #DSA #Python #ProblemSolving #CodingInterview
To view or add a comment, sign in
-
-
Subtree Detection: Modular Recursion with Helper Function Composition Subtree validation needs two operations — traverse main tree for candidates, validate exact match at each. Composing separate functions (isSubtree calls isSameTree) keeps logic modular, enables reusing isSameTree, simplifies testing/debugging. Composition Over Monolith: When problem decomposes into "find X, verify Y," separate concerns. Clearer code, easier testing, function reuse across problems. Time: O(m × n) | Space: O(h) #FunctionComposition #ModularRecursion #SubtreeDetection #CodeReuse #Python #AlgorithmDesign #SoftwareEngineering
To view or add a comment, sign in
-
-
🚀 Day-66 of #100DaysOfCode 📊 NumPy Practice – Image Matrix Manipulation Today I simulated a grayscale image using NumPy and performed a simple brightness adjustment. 🔹 Concepts Practiced ✔ Random matrix generation ✔ Array arithmetic operations ✔ Pixel value clipping using np.clip() ✔ Understanding image data as matrices 🔹 Key Learning Images in computer vision are essentially NumPy matrices, where each element represents a pixel intensity. NumPy makes it easy to manipulate these values efficiently. Exploring how NumPy connects with image processing and computer vision 📸✨ #Python #NumPy #DataScience #ComputerVision #MachineLearning #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 Day 55 of #100DaysOfCode Solved LeetCode 350 – Intersection of Two Arrays II today! 🔍 Problem Insight: Given two arrays, we need to return their intersection such that each element appears as many times as it occurs in both arrays. 💡 Approach Used: - Used "Counter" (hash map) to store frequency of elements from first array - Traversed second array and matched elements - Reduced count after every match to handle duplicates correctly ⚡ Why this works: Efficient frequency tracking avoids nested loops and reduces time complexity. 🧠 Complexity: - Time: O(n + m) - Space: O(n) ✅ Key Learning: Hashing + frequency counting is powerful for problems involving duplicates and intersections. 🔥 Consistency is the key — showing up every day! #DSA #LeetCode #Python #CodingJourney #PlacementPrep #SoftwareEngineering #100DaysOfCode
To view or add a comment, sign in
-
Explore related topics
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
GitHub repo: https://github.com/0745vipno-png/activity-reporter