Skip to content

Instantly share code, notes, and snippets.

@yifeiwu
Last active January 4, 2018 05:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yifeiwu/b60c28afd5b1965af2c8fddf69ab592b to your computer and use it in GitHub Desktop.
Save yifeiwu/b60c28afd5b1965af2c8fddf69ab592b to your computer and use it in GitHub Desktop.
How to Program?
“Ok API page open… syntax page open… lets do this!”
“Ok, so... I need to use a regular expression....”
Pause
“I need to google regular expression”
Google it
“I still have no idea what it is, but I’ll wing it”
Reads documentation for API
“Ok so I just write the regular expression using the defined PROPERTY and then combine those with VALUES to make the regular expression do the thingy I want”
Slow head tilt
“Fuck, what’s a regular expression again?”
Google regular expression
“Ohh that’s right I remember I’ve got no fucking idea, fuck it I’ll wing it”
Pause, look at screen....
“Wait... what was I doing?”
Looks at 24 open tabs
“Unmmm, oh yeh I need to ....”
Click through four tabs
“Where’s my page?”
Realise it’s in a seperate incognito window.
“Ok... so... to make the expression thingy I need to type....”
Swear loudly. Minimise window, find syntax examples. Click back to api window
“Ahh yeh that’s right... so... I put $(user.email)..... wait.. why is it red”
Click back to syntax page
“Wait... is this a property or a value? How do I even .... ohhhh I didn’t put a { first”
Click back to API page
“Ok so {(user.email)”
Scream FUCK so loud the entire office turns
“Oh... never mind all, forgot the $”
Go for smoke as I’m frustrated. Come back to desk.
“Ok, so, wait... what the fuck is a regular expression”
Programmers around me glare in disbelief.... how can he not grasp this they think.
“Ahh Wait, no ok, so $({user.email)”
Slam keyboard
“Why is it red again!!!!, oh brackets wrong way around.....”
Calm myself.
“Ok so... ${(user.email)”
Jump from chair with joy!!!
“It’s green!!!! Ok so now I just need to do the thingy to turn the email into another thingy... property... value thing ....”
Pause
Slink back into chair.
Quietly look at syntax page
Realise I don’t remember what a value or a property is.
“Ok.... breathe Dave.... I just need to finish this, so... ${(user.email)... Wait.... I want to convert user.email to another email address so..... wait... what’s a regular expression... fuck... fuck...”
Sob quietly
“Ok so I need to define the property I want to use, give it a value, then the conversion value.....”
Look at API web page.... realise my session logged out.....
Shake uncontrollably.....
Reopen page.... auth, get password wrong as its my sandbox account. Try again, get it wrong as the sandbox account uses a different domain. Spend ten minutes until I realise this is the issue, but I have locked myself out and need to do a password reset now. Log back in, realise it has 2fa and look for my phone, 2fa session times out… repeat process and log in.
Finally get back to where I started.
“Ok so... ${(user.email) is the value so ... no... it’s a property ….property value?. string value is… different?.. so. It’s immutable and I need to define the .......ahhhh ok so so... I need to use replace as the property, and the VALUE will be user.email. So…. ${replace(user.email)... what why is it red again!!!!!!”
Look out window… ponder how I ended up here since I was meant to just turn shit off and on….. look at my boss. He looks quickly down at keyboard…. smart enough to not engage.
Slam keyboard.
Go back to syntax page.
“Ohhhhh right, if you use a property you need to specify f:property”
Type f:property
Syntax is red…
GROAN
Put a $f:property
Still red…..
“ohhh ohh, they mean property as in the variable name for it, not the word… so it would be $f:replace…. of course”
Type $f:replace
Syntax is red
Hold back tears….. c’mon Dave you can do it….
Stare at screen and ponder what it all means in the grand scheme of the existential nightmare that is existence…..
Feel sad I will never see the rings of Saturn or be creative or a fireman, or policeman or actor or writer….
Realise life is so short it’s unfair to be stuck doing this crap.
Waste ten minutes whining to the people around me so they know JUST HOW HARD my job is while also stopping them from doing theirs.
Go back to syntax page.
“Ok.. so …. right you … you still need those brackets….. so $(f:replace”
Syntax red
Stand up make eye contact with colleagues and stifle my tears.
Sit back down.
“Ok .. ok why is the…. “
Click back to 15 different open textedit windows with the first part of the script that works I may or may not have pasted in one… find 14 ones that don’t before I find the one that does
“Ok… SO. Ok, so ${f:property
RED
Realise instantly and type ${f:replace(user.email)
Syntax goes red.
Slam desk, push chair out and storm out half crying and screaming.
“I’m not a fucking programmer I shouldn’t have to do this! I hate my life! I wish I was dead!!!!!!!”
Go home
Come in the next day. Open api and syntax page while sitting in quiet room
${f:replace(user.email, “ule@hest.io”, “sharedmailbox@st.io”)}
Green.
Smile smugly that I am without a doubt, the hardest working and smartest man alive…..
Realise the code won’t work for its intended purpose.
Google the problem. Find a solution in two minutes. Copy and paste the code.
It works.
Repeat process weekly.
I hate programming.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment