[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
>go into community college for CompSci >enter programming
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 57
Thread images: 7
File: Genius.jpg (152 KB, 640x720) Image search: [Google]
Genius.jpg
152 KB, 640x720
>go into community college for CompSci
>enter programming course thinking it's Java
>it's Processing
>not only that, but v1.5.1 Processing
>professor is "unique"
>have a project due tomorrow about making a game by utilizing classes and objects
>can't into classes/objects
How fucked am I?
Mind you, I have what is essentially an overglorified manual as my textbook.
Also, I know I fucked up, but I plan to switch to I.T. and I doubt they'll just discard my programming course grade even if it has no bearing on the I.T. degree and whatnot
>>
>>51499595
wth is processing ?
and intro classes are always shit.
>>
>>51499595
the fuck is processing
>>
>>51499620
>>51499625
https://en.wikipedia.org/wiki/Processing_%28programming_language%29
Basically Java for babbies
>>
>processing
the fuck?
>>
>>51499666
https://processing.org/
Here you go, Satan.
>>
well, thats bad news, switch to a better university
>>
>>51499649
Oh shit, I've actually used this before.

I just totally forgot about it.

Was in my computer graphics class and we made a turtle graphics thing or some shit using it.

Wonder if I still have the code anywhere.
>>
>>51499649
what do you need that for
why do you need java4babbies?
even fucking pajeet can do it
>>
>>51499728
Because I'm stuck in this course. If I withdraw, it's an automatic F, which will surely fuck with my GPA in some way or fashion.
>>
Processing isn't very well known, but it kinda works like Matlab where you have a library of graphic functions that you can use within a small app and see the changes live as you change the parameters, since the app runs with a live interpreter rather than a compiler.

I haven't seen much of it, but while there's no way it will match Matlab's wealthy library, at least it's free.
>>
>>51499743
well quit being such a pussy
whats your deal anyhow op
why is it so hard to do your homework
>>
File: SCAN0083.jpg (893 KB, 2496x3264) Image search: [Google]
SCAN0083.jpg
893 KB, 2496x3264
Oh, and this is the project in question
>>
>>51500002
>printout
>disk
lmao
>>
>>51500002
the assignment really isn't that bad...
but a fucking print out and a disk ? wtf ?
>>
>>51500002
You still have a few weeks, OP.

Should be plenty to get this done, even with no prior programming knowledge.
>>
>>51500071
>>51500002
>>51499595
">have a project due tomorrow"
>due november 12th
>today is 24th of november

?
>>
>>51500088
OP is a slacker. The instructor's name is listed on the SOC.
>>
File: 1447983105451.gif (451 KB, 376x320) Image search: [Google]
1447983105451.gif
451 KB, 376x320
>>51500071
Only have a day, m8. Little over 12 hours
>>51500088
>>51500131
Actually, the date did get changed. She was just too lazy to fix it
>>
You are failing CS at a community college. Reevaluate your life.
>>
>>51500226
This. OP reconsider your life. Unless you have money, you're going to fuck yourself over if you go to a university.
>>
>>51499595
You're literally stupid. Lmao @ your life family.
>>
>>51500226
I'm actually not failing. Yet.
>>
>>51500332
Yeah, but even if you are smart enough to do well at a real CS program, you clearly lack the motivation and drive to do so.
>>
File: supermandatho.jpg (49 KB, 450x342) Image search: [Google]
supermandatho.jpg
49 KB, 450x342
this is easy just do it
>>
>>51500353
I lack the motivation and drive because I'm burnt out on coding. I want to switch to IT since it's more close to my line of interest
>>
>>51500367
Then withdraw. A W is better than an F.
>>
>>51500394
see
>>51499743
I apparently missed the cut-off. If I choose to withdraw now, I get an F. Unless I'm wrong
>>
>>51500411
>>51500394
Wait scratch that. I can apparently still get a W. I just need to hope that my professor is willing to let it slide. Given my chances, she might just hand me an F
>>
>>51500435
It should have nothing to do with your professor. It should be a school policy thing. Usually on the site that you add classes on, you should be able to drop or withdraw
>>
>>51500467
https://www.sunysuffolk.edu/dept_docs/Current_Students/Withdraw.pdf
>Completing this process on or before the midpoint of the term (see college catalog for date) assures you a “W” in the course(s). After this time, your instructor has the option of assigning either a “W” or a grade of “F.”
>>
processing is a super easy version of the programming.

if you speak english and can manage a dictionary you should be able to learn what classes are and how they can relate to an object.

a quick briefing
an object is a thing you can observe and, empirically, "know about". This means an object can be anything. A class is essentially a manner of catergorization for objects. To categorize means to take the properties and attributes of a class into consideration. A simpler way to put this would be that classes hold the info about the object. Considering its all "logical", objects and classes exist separately and that these "classes" (not like school classes but more like classifications) are inherent to objects. Since its all logical, as if to say in accordance to the manner they "do", then you must know that one side holds the info and the other acts as a reference point, to other objecta, to that info.

If you make a class and then "instantiate" it you are essentially making an object that other objects can interact with. That is the manner by which you keep the info and the "object" separate yet cohesive.

Now about the separation. The info exists in the code you write, the processing info, and the objects begin to exist at runtime, after you've compiled the code and put the program into execution. So you want to make sure that all the code is "inscribed" in a manner that it can "mingle" with other coded objects. If one takes numbers, the other shouldn't take words. If the program you make runs as a set of numbers and figures, you want to make sure that those numbers exist for more than just the prestige of the matter.

There's more but you have to ask because I fear I may have convoluted this further than I should have. Btw, I'm watching a movie right now, Manchurian Candidate, so I hope none of this comes off as ominous. This movie has always scared the shit out of me.
>>
>>51500551
btw, to categorize doesnt mean to take the properties and attributes of the "class" into consideration, it means to take the properties and attributes of the "object" into consideration. Sorry about that hiccup.

Also, objects can interact with other objects through structures, even if they are disparate. Or by way of more specialized instruction. But the more specialized instruction tends to be more unique and might create a lazy optimization once the code is run through for compilation in the JVM.
>>
>>51500678
Lazy optimization might create new mappings and considerations in your system that might leave room for quirks in your program. Things like weird bog points, skips in the execution, failed optimizations and other things based on performance. It also might be harder to remember since its so different from the usual way things are coded and discussed, if you are inclinef to talking about work with other persons. I think the word is awkward.
>>
Oh yeah and if you are learning new things to do with programming, try to be sure you read offline and copy the text over to notepad or something. In understanding processes and then running them, you are familiarizing yourself in a "cogito ergo sum" manner and you need the whole thing to be coherent, If you are learning a sorting algorithm and are playing back encrypted (shuffled) video off of youtube or something, you might become confused if for some reason you start coding and listening back to the code you run. Think of it like running and listening to your breathing so you can relax but listening to metal like you would when agitating your muscles for heavy duty body building.
>>
Watch how quickly this thread gets dropped.

Thats the shill doing its processing of parameters.
>>
File: 1403495428930.jpg (63 KB, 549x465) Image search: [Google]
1403495428930.jpg
63 KB, 549x465
>>51499595
>can't into classes/objects

>literally the best thing to happen to programming since the computer was invented
>been around for decades now
>you can't use it

if you can't into oo, you might as well go back to fucking punch cards and looms.

no excuse, OP.
>>
OP classes are really easy.

everything you "make" in a program is an object. if we do
a = 5;
now we have an object called "a". we can think of "a" as a box, and inside the box is a 5. But now let's do
b = "balogna";

b is also a box, but it's holding some characters, instead of a numeric value. We can think of these two boxes as having different labels: box a says, "integer" and box b says "string" or "character" (different languages use different labels).

in some languages, you have to label the box before you put anything in it. in others, the interpreter or compiler will figure it out for you.

and sometimes, we have boxes within boxes. maybe the bigger box is labeled "vector" or "array" and the smaller boxes within are all labeled "integer". throw several of those vectors in an even bigger box and label it "matrix".
>>
Books kind of look like fancy boxes, don't you think?
>>
OP here, I'm getting a grasp on classes/objects. However, the main problem is that I'm not entirely sure how to approach the project (see >>51500002)
Any general pointers?
>>
>>51499595
program the you lose game:
echo "you lose!"
>>
What a slacker. If you can't do this then you shouldn't even be going into I.T. I can't even imagine how you will be able to do simple database homework. If you are truly not being lazy then try retaking the class with another professor. They might be Einstein smart but it doesn't mean they know shit about transmitting their knowledge.
>>
>>51501531
>However, the main problem is that I'm not entirely sure how to approach the project
What do you mean?
For something that size, so long has you have a decent grasp of basic programming, you can just make make a start on it without too much planning.
>>
>>51500002

That's a pretty goddamn neat project in an easy babby language.
>>
File: ss+(2015-11-24+at+03.12.05).png (14 KB, 548x470) Image search: [Google]
ss+(2015-11-24+at+03.12.05).png
14 KB, 548x470
OP here, I think I'm getting there.
However, with this test code I have, I'm getting a "Badly formed character constant" error. Anyone know why?
>>
>>51502405
If it's anything to C/C++/Java, then use " for strings, not '
>>
>>51502405
I haven't done any Java, but shouldn't Player() and move() be inside the class Player? And are setup() and draw() inside some class?
>>
>>51502405
Also: where is key variable defined?
>>
>>51499649
>Basically Java for babbies
You just described Java.
>>
File: 1423760477231.png (99 KB, 561x595) Image search: [Google]
1423760477231.png
99 KB, 561x595
>>51499595
this is you
>>
>>51501531
start with a timed loop, everything happens every.. I don't know 16ms. Have an event handler take in keystrokes and update keystroke status in an array, back in your loop task get your guys to go left or right based on what keys the array says are pressed
and I'm guessing this has to be visual too? so once all the updates are in then update your visual

presto done
>>
>>51502405
I don't think you even have the first grasp of the syntax of the language you're using

I cannot help you
>>
>>51502405
You went through the trouble of creating
> Player(float inputX, float inputY)
Then assigning those values to the players position

But when you go to move the player you are modifying posX and posY instead of the interface you created
>>
>>51503552
Id say its the reverse since they are learning a toy language for some reason but op cant even oop
>>
>>51502476
they should unless of processing is retarded wich it might be
>>
>>51504778
This anon is right. You should use the interface you created and make sure you are using the correct values when making a comparison in the move function. With a game this small, the time it takes to create a new Player class is negligible if all you want to do is get the program done for now.

As for the badly formed character constant, that's because the word LEFT is not a character and thus should not use the single quotes. Same for RIGHT.
>>
>>51500367
>burnt out on coding
>The wet paper back is still to hard to code out of
Thread replies: 57
Thread images: 7

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.