[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Programming
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /r9k/ - ROBOT9001

Thread replies: 84
Thread images: 4
File: 1384344021854.jpg (109 KB, 400x801) Image search: [Google]
1384344021854.jpg
109 KB, 400x801
>tfw learning how to program

Wew lads, I might be a miserable NEET, but this is actually quite fun. 10/10 would recommend!

Why don't you try to learn how to code? Java is fairly easy, and it'll help your chances of becoming a wageslave! Surely it's not like you have anything better to do.
>>
Programming language flamewar coming in 3, 2, 1...
>>
>>24333600
while (OP == faggot)
{
//do stuff
}
^ Here's an infinite loop example.
>>
>>24333617
I don't understand, what's the problem with Java?

s-should I switch to C++ instead?
>>
>>24333633
C++ is hard for beginners but it's the first language I learned. You just need to know how to handle memory properly and you're good to go. However if you want me to suggest you a language that's both powerful and easy, go for Python desu familia
>>
>>24333600
Because programming is all about modelling, and I have knowledge of no physical, societal, cultural, or scientific phenomena or entities to meaningfully model.

My IQ is too low for the data-crunching, too (comprehending the entirety of data structures and codeflow at once).

I've been trying to program for ten years and it was all for absolutely nothing. So much for you fucks' 'just code some more' mantra.

>>24333630
This implies the definition of faggotry is variable.
>>
but I do program, I've been doing it since I was 11. I'm better than you
>>
Listen

I'm a retard, but not a rainman kind either to make up for it

Just utterly mediocre in the worst sort of way. No skills, no passion, no charm

But I learned to program- not through shitty fucking books or those worthless tutorials online.

What you need is some engine that gives you the quickest code -> output. Meaning you are able to put something on the screen with relatively few lines of code.

With C/ C++ you basically have to set up how the computer manages memory, loading in files, giving the computer CPR, checking its pulse, draw everything on screen pixel by pixel

This is great for the nerds who like the systems architecture shit... But horrible if you don't give a shit.

Keep it simple. Learn a scripting language for an existing engine. Be it Minecraft mods + Java, VisualBasic + command prompt, C# + Unity

Have someone who knows how to code nudge you in the right direction when you're not sure what to do. Get something to appear on screen as soon as possible, learn how to influence it a little (have it flash different colors), respond to input (events), and you're fucking set.

From there you will just think of more shit to make.

Don't worry about functions/ loops/ whatever. They're pointless to cram into your head.

Well, they're pointless until you actually need them. And if you have that friend around, they'll make this process easier. Most of that shit is just to make your code easier to understand when it gets fuck-huge/ super complicated
>>
>>24333730
Stop hurting my feelings anon, I'm sure we can all get along.
>>
>>24333824
post fizzbuzz faggot
>>
>>24333823
Do not use the word 'retard' when it is inapplicable.

It is owing to scum like you that genuinely disabled people have to embarrassingly, conspicuously qualify their condition with 'I am a literal retard', while you reap sympathy for your purported plight as well as praise for your achievements which in reality are underlaid by the intelligence you claim you've not.
>>
>>24333730
Does your dad also work at Nintendo?
>>
Where the fuck do I start with learning how to program?
>>
>>24333600
If I want to learn myself to program, what do? Where do I start? What is good for babby's first programming language?
>>
>>24333898
I'm currently using CodeAcademy for learning the basics of Java. Pretty neat, but very, very slow.

>inb4 multiple people tell me CA is shit
>>
>>24333898
By figuring out what you actually want to do with programming first so you dont learn a bunch of shit you dont have to. /g/ has a good list of stuff to help learn web development
>>
>>24333898

python first, then java
>>
>>24333898
The primary thing is to develop the automatization instinct.

For instance, over the course of a couple of months, I've seen a person twice save a couple of files for a printing house, resizing them, and write and send an e-mail with printing directives. And I instinctively had the idea to write the script parametrizing and automatizing it.

That's literally it when it comes to finding stuff to program. It's basically pattern recognition, as in IQ; you spot a regular behaviour, and you think of its common routines.

For instance, my current project-to-fail-to-implement, far too ambitious for me, is an automatic calculator of top ten lists (such as 'your favourite songs/albums/artists') from forum threads. Here, the pattern I noticed is that of manually counting the results of every thread. (After a couple of days of designing I noticed that this problem can be abstracted to heuristic detection of regular sets of data, but that's another story.)
>>
Most people don't know what to do and that's the biggest problem

Nothing seems within reach

For normal folk who aren't prodigies, you kind of just have to find something worth making/ making better. Plugins, game mods, a macro to automate your desk job

Or any of this for a friend. Learning is just a process of typing "how do i do X" into google
>>
>>24333933
I dont know CA, but its probably shit.
>>
File: 1445059524255.jpg (35 KB, 600x600) Image search: [Google]
1445059524255.jpg
35 KB, 600x600
>will have to take 3 simultaneous open uni Java courses in the spring to get into proper uni
At least I know the basics of object oriented programming already.
>>
>>24334050
I know you're being an lolxd but codecademy is fine for learning the basics and how to think like a programmer without the frustration of knowing your program should work and doesn't
>>
>>24334020
In other words, you could also say that programming is all about abstraction (diving real-life situations into the constant parts (code) and the variable parts (parametres)).

(Sage.)
>>
>>24333823
>Don't worry about functions/ loops/ whatever. They're pointless to cram into your head.
dear god
>>
File: send help.png (17 KB, 1274x384) Image search: [Google]
send help.png
17 KB, 1274x384
g-guys, how do I into functions

I'm scared my PC will blow up if I do it wrong ;-;
>>
>>24334186
This is literally the most redundant presumably non-joke code I've seen in my life.
>>
File: wew.png (19 KB, 1279x389) Image search: [Google]
wew.png
19 KB, 1279x389
>>24334202
Everything went better than expected.
>>
>>24334073
Lolxd here. Thank you for your explanation. Sounds nice. I will check it out when i habe got time.
>>
>>24334281
Look, I even made a prompt thingy. Never again will I be in doubt whether the quarter of a value is divisible by 3!

var input = prompt("input")

var quarter = function(number) {
return number / 4;
};

if (quarter(input) % 3 === 0 ) {
console.log("The statement is true");
} else {
console.log("The statement is false");
}
>>
>>24334330
Try
(function(number) { (alert ? alert : console.log)('The statement is ' + (((number / 4) % 3) ? 'false' : 'true')); })(25);
>>
>>24334385
Sounds pretty complicated. I'm gonna stick to calculating the perimeter of some rectangles.
>>
>>24333617
I program in best language(C++) and best editor(emacs)
>>
>>24334431
There are just two things there:

>native JS properties are assignable to variables
var myOutput = alert ? alert : console.log; myOutput('foo');

>it is good to nest non-business logic
(function(x) { alert('Alerting ' + x); })(prompt());
>rather than
var x = prompt(); (function(x) { alert('Alerting ' + x); })(x);
>>
>>24334141
They are pointless until you actually need them

Some programs/ languages require you to use them off the bat, but there are plenty cases where using functions very early on just gives misconceptions on how it works/ when to use it.

It's like making your code neat. The best way to learn how/ WHY to make nice clean code is to make shitty nooby code and then look back at it some time in the future.
>>
Chap. 4.3 in sicp, started 1.5 months ago doing all the exercises (mostly) right.
((lambda (thing)
((lambda (f) (f f thing))
(lambda (p num)
(if (= num 0)
0
(+ (p p (- num 1)) (square num)))))) 5)
Do you like my anon recursion?
It's so pretty.
What do you think it does?
Calc. only though.
hehe
>>
>>24334507
In fact, I just wrote a psychotherapist.

while(x = prompt((typeof x == 'undefined') ? 'Hello. I will be your psychotherapist today. What is your problem?' : 'What do you mean by \'' + x + '\'?'));

Enjoy, depressed robots.
>>
>>24333823
You are a dumbass and no one should listen to you
>>
>>24334685
Goddamit where did the indentations go
it's too hard to read like that.
The thing calculates the sum of the squares up to 5 without using names.
>>
>tfw no motivation to program
I should make a replacement for fmd but it'll be difficult
>>
I tried it but I got bored out at the hard part

who /geniusbutlazy/ here?
>>
>>24334601
Not making functions is sloppy but not the end of the world (that's actually how I program). Telling them not to worry about loops is fucking retarded.
>>
>>24335205
>Not making functions is sloppy but not the end of the world (that's actually how I program).

That's like saying that not using multiplication in real life is sloppy, but you just add numbers individually instead.
>>
>>24333852
Are people serious when they post fizzbuzz programs? Like, do they consider it an actual measure of skill?
>>
>>24333672
>This implies the definition of faggotry is variable.

But that's wrong.
>>
>>24335900
I didn't say 'means', but 'implies'. Lower case implies variability.
>>
What is fizzbuzz
>>
emacs > vim
>>
>>24333600
In college I have a course in Python. How's that?
>>
>>24335932
What is internet
>>
>>24335125
>That geniusbutlazy maymay
>>
>>24335345
Its useful for managers doing hiring so that they know who's applications can go right in that trash.

> but no one would apply for a programming job if they couldn't do something so simple.

You have no fucking idea man
>>
>>24335932
It's a simple program where you print the numbers divisible by 3, 5, or both in a specified interval.

Let's say 1-100. So if the number is divisible by 3, print "fizz". If divisible by 5 print " buzz". If divisible by both print "fizzbuzz".

That's ALL the logic involved. It's conditional statements and prints.
>>
>>24333600
My IQ is too low
>>
>>24335915
What you should have said was: The statement implies that faggot is a variable, and its value can be changed.

That being said, you're acknowledging that faggot as used in the statement is simply the name given to the variable, and not necessarily related to the concept of 'faggotry' or its definition. Therefore saying that the statement implies anything about the definition of faggotry is not really right.
>>
>>24333730
>tfw i actually have been coding since 4th grade
good old game maker 5
i never used the drag and drop coding though, the interface was garbage
i always just put things in script blocks
>>
>>24336072
It's just crazy because I'm really not any good yet myself - I'm in CS1 doing data structure shit and I'm definitely not a natural at it. The fact that I'm tentative to say I'm any good but somebody posts a fizzbuzz thinking they're le master coders is just astounding.
>>
>>24336091
he should've used an enum
or in a language that doesn't support them, a constant value, conventionally denoted using an all caps or capitalized name
>>
>>24336168
see http://blog.codinghorror.com/why-cant-programmers-program/
>>
>>24335964

Goethe?
>>
>>24336200
Just... Wow.

I feel a lot less bad about my shitty qsort array implementation now.
>>
can you faqqots do that
((lambda (n)
((lambda (f) (f f n))
(lambda (fizzbuzz n)
(cond ((= n 100)
'done)
((and (= (remainder n 3) 0)
(= (remainder n 5) 0))
(newline)
(display n)
(newline)
(fizzbuzz fizzbuzz (+ n 1)))
((= (remainder n 3) 0)
(newline)
(display n)
(newline)
(fizzbuzz fizzbuzz (+ n 1)))
((= (remainder n 5) 0)
(newline)
(display n)
(newline)
(fizzbuzz fizzbuzz (+ n 1)))
(else
(fizzbuzz fizzbuzz (+ n 1))))))) 0)
>>
>>24336299
that article is why i'm not worried about my career prospects being outsourced to india any time soon
>>
whats a good java tutorial? spoon outs please
>>
>>24336317
this just prints the numbers that are divisible by 3 and 5
it doesn't print fizz or buzz m8
>>
>>24333600
I wanted to learn it but I can't find solid source. Can you recommend something?
>>
>>24336372
Oy, forgot to add that at the ddisplay line
i'm a faqqot
>>
>>24336082
All right, here's my take in PHP:

while(++$i<=100)echo[fizz][$i%3],[buzz][$i%5],"\n"
>>
>>24336590
his specification was wrong
it's supposed to print the numbers 1 to 100 (inclusive), but if it's divisible by 3, print only fizz, if it's divisible by 5, print only buzz, and if both print fizzbuzz
example:

1
2
fizz
4
buzz
fizz
7
8
fizz
buzz
11
fizz
13
14
fizzbuzz
>>
>>24333600
kill yourself you faggot

saged
>>
>>24336636
All right.

while(++$i<=100)echo$s=[fizz][$i%3].[buzz][$i%5]?:$i,"\n"
>>
Bash is the best programming languages thqh femlee
>>
Guys, I want some harsh truths.
I am finishing sicp soon, know some python, planning to learn java, and start making semi-big programs, that can actually be used for things.
How close will I be to a job at that point?
I really REALLY want to tell my parents to fuck off, but I can't if I don't have any income.
Also, can a programming job be had concurrently with some other uni degree?
Am I flying in the clouds here? Please respond.
>>
>>24336805
Wait, actually, the $s isn't needed at all.

while(++$i<=100)echo[fizz][$i%3].[buzz][$i%5]?:$i,"\n"

53 characters. (52 if in two lines.)
>>
>>24337135
do you even know how a kernel works?
>>
I have java on my 2nd year of compsci and it's fucking rocket science
classes, methods, pseudo functions what the fuck is all this shit?
Recently I had to code logical functions of AND XOR NOT and NAND as derivatives of a gate class and I couldn't fucking do it. It's black magic.
>>
>>24337212
No.
I am sure I can learn it though, but I am not sure I should be prioritizing it.
>>
>>24336636
Oh, sorry about that. Forgot about printing the rest of the numbers.
>>
>>24337135
if you're only trying to learn programming to get a job then it won't work out. you should just go into engineering if that's the case
>>
>>24333600
>programming
literally hell

engineering is better tbqhf
>>
>>24337135
someone with uni degree actually knows how the shit works. I mean you see the big picture and also at uni you gain a lot of knowledge that can be used later on.
I mean for exaple someone without degree will tell you that recursion is ok to use anywhere while someone with degree will tell you that recursion is bullshit at at some point it is going to crash your application.
>>
>>24337418
not if you're using a language that supports tco
>>
>>24337331
I am already studying something else, familia.
Oh fuck it, I won't give up though, seeing as there is plenty of info online.
I'll be able to get a job by the end of 2016.
I don't even give a fuck.
>>24337418
All the uni books are out there.
>>
>>24333861
Shut up retard

aksjdgkhasgdkh
>>
>>24337466
ye but it was more like an example. also you need some degree of knowledge to know what TCO is.
>>24337482
they are but it is good to have someone who will point you into right direciton. a lot of stuff might seem useless yet in the end you will find out that it was worth studying.
I will put algebra as example. it is not just "that useless subject from first semester" when you work with openCL / cuda for instance.
Thread replies: 84
Thread images: 4

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.