[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/biz/ - Business & Finance


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: Untitled.png (125 KB, 217x278)
125 KB
125 KB PNG
Just did a job interview leetcode and they asked me to implement rock paper scissors.
>>
X = you
Y = Opponent
a = rock
b= paper
c= scissors
If X = Y, rerun event
If Xa and Yb, you win
If Ya and Xb, opponent wins
And so on....
>>
>>61527461
How 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).
>>
>>61527461
I should have quit my job several times over for better pay but the dancing monkey routine of job interviews puts me off.
>>
>>61527609
Same 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.
>>
>>61527473
I 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
>>
>>61527689
Dude, you're supposed to learn at uni
>>
>>61527689
A 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.
>>
>>61527461
And? 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 coding
You fail. Next!
>>
2.52 seconds with ChatGPT

import random

choices = ["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
>>61530060
University 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!!!!!
>>
File: Joker_Stare.jpg (8 KB, 299x168)
8 KB
8 KB JPG
>>61530434
>Python
>>
very easy just ask ai


# In your terminal, first run:
# pip install xai-sdk
import os
import random
from xai_sdk import Client
from xai_sdk.chat import user, system
from dotenv import load_dotenv

load_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)
>>
>>61532471

Basically a stone cold nocoder tell at this point



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.