how do i become programer?
By writing code
It's easy, anon. First you have to wear this.
If you're not good at math, don't even bother.
Why not become coder?
read a book, nigger .jpg
It seems you first need to know about logarithms.
>>57717787
THAT'S A MAN.
>>57717868
*girl(male)
I don't think OP is serious, but I'd start by working through a couple tutorials on codecademy, then if you really enjoy it, enroll in some online courses or even at your local community college, whatever gets you writing code and learning.
>>57717951
Do not, do not, do not use CodeAcademy. It teaches rote syntax and not actual problem solving.
Programming is nothing but problem solving. You can Google syntax. You can't Google any thought process that isn't fairly basic.
Find the /g/ list of programming challenges, pick up a textbook on algorithms and implement them, etc. Don't even worry about knowing a language; like I said, you can just Google that.
Hell, take OPs image and implement that correctly. That would be a start.
>>57718027
I disagree, I think it's a great way to get your feet wet. It's an 8-12 hour appetizer to a lifetime of learning.
>>57717787
This is true. Even if you are a girl(female)
>>57717694
Why not try reading SICP, or
http://interactivepython.org/courselib/static/thinkcspy/index.html
to dip your toes in to programming with python? Start small! Don't give up hope, it really is hard, and if you don't quite understand some of the concepts, it can be really daunting. Don't ask for help from non-condescending /g/ trolls, find a buddy who can help you out.
>>57718027
Anon is correct about googling things and OP image problem. This will help you a lot. Don't just read answers from stackexchange/overflow at first. If you get stuck, see how people solved it before from those website and try and understand where you were going wrong.
>>57718156
Is the full version of that comic uploaded somewhere?
>>57717694
Stop being a woman
>>57718299
Yes. Try image searching it, because I am lazy and not linking it on a blue board if it is uploaded to where I think it is.
>>57718460
I will try, where do you think it is?
>>57718027
>>57718050
i dont know about codeacademy but codeschool teaches rote syntax and i use it to learn new frameworks or lenguages as im a developer already, but its insanely boring. for a newbie it'd do nothing but kill their will to learn programming
>>57718156
>>57717787
>>57717815
Only math skills needed is add and subtract; logic and algebra a bonus
Is 'Automate the Boring Stuff with Python' a good start?
>>57720513
Is it legit or edit? Sauce if legit.
is it like this
public int Product(int a, int b) {
if (b == 1) {
return a;
}
if (b == 0) {
return 0;
}
return a + Product(a, b-1);
}
i'm bad at recursion sorry
>>57721617
>>57721685
i can accept that but could you tell me the proper way of doing it then?
>>57721713
Use code and we will answer.
Not OP, but I don't know anything about coding and I wanna learn some obscure code language.
Do I need to learn the basics first?
>>57721727public int Product(int a, int b) {
if (b == 1) {
return a;
}
if (b == 0) {
return 0;
}
return a + Product(a, b-1);
}
>>57721713
use a loop
>>57721805
is that faster?
>>57717694
How do I write code if I am black?
>>57717694
With something hip like Clojure.(defn product
[a b]
(reduce + (repeat a b)))
>>57721803
Your algorithm is shit. You could use binary decomposition of b. And recursive is forbidden in C.
>>57717694
Read books, make programs
>>57721803int Product(int a, int b) {
if (b == 1) {
return a;
}
if (b == 0) {
return 0;
}
if (b == -1) {
return a;
}
if (b < 0) {
return Sum(-a, Product(a, ++b));
}
return Sum(a, Product(a, --b));
}
int Sum(int a, int b) {
if (b == 0) {
return a;
}
if (b < 0) {
return Sum(--a, ++b);
}
return Sum(++a, --b);
}
>>57721854
>binary decomposition
>>57721803int prod (int a, int b) {
int c;
c = 0;
while (b > 0) {
if (b % 2 == 1) {
c += a;
}
a *= 2;
b /= 2;
}
return c;
}
>>57721854
can you enlighten me on the proper algorithm?
Specially this binary decomposition stuff? Thanks senpai
>>57722013
Here >>57722007
>>57721854
>recursive is forbidden in C
wat did you mean by this
>>57722073
What?
>>57722007
copied it from a problem in sedgewick's algorithms and managed to fuck it up by replacing a = a + a with a *= a
>>57722209
a *= 2
>>57722209
My algorithm is correct for non negative int. What are you saying?
>>57722233
i'm just nitpicking, but the only restraint of the problem in op's pic is to not use the * operator.
you could have just used a += a instead of a *= 2
>>57722260
Ha ok. But I made zero difference between those two.
>>57717694
thats a retarded task in the first place
a/(1/b)
>>57722007int prod(int a, int b) {
return a*b;
}
>>57718156
>>57720513
I wonder what went those fucks' sick mind when they drew those shit. Every god damn day, bypassing the fucking "CS club" to the lecture room, with the smell of mixed pizza and feet and multiple giant anime girls on the poster board as well as that commercial guy with thumb up from fallout, then go to lecture with room full of autists. fucking regret more and more each day for choosing this god forsaken major. Fuck this gay world.
>>57717868
>>57717902
Who are you to say who is female or male.
>>57721462
It's an edit. Welcome to /g/ newnon.
class Main {
public static void main(String[] args) {
System.out.println("5 * 4 = " + ayy(5,4));
}
public static int ayy(int a, int b){
int sum = 0;
for(int k = 0; k < a; k++){
sum += b;
}
return sum;
}
}
>>57722577
You have missed the point entirely
>>57721856
nice memes
>>57722007
int prod(int a, int b)
{
return (a << (b/2)) + (b % 2 ? a : 0);
}
>>57722635
>FTGW
That's a little forward, don't you think anon? Maybe we should get to know each other better first...
>>57722717def ayy(a, b):
sum = 0
for k in range (0, a):
sum += b
return sum
print("5 * 4 = " + str(ayy(5, 4)))
>>57722893
I actually don't care if others' fetishes or whatever they want to do with their bodies, yet I just don't want to be blow into my face with all of that gay shit. Please keep that to yourself, faggot.
>>57723008
And yet you want to be free to express your hatred of others, and shit up threads. Deal with it faggot.
>>57722950
Elegant.
>>57722950>>ayy(-2,2) == ayy(2,-2)
False
What language should i learn if i want to fuck around with websites?
>>57723387
HTML.
>>57723387
clojure
>>57723387
indian
>>57723387
Perl CGI
>>57723387
html css javascript a fuck ton of frameworks if you want and backend depends, go on /wdg/
>>57718027
Like this?#lang racket
(define (multiply a b)
(cond [(= b 0) 0]
[else (+ a (multiply a (- b 1)))]))