Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .devcontainer/f-sharp/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "F-Sharp",
"image": "mcr.microsoft.com/devcontainers/dotnet:9.0",
"postCreateCommand": "make init",
"workspaceFolder": "/workspaces/interviews/f-sharp",
"customizations": {
"vscode": {
"settings": {
"liveshare.allowGuestDebugControl": true,
"liveshare.allowGuestTaskControl": true,
"liveshare.languages.allowGuestCommandControl": true,
"liveshare.publishWorkspaceInfo": true,
"extensions.ignoreRecommendations": true,
"workbench.startupEditor": "readme",
"git.openRepositoryInParentFolders": "never",
"git.autofetch": true,
"chat.disableAIFeatures": true
},
"extensions": [
"ms-vsliveshare.vsliveshare",
"ms-dotnettools.csharp",
"ms-dotnettools.csdevkit",
"ionide.ionide-fsharp",
"-github.copilot-chat"
]
}
}
}
2 changes: 2 additions & 0 deletions f-sharp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin
obj
13 changes: 13 additions & 0 deletions f-sharp/Application/Application.fsproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<Compile Include="Greeting.fs" />
<Compile Include="Program.fs" />
</ItemGroup>

</Project>
4 changes: 4 additions & 0 deletions f-sharp/Application/Greeting.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module Greeter

let greet name =
sprintf "Hello, %s!" name
3 changes: 3 additions & 0 deletions f-sharp/Application/Program.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
open System

Greeter.greet "World" |> Console.WriteLine
4 changes: 4 additions & 0 deletions f-sharp/FSharp.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<Solution>
<Project Path="Application/Application.fsproj" />
<Project Path="UnitTests/UnitTests.fsproj" />
</Solution>
10 changes: 10 additions & 0 deletions f-sharp/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
init:
dotnet build

verify:
dotnet test

run:
dotnet run --project Application

.PHONY: init verify run
29 changes: 29 additions & 0 deletions f-sharp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# F# Technical Interview

We're excited to pair with you on a coding kata!

You will use this solution to write your code and tests to solve the problem of the kata below. We will gradually add requirements as we move through the problem and get a feel of what it's like to work with you in a real-world situation. Take your time, explain your thinking, and have fun with us! Show off your skills and ask any questions you have and we'll do the same.

## Tech Stack
- .NET with F#
- xUnit

## Common Commands
- `make init`
- build the project
- `make verify`
- run tests
- `make run`
- run the application

## Kata

This section of the README is used to describe the kata and outline the requirements. We'll leave it blank in the public repository to keep the mystery alive, but just know that the kata we have planned is really fun!

### Introduction

### Requirements

1. Requirement 1
2. Requirement 2
3. Requirement 3
9 changes: 9 additions & 0 deletions f-sharp/UnitTests/Tests.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module Tests

open Xunit

[<Fact>]
let ``Greet returns formatted message`` () =
let result = Greeter.greet "World"

Assert.Equal("Hello, World!", result)
23 changes: 23 additions & 0 deletions f-sharp/UnitTests/UnitTests.fsproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<Compile Include="Tests.fs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.4" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Application\Application.fsproj" />
</ItemGroup>

</Project>