Install Docker You don’t have to know anything about Docker to run this tutorial. But to follow along, you’ll need to install Docker Desktop Community for Mac.1
Get the docker image Microsoft is going to stop publishing images to docker hub, and instead, publish only to the Microsoft Container Registry (MCR). At the time of this writing, SQL Server images are still on docker hub, but the example below pulls the image from the MCR.
Mock jQuery Ajax Calls with Jasmine
Suppose you have a function that hits Google’s book service to conduct a search. You would like to test this function for various cases: no results, one result, lots of results, or even a service failure. But you don’t want to be dependent on Google’s service in your unit tests. I’ll show you how to use jasmine’s spies to mock the service so that you can get the test coverage you desire.
What's Your Biggest Weakness?
Even if you have never had to answer this classic interview question, it’s one that you should occassionally ask yourself. By thinking through an honest answer, you can uncover, and therefore correct, weaknesses that may be holding you back.
When I ask myself this question, I have to give myself some context. When interviewing, the context is usually the position for which you are interviewing for. To set the stage for my answer, I imagine that I’m interviewing as a programmer, manager, product owner, husband, father, etc.
Always Use `var`
This isn’t an article about the var keyword in JavaScript. There’s nothing controversial about that. Just use it. This post is about C#’s var keyword.
How is that Controversial? Most people cop out say that the use of var is simply a preference. This is because the compiler figures out the type of the variable, and then compiles it just as if var was never present. However, by always using var, you will create more readable code, and find new insights to your code that you may not have noticed otherwise.
Simplicity Challenged
It’s difficult to rein in your ideas and take baby steps when designing anything. The problem is compounded when you build something that is so well known - like a blog. This second post was quite a challenge for me from that perspective.
Features! Features! Features! Now that I have multiple posts, I want to include the ability for a visitor to go back and forth between them. I also want to make sure that the most recent post is shown first on the home page.
Getting Naked
Learning about agile methodologies has had an effect on how I view many aspects of my life. Prioritizing the high value items, working incrementally towards goals, and having a shared vision with those around you are good things to remember regardless of what you are doing. If I know this so well, then how come I haven’t applied this knowledge to blogging?
Analysis Paralysis For as much as I know about splitting apart complex systems into complete and independent User Stories, I get way too caught up in what I want my blog to be.
Partial Function Application
The previous post demonstrates my thought process for solving problems, enhanced with the aid of the F# Interactive (FSI) Window. The programming exercise I used was presented at August’s F# SIG in Cleveland. The exercise was to recursively act on a directory with different operations: get the total size of all the files, delete all the files, move all the files, etc. In the previous post, I skipped over the “move files” part of the problem because it introduced a new concept that I felt would have detracted from the focus of the post.
Functional Focus
The combination of a functional language and an interactive interpreter has helped me think differently about solving problems. The functional language makes me write expressions - code that returns an answer; and the interactive window lets me test those expressions. Since it tends to be easier to test small things in isolation, I naturally end up with many small functions that work together to solve larger problems. I like to call these small functions Building Blocks.