|
Soricidus posted:java is undeniably boring I think starts with hearing some mega-nerdlord who's been on the 4chan technology board since 6th grade talk about how Java isn't fast and obviously you also know all about computers as a student in a high-school programming course so you start repeating and believing it. Combine that with it usually being the language that you learn first in school which means that the pitfalls of learning programming get blamed on Java. Java is the lame parent that makes you brush your teeth before bed and checks that your homework is done. Then cool parent JavaScript comes along and doesn't throw compiler errors and doesn't make you use all that boilerplate.
|
# ? Jul 18, 2017 19:47 |
|
|
# ? May 20, 2024 20:18 |
|
be free my previous post
|
# ? Jul 18, 2017 19:47 |
|
MeruFM posted:i feel like a lot of java advice is like jquery advice when you search for a javascript question. i think that's probably just because older version of java have been around for longer and that gives the answers more visibility
|
# ? Jul 18, 2017 20:31 |
Nothing really matters Expressive ADTs Nothing really matters Nothing really matters Nothing really matters To meeee~~~
|
|
# ? Jul 18, 2017 20:47 |
VikingofRock posted:Nothing really matters the lyrical infection from pl thread is spreading
|
|
# ? Jul 18, 2017 20:50 |
cinci zoo sniper posted:the lyrical infection from pl thread is spreading Lol crap wrong thread
|
|
# ? Jul 18, 2017 20:53 |
|
VikingofRock posted:Lol crap wrong thread i don't blame you for making that assumption, it's always surprising when the pl thread isn't just arguing about strong vs weak typing
|
# ? Jul 18, 2017 21:04 |
|
cinci zoo sniper posted:ah, i see. ill kill it in the crib by moving repeating functions in auxiliaries then. there's definitely a correlation between cyclomatic complexity and confusingness of a function, and the cyclomatic complexity can be thought of as the bare minimum number of tests you need to write to cover that function (if there's 20 different paths through a function, there's obviously at least 20 different cases of input). otoh, trying to do a hard cap on the cc of your functions is obviously dumb and a terrible idea and leads to insane things like splitting a 20-case switch into two different functions and declaring it improved, and it's easy to have it not catch actually complicated things because it happens to branch via polymorphism rather than an if. overall i'd consider a high cc as just a weak indicator that that part of the code could benefit from some refactoring.
|
# ? Jul 18, 2017 21:05 |
|
ThePeavstenator posted:I think starts with hearing some mega-nerdlord who's been on the 4chan technology board since 6th grade talk about how Java isn't fast and obviously you also know all about computers as a student in a high-school programming course so you start repeating and believing it. Combine that with it usually being the language that you learn first in school which means that the pitfalls of learning programming get blamed on Java. I think a lot of it is that your first java class is like "how to read a line from the console then spit another line back out." I mean I know you can do cool and fun stuff with java, but that's never how it's presented, so people don't pick it up until later. With javascript you can make interactive stuff, that you can share easily, so it's a bit more engaging from the get go.
|
# ? Jul 18, 2017 21:06 |
|
Plorkyeran posted:there's definitely a correlation between cyclomatic complexity and confusingness of a function, and the cyclomatic complexity can be thought of as the bare minimum number of tests you need to write to cover that function (if there's 20 different paths through a function, there's obviously at least 20 different cases of input). that's what ignore-lint comments are for i guess. Keep the linting up but add the ignore if you think this is the best you can do. ThePeavstenator posted:I think starts with hearing some mega-nerdlord who's been on the 4chan technology board since 6th grade talk about how Java isn't fast and obviously you also know all about computers as a student in a high-school programming course so you start repeating and believing it. Combine that with it usually being the language that you learn first in school which means that the pitfalls of learning programming get blamed on Java. There's an intermediate between "every class needs its own file, public static void main" and code:
|
# ? Jul 18, 2017 21:23 |
|
i like javascript (stockholm syndrome, i know) and sometimes i wanna typescript all the things so bad.
|
# ? Jul 18, 2017 21:26 |
|
MeruFM posted:There's an intermediate between "every class needs its own file, public static void main" and Yes but the first 2 languages most people learn in school are immediately on both ends of this spectrum.
|
# ? Jul 18, 2017 21:32 |
|
MeruFM posted:
Lol
|
# ? Jul 18, 2017 21:33 |
Plorkyeran posted:there's definitely a correlation between cyclomatic complexity and confusingness of a function, and the cyclomatic complexity can be thought of as the bare minimum number of tests you need to write to cover that function (if there's 20 different paths through a function, there's obviously at least 20 different cases of input). there is refactoring in need indeed. im probably reinventing horrible bicycle but the code flow for 3 methods is thingA-v(1:3) thingB-v(1:3) thingC-v(1:3) code(1:2+3) postD or postE where i'm sure i can get at least a few clean functions out with no hassle now the matplotlib methods the mccabe is upset with... not sure i can do much there, all the complexity ifs and whatnot basically are various formatting cases under if a title this if not a title something if b add that to title else if c change this in title and so on
|
|
# ? Jul 18, 2017 21:35 |
|
There Will Be Penalty posted:i like javascript (stockholm syndrome, i know) and sometimes i wanna typescript all the things so bad. it's nice for really short things because you don't need to care about anything, man. but the moment you need multiple files everything good about it goes away.
|
# ? Jul 18, 2017 23:41 |
|
MeruFM posted:There's an intermediate between "every class needs its own file, public static void main" and
|
# ? Jul 19, 2017 04:23 |
|
MeruFM posted:There's an intermediate between "every class needs its own file, public static void main" and Java code:
51 51 21 111
|
# ? Jul 19, 2017 07:34 |
|
me (1:30 am): oh drat, the goon ss13 server is restarting. guess i'll do something else for a few minutes until a game starts me (2:45 am): what have i done
|
# ? Jul 19, 2017 07:50 |
|
maybe a weird question, but if you're working on a project that's going to require data from other teams/services, who tracks down those teams/services? the developers, the project managers, or the managers? trying to get some outside perspective
|
# ? Jul 19, 2017 08:17 |
|
Elysiume posted:maybe a weird question, but if you're working on a project that's going to require data from other teams/services, who tracks down those teams/services? the developers, the project managers, or the managers? trying to get some outside perspective cc: them all, let their inbox sort 'em out
|
# ? Jul 19, 2017 08:36 |
|
Meanwhile in C:C code:
|
# ? Jul 19, 2017 08:39 |
|
Elysiume posted:maybe a weird question, but if you're working on a project that's going to require data from other teams/services, who tracks down those teams/services? the developers, the project managers, or the managers? trying to get some outside perspective at my former employment my manager would tell me who I needed to get in touch with and then it was my job to harass them until they gave me what I needed. this usually involved getting the engineering senior manager (who liked me) to email them and tell them to send me the drat spreadsheet because I’m not important enough to them
|
# ? Jul 19, 2017 08:49 |
|
Wheany posted:
John Big Booty posted:I don't know what's so terrible about the first thing it forces a lot of handwaving before even the basics can be grasped
|
# ? Jul 19, 2017 08:50 |
|
Doom Mathematic posted:Meanwhile in C: wtf is even going on in this one
|
# ? Jul 19, 2017 08:57 |
|
python supremacy code:
|
# ? Jul 19, 2017 08:59 |
|
Mr SuperAwesome posted:wtf is even going on in this one pointer arithmetic
|
# ? Jul 19, 2017 09:01 |
|
MeruFM posted:There's an intermediate between "every class needs its own file, public static void main" and java doesn't require every class to have its own file, and the code snippet you posted has identical results in java if you replace single quotes with double quotes
|
# ? Jul 19, 2017 09:36 |
|
Mr SuperAwesome posted:wtf is even going on in this one code:
|
# ? Jul 19, 2017 15:00 |
|
Mr SuperAwesome posted:wtf is even going on in this one
|
# ? Jul 19, 2017 17:02 |
|
anthonypants posted:if i had to guess i'd say that it sees the "1" as a string because of the quotes and then decides to use the + as a concatenation operator
|
# ? Jul 19, 2017 17:19 |
|
anthonypants posted:if i had to guess i'd say that it sees the "1" as a string because of the quotes and then decides to use the + as a concatenation operator c strings don't work like that. the type of a string literal is either const char[] or const char*(don't remember which it is). pointer arithmetic is the correct answer. Edit: oops beaten
|
# ? Jul 19, 2017 17:22 |
|
it's pointer arithmetic.
|
# ? Jul 19, 2017 17:39 |
|
gonadic io posted:i don't blame you for making that assumption, it's always surprising when the pl thread isn't just arguing about strong vs weak typing don't you mean static v dynamic typing?
|
# ? Jul 19, 2017 18:07 |
|
Luigi Thirty posted:me (1:30 am): oh drat, the goon ss13 server is restarting. guess i'll do something else for a few minutes until a game starts congratulations now you know Swift and Cocoa in addition to ObjC and Cocoa Touch! update that resume
|
# ? Jul 19, 2017 18:09 |
|
fleshweasel posted:it's pointer arithmetic.
|
# ? Jul 19, 2017 18:19 |
|
java is cool because it performs well and runs on multiple platforms with very little fuss. it's boring but it's also predictable and makes large projects easier to deal with than most langs
|
# ? Jul 19, 2017 19:09 |
|
Fergus Mac Roich posted:c strings don't work like that. the type of a string literal is either const char[] or const char*(don't remember which it is). pointer arithmetic is the correct answer. BTW, if you ever wonder if you should learn C, you should. It'll make you more careful and you'll have a newfound appreciation for how much even the crappiest high-level language does for you. anthonypants posted:sorry guys i forgot what thread i was in
|
# ? Jul 19, 2017 19:10 |
|
John Big Booty posted:It's just a char[]. Knowing how memory management works at a lower level is always helpful. And yeah, you appreciate "foo" + "bar" a hell of a lot more when you come from C.
|
# ? Jul 19, 2017 19:13 |
|
John Big Booty posted:It's just a char[]. so what happens if you assign to one of the chars? UB? Edit: even c tells you white lies, of course. virtual memory and all that. i read on this forum somewhere that even when you write asm that's not necessarily what the processor ends up executing. Fergus Mac Roich fucked around with this message at 19:30 on Jul 19, 2017 |
# ? Jul 19, 2017 19:20 |
|
|
# ? May 20, 2024 20:18 |
|
TIL there's a project that implements the mongo api/wire protocol over postgres, for when you realize you've made a terrible mistake by using mongo for anything: https://github.com/torodb/server
|
# ? Jul 19, 2017 19:23 |