Posts

“Speak, Centurion.”

Image
I have a friend who likes to send me random things through the mail from time to time, the most recent of which was the Imperious Leader action figure from the original 1978 Battlestar Galactica shown above. I decided to bring it to work and put it in my office. One day, after returning to my office from a meeting, I found that someone (my boss, it turns out) had constructed a throne for him using two paper cups. It’s surprisingly film-accurate, IMHO. My boss later admitted that he considered coloring it black with a marker but decided it wouldn’t be a productive use of time.

Positive Vibes

Image
Sometimes a bad day can be turned around by an unexpected source. Last Wednesday I was having a pretty terrible day after being jerked around by a local car dealership. Later that day, while on a live chat with iTunes support about a missing digital booklet, I was helped by a guy named Kumar who couldn't have been more helpful and positive. What had begun as a chat session to help me with a missing content problem turned into a dose of positive attitude that I really needed that day. Thanks Kumar!

Tales from the Whiteboard 2

Image
As mentioned in a previous post, I often have people stopping by my office when I'm not here and leaving (often humorous) messages on my whiteboard. Here is another collection of messages I've had left for me over the previous few months.


I don't get the wonderwall comment, but I found it funny nonetheless.


A coworker left a message requesting assistance as if I'd written it as one of my own notes.


A later addition, wishing me a nice trip up to Boston (for Visual Studio Live).


I honestly am at my desk regularly, but apparently I have a knack for missing someone's visits.

Resolving the "Authentication failed" Error with Git for Windows

Image
Today I tried to clone a repo with Git but received the error "fatal: Authentication failed for (URL)". I wasn't sure why I was getting this error when everything was working fine last week. Then I realized that I'd had to change my domain password yesterday, and my stored credentials needed to be updated.

To do so, on Windows 10, right-click on the start button and select Control Panel. Then select Credential Manager. From there, select Windows Credentials and find your Git URL under the Generic Credentials section shown below.


Click on the URL or the arrow to the right of it to view the information associated with it. Click Edit to change your stored password.

I hope this helps!



How to Create Multiple Apps in the Same Workspace in Angular 6

One of the most talked-about features in Angular 6 is support for multiple apps within the same workspace. Here's a quick how-to on how to do this.

First, this assumes you're using the Angular CLI. When you create a new app using the CLI, it will actually create two projects for you: one having the name you specified when you created the project, and another with "-e2e" appended to the name. This project is for end-to-end tests. These two projects will be listed in the angular.json file under the projects node. The code for the project you asked the CLI to create will be located in (app name)\src\app, and the code for the e2e project will be located in (app name)\e2e\src.

But what if you want to add another project?

This is simple. Using the CLI, from within your project's root directory, execute ng generate application (name of your new app).

For example:
ng generate application another-app

This will do the following:

Adds a new folder called projects under your a…

It Came From the ‘70s: The Devil’s Rain

Image
My brother-in-law asked for this movie, The Devil’s Rain, for Christmas last year. I ordered it for him on Amazon without giving it much thought. It was only after I’d given it to him that I learned anything about it. First of all, it’s a movie from the ‘70s, and if you know me or have spent much time on this blog, you know I have an affinity for that (very kitschy) decade. Plus, it’s got Ernest Borgnine and a post-Star Trek / pre-Star Trek movies William Shatner. I had to watch this.

And now I have. And wow, what a mess. And that’s saying a lot, because a film from the ‘70s featuring two icons of ‘70s film and some truly ‘70s subject matter (the supernatural — it seems the country was obsessed with the supernatural back then) hits all my “Cheesy Seventies Movie” checkboxes. My level of expectations was understandably low: I wasn’t expecting an Oscar-caliber film here. So what went wrong?

Well, to start, the movie begins in the middle of a tense, dramatic situation that we know nothi…

Moving / Deleting Files That Were Attachments After Sending Email in .NET

I recently worked on some code that attached some files to an email in .NET. After the email is sent, the code tries to move the files that were attached to a "Sent" directory, but it was failing with the error "The process cannot access the file because it is being used by another process." The cause was that the MailMessage class implements IDisposable, and even though I'm often very cognizant / responsible when it comes to disposing of IDisposable objects, in this case, I missed it. Once I disposed of the mail message, I was able to move those files. And I now lower my head in shame...

Here's the corrected code as an example. Wrapping the mailMessage variable inside a using block implicitly calls Dispose() at the end of the block.

using (var mailMessage = CreateMailMessage(emailTo, emailFrom, body, emailSubject))
{
    CreateEmailAttachments(mailMessage, attachmentFilenames);     _smtpManager.Send(mailMessage); } I've been meaning to write a blog post …