Hacker News new | past | comments | ask | show | jobs | submit | gcarvalho's comments login

And the martial art is jiu-jitsu, not jujutsu. Similar sounding but definitely not “named after”.


No it's not, but so far the Brazilians are still sticking with the incorrect ~1908 way of writing it.

Standard Japanese pronunciation for "jutsu" does not contain an i, and it's also judo not "jiu-do" that the old system would have called for.

https://en.wikipedia.org/wiki/Jujutsu#Etymology


Re: continuing a partial rebase

I haven’t tried it myself, but since you know commits A and B have already been rebased and had their conflicts resolved, can’t you instead rebase -i on top of the partial-rebase branch and then drop A and B?

I think this way at least you still benefit from the rebase --edit-todo, which you do not when cherry-picking C^..F.


Or easier, do an interactive rebase and mark the last commit which is in the partial-rebase branch for editing. Then, do `git reset --hard partial-rebase` and continue the rebase.


I had the same thought when reading and I don't see why not as long as you make sure you drop the older commits correctly.


Was it perhaps a demo of a js plotting library?

https://leeoniya.github.io/uPlot/demos/index.html


And also that 1 copy is (eventually) 0 copies.


Many responses suggesting a simple bash script instead. One reason I like make is that I can just tab-autocomplete targets. No extra setup needed.

If you’re using a single entry point script (e.g. do.sh) and handling $1 you don’t get that for free.

And the moment you need to make your entry point script aware of “B requires A” then you’re going to half-bake something similar to make, anyway.

Here’s [1] my ~80 line version for Python projects (micromamba + uv) which I’ve been pretty happy with.

[1] https://github.com/giovannipcarvalho/micromamba.mk


> tab-autocomplete

bin/ also perfectly tab-autocompletes, don't understand what you mean.

If you're having only one bin/do.sh script -- you're doing it wrong.

And if you know $1 can only be either "prod" or "dev", then create scripts build-prod.sh and build-dev.sh.

Simpler, installed on all systems, no quirky syntax with tabs and phonys.


Huh, I’m pretty sure the version I use is the one from the post and it does have diacritics. (I’m not on my computer now but will check later.)

One thing that bothers me, though, is that “í” is oddly positioned and almost makes it look like there’s an extra space between it and the following character.


There’s fzf-git.sh [1], which is a collection of bindings to invoke fzf for things like branches, commits, tags, etc. I use it pretty often.

[1] https://github.com/junegunn/fzf-git.sh


I think it’s widely accepted that refactors should not change behavior. That’s my experience, at least.


Huh, I guess that's true, even on wikipedia. I will have to stop using the word then. Though I'm pretty sure most people use it in day-to-day with much more abandon.


The metaphor, I think, is that your code is a mathematical function, and, to be even more specific and "toy example" about it, let's say it's a polynomial. If the old code was

x^2 + x z + y x + y z

then you notice that you can express the same polynomial as:

(x + y)*(x + z)

It's still the same polynomial, but you "separated concerns", turning it into a product of two simpler factors.

Similar ideas apply to sets of tuples. Perhaps you were given

{(1, 1), (1, 4), (2, 1), (2, 4), (3, 1), (3, 4)}

and you notice that this can be expressed more simply as the Cartesian product:

{1, 2, 3} x {1, 4}

Again, a literal factoring. You can imagine how variations of this idea would apply to database tables and data structures.

That's where I think the word "refactor" comes from.


If you change the polynomial, you change the order of calculations and hence change behaviour. You might get overflows in case of integers or different precision in case of floats.

Nice to learn where the word originates from. Often the meaning of words change over time. E.g. today no horses need involved in bootstrapping.


He said "I think" implying that he is not fully sure about the etymology. There is a history section on wikipedia for refactoring if you are interested.


A polynomial is a mathematical object. There are no integer overflows or float imprecisions in mathematics.


You are right but in fact the maths are only a means to an end, a model that isn't exactly equal to the final real world implementation in analog or digital electronics.


My man, thanks for the explanation but I understand the concept I just didn't agree on definition.


Sure. Whenever you post on a forum it's half for anybody else reading, right? I just thought it was interesting to consider the underlying metaphor; maybe people don't think about it. Metaphors, connotations, etymologies -- I find these interesting.


Sure, I agree. You could even respond to me fully selfishly - treat me as a stepping stone just to form your argument, nothing wrong with that.


> "Specific revisions should be documented, but documentation should not be limited to a specific revision."

I think this boils down to “what do you do if you realize the documentation for v1.1 says that some feature does X when it actually does Y, but you’re already on version 2.2?”

If v1.1 docs are tied to the version tag in VCS, that incorrect statement cannot be fixed.

And it seems that fixing that forces you into backporting documentation even if you don’t release and maintain parallel versions of your software, which… kinda sucks.

To be honest, I much prefer docs in the repo, because it facilitates code review — a good patch touches some implementation, some tests, and some docs.

The downside when only the latest few versions of the software are supported and only the very latest docs are maintained is that historical docs will probably not be fixed.


> If v1.1 docs are tied to the version tag in VCS, that incorrect statement cannot be fixed.

It can be fixed, just checkout the branch, git cherry-pick the updated change set, or even write it by hand, then do a re-release. You should have a process for this anyway as there might be a critical bug in that code that needs to be fixed and a re-release must happen.

Of course git's handling of branches leave much to be desired (I want mercurial to come back just for it's branch handling) and so developers often forget they can do this and it isn't really that hard. It is tedious though, and you will eventually have dual maintenance where you have to write the same code twice just because the two branches have diverged - this shouldn't be an excuse not to do it though.


Delivering the over-complicated feature and improving the performance of the over-complicated feature both seem to get more praise than shipping the simple version to begin with.


Who cares? Do you do your job for head pats or to actually get shit done?


To make a living. Being acknowledged is good to keep at it, or so I heard.


Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: