HNHacker News
TopNewBestAskShowJobs

bendiksolheim

354 karma · joined May 30, 2016

https://www.bendik.dev
submissionscomments
bendiksolheim··on ECMAScript proposal: String.prototype.replaceAll
That is an interesting way of seeing it. I’m not saying I disagree with the rationale, but I find it weird that a function which promises to do something needs a specially modified version of its input _not_ throw an exception. That does not sound like a good API design at all.
bendiksolheim··on ECMAScript proposal: String.prototype.replaceAll
I don’t understand the rationale behind throwing an exception if you provide a regular expression which lacks the g modifier. This seems really counter intuitive. I would expect replaceAll to replace all occurrences no matter if the regular expression is global or not.
bendiksolheim··on What's new in Java 12, 13 and 14, part II
"Helpful NullPointerException" is a game changer. I haven’t tried it yet, but from the looks of it this seems to be a good enough reason to upgrade to Java 14 by itself.
bendiksolheim··on What's new in Java 12, 13 and 14
Java is actually getting quite a few nice features these days. I am especially excited about these improvements to the `switch` statement – I have always felt that the `switch` statement is more or less useless in its current form. Now, if it only had exhaustiveness..
bendiksolheim··on A list of computer languages with release year and category
This is doable with some JavaScript. Paste the JavaScript from this gist [1] in your console while on the web page, and the table will be sorted descending by year. Swap `bValue - aValue` on line 4 with `aValue - bValue` to sort ascending.

[1] - https://gist.github.com/bendiksolheim/307a6af9aba2c4360c75b9...

bendiksolheim··on "Version" include wreaks havoc on case-insensitive filesystems
You could argue that this is a problem with case sensitive file systems, not insensitive ones. In fact, this could never happen on a case insensitive file system, as you could never create a file named the same but with a different case.

It seems to me that most problems with case insensitive file systems are rather problems because there are different file systems out there. Just as there always is with "competing" standards.

bendiksolheim··on "Version" include wreaks havoc on case-insensitive filesystems
What troubles do they cause? I might have been lucky, but during my ~10 years on a a mac, I do not remember having had any problems with case sensitivity on a file system level. I might be a special case though, as I always name my files in lower case and with hyphens instead of spaces.

Actually, I kinda like not having the possibility of having both "Downloads" and "downloads" by mistake in my home folder.

bendiksolheim··on Japan's commercial whaling to restart July 1 after 3-decade hiatus
This is not binary. It is fully possible to hunt them to keep the population stable. It is not a bad idea at all as long as it is properly regulated.
bendiksolheim··on How to use array reduce for more than just numbers
> I know what happens by reading the function. Pretty much any function that calls a method on some object mutates its argument. It makes little difference if you abstract this mutation behind the method, or do it directly, or do it via a helper function that takes the object as an argument.

Are we talking about functions in general, or small accumulator functions here? I would argue that mutating arguments in general is a really bad pattern that certainly will lead to weird and subtle bugs in the long run. It is also completely unnecessary – you have inputs and outputs for a reason. You might know what happens if you read the function yourself, but you can never assume that everyone else will.

> No. Most of those are usually more wasteful, because if you can't mutate objects, you'll have to throw them away at every mutation.

No, you don’t. This is an implementation detail. Libraries like immutable.js [1] (and several others, I believe) makes it possible to work with immutable data structures without cloning anything.

> Anyway, it is harmful to avoid mutation at all costs.

We can more or less agree on this one :) My comment was unnecessary bastant. I have used mutations in reducer aggregators myself. But, avoiding mutation removes a source of bugs, without sacrificing readability or functionality.

[1] https://immutable-js.github.io/immutable-js/

bendiksolheim··on How to use array reduce for more than just numbers
There are tons of wrongs with mutating arguments. The fact that it is possible to mutate arguments in JavaScript does not make it a good idea. Such functions cannot be trusted (how can you know what happens when you call it?), and they are hard to test.

There is _always_ a better alternative to mutating arguments in a function.

bendiksolheim··on European Commission fines Google €4.34B in Android antitrust case
I was unaware of this exact case, thanks for the information. I agree that pulling apps such as this is very unfortunate.
bendiksolheim··on European Commission fines Google €4.34B in Android antitrust case
I might have misunderstood what theBobBob meant with "default apps" completely, but that was not how I understood it at all. As far as I understand, he talks about disallowing apps on the App Store, so this would be a completely different point (to which I agree, setting a different browser would be nice).
bendiksolheim··on European Commission fines Google €4.34B in Android antitrust case
Do you have a source for this? I can’t remember Apple disallowing an app because Apple itself provides a similar app. I checked the default apps quickly on my phone, and can find several competitors for all of them. If you are talking about the "apps" Messages.app or Phone.app then I guess you might be right if we define "not providing a public API" the same as "disallowing on the App Store".
bendiksolheim··on A brief list of what Scrum gets wrong
Everyone has deadlines. Either customer imposed ones, or the market running against you. At some point, you'll have to meet them. When do you stop accepting changes and deliver? Can you welcome last minute disruptive changes? Sure. But the market won't wait for you to implement them.

What’s the point in delivering something both you and the customer know is wrong, when you can turn around and fix it instead? The point is delivering something of value instead of delivering something you agreed upon half a year ago.

Some tasks require longer attention spans. This is the classic technical debt accumulation choke point. Now, iterations + deadlines make sense. But does it have to be a fixed 2/3 week period, always? Where the flexibility in that?

The text says "couple of weeks to a couple of months", not 2/3 weeks. If a task requires a longer attention span than two months, you should probably break it down and deliver something of value earler on. As you say yourself: "the market won’t wait for you to implement them".

To be fair, I've only seen Scrum. But this point is in direct contradiction. Scrum is about diluting the individual. Everyone is a replaceable resource.

What a nice way of motivating people. Every person in a good team is of big value, and cannot easily be replaced by anyone else. Creating a good team requires thought and planning. If Scrum is about diluting the individual, then Scrum is far more wrong than I originally thought.

This is just wishful-thinking, the Agile Point. The only remotely close way of doing this is turning everyone into cogs in a machine. No, thanks. Weren't we valuing the individual?

When you motivate people, and give them tasks they like, they tend to perform their best. Turning people into cogs in a machine, as Scrum seems to like, is not a good way of motivating them. As the manifesto says: value the individual and motivate them, and they will get the job done.

And takes time. Ops, sprint's time is over. I guess that refactoring can wait.

And that is why you don’t care about sprints. You do one task, preferably as small as possible, and deliver it when it is done. That’s it. I have never understood why I should spend loads of time planning what I should do the next N weeks, when I can just do it instead.

Some of the most successful products and projects (Linux, Python, Apple) revolve around strong leadership.

Having strong leaders around a self organizing team is not necessarily problematic. Self organizing teams are more about giving the team freedom to work the way they want. A manager or leader can then contribute by removing obstacles and ensure the team has everything it needs instead of micromanaging everything.

The most important part of The Agile Manifesto, in my opinion, is "Individuals and interactions over processes and tools". If you care more about the process than you do of the people in the team, you are doing it wrong.

EDIT: formatting.

bendiksolheim··on Show HN: Wey – A fast, open-source Slack desktop app
That is probably the main process. Slack has one process per team. I am currently running at 1.4GB on my Mac with 6 (relatively small) teams.
bendiksolheim··on Ask HN: Which VPN would you recommend?
This is definitely a valid point. In my case, I share my VPN with friends and family, and also use it from a number of different devices (several laptops, and mobile devices). Anyway, the point is not necessarily to make it impossible for anyone to connect my internet traffic to me, but rather make it harder to monitor me.
bendiksolheim··on Ask HN: Which VPN would you recommend?
unattended-upgrades is enabled by default, so security updates are handled automatically. You can also just destroy and recreate the box once in a while, without any extra cost.

But it is of course completely up to you. If you trust your VPN provider when they say they don't log anything, I guess you are fine.

bendiksolheim··on Ask HN: Which VPN would you recommend?
A firewall is configured as part of this setup. unnattended-upgrades is also enabled, so security updates are automatically installed (which of course might be a security problem itself). If you are really paranoid, you can destroy and recreate the box every so often, as the whole process takes about 10 minutes.
bendiksolheim··on Ask HN: Which VPN would you recommend?
Roll your own! Setting up your own, private VPN can be done quite easily with https://github.com/jlund/streisand and a DigitalOcean account. Costs $5 per month. It doesn't require a whole lot of technical competence either, as the Streisand project configures just about everything for you.
bendiksolheim··on Platform wars: the final score
I think that impression might be quite subjective – my impression is the exact opposite. I don't have any numbers either, but most people I know, both Android users and iOS users, are quite happy with their devices. They do of course have minor issues, but that will almost always be the case with something targeting such a broad audience.

I am not sure how I could be more happy with my device. Right now it mostly does what I want it to do, the battery lasts a couple of days, and it rarely bugs out.

edited: changed "really" to "more" in the second paragraph.

bendiksolheim··on “Apple took away Messages.app UI scripting capabilities in OS X 10.11”
Facebook is quite different from this case. If you friends use Facebook to communicate, you need to as well. There is, as far as I know, no alternative. But if your friends use iMessage to communicate, you can easily communicate with them through SMS. Just turn off iMessage, and Apple will recognize this and fallback to SMS. You are not forced to use iMessage just because your friends does.
← PreviousPage 2 of 2