Use Branches With Go Modules

When developing with Go on a team, it is useful to have a good branching strategy so you can work together as a team and not tromp on each others changes. But how do you use Go modules with a branching strategy? It’s easy to refer to another project (even at a certain version) – but branches seem to offer a bit of a challenge. The official guidance involves using the specific commit hash for the module you want, like this:...

December 22, 2022 · 2 min · 236 words · Dan Esparza

A modern Javascript workflow

Let’s talk about your development workflow. If you’re still including all of your scripts in your pages using a <script> tag, you’re doing it wrong. A modern front-end workflow includes some kind of dependency management solution, and some kind of bundling / minification process. Prereqs: Package management and Git console npm Even if you don’t use Node.js for your server use npm for managing your client-side dependencies. It really makes adding and removing compenents a breeze!...

October 17, 2015 · 3 min · 583 words · Dan Esparza

NuGet tips

Created in 2010, NuGet is a free and open source package manager for the Microsoft development platform. NuGet has become the defacto way of distributing tools and libraries in the Microsoft developer community. If you’re interested in working with NuGet, here are some tips and tricks that will be helpful to you. Creating NuGet packages Creating NuGet packages from scratch can be daunting for a first-timer. nuspec != nupkg First, you need to understand that there is a difference between the types of files that NuGet uses:...

April 3, 2015 · 3 min · 629 words · Dan Esparza

Use Keepass and dropbox to manage your passwords

Interested in using a password manager for all your passwords? You should be. Services like OpenId are catching on, but aren’t as widespread as originally hoped. You might visit hundreds of different sites a year that use a login and password. Using the same password for every website and service is a terrible idea: A hacker just needs to compromise one of the services you visit and they’ve got the username/password for all the sites you visit....

September 24, 2014 · 3 min · 506 words · Dan Esparza

Using Windows Authentication with IISExpress

I do a lot of development with websites in Visual Studio 2013 nowadays. I’ve discovered that in order to use IISExpress with Windows Authentication, I had to jump through some hoops. You may find yourself banging your head on the wall trying to get IISExpress to work with Windows auth – so here are few tips for you. Update your web.config Make sure your web.config file both enables windows authentication and also denies anonymous authentication....

September 16, 2014 · 2 min · 231 words · Dan Esparza

Things your Dad never told you about NLog

I’ve had cause to work with NLog a lot lately. In working with it, I have discovered some surprises and tricks that I thought I would share. Log levels matter You should think carefully about your log levels as you start adding logging to your app. Trace should probably be used sparingly, because when you turn on log level ‘Trace’ that means you’re pretty much logging EVERYTHING. Log level Debug or Info might be a better level to start with....

June 4, 2014 · 4 min · 692 words · Dan Esparza

netsh, Windows 2003 and httpcfg

In a previous article, I talked about working with HttpListener. Remember: HttpListener uses http.sys. It’s necessary to tell http.sys that a process & user should be allowed to listen to a certain port before that process starts listening. This is called ‘url reservation’. In Windows Vista and Windows server 2008, the way to do url reservation is with netsh.exe. My development workstation is Windows 7, so I used netsh.exe to get things working locally....

March 3, 2014 · 2 min · 248 words · Dan Esparza

Debugging .NET network and certificate issues

Dear Reader, I learned some important things the hard way this week, so I thought I’d share the fruits of my agony. You must reserve ports when working with HttpListener I’m used to letting IIS handle the details of hosting a web service for me, so I wasn’t familiar with the ins and outs of netsh. If you self host with OWIN, this apparently gets taken care of for you – so you don’t need to worry about it....

February 7, 2014 · 3 min · 475 words · Dan Esparza

Gotchya using data attributes with jQuery

Today I discovered an interesting ‘gotchya’ when using HTML5 data attributes with jQuery. jQuery supports getting these data attributes with the jQuery.data() syntax … but beware: it will automatically strip hyphens and camel-case hyphenated attributes. In other words, if you try to use the following HTML: <div data-role="page" data-last-value="43" data-hidden="true" data-options='{"name":"John"}'></div> … the data-last-value attribute automatically becomes lastValue when accessing it in jQuery. This also introduces another behavior you should be aware of....

January 22, 2014 · 1 min · 133 words · Dan Esparza

Hosting a blog on S3 - cheaper and simpler

A few months ago, I covered how to setup a blog using S3, Cloudfront and Route 53 that was dirt cheap, reliable, and fast. Today, I’m going to walk through an even simpler and cheaper setup that is just as fast Overview Hugo is (still) our foundation. Hugo generates a static site based on Markdown based posts. Getting started with Hugo is a breeze – it’s not as complicated as Jekyll or Octopress....

November 19, 2013 · 3 min · 558 words · Dan Esparza