Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Hmmmm. Try writing 15 lines for something that doesn't completely work, but the answer can be done in 1 line.
Fml -
@Stuxnet that helped (: and ouch. I've done it too. Isn't it a pain at the extra work done just from ignorance?
-
@Stuxnet but you stuck with it right? I think everyone has had a moment like that at one time. Hopefully haha
-
@dalastTomCruise That happened last semester. In the intro to CS class.
But so far still sticking with it. I'll see how it's going after 5 or 6 classes (the required for a minor in CS) -
totoxto2516yLooking up docs for stuff like that is so normal that I'd be upset if they didn't allow it in an interview unless it was pseudo code.
So I did an interview today and the problem was given a = 1 2 3 and b = 2 3 write code that finds the common elements.
I asked what the data structures are and they said it can be whatever so I said cool then we can use sets and do an interception to get unique elements.... this was in Python... but for the life of me I couldn't remember what the intercept notation was... and brought that up hoping they're give me a hint haha.
So I ended up writing a 8-9 line solution for what could've been a one liner fml: return a | b.
All because I didn't know the notation and still needed to give them something. Painful to write when I knew I was reinventing the wheel. Sign
I almost never use sets so this was heartbreaking hopefully I still get an offer!
How bad of a fail is this in y'all opinion?
question
#sadday