HNHacker News
TopNewBestAskShowJobs

Shacklz

1,272 karma · joined September 23, 2018

submissionscomments
Shacklz··on Record number of environmental activists murdered
Are climate activists expected to "take some loss" or what exactly are you implying with this question?

If people die because they engage in non-violent activism it's just wrong, plain and simple, there's no gray area (at least I have a very hard time thinking of one). The overall number of activists or the growth thereof has absolutely nothing to do with that.

Shacklz··on ProtonMail logged IP address of French activist after order by Swiss authorities
While the incident is really a bit worrying, I'm personally not paying PM to protect me from state-agents - I'm paying them to protect me from Joe working in marketing.

If a state agent wants my data and brings the necessary paperwork to get it - I'm not expecting anyone to put up a hopeless fight for me, or at least not for the 100 bucks or so that I'm paying yearly for PM.

I just expect them to not sell out my data altogether, which PM doesn't seem to be doing, and this is all (or at least, most) that I care about.

Shacklz··on Discord has won over gamers. Now it wants everybody else
There's a difference between "sitting on their arses" and "trying to grab every single customer possible".

TeamSpeak didn't bother to acknowledge that a lot of people often just want to write some messages to others without actually hopping into a channel/server, let alone a VoIP-channel. Their synchronous-only communication philosophy via community-maintained servers just didn't pan out.

Shacklz··on Afghans Delete Social Media as Taliban Seizes US Surveillance Equipment
> Pacifism = "if you attack me, I will not stop you"

Yeah but the Taliban (or the the Afghanis in general, for that matter) didn't attack anyone.

A bunch of radicals made 9/11 happen, and as it happens, the main guy behind it happened to be in Afghanistan and on somewhat okay-ish terms with the Taliban, but the Taliban themselves were perfectly okay to negotiate his extradition if my understanding is correct. That is, they were, until the first bombs started to drop.

For all I care, Afghanistan was a bloody revenge war, nothing but catharsis for the bruised American soul. It was never about the women or democracy or the well-being of the Afghanis in general, because if that was the case, the US might as well have started with Saudi Arabia (which had probably more to do with al Qaeda than Afghanistan to begin with). In my opinion, it wasn't even about OBL, because otherwise the US would've taken the Pakistani coddling with extremists (and ultimately the sheltering thereof) more serious than they did.

Anyway, I'm already ranting again... I just sometimes wish everyone on this planet was a bit more naive, you know, and just believed in the general good of the people. Yes, there are always a few crazy outliers, yes, there are always those who try to gain advantage and power by manipulating the masses by abusing their fear and primal instincts, but in general, most human beings just want to live a peaceful live, not having to worry about drones and bombs and stray bullets and whatnot. And by believing all together in this common good, I think the world might just be a little bit a better place. At least in my pipe dreams...

Shacklz··on Afghans Delete Social Media as Taliban Seizes US Surveillance Equipment
> This equipment was purchased by Afghanistan from the US (using US funds, obviously)

As someone with a slightly pacifist streak and a very strong dislike of the military industrial complex, this statement, as obvious as it is, somehow still makes me furious...

I often wonder how people working in these circles or supporting politics in this direction sleep at night. It's so obviously pointless, so obviously destructive, so obviously detrimental to humanity as a whole... I don't know. Maybe I'm just too naive, but I just can't decide if I should feel sad or angry about it.

(sorry for the somewhat unrelated rant)

Shacklz··on Psst: Fast Spotify client with native GUI, without Electron, built in Rust
> Most people don't care that it takes an extra 10-100 milliseconds

I probably wouldn't care about it too much if they didn't mess up the rest of their apps into the dogturd that they currently are. Doing bad UX is one thing, making UX consistently worse with pretty much every update another. And that's what Spotify has been doing for years now - if I could go back to a client-version from a few years ago, I would, immediately, without thinking twice.

The fun part? My company jumped on the SAFe-train a while ago, and Spotify was heralded as the "prime example" of where agile and all that works out really well.

I have no idea what they are doing, but whatever it is - if they continue like this, I'll go back to pirating music, because they're getting really close to having just-as-bad of an experience as that. And I really don't mind paying 20 bucks for my family account; experience is all I care about.

Shacklz··on Taliban enter Kabul as Afghan government on brink of collapse
> remember the same Taliban sheltered 9/11 terrorists and is still allied with al Qaeda!

But when the Saudis presumably financed some of the same/similar bad guys it wasn't even worth much of an investigation? I find such "they're bad guys!"-arguments to be applied very inconsistently

Shacklz··on PhD student in Switzerland expelled after criticizing the CCP in Twitter
> We speak German

The Germans might see that a bit different than us ;) Jokes aside, the article was of course in German.

Shacklz··on PhD student in Switzerland expelled after criticizing the CCP in Twitter
Here's also a statement by the HSG regarding the article in the NZZ: https://www.unisg.ch/de/wissen/newsroom/aktuell/rssnews/camp...

According to the statement, the student tried "to force his re-acceptance to the phd-program with legal and political means".

To be honest, I'm not quite sure what to make out of the whole situation (as a Swiss, originally from the area of St. Gallen, where the school is).

I would be heavily surprised if the HSG would let itself pressure to the effects that the headline of the article insinuates. The school has a bit of a reputation in engineering circles as "useless MBA graduates factory", but being beholden to Chinese interests? That seems quite the stretch to me.

Shacklz··on New in Git: switch and restore
You can skip the "checkout master + pull" part by using "git fetch origin master:master", or by using just "git fetch origin" and then "git rebase origin/master". Other than that, that's pretty much my workflow too :)
Shacklz··on New in Git: switch and restore
I had this opinion for the longest of times as well, but me and all the other devs I know who started using a rebase-based approach just don't want to go back.

I think it's also a bit a question of team size. If your project has just a handful of devs working on it, merge-commits really don't matter all that much. If there are a few dozen with a good amount of juniors on the repo (a bit over 40 devs in my case), the commit-history becomes an absolutely unreadable spiderweb, that's at least my experience.

At work, we want to move towards trunk-based development (merge to master goes straight to prod), but whenever master was broken, a look at the commit-history didn't really all tell you that much about the who, how and why without checking it out and digging into it. So we've recently started to enforce linear history, in which case it is immediately obvious without the shred of a doubt who's responsible. Analyzing the build became an absolute breeze, at the cost of having a bit of a harder time at "insertion"-point (which is perfectly fine, given the fact that after merge, it should eventually go straight to prod).

It took a while to get everyone on board, but it was really worth the efforts and can only recommend it (I most definitely will prefer a workplace that is open to such practices in the future). In general, most devs were also quite happy to be guided through the process, as it is clear that git is probably one of the longer-lasting constants in our industry.

Also, I can't repeat it enough; speaking from experience, most devs severely overestimate the complexity of cherry-pick/rebase/reset/reflog etc. Whenever I had sessions explaining it or helping someone out with a problem, they had their first "aha!"-moments after a few minutes, and after that with some do-it-yourself-experience most of them get there rather fast. Obviously, there are always a few outliers who need a little bit of extra-nudging and extra-help to stay in line, but those are usually the ones who often also need that sort of assistance in other areas so that's okay.

Shacklz··on New in Git: switch and restore
> Unfortunately, it always results in scary conflicts.

I think you're referring to what I call "conflict cascades"? E.g., you're 4 commits ahead of "master", and want to rebase on top of it - but you have a conflict with your first commit, and after you resolve it, this results in conflicts in the second one, etc.?

It's a very interesting question because it's one of the main pain points of rebase that simply does not exist with merge.

What I've found for myself is that it's very important to create "atomic commits", which do not rely on other commits to make sense or "be complete". For example, a very common thing that I see is "fix formatting", "fix tests" commits, because some build was complaining about something being broken. And it's often these kind of commits that create weird conflicts (especially the formatting ones) because just a lot of code is moved/refactored/added/removed etc.

But do these commits make sense on their own? For example, if you have a history as follows:

    <commit-1> Introduce new fancy feature
    <commit-2> Fix formatting
    <commit-3> Fix tests
Does it make sense to ever check out <commit-1>? No, right, because that commit is broken - wrong formatting, broken tests. What you want is always <commit-3>. So why not just adding those changes directly to commit-1 by using commit --amend when committing or by using fixup in an interactive rebase.

This was of course just an example, but in my experience, if people follow these kinds of trains of thoughts - what can be in a separate commit, what should be together, etc., there is an inherently smaller conflict-cascade-potential, which pays off a lot when rebasing. On top of that, it also makes history generally more readable and individual commits more meaningful and easier to cherry-pick.

Shacklz··on New in Git: switch and restore
> I really am not sure if you were being sarcastic

I was not :P But the commenter also said in the linked comment that they "understand how git works", so I took the liberty to make a few assumptions ;)

> But the fact that GIT imposes its internal data model on you

It does, to some degree, but once you get a grip of "everyday commands" that go beyond commit/merge (cherry-pick, rebase, reset, reflog), it's actually almost surprising how little you have to know about gits internals. It does help to have an idea about them, though.

My main complaint about git is that most commands have too many options that make it do too many different things. And that resolving conflicts via command line is absolutely atrocious (something I actively avoid and discourage).

> I know that one day I'll get completely sick of GIT and will research and learn it to the bone

I can only recommend it! It's really not that hard as many people suspect (as I've mentioned, I have a bit of a habit of teaching people git at work). If you had any exposure to something computer science in the past, the puzzle pieces probably start to come together after some hours.

And it's probably one of the longer-lasting constants in our industry, so in my opinion, it's really worth it to know how to make good use of it.

Shacklz··on U.S. generates more plastic trash than any other nation, report finds (2020)
Aren't the plastic bags mainly a problem because they tend to end up in places where they don't belong at all, like oceans etc.? They can't really decompose or anything like that, they just shred to tiny little pieces that mess with animals (and ultimately also our) digestion, no?
Shacklz··on New in Git: switch and restore
Regarding your first point (and I think some of the commenters in that thread also address this already) is that as long you don't have uncommitted changes, you're safe. You're right that a lot of git-commands mess with uncommitted changes in hard-to-recoverable ways, but once changes are committed, there's almost no way to mess anything up, you can always go back to the previous state (git reflog <branch> telling you which commit that was).

Regarding the second point - if you have a rebase-based work-flow, you will encounter this problem less often (or not at all).

For your third point - what helped me a lot is to actively distinguish between commits and the working tree, and making myself aware that branches really are just "pointers" to commits (obviously, but somehow, actively thinking about it made the intent of git commands a lot easier to understand). Also, most git commands are just combinations of other commands. git reset is just moving the pointer (--soft without touching the working tree, --hard will do so), rebase is essentially a hard-reset with consecutive cherry-picks afterwards, and so on.

Also, an eye opener for me personally has been that e.g. an interactive rebase with squash towards a branch that is strictly ahead of you except for the commits you want to rebase is essentially just a "git reset --soft <target>", and then recommitting everything with a fancy commit-message. This and similar mental gymnastics with git-commands has helped me a lot; most of them really are quite sane (except for all those crazy options), "git checkout" is really the odd-one-out of the bunch (and "git pull" a combination of things that should never have been combined in the first place).

Shacklz··on New in Git: switch and restore
> Figuring out what "properly" means is the whole problem with git.

I think you've missed OPs point by focusing too much on a single word ('properly'). Yes, there's no clear-cut way on how to use git, no silver bullet, but the main problem with git is that most devs simply panic when they have to do anything that goes beyond the bog-standard commit/pull/push/merge. Rebase? Squash? Reset? Rebase interactively? I think OP was referring to this cluelessness with 'not using properly', rather than which approach to git is the best.

I work on a monorepo with 40-something other devs, and we've recently switched to enforced linear history because the history got to the point of being completely useless, it was an unreadable spiderweb. The problem was not that folks didn't see that what they were doing was not-so-good (introducing often more merge-commits with every PR than non-merges), it was that they had no clue how to avoid that.

It took us quite a bit of time to get everyone up to speed but pretty much everyone got around to it after a while. It's not rocket science after all.

Shacklz··on How to spot a good fake ID
> Cryptographically verifiable identification is not a good idea, regardless of intentions.

Technically not an identification, but Zero-Knowledge-Proofs might be the solution to that. If I remember correctly, some countries in the EU are looking into this for medical prescriptions - proving your eligibility while exposing zero information about you.

Shacklz··on The new ProtonMail has passed its independent security audit
Same here, on Android. But I mostly receive email and almost never send out emails on the phone; so I can see that others might need features that are totally irrelevant for me.
Shacklz··on Up to 1,500 businesses affected by ransomware attack, Kaseya CEO says
Hey look, I'm not saying that it's not possible. I even believe you - in a lot of big companies, there are so many "bloat"-teams that don't really do all that much, that just drift around in the currents that flow when cash is abundant and will get shafted the moment the company has to tighten its belt (or goes belly-up altogether, if the company is incapable of identifying its inefficiencies).

That being said, we should really take these anecdotes with the appropriate grain of salt. After all, we're here in a thread about countless companies being threatened by security flaws. A dev that "gets things done" (from a business point of view) might actually do that, but do they also think about all those other requirements that business themselves can neither validate nor appreciate if measured by short-term KPIs?

I'm not saying that's happening, but I've seen too many "Why are you spending weeks on this, I can do this in half a day!"-kind-of-devs, that then hack something together that technically works as the requirements demanded, but completely falls flat under any aspects of maintainability and extensibility, let alone security.

Shacklz··on Up to 1,500 businesses affected by ransomware attack, Kaseya CEO says
> and then wrote an entire system!

Yes yes. And this was of course very maintainable, up to todays standards, easy to onboard new hires in, not falling apart in edge cases that weren't part of the demo, code that was audited by multiple developers, it didn't make any shortcuts in terms of security, etc. etc. etc.

That some business guys are amazed by the "lone wolf dev skills" might be explainable, but on HN we should know better. Yes, there are devs that get a ton done irrelevant of framework, but "getting things done" (in terms of business requirements) is only part of the story.

Shacklz··on Commit often, perfect later, publish once: Git best practices (2013)
> I really want to put the 'enough is enough' point before worrying about a good looking commit history.

I see where you're coming from, but I'd like to add a counter-argument to that. I'm currently working on a (mono-) repository with 40-something devs working on it, and we've recently switched from a "everything goes"-commit-history-approach to enforced linear history (while only a handful of people are allowed to directly commit on main-lines without a pull request).

The main reasoning was this: It became almost impossible to understand why a build broke on the mainline by just looking at the commit-history itself. It was always needed to go through build-logs and such to get the picture of the how and why, and often even to get to the 'who', because the commit-history itself was just riddled with merge-commits. For the few devs who took care of that, this was a huge issue, while everyone else was just happily committing away.

So going to the linear-history-approach made "analyze, understand" a breeze, but made "insertion" harder. We had to put in quite a bit of effort to get everyone up to speed (rebase, squash, reset, cherry-pick etc.) and set up some tooling for basic sanity-checks (pre-push-hooks etc.), but it was well-worth it, and a lot of devs were actually happy to be guided through this because for them it's clear that this will also be useful further down the road (in other jobs), not just for the current task at hand.

And at last: It's really not that big of a deal. Just before opening a pull-request (or whatever your equivalent is), have a look through your change-set, run a bunch of commands if necessary, and done. Once you get the hang of it, it's pretty straight forward. It might not be worth it for you personally, but if you work on a repository with many other devs, there might be others who are grateful for that.

Shacklz··on Asking developers to do QA is broken – why anyone should own QA
Oh c'mon. Of course a blog on the website of a company is ultimately trying to pitch their product, one way or another. That does not invalidate the points they bring up per se.

It obviously needs a bit of critical thinking when reading it and taking everything with a grain of salt, but that's something I really hope we can expect people on HN to be capable of?

Shacklz··on User Inyerface – A worst-practice UI experiment
> like an ancient, cockroach-like anti-pattern that is impossible to stamp out.

I feel like you just described email (or rather, "the" email spec, as if there was a single one) in general.

Yes it obviously still serves its purpose but what consists a valid email-address (let alone email) is specified in such a godawful way that every application that I've seen in the wild trying to address this problem somehow fails at it (sometimes in negligible, often in very gross ways).

If devs all over the world manage to screw it up over and over again, maybe it's just time to call it quits and acknowledge that the spec is broken?

Shacklz··on Git undo: We can do better
I really understand your sentiment, and I've been there for long enough myself - but once you have a somewhat decent understanding about gits internal data model, the commands that allow you to clean up pretty much any mess (reset & reflog probably being the most prominent ones) start to somewhat make sense. If you had previous exposure to anything computer-science, it very likely won't take more than a few hours until the puzzle pieces start to come together.

And it's time well-spent in my opinion; git will probably be one of the longer-lasting constants in software development.

Shacklz··on Git undo: We can do better
> Linux kernel history has lived without it, so I'm guessing the "our code is so complex we need it" is a false idea.

Those guys are still sending commits (patches) to each other by mail, I think they willingly live in such a special and weird bubble that it just can't be compared to any "real life industry project".

We've recently started to enforce linear history on our main branches at work, because it makes analyzing broken builds such a breeze. The mantra is "Insertion is hard, analyzing/understanding is easy" (for a merge-based history, it's pretty much the other way around), and so far it's quite the success.

It did take quite a bit of effort though to get everyone up to speed, and it still requires the occasional help to clean up the commit history of some merge request, but it was well-worth the trouble so far.

Shacklz··on Life as a public school teacher in the San Francisco Bay Area in 2021
This is kind of the approach that Switzerland is taking (disclaimer; I'm Swiss), although I would not formulate it as drastically. It depends a bit on the region but school is required until 14-ish, after that there's a split for "gymnasium", which is continued full-time-school, around 20% of the students do this (again, varies by region). The remaining 80% start an "apprenticeship", where they work 40-60% on a job, and spend the rest of the time in school (where there's about a 50-50 split between general education and job-specific education). Whenever someone doing an apprenticeship figures out that he wants to go back towards higher education, there are plenty of routes to do so.

In my opinion it works quite nicely. The 80-20-split for gymnasium (which requires an entry-exam, but again, region-dependant) ensures a certain level for students in gymnasium, and the "job schools" for the apprenticeships allow for job-specific education. All in all, I consider it a pretty decent system.

Shacklz··on Life as a public school teacher in the San Francisco Bay Area in 2021
Public schools work well throughout the majority of the developed world - the US seems to be a notable exception.

Anand Giridharadas addresses this in his infamous google-talk quite nicely I think: https://www.youtube.com/watch?v=d_zt3kGW1NM&t=623s (I'm linking this talk on HN way too often, but it just seems perfectly fitting so very often)

Shacklz··on Implementing Private Fields for JavaScript
I think private fields will come in very handy for libraries. Yes, people should not access fields marked as internal/private, but they often do anyway (at least I've seen it often enough) just because it's the easiest way to fix some issue, or to get more control than the library officially offers. And then they complain when upgrading the library version is a PITA...
Shacklz··on Fastmail accounts blocked in Russia, here's what we know
I'm a very happy customer of protonmail. They're consistently extending their offering (VPN, Calendar, Drive is up next), their pricing seems fair, albeit not exactly cheap, but to be honest though, I almost consider this to be a feature - I'm perfectly okay with paying good cash for something as important as mail.

Their UI was somewhat lackluster but they recently released a completely overhauled version (just a few days ago), which seems kinda nice so far.

All in all, I can only recommend it. That being said, I'm mostly only receiving mail and rarely ever sending out any, so YMMV.

Shacklz··on We are publishing the tax secrets of the .001%
> And many would then ask, what's the motive for generating wealth if it's just going to be taken away from you?

The same motivation that drives some folks to study e.g. philosophy, even though it's perfectly well known that this will never make you rich: Because they like it.

You don't just e.g. found a company for the sake of money - you also do it because it allows you to do things on your own terms, it gives you prestige, it gives you the satisfaction of being 'successful'. In todays day and age, this is usually equivalent with 'generating wealth', but I'm a firm believer that this does not necessarily have to be the case.

← PreviousPage 5 of 9Next →