- Unit tests: Review unit tests first. Unit tests are a fantastic way to grasp how code is meant to be used by others and to learn what the expected behavior is. Are there any test gaps that should be there?
- Method arguments" Make sure arguments to methods make sense and are validated. Mentally test boundary conditions and edge cases.
- Null References" (Yah yah, we know. Use F# and this goes away. We get it already.) Null references are a bitch and it’s worth looking out for them specifically.
- Conventions Consistency" Make sure naming, formatting, etc. follow our conventions and are consistent. I like a codebase that’s fairly consistent so you know what to expect.
- Disposables: Make sure disposable things are disposed. Look for usages of resources that should be disposed but are not.
- Security: There is a whole threat and mitigation review process that falls under this bucket. In simple terms, ask yourself how this code could be exploited. The [STRIDE Threat Mo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let name = Something.Data.Methods | |
|> Seq.filter (fun x-> x.C > 0UL) | |
|> Seq.sortBy (fun x-> 999999999999UL - x.C) | |
|> Seq.take 50 | |
|> Seq.iter dump_minfo | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type VersionNumber = | |
| Major of major: int | |
| Minor of major: int * minor: int | |
| Patch of major: int * minor: int * patch: int | |
type Version = | |
| Release of VersionNumber | |
| PreRelease of VersionNumber * string | |
static member create (x) = Release (Major x) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using FSharpx; | |
using Microsoft.FSharp.Core; | |
using NUnit.Framework; | |
namespace FunctionalErrorHandling | |
{ | |
public static class Extensions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#I "../packages/FSharp.Charting.0.90.5" | |
#I "../packages/Deedle.0.9.12" | |
#I "../packages/RProvider.1.0.5/" | |
#load "FSharp.Charting.fsx" | |
#load "Deedle.fsx" | |
#load "RProvider.fsx" | |
open System | |
open System.IO | |
open Deedle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type FileSetBuilder() = | |
member x.Delay f = f | |
member x.Run f = f() |> Scan | |
member x.Yield (()) = { Include "" with Includes = [] } | |
[<CustomOperation ("take", MaintainsVariableSpace = true)>] | |
member x.Take (fs, pattern: string) = fs ++ pattern | |
[<CustomOperation ("notTake", MaintainsVariableSpace = true)>] | |
member x.NotTake (fs: FileIncludes, pattern: string) = fs -- pattern |