Skip to main content

Posts

Showing posts from May, 2020

Create custom keyboard shortcuts in Mac using Automator

Having been a windows user for the most part of my life - switching to a mac had its own sets of challenges, especially when it was going to be my go-to machine in terms of work and leisure. While I'm still getting used to the Mac environment, one thing that I miss, is the ability to create simple text files anywhere by right-clicking and selecting a menu option or a keyboard shortcut. Mac Automator to the rescue. Mac Automator lets you automate repetitive tasks by simply dragging built-in actions and creating a workflow to achieve a task. It also lets you define your own custom actions using AppleScripts. Firstly open the Automator  app in your mac and select File > New . Next, select the type of your document as Quick Action . Change the Workflow receives to - no input in Finder. Leave the rest of the options as it is. The top section should look like this    Next, add a javascript, in order to find the current location i

Unit Test Assertions on steroids - with Fluent Assertions

Unit testing has long been a key part of the software development life cycle, ensuring good quality of product and faster time to market. Adding them to our DevOps pipeline enables us to run unit tests in a consistent manner, based on a specified trigger. This allows us to detect errors in our code, early on in the process and prevents breaking of existing functionality in the future. All this sounds great, but imagine few months or years down the line, when some of the unit tests fail - will we be able to accurately assess the reason for the failure, and do so in a short period of time, so as to avoid any delays to our project release schedule. It's important to have clear and precise failure messages to help debug and fix the issues faster. The assert failure messages that most of the frameworks like NUnit or XUnit generate, are not easy to understand and might take developers a while to decode. Below is one such example. Expected : 12 But was : 11 A developer re