Black Sheep CodeModern web development - testability, extensibility, declarative APIs, declarative code from open specs and more.en-AUhttps://blacksheepcode.com https://blacksheepcode.com/blacksheep_fb_wide.webp A shield or a cudgel? A dynamic I frequently observe is that the project manager becomes a cudgel against their team members, rather than serving to protect them from the rest of the organisation. https://blacksheepcode.com/posts/a_shield_or_a_cudgel https://blacksheepcode.com/posts/a_shield_or_a_cudgel Sun, 31 May 2026 00:00:00 GMT Adding dark mode to a blog - how to avoid flashes of the wrong theme I've added dark mode to this blog. Here's a few tricks I've learned. https://blacksheepcode.com/posts/adding_dark_mode_to_the_blog https://blacksheepcode.com/posts/adding_dark_mode_to_the_blog Fri, 07 Jun 2024 00:00:00 GMT How to configure Remix and mdx-bundler (with file system access) How to use Remix and mdx-bundler to make use of frontmatter headers. This will allow adding publication dates, or grouping posts into series, adding tags, etc. This solution works for a non-serverless solution - it requires file system access. https://blacksheepcode.com/posts/adding_msw_bundler_to_remix_app https://blacksheepcode.com/posts/adding_msw_bundler_to_remix_app Sun, 19 Nov 2023 00:00:00 GMT How to configure Remix and mdx-bundler for a serverless platform - barrel files approach, Remix v1 If using Remix on a serverless platform such as Netlify we can use a build time compilation and barrel files to access frontmatter metadata. https://blacksheepcode.com/posts/adding_msw_bundler_to_remix_app_2 https://blacksheepcode.com/posts/adding_msw_bundler_to_remix_app_2 Fri, 22 Mar 2024 00:00:00 GMT Advice for someone looking to get into software engineering This is advice I have for someone who is either pivoting career or has finished high school and is looking at university options. https://blacksheepcode.com/posts/advice_for_someone_wanting_to_get_into_software_engineering https://blacksheepcode.com/posts/advice_for_someone_wanting_to_get_into_software_engineering Mon, 24 Nov 2025 00:00:00 GMT Agentic AI - yak shaving on steroids The prospect of having agentic AI do all the real work means that we now focus on tuning the AI, not delivering the work. https://blacksheepcode.com/posts/agentic_ai_yak_shaving_on_steroids https://blacksheepcode.com/posts/agentic_ai_yak_shaving_on_steroids Sat, 23 May 2026 00:00:00 GMT Agnostic state and service management in React Avoid make state framework specific calls inside of your React components, and instead access them via hooks. This reduces the cognitive overhead in understanding your components, and likely allows reuse of those data fetching functions elsewhere. https://blacksheepcode.com/posts/agnostic_state_managment_in_react https://blacksheepcode.com/posts/agnostic_state_managment_in_react Thu, 05 May 2022 00:00:00 GMT AI and the carve-out of middle class power How replacing the middle class with AI could shift power toward the owners of capital. https://blacksheepcode.com/posts/ai_and_the_carve_out_of_middle_class_power https://blacksheepcode.com/posts/ai_and_the_carve_out_of_middle_class_power Fri, 23 Oct 2026 00:00:00 GMT An AI-generated blindfold Increasingly, I'm finding it hard to hard to get a sense of human consensus on a topic from the internet https://blacksheepcode.com/posts/an_ai_generated_blindfold https://blacksheepcode.com/posts/an_ai_generated_blindfold Thu, 27 Aug 2026 00:00:00 GMT An inversion of information discovery Our information discovery starts at a high level and then digs in. In the AI world, it might be better to have AI do deep discovery and then summarize. https://blacksheepcode.com/posts/an_inversion_of_information_discovery https://blacksheepcode.com/posts/an_inversion_of_information_discovery Sun, 18 Oct 2026 00:00:00 GMT An overview of configuring proxy behaviour in NodeJS applications You may wish to proxy node requests via service like mitmproxy for the purpose of analysing the requests its making or generating test data. Here's a quick reference sheet for setting this behaviour up. https://blacksheepcode.com/posts/an_overview_of_configuring_proxy_behaviour_for_node_apps https://blacksheepcode.com/posts/an_overview_of_configuring_proxy_behaviour_for_node_apps Thu, 05 Sep 2024 00:00:00 GMT At least write one test. The value of writing one test isn't in testing the code's correctness - it's in testing its consumability. https://blacksheepcode.com/posts/at_least_write_one_test https://blacksheepcode.com/posts/at_least_write_one_test Wed, 23 Apr 2025 00:00:00 GMT It is better to have the same meeting four times with four people each, than to have one large meeting with sixteen people. If some idea or decision needs to be socialised amongst many people, it may be tempting to get everyone into one meeting and sort it out in one go. https://blacksheepcode.com/posts/better_to_have_the_same_meeting_four_times_than_one_large_meeting https://blacksheepcode.com/posts/better_to_have_the_same_meeting_four_times_than_one_large_meeting Thu, 26 Jun 2025 00:00:00 GMT Run a Docker image on AWS ECS + Postgres using Terraform CDK CDKTF is a tool that allows us to use fully fledged programming languages to do Terraform deployments, having the advantage of being type safe for one. https://blacksheepcode.com/posts/cdktf_postgres_and_ecs https://blacksheepcode.com/posts/cdktf_postgres_and_ecs Wed, 21 Feb 2024 00:00:00 GMT Does this tool exist? A tool for comparing/testing the difference between LLM harnesses, models and prompts All the talk in the world about certain prompting techniques, models, or workflow strategies isn't very useful unless you can actually measure it https://blacksheepcode.com/posts/coding_agent_testing https://blacksheepcode.com/posts/coding_agent_testing Wed, 08 Jul 2026 00:00:00 GMT Conference notes for Web Directions Code 2025 - The behaviour of browsers and their loading of resources. Links to documentation and open issues. https://blacksheepcode.com/posts/conference_notes_web_directions_2025 https://blacksheepcode.com/posts/conference_notes_web_directions_2025 Wed, 11 Jun 2025 00:00:00 GMT Delete a range of commits The --onto option of a git rebase can be used to delete a range of commits https://blacksheepcode.com/posts/delete_a_range_of_commits https://blacksheepcode.com/posts/delete_a_range_of_commits Thu, 26 Jun 2025 00:00:00 GMT Dependency injection when using redux. An unconventional strategy to inject the behaviour of your state management in testing contexts https://blacksheepcode.com/posts/dependency_injecting_when_using_redux https://blacksheepcode.com/posts/dependency_injecting_when_using_redux Mon, 01 Aug 2022 00:00:00 GMT Different Approaches to Form Element State Management in React Working with lists of data for form inputs such as radio buttons or checkboxes is non-trivial. I outline three approaches. https://blacksheepcode.com/posts/different_approaches_to_form_element_state_in_react https://blacksheepcode.com/posts/different_approaches_to_form_element_state_in_react Wed, 27 Jul 2022 00:00:00 GMT Encapsulate as much state as possible in your component A common pattern I see is passing every bit of a component's state in as a prop. This just puts the responsibility of that component's actual useful logic on to the parent. https://blacksheepcode.com/posts/encapsulate_as_much_state_as_possible https://blacksheepcode.com/posts/encapsulate_as_much_state_as_possible Fri, 31 Oct 2025 00:00:00 GMT A model of extensible changes. Making changes in an extensible manner avoids having to do significant code rewrites or being disruptive to downstream consumers of your API. https://blacksheepcode.com/posts/extensible_changes https://blacksheepcode.com/posts/extensible_changes Wed, 10 Aug 2022 00:00:00 GMT Why use OpenAPI? OpenAPI is a spec for describing HTTP APIs. It has a healthy ecosystem of tooling that supports it. https://blacksheepcode.com/posts/generating_apps_from_openapi_part1 https://blacksheepcode.com/posts/generating_apps_from_openapi_part1 Fri, 25 Nov 2022 00:00:00 GMT Generating application and client code from an OpenAPI spec We'll use openapi-generators to generate a Go backend and a React frontend. https://blacksheepcode.com/posts/generating_apps_from_openapi_part2 https://blacksheepcode.com/posts/generating_apps_from_openapi_part2 Mon, 28 Nov 2022 00:00:00 GMT Generating MSW mocks from an OpenAPI spec. We're using msw-auto-mock to generate MSW mocks to test our React application. https://blacksheepcode.com/posts/generating_apps_from_openapi_part3 https://blacksheepcode.com/posts/generating_apps_from_openapi_part3 Tue, 17 Jan 2023 00:00:00 GMT Using Postman and an OpenAPI spec for contract/blackbox tests Syncing Postman with our Github repo, generating queries from our OpenAPI spec. https://blacksheepcode.com/posts/generating_apps_from_openapi_part4a https://blacksheepcode.com/posts/generating_apps_from_openapi_part4a Mon, 17 Apr 2023 00:00:00 GMT Postman and OpenAPI - Automating tests Postman has an automated testing feature, but how well does it work? https://blacksheepcode.com/posts/generating_apps_from_openapi_part4b https://blacksheepcode.com/posts/generating_apps_from_openapi_part4b Mon, 17 Apr 2023 00:00:00 GMT OpenAPI and contract tests with Jest Using good ol' Jest to write some contract tests with our OpenAPI generated client SDK. https://blacksheepcode.com/posts/generating_apps_from_openapi_part5a https://blacksheepcode.com/posts/generating_apps_from_openapi_part5a Wed, 26 Apr 2023 00:00:00 GMT Blackbox contract tests - Performance testing with Jest We can use a tool called jest-timing-reporter to provide a performance diff in our Github pull request. https://blacksheepcode.com/posts/generating_apps_from_openapi_part6 https://blacksheepcode.com/posts/generating_apps_from_openapi_part6 Fri, 28 Apr 2023 00:00:00 GMT Black box contract testing - third party API mocking We have an API that makes calls out to a third party - how do we test it? We can use .HAR files to configure a tool like Mockbin to act as the third party service. https://blacksheepcode.com/posts/generating_apps_from_openapi_part7 https://blacksheepcode.com/posts/generating_apps_from_openapi_part7 Mon, 14 Aug 2023 00:00:00 GMT Good idea: Loading screen tips for developers Video games commonly show helpful hints and tips on loading screens. Developer tools should contain the same. https://blacksheepcode.com/posts/good_ideas_loading_screens https://blacksheepcode.com/posts/good_ideas_loading_screens Fri, 13 Dec 2024 00:00:00 GMT How to add an experimental feature to your code, without having it in your main version control You might have a really good idea, but its not practical to get it commited to version control. You can keep the feature around for local use with some shell aliases and git commands. https://blacksheepcode.com/posts/how_to_add_experimental_features_to_your_code_without_version_controlling https://blacksheepcode.com/posts/how_to_add_experimental_features_to_your_code_without_version_controlling Mon, 19 May 2025 00:00:00 GMT How to effectively hire contractors Contractors are best utilised to plough through a well defined scope of work. https://blacksheepcode.com/posts/how_to_effectively_hire_contractors https://blacksheepcode.com/posts/how_to_effectively_hire_contractors Mon, 11 Apr 2022 00:00:00 GMT How to get started testing a React codebase that has no tests You've inherited a React codebase that has no tests. You're having trouble with regressions and think that tests might help, but how do you get started? https://blacksheepcode.com/posts/how_to_get_started_testing https://blacksheepcode.com/posts/how_to_get_started_testing Tue, 12 Mar 2024 00:00:00 GMT How to configure NextJS to proxy its requests We may wish to proxy the requests NextJS makes, for example through a tool like mitmproxy in order to analyse traffic or generate test data. https://blacksheepcode.com/posts/how_to_proxy_nextjs https://blacksheepcode.com/posts/how_to_proxy_nextjs Mon, 19 Aug 2024 00:00:00 GMT Human comprehension is still the bottleneck All this talk about how AI can build a whole whatever with $120 of credits and a day is beside the point - the bottleneck is how fast we can understand things https://blacksheepcode.com/posts/human_comprehension_is_still_the_bottleneck https://blacksheepcode.com/posts/human_comprehension_is_still_the_bottleneck Thu, 09 Jul 2026 00:00:00 GMT I'm playing with Remix Using Remix to generate a static blog. https://blacksheepcode.com/posts/i_am_playing_with_remix https://blacksheepcode.com/posts/i_am_playing_with_remix Mon, 28 Nov 2022 00:00:00 GMT If I were building a start up from scratch, these are the things I would include (or have a plan to include). The easiest time to include something in your application is at the start. On the other hand, you're likely time-poor and there's no point on burning all your runway on a gold-plated hello world! application. https://blacksheepcode.com/posts/if_i_were_building_something_from_scratch https://blacksheepcode.com/posts/if_i_were_building_something_from_scratch Mon, 13 Jan 2025 00:00:00 GMT I'm apprehensive about using too many AI-generated images in my blog. I'm worried that the blog will look samey and like more-ai-slop-everywhere. https://blacksheepcode.com/posts/im_apprehensive_about_using_too_many_ai_images https://blacksheepcode.com/posts/im_apprehensive_about_using_too_many_ai_images Wed, 02 Jul 2025 00:00:00 GMT I'm going off MDX for blogging I like standardised formats like markdown. MDX allows markdown, plus sprinkle in some React. However, I'm considering that maybe I'd be better off just using React. https://blacksheepcode.com/posts/im_going_off_mdx_for_blogging https://blacksheepcode.com/posts/im_going_off_mdx_for_blogging Wed, 23 Apr 2025 00:00:00 GMT Examples of tooling that do not play nicely with ESM EcmaScript Modules (ESM) are well established - leading some to argue that we no longer need to provide CJS packages. However, is that really the case? https://blacksheepcode.com/posts/list_of_tooling_that_does_not_play_nicely_with_esm https://blacksheepcode.com/posts/list_of_tooling_that_does_not_play_nicely_with_esm Tue, 19 Nov 2024 00:00:00 GMT The behaviour of browsers and loading resources - HTML, images, and CSS Browsers do not need to wait for an entire HTML document to be loaded before it can display it. CSS is render blocking. Images will start streaming as soon as the tag is encountered. https://blacksheepcode.com/posts/loading_optimisations_part_1 https://blacksheepcode.com/posts/loading_optimisations_part_1 Thu, 31 Oct 2024 12:00:00 GMT The behaviour of browsers and loading resources - Scripts JavaScript scripts cannot be evaluated until they have been completely loaded. By default they are parse blocking. https://blacksheepcode.com/posts/loading_optimisations_part_2 https://blacksheepcode.com/posts/loading_optimisations_part_2 Thu, 31 Oct 2024 13:00:00 GMT Two caching strategies There are generally two strategies for caching, 'cache, but require validation' and 'trust what you've already got without caching'. The latter is well suited for caching static assets. https://blacksheepcode.com/posts/loading_optimisations_part_3 https://blacksheepcode.com/posts/loading_optimisations_part_3 Tue, 19 Nov 2024 00:00:00 GMT Module behaviour in browsers - loading waterfalls, module preloading, cache invalidation cascades and import maps. Browsers now support ESM modules natively - meaning that we no longer need to bundle our modular code. However be aware that naive use of ESM modules may lead to unperformant loading waterfalls. Our options: bundle, use dynamic imports, or preload our modules. https://blacksheepcode.com/posts/loading_optimisations_part_4 https://blacksheepcode.com/posts/loading_optimisations_part_4 Tue, 26 Nov 2024 00:00:00 GMT Migrating from Remix to NextJS NextJS appears to well and truely established. These are the steps I followed to migrate from Remix 1.9.3 to Next 14. https://blacksheepcode.com/posts/migrating_from_remix_to_next https://blacksheepcode.com/posts/migrating_from_remix_to_next Mon, 09 Sep 2024 00:00:00 GMT No, react context is not causing too many renders A lot of people are under the impression that context shouldn't be used to store state, because it'll cause the entire application tree to re-render. This is a misnomer. https://blacksheepcode.com/posts/no_react_context_is_not_causing_too_many_renders https://blacksheepcode.com/posts/no_react_context_is_not_causing_too_many_renders Fri, 09 May 2025 00:00:00 GMT The nuance of React rendering behaviour as it relates to children Components that are passed as props.children and components that are directly declared by a component have different rendering behaviour - yet they are both just called 'children'. The adoption of React 19's compiler might mean that this distinction does not matter. https://blacksheepcode.com/posts/nuance_of_react_rendering_behaviour https://blacksheepcode.com/posts/nuance_of_react_rendering_behaviour Mon, 22 Sep 2025 00:00:00 GMT Assume the next developer will copy paste what they see you do. (That next developer might be you.) It's not a criticism of developers to suggest that they'll copy paste what they already see in a codebase. Programming is complex and we'll use whatever hueristic we can to reduce what we need to think about. https://blacksheepcode.com/posts/philosophy_assume_the_next_developer_will_copy_paste https://blacksheepcode.com/posts/philosophy_assume_the_next_developer_will_copy_paste Mon, 18 Nov 2024 00:00:00 GMT Psychological pitfalls of using artificial intelligence - a heightened sense of urgency AI can provide a lot of content very quickly, and we can feel the need to match its pace. https://blacksheepcode.com/posts/psychological_pitfalls_of_ai_urgency https://blacksheepcode.com/posts/psychological_pitfalls_of_ai_urgency Mon, 15 Jun 2026 00:00:00 GMT How to publish a React component package, using NextJS as the compiler Although your component library may not be making use of React Server Components and the like, it can be helpful to see how the component behaves in a NextJS context. https://blacksheepcode.com/posts/publish_a_react_package_using_nextjs_as_a_base https://blacksheepcode.com/posts/publish_a_react_package_using_nextjs_as_a_base Fri, 23 Aug 2024 00:00:00 GMT How to prevent further modification commits to a file with a pre-commit hook Sometimes you want to prevent accidentally modifying sets of test fixtures etc. Use this simple pre-commit hook to prevent it. https://blacksheepcode.com/posts/quick_tip_protect_committing_file_modifications https://blacksheepcode.com/posts/quick_tip_protect_committing_file_modifications Tue, 25 Feb 2025 00:00:00 GMT How to create an imperative useConfirmationModal hook Avoid a bunch of state hooks and handlers in your code for things like confirmation modals by encapsulating that kind of logic away in a hook. https://blacksheepcode.com/posts/react_bits_imperative_confirmation_modal https://blacksheepcode.com/posts/react_bits_imperative_confirmation_modal Wed, 20 Nov 2024 00:00:00 GMT Reasons to be a token miser There is a school of thought that says 'Just throw money at the problem' - here's why you should be constantly optimising your token usage. https://blacksheepcode.com/posts/reasons_to_be_a_token_miser https://blacksheepcode.com/posts/reasons_to_be_a_token_miser Wed, 27 May 2026 00:00:00 GMT Reasons to not use GraphQL GraphQL is one of the cool kids in modern web development - but I generally recommend against using it. https://blacksheepcode.com/posts/reasons_to_not_use_graphql https://blacksheepcode.com/posts/reasons_to_not_use_graphql Mon, 30 Jun 2025 00:00:00 GMT How to create a responsive React hook to listen for changes to cookies Your React components may wish to listen for changes to made to cookies, whether they were made by other React code, or HTTP requests or non-React JavaScript. The CookieStore API can help. https://blacksheepcode.com/posts/responsive_cookies_for_react https://blacksheepcode.com/posts/responsive_cookies_for_react Wed, 02 Oct 2024 18:00:00 GMT Using cookies in React Server Components to avoid a flash the incorrect content. We make use of NextJS's `cookies` function to access the cookies on the server side. https://blacksheepcode.com/posts/server_side_responsive_cookies_for_react https://blacksheepcode.com/posts/server_side_responsive_cookies_for_react Wed, 02 Oct 2024 19:00:00 GMT Some problems only exist when you are new to the organisation New people to the organisation have fresh eyes and can spot issues that old hats might well be used to. But those things don't necessarily need to be fixed. https://blacksheepcode.com/posts/some_problems_only_exist_when_you_are_new_to_the_organisation https://blacksheepcode.com/posts/some_problems_only_exist_when_you_are_new_to_the_organisation Wed, 08 Jul 2026 00:00:00 GMT A comprehensive guide to testing with Easy-Markdown-Editor Easy Markdown Editor is a handy markdown editor with formatting keyboard shortcuts. This post outlines how to write tests for applications using it, using either Testing Library or Cypress. https://blacksheepcode.com/posts/testing_easy_mde https://blacksheepcode.com/posts/testing_easy_mde Thu, 19 Oct 2023 00:00:00 GMT React testing patterns: When making a change to a leaf component breaks tests further up the tree A common pain point in testing React applications is when we make a change to a component that exists down the component tree, and this change causes breaks in multiple components that directly or indirectly consume this component. Here we outline some strategies for mitigating this problem. https://blacksheepcode.com/posts/testing_patterns_changing_a_leaf_breaks_the_root https://blacksheepcode.com/posts/testing_patterns_changing_a_leaf_breaks_the_root Fri, 13 Dec 2024 00:00:00 GMT Testing strategies for a Single Page Application as it relates to state management The presence of state management is often what makes testing an Single Page Application difficult. Various approaches such as API mocking, dependency injection, component composition and error boundaries can help. https://blacksheepcode.com/posts/testing_strategies https://blacksheepcode.com/posts/testing_strategies Tue, 10 Oct 2023 00:00:00 GMT The case for adding a 'this file was generated by AI' header It helps not gaslight anyone reading the code https://blacksheepcode.com/posts/the_case_for_an_ai_header https://blacksheepcode.com/posts/the_case_for_an_ai_header Wed, 01 Jul 2026 00:00:00 GMT The case for blackbox tests Blackbox tests do not require knowledge of the implementation details - they're a 'how the consumer sees it' style of test. https://blacksheepcode.com/posts/the_case_for_blackbox_tests https://blacksheepcode.com/posts/the_case_for_blackbox_tests Mon, 17 Apr 2023 00:00:00 GMT The case for clear code ownership Clear code ownership = developers proud of their work, high quality code https://blacksheepcode.com/posts/the_case_for_clear_code_ownership https://blacksheepcode.com/posts/the_case_for_clear_code_ownership Thu, 25 Jun 2026 00:00:00 GMT The case for splitting Cypress tests into multiple it blocks Cypress recommends long running tests with lots of assertions. I argue that it would be helpful if we had granular visibility of the parts of the test. https://blacksheepcode.com/posts/the_case_for_splitting_tests_into_multiple_it_blocks https://blacksheepcode.com/posts/the_case_for_splitting_tests_into_multiple_it_blocks Fri, 11 Nov 2022 00:00:00 GMT The horseshoe model for software development I propose that the designer and the QA should be one and the same. https://blacksheepcode.com/posts/the_horse_shoe_theory_of_software_development_lifecycle https://blacksheepcode.com/posts/the_horse_shoe_theory_of_software_development_lifecycle Fri, 11 Aug 2023 00:00:00 GMT The natural state of software is chaos The perfect codebase is a myth. Abondon the pursuit of it, and instead seek to contain the mess. https://blacksheepcode.com/posts/the_natural_state_of_software_is_chaos https://blacksheepcode.com/posts/the_natural_state_of_software_is_chaos Tue, 24 Sep 2024 00:00:00 GMT The problem of testability in React It seems like there are no perfect solutions for testing in React. https://blacksheepcode.com/posts/the_problem_of_testability_in_react https://blacksheepcode.com/posts/the_problem_of_testability_in_react Thu, 25 Jul 2024 00:00:00 GMT The time required to wait for a job to complete - changes the workflow for how you do it There's a big difference between a job that takes one hour, vs a job that takes one minute vs a job that takes less than a second https://blacksheepcode.com/posts/the_time_a_task_takes_changes_your_workflow https://blacksheepcode.com/posts/the_time_a_task_takes_changes_your_workflow Wed, 27 May 2026 00:00:00 GMT The tool I want to exist - an API mocking tool that generates mock data by observing real world usage. Mocking API calls, particularly multiple interlinked calls can be cumbersome. I want a tool to do it for me. https://blacksheepcode.com/posts/the_tool_I_want_to_exist https://blacksheepcode.com/posts/the_tool_I_want_to_exist Tue, 04 Feb 2025 00:00:00 GMT This blog now features comments You can very easily add comment functionality to a webpage via the Github-powered Utterances plugin. https://blacksheepcode.com/posts/this_blog_now_features_comments https://blacksheepcode.com/posts/this_blog_now_features_comments Fri, 24 Mar 2023 00:00:00 GMT Thoughts about JSON API JSON API is an opinionated REST API structuring spec. I think it has some good ideas about what can be useful in a RESTful API, but ultimately the complexity of using it makes it not worth using. https://blacksheepcode.com/posts/thoughts_about_json_api https://blacksheepcode.com/posts/thoughts_about_json_api Mon, 06 Mar 2023 00:00:00 GMT Today I learned: The Etc/GMT+x timezones actually mean UTC-x Counter-intuitively Etc/GMT+x timezones means the opposite of how they appear in an ISO 8601 formatted date string. https://blacksheepcode.com/posts/til_etc_timezone_is_backward https://blacksheepcode.com/posts/til_etc_timezone_is_backward Mon, 21 Aug 2023 00:00:00 GMT Tools I Want: A VSCode plugin that highlights how often an error appears in Sentry, or other monitoring tools I liberally throw errors defensively, often not expecting the error scenario to ever actually occur - it would be nice if I could see some real metrics about how often a thing is occurring, without having to leave the IDE. https://blacksheepcode.com/posts/tools_I_want_vscode_sentry_plugin https://blacksheepcode.com/posts/tools_I_want_vscode_sentry_plugin Thu, 20 Feb 2025 00:00:00 GMT Tools I like: @inquirer/prompts @inquirer/prompts is a JavaScript library for creating interactive CLI prompt menus https://blacksheepcode.com/posts/tools_i_like_enquirer https://blacksheepcode.com/posts/tools_i_like_enquirer Wed, 30 Jul 2025 00:00:00 GMT Tools I like: git checkout interactive gci is an interactive CLI utility to select a git branch with arrow keys. https://blacksheepcode.com/posts/tools_i_like_gci https://blacksheepcode.com/posts/tools_i_like_gci Wed, 12 Jun 2024 00:00:00 GMT TypeScript - indexing into a mapped type Indexing into a mapped type a powerful TypeScript technique to allow a collection of all different types, while retaining the type information. https://blacksheepcode.com/posts/typescript_bits_indexing_into_a_mapped_type https://blacksheepcode.com/posts/typescript_bits_indexing_into_a_mapped_type Mon, 14 Oct 2024 00:00:00 GMT TypeScript types are inferred in a forward direction TypeScript's type inference is powerful, but it does have constraints. One constraint is that it can't retrospectively narrow types. https://blacksheepcode.com/posts/typescript_bits_types_are_inferred_forwards https://blacksheepcode.com/posts/typescript_bits_types_are_inferred_forwards Mon, 14 Oct 2024 00:00:00 GMT User Experience reflects the underlying data structure I propose a variation of Conway's Law. https://blacksheepcode.com/posts/user_experience_reflects_data_structures https://blacksheepcode.com/posts/user_experience_reflects_data_structures Thu, 01 Dec 2022 00:00:00 GMT Well designed code is easy to delete The mark of some well designed code is that the act of replacing it is some what straight forward. https://blacksheepcode.com/posts/well_designed_code_is_easy_to_delete https://blacksheepcode.com/posts/well_designed_code_is_easy_to_delete Wed, 23 Apr 2025 00:00:00 GMT What is the role of QA and how should their tests fit into the development process? If we're doing shift-left testing, and developers are writing their own tests - then where does that leave QA? https://blacksheepcode.com/posts/whats_the_role_of_qa https://blacksheepcode.com/posts/whats_the_role_of_qa Tue, 19 Apr 2022 00:00:00 GMT Where are the prompts to stop humans going off the rails? Humans are just as finicky as AI https://blacksheepcode.com/posts/where_are_the_promptss_to_stop_humans_going_of_the_rails https://blacksheepcode.com/posts/where_are_the_promptss_to_stop_humans_going_of_the_rails Fri, 03 Jul 2026 00:00:00 GMT Why I don't like API mocking as a necessary frontend testing strategy A lot of state management frameworks recommend doing API mocking as the testing strategy. I think dependency injection is a better approach. https://blacksheepcode.com/posts/why_i_dont_like_api_mocking https://blacksheepcode.com/posts/why_i_dont_like_api_mocking Mon, 12 Dec 2022 00:00:00 GMT Why I've gone off React Testing Library React Testing Library is perhaps the most popular tool for testing React applications. However its use of JSDOM under-the-hood means we often spend time dealing with browser APIs that JSDOM has not implemented. https://blacksheepcode.com/posts/why_ive_gone_off_react_testing_library https://blacksheepcode.com/posts/why_ive_gone_off_react_testing_library Thu, 08 Feb 2024 00:00:00 GMT