GithubHelp home page GithubHelp logo

aoc-2022-csharp's Introduction

2022 Advent of Code (C#)

This repository implements solutions to the puzzles in the 2022 Advent of Code using C#.

Preface

This was a vehicle to learn C#, so I presume not everything done here will be deemed idiomatic by language specialists.

Generally speaking, the solutions are organised predominantly for comprehension. They strive to arrive at an answer in a reasonable period of time, but they typically prioritise optimal understanding over optimal performance.

The examples are representative of my thinking and coding style.

Getting Started

Prerequisites

The project requires .Net 8.0, but any reasonably current version of .Net will likely work. I tend to code done the middle of any language specification.

If you use a .Net manager that responds to .tool-versions, you should be switched to correct version automatically. I recommend ASDF for those on platforms that support it.

Installation

The project has a small Makefile that scripts common build, run, and test commands.

$ make build
$ make clean
$ make run
$ make verify

File Structure

  • app: A console app that invokes a given day's runner.
  • data: Puzzle input organised by day
  • lib: Homegrown utilities
  • site: A local version of the instruction pages
  • src: Puzzle solutions organised by day
  • test: A simple set of regression tests

Running Daily Solutions

Modify the code in the simple console application in /app/Program.cs.

Then, simply execute the following command in your terminal from the project root.

$ make run

Running Tests

The only tests are a set of checks to verify solved puzzles.

I often refactor my solutions for clarity (or as I learn new techniques in subsequent puzzles), so it is helpful to have these simple tests to give my refactors some confidence.

To execute the tests, simply execute the following command in your terminal from the project root.

$ make verify

aoc-2022-csharp's People

Contributors

jdugan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.