what is THE definitive way to practice programming if you can already read and write a language? I want to be able to solve all the "problem solving" interview questions easily.
What is THE definitive way to practice programming if you can already read and write a language...
Other urls found in this thread:
sciforschenonline.org
twitter.com
There are sites that give you a problem daily to practice. Don't know any off the top of my head tho
You roll.
That function is written horribly. I know it uses some clever techniques but that doesn't excuse poor practices. Why would you declare a variable for literally the number 1.5? 'number' is also a bad and undescriptive variable name. Though it should be obvious given those stupid fucking comments.
it seems like his brain has some weird tick where he thinks of everything in fractions in specific situations. I wonder if that contributed to him discovering this.
lol that isn't even close to the first time it was used, just the most famous time
Roll
Wasn't this told to him by a consultant or something?
so someone we never know invented it and he just happened to hear about it?
man, this is what happens when programmers actually talk to each other like humans.
I am not 100% sure, and I am not even sure if we are talking about the same thing.
This code was used for a game, right? The first doom? And it is related to lightning? If so then someone here told me which might be bs
Fuckno roll again
lol
Roll
>window manager
shoulda kept the first thing
it was written for Quake III by someone who briefly worked for Id Tech.
Be gentle
Work towards a realistic solution to a problem you have or think someone might have.
roll
wtf is "Shazam"
how the fuck are you supposed to make Shazam
Roll, but I'm not doing a red/purple one, cause I'm shit
Disappointed
#include
int main (int argc, char **argv) {
for (int i = 0; i < 100; i++) {
if (i%15 == 0) printf("FizzBuzz\n");
else if (i%5 == 0) printf("Buzz\n");
else if (i%3 == 0) printf("Fizz\n");
else printf("%d\n", i);
}
return 0;
}
Make it take anarbitrary number-string pair list as input.
>hr faggot looks at his piece of paper it show the correct answer as 'x % 3 && X % 5'
>nice try user, shall we wrap it up here, don't call us we will call you
HERE WE GOOOO
>'number' is also a bad and undescriptive variable name.
are you retarded?
>Why would you declare a variable for literally the number 1.5?
>variable
not a variable, brainlet
>Why would you declare a variable for literally the number 1.5? 'number'
cose it work faster and use less memory
those comments weren't written by whoever wrote the code
you seriously get asked this questions on interviews?
Mine was:
>you know this technollogy?
yeah
>what about this one?
not really but I can learn
>lets see about that, trial hire
prove that I learn shitty frameworks in days with little to no garbage code
>Okay you are hired
rolling but will probably lose motivation 10 minutes in like always
How so?
>not really but I can learn
lol nice fantasy but they always find someone better whenever I try this
also it used 2 times, but commented out now
not to mention, i'm pretty sure
i = * ( long * ) &y;
is undefined behavior. i don't recall there being anything in the c standard that describes the precedence of truncation in this scenario.
its literally the same thing as void pointers
actually i think i've got it. if you cast to 4 unsigned chars and then assemble the unsigned long from the 4 uchars then the behavior _is_ defined. but the way it is written in the function is undefined behavior according to c89.
aliasing rules are different for void pointers. when casting floats to longs you're breaking strict aliasing, even if you use dereferencing of cast pointers.
i probably won't do it anyway
roll
leetcode
>password generator
gay as fuck
i'm not doing that
I can't believe you can't do that.
I will roll and look at my number tomorrow.
i can't believe your mom didn't ask me to stop when i ripped a hole from her colon into her uterus.
That phrase doesn't even make sense...
Learn to code AI and be the last one who still have a job.
Problem solving has nothing to do with the programming language.
this
Roll desu
a const variable is still a variable.
proof?
>I want to be able to solve all the "problem solving" interview questions easily.
just grind leetcode
roll
123456
rolling
who's saying it is?
ok
Rolando Jorge Pires da Fonseca
rolling
roll
boring, roll again
r o l l
Roll
actual good post rolling
rolllllll
rolling
Rolling, but I'll only do it if I get a purple one.
Also, the only language I know is brainfuck
rollan
Identifies music you don't know the name to, or it would if I weren't such a weeb.
Roll
>The algorithm was originally attributed to John Carmack, but an investigation showed that the code had deeper roots in both the hardware and software side of computer graphics. Adjustments and alterations passed through both Silicon Graphics and 3dfx Interactive, with Gary Tarolli's implementation for the SGI Indigo as the earliest known use. It is not known how the constant was originally derived, though investigation has shed some light on possible methods.
t. wiki
You read cracking the coding interview
>long i
Why not just write í then?
r0ll
Well that was anti-climactic as fuck.
roringu
Rul
Shazam is Medium? Am I retard?
Roll
roll
Roal
Roll
dd if=/dev/random bs=X count=1 | based
modify bs for bytes of entropy, optionally discard trailing equals
what do I win
Someone needs to update this
Jesus, you're a moron. Even if you were RIGHT (you aren't), that level of pedantry is why you'll never be a real programmer, always a basic bitch code monkey.
You're just interpreting the bitpattern of a floating point number as 64 bit int in order to be able to shift-right it.
Why not
Rolling!