HN user

fphilipe

1,065 karma

http://phili.pe

https://github.com/fphilipe

[ my public key: https://keybase.io/philipe; my proof: https://keybase.io/philipe/sigs/182uf1x4SUnMvtmLchInbgTL0X0b0qcRGe_g2T0KLDo ]

Posts34
Comments152
View on HN
github.blog 6mo ago

Hierarchy view now available in GitHub Projects

fphilipe
1pts1
github.com 1y ago

Add a way to use webauthn without JavaScript

fphilipe
2pts0
qedcode.com 3y ago

Exclusive End Dates

fphilipe
3pts1
phili.pe 4y ago

Git aliases supporting main and master

fphilipe
2pts0
phili.pe 4y ago

Grep one-liners as CI tasks

fphilipe
111pts34
phili.pe 4y ago

Grep one-liners as CI tasks

fphilipe
5pts0
blog.arkency.com 5y ago

Use channels, not direct messages (2018)

fphilipe
3pts0
phili.pe 5y ago

Configuring Git for Work

fphilipe
2pts0
techcrunch.com 5y ago

Travel startups cry foul over what Google’s doing with their data

fphilipe
2pts0
finance.yahoo.com 6y ago

Slack drops on lower guidance amid coronavirus outbreak

fphilipe
2pts0
phili.pe 6y ago

Is There a Better Way?

fphilipe
1pts0
techcrunch.com 6y ago

Electric moped startup Revel raises $27.6M as it eyes new markets

fphilipe
1pts0
muzzleapp.com 7y ago

Muzzle – Silence Embarrassing Notifications

fphilipe
1pts0
developer.apple.com 7y ago

SwiftUI Tutorials

fphilipe
1pts0
developer.apple.com 7y ago

SwiftUI

fphilipe
765pts379
phili.pe 7y ago

Exporting CSV from PostgreSQL

fphilipe
2pts0
phili.pe 7y ago

Exporting CSV from PostgreSQL

fphilipe
3pts0
phili.pe 7y ago

PageExtender for Safari

fphilipe
3pts0
phili.pe 10y ago

Timestamps and Time Zones in PostgreSQL

fphilipe
3pts0
phili.pe 10y ago

Free Concurrency with GNU Parallel

fphilipe
6pts0
zeroclarkthirty.com 10y ago

Elixir is not Ruby

fphilipe
49pts7
phili.pe 10y ago

PostgreSQL on the Command Line

fphilipe
254pts43
phili.pe 10y ago

PostgreSQL on the Command Line

fphilipe
6pts0
translate.google.com 11y ago

The mystery surrounding the origin of holes in the cheese is dissolved

fphilipe
1pts0
bits.blogs.nytimes.com 12y ago

Makers of Paper App Ask Facebook to Change Its New App Name

fphilipe
2pts0
www.youtube.com 12y ago

Building Tensile Structures with Flying Machines

fphilipe
1pts0
github.com 12y ago

PHFComposeBarView: compose bar from iOS 7 Messages.app

fphilipe
1pts0
blog.8thlight.com 12y ago

The Careless Ones

fphilipe
7pts1
bl.ocks.org 12y ago

Monte Carlo Sampling of π

fphilipe
2pts0
www.idsc.ethz.ch 13y ago

Balancing Cube

fphilipe
1pts0

This is what has been frustrating me most lately. Even though I have a rule in my global CLAUDE.md that says:

Only write comments to explain the why when it is not obvious from the code (rationale, gotchas, constraints). Do not comment on the what — well-named code already says it. Do not comment on how a framework works.

It still keeps adding these bad comments. When I then ask it to review the comments based on my preferences it then deletes most of them or improves them.

Today I asked Claude why it disrespects my preference and it said that the surrounding code was like that and it followed that style. It suggested I add this line to my global CLAUDE.md file:

The comment rule above beats the style of the surrounding code: neighboring files with what-style comments are not license to write more of them, and comments carried along when porting or copying code must be re-judged against the rule, not kept for consistency.

Let's see if that improves things.

GitHub Stacked PRs 3 months ago

Sure, that's possible. I can also use the GitHub app and use a Git abstraction where I don't have to understand Git at all.

The point is that I want to use Git, a tool and skill that is portable to other platforms.

GitHub Stacked PRs 3 months ago

My git config for pushing is set to push.default=current. For rebased stacks I have an alias that does this:

    git --config push.default=matching push --force-with-lease --force-if-includes
In other words, I force push all branches that have a matching upstream by changing my config on the fly.
GitHub Stacked PRs 3 months ago

I've been doing stacked PRs for ~2 years now. Thus, I don't quite see the need for this CLI. Git has had some additions in the last few years that make this work natively – specifically the --update-refs flag[1] or the rebase.updateRefs config. Combined with `git commit --fixup`, rebase.autoStash, and rebase.autoSquash rebasing stacks becomes a breeze (as long as you work off from the tip of your stack). Add in git-absorb[2] and the heavy-lifting is taken care of.

My biggest gripe with GitHub when working with stacks – and something that's not clarified in these docs – is whether fast-forward merges are possible. Its "Merge with rebase" button always rewrites the commit. They do mention that the stack needs to be rebased in order to merge it. My workaround has been `git merge --ff-only top-branch-of-stack` to merge the entire stack locally into main (or anything in between actually) and then push. GitHub neatly recognizes that each PR in the stack is now in main and marks them all as merged. If there are subsequent PRs that weren't merged it updates the base branch.

Having said that, it's great to see GitHub getting a proper UI for this. It's also great that it understands the intent that branch B that goes on top of branch A is a stack and thus CI runs against. I just hope that it's not mandatory to use their CLI in order to create stacks. They do cover this briefly in the FAQ[3], but it might be necessary to use `gh stack init --adopt branch-a branch-b branch-c`. On the other hand, if that removes the need to manually create the N PRs for my stack, that's nice.

[1] https://git-scm.com/docs/git-rebase#Documentation/git-rebase...

[2] https://github.com/tummychow/git-absorb

[3] https://github.github.com/gh-stack/faq/#will-this-work-with-...

I have a global setting for that. Whenever I work in a repo that deviates from that I override it locally. I have a few other aliases that rely on the default branch, such as “switch to the default branch”. So I usually notice it quite quickly when the value is off in a particular repo.

Here's my take on the one-liner that I use via a `git tidy` alias[1]. A few points:

* It ensures the default branch is not deleted (main, master)

* It does not touch the current branch

* It does not touch the branch in a different worktree[2]

* It also works with non-merge repos by deleting the local branches that are gone on the remote

    git branch --merged "$(git config init.defaultBranch)" \
    | grep -Fv "$(git config init.defaultBranch)" \
    | grep -vF '*' \
    | grep -vF '+' \
    | xargs git branch -d \
    && git fetch \
    && git remote prune origin \
    && git branch -v \
    | grep -F '[gone]' \
    | grep -vF '*' \
    | grep -vF '+' \
    | awk '{print $1}' \
    | xargs git branch -D

[1]: https://github.com/fphilipe/dotfiles/blob/ba9187d7c895e44c35...

[2] https://git-scm.com/docs/git-worktree

I'm of the opinion that Git hooks are personal. That's why they're not part of the source code itself. I make extensive use of hooks, but they're tailored to my needs.

Note that you can skip hooks by passing the --no-verify flag to subcommands. Comes in handy when they're slow and you know that you've just fixed the wrong formatting that the previous invocation of your pre-commit hook complained about.

Not wrong, but one thing I did not spot in all the great explanations related to HEAD is that @ is an alias for HEAD that is a lot easier to type.

I am definitely more in the changelog-as-a-file camp. From https://keepachangelog.com/:

Using commit log diffs as changelogs is a bad idea: they're full of noise. Things like merge commits, commits with obscure titles, documentation changes, etc.

The purpose of a commit is to document a step in the evolution of the source code. Some projects clean up commits, some don't.

The purpose of a changelog entry is to document the noteworthy difference, often across multiple commits, to communicate them clearly to end users.

Hardening macOS 4 years ago

If you never use those apps, you can also remove the executable flag with `chmod -x` and they won’t open anymore.

Keep a Changelog 5 years ago

The merge commit also includes the link to the PR when merged via the GitHub UI (or locally via `hub merge $PR_URL`).

Facebook aside you really see this across the board on almost any platform, that once the product reaches it's 1.0 stage, (where it is good, does what the users want it to do, and has realised its vision) it begins a process of gradual decay, as the focus of the product managers (now panicking to find some statistics to improve to show their bosses) shifts from "building functionality" to "increasing engagement/retention/active users per month".

Best example for me: Revolut. The app and product as a whole was so simple and good.

One year ago (or maybe 1.5 years ago) it started going downhill, fast. The app got so complicated that I often simply cannot find what I'm looking for (my card or the balance in a specific currency). Everyone I know using Revolut has the same complaint, especially older people like my parents or in-laws.

I don't get it and it makes me sad.

Valora Digital | Senior iOS | Full-time | Zurich, Switzerland | ONSITE or REMOTE (CET +- 2h)

Valora Digital[0] is the digital unit of Valora[1], a European retailer with 2700 stores across 5 countries. We are tackling interesting challenges in areas such as Autonomous Stores (think Amazon Go), E-commerce & Delivery, Loyalty, Payments and Process Improvement. For this purpose we are building up a development team from scratch. You will be one of the first engineers and will have a big part in shaping the culture as well as choosing our stack. We are looking to bring the startup ethos to the corporate world and get to combine the best of both worlds: ample funding, a huge customer base to deploy to and lots of freedom.

We are using Swift and SwiftUI to build a modular architecture that will underpin a portfolio of apps. I'm head of mobile and an iOS developer myself.

You can find the detailed job description here: https://en.valora.career/job/zurich/senior-software-engineer...

[0] https://valora.digital

[1] https://valora.com

This is a skill I've noticed that many developers don't have, or don't have sufficiently. This lack manifests itself e.g. when I review a PR that removes feature XYZ. I do `rg xyz` and `fd xyz` to see if there's anything that was forgotten to be removed related to that feature. Very often there is.

Valora Digital | Android (Kotlin) | Full-time | Zurich, Switzerland | ONSITE or REMOTE (CET +- 2h)

Valora Digital[0] is the newly founded digital unit of Valora[1], a European retailer with 2700 stores across 5 countries. We are tackling interesting challenges in areas such as Autonomous Stores (think Amazon Go), E-commerce & Delivery, Loyalty, Payments and Process Improvement. For this purpose we are building up a development team from the ground up. You will be one of the first engineers and will have a big part in shaping the culture as well as choosing our stack. We are looking to bring the startup ethos to the corporate world and get to combine the best of both worlds: ample funding, a huge customer base to deploy to and lots of freedom. I'm the head of Mobile and am looking for Android developers to join our Mobile team.

You'll find the job description on Stack Overflow[2] but you can also get in touch directly at philipe.fatio@valora.com.

[0] https://valora.digital

[1] https://valora.com

[2] https://stackoverflow.com/jobs/446492/software-engineer-andr...

Git is too hard 6 years ago

I use git-show a lot to look at individual commits. Would add that to the list.

macOS Big Sur 6 years ago

My wife does the same. The other day she wanted to open a new tab and the button was disabled. She had reached the limit of 500 tabs.

ctrl-[ can also be used as escape (I think escape sends that control sequence in the terminal).

With caps-lock mapped to ctrl, typing it is not too far off from the home-row.

Skimming the help of a git command once in a while (or when you have that feeling that there must be a way to achieve a specific thing) is rather quick and, thanks the pager's built in search feature, very accessible.

Having an alias for help (and for git) makes this quite convenient:

    $ g h commit
Then search for something in there, e.g. `/stdin<ENTER>`.