Chronic stress has very bad consequences on our physical and mental health.
Many things can be a source of stress: the impostor syndrome, the technologies changing at a fast pace, deadlines, the expectations from your colleagues or from yourself
Month: June 2019
Find, Fix, and Avoid Performance Problems in C# .NET: 10 Best Practices
Micro-optimization, or worrying about performance during development can be a waste of time. Most likely the improvement you make won’t be in the critical path, will be negligible, or worst of all increase the complexity and readability of your code for a minimal advantage.
Cryptography in .NET
This article by Gérald Barré goes over the information security composition provided by .NET and sample C# snippets to explain the concept.
Don't worry if it doesn't work right
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.”
— Mosher’s Law of Software Engineering
George Washington Bridge, Fort Lee

There is nothing momentous about in this photo; I hence decided to convert it into a black & white render. Converting to monochrome create a distinct look to the picture, far away from all distractions caused by colors, with the emphasis just on the composition.
Debugging Javascript Like a Pro
The Dev Tools are an incredible resource for debugging complex code. Sometimes you may dig deeper than console logging, and the tools above will allow for an in-depth debugging experience. These tools require a little practice before you’ll be fully comfortable using them, so don’t be put down if you’re feeling unfamiliar with all the options available.
Marking Required Fields in Forms
Using an asterisk to mark required fields is an easy way to improve the usability of your forms. Only marking optional fields makes it difficult for people to fill out the form.
Warming Stripes for GLOBE from 1850-2018
I love the simple abstraction of annual average globe temperatures data in the form of strips. The strip image is generated based on data from the UK Met Office for the year 1850-2018.

30 Seconds of CSS
A curated collection of useful CSS snippets you can understand in 30 seconds or less.
DistroTest - Explore 200+ Linux Distros Without Installation

Explore, experience, and find the best fit from 200+ Linux distributions without installing on your machine.
Things I Learnt The Hard Way
Julio Biason:
This is a cynical, clinical collection of things I learnt in 30 years working with software development. Again, some things are really cynical, others are long observations on different jobs.
The Rise and Fall of Visual Basic
Visual Basic has been threatened before. But this time feels different. It seems like the sun is finally setting on one of the world’s most popular programming languages. Even if it’s true, Visual Basic won’t disappear for decades. Instead, it will become another legacy product, an overlooked tool without a passion or a future.
30 best practices for software development and testing
Michael Foord:
These software engineering rules and testing best practices might help save you time and headaches.
hub · the command-line wrapper for git
hub is an extension to command-line git that helps you do everyday GitHub tasks without ever leaving the terminal.
Relearn CSS layout
If you find yourself wrestling with CSS layout, it’s likely you’re making decisions for browsers they should be making themselves. Through a series of simple, composable layouts, Every Layout will teach you how to better harness the built-in algorithms that power browsers and CSS.
Red Mill, Clinton

It’s a good practice to go through years’ old photos now and then, review the collection again with the current mindset, and post-process a photo or two from the pile. As experience expands with the time and number of clicks, the definition of a killer photo also evolves. You will be surprised to see an entirely different photo rendered every time compared to what you had in your mind when you pressed the shutter release button.
Why the Pomodoro Technique Is Failing You
Tonya Dalton:
While the theory behind the Pomodoro Technique is solid – giving yourself focused, intentional blocks of time to dive into important work is extremely powerful – the problem is that the times are way too short. Research proves it takes an average of 23 minutes to get into our deep work zone where we are doing our best work. With the Pomodoro Technique, you interrupt yourself with a break just as you’re getting into that deep work zone.
cheat.sh - community driven cheat sheets
Want to access community-driven repositories of cheat sheets with the shell command? cheat.sh is the tool you are looking for. Fire up your terminal, and run curl cht.sh
to start exploring cheat sheets maintain by various development communities. The command will provide a concise and comprehensive response to your queries instead of dumping multiple search results at you.

cheat.sh usage is pretty straight forward. Follow the query format:
$ curl cht.sh/{language}/{your query}
For example, if you want to refer cheat sheet of posting a JSON
request in Go, command to query the cht.sh will be:
$ curl cht.sh/go/post-json

And similarly, for C#, command will be:
$ curl cht.sh/csharp/post-json

ASP.NET Core 2.2 - JWT Authentication Tutorial with Example API
This tutorial introduces the reader to the JWT (JSON Web Token) authentication in an ASP.NET Core 2.2 API through creating a simple example application.
Show / Hide hidden items in File Explorer with a single shortcut Key
There is, unfortunately, no shortcut key available to toggle between showing and hiding files or folder in the File Explorer. Hence this AutoHotKey script. You can toggle the view in File Explorer to show or hide with the just a Win+h
shortcut key.
This script is not that fancy, it just toggles between two different values of the specific registry key and will send F5
keystroke to refresh the view in File Explorer.
|
|
If you don’t prefer the above script, you can still toggle hidden items with the combination of multiple keystrokes in File Explorer. The key combination is Alt+v hh
.
Better Cheese Grater Mac Pro 2019
Customize object displays in the Visual Studio debugger YOUR way
Leslie Richardson on not so commonly used attribute DebuggerDisplay
:
By writing
DebuggerDisplay
syntax at the top of a class, you can choose what strings and properties you want at the top of each object node in debugger windows. Besides displaying strings in debugger windows, adding curly brackets ({}) to theDebuggerDisplay
attribute allows Visual Studio to display the value of a property or method that you specify.
I attempt to create a small console application below to follow the usage of DebuggerDisplay
.
|
|


You can also use nq
(no quote) specifier if you don’t prefer to see quotes in debug values.
|
|

You can further extend DebuggerDisplay
if you want to include an expression in debug values. Just add a private method or property in the target class, and provide that method or property to DebuggerDisplay
.
|
|

A visual guide to Go Memory Allocator from scratch (Golang)
Ankur Anand has written an in-depth blog post to explain how memory management work in Go.
… the general idea of the Go memory management is to allocate memory using different memory structures using different cache level memory for objects of different sizes. Splitting a single block of consecutive addresses received from the operating system, into a multi-level cache improve the efficiency of memory allocation by reducing the locks and then allocating memory allocations according to the specified size reduces memory fragmentation and facilitates faster GC after the memory is released.
GoReplay
GoReplay is an open-source tool for capturing and replaying live HTTP traffic into a test environment in order to continuously test your system with real data. It can be used to increase confidence in code deployments, configuration changes and infrastructure changes. https://goreplay.org
HTTP Prompt
HTTP Prompt is an interactive command-line HTTP client featuring autocomplete and syntax highlighting.

Colors in UI Design — Theory, Psychology & Practice
You can set a mood with colors, draw attention, or make a statement. To energize or cool down, you can use color. You can create an atmosphere of elegance, warmth or tranquility by choosing the right color scheme, or you can convey an image of playful youthfulness.
Otter Cliffs - Sunrise

This photo is my failed attempt to capture water splash using high shutter speed. Taking a splash water photography always requires a lot of trial and error as you need to sync your shutter click with the exact moment of the splash. The great thing about the digital camera is that you can take thousands of photos at the location and later review and delete all of them except your star photo.
Pixlr X - Free Image Editing Online

Pixlr X is an excellent tool when you don’t want to download and install software on your machine and want full-featured photo editor to make few tweaks to your photos. You also don’t need to register or login to use Pixlr X to work on the editor. Give it a try!
Ultrawide vs. Dual Monitors: Which is the Best Overall Setup?
In the world of monitors, there are two kinds of people. Those who prefer ultrawide monitors and those who prefer to use a dual monitor set up.
There is no dispute; dual monitors are best for productivity.
At least one Vim trick you might not know
This article is about some of the little tricks that I use in Vim. None of them are deep dives, and I encourage you to learn more about whatever’s interesting.
Paste rich text as clean text
This little AutoHotKey snippet will make copying rich text and pasting as clean text a bit less hassle:
|
|
The assigned shortcut key is Ctrl+Shift+V
, which you can change per your preference. Copy any rich text from a web site, open word document or new email in Outlook and press Ctrl+Shift+V
. AutoHotKey snippet will remove all style formattings and will paste just the clean text.
Should array length be stored into a local variable in C#?
Is there any impact in execution performance because of using array.Length
directly as for
exit condition? Which one of following methods will excute faster?
|
|
Dmitry Yudakov concludes through digging into the IL code generated by JIT compiler for both methods:
… both methods will compile into the exact same code, but the first one is written faster, even though there isn’t any benefit in terms of execution time.
Awesome Scalability
An organized reading list for illustrating the patterns behind scalable, reliable, and performant large-scale systems. Concepts are explained in the articles of prominent engineers and credible references. Case studies are taken from battle-tested systems that serve millions to billions of users.
Learn git concepts, not commands
An excellent article by Nico Riedmann on the concept behind GIT. Do check out his GIT repository git_training as well, which has an interactive git training on how GIT works.
Serializing a PascalCase Newtonsoft.Json JObject to camelCase
Andrew Lock on some of the quirks of using JObject, in particular the way it doesn’t honour the contract resolver settings used to serialize a given object graph, and three different ways to work around the behavior: set the global serializations settings, store the JObject using camelCase property names, or convert from a PascalCase JObject to a camelCase JObject. For the final option, a provided an extension method and unit tests to demonstrate the behavior.
On Heaps
Heaps are a simple data structure that are really good at storing data where the only thing you care about is the element with highest priority.
Dr. Alan Kay on the Meaning of “Object-Oriented Programming”
In this email exchange, Alan Kay, the person who invented the term Object-Oriented, outlined the original intent behind the term Object:
OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things. It can be done in Smalltalk and in LISP. There are possibly other systems in which this is possible, but I’m not aware of them.
Learn Git Branching

Interested in learning Git? Learn Git Branching is the most visual and interactive way to learn Git on the web; you’ll be challenged with exciting levels, given step-by-step demonstrations of powerful features, and maybe even have a bit of fun along the way.
Hadlock Falls, Acadia

Keeping exposure timing less than a half second has another benefit other than tack sharp leaves and branches. If someone inadvertently walks into your long exposure waterfall framing, you take that opportunity and include that person into your photo with less probability of that person will blur out.
I was so happy to take this shot. The person in the photo counterbalances the waterfall in the overall structure of the composition. This balance shifts the attention away from the waterfall as the main subject adds another dimension to the composition, which will be otherwise a predictable and bland photo.
User Authentication and Identity with Angular, Asp.Net Core and IdentityServer
This article implements the Implicit Grant OAuth flow and utilize these identity and authorization protocols by implementing IdentityServer4 as our OpenID Connect Provider and then using it to authenticate our Angular SPA client to authorize access to an independent ASP.NET Core Web API.
Uibot - Infinite UI designs
By Janne Aukia
Uibot is an experiment on how far one could automate the generation of visual designs, what kinds of advantages it would lead to and what issues one would face.
CSS Grid Generator
This online tool generates a basic CSS Grid code to make dynamic layouts.

Provide your grid configuration and hit Please may I have some code button and voila! You will have your CSS style ready to be copied.
.parent {
display: grid;
grid-template-columns: 50px 1fr 3fr 1fr 50px;
grid-template-rows: 75px 1fr 75px;
grid-column-gap: 0px;
grid-row-gap: 0px;
.div1 { grid-area: 1 / 1 / 2 / 6; }
.div2 { grid-area: 2 / 1 / 3 / 2; }
.div3 { grid-area: 2 / 2 / 3 / 3; }
.div4 { grid-area: 2 / 3 / 3 / 4; }
.div5 { grid-area: 3 / 2 / 4 / 5; }
.div6 { grid-area: 3 / 5 / 4 / 6; }
}
Stackbit - Get off Medium and onto the JAMstack
Get off Medium and onto the JAMstack. Migrate from a proprietary service to an open stack - own your content and control how its displayed, shared & monetized.
What one programmer can do in one month
“What one programmer can do in one month, two programmers can do in two months.”
— Fred Brooks
JavaScript Clean Code - Best Practices
Milos Protic:
… the clean code can be defined as the code written in such a manner that is self-explanatory, easy to understand by humans and easy to change or extend.