This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-11-02
Channels
- # announcements (1)
- # babashka (19)
- # beginners (85)
- # calva (1)
- # cider (23)
- # clara (19)
- # clj-kondo (28)
- # clojars (4)
- # clojure (60)
- # clojure-australia (8)
- # clojure-dev (14)
- # clojure-europe (117)
- # clojure-nl (3)
- # clojure-uk (11)
- # clojurescript (68)
- # conjure (2)
- # core-async (39)
- # cryogen (11)
- # cursive (7)
- # data-science (1)
- # datomic (9)
- # emacs (10)
- # etaoin (1)
- # events (1)
- # fulcro (1)
- # helix (10)
- # jobs (4)
- # kaocha (2)
- # keechma (3)
- # leiningen (1)
- # malli (6)
- # pathom (15)
- # pedestal (10)
- # re-frame (5)
- # reitit (1)
- # remote-jobs (1)
- # rum (3)
- # shadow-cljs (18)
- # tools-deps (30)
- # vim (6)
Good morning! I am sooo tired. Worked late with https://github.com/BetterThanTomorrow/calva/pull/838, and then was so up to speed I couldn't fall asleep until 3AM-ish. Generating test data doesn't work as well as counting sheep, obviously. 😃
Usually not a problem for me. I accumulate sleep debt and then pay it in one long 16h+ sleep or so. While reading for my kids, for example. ”Dad? You are reading gibberish.” Haha.
Bore da
So I just got a 25k line PR of around a hundred changed or added files - and no PR description. How do I teach my clueless coworker to stop doing this?
I did, but I also want to teach him that's it's bad... He's a linguist trying to upgrade his skills so he doesn't really get it. We lack a shared language (kind of ironic).
G̴̝̈́ủ̷̢͚͍̽͛̓̉̃̈́̉̈͜͝t̷̩̲͕̳̯͇͆̃̈́̆̀̃͝ë̶̡͓̠̺̙́͑n̴͕͉̖̗̼͙̹̫̺̔ͅ ̴̟̳̈́̑́̈̉́̚m̵̳̆̍̍͂̿̑̉̍͝ǒ̷̡̨̨̪̬̯̦r̵̨͉̖͚͊́͆̏̃͋͘͜͠ģ̶̬̫̖̤͓̦̦̬̓͗̀̍́̄̚͝ȩ̶̡͍͙̗̞͔̞́̃͋͂͆͌͗̄͒͜͠ñ̴̦̩͙͎̯͎̟̌̽͋̀̒̎͠!̸̹͛̋̾̽͂
@simongray point him to the confluence page 🙂
@simongray Don't accept PRs, only patches through JIRA, Clojure style :P
@ordnungswidrig I don't work at UFST anymore, which is great for my sanity in many ways 😄
I expected every project large enough that you can have a 25k LOC PR to have at least something like confluence 😛
Haha. The project is just me - and then this guy who really wants to contribute stuff to it. Much of the code in the PR is copy-pasted from existing files and also includes some datasets, so it's not like he wrote 25k lines of code himself.
@borkdude https://github.com/clojure/clojure/commit/833c924239a818ff1a2563ae88af6dc266b35a61#diff-2d17bfe5c67f6466388d8efc8c7fbd98d2d7118f5e1f2677b915bedb2df01c61 and you end up in these situations, where a local change creeps up in master
One important thing is to make people read to repository history, IMHO. That often opens their eyes on how much of a mess it can be.
@mpenet btw I did some worrying and writing about http clients and servers, graalvm and babashka here: https://github.com/borkdude/babashka/issues/628. Looking forward to your Java 11 wrapper.
• fix • try again • change fumble • Make foo actually to bar • Make fumble do bar • Merge master into this-branch • Fix test • Merge master into this-branch • Make it deployable
I’m so fed up with these kinds of repositories ^^^^ 😉
@borkdude I need to document it, and add more tests really. If I can I ll try to get it done this week (we're crunching on stg else right now)
@ordnungswidrig That's usually how my repositories start (experimental). Once they mature I prepend every commit message with an issue number, so everything has a rationale
Yes! And squash things down a little before mergeing. The problem is that developers never are taught git but only github.
it's good to have a detailed track for reviews, but then later on nobody cares you changed a typo in a docstring
yeah, for PRs I discourage using force-push. Nothing is more irritating than trying someones code locally and not being able to pull in changes
as documented here: https://github.com/borkdude/clj-kondo/blob/master/doc/dev.md#pr
I think for huge PRs like the one mentioned by Simon you want to do selective sqashing.
Btw, it's weirdly warm here for november. Can't help thinking this is because of climate change...
I also asked him to squash it, but he insists it can't be done :face_with_rolling_eyes:
sure it can
help him
git checkout -b pr-squashed
git merge pr-branch --squash
git commit -am "the squashed PR"
@simongray you can work together on a branch. Maybe show him what you mean.
@simongray abolish Pull Requests altogether 😬
@dominicm as always, it depends on how you collaborate. I generally find it annoying in OSS projects
I'm experimenting with http://sr.ht atm, I'm strongly considering switching to mailing lists. I presume I'll get the same # of contributions 😛
@javahippie openopensource
Aaah had not seen this. Open Source is difficult withour PRs, that’s true
@dominicm I recently saw this thing: https://tara.ai/ Might be nice to try out
I forgot you're working for a company which probably has a better product in this realm ;)
@simongray Do the review side-by-side with him and think aloud? Or ask him to give you a tour… Writing reviewable PRs is all about thinking about how the other people will read the PR, so he needs to see how it looks like on the other end…
yeah. The issue is more that the PR comes totally out of the blue and he’s quite impatient, wanting to get it merged ASAP. I have tried to explain to him that it often took several days of back-and-forth at my old job to get a ~1000 line PR through the review process, so what am I supposed to do with a 25k line PR. He’s not a developer, though, he’s a linguist who knows just enough Python to be able to do some NLP so all he knows is copy-pasting bits of code around. I don’t have time to teach him to be a software developer.
I’m guilty as charged with the “fix foo” type of commits but for some reason while I know about squash etc it’s hard to make everything work with github. I need to make a new branch, then squash things, then what? Link the old PR with this new branch? How do I link the “dev” branch with the “commit” branch so that people know where to look?
I usually either squash ahead of the review or squash after the review, but before merging. Never need to make a new branch. I just force push to my feature branch and the PR is updated with the correct commits. Then I merge.
I thought force pushing is discouraged in git? I learned git before github and PR was a thing so I’m kind of out the loop these days 🙂
force pushing is fine if you know what you’re doing. You just shouldn’t be doing it EVER with any shared branches, i.e. master.
I force-with-lease push a lot.
btw, you can download a .patch file for a PR and review it locally using your favorite tools (emacs)
e.g. this is an open PR in clj-kondo. Just add .patch to the PR link and you'll get the patch: https://patch-diff.githubusercontent.com/raw/borkdude/clj-kondo/pull/879.patch
I accepted his PR because none of the files touch my own code, but asked him at the very least to squash his commits… he said “yessir”, but 5 minutes later all of the commits are in master 😡 no more lenience from me…
aaah that’s hostile
since git is a haha social haha coding tool, can we get him on here and throw emoji tomatoes either at you or him?
Takling of social, I had created a weird tool to convert a sha256 into easy to recognize words:
$ git rev-parse HEAD | xargs java -jar sha-words.jar
observation-obedient-bedroom-sweet-electric
Get it at https://github.com/ordnungswidrig/sha-wordsI should actually port this to babashka
@ordnungswidrig What do you mean port to babashka? It seems it already works with babashka :)
$ bb -cp src -m sha-words.main b67d6eafeae1d5a424a609864fad10665453afa5
packing-yesterday-sugar-cup-awkward
$ bb -cp src -m sha-words.main --uberjar sha-words.jar
$ bb sha-words.jar b67d6eafeae1d5a424a609864fad10665453afa5
packing-yesterday-sugar-cup-awkward
“acking-yesterday-sugar-cup-awkward”
I like the weird stream of words it produces
nice! I thought I’d need to do someting about IO.
@pez should work with uuids, too
but two-way it a good idea!
@ordnungswidrig uberscript:
$ bb -cp src -m sha-words.main --uberscript ~/Dropbox/bin/sha-words.clj
# prepend shebang
$ bb -e '(spit "/Users/borkdude/Dropbox/bin/sha-words.clj" (str "#!/usr/bin/env bb\n\n" (slurp "/Users/borkdude/Dropbox/bin/sha-words.clj")))'
$ chmod +x ~/Dropbox/bin/sha-words.clj
# yay, script now on path!
$ sha-words.clj b67d6eafeae1d5a424a609864fad10665453afa5
packing-yesterday-sugar-cup-awkward
@borkdude what am I doing wrong?
$ bb -cp src -m sha-words.main
clojure.lang.ExceptionInfo: Unable to resolve classname: BigInteger
@ordnungswidrig bb --version
babashka v0.0.86
Oh, brew found a stale link in /usr/local/bin