Development

11 posts tagged with Development

Decompiling dotnet apps

Sometimes as developers we run into a legacy application that has been running in production for years when suddenly a bug surfaces. If nobody knows where the source code for that legacy application is, that can be a huge problem.

Introduction to .NET Decompilation

Decompilation is the process of converting compiled .NET assemblies (DLLs or EXEs) back into readable source code. This can be incredibly useful when:

  • Dealing with legacy applications without source code
  • Debugging production issues where deployed code differs from source control
  • Understanding third-party libraries when documentation is insufficient
  • Investigating potential security issues or malware

Using dotPeek

dotPeek by JetBrains is a powerful free .NET decompiler that can help solve these problems. I recently had an occasion to use it, and even without the .pdb file, it was able to decompile the code to be very close to the source code we had in source control that we knew wasn’t what was running in production.

Code Quality Gates: Automated Standards Enforcement

Code quality gates serve as automated checkpoints that prevent substandard code from progressing through your development pipeline. When implemented effectively, they maintain consistent standards across teams while accelerating development by catching issues early and reducing manual review overhead.

Understanding Quality Gates

Quality gates are automated checks that evaluate code against predefined criteria before allowing it to proceed to the next stage of development. Unlike simple linting, quality gates encompass comprehensive analysis including code coverage, complexity metrics, security vulnerabilities, and architectural compliance.

Test-Driven Development in TypeScript: Beyond the Basics

Test-Driven Development (TDD) has evolved significantly with modern TypeScript tooling and frameworks. While most developers understand the basic red-green-refactor cycle, mastering TDD in TypeScript requires understanding advanced patterns, effective mocking strategies, and leveraging the type system for better test design.

Beyond Basic TDD: Advanced Patterns

Type-Driven Test Design

TypeScript’s type system provides unique opportunities to improve test design. Instead of just testing implementation details, we can use types to guide our test structure and ensure comprehensive coverage: