Make Your Apps Talk

Want to add speech to any of your apps running in Windows? It’s pretty easy using the SpeechSynthesizer in the .NET Framework.

You can see this code in action in my Visual Studio backup or cleaner apps. I use text to speach to notifiy the user what the app is up to without having to watch the appliction. Makes it easier to know if there were any errors and when the app is finished.

In the Speak method below, just pass in the text you want the synthesizer to speak and this method will cancel anything currently being spoken and start speaking what ever you send in.

Imports System.Threading.Tasks
Namespace Speech
    ''' <summary>
    ''' Synthesis helper methods.
    ''' summary>
    Public Module Synthesis
        ''' <summary>
        ''' _speech
        ''' summary>
        Private ReadOnly _speech As New 
        ''' <summary>
        ''' Speaks the specified text to speak.
        ''' summary>
        ''' <param name="textToSpeak">The text to speak.param>
        Public Sub Speak(ByVal textToSpeak As String)
            If _speech.GetInstalledVoices.Count > 0 Then
            End If
        End Sub
    End Module

If you want speech to be async then you can use the SpeakAsync method below. This will speak any series of text sent into it, in order.

''' <summary>
''' Speaks the text asynchronously.
''' summary>
''' <param name="text">The text to speak.param>
Public Async Sub SpeakAsync(ByVal text As String)
    If String.IsNullOrWhiteSpace(text) Then
        Exit Sub
    End If
    Await Speech.SpeakAsync(text)
End Sub

This code and more can be found in the dotNetTips.Utility open source project on GitHub.

dotNetDave Rocks The San Diego .NET User Group (2016.2)

The dotNetDave Rock The World Tour 2016 will end this year at the San Diego .NET User Group on December 6th at 6pm. I hope you will join me for the session below.

Rock Your Development With A Real World Example

This session will demonstrate concepts in the first four parts of my series titled “Improving Code Quality… One Developer At A Time” with a real world app attendees will use during this session. This app that runs from the cloud (Azure) will show how I use proper architecture design along with coding standards, defensive programming by properly implementing OOP, logging of events and exceptions, code obfuscation, unit testing, strong naming and much more.  Even though code examples in this session are in .NET, the concepts can be applied to any language. This is part five in my series titled “Improving Code Quality… One Developer At A Time”.

Other Conference Sessions

You can view all of my other conference sessions on-demand by going here.

Interviewee => Recruiter Tip #8: Learn How To Create Calendar Invites

I don’t know about you, but if something is not on my calendar, there is a very good chance it won’t happen. I’ve been learning this time around that most recruiters do not know how to make calendar events for their candidates. If a recruiter sets up a call with the candidate or a phone/ in-person interview, then I think they should send a calendar invite so it’s on their and the candidates calendar. If there is a conflict with the day or time the candidate can simply request a better time (through Outlook at least).

Calendar invites for an interview, it should include these items:

  • Address of the company including a map link to the exact building.
  • Names of all the interviewers and links to their LinkedIn profile.
  • Link to the company website including any specific reading the candidate should do.
  • Detailed description of the interview process (programming tests, written or online tests etc.)
  • Any other important information the candidate should know before going to the interview.

As I say in all of my Rock Your Technical Interview conference sessions, if your recruiter does not do this “find another one”.

If you have any suggestions on this tip, please make a comment below.

MVP Summit 2016 – My Issues For The Teams

This year will be the 10th year I have gone to Microsoft to attend the annual MVP Summit. This is the one conference I look forward to all year. My favorite part of the summit is to interact directly with the difference teams at the Microsoft campus because they really do listen to us… well most of the time. For example, there are features in Visual Studio that came from me.

So, every year I bring to the teams what we like and what we’d like to see changed. For the last two years, I even had meetings with the Office team, but I’m giving up on that this year. I have a lot to discuss with the following teams.

Azure Team

I have a brand new conference talk titled “Rock Your Development With A Real World Example” that is all about how I properly architected an app in Azure. From that experience, mostly frustrating, came the following.


  1. Does not stay alive unless switched to Azure Standard Plan or above.
    1. If not, it will just disappear when Azure determines when it’s not in use.
      1. No log message on why/ when it disappears.
  2. token.IsCancellationRequested never seems to gets set to true when job shuts down.
  3. It’s 2016, we need better error messages than this!
    1. Job failed due to exit code -2146232576
  4. Need to support latest .NET Framework they day they are released, not 6+ months later!
  5. Some documentation is non-existent!
  6. No support to trap unhandled exceptions like you can in all the other application frameworks. Since WebJobs are really console apps, this very important event needs to be added.

I’d also like to see the Azure MVP monthly credit to roll over to the next month if not used. This way I won’t have to worry about leaving VM’s running when not in use.

Azure Mobile App

I really wanted to use Azure Mobile App service3 in my solution, but couldn’t due to the flowing.

  1. No tooling for clients.
  2. Does not fully support OData.
  3. Not ready for prime time.

Entity Framework Team

When it’s up to me, Entity Framework is the only database access framework I use in .NET. I’ve never looked back since it came out in 2008. Here are some of the issues I found or features I’d like.

  • EF7 or EF Core is not ready for prime time. Maybe should stay in pre-release until it is.
  • Create menu items in VS extension to create/ push migrations
  • Would be nice to get db path from LocalDB!
  • Obsolete ITableData since it does not properly implement the Id field (is a string and should be a GUID).
    • EF does not seem to support this interface anyway, but it should… well a better interface.


For this project I decided that I would use WebForms in ASP.NET. Sure, not sexy, but works great and is fast to get going. Here are my comments.

  • ASP.NET Core not ready for prime time.
  • Reporting Services report does not work with EF6.

Visual Studio Team

Here are just some of the issues/ features I’d like the Visual Studio team to consider.

  1. Make it easy to remove unused references/ NuGet packages.
  2. Visual Studio needs to gen code that passes their own tools like StyleCop and Analyze!
  3. VS running on Azure VM’s need to get a lot faster! Sometimes it can take 15 minutes for VS to fully bring up a project. Seems to happen only with the first solution that is started after the VM boots.
  4. EntityDataSource control needs to support EF projections
  5. Visual Studio Analyze/ StyleCop needs to ignore folders like Migrations
  6. Need true workflow in Visual Studio that actually works
  7. Visual Studio Analyze needs to recognize Code Contracts

If you have anything you would like for me to discuss with the teams above, please make a comment below before November 7th. I encourage Microsoft teams to make comments too.


December 14th, 2016

Before going to Microsoft, I tweeted the heck out of this blog post… to Microsoft. While I was at Microsoft, I spoke to people there about this post and even sent it via email to many people on the .NET teams.

It’s been over a month since I’ve was at Microsoft and unfortunately I have not heard from anyone at Microsoft about any of these issues. I will keep bugging them.

Silicon Valley Code Camp – 2016

I attended the 11th anniversary of the Silicon Valley Code Camp this year on October 1st and 2nd in San Jose California. When I speak around the country and get into a discussion about community driven conferences like Code Camp’s, I encourage whomever I am talking to that they should attend this Code Camp just once, since it’s the largest in America (maybe the world) and is my favorite one.


Craig Berntson & David McCarter

It’s my favorite because it’s the most diverse conference I’ve ever been too, most likely due to being held in the Silicon Valley area. Even though Code Camps were started by .NET developers and always have been free, all have morphed to include all languages and technologies. This year the top sessions were the topics AngularJS, Architecture, Azure Cloud, Java, JavaScript, .NET and NodeJS. Sunday includes a kid’s day to bring out the inner programmer. If you are every free the first part of October, then you need to attend this code camp. Even though I live over 400 miles away, I’ve never missed this conference since 2011.

In recent years, the Silicon Valley Code Camp averages 2,500 attendees per day (larger than most paid conferences) and has 200 volunteers to help run it. These volunteers are very important because they help with everything from checking in attendees, serving lunch, helping out the speakers and much more. Also very important are the sponsors since they are the ones who fund this code camp that includes paying for the food, paying for rooms at the venue.

Of course the speakers are most important since most share their knowledge out of the kindness of their heart.  There are some speakers from large companies like Microsoft, but the vast majority of the speakers are developers just like you and I. For me, these are the best speakers since they live in the same world as the attendees. They speak on topics that they are passionate about and you should be too.

Lastly, hats off to the team that puts on the Silicon Valley Code Camp! These hand full of people, lead by Peter Kellner, work part time most of the year to pull this conference off. They are all volunteers too! Watching this conference work every year is pretty amazing. I always remember the first year I attended in 2011 where at lunch time there were pizza boxes stacked higher than me (I’m over 6ft tall)! This year, they served pizza on Saturday and burritos on Sunday. The speaker/ volunteer dinner after sessions on Saturday featured BBQ that I always look forward to after a day of speaking and attending sessions.


Peter Kellner

Unfortunately, attendance and sponsorship were noticeably down this year for some reason. With technology growth and change moving faster and faster every year, I’m not sure why there wasn’t more attendees this year than last. This year there were over 150 sessions over the two days… for FREE! All you have to do is pay for travel if you live outside of the area.


To the sponsors, all I can say is that large community driven conferences are the best place to get the word out about your product. If you’ve sponsored a community driven event before and didn’t feel it was worth it then you might be doing it wrong. I have, in the past, given advice to companies about how to drive developers to their booth and it always worked… I guess because I’m a geek. My favorite story was when I told one sponsor to give out Twinkies at their booth. They went out and purchased an entire pallet of them. Their booth always had more geeks around it compared to the other sponsors.

If you’ve never attended the Silicon Valley Code Camp, then start making your plans now for next year. I will be there for sure.