Importance of Coding Principles

Explore top LinkedIn content from expert professionals.

  • View profile for Arpit Bhayani
    Arpit Bhayani Arpit Bhayani is an Influencer
    291,198 followers

    When you start working on a new (for you) but existing codebase, you will notice patterns you strongly disagree with. Naming conventions that seem stupid. Abstractions that seem over-engineered. Error handling that you would have done very differently. Match them anyway, in the code that you write. A codebase is a shared 'language'. When every file follows the same conventions, you and your peers can move through the code quickly, make changes confidently, and reason about what things do without stopping to decode style differences. The moment you introduce your own patterns, you add a 'second dialect'. Now the next person reading your code has to context-switch mid-file. The cost of diverging is almost always higher than the cost of going along with something imperfect. The original author is not necessarily wrong either - they had context you do not. Try to understand that. There is a right time to change conventions; wait until then. You can always initiate a team discussion or raise a smaller pull request that updates a small fraction of the codebase and demonstrates the benefits. Hope this helps.

  • View profile for Mahima Hans

    Tech, AI and Careers | Ex-Microsoft | Your Technical Interview Coach | Public Speaker

    346,340 followers

    In my first coding interview, I was so focused on solving the problem that I didn’t care about how my code looked. Messy variables, no indentation, and zero structure. Guess what? I didn’t clear that round. Turns out, clean code matters as much as the solution. Here’s what we should take care of while writing good code during interviews: ✅ Variable names matter Avoid a, b, or temp. Use meaningful names like maxSum or isPalindrome—it makes your logic easier to understand. ✅ Indentation is important Write code that’s neat and properly aligned. It shows you’re organized and professional. ✅ Write scalable solutions Avoid hardcoding values. Use variables and write code that can handle a range of inputs. ✅ Comments If something in your code feels complex, add a quick comment or explain it to the interviewer while coding. ✅ Keep it simple Don’t overcomplicate your logic. A clear and efficient solution always wins. Your code isn’t just a solution—it’s a reflection of your approach. So, the next time you solve a problem, write like you’re being interviewed. Because clean code == confidence. All the best!❤️

  • View profile for Aishwarya Naresh Reganti

    Founder & CEO @ LevelUp Labs | Human-First AI Transformation For Your Enterprise

    127,688 followers

    😅 The biggest AI coding question today: how do you get to production without shipping vibe coded slop? A lot of developers now understand that AI can help them move fast. You can vibe code a prototype, generate a feature quickly, and get a working draft in minutes. But the harder question is, how do you make sure the code actually stands the test of time? This is exactly what Mihail Eric covered in our internal Chai & AI community session last week. Mihail teaches the "The Modern Software Developer" course at Stanford, is Head of AI at Monaco, and was also a colleague of mine back at Alexa. In the session, he introduced his RePPIT framework for using AI to ship production quality code. RePPIT breaks down the coding process into five deliberate steps: (Re)search, (P)ropose, (P)lan, (I)mplement, and (T)est. A few ideas from the RePPIT framework, although I’d recommend reading the whole the whole article we wrote around the session (linked below): ⛳ Research the codebase: Before asking AI to implement anything, first ask it to understand the architecture, file layout, dependencies, design decisions, and existing patterns. This keeps the model grounded in the actual codebase. ⛳ Propose solutions: Instead of jumping straight into code, ask the model to generate a couple of different implementation paths with tradeoffs, validation plans, and open questions. This is where you, as the developer, make the judgment call. ⛳ Plan the chosen solution: Once you pick a direction, turn it into a proper design doc. This helps define what’s in scope, what’s out of scope, what files need to change, and how the feature should be tested. ⛳ Implement the plan: Only after the research, proposal, and planning steps should the model start writing code. At this point, it has enough context to avoid guessing its way through the implementation. ⛳ Test what got built: Don’t let the same model instance blindly approve its own work. Use a fresh context or a different model to review, test, and critique the implementation before you trust it. I think a lot of this boils down to strong context engineering. It was also super useful to walk through a concrete example, which you can see in the article. Article: https://lnkd.in/gG9uF6kC Mihail also runs an incredibly cool course at Stanford as well as on Maven. You can find links to both below!

  • View profile for Sebastian Rosch

    CTO at awork // We’re hiring (.NET or Angular)

    2,090 followers

    AI works much better with full context. That has real consequences for how we build software. We recently moved our backend, frontend, and service config into one monorepo. Not just for developer convenience, but because we want AI coding tools to be useful for real end-to-end work. Before that, a single feature was often spread across multiple places: backend logic, frontend changes, service config, and sometimes infrastructure too. AI could help with parts of the task, but rarely with the whole thing. Without the full picture, you get partial solutions, broken assumptions, and more manual stitching by engineers. Now, around 95% of the code needed for a feature lives in one codebase. That changes a lot. AI can work across boundaries more reliably, follow patterns more consistently, and generate output that is much closer to ready for review. One of my biggest learnings from AI-first software engineering so far: better AI output is not just about the tool. It’s also about the environment around it: codebase structure, shared conventions, clear ownership, and discoverable patterns. If we want AI to produce better output, we need to give it better context. How are you adapting your engineering setup for AI-first development? #ai #softwareengineering #monorepo #developerexperience #futureofwork

  • View profile for Agnius Bartninkas

    CEO @ Herexis | Operational Excellence, Automation and AI | Power Platform Solution Architect | Microsoft MVP | Speaker | Author of PADFramework

    12,592 followers

    Inline comments are there to explain the WHY, not the HOW. Regardless of whether they're inside actual code, or in a low-code solution like RPA, comments are there to explain certain scenarios that may not be clear just by reading the source code itself. Their purpose is to make it easier for support/maintenance staff to understand certain decisions the developer made while building the solution, when changes need to be made at a later stage. The HOW part of the whole thing should be readable from code itself, which requires certain practices as well - proper naming of variables, classes, functions, etc. In RPA this means naming flows, subflows, UI elements, variables and sometimes even actions (if possible) in a way that makes it easy to understand. Inline comments come into play when certain practices are applied that are not really easy to understand based on what's visible in the code itself. This might be things like: 📌 Using image recognition / OCR / keystrokes and similar less-preferable approaches when DOM object interactions don't work 📌 Adding static wait times instead of dynamic "wait for {event}" actions when the event cannot be captured 📌 Handling specific nuances of the target application, such as temporary errors that can be ignored or certain windows closing / losing focus 📌 Using scripting in some unconventional way to work around funky issues with the target application 📌 Etc. It is supposed to be considered as part of the solution documentation. The best documentation for code is code itself that is readable and easy to understand. Inline comments add the explanations for unconventional methods that are not readable and easy to understand from the code itself. Like in the screenshot below, where we need to press a button that has already been pressed before in the same subflow, so that we bring back the window that it normally opens to front after it has been pushed to back by another button. It might seem unnecessary, as the window is supposed to be already open. Someone might think this step could be removed if they ever get to do maintenance of this solution. They could think that this slows the flow down and as such it should be deleted to optimize it. But doing so would break the flow. In similar cases, people could question the use of image recognition to press a button, or using keystrokes to populate a text field. It may seem inefficient and unstable, considering that using DOM object selectors is supposed to be more reliable. But for legacy apps that don't allow that or simply have their UIs built in ways that make DOM objects inaccessible to RPA tools, this could potentially lead to wasting time trying to rebuild a working solution in an attempt to make it "better". Inline comments are thus there to compliment the code that should already be readable, with explanations that are not obvious enough. But they should never be used to repeat what's already supposed to be obvious from reading the code itself.

  • View profile for Alina Liburkina

    Software Craftress | Tech Lead | Technical Trainer | I Help Teams Turn AI-Generated Code into Maintainable Software

    7,283 followers

    Your codebase is the prompt. Most teams focus on writing better prompts for AI. But AI coding tools don’t just read your instructions. They read your code. They learn from the patterns already there. If your codebase is full of shortcuts, inconsistencies, and workarounds AI will reproduce them. The result looks consistent. But it becomes harder to change over time. This is why Clean Code matters more now, not less. Not because humans are writing every line. But because your codebase is what you’re actually prompting with. If you want AI to generate clean code, you first need to make your standards explicit. They should be clear enough that a human understands them and an AI can work with them too.

  • View profile for Avi Chawla

    Co-founder DailyDoseofDS | IIT Varanasi | ex-AI Engineer MastercardAI | Newsletter (150k+)

    175,231 followers

    Anthropic's latest guide is goldmine for AI engineers: (it's about context engineering) A poor LLM can possibly work with an appropriate context, but a SOTA LLM can never make up for an incomplete context. That is why production-grade LLM apps don’t just need instructions but rather structure, which is the full ecosystem of context that defines their reasoning, memory, and decision loops. And all advanced agent architectures now treat context as a multi-dimensional design layer, not a line in a prompt. Here’s the mental model to use when you think about the types of contexts for Agents: 1) Instructions → This defines the who, why, and how: → Who’s the agent? (PM, researcher, coding assistant) → Why is it acting? (goal, motivation, outcome) → How should it behave? (steps, tone, format, constraints) 2) Examples: This shows what good and bad look like: → This includes behavioral demos, structured examples, or even anti-patterns. → Models learn patterns much better than plain rules 3) Knowledge: This is where you feed it domain knowledge. → From business processes and APIs to data models and workflows → This bridges the gap between text prediction and decision-making 4) Memory: You want your Agent to remember what it did in the past. This layer gives it continuity across sessions. → Short-term: current reasoning steps, chat history → Long-term: facts, company knowledge, user preferences 5) Tools: This layer extends the Agent's power beyond language and takes real-world action. → Each tool has parameters, inputs, and examples. → The design here decides how well your agent uses external APIs. 6) Tool Results → This layer feeds the tool's results back to the model to enable self-correction, adaptation, and dynamic decision-making. These are the exact six layers that help you build fully context-aware Agents. 👉 Over to you: Have I missed any context layer in this? ____ Find me → Avi Chawla Every day, I share tutorials and insights on DS, ML, LLMs, and RAGs.

  • View profile for Cole Medin

    Technology Leader and Entrepreneur | AI Educator & Content Creator | Founder of Dynamous AI

    11,197 followers

    After 2,000+ hours using Claude Code across real production codebases, I can tell you the thing that separates reliable from unreliable isn't the model, the prompt, or even the task complexity. It's context management. About 80% of the coding agent failures I see trace back to poor context - either too much noise, the wrong information loaded at the wrong time, or context that's drifted from the actual state of the codebase. Even with a 1M token window, Chroma's research shows that performance degrades as context grows. More tokens is not always better. I built the WISC framework (inspired by Anthropic's research) to handle this systematically. Four strategy areas: W - Write (externalize your agent's memory) - Git log as long-term memory with standardized commit messages - Plan in one session, implement in a fresh one - Progress files and handoffs for cross-session state I - Isolate (keep your main context clean) - Subagents for research (90.2% improvement per Anthropic's data) - Scout pattern to preview docs before committing them to main context S - Select (just in time, not just in case) - Global rules (always loaded) - On-demand context for specific code areas - Skills with progressive disclosure - Prime commands for live codebase exploration C - Compress (only when you have to) - Handoffs for custom session summaries - /compact with targeted summarization instructions These work on any codebase. Not just greenfield side projects! I've applied this on enterprise codebases spanning multiple repositories, and the reliability improvement is consistent. I also just published a YouTube video going over the WISC framework in a lot more detail. Very value packed! Check it out here: https://lnkd.in/ggxxepik

  • View profile for Adam Tornhill

    Founder at CodeScene, author Your Code as a Crime Scene

    7,763 followers

    There's a common belief in our industry that technical debt sneaks into a codebase over time, often blamed on external pressure like deadlines, staff turnover, context switches, manager decisions, etc. But is that really what happens? Some of the worst code I've ever reviewed contained thousands of lines of code with God Functions, way too many responsibilities, painful code duplication, implicit dependencies which make every change brittle, excess conditional logic in a shape that's capable of melting your brain faster than a GPU without heatsink -- you name it. How did we get there? Most likely, the code was bad from the start and its future evolution merely dug that hole deeper. The evidence? A fascinating study investigated 200 open source projects for code smells, and then backtracked each of those code problems to identify the commit that introduced the root cause. The surprising conclusion is that such problems are introduced already upon the creation of those classes! 💡 If code problems are present from the start, then our practices and tools need to take that fact into account. However, existing code may of course also turn bad with a single commit. When that happens, the affected code exhibits specific trends that differ from how clean code evolves. (You see an example in the graph). ✅ Collaborate early -- don't wait for a review where it's "too expensive" to reject the complete implementation. ✅ Use strong quality gates for any new code. Automate. ✅ Track evolutionary trends in code health. Act on any signs of trouble. By applying these principles, we prevent technical debt instead of managing its consequences.

  • View profile for John Crickett

    Helping software engineers become better software engineers by building projects. With or without AI.

    215,174 followers

    "Clean" code leads to horrible performance! Many programming "best practices" taught today are performance disasters waiting to happen. That’s according to a video and blog post by Casey Muratori a couple of years ago. He manages to be both right and wrong at the same time. In the video he demonstrates that the “clean” code example he’s taken from a text book is much slower than his code that ignores the clean code rules. If you’ve been around programming as long as he, or I have, that won’t surprise you. The abstractions that are promoted by clean code have a cost, no matter how hard the designers of programming languages and compilers work to minimise the cost. So yes, clean code is going to be slower in terms of raw computational performance. Where he’s wrong is thinking that computational performance always matters. For many software systems the CPU is largely idle. The system is sat waiting for something to happen so it can respond. That’s true whether its the accounting software your bookkeeper uses or the Amazon website, even though the Amazon website no doubt has a lot of traffic. Both are going to be IO bound not CPU bound. For many of these systems, it’s better to optimise for readable, maintainable code than performance. CPU time is cheaper than software engineer time or the cost of errors. If that’s what your team does and clean code helps you deliver quickly, then go with clean code. At the same time, please be careful not to overdo the “clean” code dogma which can make the code just as hard to follow. Focus on making it simple, clear and readable for your team. If you’re writing software for games, high-frequency trading or anything else where performance matters, where there is value in shaving nanoseconds off an operation, then the cost of developer time is often much less that the cost of not hitting a performance goal, so it makes sense to optimise for performance! The trouble with the whole clean code versus performance debate is that they’re two extremes and most of us work somewhere on the spectrum between them. So don’t blindly follow advice to write clean code and don’t blindly follow advice not to. Work out what you need to optimise for in your context and optimise for it! Note that the context includes the skillset and experience of your software engineers too.

Explore categories