The moment Musk said that my jaw dropped. I didn’t follow the guy, knew he wasn’t the genius he said he was, but that drove the final nail in my opinion. Fuck me, I can carely “code” PowerShell, but I know the goal is short, easy to read, elegant code. We’re I working at Twitter at the time,
# This code creates the log file
# We’re not going to check if it exists
# because we want to start with a fresh log each time this runs
# so we’ll overwrite the old log, if there was one
The moment Musk said that my jaw dropped. I didn’t follow the guy, knew he wasn’t the genius he said he was, but that drove the final nail in my opinion. Fuck me, I can carely “code” PowerShell, but I know the goal is short, easy to read, elegant code. We’re I working at Twitter at the time,
# This code creates the log file
# We’re not going to check if it exists
# because we want to start with a fresh log each time this runs
# so we’ll overwrite the old log, if there was one
# because we don’t care in this case
$LOG_FILE = “C:\Scripts\Logs\Archive-Documents.log”
# Now we have a log file.
BAM! 9 lines from 1! I’m awesome!