The Brain Dump

My brain poured out on paper (or so to speak)

Posts
  • The Brain Dump

    Visual Studio Tip #9: You can edit directly in the Diff tool

    • 0 Comments
    Here is one I just discovered just last week by accident. When you are doing a diff on a file to compare what has changed from the source control, the diff window can be used to edit the file directly. (works on both Git and TFS source control) I always...
  • The Brain Dump

    Visual Studio Tip #8: Adding existing files with Show All Files

    • 1 Comments
    Sometimes instead of adding a new file to your project, you need to reuse an existing file. That might be code, but often it is some sort of content like a bitmap or an xml document. I’ve seen new users copy that item into their project directory...
  • The Brain Dump

    Visual Studio Tip #7: Whole line editing

    • 5 Comments
    OK here is a quick simple one. How do I move or edit entire lines of code? #1 Just don’t select anything. If you don’t have anything selected in your code window then the commands for copy, cut and paste work as if the entire line of...
  • The Brain Dump

    Visual Studio Tip #6: Turn on those line numbers (with Quick Launch)

    • 0 Comments
    Writing code is very often a collaborative process and to discuss something you need to be able to refer to it. The simplest way to refer to a line of code is “look at line #26.” For some reason though, line numbers are not on by default....
  • The Brain Dump

    Visual Studio Tip #5: Quickly adding a namespace “using” statement

    • 0 Comments
    One thing that slows down new C# users is the requirement to add “using” statements to the top of your file. This is because they just want to declare a variable and use it but aren't necessarily familiar enough with the classes and namespaces...
  • The Brain Dump

    Visual Studio Tip #4: Code Snippets

    • 0 Comments
    There is lots of code that we write that follow standard patterns with some minor changes for our exact situation. Visual Studio has a nice feature called Code Snippets which provides a way to create reusable code templates for common scenarios. The idea...
  • The Brain Dump

    Visual Studio Tip #3: Use “Navigate To”

    • 0 Comments
    I spend a lot of time looking at other people’s code. That means a lot of time searching other people’s code. One of the main tools I use is not Search but “Navigate To”. It is found on the Edit menu or you can use the keyboard...
  • The Brain Dump

    Visual Studio Tip #2: Pin your data tips

    • 0 Comments
    Most people know that when you are debugging, you can hover the mouse over a variable in your code and the tool tip will provide you the current value. For example, if I hover over the “uri” variable below it shows me that it’s current...
  • The Brain Dump

    Back to basics: Visual Studio tips

    • 0 Comments
    Lately I’ve been working a lot with developers who are completely new to C# and/or Visual Studio. So I’ve been trying to gather some features and workflows which I’ve seen new users overlook which will make them a little more productive...
  • The Brain Dump

    Tasks and awaits and Rx! (And Drones!) Oh My!

    • 2 Comments
    A few people I work with are tinkering with an off-the-shelf drone in our spare time and so we are writing a C# library to control it. The way it works is you send UDP commands to the drone and you receive a stream of status & navigation UDP packets...
  • The Brain Dump

    async/await does not “release the thread”

    • 7 Comments
    There is some language around async/await that I am going to stop using. I’ve heard others use it as well because it does help get the point across but I believe it is ultimately misleading. Async/await does not “release the thread.”...
  • The Brain Dump

    Simple consoles and async

    • 0 Comments
    When presenting, I like to demonstrate simple concepts in console apps because they don’t have any other baggage around them. This is a problem with async code though because you cannot have an async Main method. Entry point methods cannot be marked async...
  • The Brain Dump

    Cancellable “awaiting” on .NET events continued

    • 3 Comments
    Compose, compose, compose. Reuse, reuse, reuse. In the last post on cancellable “awaiting” on .NET events , I was so busy focusing on the wrapping the click event in order to get a smooth async control flow for the caller, I neglected to do the same inside...
  • The Brain Dump

    Cancellable “awaiting” on .NET events

    • 0 Comments
    My last couple of posts have been inspired by await-ing things (see Lucian’s list ) which allow you to use Tasks and the new C# async features to write synchronous looking expressive code around things that are not based on threads. There was one bit...
  • The Brain Dump

    Drag and Drop with Tasks & Async

    • 0 Comments
    Lucian has an excellent series on turning things into Tasks so that you can can be compose them and await them. The Drag and Drop one caught my eye because it is a similar example to the common Reactive Extension demo of the same thing. Drag and Drop...
  • The Brain Dump

    Tasks are not Threads

    • 2 Comments
    One of the common misconceptions I’ve encountered when developers first start using the Task Parallel Library is that they think Tasks are just fancy threads. This is easy to assume because in a common case, calling Task.Run(…), it actually does run the...
  • The Brain Dump

    Windows 8 ViewModel Property Code Snippet

    • 0 Comments
    Visual Studio provides a bunch of good code snippets for creating boilerplate code. For example if you type “prop” you get this in intellisense You’ll see a few nice property snippets. prop – creates a basic automatic...
  • The Brain Dump

    Windows Phone MessageBox implements scrolling!

    • 0 Comments
    Helpful quick and dirty debugging tip: I never noticed this before, but if you send a large amount of text to MessageBox.Show() on Windows Phone, it doesn’t just truncate it. It allows you to scroll through it all. Very cool. Very unlike the desktop message...
  • The Brain Dump

    Managing multiple web service calls with Rx

    • 0 Comments
    Lets say I have a phone app (or any app really) that needs to make several web service calls at once. For example, imagine the user multiselects three items on a page and then taps the “add favorite” button. I then need to make three calls to the “set...
  • The Brain Dump

    Give formatting its own line

    • 1 Comments
    I got bitten by this not once but twice on Sunday as I hurriedly worked on a new phone app. Can you spot the difference between the the following two lines? Uri uri = new Uri( string .Format( " /View/DataView.xaml?collection={0}&id={1} "...
  • The Brain Dump

    Using Rx? Subscribe to exceptions!

    • 0 Comments
    I have an app in the Windows Phone Marketplace which suddenly saw a spike in Little Watson email reports back to me last weekend. Each one looked like the last so I responded back to each user (always keep the user’s happy!) and went to investigate. The...
  • The Brain Dump

    Rx ensures Unsubscribe

    • 2 Comments
    I recently had an ObservableCollection which did not currently contain the item I was interested in, but it would sometime in the near future. The questions is how best to get notified that the item is available so I could access its full property set...
  • The Brain Dump

    Windows Phone travel tip – pin your map locations

    • 0 Comments
    Whenever I’m travelling I always have two freshly pinned tiles at the bottom of my start screen. Before I leave, I use my phone to look up the hotel I’m staying at and the location I’m visiting (like a customer’s address) and pin them both to the start...
  • The Brain Dump

    Populating Windows Phone view models with Rx

    • 0 Comments
    I’ve gotten rather fond of using the Reactive Extensions for populating my data from the web in my Windows Phone applications. They provide a lot of flexibility and the code stays in a readable form. To demonstrate in a traditional MVVM model, let’s drop...
  • The Brain Dump

    Type, don’t look!

    • 3 Comments
    Just a quick tip for Windows Phone users regarding the onscreen keyboard. Most people I’ve talked to who complain about using an onscreen keyboard have a common issue. They are looking at what they type. This is their biggest mistake. When I first started...
Page 1 of 4 (83 items) 1234