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.
 
  • Locked thread
Flaming June
Oct 21, 2004

i'm a new and lovely programmer and wasn't a CS major and i know this and am trying to get better

is that too much to ask :ohdear:

Adbot
ADBOT LOVES YOU

Pittsburgh Fentanyl Cloud
Apr 7, 2003



lol, you live a charmed life and were handed a golden opportunity and you whine and you're going to piss it away

lolllll

BONGHITZ
Jan 1, 1970


rise of the gently caress machines

Pittsburgh Fentanyl Cloud
Apr 7, 2003


BONGHITZ posted:

rise of the gently caress machines

it's me, i'm the rising gently caress machine in the op

Pittsburgh Fentanyl Cloud
Apr 7, 2003


nuke me from orbit

The Management
Jan 2, 2010

sup, bitch?

ShadowHawk posted:

If you're a bad programmer don't worry, there's plenty of really bad software that needs to be written for specific non-pure-tech industries. Even if "enterprise" software already exists for them, it's pretty much universally bad and your terrible programming has a good chance of being much better.


Also you'll make more money than a "real" developer.

How much does a "real" developer make and how much does a bad one? I need to know what kind I am.

double sulk
Jul 2, 2010

Tori CMOS posted:

lol, you live a charmed life and were handed a golden opportunity and you whine and you're going to piss it away

lolllll

yep

i think it doesn't help that when i get home i don't want to look at a single line of ruby but i don't want to touch anything else either, or rather nothing that i can't use with a static analyzer

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Silver Alicorn posted:

I think maybe the community has gotten better, I haven't really paid attention since I stopped following slashdot

the problem with programming education is there's so much stuff that's non-obvious and counter-intuitive and it doesn't make "sense' until you've been browbeaten with it enough that you pretend it does, and at that point you still have no idea how to explain it to anyone else

best example I can think of is pointers. what is a pointer? a variable that points to another variable. this is a circular definition but it's what's in the books.

pointers didn't make sense to me until I started playing with assembly. need to store a string of text, or other multi-word data somewhere? put it somewhere in memory and then write that memory address down somewhere. now you can look up what's at that address and change the data, or you can change the address too maybe. it's like a reference of a memory address that points... at your data. a pointer. C-like languages make this more confusing because it can be hard to tell when you need to "dereference" a pointer or just pass the pointer as-is. You can think of a pointer as a variable that stores an address but you need to have some fairly precise understanding of what variables even are to understand why pointers are useful in the first place and it's just generally not taught

i understood pointers pretty easily. my problem is more that i know they exist but i don't know the language specifics of whatever language i'm working with (espescially if the language isn't something like c which forces you to be explicit about what you're doing), so i get really confused when i start passing variables around around.

when people say a programming language is pass by reference, does that mean you can call a function using pointers as variables? wheras some languages don't allow you to use pointers? if that's the case what is the appeal of a non pass-by-reference language?

Beve Stuscemi
Jun 6, 2001




Angry Moo Cow posted:

hi op i'm a farmer. here is the extent of my programming knowledge.

<html>
<head>
<title>Go gently caress yourself</title>
</head>
<body>
<p>loving fucker gently caress gently caress</p>
<p><marquee>hail satan</marquee></p>
<BR><BR><BR><BR><BR><BR><blink>free kim</blink><BR><BR><BR><BR>
<a href="http://www.gofuckyourself.com/guestbook.htm">Sign my guestbook!</a>
</body>
</html>


Hope this helps.

I want to meet a farmer like you IRL someday. My mind can't reconcile a farmer also being a yosposter

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Jim Silly-Balls posted:

I want to meet a farmer like you IRL someday. My mind can't reconcile a farmer also being a yosposter

most yosposters are real salt the earth types though???

stoutfish
Oct 8, 2012

by zen death robot
how do i use the print function in python?

Juul-Whip
Mar 10, 2008

I am an okay programming I guess, but I dont care about it enough to spend any significant amount of my free time learning about programming and/or contributing to open source projects. So Im probably a C at best

stoutfish
Oct 8, 2012

by zen death robot

THC posted:

I am an okay programming I guess, but I dont care about it enough to spend any significant amount of my free time learning about programming and/or contributing to open source projects. So Im probably a C at best

dumpster-krugnard

ShadowHawk
Jun 25, 2000

CERTIFIED PRE OWNED TESLA OWNER

The Management posted:

How much does a "real" developer make and how much does a bad one? I need to know what kind I am.

If your job description included the word "rock star" when you were applying then you're probably a real developer

Juul-Whip
Mar 10, 2008

Silver Alicorn posted:

I think maybe the community has gotten better, I haven't really paid attention since I stopped following slashdot

the problem with programming education is there's so much stuff that's non-obvious and counter-intuitive and it doesn't make "sense' until you've been browbeaten with it enough that you pretend it does, and at that point you still have no idea how to explain it to anyone else

best example I can think of is pointers. what is a pointer? a variable that points to another variable. this is a circular definition but it's what's in the books.

pointers didn't make sense to me until I started playing with assembly. need to store a string of text, or other multi-word data somewhere? put it somewhere in memory and then write that memory address down somewhere. now you can look up what's at that address and change the data, or you can change the address too maybe. it's like a reference of a memory address that points... at your data. a pointer. C-like languages make this more confusing because it can be hard to tell when you need to "dereference" a pointer or just pass the pointer as-is. You can think of a pointer as a variable that stores an address but you need to have some fairly precise understanding of what variables even are to understand why pointers are useful in the first place and it's just generally not taught
idk I didn't have trouble grasping it maybe ur profs are bad at their jobs

Pittsburgh Fentanyl Cloud
Apr 7, 2003


gucci void main posted:

yep

i think it doesn't help that when i get home i don't want to look at a single line of ruby but i don't want to touch anything else either, or rather nothing that i can't use with a static analyzer

i was born in to utter poverty and grew up with seven other children in the woods in a 1100 square foot house and was on welfare all my life, and couldn't afford to go to college or finish high school

i hate you, you can't even recognize that you're blessed and want to piss away things most people dream of

Juul-Whip
Mar 10, 2008

ShadowHawk posted:

If your job description included the word "rock star" when you were applying then you're probably a real developer

last year I got a job through my university work-study program. I made it clear in the interview that I had no prior exposure to the stuff they were using but they hired me anyway. they liked the cut of my jib or something so they hired me and just kinda threw me into it with no support or supervision

after like 2 months of not knowing what the gently caress they were all like "oh uh we hoped youd be performing at the same level as an experienced pro by now"

the phrase "rock star" was bandied about. idk how they expected to find rock stars for the kinda money they were payin

Juul-Whip fucked around with this message at 07:26 on May 8, 2013

Juul-Whip
Mar 10, 2008

I have a friend who recently graduated from CS and he thought he could start running he own xmpp server by uploading the files to Uploaded.net. He didn't seem to grasp the difference between uploading files to a computer and executing code on a computer. How this person managed to achieve a bachelors in CS I don't know

PleasingFungus
Oct 10, 2012
idiot asshole bitch who should fuck off

Police Academy III posted:

I've a sneaking suspicion that there's only a very low number of people who are in any way decent at programming, but they've realized that there's no way for them to transmit that knowledge to the rest of us and so are content to let us keep running around like retards and making grand, overly generalized proclamations about programming on hacker news.

actually no one knows how to program decently

h t h

double sulk
Jul 2, 2010

Tori CMOS posted:

i was born in to utter poverty and grew up with seven other children in the woods in a 1100 square foot house and was on welfare all my life, and couldn't afford to go to college or finish high school

i hate you, you can't even recognize that you're blessed and want to piss away things most people dream of

i get that i was lucky to be offered it, but i'm not really capable of doing the job as it is and i'm not getting any help. the team is composed of a number of contractors/offshores who can't speak english all that well. it was pretty clear that the employment was/is at-will so i could get shitcanned any time; i just didn't expect to get virtually no assistance whatsoever beyond the first week. the code bases are bad. no one knows what documentation is, and ruby being a language where terseness and abstraction are everywhere, this makes things a nightmare if you didn't write the code yourself. other projects are done in clojure which i'll never touch.

i'm depressed for a few reasons, but mostly because the job isn't very rewarding and the environment isn't making things any easier.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
^^^ that sucks and it is an example of why i really don't want to get any more serious about programming

my company has been asking me if i want to move over to development full time. it's tempting because i honestly enjoy it a lot more than my real job (editing/coloring), but then i go into cavern of cobol or stack overflow and realize how hilariously underqualified i am to do any kind of real programming work.

i think i am much more employable as "an editor who can kinda program" than i am as just a bad programmer. i may be undervaluing my skills though, i don't know. i put together a really nice content management system that streams video and does a lot of other stuff in two months without any web development experience. but the code is really, really, really bad. it works and it has never gone down unless i've taken it down, but i'm sure a hacker could exploit the poo poo out of it if they wanted to.

tbh there is a lot of niche programming to be done in small or even big companies. one thing i did here was write a script that parsed music EDLs into an excel spreadsheet so we could send them to the music license people. it was a job that took some PA a few hours a week, and now it takes seconds. that stuff is invaluable but it doesnt take a computer engineer to do it.

DONT THREAD ON ME fucked around with this message at 04:08 on May 8, 2013

Pittsburgh Fentanyl Cloud
Apr 7, 2003


gucci void main posted:

i get that i was lucky to be offered it, but i'm not really capable of doing the job as it is and i'm not getting any help. the team is composed of a number of contractors/offshores who can't speak english all that well. it was pretty clear that the employment was/is at-will so i could get shitcanned any time; i just didn't expect to get virtually no assistance whatsoever beyond the first week. the code bases are bad. no one knows what documentation is, and ruby being a language where terseness and abstraction are everywhere, this makes things a nightmare if you didn't write the code yourself. other projects are done in clojure which i'll never touch.

i'm depressed for a few reasons, but mostly because the job isn't very rewarding and the environment isn't making things any easier.

i work at the fifth largest insurance company in the country and my project is a database application that bills $7.8 billion a year

it's exactly what you describe

shut the gently caress up and just do what they tell you to do, who gives a poo poo if it all fits together

Bored Online
May 25, 2009

We don't need Rome telling us what to do.
i took an intro to progrsmming with c class last quarter whats up

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Tori CMOS posted:

who gives a poo poo if it all fits together
people who care about workflows :smug:

Pittsburgh Fentanyl Cloud
Apr 7, 2003


chumpchous posted:

people who care about workflows :smug:

yeah, this isn't going to work

BONGHITZ
Jan 1, 1970

CNClab 2021 posted:

i took an intro to progrsmming with c class last quarter whats up

nm, hows it hangin?

PleasingFungus
Oct 10, 2012
idiot asshole bitch who should fuck off

chumpchous posted:

when people say a programming language is pass by reference, does that mean you can call a function using pointers as variables? wheras some languages don't allow you to use pointers? if that's the case what is the appeal of a non pass-by-reference language?

That's not what 'pass-by-reference' means.

When a function is 'pass-by-reference', the arguments are passed as pointers ('references') to the actual values, rather than the values proper. This means that you can modify the arguments (by dereferencing the pointer), which can be good or bad. It also means that you don't have to copy the values from one space in memory to another, which is important when dealing with large variables (arrays, big objects, etc).

In C and similar languages, you can actually work with pointers, so you can make the decision explicitly. (void foo(int a, int * b) - a is passed by value, b is passed as a pointer.) Java doesn't have user-defined pointers, so the language has to make the decision for you. The decision they made for primitives (ints, bools, etc) was 'pass-by-value'. In "int a = 1; foo(a); print(a)", the result printed will always be '1', no matter what happens in foo(). This is the primary appeal of pass-by-value: you can guarantee that variables passed as function arguments remain unchanged when you return to your own scope. It's a reasonable default.

Java objects, on the other hand, are passed by reference: if you pass in an object to a function & modify it therein, you can retrieve the modified value from the calling function. That means it's possible to 'simulate' pointers in Java by using objects. E.g. "class IntPointer { int containedInt; } IntPointer a = new IntPointer(); foo(a); print(a.containedInt) - the result could be anything! This is of course clunky & overly verbose, but if you like Java, that is probably right up your alley!

The (primary) reason that Java doesn't have pointers is that pointers let you freely tinker with memory. Unlike C, Java's memory is managed - instead of the programmer having to handle memory allocation & deallocation, it's abstracted into an operation of the JVM. That means, as another consequence, that the programmer can't be allowed to tinker with memory freely, because that would break the abstraction that lets Java's memory management works.


^^ This paragraph is the actual answer you were looking for, feel free to skip the rest.

*java objects are actually pointers with a very constrained set of operations that can be performed on them.

Pittsburgh Fentanyl Cloud
Apr 7, 2003


PleasingFungus posted:

That's not what 'pass-by-reference' means.

When a function is 'pass-by-reference', the arguments are passed as pointers ('references') to the actual values, rather than the values proper. This means that you can modify the arguments (by dereferencing the pointer), which can be good or bad. It also means that you don't have to copy the values from one space in memory to another, which is important when dealing with large variables (arrays, big objects, etc).

In C and similar languages, you can actually work with pointers, so you can make the decision explicitly. (void foo(int a, int * b) - a is passed by value, b is passed as a pointer.) Java doesn't have user-defined pointers, so the language has to make the decision for you. The decision they made for primitives (ints, bools, etc) was 'pass-by-value'. In "int a = 1; foo(a); print(a)", the result printed will always be '1', no matter what happens in foo(). This is the primary appeal of pass-by-value: you can guarantee that variables passed as function arguments remain unchanged when you return to your own scope. It's a reasonable default.

Java objects, on the other hand, are passed by reference: if you pass in an object to a function & modify it therein, you can retrieve the modified value from the calling function. That means it's possible to 'simulate' pointers in Java by using objects. E.g. "class IntPointer { int containedInt; } IntPointer a = new IntPointer(); foo(a); print(a.containedInt) - the result could be anything! This is of course clunky & overly verbose, but if you like Java, that is probably right up your alley!

The (primary) reason that Java doesn't have pointers is that pointers let you freely tinker with memory. Unlike C, Java's memory is managed - instead of the programmer having to handle memory allocation & deallocation, it's abstracted into an operation of the JVM. That means, as another consequence, that the programmer can't be allowed to tinker with memory freely, because that would break the abstraction that lets Java's memory management works.


^^ This paragraph is the actual answer you were looking for, feel free to skip the rest.

*java objects are actually pointers with a very constrained set of operations that can be performed on them.

you stupid loving oval office

why would you do this

why

PleasingFungus
Oct 10, 2012
idiot asshole bitch who should fuck off
that was a long and boring carepost in the pos.

things that are more fun than talking about java and pointers and pass-by-reference: function pointers, closures, lambdas, first-class functions generally. ask me about those!

also sorry if I got anything wrong in my last post, I'm tired and suffering from allergies and my grandpa died last night and I'm typing enormous amounts of dumb poo poo rather than think about anything right now.

:justpost:

e: haha, it looks like I was responding to tori there

sorry :(

Pittsburgh Fentanyl Cloud
Apr 7, 2003


PleasingFungus posted:

my grandpa died last night

owned

PleasingFungus posted:

e: haha, it looks like I was responding to tori there

double owned

BONGHITZ
Jan 1, 1970

java more like jabba

BONGHITZ
Jan 1, 1970

sorry about ur loss

PleasingFungus
Oct 10, 2012
idiot asshole bitch who should fuck off

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
thanks i'm pretty sure i get it. that's kinda how i thought it worked i just didn't articulate it right.

sorry about your gramps.

Pokemon OH SNAP!
Oct 17, 2004

I'm fresh out of college and make a sum that it took my father 20 years to claw up to adjusted for inflation. All I do is write code that is childishly easy and designed to be read and maintained by a guy with 6hrs of training and no CS background and then install it on stuff.

Also I have no real qualifications to even touch a computer except for a computer janitor job I got fired from 5 years a go.

Pokemon OH SNAP! fucked around with this message at 04:29 on May 8, 2013

Bloody
Mar 3, 2013

JG_Plissken posted:

whats wrong with static data please don't blackball me

ShadowHawk
Jun 25, 2000

CERTIFIED PRE OWNED TESLA OWNER

PleasingFungus posted:

That's not what 'pass-by-reference' means.

When a function is 'pass-by-reference', the arguments are passed as pointers ('references') to the actual values, rather than the values proper. This means that you can modify the arguments (by dereferencing the pointer), which can be good or bad. It also means that you don't have to copy the values from one space in memory to another, which is important when dealing with large variables (arrays, big objects, etc).

In C and similar languages, you can actually work with pointers, so you can make the decision explicitly. (void foo(int a, int * b) - a is passed by value, b is passed as a pointer.) Java doesn't have user-defined pointers, so the language has to make the decision for you. The decision they made for primitives (ints, bools, etc) was 'pass-by-value'. In "int a = 1; foo(a); print(a)", the result printed will always be '1', no matter what happens in foo(). This is the primary appeal of pass-by-value: you can guarantee that variables passed as function arguments remain unchanged when you return to your own scope. It's a reasonable default.

Java objects, on the other hand, are passed by reference: if you pass in an object to a function & modify it therein, you can retrieve the modified value from the calling function. That means it's possible to 'simulate' pointers in Java by using objects. E.g. "class IntPointer { int containedInt; } IntPointer a = new IntPointer(); foo(a); print(a.containedInt) - the result could be anything! This is of course clunky & overly verbose, but if you like Java, that is probably right up your alley!

The (primary) reason that Java doesn't have pointers is that pointers let you freely tinker with memory. Unlike C, Java's memory is managed - instead of the programmer having to handle memory allocation & deallocation, it's abstracted into an operation of the JVM. That means, as another consequence, that the programmer can't be allowed to tinker with memory freely, because that would break the abstraction that lets Java's memory management works.


^^ This paragraph is the actual answer you were looking for, feel free to skip the rest.

*java objects are actually pointers with a very constrained set of operations that can be performed on them.

Thanks for this, it made me realize I already understood pointers but didn't really have words for them cause I've been working in python and ruby and never got no CS degree

Moo Cowabunga
Jun 15, 2009

[Office Worker.




Jim Silly-Balls posted:

I want to meet a farmer like you IRL someday. My mind can't reconcile a farmer also being a yosposter

I didn't choose the rural life, the rural life chose me.












...when my grandfather died.


Talk about being handed something on a silver platter!

LP0 ON FIRE
Jan 25, 2006

beep boop
is this thread author tef

Adbot
ADBOT LOVES YOU

PleasingFungus
Oct 10, 2012
idiot asshole bitch who should fuck off

ShadowHawk posted:

Thanks for this, it made me realize I already understood pointers but didn't really have words for them cause I've been working in python and ruby and never got no CS degree

half the common problems people have with pointers are just dumb syntax poo poo

int * foo, bar, etc

pointers are really very simple once you understand the basics!

except when you start dealing with funny pass-by-reference stuff (void foo(int& bar){}), dumb tricks/idioms like *foo++, etc

(basically the only reason pre/post-increment operators exist in tyool 2013 are to enable people who want to write unreadable code and/or to accidentally stumble into undefined language behavior)

but the basics of pointers are basically just one conceptual leap, and if you know how objects work in java/python/ruby then you're pretty much already there.

congrats!

  • Locked thread