HNHacker News
TopNewBestAskShowJobs

ivanche

2,465 karma · joined February 14, 2014

Object thinking, OOP, OOD, TDD, Java... Investing, personal finance... Weightlifting, strength, powerlifting... München (now), Belgrade (before)...

2a771933ef33b64a35c466ddc66d459eae1bbd62eec481c901f1316d60c13e32

submissionscomments
ivanche··on Ask HN: How to Teach Git Rebase
If by any chance you use zsh, oh-my-zsh, and its git plugin, I can offer you this function:

  function stash_and_rebase() {
    local current_branch="$(git_current_branch)"
    if (( ${#current_branch} == 0 )); then
      echo "There is no current branch. This script must be executed in git repo."
      return 1
    fi
    if (( $# == 0 )); then
      local target_branch="$(git_main_branch)"
    else
      local target_branch="$1"
    fi
    git stash push
    git fetch --all
    git rebase origin/${target_branch}
    echo "Don't forget to execute 'git stash pop' after rebase!"
  }
Let's say you want to rebase onto `main`. Checkout your feature branch and run `stash_and_rebase`. If you want to rebase onto non-main branch, run `stash_and_rebase branchX`. If everything went OK, do `git stash pop` in the end.

N.B. This doesn't do squash!

ivanche··on Ask HN: Recommendations on how to become a Git expert?
Just to clarify point 2 about Git Flow (or Gitflow as is also spelled). It is just one of many workflows that include creating a feature branch off of main and merging it back in, but not the only one. Personally I always found it too complex, even for the intended use case of (enterprise) software with regular release cycles.
ivanche··on What comes after Git
For a "normal" use case one can get away with just git clone, git checkout, git add, git commit, git push, git pull. Anything more advanced like rebasing onto master and squashing before merging (unfortunately) demands that one has at least understanding of git objects. I’ve also noticed the reverse is true - the more understanding of git objects one has, the less catastrophic/unexpected situations ones finds itself into.
ivanche··on Ask HN: What Happened to Ceylon Language?
Just to add that Java already is so performant it is often used for HFT! With the technologies/projects you mentioned it’s only going to be better.
ivanche··on It is your responsibility to follow up (2019)
I understand your position. However from my position it just creates more work for me and balancing between spamming people and being always ready to answer to the teamlead "What happened to X?" and the answer "It's at Joe's" is not acceptable. Anyway, to me it wasn't a healthy environment.
ivanche··on Ask HN: What Happened to Ceylon Language?
It really looks abandoned. On this page [0] there is a list of leaders and commiters. Stéphane Épardaud is on Twitter [1], as well as Gavin King [2]. I will ask them.

[0] https://projects.eclipse.org/proposals/eclipse-ceylon

[1] https://twitter.com/unfromage

[2] https://twitter.com/1ovthafew

ivanche··on It is your responsibility to follow up (2019)
I had a team lead like that once. I ran away screaming ASAP at the first opportunity. How is that fair that I can reply within minutes to every email/slack/phone call, but multiple persons within the company don't ever reply and it's my fault???
ivanche··on Data Oriented Programming in Java [Brian Goetz]
Interesting that HN didn’t mark this as duplicate, submitted only 10 hours ago https://news.ycombinator.com/item?id=31819948
ivanche··on A guide to database performance for developers
I’ve read about half of it and I’ve been blown away! This book is densely packed with no-fluff-just-stuff explanations and advice. Now I wish I had read it 15 years ago…
ivanche··on One-Third of Americans Making $250k Live Paycheck-to-Paycheck
Leverage is excellent in good times but horrible in bad ones. As they say, after an ebb you see who was swimming naked.
ivanche··on One-Third of Americans Making $250k Live Paycheck-to-Paycheck
I agree. All tied into a single, non-cash-flow generating asset is risky, to say the least. And it will really be an asset only when they sell it. Until then, they only pour more and more money into a bottomless pit that a house is. EDIT: for $250,000/year income, the most expensive house one can afford is $750,000. Their $1.7 million house is way above their means.
ivanche··on One-Third of Americans Making $250k Live Paycheck-to-Paycheck
I have a simple definition. "Rich" == doesn’t have to work for money. "Poor" == must work for money. Having said that, congratulations on your worry-free life! I’m not there yet but I’m focused on that goal, hopefully will reach it before I’m too old :)
ivanche··on One-Third of Americans Making $250k Live Paycheck-to-Paycheck
"More than half of top earners in that generation report having little left at the end of the month."

That’s no surprise at all. I also have almost nothing left at the end of the month. At the beginning of the month, however, they should have plenty of money left and should save/invest then.

ivanche··on What are the odds that some idiot will name his mutex ether-rot-mutex (2017)
Somewhere I’ve heard that you could replace MZ with ZM and exe will continue to work. Never tried it though.
ivanche··on Luna Founder Requests Police Protection as Investors Are Visiting His House
Private _protection_ is very different from private _police_. How do you think movie stars, mega popular singers etc. hire their… well, private protection?
ivanche··on Ask HN: What is your failed/cancelled project story?
I don’t want to add salt to your wound but I’m genuinely curious - which problem was this supposed to solve and for what target group?
ivanche··on How many Linux commands can a 7 year old learn?
Thank you sir! Somehow I didn't think it was time for his own account, but hey, why not, I will give him a proper sandbox. I won't add him to sudoers file though :)
ivanche··on How many Linux commands can a 7 year old learn?
Every LinkedIn recruiter, ever :)
ivanche··on When buying the dip doesn’t work: An analysis of the dot-com crash
And before the peak it was the greatest asset bubble of all time! "A $100,000 investment in Japanese large cap stocks in 1970 would have turned into $5.7 million by 1989." [0]

[0] https://awealthofcommonsense.com/2016/09/the-greatest-bubble...

ivanche··on How many Linux commands can a 7 year old learn?
Every time someone asks me why, I reply with why not? I simply saw that he was interested in somewhat strange appearance on a screen and that led to our "learning" (fun, really) session.

Of course I'm aware that math, soft skills etc. are probably going to be more important to him than `bash`, and I try to show him a bit of those too! But that doesn't mean that showing him something unusual when there's already an interest from his side is useless.

ivanche··on How many Linux commands can a 7 year old learn?
I certainly didn't intend to sound that way! When my son asked me about the terminal, I didn't have an idea whether 2 minutes later he'll say "Dad this is boring" or I would have to pull him into bed an hour later because next day was a school day. It just turned out to be the second one and I felt the story was interesting enough to share it.
ivanche··on How many Linux commands can a 7 year old learn?
Haha I hope it won't be, I haven't shown him `cd` yet.
ivanche··on How many Linux commands can a 7 year old learn?
I'm sorry guys, it will be vim :)
ivanche··on How many Linux commands can a 7 year old learn?
Lolz, he knows how to get that without sudo already :)
ivanche··on Things I can’t do on macOS which I can do on Ubuntu (2020)
Good suggestion! IMHO Kitty is seriously underused terminal. Very fast, customizable, scriptable…
ivanche··on Things I can’t do on macOS which I can do on Ubuntu (2020)
+1 for this. Hammerspoon is a godsend. I have keyboard shortcuts to switch to my desired apps instantly (around 10 or so, hyper+I is IntelliJ, hyper+A is Atom, hyper+F is Firefox etc.)
ivanche··on Things I can’t do on macOS which I can do on Ubuntu (2020)
At least changing mouse button order (and much more complex keyboard modifications such as remapping keys, assigning different commands to F keys, making a hyper key, turning on super-duper mode etc.) is possible with Karabiner Elements.
ivanche··on Atomic Habits: An Easy and Proven Way to Build Good Habits and Break Bad Ones
> After reading a bunch of such books over the years

This is the "problem". You've read a lot of similar books so this one isn't groundbreaking. But if you were one of today's 10000, this one would be groundbreaking.

ivanche··on Minimalist dependency injection in Python (2021)
Thank you for very detailed reply! As the matter of fact, I mostly agree with you and prefer such a direct (or manually wired) approach to DI, over Spring's declarative one. Somehow I was under impression that you are against DI as a concept. I am sorry for that.
ivanche··on Minimalist dependency injection in Python (2021)
Do you have any proof of that? 40% is a pretty strong claim.
← PreviousPage 5 of 20Next →