Anthony Fung

Anthony Fung @ant_f_dev

About: Full stack Angular and .NET Web developer

Joined:
Feb 5, 2023

Anthony Fung
articles - 57 total

Absolute vs. Relative Co-ordinates for Defining an SVG Path

We previously looked at taking an icon drawn on paper and converting it to SVG code. The process...

Learn More 2 0Mar 27 '24

Change Colours in a Bitmap Image using Browser CSS Filters

Last week we looked at how we can create greyscale versions of images in real time. Maybe we want to...

Learn More 0 0Mar 20 '24

Using Browser Filters for Mouseover Effects in Web apps

Last week, we looked at how we can use different images to change the appearances of icons in our Web...

Learn More 1 0Mar 13 '24

Dynamically Change PNG Icon Colours for Mouseover Effects

We previously looked at how we can dynamically change the colours within an SVG image in a Web app....

Learn More 1 0Mar 6 '24

Convert Simple Icon Designs from Paper Sketches to SVG Code

When building an app, we sometimes find ourselves needing an icon but don’t have one at hand. Perhaps...

Learn More 0 0Feb 28 '24

Dynamically Change SVG Icon Colours for Mouseover Effects

When we use images in an app, we sometimes want to be able to change their colour dynamically to...

Learn More 0 1Feb 21 '24

An Overview of Scaling SVG vs. Bitmap (JPG, PNG) Images

Having looked at the basics of SVG and bitmap formats (like JPG and PNG), we now have a rough idea of...

Learn More 1 0Feb 14 '24

SVG: An Introduction and Overview vs. Bitmap Formats

In last week’s article, we looked at and compared two common bitmap image formats – JPG and PNG....

Learn More 1 0Feb 7 '24

JPG vs PNG: Pros and Cons of Each Format When Building Apps

Images can play an important part when building an app. Whether it’s for desktop; mobile; or Web,...

Learn More 1 0Jan 31 '24

Using Virtual Desktops to Stay Organised and Productive

It’s usual to have many apps open at once while writing software. As a back-end developer, you might...

Learn More 3 0Jan 24 '24

Static Helper Class vs. Injected Service: Pros and Cons

We’ve all worked on apps and services that weren’t as clearly written as they could have been. While...

Learn More 1 0Jan 17 '24

How Programming to an Interface Affects Testability

We’ve previously explored how a slight change in mindset can make our code more flexible. Thinking in...

Learn More 2 0Dec 20 '23

How to Replace Third-Party Services at Development Time

Identifying abstractions and programming to interfaces can be helpful. We’ve previously seen how...

Learn More 2 0Dec 13 '23

How to Refactor Duplicate Methods with Subtle Differences

In last week’s article, we explored a real-world example of how programming to an interface can make...

Learn More 2 0Dec 6 '23

How Coding to an Interface Can Reduce the Impact of Code Changes

In last week’s article, we took a high-level look at how programming to an interface helps us write...

Learn More 7 0Nov 29 '23

How Coding to an Interface Can Increase Your Code’s Flexibility

A few principles often come to mind when building software. While Program to an Interface doesn’t...

Learn More 6 2Nov 22 '23

How to Measure the Effectiveness of Unit Tests Using Code Coverage

We sometimes talk about code coverage when discussing the quality of our unit tests. This week we’ll...

Learn More 3 0Nov 15 '23

Parallelise Your NUnit Tests to Be More Productive and Waste Less Time

We previously touched on how NUnit runs tests sequentially by default. While individual tests...

Learn More 4 0Nov 8 '23

How to Write NUnit Tests for Many Classes with Generic Test Fixtures

We previously looked at how we can run a single written test with multiple data. By adding parameters...

Learn More 1 0Nov 1 '23

3 Ways to Include JSON Directly in Your C# Test Code

Hi Friends. In last week’s article, we briefly touched on how JSON can be tricky to include in unit...

Learn More 3 3Oct 25 '23

How to Make JSON String Comparisons in Unit Tests Less Brittle

We previously looked at how we can extract longer texts used as expected values into separate files...

Learn More 4 5Oct 18 '23

How to Make Sure Your Test Resources Are Always Available

In last week's newsletter, we explored a tip for keeping tests with complex comparison data tidy. By...

Learn More 4 0Oct 11 '23

Simplify Unit Tests by Storing Complex Data in Resource Files

The structures of test projects are usually simpler than those of the projects they validate. As each...

Learn More 4 0Oct 4 '23

How to Easily Create New Mock Instances in Unit Tests

We’re often told we should keep components light and focussed when building software. And with good...

Learn More 6 2Sep 27 '23

3 Useful NUnit Attributes for Your C# Tests You Shouldn’t Forget About

We’ve written a few tests in this series now. You’ll have seen we decorate methods with Test to tell...

Learn More 4 1Sep 20 '23

3 Ways to Organise and Tidy Your C# Unit Test Projects

When writing tests, we often start with what we think will be typical use cases for our code. It’s...

Learn More 2 0Sep 13 '23

How to Add Tests for Existing Code with Methods That Aren’t Public

Writing tests alongside your code can often be helpful. It can help you think of edge cases where...

Learn More 5 0Sep 6 '23

What Alternatives Are There to Use in Unit Tests Instead of Mocks?

In our exploration of using mocks in tests, we’ve looked at quite a few topics in detail. We’ve...

Learn More 5 3Aug 30 '23

How to Use Strict Mocking in Moq to Automatically Verify All Setups

When using mocks, we often set them up to return values for use in the logic we’re testing. In...

Learn More 3 2Aug 23 '23

How to Set Up Mocks in Unit Tests to Return Default Objects

If you’ve been following this series, you’ll have noticed that we use mocks often in our unit and...

Learn More 10 0Aug 16 '23