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
Shaggar
Apr 26, 2006

coffeetable posted:

"all p langs are bad" isnt equivalent to "all things that aren't p langs are good"

Adbot
ADBOT LOVES YOU

Shaggar
Apr 26, 2006
I think it would be kewl to develop java assignments w/ maven. u could create archetypes for each project that the students start from. it could have spots for them to fill out the code and then tests they can use to verify their work before submission. you'd still have to read the code to figure out if their cheating or whatever, but it would be helpful from the students perspective and they'd passively learn bits of maven which you could later expand upon in higher level classes

oh no blimp issue
Feb 23, 2011

Shaggar posted:

ruby is an honorary p-lang

this is what i was going for

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
is there ever a time in c where you want to be using c "objects" instead of just passing around pointers because passing around pointers sure seems a lot easier

like i guess if you want to avoid passing by reference so that everything is nice and immutable that has value

DONT THREAD ON ME fucked around with this message at 15:39 on Apr 14, 2014

SavageMessiah
Jan 28, 2009

Emotionally drained and spookified

Toilet Rascal
passing small structs by value tends to be faster then passing a pointer if you wanna be a SPEED DEMON

also copying is safer from a mutability standpoint - the receiver can't grub around with your copy of the data

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

SavageMessiah posted:

passing small structs by value tends to be faster then passing a pointer if you wanna be a SPEED DEMON

also copying is safer from a mutability standpoint - the receiver can't grub around with your copy of the data

yeah mutability is the big thing that came to my mind.

oh no blimp issue
Feb 23, 2011

SavageMessiah posted:

passing small structs by value tends to be faster then passing a pointer if you wanna be a SPEED DEMON

i have a friend at work who always programs to be 2 FAST 2 FURIOUS and its infuriating

Morkai
May 2, 2004

aaag babbys
something something premature optimization

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Shaggar posted:

I think it would be kewl to develop java assignments w/ maven. u could create archetypes for each project that the students start from. it could have spots for them to fill out the code and then tests they can use to verify their work before submission. you'd still have to read the code to figure out if their cheating or whatever, but it would be helpful from the students perspective and they'd passively learn bits of maven which you could later expand upon in higher level classes

this + unit testing for conformance

however, this would require professors to actually be capable of good software engineering practices

a few classes I took had this, but most of them were sample code + pdf +zip made in the 90s and never really updated.

MononcQc
May 29, 2007

it's computer science vs. software engineering debate time!

Shaggar
Apr 26, 2006
one should be taught in every school and the other should be taught in a handful of places that already have a tradition of research in the field.

Shaggar
Apr 26, 2006
altho proper understanding of build management would help the comp sci crowd immensely

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY
felt relevant to this thread

quote:

Improper attention to the method of rounding can produce disastrous results. The Wall Street Journal (November , 1983, p. 37) reported on the Vancouver Stock Exchange, which created an index much like the Dow Jones Index. It began with a nominal value of 1,000.000 and was recalculated after each recorded transaction by calculation to four decimal places, the last place being truncated so that three decimal places were reported. Truncation to the fourth decimal place of a number measured to approximately 10^3 might seem innocuous. Yet, within a few months the index had fallen to 520, while there was no general downturn in economic activity. The problem, of course, was insufficient attention given to the method of rounding. When recalculated properly, the index was found to be 1098.892.

Shaggar
Apr 26, 2006
oh, Canada

FamDav
Mar 29, 2008

coffeetable posted:

felt relevant to this thread

how did they let it drop by half over months, plural, without thinking something is bad

Shaggar
Apr 26, 2006
Canadian inferiority complex.

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Shaggar posted:

altho proper understanding of build management would help the comp sci crowd immensely

no, don't teach them that; that's how i make money

exe cummings
Jan 22, 2005

prefect posted:

no, don't teach them that; that's how i make money

Kids out of cs programs can do amazing things like make compilers and build neural nets but because I understand maven I will be infinitely more useful to a company and make a lot more money.

FamDav
Mar 29, 2008

exant posted:

Kids out of cs programs can do amazing things like make compilers and build neural nets but because I understand maven I will be infinitely more useful to a company and make a lot more money.

maven is a pos but then again all commercially available build tools dont really scale to managing thousands of individual contributors hth

Bloody
Mar 3, 2013

FamDav posted:

maven is a pos

this triggers the shaggaring

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
i've never used a build tool that isn't garbage

Bloody
Mar 3, 2013

i just click build in the ide worksforme

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison
c owns

Workaday Wizard
Oct 23, 2009

by Pragmatica
man i am so sick of the plain color background. I think it's burning in my retina or smth

is there a way to add a paper grain background to VS? or at least a program to add paper grain effect to the whole desktop?


switching to dark theme didn't help much :(

Bloody
Mar 3, 2013

Shinku ABOOKEN posted:

man i am so sick of the plain color background. I think it's burning in my retina or smth

is there a way to add a paper grain background to VS? or at least a program to add paper grain effect to the whole desktop?


switching to dark theme didn't help much :(

what the gently caress is wrong with you

Workaday Wizard
Oct 23, 2009

by Pragmatica

Bloody posted:

what the gently caress is wrong with you

the single colors backgrounds

didn't you read the post???

exe cummings
Jan 22, 2005

USSMICHELLEBACHMAN posted:

i've never used a build tool that isn't garbage

I used to have a hundred problems so I used maven now I have 101

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Shinku ABOOKEN posted:

the single colors backgrounds

didn't you read the post???

sounds like it's time to switch to an apple computer

Workaday Wizard
Oct 23, 2009

by Pragmatica

USSMICHELLEBACHMAN posted:

sounds like it's time to switch to an apple computer

i am doing c# so no can do

e:

lmaaaaaaaaaaaaaao look at this
http://visualstudiogallery.msdn.microsoft.com/9ba50f8d-f30c-4e33-ab19-bfd9f56eb817/showImage/86649

Shaggar
Apr 26, 2006

FamDav posted:

maven is a pos but then again all commercially available build tools dont really scale to managing thousands of individual contributors hth

lmao. maven rules don't even front

double sulk
Jul 2, 2010


i'm the very slight hint of cleavage

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

double sulk posted:

i'm the very slight hint of cleavage

yes i clicked on the link because of the word "cleavage" :cripes:

weird
Jun 4, 2012

by zen death robot

CPColin
Sep 9, 2003

Big ol' smile.
code:
public AssertionError(boolean detailMessage) {
   this("" +  detailMessage);
}
uuuuuuuuugh

code:
int maximumLength = Integer.parseInt(String.valueOf(MAXIMUM_LENGTH));
UUUUUUUGH

(hint: one of these is from java.lang!)

FamDav
Mar 29, 2008

CPColin posted:

code:
public AssertionError(boolean detailMessage) {
   this("" +  detailMessage);
}
uuuuuuuuugh

code:
int maximumLength = Integer.parseInt(String.valueOf(MAXIMUM_LENGTH));
UUUUUUUGH

(hint: one of these is from java.lang!)

i guess number 1

CPColin
Sep 9, 2003

Big ol' smile.
correct. I'm not sure which one is dumber, though

JewKiller 3000
Nov 28, 2006

by Lowtax
the first is dumber because implicit conversions are bad and wrong

suffix
Jul 27, 2013

Wheeee!

~Coxy posted:

open source hippy types like to make fun of decorators and factories and such because they've never worked on a real world project project large or complicated enough (or at all) that such patterns become useful

it's not about using factories and teh like, it's about java programmers sitting there typing out ButtFactoryProxies manually like cavemen banging rocks together

the python standard library uses plenty of 'factories', but no one gives it a second thought because it's just a callback, and every class is its own factory

if your ButtFactory isn't just a function that returns Butts, you're doing something wrong (you're programming java)

CPColin
Sep 9, 2003

Big ol' smile.

JewKiller 3000 posted:

the first is dumber because implicit conversions are bad and wrong

it's not even just a conversion. that syntactic sugar translates to this:

code:
this(new StringBuilder().append(defaultValue).toString());
all of which does a big pile of poo poo behind the scenes. compare that to something sensible like this:

code:
this(String.valueOf(defaultValue));
where String.valueOf() just returns "true" or "false" and ugh the Java class library designers are the worst

Adbot
ADBOT LOVES YOU

nrook
Jun 25, 2009

Just let yourself become a worthless person!

suffix posted:

it's not about using factories and teh like, it's about java programmers sitting there typing out ButtFactoryProxies manually like cavemen banging rocks together

the python standard library uses plenty of 'factories', but no one gives it a second thought because it's just a callback, and every class is its own factory

if your ButtFactory isn't just a function that returns Butts, you're doing something wrong (you're programming java)

also, basic list operations appear to be a pain in the rear end in java, or at least they were before java 8. can't use java 8 at work yet so I don't have opinions about it, but it probably fixes some of this

like, I had an object foo in a list today, and I wanted to take all the objects such that foo.bar == "hi", and get their indices in the list

you know, like

code:
[i for i, j in enumerate(the_list) if j.bar == "hi"]
or

code:
IEnumerable<int> IndicesWhereBarIsHi(IList<Foo> foos) {
  for (int i in Enumerable.Range(0, foos.Count) {
    if (foos[i].bar == "hi") {
      yield return i;
    }
  }
}
which is better than it looks, because I included the function declaration. unless you're doing it mid-logic, then it is just what it looks like cuz you gotta declare a closure. you can and should probably define your own IEnumerable<T>.Enumerate extension method like the python one above though, which makes this cleaner, and lets you use fake sql syntax if you're an idiot

how do you do that in java? you do

code:
List<Integer> indices = new ArrayList<Integer>()
for (old-style for loop like a caveman) {
  if (Foos.get(i).bar == "hi") {
    indices.append(i);
  }
}
which sucks! especially since it tempts people to add logic into the for loop, and has mutable state and stuff like that

  • Locked thread