all blog posts

VB.NET vs C# Syntax differences

15 Apr 2017

A cheat sheet outlining the syntax differences between VB.NET and C#. This post is written specifically for advanced C# developers with little to no VB.NET knowledge who need to do some VB.NET coding.

Because some things are just so similar but still confusingly different in VB.NET vs C#…

Along the way we’ll make some amazing discoveries like:

  • There are things VB.NET just can’t do (pointers, …)
  • There are a few cases where VB.NET code is shorter than its C# counterpart (gasp!)
  • VB.NET defaults are not what you might expect from a strongly typed language due to its VB6 legacy (Option Strict, Explicit)
  • There is some VB.NET only stuff that comes in handy from time to time
cheat-sheet

Managing Environment Variables with PowerShell

12 Apr 2017

Working with environment variables in Windows is as easy as:

Win + Pause > "Advanced system settings" > "Environment Variables..."

After which you get a tiny, unresizable, form where you can view and manage them. Something better eventually arrived with Windows 10 but still, PowerShell :)

Use Autohotkey to open the window with Left Alt + Pause:

LAlt & Pause::Run % "rundll32 sysdm.cpl,EditEnvironmentVariables"
powershell windows

PowerShell profiles

11 Apr 2017

Reload PowerShell profile

. $profile
powershell windows

Package Manager Console Entity Framework 6 Migrations profile

10 Apr 2017

This tutorial is about adding the following functionality to the Entity Framework Migrations CLI:

  • Execute commands against the project containing the migrations by providing the most likely -Project parameter value
  • Allow updating the database using a numeric TargetMigration (-2 = migrate to the third last migration)
powershell

Synchronize Additional Folders With Dropbox Using Junction on Windows

4 Mar 2013

Dropbox is great! I’m pretty sure you’ve already heard of it but for those who have not: It allows you to synchronize about 2 gig (and up to 16 gig with some effort) worth of documents, pictures or other files between your different computers, laptops or other mobile devices. The files are kept on your machine(s) and in the cloud, but they are also accessible from anywhere with a browser and shareable with everyone you’d like.


Notepad++ double click PHP variable including the $ sign

7 Dec 2012

Built-in in Notepad++ since 2016:

Settings > Preferences > Delimiter > Add you character as part of word > $


Notepad++ Bookmarks

4 Dec 2012

In many text-editors there are means to easily jump with the cursor between different points in the code and this is no different in Notepad++. Bookmarks have their own margin where they can be toggled with a mouse click.


Pragmatic Tip 2: Think! About Your Work

2 Dec 2012

Turn off the autopilot and take control. Constantly critique and appraise your work.
— The Pragmatic Programmers

pragmatic-tips