With this article i will be exploring a newer C# language feature called discards. Discards are represented with the underscore character. As implied by the name, discards basically tell the reader of your code (and the compiler) that you will not utilize the result. Consider the following code as our first example: So again the
Generally most Vue.js developers don’t define an explicitly declared element id. It is not required by the Vue.js specification and most default linters do not include a friendly element id requirement. If you don’t declare an element id, then Vue.js will generate one for you, using a fairly unfriendly syntax, and this auto generated value
One bit of background, in C# there are actually two different Tuple classes. This post is referring to the System.ValueTuple class which is mutable (changeable). There is also a System.Tuple class which is immutable (read only). See the references link if you are interested in additional details. Sometimes with C# methods you may set up
If you’re familiar with the git source control tool, you have probably come across the .gitignore file. This file allows specified files, usually created as part of the build process to be ignored (untracked) by git. There is actually an additional way to exclude files, the git info exclude, which I’ll be covering in this
A guard clause is a coding approach for pulling out validation and edge case checks scattered throughout a method and putting them at the start of the method (to validate input parameters) and / or at the end of a method (to validate output after the main processing has taken place in a method). My
I recently came across a situation where I had several SQL Server databases that needed to be moved to down level (ie older) version of sql server. In doing so I was looking for a solution that was out of the box and could be done using only sql server express, without the use of
A good resource for those doing Vue.js development is the Vue CLI development tools. This is installed as an npm package and provides Vue.js project scaffolding and other tools. There is also a web ui for this tool, which we’ll be taking a look at. One of the advantages of the Vue cli tool is
This post covers some useful tips for debugging JavaScript in Chrome. Tip1 – Output objects in console.log The console.log statement is used inside of source code, usually as part of development to help debug a section of code such as console.log(‘hit this point’); or console.log(‘my variable is ‘ + x); One useful trick when working
In working with the Vue.js JavaScript framework, one of the first topics you learn is conditional display – displaying or hiding an element. Two ways to do this are the v-if directive and the v-show directive. Here is an example of the v-if directive: It’s pretty straight forward, the statement inside the quotes needs to
I came across a pair of interesting language features in the newer JavaScript standards based on the three dot notation (…). This syntax is supported in Chrome, Edge, Firefox and most newer browsers. When you see three dots in the context of a Javascript function parameter that is known as a Rest Parameter. For example: