James Hickey's Blog

Looking At Software Related Ideas Using Short And To The Point Code Samples :)

Menu Close

Tag: functional programming

Advanced Fluent Interfaces: LINQ Case Study

In Martin Fowler’s “famous” article about fluent interfaces, he talks about how it’s beneficial (when using strongly typed languages) to have the return type of your fluent method be flexible. We’ll be looking at this advanced fluent interface technique today. Read more

Functional Programming With C#: Simple Use Case

During the past year and a half I have been making a point to learn about and develop my skills in functional programming. For the majority of this experience, I have been using JavaScript and TypeScript. After moving onto another project at work, I was brought back to “C# and SQL world.” Long story short, I noticed the way I was thinking about software problems in C# were totally different than before.
Read more

Tips For Readable And Maintainable Unit Tests In JavaScript / TypeScript

I’ve started using ts-jest for a project at work and have really enjoyed it. It works great because you can write your tests in TypeScript and ts-jest will just compile on-the-fly then run your tests like you would expect. However, tests can easily become unreadable or harder-to-read (which isn’t limited to ts-jest, of course).

Improving Readability

In order to make the tests more readable, I am creating generic functions that I can re-use in my test cases. Read more

© 2017 James Hickey's Blog. All rights reserved.

Theme by Anders Norén.