Search Sreeni's Insights

Filter by content type
Tag

#coding-practices

32 articles tagged with #coding-practices

crafting February 6, 2018 4 min read

How to unit test Entity Framework Core?

Unit test code that uses Entity Framework Core with test doubles for DbContext and DbSet, so the tests stay fast and focused on the system under test.

#coding-practices #dotnet #entity-framework-core
Read
crafting December 5, 2017 8 min read

Secure coding basics - OWASP Top 10 (2017) for .NET developers

OWASP Top 10 2017 risks are translated into practical .NET safeguards for injection, authentication, access control, XSS, deserialization, dependencies and logging.

#coding-practices #dotnet #software-quality
Read
crafting October 3, 2017 8 min read

Resilient HTTP calls with Polly - retry, timeout and circuit breaker

Polly 5.x adds retry, timeout and circuit breaker policies around HTTP calls, with guidance on composition, transient failures, idempotency and safe handling of writes.

#coding-practices #dotnet #software-quality
Read
crafting September 5, 2017 8 min read

Structured logging with Serilog - why plain text logs are not enough

Structured logging with Serilog replaces ambiguous text with searchable properties, consistent message templates, correlation context and safer ASP.NET Core operations.

#coding-practices #dotnet #software-quality
Read
crafting May 2, 2017 7 min read

How to test ASP.NET Core Web API with in-memory TestServer?

This guide tests an ASP.NET Core Web API with an in-memory TestServer, covering host setup, HTTP requests, dependency boundaries and fast feedback without a deployed service.

#coding-practices #dotnet #software-quality
Read
crafting April 4, 2017 7 min read

Integration tests vs unit tests - where to draw the line

Unit and integration tests serve different boundaries, feedback loops and maintenance costs, with practical guidance for choosing test types and organising a .NET solution.

#coding-practices #dotnet #software-quality
Read
crafting March 7, 2017 8 min read

Remove dead code - why and how to find it safely

Dead code increases cognitive load and deployment risk, so this guide explains how to find candidates, confirm they are unused and remove them safely with history as a backup.

#coding-practices #dotnet #software-quality
Read
crafting February 7, 2017 8 min read

Avoid sequential coupling and circular dependencies - with examples

Sequential coupling and circular dependencies create hidden constraints, so constructor injection, builders, interfaces and events make code easier to test, change and evolve.

#coding-practices #dotnet #software-quality
Read
crafting December 13, 2016 6 min read

TypeScript for C# developers - Part 1

TypeScript for C# developers introduces types, interfaces, classes, enums, lambdas, null checks, compilation and familiar concepts from C# development for practical guidance.

#typescript #csharp #coding-practices
Read
crafting November 15, 2016 7 min read

Static code analysis with StyleCop, FxCop and ReSharper

Static code analysis explained through StyleCop, FxCop, ReSharper, rule sets, IDE checks, local builds, CI integration and gradual warning reduction.

#static-analysis #coding-practices #stylecop
Read
crafting October 18, 2016 6 min read

Git branching strategies - Git Flow vs GitHub Flow

Git Flow and GitHub Flow compared through branch roles, pull requests, release stabilisation, hotfixes, continuous delivery and team selection criteria.

#git #coding-practices #git-flow
Read
crafting September 20, 2016 7 min read

Semantic versioning for NuGet packages and APIs

Semantic versioning explained through major, minor and patch changes, pre-release labels, package compatibility, API versions and communication with consumers for practical guidance.

#semantic-versioning #nuget #coding-practices
Read
crafting August 23, 2016 6 min read

Feature toggles - shipping unfinished code safely

Feature toggles explained through release control, toggle types, configuration, rollout, cleanup and practices for shipping unfinished code without accumulating debt.

#feature-toggles #coding-practices #release-management
Read
crafting July 26, 2016 7 min read

Logging best practices - what to log, what not to log

Logging best practices explained through operational value, useful fields, sensitive data, correlation, structured logging, retention and practical logging pipelines for practical guidance.

#logging #coding-practices #dotnet
Read
crafting July 5, 2016 6 min read

How to write maintainable LINQ and Entity Framework queries?

Maintainable LINQ and Entity Framework queries explained through in-memory filtering, N+1 queries, projection, tracking and practices for readable query code.

#linq #entity-framework #coding-practices
Read
crafting March 15, 2016 7 min read

Defensive coding - guard clauses and null checks without the noise

Defensive coding explained through guard clauses, boundary validation, specific exceptions, null checks, empty collections and clearer .NET application logic for practical guidance.

#defensive-coding #guard-clauses #coding-practices
Read
crafting February 23, 2016 7 min read

Test Driven Development (TDD) - is it worth it for our team

Test-Driven Development evaluated through its design benefits, upfront costs, defect feedback, suitable code areas and a gradual adoption approach for teams.

#tdd #test-driven-development #coding-practices
Read
crafting February 2, 2016 7 min read

What is a Test Double - stub vs mock vs fake

Test doubles explained through dummy, stub, spy, mock and fake objects, with practical examples showing when stubs, mocks and fakes are appropriate.

#test-doubles #mocking #unit-testing
Read
crafting January 12, 2016 7 min read

Unit Test Best Practices - FIRST properties

FIRST properties explained through fast, independent, repeatable, self-validating and timely unit tests, with practical guidance for keeping a test suite healthy.

#unit-testing #first #testing
Read
crafting July 21, 2015 7 min read

Async and await in C# - common mistakes

Async and await explained for web applications, including I/O-bound work, async void, blocking calls, deadlocks, ConfigureAwait, fake async, and sequential awaits.

#async-await #csharp #dotnet
Read
crafting June 9, 2015 7 min read

How to do TDD (Test-Driven Development)?

Test-Driven Development explained through the Red-Green-Refactor cycle and a step-by-step fund-universe example built with tests first for practical development and design.

#tdd #test-driven-development #coding-practices
Read
crafting May 26, 2015 6 min read

What is technical debt and how to manage it?

Technical debt explained through its causes, principal, compound interest, visibility, prioritisation, repayment practices, and engineering habits that prevent new debt.

#technical-debt #coding-practices #code-quality
Read
crafting May 12, 2015 6 min read

What is engineering practices and why do we need them?

Engineering practices explained as shared disciplines for building, testing, delivering, and operating software with consistent quality, faster feedback, and safer releases.

#engineering-practices #coding-practices #software-engineering
Read
crafting April 28, 2015 7 min read

Exception handling best practices in .NET

Exception handling practices for .NET, ASP.NET MVC, and Web API covering swallowed exceptions, stack traces, specific catches, and global error handling.

#exception-handling #dotnet #aspnet
Read
crafting April 14, 2015 6 min read

Code review checklist for .NET teams

A practical .NET code review checklist covering design, readability, correctness, errors, security, performance, testing, operations, and constructive review comments and discussion.

#code-review #dotnet #coding-practices
Read
crafting March 31, 2015 7 min read

How to write unit tests with NUnit and Moq?

Unit testing with NUnit and Moq explained through FIRST properties, the AAA pattern, test doubles, test cases, exceptions, and verification of interactions.

#unit-testing #nunit #moq
Read
crafting March 17, 2015 6 min read

What is a God object and how to break it?

God objects explained through their warning signs, causes, and a step-by-step refactoring approach using characterization tests, extraction, interfaces, and dependency injection.

#god-object #refactoring #coding-practices
Read
crafting March 3, 2015 6 min read

Why we must not use magic numbers and hard-coding?

Magic numbers and hard-coded values explained with their maintenance and security risks, plus practical replacements using constants, enums, configuration, and read-only values.

#magic-numbers #hard-coding #coding-practices
Read
crafting February 17, 2015 7 min read

How to use Dependency Injection with an IoC container in ASP.NET MVC?

Dependency Injection and IoC containers explained through Unity and Autofac setup in ASP.NET MVC 5, including object lifetimes and practical container wiring.

#dependency-injection #ioc #aspnet-mvc
Read
crafting February 3, 2015 6 min read

SOLID Principles - Part 2

The remaining SOLID principles, Liskov Substitution, Interface Segregation and Dependency Inversion, explained with practical examples from a fund domain and practical guidance.

#solid #lsp #isp
Read
crafting January 20, 2015 7 min read

SOLID Principles - Part 1

The first two SOLID principles, Single Responsibility and Open/Closed, explained with fund report and fee calculation examples in C#, plus when not to apply them.

#solid #srp #ocp
Read
crafting January 6, 2015 6 min read

Why we need Clean Code?

Why clean code matters, what makes code clean (meaningful names, small functions, guard clauses, comments that explain why) and how to bring the practice into your team.

#clean-code #coding-practices #csharp
Read

Browse Other Tags

#abstraction #aggregates #ai #ai-assisted-development #aks #algorithms #angular #angular-2 #angularjs #api #api-design #api-documentation #api-gateway #api-management #api-testing #api-versioning #apis #apm #app-service #application-insights #application-monitoring #architecture #architecture-decision-records #arm-templates #asp-net-mvc #aspnet #aspnet-core #aspnet-mvc #async-await #asynchronous #authentication #authorization #automation #azure #azure-app-service #azure-blob-storage #azure-cdn #azure-devops #azure-front-door #azure-functions #azure-key-vault #azure-monitor #azure-redis-cache #azure-resource-manager #azure-search #azure-service-bus #azure-sql #azure-web-app #azure-web-apps #backup #beginners #best-practices #binary #bounded-context #branching #branching-strategy #build-automation #burnout #business-case #caching #career #case-study #cdn #ci-cd #classification #clean-code #cloud #cloud-architecture #cloud-how-to #cloud-migration #cloud-native #cloud-readiness #cloud-security #cloud-solution-architecture #cloud-strategy #cloud-value #cloudflare #cloudflare-workers #code-quality #code-review #coding-practices #communication #compilers #composition #comprehension-debt #computational-thinking #computer-architecture #computer-basics #concurrency #configuration #container-service #containers #context-debt #continuous-integration #contract-testing #conventions #conway-law #cosmos-db #cqrs #csharp #data-access #data-architecture #data-representation #data-structures #datacenter-exit #ddd #defensive-coding #dependencies #dependency-injection #deployment #deployment-slots #design #design-patterns #design-principles #devops #dip #disaster-recovery #distributed-systems #distributed-transactions #dns #docker #docker-compose #documentation-debt #documentdb #domain-driven-design #domain-model #dotcover #dotnet #edge-computing #ef-core #encapsulation #engineering #engineering-practice #engineering-practices #enterprise-architecture #enterprise-integration #entity-framework #entity-framework-core #error-handling #event-driven #event-driven-architecture #event-grid #event-sourcing #events #eventual-consistency #exception-handling #failover #feature-toggles #feedback #finops #first #framework #frontend #frontend-architecture #future-state-architecture #fxcop #git #git-flow #github-flow #god-object #governance #growth #guard-clauses #guardrails #guidelines #hard-coding #helm #high-availability #hosting #http #iaas #idempotency #identity #information-hiding #infrastructure-as-code #inheritance #integration #ioc #isp #java #javascript #json-schema #jwt #key-vault #knowledge-management #kubernetes #language-generations #layered-architecture #leadership #least-privilege #lift-and-shift #linq #logging #logic-apps #lsp #magic-numbers #maintainability #maintainable-code #managed-service-identity #message-queues #messaging #metrics #microservices #migration #mocking #model-dependency-debt #modeling #monitoring #monolith #moq #multi-region #mvc-4 #n-tier #network-security-groups #networking #new-relic #nodejs #nosql #nuget #nunit #oauth #oauth-2 #object-modeling #object-oriented-thinking #object-relationships #observability #ocp #onion-architecture #oop #openid-connect #operating-systems #owin #paas #packages #pact #performance #pipelines #planning #polyglot-persistence #polymorphism #postman #powershell #problem-solving #process #productivity #programming-fundamentals #programming-languages #programming-paradigms #prompt-debt #prompt-engineering #pseudocode #pull-requests #react #real-world-modeling #real-world-problems #redis #refactoring #rehosting #release-management #repository-pattern #resharper #resilience #resiliency #rest #rest-api #rest-assured #retries #rpo #rto #saga #scalability #search #secrets #secure-coding #security #semantic-versioning #sentry #seq #serilog #serverless #service-bus #service-design #service-fabric #skill-debt #sla #software-architecture #software-basics #software-design #software-engineering #software-quality #solid #spa #sre #srp #ssl #static-analysis #storage #strangler-pattern #structured-logging #stylecop #substitutability #swagger #swashbuckle #system-design #tdd #tech-radar #technical-debt #technology-governance #terraform #test-doubles #test-driven-development #testing #thinking-like-a-programmer #traffic-manager #triggers #tutorial #twelve-factor #typescript #uml #understanding-computers-and-programming #unit-of-work #unit-testing #verification-debt #version-control #versioning #visual-studio #visual-studio-online #vsts #web-api #web-architecture #web-development #workflow