|
Subjunctive posted:I fly too much to want to ask follow-up questions. planes are strictly regulated enough that they're pretty much fine its poo poo like the power grid (not reactors, distribution), other utilities, and misc government systems that are ultrafucked edit: basically stuff that won't directly kill people but would cause chaos or ruin lives if it malfunctioned/got hacked Arcsech fucked around with this message at 02:46 on Apr 24, 2014 |
# ? Apr 24, 2014 02:44 |
|
|
# ? May 14, 2024 15:49 |
|
there's a weird vibe going on that you write unit tests so that your code doesn't explode the golden gate bridge and kill hundreds you write unit tests because it's faster in the medium term than not writing them. "management" doesn't care about best practices, but what they do care about is three years down the line, Fuckface unit has happy customers and more rapid development, and Bitchass team can't find their rear end with both their hands, and guess why? unit tests this is especially true in dynamically typed languages, I have no clue how you'd write python without tests. unless you love seeing TypeError in your production logs I guess? note: I dunno if this applies to scrappy startups with two developers and it probably doesn't apply to games unless you're blizzard. but if you care at all about v2 you gotta write tests bro nrook fucked around with this message at 03:55 on Apr 24, 2014 |
# ? Apr 24, 2014 03:48 |
|
so how does one differentiate between good tests and bad tests?
|
# ? Apr 24, 2014 03:57 |
|
Kevin Mitnick P.E. posted:so how does one differentiate between good tests and bad tests? i'll save you several steps https://github.com/mattdiamond/fuckitjs
|
# ? Apr 24, 2014 03:59 |
|
if you're writing poo poo in js you probably aren't even concerned about good code or bad code so i'm not sure why you'd care about good or bad tests
|
# ? Apr 24, 2014 04:06 |
|
i'm writing a thing in node precisely because i don't give a gently caress about it, i just want it fast and cheap
|
# ? Apr 24, 2014 04:06 |
|
Arcsech posted:planes are strictly regulated enough that they're pretty much fine "i had the it guys set it up so i can monitor and control all our generators from my laptop from wherever, just as easy as if i was on site" - chief engineer of a multi gw coal plant, to me who knows what kind of security that entailed but im guessing lol at some level. see also: that virus-weapon we used on iran's nuclear program a while back. hoppin airgaps on usb and covering its tracks while it blows poo poo up with multiple zero-days nrook: unit tests are a different from big-E Engineering risk assessment and mitigation processes like FMEA they play a role but the key element is the process of stepping back from design, enumerating all the ways each part of the system can fail (hardware, software, user, etc), enumerating all the immediate and eventual effects of those failures, and systematically designing them out of the system where possible. from an FMEA perspective, unit and integration tests are a tool to make sure that specific failure modes have been eliminated or mitigated. the FMEA process is there to help make sure you're testing for the right things in the right way and prioritizing them properly.
|
# ? Apr 24, 2014 04:17 |
|
Spime Wrangler posted:nrook: unit tests are a different from big-E Engineering risk assessment and mitigation processes like FMEA yeah, that's what I wanted to make explicit, though it sounds like I failed unit tests (and integration tests too) are just something you do when writing good code. "engineering" is something different and more expansive
|
# ? Apr 24, 2014 04:22 |
|
nrook posted:this is especially true in dynamically typed languages, I have no clue how you'd write python without tests. unless you love seeing TypeError in your production logs I guess? you know, there are programming languages where type errors are not something you EVER have to test for, and not all of these languages look like java. why do people insist on using lovely languages that force them to write tons of tests before they can get any real work done?
|
# ? Apr 24, 2014 04:26 |
|
i am sorry if this has come up about 500 times already but does anyone want to explain the benefits of duck typing to me right now I've got "it's maybe easier for dumbs" and that's about it. this shitfuck declared a bunch of fields at the top of a file, what are they? I don't know because they're all "var" e: lol Duck typing has been demonstrated to increase programmer productivity in a controlled experiment.[18][not in citation given] Juul-Whip fucked around with this message at 06:41 on Apr 24, 2014 |
# ? Apr 24, 2014 06:33 |
|
JewKiller 3000 posted:you know, there are programming languages where type errors are not something you EVER have to test for, and not all of these languages look like java. why do people insist on using lovely languages that force them to write tons of tests before they can get any real work done? agreed, a thousand times (when you talk about a language where you don't have to check for type errors i assume you mean PHP)
|
# ? Apr 24, 2014 06:36 |
|
Bloody posted:dont forget those patriot missile floating point error bit where the clocks drifted a shitload really quickly and then a bunch of israelis died or w/e yeah not seeing the problem here
|
# ? Apr 24, 2014 06:54 |
|
https://www.youtube.com/watch?v=3Bby5pOVZJ0
|
# ? Apr 24, 2014 07:06 |
|
THC posted:i am sorry if this has come up about 500 times already but does anyone want to explain the benefits of duck typing to me brevity is an often overlooked argument since it is easy to feel it is just code for being lazy, but there is also a bit of a tendency that the complexity of the unit of code you can effectively work with (and as a consequence the maximum size of a unit of abstraction) is bounded by the amount you can reasonably efficiently see at one time. brevity without duck typing is possible, but type inference is not exactly fully solved in general, and complex polymorphism will often be rather tricky (or at least verbose) to work with hardly a convincing argument in itself, but if anything supports the efficiency increase claims i do think the amount of information you can fit in a certain amount of space is a big part of it
|
# ? Apr 24, 2014 07:07 |
|
java_to_english.flv
|
# ? Apr 24, 2014 07:16 |
|
just pretend I made a Wittgenstein joke thingy like this: Whereof one can post, one can poo poo post. Whereof one cannot post thereof one must lurk.
|
# ? Apr 24, 2014 07:31 |
|
Cybernetic Vermin posted:brevity is an often overlooked argument since it is easy to feel it is just code for being lazy, but there is also a bit of a tendency that the complexity of the unit of code you can effectively work with (and as a consequence the maximum size of a unit of abstraction) is bounded by the amount you can reasonably efficiently see at one time. brevity without duck typing is possible, but type inference is not exactly fully solved in general, and complex polymorphism will often be rather tricky (or at least verbose) to work with I used to think I liked this as well but it becomes a nightmare with larger projects (e.g. anything with more than like 2 ppl) and I just cant Juul-Whip fucked around with this message at 08:12 on Apr 24, 2014 |
# ? Apr 24, 2014 08:10 |
|
it is perfectly possible to write huge and complex projects in weakly typed languages, but it requires discipline when it comes to abstraction to a great extent though the reason why java works out well is because its structure lets a few simple syntactic rules (public = bad, big class = bad, etc) enforces a lot of tiny abstraction units. this still means that if written with little thought the logical abstractions will not be well represented by any given class, but it will likely naturally get approximated, like how if you slice a world map into sufficiently many tiny pieces there will for each country exist a subset of pieces approximating its border trying to force abstraction by rigid and decidable syntactical rules is not too bad, it isolates and localizes the breakage any one given idiot can introduce into a project, but it is hardly *impossible* to find ways of encouraging good abstraction in other ways
|
# ? Apr 24, 2014 08:38 |
|
THC posted:i am sorry if this has come up about 500 times already but does anyone want to explain the benefits of duck typing to me are you really talking about duck typing or is it really dynamic typing btw I can't wait to read another page of people equating dynamic typing to stuff like javascript's coercion rules.
|
# ? Apr 24, 2014 08:47 |
|
Cybernetic Vermin posted:brevity is an often overlooked argument since it is easy to feel it is just code for being lazy, but there is also a bit of a tendency that the complexity of the unit of code you can effectively work with (and as a consequence the maximum size of a unit of abstraction) is bounded by the amount you can reasonably efficiently see at one time. brevity without duck typing is possible, but type inference is not exactly fully solved in general, and complex polymorphism will often be rather tricky (or at least verbose) to work with whenever ive written a Java/C# function that spanned more than one screen, ive strongly suspected that its because i hosed up structuring my code. hell even ~20 lines is enough to make my spidey senses tingle similarly if ive written something and reading it back i need to frequently check the definitions of the constituent functions to work out what it does, then i've probably hosed up my function naming or ive written a constituent function with one name that does two things. e: not to say long functions are always bad for comprehension. but they usually are. coffeetable fucked around with this message at 09:00 on Apr 24, 2014 |
# ? Apr 24, 2014 08:52 |
|
duck typing is a nice idea in theory like in java it's ridiculous that there are methods in the standard library that require a StringBuffer and i can't pass them a StringBuilder instead but it's not clear that it makes up for losing static type checks i kinda like how ocaml mixes the two, but nobody uses objects in ocaml so i guess it probably isn't that great in practice?
|
# ? Apr 24, 2014 09:00 |
|
anything other than strong typing is like wearing pajamas all day or getting blackout drunk every night or posting its fun to try for awhile in college but is just embarrassing and unproductive later
|
# ? Apr 24, 2014 09:10 |
|
my limited experience with java is that some people really want to do some duck typing and then end up with some convoluted concoction to achieve the same idea this is most probably bad java but the point is that you should surrender yourself and embrace the duck
|
# ? Apr 24, 2014 09:11 |
|
coffeetable posted:whenever ive written a Java/C# function that spanned more than one screen, ive strongly suspected that its because i hosed up structuring my code. a single function should very seldom need to be very large, but very often a slightly more complex set of functionality will require a decent chunk of code which, while divided into support functions and such, only has internal abstractions to the degree necessary for comprehension. that is, the functions will not be all that general, and will as building blocks for this piece of functionality likely change as needed as things are worked out, and will often have a signature that is slightly more involved (e.g. involve some awareness of some complex internal structures) than you would in a properly abstracted external api in these situations there is, i claim at least (i suspect this is all rather controversial), a very significant fall-off point in efficiency of thought as the code becomes less and less convenient to view as a whole (first when it falls out of your center of vision, then when it no longer fits on screen in a linear way, then when various split views and such no longer fit it, followed eventually by matters of spatial memory)
|
# ? Apr 24, 2014 09:13 |
|
Cybernetic Vermin posted:in these situations there is, i claim at least (i suspect this is all rather controversial), a very significant fall-off point in efficiency of thought as the code becomes less and less convenient to view as a whole (first when it falls out of your center of vision, then when it no longer fits on screen in a linear way, then when various split views and such no longer fit it, followed eventually by matters of spatial memory) This comes down to whether or not the parts have been split into units or simply wrapped in needless abstraction (if you're looking at Java it's definitely the latter) and whether the parts have been named well. Functions should be short and do a thing you can explain in at most 3 words.
|
# ? Apr 24, 2014 11:08 |
|
Soricidus posted:duck typing is a nice idea in theory Here's a hint, if the JavaDoc for a given class says "Since JDK 1.0" and it isn't java.lang.String or something then it's probably a terribly designed class. The JDK didn't exactly get off to the best start. Which is basically the stupidest poo poo ever, since... well, think about it for more than five seconds. So we have StringBuilder which doesn't have locks, but that came along later. The fact that Java Strings are immutable and mutable buffers are a separate utility is really nice though, and imho mutability is the biggest reason why C++'s std::string sucks poo poo (there are many, many others. but don't write your own version of the STL, for god's sake, it's standardised therefore it must be well-designed!! )
|
# ? Apr 24, 2014 12:21 |
|
Java: a terrible programming language for being an insecure dunning-kruger who loves to show off as much as possible and an excellent programming language for actually getting poo poo done
|
# ? Apr 24, 2014 12:25 |
|
no, java is an excellent programming language for its purpose, but the fact remains that one of its best properties is that it insulates your business a bit when hiring really terrible programmers, as you invariably will since the incredibly dull lob apps don't exactly retain actual talent i mean, this sounds trollishly elitist, but it should be thoroughly obvious that a lot of what the market selects for is insulation from incompetence, as there are a lot of mediocre programmers with a few bad college courses and perhaps a certifications. the average construction worker does not carve exquisite wooden ornaments at home, and no one expects them to, as long as they can pour concrete and hammer in a nail as needed programming is not a high-skill job, and that is a good thing, because there is a lot of it to do, and a lot of people who are willing to do it despite not being deeply invested or interested. it is a weird quirk of history and community that makes this at all controversial
|
# ? Apr 24, 2014 12:59 |
|
i'm doing java python interop over jni because all the good database drivers are jdbc and all the good interactive numerical packages are in scipy
|
# ? Apr 24, 2014 13:10 |
|
"static typing restrains bad programmers, therefore dynamic typing is better for good programmers btw im a good programmer"
|
# ? Apr 24, 2014 13:16 |
|
i have heard that different types of programming languages are good for different things and not all programming is application development
|
# ? Apr 24, 2014 13:20 |
|
kraftwerk singles posted:i have heard that different types of programming languages are good for different things and not all programming is application development get out of here!!!
|
# ? Apr 24, 2014 13:24 |
|
Also mandatory post on optional type checking I make every time this debate comes on.
|
# ? Apr 24, 2014 13:25 |
|
i have quit programming outside of occasional fun projects, in professional programming i went for overly elaborate solutions that weren't really suited for their purpose and was inefficient with my time. mediocre lob 9-5 java programmers, who are aided by the restraints of java style and practice *are* real programmers and are doing an important job. you obviously have high ideas of what programming is and are trying to apply them to what i am saying, but the facts are quite the opposite
|
# ? Apr 24, 2014 13:26 |
|
sorry but type checking is useless. it is just an opportunity to have the computer throw more errors at you, and they aren't even real errors. the first step in determining whether you are using a bad programming language is to try to add 2 and 2.1. if the computer thinks it can't do it then you have a bad programming langauge.
|
# ? Apr 24, 2014 14:16 |
|
Soricidus posted:like in java it's ridiculous that there are methods in the standard library that require a StringBuffer and i can't pass them a StringBuilder instead that's probably something that could have been solved in Java with use of an interface, without having to change the type system.
|
# ? Apr 24, 2014 14:18 |
|
My experience tells me that those mediocre Java programmers are just piling abstraction into your code to make it impossible to maintain. It's like praising someone for being a good gardener because they keep piling soil into your garden. I mean, gardens need soil right?
|
# ? Apr 24, 2014 14:18 |
|
Tiny Bug Child posted:sorry but type checking is useless. it is just an opportunity to have the computer throw more errors at you, and they aren't even real errors. the first step in determining whether you are using a bad programming language is to try to add 2 and 2.1. if the computer thinks it can't do it then you have a bad programming langauge. ghci> 2 +2.1 >>> 4.1
|
# ? Apr 24, 2014 14:19 |
|
Tiny Bug Child posted:sorry but type checking is useless. it is just an opportunity to have the computer throw more errors at you, and they aren't even real errors. the first step in determining whether you are using a bad programming language is to try to add 2 and 2.1. if the computer thinks it can't do it then you have a bad programming langauge. you know static type systems can have type inference too right
|
# ? Apr 24, 2014 14:20 |
|
|
# ? May 14, 2024 15:49 |
|
Malcolm XML posted:ghci> 2 +2.1 cool. being able to add two numbers is a necessary, but not sufficient, condition for being a good programming language. next try the advanced case of adding "2" and 2.
|
# ? Apr 24, 2014 14:20 |