|
Cybernetic Vermin posted: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 i am good programmer because i create ridiculously elaborate solutions that are useless is what you are saying what did you switch to that was a more efficient use of your time
|
# ? Apr 24, 2014 17:55 |
|
|
# ? May 14, 2024 21:08 |
|
how on earth did you read that post and conclude that i am calling myself a good programmer? do you comprehend written english at all? it was plenty efficient time spent for me on account of getting well paid, but if you don't feel you are doing a good job it is better to switch for everyones benefit
|
# ? Apr 24, 2014 18:02 |
|
Subjunctive posted:recoverability is pretty rare in practice, because it means you need to be effectively transactional in all your operations, or a thrown exception leaves you inconsistent. there are relatively few places in a program where you can throw away meaningful chunks and be in a consistent state; many fewer places than there are method calls. coffeetable posted:so the end-to-end principle means that in a communications protocol, the intermediate nodes should be ignorant as to the meaning of the data being passed through them. Both of these are good posts about checked exceptions and I wish there was more of this discussion going on in the Java spec.
|
# ? Apr 24, 2014 18:02 |
|
Symbolic Butt posted:are you really talking about duck typing or is it really dynamic typing probably yeah
|
# ? Apr 24, 2014 18:06 |
|
Cybernetic Vermin posted:how on earth did you read that post and conclude that i am calling myself a good programmer? do you comprehend written english at all? what were you if the mediocre programmers are the ones churning out lob apps in java what are good programmers what are bad programmers what are
|
# ? Apr 24, 2014 18:08 |
|
this is not loving complicated stuff, but i will try to break it down and use small words and hope you understand: that first bit where i list some bad things about my own programming that made me quit? that means i was *bad* that other bit where i say that mediocre programmers who put in their 9-5 and have tools that help them do a good enough job despite not being a rockstar idiot about it? that is *good* there are no rockstar construction workers, since they don't actually work out well, there are just people who put in the time and are rather deliberately not tasked with understanding architecture or solid mechanics on any deep level. the same thing holds for java lob stuff, java, application servers, frameworks, and a bunch of surrounding things are there to force the work into a shape suitable for the workers who can actually be trusted to work away in roughly the right direction
|
# ? Apr 24, 2014 18:16 |
|
AlsoD posted:What are numbers? We just don't know. this but also birds
|
# ? Apr 24, 2014 18:21 |
|
Cybernetic Vermin posted:this is not loving complicated stuff, but i will try to break it down and use small words and hope you understand: so basically your code was like your posting?
|
# ? Apr 24, 2014 18:26 |
|
p. much yeah
|
# ? Apr 24, 2014 18:29 |
|
Subjunctive posted:(not being able to parameterize a class' error model the same way you parameterize the class is another gripe) Sounds like somebody needs pattern matching.
|
# ? Apr 24, 2014 18:30 |
|
no i mean if good programmers are mediocre programmers, then what are bad programmers
|
# ? Apr 24, 2014 18:45 |
|
strongly herped weakly derped my type is ducked, but still it worked!
|
# ? Apr 24, 2014 18:47 |
|
static/dynamic is just whether types are verified by the compiler or the runtime strong/weak is how easily one type turns into another. most C derivatives have implicit numeric conversions (2 + 2.1), where numbers can convert to "bigger" numbers. C++ lets you define your own implicit conversions (even accidentally-- just by making a ctor) which can be confusing as gently caress. casting can be considered an element of weak typing, but at least it's explicit having numbers and strings coerce easily back and forth is terrible. `num + str => str + str` is somewhat defensible, but any time you automatically coerce a string to a number because it "seems like the right thing for the context", you're introducing non-obvious behavior. PHP is particularly bad at this, since it coerces depending on the content of the string, so you can't even look at a line of code, know the types of the values, and know what it will do. code:
tl;dr: any language with both == and === is a horror
|
# ? Apr 24, 2014 18:51 |
|
Scaevolus posted:
looks reasonable to me
|
# ? Apr 24, 2014 18:55 |
|
Scaevolus posted:
two different strings compare as different: a horror I can handle there are lots of different forms of equality/equivalence, many perfectly languages express different flavours as eq and == and equals and thing.equals(other). (Is -0 equal to 0?)
|
# ? Apr 24, 2014 19:02 |
|
structural typing is a very nice way to simplify object hierarchies instead of having to inherit from some IReader class, you just implement the appropriate Read method, and that object can be passed to any function wanting a Reader it can cause unexpected behavior in dynamic languages. duck typing is the dynamic equivalent to structural typing -- just call foo.Read in your code, and if it exists, your program continues merrily along but what if you only occasionally call one of the methods on your duck typed object? initial runs verify that yes, your duck quacks as expected, but in production suddenly it's asked to swim and you crash and die Go is statically typed, has structural typing, and has local type inference. it's pretty sweet
|
# ? Apr 24, 2014 19:03 |
|
Scaevolus posted:
wait whats wrongw ith this the strings are obviously not equal
|
# ? Apr 24, 2014 19:04 |
|
Scaevolus posted:
this was fixed in 5.3.6, before it would return true
|
# ? Apr 24, 2014 19:05 |
|
Scaevolus posted:I should read my own posts im the websites that were probably broken by this fix
|
# ? Apr 24, 2014 19:07 |
|
Scaevolus posted:structural typing is a very nice way to simplify object hierarchies i prefer type classes as the mechanism for this because i can separate interface instance code from the actual datatype code. i can also create new type classes instances for things that dont immediately conform to an interface
|
# ? Apr 24, 2014 19:15 |
|
oh i can make you expand and emit but there is no function that makes you fart? dont worry about that i can just create a new instance of my type class
|
# ? Apr 24, 2014 19:19 |
|
Scaevolus posted:I should read my own posts yet again people harp on dumb poo poo PHP used to do in the ancient past. heck there are still people bitching about PHP 4's OO model like it's somehow relevant in 2014 "b-b-but TBC there are still some sites on 5.3.2---" that's not PHP's problem. keep your poo poo up to date
|
# ? Apr 24, 2014 20:34 |
|
JewKiller 3000 posted:nobody uses objects in ocaml because once you have algebraic data types with type inference and a real module system, you find that you don't need or want to do object-oriented programming anymore quote:As a side-effect of type inference in OCaml, functions (including operators) can't have overloaded definitions. OCaml defines + as the integer addition function. To add floats, use +. (note the trailing period).
|
# ? Apr 24, 2014 22:51 |
|
Malcolm XML posted:ghci> "2" + (show 2) > "negative forty-seven" + 9 -38
|
# ? Apr 24, 2014 22:54 |
|
Tiny Bug Child posted:yet again people harp on dumb poo poo PHP used to do in the ancient past. heck there are still people bitching about PHP 4's OO model like it's somehow relevant in 2014 code:
|
# ? Apr 24, 2014 23:02 |
|
shrughes posted:> "negative forty-seven" + 9 with undecidable instances u get what u get
|
# ? Apr 24, 2014 23:02 |
|
suffix posted:
lol
|
# ? Apr 24, 2014 23:10 |
|
suffix posted:
|
# ? Apr 24, 2014 23:18 |
|
Malcolm XML posted:with undecidable instances u get what u get You don't need anything besides OverloadedStrings.
|
# ? Apr 24, 2014 23:21 |
|
we should all just band together and use lua and luajit
|
# ? Apr 24, 2014 23:56 |
|
shrughes posted:You don't need anything besides OverloadedStrings. ghci bitches about (read a)=>is string a without it.
|
# ? Apr 25, 2014 00:07 |
|
MeruFM posted:i didn't even believe it until i ran it what number do you think "garbage" should be
|
# ? Apr 25, 2014 00:48 |
|
spongeh posted:we should all just band together and use lua and luajit I'm not a huge Lua fan, but Mike Pall is a straight-up badass.
|
# ? Apr 25, 2014 00:48 |
|
Tiny Bug Child posted:what number do you think "garbage" should be it shouldn't be comparable imo, the interpreter/compiler should say 'you hosed up' and then stop working. but it would probably do that with every input, so i dunno, the classic productivity vs correctness
|
# ? Apr 25, 2014 00:58 |
|
Tiny Bug Child posted:what number do you think "garbage" should be 219
|
# ? Apr 25, 2014 01:11 |
|
Innocent Bystander posted:it shouldn't be comparable imo, the interpreter/compiler should say 'you hosed up' and then stop working. but it would probably do that with every input, so i dunno, the classic productivity vs correctness This is correct "NaN" would be a semi-acceptable alternative if you must have weak typing
|
# ? Apr 25, 2014 01:37 |
|
but not a string containing NaN, the actual IEEE 754 NaN. preferably signaling.
|
# ? Apr 25, 2014 01:40 |
|
Malcolm XML posted:ghci bitches about (read a)=>is string a without it. Right, I was talking about "negative thirty-seven" or whatever -- that's not a Read a => IsString a instance.
|
# ? Apr 25, 2014 01:41 |
|
coffeetable posted:should it return 4 or "22" though 52
|
# ? Apr 25, 2014 01:51 |
|
|
# ? May 14, 2024 21:08 |
|
Mr Dog posted:Java: a terrible programming language for being an insecure dunning-kruger who loves to show off as much as possible no it just means you find it difficult to show off and you've never worked with someone with a phd who likes dropping 25,000 lines of code into a project over a weekend.
|
# ? Apr 25, 2014 02:03 |