Skip to content

Instantly share code, notes, and snippets.

swlaschin

Block or report user

Report or block swlaschin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@swlaschin
swlaschin / fsharpjobs.md
Last active Dec 30, 2019
My suggestions on how to look for F# jobs
View fsharpjobs.md

How to find F# jobs

People often ask me how to find F# jobs. I don't have any special connections to companies using F#, and I don't have any special tricks either. I wish I did!

So, given that, here's my take on F# jobs.

Job hunting

For job hunting my suggestions are:

@swlaschin
swlaschin / booklist.md
Created Dec 4, 2019
Some recommended books for improving as a software developer
View booklist.md

Some recommended books for improving as a software developer

Most software books are too language specific and go out of date too quickly. What I find has stayed with me are books about bigger concepts, such as systems thinking and complexity, and also so-called "soft skills" such as management and psychology.

User experience

  • "The Design of Everyday Things" by Donald Norman
  • "Don't Make Me Think" by Steve Krug
  • "About Face: The Essentials of Interaction Design" by Alan Cooper
@swlaschin
swlaschin / NewsDomainDtoExample.fsx
Last active Nov 17, 2019
Demonstrates DTO validation for a news feed domain
View NewsDomainDtoExample.fsx
(*
Demonstrates DTO validation for a news feed domain
*)
// "result.fsx" comes from https://github.com/swlaschin/DmmfWorkshop/blob/master/src/E-ModelingErrors/Result.fsx
#load "result.fsx"
module Domain =
type DocumentId = DocumentId of int
type EmailAddress = EmailAddress of string
@swlaschin
swlaschin / merge.fsx
Created Aug 16, 2019
Merge with custom update/insert/delete actions
View merge.fsx
module Util =
/// Merge a new list into an old list.
/// The sortKey is used to sort and compare the keys.
/// The insert/update/delete actions are called as appropriate. They return Options so that
/// you can filter at the same time.
let merge oldList newList sortKey insertAction updateAction deleteAction =
let rec innerMerge oldList newList =
match oldList,newList with
@swlaschin
swlaschin / FsCsInterop.md
Last active Nov 27, 2019
F# to C# interop tips
View FsCsInterop.md

Tips on exposing F# to C#

Api and Methods

I suggest that you create one or more Api.fs files to expose F# code in a C# friendly way.

In this file:

  • Define functions with PascalCase names. They will appear to C# as static methods.
  • Functions should use tuple-style declarations (like C#) rather than F#-style params with spaces.
@swlaschin
swlaschin / linq2fs.md
Last active Aug 14, 2019
C# LINQ -> F# equivalent
View linq2fs.md
@swlaschin
swlaschin / WorkflowTemplate.fsx
Created May 13, 2019
Workflow Template example
View WorkflowTemplate.fsx
#load "Result.fs"
// ==================================
// Example of workflows with Onion architecture
// ==================================
let notImplemented() = failwith "not implemented"
// ==================================
// pure workflow
@swlaschin
swlaschin / testutils.fs
Last active Apr 29, 2019
Test utilities
View testutils.fs
module TestUtils
// Utilities for tests
/// Helper for testing only! Do not use in production!
let getOk result =
match result with
| Ok v -> v
| Error _ -> failwith "Error not expected"
View AsyncExample.fs
namespace AsyncExample
// requires Result.fs from https://github.com/swlaschin/DomainModelingMadeFunctional/blob/master/src/OrderTaking/Result.fs
open System
open System.Net
module SimpleAsyncExample =
let makeAsync name = async {
printfn "Started %s" name
You can’t perform that action at this time.