28 Jan 2020
I have started to cross-post to the Dev Community website as well as on my solrevdev blog. A previous post about Timers in .NET received an interesting reply from Katie Nelson who asked about what do do with Cancellation Tokens. TimerCallBack The System.Threading.Timer class has been in the original .NET Framework almost from the very beginning and the TimerCallback delegate has a method signature that does not handle CancellationTokens nativly. Trial and error So, I...
28 Jan 2020
Today I came across a fantastic command line trick. Normally when I want to create a directory in the command line it takes multiple commands to start working in that directory. For example: mkdir tempy cd tempy Well, that can be shortened to a one-liner! mkdir tempy && cd $_ 🤯 This is why I love software development. It does not matter how long you have been doing it you are always learning something new!...
27 Jan 2020
A current C# project of mine required a timer where every couple of seconds a method would fire and a potentially fairly long-running process would run. With .NET we have a few built-in options for timers: System.Web.UI.Timer Available in the .NET Framework 4.8 which performs asynchronous or synchronous Web page postbacks at a defined interval and was used back in the older WebForms days. System.Windows.Forms.Timer This timer is optimized for use in Windows Forms applications...
23 Jan 2020
Another quick one today.
I was recently listening to an episode of syntax.fm where wes bos was talking about a new site uses.tech.
This is a site that lists /uses pages detailing developer setups, gear, software and configs.
This inspired me to create my own /uses page.
22 Jan 2020
A quick one today. Sometimes I will click on a link in an external application such as Mail.app (I am careful where these links come from of course!) and nothing will happen. Well, Google Chrome will launch if it was closed when I clicked the link however the URL I clicked will not open. Nothing, no new tab. nothing. The fix before was to re-install Google Chrome but today I found this quick solution. In...