Finding and Removing Dead Code in code bases & scripting Find and remove dead code – before it finds you We’ve all been there: the codebase grows, features come and go, and eventually the code ends up in functions that nobody calls anymore. Particularly tricky: scripting files (Python, Shell, JS), which often exist outside the IDE and are quickly forgotten. 🫵 Why this is problematic: • Maintenance costs: Everyone has to read code that is never executed. • Security risk: Outdated logic may contain vulnerabilities that have never been patched because they were never tested. • Confusion: New team members waste time trying to understand why something exists (“Is this still needed?”) • Slows down builds and increases binary size • Bloats tests and reviews ➡️ How SciTools’ Understand helps Instead of tedious manual searching, Understand does the work for you: 1️⃣ Find unused functions & variables The static analysis detects code that is never called, across all files and languages. 2️⃣Visualize dependencies Graphs immediately show you which modules are isolated and can be removed. 3️⃣ Track references Where is this function used? Understand shows you every reference, or, indeed, none. 4️⃣Scripting included Not just compiled code, your build scripts, helper scripts and automations are analyzed too. ✔️ Best practice: Integrate dead code checks into your workflow: 1. Generate reports regularly 2. Check before every release 3. Plan refactoring strategically The result: A leaner, more maintainable and more secure codebase. Free trial www.emenda.com/trial #SoftwareEngineering #DeadCode #CodeQuality #Refactoring #CleanCode #Understand #SciTools #Scripting
Remove Dead Code with SciTools Understand
More Relevant Posts
-
What if the question isn't which tool is best, but which process requirements you haven't mapped yet? Every tool comparison post on LinkedIn ranks platforms by features. Number of integrations. Pricing tiers. UI screenshots. None of that tells you which one fits your actual workflow. Four questions that matter more than any feature list: Does your data need to stay on-premise? If yes, the field narrows to n8n self-hosted or custom Python. Zapier and Make are cloud-only. For regulated industries, this single question eliminates half the options. How many exception paths does the process have? Under 3: Zapier handles it. Between 3 and 10: Make or n8n. Above 10: you need n8n's flexibility or custom code. Who maintains it after deployment? If the ops team maintains it without engineering support, visual tools win. If an engineering team owns it with code review and CI/CD, Python or n8n with Git integration. Does the workflow need version control? If deployments need rollback capability and audit trails, cloud-only tools with no Git backing create risk. Map the process. Answer the four questions. The tool becomes obvious. In your last tool evaluation, did anyone map the process requirements before the vendor demos started? #WorkflowAutomation #ProcessAutomation #n8n #OperationsManagement
To view or add a comment, sign in
-
Meet Albert: The Austrian AI Agent that simply refuses to quit...⛰️ ...Albert isn't just another Python wrapper. He was born out of a need for resilience and true autonomy. He’s one of the first AI agents coming out of Austria, and he’s built differently... ...Albert is model-agnostic. He doesn’t care if you hit a rate limit with Codex or Claude. While other tools freeze your entire terminal, Albert just keeps going. Same interface, any model, no lock-in. The session stays alive because the mission stays alive. Why Albert is a different breed: ⚡ Agent-Native & Fast: Built for execution, not just conversation. 🧠 Huge Skillset: From /init (mapping your entire repo) to /loop (autonomous mode until the job is done). 🦀 Rust-Powered: We hardbaked a Rust token saver into the backend to keep things lean and efficient. 🛡️ End-to-End Logic: Whether it’s /tdd (test-driven development), /bughunter, or a full /code-review, Albert handles the heavy lifting. We moved away from the fragility of standard CLIs because we wanted a partner that works as hard as we do. No more "fake certainty," no more manual translation, and no more starting over because of a timeout. Be like Albert. Be open-core. He’s still a work in progress, but he’s already ready to work. 👉 Take Albert for a spin here: https://lnkd.in/dCaWnfEd Leading with purpose. Innovating with people. Thriving with AI. #AI #AustrianTech #AIAgents #OpenCore #SoftwareEngineering #Ternlang #AlbertAI #EBAIL #RFIRFOS
i rethink the obvious, then build things that matter | head of research& cofounder @ rfi-irfos | youth mentor @ sindbad graz | observational scientist, macro-analyst, host | green tea? 𒀭
this is not a python wrapper. albert is model-agnostic. it doesn’t care if you hit rate limits with codex or claude and your whole CLI freezes. it just keeps going. same interface. any model. no lock-in. session keeps going. 👉 fast 👉 agent-native 👉 huge built-in skillset 👉 rust token saver hardbaked into the backend. Slash Commands include but not limited to: /auth → connect any provider /init → map your entire repo /plan → multi-step execution + risk analysis /loop → autonomous agent until mission complete /tdd → test-driven dev, end-to-end /code-review → security + quality audit /build-fix → detect & fix build errors /bughunter → find and triage issues /refactor → clean and consolidate code /commit → generate commit messages /pr → open pull requests /compress → manage context window /status → session state /help → full command list we got tired of CLIs breaking the moment the model taps out. so we built one that doesn’t. be like albert. be open-core. try our work in progress: https://lnkd.in/dCaWnfEd
To view or add a comment, sign in
-
Is your code getting lost in a maze of nested `if` statements? 😵💫 There's a cleaner path to more readable and maintainable functions. We've all been there: functions riddled with deeply indented conditional logic, making it tough to follow the "happy path" and spot crucial edge cases. This "arrow code" significantly increases cognitive load and can quickly become a source of subtle bugs. One of my favorite patterns for dramatically improving readability and maintainability is using **Guard Clauses** (or Early Exits). Instead of wrapping your core logic in multiple `if` blocks, you validate conditions at the start of your function and return early if any prerequisites aren't met. This simple refactoring flattens your code, making the primary flow much clearer. It pushes error handling and invalid state checks to the forefront, allowing your main business logic to live in a clean, unindented section. It's a huge win for developer experience and often prevents subtle bugs by handling invalid states upfront. Here's a quick Python example demonstrating the power of guard clauses: ```python # Before (nested ifs) def process_order_old(order): if order: if order.is_valid(): if order.items: # Core processing logic return "Order processed successfully." else: return "Error: Order has no items." else: return "Error: Order is invalid." else: return "Error: Order is None." # After (using Guard Clauses) def process_order_new(order): if not order: return "Error: Order is None." if not order.is_valid(): return "Error: Order is invalid." if not order.items: return "Error: Order has no items." # Core processing logic (clean, unindented) return "Order processed successfully." ``` The takeaway here is simple: prioritize clear, linear code paths. Guard clauses help you achieve this, pushing error handling to the front and letting your main logic shine, boosting both productivity and code quality. What's your go-to refactoring technique for improving code readability and maintainability? Share your tips below! 👇 #Programming #CodingTips #SoftwareEngineering #Python #CleanCode #Refactoring #DeveloperExperience
To view or add a comment, sign in
-
Ever had your entire script fail because of a single space? 😅 I was solving a real-world problem: monitoring disk space usage using a Bash script 💻 Simple goal → trigger an alert when usage crosses a threshold 🚨 Everything looked correct. Logic? Fine. Commands? Fine. Still… it failed ❌ The culprit? DISK_USAGE = $(command) That one extra space around "=" sign, broke everything 💥 In Bash, variable assignment is strict: NO spaces allowed. Correct: DISK_USAGE=$(command) ✅ Incorrect: DISK_USAGE = $(command) ❌ That tiny difference cost debugging time ⏳ This is where it gets interesting 👇 As Python developers 🐍, we are used to writing: x = 10 It improves readability. It’s clean. It’s encouraged. But carry that same habit into Bash… and it breaks your code. Why? Because in Bash: Spaces are not cosmetic Spaces are syntax ⚙️ The shell interprets: DISK_USAGE = value as: Command: DISK_USAGE Argument: = Argument: value Which results in an error 😵 Lesson for every developer 🚀 We often switch between languages: Python, Bash, JavaScript, C++ But each language has its own rules. A good habit in one language can become a bug in another. Key takeaways: Be language-aware, not habit-driven 🧠 Understand how your code is interpreted 🔍 Never assume syntax consistency across languages ❗ The smallest characters can cause the biggest failures 🐞 If you are preparing for interviews or working on real systems, these tiny details matter more than you think. Have you ever been stuck because of something this small? Share your experience 👇 #SoftwareEngineering #Python #Bash #DevTips #CodingMistakes #Debugging #LearnToCode #100DaysOfCode #TechCareers #Programming
To view or add a comment, sign in
-
-
So I was making a VS Code extension and made a request that apparently isn't supported. Instead of saying "no" the agent spent half an hour writing Python code and dig the guts of the IDE to find how exactly it works to give me what I asked for! I mean, I appreciate the effort but one of my code principals is to "Never fight the tool" (the tool being the VS Code Extension API in this case). Thought it was fun to share but don't worry for me. I'll tighten it up. While you're here, don't forget to set the "Chat: Font Size" to something readable. It's easy to ignore what the agent is doing (and if you're not an engineer it's totally fine) but for an engineer, it's important to understand the tool and what's going on.
To view or add a comment, sign in
-
-
Coding agents generate code like there is no tomorrow. Soon enough, they struggle under the weight of what they created. AI writes a new helper instead of reusing an existing one. Old functions stay around because tests still call them, even though production does not. The codebase grows, but the agent's ability to reason about it does not. On bigger projects, especially ones that have been heavily vibe-coded, this turns into chaos. The problem is not just messy code. It is slower reviews, weaker trust in the codebase, and agents that get less reliable as the surface area grows. We have put a lot of energy into making code generation faster. I think the next thing to get right is safe code removal. There is a reason senior engineers get excited about deleting code. It is a bit like never throwing away clothes you no longer wear. It seems fine at first. Then one day, you have five versions of everything, and finding what you actually need means digging through closets you forgot existed. I built a Claude Code skill to help with this. It gives Claude a methodology for dead code removal: classify what you are looking at, verify the cases static tools miss, and avoid drifting into refactor territory while you are in there. It is tuned for Python and TypeScript, but should be easy to adapt. Clone it, fork it, open a PR if you improve it. https://lnkd.in/ds5AcC5U #CodingAgents #CodeQuality
To view or add a comment, sign in
-
#The_most_expensive_comma_I’ve_ever_typed. 💸 I recently spent way too long debugging a background task that was "failing successfully." No errors in the frontend, no crashes in the logs—just... silence. The culprit? A single trailing comma at the end of a string: #email_body = "Hello there...", In Python, that tiny comma turns your intended String into a Tuple. So, instead of sending a block of text to the email handler, I was sending ("Hello there...",). Because we had fail_silently=True enabled in our background thread (standard practice to keep the UI snappy), the system was quietly choking on the Tuple and dying without a word. #The Lesson: Syntax Matters: Even in a "readable" language like Python, one character changes the entire data structure. The Danger of Silence: fail_silently is a double-edged sword. It keeps the user experience smooth, but it can bury the "why" during development. Log Everything: If it’s failing silently, make sure your logger isn’t! Has a single character ever brought down your entire workflow? Let’s commiserate in the comments. 👇 #Python #SoftwareEngineering #CodingLife #Debugging #Django #WebDevelopment
To view or add a comment, sign in
-
Most beginner backend projects die in refactoring. Here's the structure I use to prevent that. When I built my Task Manager CLI, I learned this the hard way — a monolithic file that worked until it very much didn't. After refactoring, here's the structure I now start with: Before writing a single line: → Define your data model first → Identify all operations (CRUD) you'll need → Map inputs, outputs, and error states While building: → One module per concern (routes, models, utils, exceptions) → Validate inputs at the boundary — not deep inside logic → Handle errors explicitly — no silent failures Before shipping: → Test the unhappy paths, not just the happy ones → Read your own code like a stranger would This approach reduced my debugging effort by 40% on a real project. It works at any scale — from a CLI tool to a FastAPI service. What's the first thing you do when starting a new backend project? #BackendDevelopment #Python #FastAPI #SoftwareEngineering #CodingTips
To view or add a comment, sign in
-
My project of the day: NaturalScript - write & maintain executable scripts in natural language I find it off-putting when people generate scripts with LLMs and commit the results to Git repositories. Those scripts are verbose and hard to maintain. It's like committing a binary file without the actual source code. NaturalScript lets you write and maintain executable scripts in natural language. It lets you treat shell/Python/... scripts as generated artifacts that you don't edit directly. Let me know what you think. https://lnkd.in/erEt6ZxH
To view or add a comment, sign in
-
Yoooo guys, I delivered as promised. 😀 Told you guys I read a long blog on building multi agent on langchain blog, so I thought about simplifying it... If you’ve ever tried to put an AI agent into a real production backend, you know it usually ends in a mess of bloated context windows, blocking synchronous code, or agents getting amnesia the second a serverless function dies. The heavy enterprise frameworks feel like wrestling an octopus just to make a simple API call. So, I built Swarm Agent Kit 🐝. It’s a minimalist, state-aware multi-agent orchestration framework for Python. I built it to handle the actual heavy lifting of production: ⚡ Native async/await execution (FastAPI ready) 🧠 Global state management (No more token-bloat) 💾 Bring-Your-Own-Database (BYOD) persistence hooks (Pause and resume agents days later) I just dropped a full blog post breaking down exactly why I built it, how the routing engine works under the hood, and how you can use it to build agents that actually survive in production. Check out the blog and the source code below. Would love to hear what you guys think or if you want to contribute! 📖 Read the full story here: https://lnkd.in/eWFbtY27 Star the repo / check the code: https://lnkd.in/eQ7pCWdA 📦 Try it out: pip install swarm-agent-kit Let's build! #Python #AI #MachineLearning #OpenSource #LangChain #Agents #SoftwareEngineering
To view or add a comment, sign in
More from this author
Explore related topics
- Importance of Removing Dead Code in Software Development
- How to Refactor Code Thoroughly
- Improving Code Quality Through Automated Refactoring
- Codebase Cleanup Strategies for Software Developers
- Refactoring Problematic Code for Maintainability
- Advanced Code Refactoring Strategies for Developers
- How to Resolve Code Refactoring Issues
- How to Refactor Code After Deployment
- Refactoring Techniques for Confident Code Updates
- Strategies to Refactor Code for Changing Project Needs
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