Good Morning!
Morning!
Good morning!
Morning
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. 😃
How do you work after doing that? I'm always so tired when I do that.
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.
Morning
Morning All 🙂
moin
Hello Clojure friends, good morning
👋
🙂
morning
morning
Bore da :welsh_flag:
morning
Good morning from rainy Copenhagen
Anyone familiar with emacs/elisp/flycheck?
Another good morning from Copenhagen here.
Morning
Never mind, I think I got it
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?
Shock therapy?
reject the PR?
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).
I need some kind of github prs for dummies article
G̴̝̈́ủ̷̢͚͍̽͛̓̉̃̈́̉̈͜͝t̷̩̲͕̳̯͇͆̃̈́̆̀̃͝ë̶̡͓̠̺̙́͑n̴͕͉̖̗̼͙̹̫̺̔ͅ ̴̟̳̈́̑́̈̉́̚m̵̳̆̍̍͂̿̑̉̍͝ǒ̷̡̨̨̪̬̯̦r̵̨͉̖͚͊́͆̏̃͋͘͜͠ģ̶̬̫̖̤͓̦̦̬̓͗̀̍́̄̚͝ȩ̶̡͍͙̗̞͔̞́̃͋͂͆͌͗̄͒͜͠ñ̴̦̩͙͎̯͎̟̌̽͋̀̒̎͠!̸̹͛̋̾̽͂
@simongray point him to the confluence page 🙂
@simongray Don't accept PRs, only patches through JIRA, Clojure style :P
with strict demands on formatting of whitespace of course
@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 😛
@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
PRs are better gatekeepers than email I guess
yeah, I saw that ;)
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
@mpenet no worries!
Yes! And squash things down a little before mergeing. The problem is that developers never are taught git but only github.
github does a great job of squashing PRs btw
pr squasing should be the default imho
git merge --squash is also nice if you want to do it locally
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
and once they are done, I squash
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.
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.
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:
lol
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.
yeah, I guess I will have to… I did already show him once before, though.
Force pushing in response to feedback is great. Github's review system isn't good.
what’s going on there?
accidentally pushed some local java file
@simongray abolish Pull Requests altogether 😬
@dominicm as always, it depends on how you collaborate. I generally find it annoying in OSS projects
ah… and they didn’t revert…?
not yet I guess
the nuclear option
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
Hmm, not open source it seems
@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…
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?
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
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 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.
As long you follow the golden rule of rebasing that’s enough process IMO.
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 🙂
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…
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.
aaah that’s hostile
I force-with-lease push a lot.
I’ll be nice to him…
Looks like task management, rather than change management?
I forgot you're working for a company which probably has a better product in this realm ;)
No, we don't do this kind of thing :p
We use https://linear.app/
since git is a haha social haha coding tool, can we get him on here and throw emoji tomatoes either at you or him?
feels like this is probably the most direct way I can help 🙂
Paired with Gerrit it would be quite decent
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
*dodges tomatoes*
https://github.com/clojure/clojure/commit/96dd8fa0deca4b1f500b34cd555d21f3180a33e9 🤪
That’s awesome. I’ve been wanting to do something similar with uuid, and two-way.
@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
nice! I thought I’d need to do someting about IO.
@pez should work with uuids, too
but two-way it a good idea!
“acking-yesterday-sugar-cup-awkward”
I like the weird stream of words it produces
@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
nice!
@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
try upgrading
Oh, brew found a stale link in /usr/local/bin
Thanks it workds now!
@ordnungswidrig https://twitter.com/RealGeneKim/status/1323303993590730752
direct hit 🙂
And, boom, another project one must maintain 😛