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
ShadowHawk
Jun 25, 2000

CERTIFIED PRE OWNED TESLA OWNER
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.

Adbot
ADBOT LOVES YOU

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

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

ShadowHawk
Jun 25, 2000

CERTIFIED PRE OWNED TESLA OWNER
YOSPOS I have tried to "not learn" Javascript like 4 times now using various x-to-javascript translators and they're all inadequate and now I'm learning Javascript from scratch and all the tutorials act like I want to learn baby's first programming language

ShadowHawk
Jun 25, 2000

CERTIFIED PRE OWNED TESLA OWNER
I've never used SQL in my life and just spent all day learning to make a lovely webapp to store rock paper scissors games in SQLite

ShadowHawk
Jun 25, 2000

CERTIFIED PRE OWNED TESLA OWNER

Notorious b.s.d. posted:

fpm is already the other, easier way. packages produced by fpm are almost invariably poo poo quality and irreproducible (unless the first guy to fpm it was so kind as to provide you a makefile, but then you've just moved the ugly packaging details from a specfile to a makefile)

if you absolutely must produce total poo poo packages from a source tarball, use mock/docker (for a clean chroot) + checkinstall. i can't really recommend it but it's better than nothing.

your life will be much easier if you abandon this line of inquiry, and go find a specfile or SRPM written by someone else. "shortcuts" to packaging almost always make life worse rather than better.
Just wanted to confirm this is 100% true with .debs as well.

Notorious b.s.d. posted:

also no matter what you do, even if it's fpm, build your package in a clean chroot.

unwitting contamination from the host system is like the #1 way to gently caress up an rpm. there are shitloads of ways to do it. configure/make scripts are really drat good at finding the host's libraries and depending on them.
There are some nice tools to automate the whole chrooting for you (eg Ubuntu has pbuilder, which can also let you build off-arch packages too)

ShadowHawk
Jun 25, 2000

CERTIFIED PRE OWNED TESLA OWNER

bobbilljim posted:

lol if your ORM doesn't handle closing connections properly :smugmrgw:


*unfolds deckchair, sits back and watches*

python with: supremacy

ShadowHawk
Jun 25, 2000

CERTIFIED PRE OWNED TESLA OWNER
YOSPOS how do i test my unit

ShadowHawk
Jun 25, 2000

CERTIFIED PRE OWNED TESLA OWNER
it is a large python

Adbot
ADBOT LOVES YOU

ShadowHawk
Jun 25, 2000

CERTIFIED PRE OWNED TESLA OWNER
I wrote a flaky test the other day and I'm not really motivated to fix it

  • Locked thread