Category Archives: Programming

PowerShell: solid password generator

I needed a PowerShell script to generate a random alpha-numeric string. Here were my goals: The randomness needs to be cryptographically strong. Having at least some characters of different types is not a concern here. Small-ish, readable code is a … Continue reading

Posted in PowerShell, Programming | 7 Comments

Sending Email with the Gmail API in .NET / C#

I’ve a .NET web application with several Google API integrations and wanted to send Gmail as well. It took me all day, and I found precious little (useful) documentation, so it seemed worth a blog post. At the start of … Continue reading

Posted in Programming, REST | 34 Comments

CodeRush Template for INotifyPropertyChanged

Updated 6/6/14: @MarkMiller found my tweet the referred to this blog post and kindly pointed out that I had reinvented the wheel. If your class implements INotifyPropertyChanged, you could use the standard “p(type)” expansion and it’ll put in the property … Continue reading

Posted in CodeRush, Programming | 2 Comments

Something anyone trying out NodeJS should know up front

TL;DR – scroll down till you see the heading you’re looking for. I really love JavaScript as a language, and there were lots of things about NodeJS that appealed to me. So when I had the opportunity to use NodeJS on … Continue reading

Posted in JavaScript, Programming | Leave a comment

Inventing Worlds

I know there are some things about Software Development I really like, while there are other parts that I really don’t like. I’ve often wondered, mostly as fleeting thoughts lost in the bustle of a work day, what causes the … Continue reading

Posted in General PC Usage, Programming | Leave a comment

Posting an AJAX JSON request with jQuery

After trying to Google this for the fifth time, and writing it from scratch for the seventh time, I’m sticking this snippet here. In AJAX apps, it’s always made sense to me to do JSON both ways, even though the … Continue reading

Posted in CodeMinder, JavaScript, JSON, Programming, REST | 1 Comment

Script to turn on "Treat Warnings as Errors"

This PowerShell script recursively finds all .csproj files in a directory and sets “Treat warnings as errors” to “All” for every one of them that doesn’t already have it set. I definitely prefer this compilation option, but on larger systems … Continue reading

Posted in PowerShell, Programming | Leave a comment

ASP.NET Selective Validation Hack

Scenario: using classic ASP.NET Web Forms, we have a data entry page. On the bottom of the page are two buttons: “Save Draft” and “Submit.” When a user Saves a Draft, we want to do some validation, but not all. … Continue reading

Posted in Programming | Leave a comment

VB.NET Logical Operators

Quick chart to clarify which VB.NET operators one should use always.* Never Use Instead, Always Use: IIf(x, y, z) If(x, y, z) And AndAlso Or OrElse   * Always means “pretty much always.” There may be some very rare, strange … Continue reading

Posted in Programming, VB | Leave a comment

Why is Estimating so Hard?

Uncle Bob suggested a small software estimation exercise in a recent blog post, Why is Estimating So Hard? My best-case, nominal, and worst-case estimates were x, 2x, and 4x, respectively. My actual time spent was 3.4x, and while the final … Continue reading

Posted in Estimating, Programming | 2 Comments