Hosting a blog on S3 and Cloudfront

Creating a blog that is easy-to-use, lightning fast, inexpensive, has fewer security problems than Wordpress, and never has downtime might seem impossible … but I think I’ve found a way. Easy to use Hugo is our foundation. OK – I’ll admit that Hugo isn’t exactly easy to use for a non-geek. If you already know a bit of HTML & Javascript, it’s a perfect fit for this operation. Hugo generates a static site based on Markdown based posts....

July 24, 2013 · 4 min · 652 words · Dan Esparza

Using generic lists in code

For best performance it’s usually not a good idea to initialize variables in .NET. When it comes to software maintenance costs, List initialization is a different story, however. I’ve seen 2 different patterns used when creating lists in C# code recently. One is simply to declare the list and implicitly or explicitly initialize it to null: public List<SomeObject> MyListProperty { get; set; } // Implicitly null (Ok) List<SomeObject> MyOtherListProperty = null; // Explicitly null (Ok) The other is to declare the list and initialize it to an empty list....

July 3, 2013 · 1 min · 177 words · Dan Esparza

Flushing the ASP.NET Output cache using code

When looking to speed up content that will be served from an ASP.NET MVC controller, one of the options I evaluate is the built in Output caching mechanism. Output caching is great because it’s easy to setup, easy to maintain and it can give a big improvement for a small amount of code. Sometimes, the cached item will need to be flushed (and regenerated / recached). The built in mechanisms for handling this – using cache expiration, or varying the cached output by one of many parameters – handle most use cases pretty easily....

January 24, 2013 · 2 min · 253 words · Dan Esparza

Managing a job hunt: Part 3 (phone screens)

This post is the third in a series of posts about managing a programmer job hunt (including hunting for a job in another city). You might be interested in the other parts: Part 1 (the initial research) Part 2 (the sanity check) ...

October 29, 2012 · 2 min · 407 words · Dan Esparza

Managing a job hunt: Part 2 (the sanity check)

This post is the second in a series of posts about managing a programmer job hunt (including hunting for a job in another city). You might be interested in the other parts: Part 1 (the initial research) ...

October 15, 2012 · 3 min · 453 words · Dan Esparza

Managing a job hunt: Part 1 (the initial research)

I recently switched jobs (and switched states) and used several approaches that I haven’t heard used anywhere else, so I wanted to share what worked and what didn’t work. ...

August 13, 2012 · 3 min · 627 words · Dan Esparza

Using MS Onenote to manage bug and release information

The problem Interruptions cause a real problem with lost time during software development. Jeff Atwood summarizes this nicely: The solution: taking notes We’re already using the computer to program, I figure it makes more sense to take notes on the computer (vs pen and paper). After trying to use Evernote and getting frustrated with the lack of a decent print view or formatting options, I chose MS Onenote and haven’t looked back. ...

April 4, 2012 · 1 min · 172 words · Dan Esparza

Using wildcards with git operations

I’ve been using the awesome ‘git’ source code control system for the past year now. The transition from Subversion to git was prompted mostly by my desire to use the awesome application hosting platform AppHarbor, but I picked up git with ease and haven’t looked back. One of the things I’ve learned about using git in conjunction with Visual Studio 2010 is that git usually likes to be in control of certain operations....

January 9, 2012 · 1 min · 204 words · Dan Esparza

What version of jQuery is a site using?

To quickly find the version of jQuery that a site is using, you can simply type the following into the browser bar of the site: javascript:alert(jQuery.fn.jquery) This will get the version of jQuery and display it in a javascript pop-up dialog.

January 4, 2012 · 1 min · 41 words · Dan Esparza

Find out if 2 date ranges overlap using Javascript

I recently discovered an ingeniously simple way to see if 2 date ranges overlap using only Javascript: var e1start = e1.start.getTime(); var e1end = e1.end.getTime(); var e2start = e2.start.getTime(); var e2end = e2.end.getTime(); return (e1start > e2start && e1start < e2end || e2start > e1start && e2start < e1end); Simple, eh? One more quick note: ff you need extra help with designing your app with Javascript, you can’t go wrong with this fantastic book from Douglas Crockford:...

July 19, 2011 · 1 min · 81 words · Dan Esparza