all blog posts

Rubber Duck Debugging

Talk to the Duck

When confronted with a problem, don’t ask the person next to you for help right away, he’s probably doing something important as well!

Instead, first tell the duck about it - out loud. If you don’t get to a solution, start explaining your problem in more and more detail until it hits you. If the mere explanation led to a solution, you avoid unwillingly turning your colleague into a CardboardProgrammer.

27 Feb 2019
debugging

Create a new blog post

This is something for me (or anyone else really) because I keep forgetting all this stuff.

  • Use {: .hide-from-excerpt} to do just that.
  • img size must be 360x300. bigimg is 1400x262.
  • A
  • Pragmatic Tips
25 Feb 2019
meta

Array.prototype for .NET developers

The Array.prototype functions have been available for a long time but it’s since Arrow functions that “Linq lambda syntax”-like functionality is available in JavaScript.

This blog post explains the most common functions by comparing them to their C# equivalents.

A basic example:

// JavaScript
const result = [0, 1, 2, 3, null]
    .filter(x => x !== null)
    .map(x => x * 10)
    .sort((a, b) => b - a);

expect(result).toEqual([30, 20, 10, 0]);

// C#
var result = new int?[] {0, 1, 2, 3, null}
    .Where(x => x != null)
    .Select(x => x * 10)
    .OrderByDescending(x => x)
    .ToArray();
24 Feb 2019
cheat-sheet tutorial

Debugging in Visual Studio

Basic Shortcuts

F5 : Start debugging
Control + F5 : Start without debugging
Shift + F5 : Stop debugging
Control + Shift + F5 : Stop, rebuild and start debugging
Control + Alt + P : Attach to process


Control + Alt + Break : Break (Debug > Break All)
F10 : Step over
F11 : Step into
Shift + F11 : Step out
Control + F10 : Run to cursor
Control + Shift + F10 : Set next statement
Alt + Num * : See current statement


24 Feb 2019
tutorial cheat-sheet debugging

Angular Pipes

Pipes: Chainable, declarative display-value transformations to use in your Html.

This post covers:

  • All Builtin Angular pipes (json, async, string, array, i18n)
  • How to install different locales (currency, decimal, date, percent)
  • How to generate, implement and test your custom pipes
  • Some examples of custom pipes (ngx-pipes and angular-pipes)

An example:

<!-- This does exactly what you'd think -->
{{ value | uppercase }}
20 Feb 2019
angular cheat-sheet tutorial

Git Assume Unchanged

Ideally one would create a new gitignored file to configure an application to fit his local development environment but when you do have to revert to modifying a committed configuration file, at least there is “git assume unchanged” to avoid committing your changes in these files accidentally.

Assume Unchanged

# Git assume a file
git update-index --assume-unchanged fileName

# And unassume with
git update-index --no-assume-unchanged fileName
18 Feb 2019
git

Autohotkey DynaRun

Run any Autohotkey script on the web with a single.. Autohotkey hotkey.

17 Feb 2019
autohotkey

Autohotkey Use Case: Submitting a Form

A simple Autohotkey use case you can start using in your application right away:
Filling in an entire form with predefined values.

31 Jan 2019
autohotkey