UnitTesting T-SQL stored procs made easy
A while back I was tasked with making a complicated stored procedure that would run somewhere between two applications that were themselves in active development and not stable or live yet. It wasn’t feasible to have a human tester test just the stored procedure. In stead, it would be very nice to be able to UnitTest my T-SQL code, but how?
tags: T-sql
21 April 2020
Styling external iframe content
When implementing staticman comments for this blog I ran into the issue that the blog has a dark and a light mode that you can switch between (the switch in the upper right) but the ReCaptcha can’t dynamically switch between the dark and light themes it has. And since the ReCaptcha is an iframe from another domain, you can’t apply CSS or JavaScript as one normally would. So now what, pick a theme and give up?
2 April 2020
A better way to do dynamic OrderBy() in C#
A common feature in various applications is to sort some collection by one of it’s properties, dependent on some input like the column clicked by the user. An implementation might take a string
or enum
for the column plus a bool
or enum
for ascending vs. descending.
27 March 2020
User-editable points in Highcharts
A customer wanted data displayed in a chart and be able to edit a single point. It seemed to me the best UX would be to have a button in Highchart’s Tooltip with which to edit the value. Searching for a solution I found more people asking for this feature but not really an answer I could work with.
tags: Front-end - Javascript
22 March 2020
Sitecore path in SQL Query
When trouble-shooting Sitecore issues, sometimes you wanna dive directly into the SQL Database and query around in dbo.Items
. But you might want to query an item’s Sitecore-path, like in the where
clause. This recursive common table expression makes that very easy:
tags: Sitecore - T-sql - Back-end