Easy-level Cardano interview questions covering blockchain basics, Plutus, and development. Q1: What is Cardano and how does it work? Answer: Cardano is a proof-of-stake blockchain platform. Key Features: Ouroboros: Proof-of-Stake consensus Plutus: Smart contract language Formal Verification: Mathematically verified …
Read MoreHaskell Essentials
Essential Haskell patterns covering pure functions, type classes, monads, functors, and common idioms for functional programming. Use Case Use these patterns when you need to: Write pure functional code Understand Haskell's type system Work with monads and functors Handle side effects functionally Basic Syntax 1-- …
Read MoreCommon code smells in Haskell and how to fix them. Partial Functions 1-- ❌ Bad: head can fail 2getFirst :: [a] -> a 3getFirst xs = head xs 4 5-- ✅ Good: Use Maybe 6getFirst :: [a] -> Maybe a 7getFirst [] = Nothing 8getFirst (x:_) = Just x Not Using Pattern Matching 1-- ❌ Bad 2processResult :: Either String Int …
Read MoreSecure coding practices for Haskell applications. SQL Injection Prevention 1-- ❌ Vulnerable 2import Database.PostgreSQL.Simple 3getUserBad :: Connection -> String -> IO [User] 4getUserBad conn username = 5 query_ conn $ fromString $ "SELECT * FROM users WHERE username = '" ++ username ++ …
Read MoreTools for checking vulnerabilities in Haskell code. Cabal Outdated 1# Check outdated dependencies 2cabal outdated 3 4# Update dependencies 5cabal update 6cabal install --only-dependencies HLint 1# Install 2cabal install hlint 3 4# Run on project 5hlint src/ 6 7# Apply suggestions 8hlint src/ --refactor …
Read More