This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (6)
- # asami (1)
- # babashka (80)
- # beginners (89)
- # bitcoin (1)
- # calva (30)
- # cider (33)
- # clj-kondo (1)
- # clj-new (29)
- # cljsrn (45)
- # clojars (5)
- # clojure (60)
- # clojure-australia (1)
- # clojure-dev (9)
- # clojure-europe (133)
- # clojure-italy (7)
- # clojure-nl (6)
- # clojure-uk (44)
- # clojurescript (11)
- # conjure (1)
- # crux (7)
- # data-oriented-programming (2)
- # datahike (13)
- # datascript (4)
- # datomic (19)
- # depstar (5)
- # duct (39)
- # fulcro (8)
- # girouette (1)
- # helix (10)
- # honeysql (17)
- # jobs (5)
- # jobs-discuss (2)
- # leiningen (6)
- # lsp (51)
- # malli (60)
- # meander (37)
- # membrane (8)
- # off-topic (31)
- # overtone (3)
- # pathom (36)
- # re-frame (8)
- # reagent (30)
- # remote-jobs (2)
- # sci (1)
- # sql (32)
- # startup-in-a-month (3)
- # testing (3)
- # tools-deps (7)
what do you do with developers that always go straight to "The compiler is broken" when their code doesn't work?
Intelectual humility (https://hn.algolia.com/?dateRange=all&page=0&prefix=true&query=intellectual%20humility&sort=byPopularity&type=story) a reified team-wide policy without pointing out at the individual
I think that it's a style that everyone can pick up, and for those who don't bother, it should be easy to see that they're deviating from team expectations
From someone I work with I've had (in C# land), that string equality is broken (he was comparing "foo" with "foo "), try catch and exceptions were apparently broken (they weren't, he just was misunderstanding how exceptions work) and now today - booleans are defaulting to true on initialization, (they aren't, his bool is static so it's being set elsewhere). But he wont listen, it's always the compiler or Microsoft has broke something...
I mean, you think that your thought process would be "if microsoft released a version of .net where string equality was broken, everyone would be jumping up and down and running around in chaos", they aren't, so it's probably my code... but that thought process doesnt seem to ever fire
Might be a bit confrontational, but: remind them every other time they blamed the compiler and it was their own fault?
And it's a plus when this tool is a compiler you can actually understand because it's quite small :) (I'm hinting at Compiler.java et al). I'm ignoring the JVM for a moment ;)
“Experience has taught me that whenever I think the compiler is broken, it’s almost always true that I’m looking in the wrong place for the problem.”
even yesterday, they needed me to talk them through some code that wasn't working, they were calling a method .Width() that sets a width of an object. But passing a string "25px", Width() just wants a number. I told him to just pass 25. It started working but he says that can't possibly be the reason. SOmething weird must have been going on with caching code or something... I dunno...
99.9% of the time the bug is in the newest code added. The compiler and libraries one is using, especially if they are popular and widely used, are old code. What you are working on is new code.
Every good developer must eventually gain the humility of accepting that they likely caused the problem (or someone on their team, if working on a team).
“Whenever __ I’ve learned that __” is a good way to frame things so that you can tell someone they’re doing it wrong without being confrontational about it.
In some cases, dev tools do introduce N levels of caches, which if you do not know where they all are and know how to clear them and start empty, confusing things happen. If someone has become gun-shy from learning there is yet one more level of caches that no one taught them about in their tools, I can imagine that one can become often suspicious that such a thing is happening yet again.
For that, I would suggest simplifying the dev environment, or at least have a good team dev tool page explaining how to clear them all out and start fresh (and perhaps intermediate levels of "clear out steps 1 through 4, so I know I only need to repeat 5 through 6 when I make this category of code changes".
Even the Clojure CLI tools introduce a new cache that if you don't know about it, leads to very confusing behavior if you
rm -fr ~/.m2 and run again without also deleting relevant
.cpcache directories, or use appropriate command line options to ignore the contents of the
[~]> z3 -in (declare-fun f (String) Int) (declare-fun y () String) (declare-fun x () String) (assert (= 3 (+ (f x) (f y)))) (check-sat) sat (get-model) (model (define-fun y () String "") (define-fun x () String "") (define-fun f ((x!0 String)) Int 3) )
What does the
(x!0 String) part mean? Unless that means something really special, it looks like both calls to
f return 3, so the sum would be 6?
I've used Z3 a bit on a project to solve equations on bit-string / bit-vectors, and was amazed at what it is able to do, and usually how quickly (although it isn't difficult to find examples where you aren't gonna live to see the answer).
not even involving the arithmetic solver
(declare-fun f (String) Bool) (declare-const x String) (declare-const y String) (assert (not (= (f x) (f y)))) (check-sat) sat (get-model) (model (define-fun y () String "") (define-fun x () String "") (define-fun f ((x!0 String)) Bool true) )