I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Hello software developers,
Please check your code to ensure you're not making one of the following mistakes related to cryptography.
- Writing your own home-grown cryptography primitives (For example: Mifare Classic)
- Exception: For the sake of learning, but don't deploy it in production.
- Using a fast hash function (e.g. MD5, SHA256) for storing passwords. Use bcrypt instead.
- Not using a cryptographically secure random number generator
// General hints on defining types with constraints or invariants | |
// | |
// Just as in C#, use a private constructor | |
// and expose "factory" methods that enforce the constraints | |
// | |
// In F#, only classes can have private constructors with public members. | |
// | |
// If you want to use the record and DU types, the whole type becomes | |
// private, which means that you also need to provide: | |
// * a constructor function ("create"). |
I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.
For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.
Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.
Cherry pick multiple commits from a remote or upstream branch into your local branch.
Saw this from a comment on an answer on Stack Overflow
git fetch upstream
git cherry-pick A^..B
#r "System.Xml.dll" | |
#r "System.Runtime.Serialization.dll" | |
open Microsoft.FSharp.Reflection | |
open System.IO | |
open System.Reflection | |
open System.Runtime.Serialization | |
open System.Runtime.Serialization.Formatters.Binary | |
open System.Runtime.Serialization.Json | |
open System.Text |
open System.Collections.Generic | |
open Microsoft.FSharp.Collections | |
[<RequireQualifiedAccess>] | |
module Folds = | |
// These are the fast implementations we actually want to use |
# If this script is throwing an error near a Unicode symbol try resaving the file as UTF-8 with BOM | |
$psmodules = ";~\Documents\WindowsPowerShell\Modules" | |
# sometimes the module paths has been fucked before posh loads, but that won't stop us | |
$env:PSModulePath = $env:PSModulePath + $psmodules | |
# Set the OutputEncoding to Unicode so that the λ renders properly | |
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8 | |
Thanks to Sergey Tihon for running F# Weekly and F# Advent.
Thanks to manofstick for trying out the code and coming with invaluable feedback. Cistern.ValueLinq is very impressive.
There were many interesting improvements in F#6 but one in particular caught my eye, the attribute InlineIfLambda
.