Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
hbag
Feb 13, 2021

i managed to accidently quit vaping once by just not being bothered to go buy a new vape so

i think it's a per person thing, ive heard it's easy for some people and hard for others

Adbot
ADBOT LOVES YOU

hbag
Feb 13, 2021

what is "np hard" anyway

hbag
Feb 13, 2021

Archduke Frantz Fanon posted:

i haven't gotten np hard for 10 years

it happens to lots of guys

hbag
Feb 13, 2021

ah, this is like when they tried to teach me big o notation and i learned nothing

hbag
Feb 13, 2021

welp

hbag
Feb 13, 2021

how it's calculated, mainly

hbag
Feb 13, 2021

fart simpson posted:

it’s kind of a feeling thing. you count how many nested loops you have and then say “this feels like O(n log n) or whatever

...so its made up and fake?

hbag
Feb 13, 2021

Cybernetic Vermin posted:

people go something like:

f(x,y) \in O(g(x,y)) iff there exists c and m such that f(x,y) < m*g(x) for all x>c and y>c

issue is that this program is then in O(x+y):

code:
int f(int x, int y) {
    if(x==0) {
        return fexp(y,y);
    }
    else {
        return x+y;
    }
}
since picking c>0 immediately makes the exponentiation disappear.

if i need to understand this to get a computer touching job i might as well just put in my application at mcdonalds now

hbag
Feb 13, 2021

Dijkstracula posted:

just count the depth of your nested loops, bingo bango

so id end up with, for example, O(3) instead of "O(n log n) or whatever"
that doesnt seem right

hbag
Feb 13, 2021

post hole digger posted:

my brother is a glazier with a high school education and does more advanced math than i do as a computer toucher every day dont worry about it.

thats why i said mcdonalds and not window poo poo

hbag
Feb 13, 2021

yeah but "glaziers do harder math" doesnt really make the computer touching math any easier

hbag
Feb 13, 2021

...uh-huh

hbag
Feb 13, 2021

Dijkstracula posted:

try it yourself: consider a single nested loop:

code:
for i = 0..n:
  for j = 0..i:
    // …
what are the values of i and j that could be in the loop? (0,0),(1,0),(1,1),(2,0)..(n-1, (n-1)-1). how many pairs of numbers are there, “roughly”? well, roughly the first element runs from 0 to n, as does the second one, so the number of total pairs feels like it’s quadratic in n, so a guess would be that this has time complexity O(n^2). and it does! (convince yourself that by a similar reasoning, 0+1+2+..n which is (n * (n+1))/2, if you expand it out and throw away the constant factor, also gives you n^2)

its not impossible or obtuse if you keep it high-level like this, it just takes practice to see the common patterns

i will forever curse my high school math teacher for just neglecting half the class because even this is just very difficult to get

hbag
Feb 13, 2021

i am 21 years old and two years into a compsci degree

hbag
Feb 13, 2021

in terms of nicotine cigarettes suck compared to vapes
in terms of looking cool though...

hbag
Feb 13, 2021

earlier i was genuinely confused because i couldnt find the big o notation thread in my bookmarks lmao

hbag
Feb 13, 2021

OldAlias posted:

agreed tho having a general sense of time and space complexity and how performant or not your poo poo is is a thing any programmer should be aware of at least on some level

also agreed

i think i have a grasp on what makes a function take longer but i could not write it out as math

hbag
Feb 13, 2021

i mean ill need to figure it out so i can actually pass interviews right

hbag
Feb 13, 2021

what counts as "opining" i dont actually know what that word means and im not sure why a bunch of people just got killed by rotor

hbag
Feb 13, 2021

i dont believe thats true actually

hbag
Feb 13, 2021

hmm that sounds like an excuse to exert your wrath at will

hbag
Feb 13, 2021

git apologist posted:

no. no one cares except turbodorks

yes, computer touchers

hbag
Feb 13, 2021

me either if you can believe it

hbag
Feb 13, 2021

yeah. they're cool adult zones :smug:

hbag
Feb 13, 2021

i don't think anyone in this thread was saying it doesn't

hbag
Feb 13, 2021

yes sir, wouldn't want to break any arcane yospos rules

hbag
Feb 13, 2021

rotor posted:

hbag if you cant cope with the idea that you might pull the occasional comedy sixer for no good reason then perhaps yospos is not for you

yeah the one thing im known for is never catching comedy sixers. i was doing a bit man

hbag
Feb 13, 2021

MononcQc posted:

until I got myself autobanned to get the css changed I had never eaten a probe nor anything. pure clean rap sheet since 2007.

disgusting

hbag
Feb 13, 2021

well-read undead posted:

i’ve never been probed in my account’s relatively short lifespan, and i’m sure calling attention to that fact will do nothing to change it

i'll give you five bucks to opine a little
efb

Adbot
ADBOT LOVES YOU

hbag
Feb 13, 2021

i have known about somethingawful for like 11 years i just never bothered to register until very recently

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply