Just did a job interview leetcode and they asked me to implement rock paper scissors.
X = youY = Opponenta = rockb= paperc= scissorsIf X = Y, rerun eventIf Xa and Yb, you winIf Ya and Xb, opponent winsAnd so on....
>>61527461How fucked am I if I just never do a coding interview? My skillset is more telecom networking but I still cooooode for work.Most jobs I've got they basically just decided they liked me and went off vibes (I am good at what I do).
>>61527461I should have quit my job several times over for better pay but the dancing monkey routine of job interviews puts me off.
>>61527609Same and I'm already at boomer daycare so it would be kind of dumb to leave even though I still strive to be more ambitious. It doesn't seem worth a tiny pay bump, possibly no pay bump if I have to pivot into new skills.
>>61527473I started computer science at university. Had no prior coding experience and they gave homework in the first week to code tic tac toe. I sat 2 days on it but finally managed for it to work. Then I asked chatgpt to code tic tac toe and it threw out a few lines of code in a dew seconds. Then I compared this code to my 100+ line abomination. I got so demotivated that I stopped going to uni
>>61527689Dude, you're supposed to learn at uni
>>61527689A lot of university skirts around teaching an actual language.As a result, a LOT of CS grads suck at programming in any given language, because the extent of their university training for *actually programming* is to do a project or two that feels like it was hard work but is actually just like 20 LOC using the libraries everyone everywhere already uses (or the native shit your teacher didn't tell your your language could already do, esp. in Python).Yeah string manipulation is silly and tedious that's why a lot of languages already have libraries to handle it will CS courses top making this half a semester of projects.
>>61527461And? You find it way too easy. or way too hard?By the way, it's very easy, you can do it with a random generator, and some if statements.
>>61527473>That messy, reptitive codingYou fail. Next!
2.52 seconds with ChatGPTimport randomchoices = ["rock", "paper", "scissors"]def winner(player, computer): if player == computer: return "It's a tie!" if ( (player == "rock" and computer == "scissors") or (player == "paper" and computer == "rock") or (player == "scissors" and computer == "paper") ): return "You win!" return "Computer wins!"while True:
>>61527689>>61530060University should focus on the mathematical foundations of algorithms and data structures, as well as the study of algorithms underpinning significant applications of CS such as OS, networking, databases, distributed systems, machine learning, and compilers.Actual programming is braindead easy to learn (just read and write code) and you should not need to rely on a university degree to teach you how to write a fucking for loop in C++. If you want to get better at programing, just build something: a multiplayer browser game with a user login (~4 weeks of effort) will literally teach you the majority of skills that you need and give you enough resume material to get a high paying job. I'll even give you a list of technologies you should use in the project: TypeScript (language) + React (front-end library) in the front-end (and find a 2d rendering engine to use), MySQL (database) + Node.js + express (web server) + TypeScript in the backend, with websockets for connections between users.Btw dummy it's NORMAL to be shit at something the first time you do it. I recently revisited my first ever programming project (a console choose your own adventure game) and holy fuck it brings tears to my eyes, thinking of what an innocent little shit i was, so shit at programming but so full of life!!!!!
>>61530434>Python
very easy just ask ai# In your terminal, first run:# pip install xai-sdkimport osimport randomfrom xai_sdk import Clientfrom xai_sdk.chat import user, systemfrom dotenv import load_dotenvload_dotenv()client = Client( api_key=os.getenv("XAI_API_KEY"), timeout=3600, # Override default timeout with longer timeout for reasoning models)chat = client.chat.create(model="grok-4")chat.append(system("You are Grok, a highly intelligent, helpful AI assistant."))playerinput = input("Choose one: rock paper scissors >> ")computahinput = random.choice(['rock','paper','scissors'])chat.append(user("Who woned the game of rock paper scissors if player chose %s and computer chose %s. Respond with only 1 word, 'player' if player won or 'computer' if computer won." % (playerinput, computahinput)))response = chat.sample()print(response.content)
>>61532471Basically a stone cold nocoder tell at this point