by dogleash · 1y ago · 0 comments
Can you though? Or is just not bad enough for your coworkers to bother telling you how bad it is?
I use AIs daily. But that doesn't mean I don't get mad when I'm reviewing a coworker's work and have to fight whatever bullshit an AI convinced them. I can't just brush it off as AI nonsense because 1) it might be their honest attempt at work without AI and 2) if it is AI they've already proven they don't know how to improve it.
Take a look at this Haskell program that LLM wrote. I do not write Haskell, but I can review the code just fine to say that this is doing what I want.
-- Simple multiplication function
multiply :: Num a => a -> a -> a
multiply x y = x * y
-- Main function for running the program
main :: IO ()
main = do
putStrLn "Enter the first number:"
input1 <- getLine
putStrLn "Enter the second number:"
input2 <- getLine
let num1 = read input1 :: Double
let num2 = read input2 :: Double
let result = multiply num1 num2
putStrLn $ "Result: " ++ show num1 ++ " * " ++ show num2 ++ " = " ++ show result
If I had to write this by myself, it'd have taken atleast 20mins. First I have to be learn how main function is setup, how type definitions work, what putStrLn is, how to get an input, how to define a multiple function etc etc.It really is an NP problem, come to think of it.
So did you learn all of that from just glancing at this snippet?