Ben Lubar is abusing variables
-
Today I decided I had to speak up, this has gone too far.
I know that @ben_lubar is a perversive man: all development tools he uses are free, he plays Dwarf Fortress, he's our admin and bears the constant abuse. "Is he a masochist?", I've been pondering over and over in my head. But today, I finally found the answer. He's into S&M and he's been taking it all out on… variables.
Shame on you, Ben. I'm glad that his sweet little QR-cat has finally checked your privilege.
-
@kt_ said in Ben Lubar is abusing variables:
He's into S&M
I have a joke for that, but it would totally dox where I work.
-
There used to be a magazine called Science and Mechanics who would refer to themselves as S&M.
-
@El_Heffe said in Ben Lubar is abusing variables:
There used to be a magazine called Science and Mechanics who would refer to themselves as S&M.
Now we all know where @abarker works!
-
@abarker said in Ben Lubar is abusing variables:
@kt_ said in Ben Lubar is abusing variables:
He's into S&M
I have a joke for that, but it would totally dox where I work.
You work at Liberator?
-
@Lorne-Kates That might actually be fun!
No. The guys who founded the company had last names starting with M and S. Since the business was started in 1910, they probably didn't think much of the name. Either that, or they were still teenage boys at heart.
-
-
What's wrong with reusing variables? If you have 5000-line methods, you'd like to conserve variables to keep their declarations at the beginning of the method short.
This is a real argument that exists
-
Usual net effect when I rewrite that guy's code:
- 30% less lines
- 200% more helper functions
- 100% more comments
- 274% more readable
- 50% less local variables
Example function from his hand:
int addScores( myObject * a, myObject * b ) { int ascore, bscore, sum; if (a == NULL) { return 0; } if (b == NULL) { return 0; } ascore = a->score; bscore = b->score; sum = ascore + bscore; return sum; }
Except of course he'd never write a function for something that simple.
-
@CreatedToDislikeThis said in Ben Lubar is abusing variables:
What's wrong with reusing variables?
Not all that much, actually. The first thing the compiler does will be define-use tracking so as to get away from having a specific location for the variable, and that disentangles all the reuse into separate write-once variables. The computer's totally happy with it all.
It's probably not a good idea to write confusing code for all that. ;)
-
oh oh oh I almost forgot to, in response to "abusing variables", make a PEEK and POKE joke can I still do that will people still get it?
-
-
@CreatedToDislikeThis said in Ben Lubar is abusing variables:
What's wrong with reusing variables? If you have 5000-line methods, you'd like to conserve variables to keep their declarations at the beginning of the method short.
This is a real argument that existsI sadly know this exists because I was forced to use it in some code I was writing at some point.
I'd rather waste the 4 bytes for an extra int32 variable rather than reusing ones and muddying their meaning.
-
Has anyone ever hit the JVM local variable limit in non-generated code? Ever?
-
@ben_lubar I'd expect to hit some other limit first.
-
-
@dkf said in Ben Lubar is abusing variables:
I'd expect to hit some other limit first.
I'd expect to be hit first. By a cluebat.
-
@Lorne-Kates said in Ben Lubar is abusing variables:
make a PEEK and POKE joke can I still do that will people still get it?
Some of us, yes.
-
@abarker said in Ben Lubar is abusing variables:
No. The guys who founded the company had last names starting with M and S.
Michael Marks and Thomas Spencer?
-
@ben_lubar True, dat.
-
@Onyx said in Ben Lubar is abusing variables:
@Lorne-Kates said in Ben Lubar is abusing variables:
make a PEEK and POKE joke can I still do that will people still get it?
Some of us, yes.
Is that because you're old, or they're still using 8-bit computers in your country?
-
@FrostCat said in Ben Lubar is abusing variables:
@Onyx said in Ben Lubar is abusing variables:
@Lorne-Kates said in Ben Lubar is abusing variables:
make a PEEK and POKE joke can I still do that will people still get it?
Some of us, yes.
Is that because you're old, or they're still using 8-bit computers in your country?
We just got the 8th bit, but the goddamn French assholes claimed the 8th bit for their vandalized vowels.
-
@dkf said in Ben Lubar is abusing variables:
@ben_lubar I'd expect to hit some other limit first.
I've hit the bytecode limit for one file first. That's like
3264k IIRC. E-conomic api exposed a gazillion methods via soap. Their solution was to hand edit the wsdl files to select the stuff I needed. I was not impressed.
-
@Lorne-Kates said in Ben Lubar is abusing variables:
vandalized vowels.
Ça allors! Sacreblue, bâtard!
-
@FrostCat said in Ben Lubar is abusing variables:
Is that because you're old,
not as old as @boomzilla of course
or they're still using 8-bit computers in your country?
I do :) here in the US, and it is a a new chip (2013 era). But I also used them outside the US like 14 years ago, but that one was 40 times larger.
-
@Lorne-Kates said in Ben Lubar is abusing variables:
You work at Liberator?
I need to ask:
Are you a @morbiuswilters sock puppet? For many years? 'Cause you've a large amount of these interesting links....
-
@swayde said in Ben Lubar is abusing variables:
I've hit the bytecode limit for one file first. That's like 3264k IIRC.
JSPs are turned into a Java class with the JSP content (transformed into out.println() calls and tag library method calls and so on) all in one method. It's easy to hit the 64k line method limit with a big JSP.
-
@another_sam said in Ben Lubar is abusing variables:
It's easy to hit the 64k line method limit with a big JSP.
I think that's usually a sign that your JSP is too complicated. ;)
-
@FrostCat said in Ben Lubar is abusing variables:
Is that because you're old, or they're still using 8-bit computers in your country?
TDWTF answer:
8-bit? What do you think this is, 1997? Nah man, 16-bit goodness. They are upgrading the Hammer CPUs to 32bit soon too, so SickleOS will get that Old-Tab thing you capitalist pigs rave about all the time. Can't wait to see what the fuss is about.Serious answer:
Neither, I just have a fascination with old hardware I didn't get to experience when it was new so I know a thing or two about programming such machines, even though I didn't actually do it myself.NodeBB answer:
Freaking notifications need proper icons or something, I didn't even realize this was a new post until now.
-
@dkf said in Ben Lubar is abusing variables:
I think that's usually a sign that your JSP is too complicated.
I don't like JSP at all and I would not disagree with your statement. On the flip side it's pretty common for there to be a one-to-one mapping between front-end page and JSP file. This means that large complicated pages usually have large complicated JSPs that are only decomposed when the compiler tells you "WTF are you doing dude?".
-
@Onyx said in Ben Lubar is abusing variables:
Neither, I just have a fascination with old hardware I didn't get to experience when it was new so I know a thing or two about programming such machines, even though I didn't actually do it myself.
They were awesome when they were new. Today's computers will never be able to recreate the fascination I had with my 8 bit computer.