Change Network Type to Private in Windows 8.1 & Windows Server 2012 R2

This is one of the most annoying issues in Windows these days.  If you’re comfortable with PowerShell, changing the network type from “Public” to “Private” in Windows 8.1 and Windows Server 2012 R2 is relatively easy.

First, you will need to be an an elevated PowerShell session.  You can get there by right-clicking on the PowerShell icon, and selecting “Run as Administrator.”  However, if you are already in a non-elevated PowerShell session, you can spawn an elevated session using the following command:
Start-Process WindowsPowerShell.exe -verb RunAs
Next, we need to identify the network InterfaceIndex.  Let’s issue the command:
PSH> Get-NetConnectionProfile
Name : Unidentified network
InterfaceAlias : vEthernet (Local-10)
InterfaceIndex : 18
NetworkCategory : Public
IPv4Connectivity : LocalNetwork
IPv6Connectivity : LocalNetwork
In this example, the interface has an index of 18.  To elevate this specific network to Private…
Set-NetConnectionProfile -InterfaceIndex 18 -NetworkCategory Private
That’s about it.  I hope this helps someone.

Prevent Sublime from Opening Old Windows

Whenever I use my “Open with Sublime” context menu (shortcut menu) to open a folder with Sublime Text, it has this annoying habit of opening a previous window behind the new one. There’s an easy fix for this.  Edit your User Settings (Preferences > Settings > User) and add the following values:

  "hot_exit": false,
  "remember_open_files": false


This is a quick screenshot of the problem this fixes:

Sublime Opening Multiple Windows


Once these settings are in place, the only window to open will be the window you want.

On a related note, here is the script to open any folder or file using the shortcut menu in Windows with Sublime Text 3:

Open with Sublime v3.bat (zipped file)

Privacy Policy

In short, this site contains factual information, personal opinions, and humorous posts from the author, Fredrick Lackey (Fred Lackey) and are considered public to the world.  Any comments or items you submit on this site are also considered public to the world.  Your comments are subject to moderation and will appear at the sole discretion of the site owner which, of course, is also Fred.

From Microsoft to MEAN Stack

Here’s one for the ether…

CodeSmith Templates (Including MEAN Web Service)

I’ll stick this here for right now, however the link points to a fairly useful set of templates to allow .NET developers, like me, to quickly bootstrap a complete MEAN Stack API web service from an existing SQL Server database.  I regularly make updates and have been using them without issue for months.

Some features the templates provide:

  • Generates full Mongoose / MongoDB models from SQL Server
  • Index-based proxy operations … no index = no method
    • Helps protect against wasteful ad-hoc queries
  • Identity to UID conversion
    • Use int / bigint during dev & UID in production
  • DTO & data field name alternates to minimize wasted bytes
  • Audit trail support including row version and user reference
  • Non-destructive deletes … locked away instead of blown away
  • And, oh yeah, convert SQL Server to MEAN Stack and JavaScript!

Anyway, they’re just floating around out there currently.  Eventually I’ll throw up a walkthrough video somewhere.  In the meantime, if you find them, feel free to use them.


Easier Dates for Programming

The past few months have found me seriously investigating open source technologies for development… more specifically, the MEAN Stack (MongoDB, ExpressJS, AngularJS, and NodeJS). I started on this path to find better front end technologies however, the more that I did, I am finding countless techniques to improve the dev experience in the Windows and .NET world as well. One prime example of this is the use of UNIX Dates.

All of us have been challenged with dates at one point or another. Whether we’re having to escape characters for a RESTful query or query string, or maybe trying to save space by switching from DateTime to Date in our SQL database, or even just parsing dates from a file, they can be a pain… or, at least, increase the hoops we have to jump through. In my opinion, UNIX Dates solve many of these issues… even in .NET and Windows.

Basically, a UNIX Date is an integer representation of the number of seconds between now and January 1, 1970 (notice I said “seconds” and not “milliseconds”). And, yes, this means using an integer will make them not as precise as a DateTime (using a decimal will take care of the milliseconds) and they won’t span the entire range of available values as a DateTime will within SQL Server. However, for most of today’s LOB apps, these integers cover a good 99% of what we commonly need.

From a space perspective, they have an immediate benefit within SQL Server: they provide precision and yet, when using an integer, take up half of the space compared to a DateTime value (4 bytes vs 8 bytes). For audit columns alone, this chops a load off of each table… especially those annoying association tables where the audit columns might constitute most of the space consumed.

The biggest benefit of UNIX Date stamps, in my opinion, is when it comes down to handling them. Math becomes a breeze since you’re calculating one numeric versus another. Formatting and parsing is simple compared to a date string… the value is either a valid number or it’s not. And, of course, any time you’re working on a cross-platform app, like something in AngularJS or NodeJS, libraries like MomentJS handle them as a first-class date object.

So, for me, even in SQL Server, unless I need ultra-precision, I’m gonna start using the UNIX Date format when storing dates. If I need something cosmetic, for a report or UI, I can easily parse it on a view or computed field.

Hey, Mr. DJ!

During the last few years of the 80’s I worked as a DJ.  That slice of my life was one big ego trip… being under age and working along adults, watching me control hundreds of club rats with every move of a fader, having someone in a new city recognize my voice from the radio.  I loved every second of it.  Unfortunately, as with many childhood and teenage hobbies, life decided they would be put on hold… indefinitely.  It’s now 27 years later (yes, “twenty seven”) and I’m starting to get the itch again.  Granted, there’s a 99.9% probability that it’ll all be for fun.  Still, why not?

So much has changed in the nearly-three decades that I’ve been out of it.  It’s almost impossible to find an instrumental or A capella track to mix with.  More genres exist that muddy the waters for actually finding music.  Every hack out there (which, I guess would include me right now) has access to the record pools where, back in the 80’s, I remember being proud when I was finally granted access to them.  Oh, and the biggest change of all is that virtually everyone has switched to digital formats with software replicating everything that was difficult to learn back when I was starting.

For me, as confusing as this is going to sound, the most challenging area is the actual music.  I remember countless moments where I’d hear something… a down-tempo song, a phrase, or even a jingle from a television commercial… and I’d instantly have various mixes pop into my head.  Some where comical.  Most because of a natural transition between two tracks.  They key is that there was no actually thought involved.  I was having fun.  I knew the music.  It all just kinda flowed.  Sadly, that’s not happening anymore.

There’s another change that I’m not sure how to describe.  I’m actually finding it challenging to understand some of today’s genres.  Several of them seem to blur.  Various record pools classify tracks in different genres than other pools.  Tracks with upbeat tempos show up in more relaxed or traditionally down-tempo genres.  Back in the ’87, I never gave the genre of a track a thought.  In fact, I don’t even recalling hearing the word “genre” until sometime in the mid-90’s.  Back then, I was just playing what I liked and what I heard.  It was a trip mixing songs together that had absolutely no business with another.  For example, I remember mixing a cardboard 45 (the small records for you kids out there) of a McDonald’s promo song with the instrumentals from artists like Tone Loc and Debie Deb.  And, although JJ Fad was “rap,” Salt-N-Pepa was “hip-hop,” and Jody Watley’s albums were on “R&B” charts, it was effortless to mix all and keep the party moving… all without ever having to worry about a single genre.

Wow.  I’m venting quite a bit here.  Not good.

Hmm… these are some fairly critical / fundamental issues to have.  Kinda pathetic actually.

On a more positive note, because of where I am in life, everything else is fairly easy.  Clearly, funds are not an issue at this stage in life, so I can afford good quality gear (starting out on a Pioneer DDJ-SZ with Serato DJ).  Because of the years spent working with audio, running sound, and playing in ProTools, the gear and software are incredibly simple to understand and work with.  And, thanks to the internet, Facebook, and folks like Johnathan Lewis (aka “Ellaskins” or “the DJ Tutor”), there is no shortage of instructional material and brainstorming forums.

So, where to begin?  I guess the correct answer is “everywhere.”  The challenges with the tracks and genres are from spending the past 27 years working in an office and basically losing touch with what’s out there.  The skills needed to run a controller are COMPLETELY different than using sampling keyboards, turntables, and tapes.  So, pretty much everything is gonna come down to actually doing it… continuously listening to what’s out there (and what’s COMING out) combined with hours each day of just playing and making mistakes.”

I guess that’s enough rambling for now.  If anyone finds this post, I’d happily welcome any advice or wisdom you’d care to impart.  Time to go practice and enjoy… after work, of course.  =/

Edit (October 2nd @ 11:44 AM)
Small correction to my rant.  The skills aren’t “completely” different.  That wasn’t the right choice of words.  I guess more accurately was HOW I am using the gear is different.  Back then I was mixing 90% of the time and dropping in an occasional sample.  Highly complex mixes where edited offline and then played back.  I guess what I’m trying to do now is more live and more complex in general… probably because of what I have at my disposal compared to back then.


Geek Love: PlayOn & PlayLater

This is THE tool that allowed me to remove cable TV and not miss it at all.  I absolutely love it.

Time-Sensitive Note:
At the time of this writing, PlayOn & PlayLater are being sold as a bundle for 50% of their normal price.  And, they have a 30-day money back guarantee.  With the 50% promo, the price of buying both products with a lifetime license is less than the cost of one month’s cable bill.  I would grab yourself copies ASAP before the promo ends.

Their ads say it best… watch cable TV shows without paying for cable… legally!  From a functionality perspective, that is exactly what PlayOn does.  However, what their ads do not tell you is how great the product and people actually are.  I love the combination of a well-designed application coupled with a dedicated team who are willing to bend over backwards to assist.  That combination… that polish… is the reason I am growing to love PlayOn and why I proudly purchased a lifetime license for all of their products.

First, there are two undocumented features I love most about their products…

Idiot-Proof Software
Maybe not the most politically correct term to use, but their software really is “idiot proof.”  I am confident that anyone with a 3rd grade education can install and use their software without ever reading a manual.  All of the complex logic is buried within the software and is hidden from the user.

As of December, I’ve been writing software professionally for 31+ years.  Along the way I’ve had to find very creative ways to pull in content from places where, admittedly, nobody ever expected the content to come from.  As an expert in this area, I can tell you that these processes are incredibly complex and, quite often, a moving target.  Most applications importing content only do so from one or two sources.  And most of those products have a polished SDK or API to assist them.  Once you start doing what the team at PlayOn are doing the challenge and complexity increases tenfold.  Every source requires a whole new way of thinking and adds load of complexity.  Well, the folks at PlayOn have successfully done this almost 100 times just for these products alone!  The beauty is that they have neatly hidden this complex problem-solving logic behind the scenes so the user never has to think about it.

Basically, the company offers two products…

PlayOn :
A small service that you install on a Windows PC.  It runs in the background and allows you to magically watch movies and cable TV shows in the rest of your home OR on your mobile device while you’re traveling.  Just install it, reboot your computer, turn on your TV, and start watching… even if you do not have cable.

PlayLater :
In short, PlayLater is a DVR for PlayOn.  Simply open it up, browse the channels and shows you are interested in, and click record.  PlayLater will pull down the movie or TV show and convert them for offline viewing.  If you’d like you can automatically import them into iTunes (or burn them to DVD, move them to a hard drive somewhere, etc., etc., etc.).

When I initially purchased PlayOn & PlayLater, my goal was to supplement the HD antenna I had recently installed.  After paying for satellite and cable for decades, I decided to cut the cord.  I installed an array of antennas to pull in HD channels along with dedicated Windows Media Center PCs, network tuners, and NAS for strong videos.  My family and I then convinced ourselves that we did not need the cable stations (National Geographic, History Channel, A&E, etc.).  Unfortunately, after hundreds of dollars and a week of work, we could not receive ABC.  And, although we could receive most of their content via Hulu, there were two shows that my family and I would miss.  My purchase of PlayOn & PlayLater was solely for us to receive the two shows from ABC that we did not want to do without.  However, since purchasing PlayOn & PlayLater we have not touched the antenna array or equipment even once.  It really is that good.

Since PlayOn & PlayLater were not meant to be primary services for us, not much money or time was invested in them.  In fact, they were basically installed on a laptop to play with them and never removed.  Both products require so little resources that there wasn’t any reason to move them to a high-powered computer.

The quality of the picture has also been great.  Our primary viewing area is a 120″ screen with a DLP projector.  Powering the projector is an AV receiver and an old Sony BDP-S790 blu ray player that we’ve had forever (again, not a lot of time or expense was put into PlayOn as it wasn’t meant to be the center of our entertainment).  Even at 120″ the picture quality is near perfect on everything we have watched.  (Note: It works with almost every device on the planet… every current game console, Smart TVs, mobile devices, Roku, etc., etc., etc.).

Speaking of perfection, let us talk about their support team…

Remember how I said how creative a software developer must be to pull in or acquire content from unusual and unexpected places?  And, remember how I mentioned that each source presents new challenges?  Keep this in mind for a second.  In short, every single time that a publisher or TV station tweaks their site, the team at PlayOn must adapt to the change.  They could work for days or weeks comparing every tiny detail of their notes or source code to determine what exact tweak from the publisher was responsible for breaking things.  Again, keep this in mind.  It will make sense in a moment.

A handful of episodes, from one specific TV show, from one specific station was giving me problems for a two days.  It happens to be a show that I love and I happen to be anal enough to want every episode downloaded (using PlayLater of course).  I spent two days clicking buttons, comparing content, tinkering with settings, and trying to understand why these few episodes were being such a pain.  For me, what made this tolerable is their team working with me every step of the way… even at 2 AM.

As a side note, there’s also something parents should take note of… built-in parental controls at the click of a button.

There’s not much more to say.  The product speaks for itself… HD quality cable TV, great features, powerful capabilities, incredibly easy to setup, and an outstanding support team.  In short, PlayOn and PlayLater make it easy to finally cut the cord and ditch your cable and satellite provider… without even needing an antenna.

Watch Internet Videos on your TV with PlayOn. 30 Day Money Back Guarantee.

Geek Love: ServiceStack

We all remember that feeling of our first crush.  We made excuses to be around whoever they are.  We smiled just thinking about them.  And, we found ourselves hopelessly drawn to them like an addiction.  As corny as it sounds, that is exactly how ServiceStack makes me feel.

As a software developer, my claim to fame for the past three decades has always been creating error-free applications that simply work.  Along the way, I have preached certain philosophies to my teams that they both hated and loved me for.  If you ever threw an exception you would find a cardboard box sitting at your desk, with a screenshot of the exception affixed to the side, which you would use to fill with your crap as you promptly exited the team.  However, if you did stick around, you learned to write code in a way that would ensure fellow developers could work effortlessly… almost instinctually… with the modules you created during your tenure.  In short, our codebases worked almost flawlessly and were both intelligent and elegant to a point where fellow developers could ramp up quickly and trust your contribution would actually empower their efforts instead of simply altering them.  In turn, our resulting products were highly polished and worked precisely as they were designed.  This is the same philosophy the folks at ServiceStack seem to be following.

A few days ago I threw in the towel while fighting with Visual Studio’s WSDL / WCF / proxy nonsense.  Although I never ship with the generated proxy, it is supposed to be helpful during the prototyping stages of an app.  Without going into a ton of detail, I wasted hours of time trying to convince Visual Studio to reuse the types, from an existing assembly, rather than generate its own.  While I did eventually get it to work, I was very nervous of the code since I never changed anything around; just removed and re-added references several times until the IDE succumbed.  It was at this point where I reached out to Google for a quick look at what new alternatives had been created recently.

The first place my search took me to was a Pluralsight course titled, “10 Ways to Build Web Services in .NET,” by Chad McCallum.  I watched bits and pieces from each of the 10 examples and, above all, was reminded just how dismal the web service support in Visual Studio actually is.  Not much has changed over the years.  Chad’s second-to-last module, however, ServiceStack Web Services, stood out as such a powerful approach that I was amazed he ever created the other nine modules.  Then again, I guess he had to finish the course since it was titled “10 Ways…” and not “Forget the other nine ways…”.  In short, the syntax of ServiceStack was so clean and no-nonsense that I had to take a look.  This is when I happened to find a second course, Using ServiceStack to Build APIs, by John Sonmez (a great instructor, by the way).

Okay, I’m babbling.  Let me cut to the chase…

If you are a Microsoft or C# developer with a need for web services for any project, ditch WCF, rip out RIA, and forget OData, WebAPI, or whatever other gadget you’re using.  Grab your personal credit card (not your company card … it’s that good) and go buy a independent license of ServiceStack.  I promise that you will love yourself for it in the morning.

In the past four days I have watched John’s videos and created several sandbox applications.  When I stumbled I sent emails to the sole address on ServiceStack‘s site and promptly received replies from the lead author, Demis Bellot.  With every keystroke I have grown more impressed.

For me, the magic behind ServiceStack is how complete and polished the stack actually is.  It is clear that the author(s) have been around the block several times.  They have taken a very common sense approach to building in the exact concepts that are needed in multi-platform nTier applications.  More importantly, they have done it in a way that each grouping of functionality works gracefully with minimal coding.  They have even built in automatic exception handling that understands how to negotiate communication with the client while not sending down any data that could expose critical knowledge about your system.

ServiceStack does not stop with just polished syntax.  I must stress the word “complete” here.  Demis and his team have built in an optimized version of every key concept that most of us leverage on a daily basis.  From a super-fast IoC container, to a no-nonsense ORM tool able for working with most cross platform databases (LocalDb, SqlIte, Oracle, MySql, etc.), and even a Razor engine for front-end work, they have it all.  Your web services automagically serve up requests via SOAP, JSON, JSP, XML and other protocols without having to do anything.  And, when partnered with Xamarin, all of this is available on a cross-platform basis for Android and iOS… all from within C# and Visual Studio, of course.

Sorry… getting carried away again.  10, 9, 8… in with the good air, out with the bad…

Remember when I said that ServiceStack would make you feel like you have a school age crush?  I was serious.  ServiceStack is so polished… so perfect… that even the most ancient developer will feel the energy and passion to create something magical.  The amount of time you will save… the amount of effortless code you will write within your service and data layers… feels so refreshing that you will be drawn to ServiceStack.

Who knew you could publish and consume JSON from a Microsoft stack with three lines of code?  😉

Response to Telerik (20140215)

This past week Telerik launched a product line (or put a spin on several tools they already have) where the UI functions entirely in a browser.  This means you must layout your app and do a hefty chunk of work within your browser… and not within the IDE that we all use day in and day out.  Earlier today, the Product Manager at Telerik sent me a form email asking for feedback on their product.  I normally don’t reply to those emails, but was in the mood to share some thoughts.  Here’s that email:



Please take a moment to search your attendee list for “fred.lackey@*”. You will find that I have attended every Keynote and launch demo Telerik has had for many years. I have also been a licensed user of Telerik’s products (as well as Infragistics, DevExpress, Syncfusion, and many others) forever. That being said, the advice I offer here comes from years of use.

While I will admit that Telerik IS my “go to” product for several areas, it is more than apparent that you have been floundering for a few years. The largest flaw with Telerik’s offerings at this stage is the “either / or” mentality between the products … the firm delineation between compiled, mobile, and data. It is very clear that your teams are NOT in close communication and do NOT share a clear vision. This week’s demonstration proved that shortcoming quite clearly.

Every single product that Telerik offers provides is functionality in a very rigid “all or nothing” approach. Web development tools have no vision of ever connecting with ORM or the other compiled tools. Likewise, none of the compiled tools have any clear path to connect with anything web-based. Even worse is your new approach of building your tools and editors in a browser-only offering.

Quick thought: How can you proclaim that modern applications MUST be hybrid, and work on any platform, but then provide tools that ONLY work on the web?

In my opinion, for Telerik or any SDK provider to be successful in today’s software world, you MUST EMBRACE how developers constantly bounce between platforms and environments. There is no such thing as a “web developer” or “application developer” these days. Every senior developer and architect that I know (the people who recommend and ultimately purchase your products) works in BOTH a compiled and web world. Your tools, DOCUMENTATION, wizards, and underlying components MUST DEFINE A CLEAR PATH on how to move from one environment to the other for EVERY product you have. In those instances where a product CANNOT do this, or was not intended to move between a compile and web environment, then your product teams MUST work with each other to define and document a clear path on how to go from Product X to Product Y and back again.

For what it’s worth, I have been writing code and leading development efforts professionally for the past 31 years. I can confidently tell you that NONE of the commercial SDKs do this very well out there today, however Telerik has the best chance of obtaining this. Since you have one of the more mature product lines, it should be easiest for you to define the transition paths between your products. If you do NOT do this, then Infragistics or DevExpress will.

I hope this helps.


Forcing OST File Location for IMAP in Outlook 2013

Outlook creates a new OST file as a cache for each new mail account that is created.  This holds true for virtually any type of account or mail server that you attach to… IMAP, POP3, Exchange, etc.  By default these files are created within your [%LocalAppData%] folder, which, on Windows 8, is located in…


This location can be painful if you do not want everything stored in your C: drive.  For example, if you are using a VM you may not  want to clutter your virtual disk.  Or, you may want to store your OST files on a thumb drive or file server.  To help accommodate these scenarios, Outlook allows you to override this default storage location.  Simply create a new string value in the registry and supply the path to the folder where you would like your new OST files created (note the word “new” here)…

Registry Key:

The “15.0” folder is for Outlook 2013.  Different releases use a different decimal value (i.e. 14.0 for 2010, etc.).

String Value (you’ll need to create one of these):
ForcePSTPath … for PST Files (PST = “Personal Storage Table”)
ForceOSTPath … for OST Files (OST = “Off-Line Storage Table”)

Example Value:
Z:_Resource FilesMicrosoftOutlook

The Confusing Part… for IMAP Accounts & OST Files
Until now this is all common knowledge… or, mostly common knowledge.  There IS an annoying part to to this… something that might throw people for a loop.  Without going into some deep uber-geek explanation as to why this is, here are the facts…

  1. Outlook creates OST files (not PST files) when creating a new IMAP account;
  2. Outlook ignores the OST setting; and
  3. Even though it is creating an OST file, and not a PST file, Outlook uses the ForcePSTPath when creating an IMAP account.

Personally, I wasted a good 30 minutes on this.  Hopefully this lil’ note will save someone this time.

Just in case you’re new to Outlook’s “under the hood” bits, there is one last note…

The path to the data files is stored with the mail profile.  So, wherever Outlook creates the file is where it will remain.  Older versions of Outlook allowed you to move the file however this feature has been removed in Outlook 2013.  In short, these settings will only have an impact for new profiles.  If you already have a mail profile within Outlook, you will need to blow it away before making any of these changes.