My Tools, My Choice

We live in a world of choice.  Within reason, you can choose the car you drive, the type of coffee you’re drinking this morning, what color shirt you’re going to wear today… and what kind of technology you’re going to use.  When it comes to choosing technology, I tend to make my choices based on several factors.  What do I need the technology to do?  If it’s battery powered, will it last me for as long as I need it to?  Is it easy and convenient to use?  Does it look nice (let’s be honest, that can be a deciding factor as much as anything)?  Does it have the ...
Read More

Jumping to Android… Tentively

So, I’ve finally made the leap back to Android.  For the past year or so, I was using an HTC One M8 Windows Phone, and prior to that, an HTC 8X.  I don’t care what anyone says.  It’s my life, my phone.    And I still love the Windows Phone platform, and am hoping beyond hope that, with Windows 10, it’ll finally take off.  I’d say it’s still my favorite phone platform.  I prefer its UI over that of Android or iOS, along with the piece of mind that it’s apparently the most secure of the three major phone OS’s [1, 2]. However, as Windows Phone continues to lose ...
Read More

Fantastic Soundtrack for Work

I'm a HUGE fan of the movie Tron: Legacy, and I've found that the soundtrack, which was done by Daft Punk, is fantastic for getting work done with.  There are no lyrics, but the songs are either somber, or driving, depending on the track.  Take a listen to this one example to see what I mean. https://www.youtube.com/watch?v=DSx_N18TWjs
Read More

Anti-Forgery Token in Angular Apps

ASP.NET MVC has a nice feature built in that helps in the prevention of cross-site request forgeries.  For those that may not know what this is, please take a look at the general idea here.  The basic idea looks something like this.  Let's say that your site has a page with personal information on it; credit card or debit numbers, SSN's, etc.  A user logs in to your site, and selects the "Remember Me" checkbox at login, which saves a persistent cookie to their computer.  At this point, the cookie exists, even when they shut down their browser.  Now the user gets an email with a link to a page ...
Read More

HttpContext in a Task

At work recently, I needed to be able to get access to the HttpContext.Current value, as it contains the user currently on the site, as well as many other values that may be needed.  In my case, I needed both the user name, and the Url that the request came from, and I was coding in a service, where I didn't have direct access to the ApiController methods.  However, most of our Api calls are done using async/await, so Task.Run comes in to play a lot.  The problem with HttpContext.Current is that the Response property hanging off of this value is null from within the Task; only the main thread ...
Read More

Getting the Current HttpRequestMessage Outside of ApiController

If you’re like me, one of the draws of using a framework like ASP.NET Web API is that it’s designed, from ground up, to be testable.  It’s nice to know that you can test code in isolation without having to worry about getting a real database connection, a real file off of disk, or, in this case, a real Http request. In a project that I’m working on for a client, I needed to get access to the current HttpRequestMessage object from within a service class.  I could’ve simply passed this value in from the controller, but then there would be a strict dependency in my service on a fully run-t...
Read More

Welcome to JamieNordmeyer.net!

Thanks for stopping by!  I've been meaning to start working on a blog for a long time, and I'm finally getting around to doing it.  This blog will mostly be about stuff that a developer/computer geek like me will care about, but will likely also have ramblings and thoughts about other activities as well.  Stay tuned as I begin to flesh out the blog, and feel free to jump in to the About Me page to see who the heck I am. Laterz!
Read More