|
Just a general question. Is the PL world full of people that are incredibly stupid?
|
# ? Jun 27, 2016 05:53 |
|
|
# ? May 29, 2024 12:42 |
|
sarehu posted:Just a general question. Is the PL world full of people that are incredibly stupid? it has people in it
|
# ? Jun 27, 2016 06:01 |
|
worse it has lots of academics
|
# ? Jun 27, 2016 08:59 |
|
sarehu posted:people are incredibly stupid? yes
|
# ? Jun 27, 2016 09:40 |
|
pl attracts a lot of very spergy people, obsessed with mindless consistency and perceived elegance, and then it attracts the exact opposite, who try to rebel by eschewing all thought and planning, mashing whatever catches their fancy that day together into barely functioning systems it is a field very low on actual pragmatic planning
|
# ? Jun 27, 2016 10:34 |
|
sarehu posted:Just a general question. Is the PL world full of people that are incredibly stupid? werent you writing a pl? lol
|
# ? Jun 27, 2016 11:35 |
|
Cybernetic Vermin posted:mashing whatever catches their fancy that day together into barely functioning systems but they are functioning
|
# ? Jun 27, 2016 16:51 |
|
copy-pasting a bunch of boilerplate over and over is often better than some mystical metaprogramming voodoo. your ide can automate a lot of the copy-pasting.
|
# ? Jun 27, 2016 17:31 |
|
Mr Dog posted:copy-pasting a bunch of boilerplate over and over is often better than some mystical metaprogramming voodoo. I love copy-pasting bugs and having to fix the bug in multiple places.
|
# ? Jun 27, 2016 19:21 |
|
Ah a golang programmer
|
# ? Jun 27, 2016 20:02 |
|
more like dICK posted:Ah a golang programmer ive seen several go programmers bring out the "your ide can automate the copy-pasting" argument. i dont think ive seen any other kind of programmer make that argument.
|
# ? Jun 27, 2016 23:31 |
|
although i wouldnt be surprised to see a java programmer make it
|
# ? Jun 27, 2016 23:32 |
|
sometimes the best thing to do is C&P. Other times it is not. There are upsides and downsides. Downsides are well-known and consist of increased maintenance burden and addition of visual noise that obscures important detail. The downsides are not absolute and sometimes it seems like the only way to make people care about the downside of metaprogramming monstrosities is to tell them that the performance is bad, as opposed to mentioning actual good reasons like the fact that it is not immediately clear what is going on. Java is a good language because you can metaprogram in it (for rather lax definitions of metaprogramming) but it makes it just painful enough that it forces you to think twice about whether it is actually a good idea or not.
|
# ? Jun 28, 2016 00:12 |
|
yes but is it taking up so much of your time that you need to automate the process?
|
# ? Jun 28, 2016 00:16 |
|
Kinda but not really. Like in Java you'll usually autogenerate your accessors. But that's good, because calling an accessor should look different from accessing a data member, I don't like C# style properties much although I don't have that strong an opinion on the matter.
|
# ? Jun 28, 2016 00:25 |
|
Mr Dog posted:Kinda but not really. Like in Java you'll usually autogenerate your accessors. But that's good, because calling an accessor should look different from accessing a data member, I don't like C# style properties much although I don't have that strong an opinion on the matter. eh, i agree in principle but c# properties are so convenient that i end up never using public data members anyway.
|
# ? Jun 28, 2016 00:48 |
|
just use lombok
|
# ? Jun 28, 2016 02:21 |
|
jony neuemonic posted:eh, i agree in principle but c# properties are so convenient that i end up never using public data members anyway. I like c# properties because they let you be really lazy while still making it easy to add logic to the getters and setters later if you need to.
|
# ? Jun 28, 2016 03:19 |
|
FamDav posted:just use lombok use http://immutables.github.io/ instead because who uses setters
|
# ? Jun 28, 2016 03:41 |
|
Brain Candy posted:use http://immutables.github.io/ instead because who uses setters pojos
|
# ? Jun 28, 2016 04:02 |
|
look you are supposed to have a nullary constructor and then for every field x, you have getX() and setX(), so your class is basically just a stupid struct. you do this because it means you have a java bean. what is a java bean? nobody knows. why would you need one? nobody knows.
|
# ? Jun 28, 2016 04:18 |
|
JewKiller 3000 posted:what is a java bean? a miserable pile of servlets
|
# ? Jun 28, 2016 08:21 |
|
or possibly a programmer played by rowan atkinson
|
# ? Jun 28, 2016 08:21 |
|
we are all java beans
|
# ? Jun 28, 2016 16:14 |
|
JewKiller 3000 posted:look you are supposed to have a nullary constructor and then for every field x, you have getX() and setX(), so your class is basically just a stupid struct. you do this because it means you have a java bean. what is a java bean? nobody knows. why would you need one? nobody knows. look at this scrub who isn't using builders also nio-style accessor supremacy (java beans are user interface components adhering to certain conventions, most of which have been totally forgotten about. somehow people started getting the idea that you should apply some random subset of a user interface component convention to objects carrying your poo poo to and from a database)
|
# ? Jun 28, 2016 16:24 |
|
Mr Dog posted:copy-pasting a bunch of boilerplate over and over is often better than some mystical metaprogramming voodoo.
|
# ? Jun 29, 2016 08:08 |
|
yeah, i really don't think the ide code generation thing is a good route overall, if you can express what you wanted to do in a few keypresses in the ide it very likely should be a few keypresses in the actual code, possibly with the ide giving some *view* of the keypresses which makes it more readable, but actually realizing a huge chunk of code from the keypresses at once is really dubious
|
# ? Jun 29, 2016 09:04 |
|
copy-paste otoh is itself not necessarily bad, trying to generalize code excessively when you need a couple of different variants with "real" differences added may create more dependencies than is really desirable
|
# ? Jun 29, 2016 09:05 |
|
Cybernetic Vermin posted:pl attracts a lot of very spergy people, obsessed with mindless consistency and perceived elegance, and then it attracts the exact opposite, who try to rebel by eschewing all thought and planning, mashing whatever catches their fancy that day together into barely functioning systems Also fascists, e.g. Moldbug
|
# ? Jun 29, 2016 10:13 |
|
Cybernetic Vermin posted:copy-paste otoh is itself not necessarily bad, trying to generalize code excessively when you need a couple of different variants with "real" differences added may create more dependencies than is really desirable and sometimes two different parts of the codebase just happen to need to do the same thing but aren't really conceptually the same. i saw this a lot when novices got ahold of inheritance and would do poo poo like inherit Point from Vector because they both have x, y, and z.
|
# ? Jun 29, 2016 14:30 |
|
raminasi posted:and sometimes two different parts of the codebase just happen to need to do the same thing but aren't really conceptually the same. i saw this a lot when novices got ahold of inheritance and would do poo poo like inherit Point from Vector because they both have x, y, and z. affine spaces sucks, vector spaces ftw
|
# ? Jun 29, 2016 14:32 |
|
copy and pasted code is easy to delete
|
# ? Jun 29, 2016 16:08 |
|
raminasi posted:and sometimes two different parts of the codebase just happen to need to do the same thing but aren't really conceptually the same. i saw this a lot when novices got ahold of inheritance and would do poo poo like inherit Point from Vector because they both have x, y, and z. i see a lot of the reverse where people excessively factor out tasks within a function into private helper functions to make the code look cleaner but they're functions that receive 90% of the state of the caller via arguments and could never conceivably be used elsewhere. Sometimes this is OK if you can do it with one or two arguments and a clean return value, but more often than not I see people just encapsulating each loop or bit of logic a function does into helpers that take 15 arguments with out params and stuff and it's horrible.
|
# ? Jun 29, 2016 18:21 |
|
yeah when i refactor i often start with a "reverse refactor" where i copy "factored out" code into each function and then clean it up
|
# ? Jun 29, 2016 18:38 |
edit: I'm dumb
|
|
# ? Jun 29, 2016 18:54 |
|
LeftistMuslimObama posted:i see a lot of the reverse where people excessively factor out tasks within a function into private helper functions to make the code look cleaner but they're functions that receive 90% of the state of the caller via arguments and could never conceivably be used elsewhere. Sometimes this is OK if you can do it with one or two arguments and a clean return value, but more often than not I see people just encapsulating each loop or bit of logic a function does into helpers that take 15 arguments with out params and stuff and it's horrible.
|
# ? Jun 29, 2016 19:02 |
|
LeftistMuslimObama posted:i see a lot of the reverse where people excessively factor out tasks within a function into private helper functions to make the code look cleaner but they're functions that receive 90% of the state of the caller via arguments and could never conceivably be used elsewhere. Sometimes this is OK if you can do it with one or two arguments and a clean return value, but more often than not I see people just encapsulating each loop or bit of logic a function does into helpers that take 15 arguments with out params and stuff and it's horrible. there's a whole school of thought that this is the best poo poo ever. typically these people also advocate for arbitrary limits on the number of lines or blocks in a function. i dont get these people.
|
# ? Jun 29, 2016 21:32 |
|
ask me about having a coworker that obsessively moves half of the lines of code in any given method into a 1-line 1-use helper function for each one. it's not like they're long or complicated lines but there are so many functions likecode:
gonadic io fucked around with this message at 22:10 on Jun 29, 2016 |
# ? Jun 29, 2016 22:04 |
|
Volte posted:this is why nested functions are necessary and why nested functions in rust are poo poo
|
# ? Jun 29, 2016 22:21 |
|
|
# ? May 29, 2024 12:42 |
|
HappyHippo posted:there's a whole school of thought that this is the best poo poo ever. typically these people also advocate for arbitrary limits on the number of lines or blocks in a function. i dont get these people. if this school of thought is the one i'm thinking of it also basically mandates that the extracted functions be binary at most, and i think it works well as long as you follow that rule too. doing it with four ref parameters or whatever is just insane. gonadic io posted:ask me about having a coworker that obsessively moves half of the lines of code in any given method into a 1-line 1-use helper function for each one. it's not like they're long or complicated lines but there are so many functions like see, i like this (but only if you have nested functions)
|
# ? Jun 29, 2016 22:23 |