Patrick McVeety-Mill:

Loud & Abrasive

Posts on development, software, and technology including tips, troubleshooting, and "nobody-asked-you" commentary.

  • Debugging Shortcuts in Visual Studio 2017

    How do you debug your application in Visual Studio? Is it something like:


    Or maybe, if you’re hep, you


    Debug ➡ Attach to Process… ➡ Dialog…

    so can develop and re-build with the app still running, and debug only when you want to.

    Or maybe you use the mouse; I won’t give you a hard time.

    I will, however, tell all of you that if you have Visual Studio 2017, you’re working more slowly than you could be.

    Read On
  • Xamarin Realm Query Disposal Gotcha

    using More Than You’d Think

    Recently I’ve been getting my feet wet with mobile app development using Xamarin. It’s been a change of pace from the usual web fare, but it’s also familiar enough to not be afraid of.

    One notable difference from the concerns on the web is the importance of your app’s size on a phone, as well as how much processing and memory it uses. You don’t want to be the battery drainer! To both alleviate our in-memory load and more easily manage our app’s data stores, we are using Realm. Setting up Realm is straightforward, in part thanks to their nice set-up guide. Working with it, however, led to something unexpected.

    Read On
  • Flagrant Error: Function Syntax In PowerShell

    The modarn developer can easily find themselves knee-deep in several programming languages. Between javascript and the server language of your choice for the web, the various options for mobile platforming, or the many hats of the academic, chances are if you’re making for computers you’re some degree of a polyglot.

    Despite the challenges of context-changing between languages, most of them (particularly of the object-oriented variety) are similar enough in appearance and general methodologies. And yet sometimes this familiarity betrays us. Below is a simplified scenario roughly akin to the pickle I recently found myself in, wherein I was calling a PowerShell function from an external module: Disclaimer: I don’t know PowerShell

    Read On
  • Checked="checked" in Razor

    I often see the following Razor-enhanced form markup for writing out input checkboxes, particularly in loops where a given checkbox may be checked or unchecked based on some state in the Model. In the completely real scenario below, I have a form on a webpage where I select fruits for a smoothie:

    @foreach(var fruit in Model.AllFruits)
        var id = "SelectedFruits_" + fruit.Id;
        if (Model.SelectedFruits.Contains(fruit.Id))
            <input id="@id" name="SelectedFruits" type="checkbox" value="@fruit.Id" checked="checked" />
            <input id="@id" name="SelectedFruits" type="checkbox" value="@fruit.Id" />
    Read On