Hacker Newsnew | past | comments | ask | show | jobs | submit | amw-zero's commentslogin

When you go to write a line of code, how do you decide what to write?

> When you go to write a line of code, how do you decide what to write?

depends ofcourse, what am i writing for ? a feature, a bugfix, refactor ... ?


Let's say a new feature. Do you just type random letters, or do you have some kind of plan ahead of time?

new feature implies design document to gather the thoughts, followed by an intense review etc.

So... a specification.

no ! a _design_ document. how this new thing will fit together with other things that are already existing in the system. what it’s interactions are going to look like, what are the assumptions, what are the limitations etc etc.

So... a specification.

hang on ...

Honestly? I usually look at the previous implementation and try to make some changes to fix an issue that I discovered during testing. Rarely an actual bug - usually we just changed our mind about what the intent should be.

How do you or the client know that the software is doing what they want?

Compare the spec with the application here: https://concerningquality.com/model-based-testing/

I think we've become used to the complexity in typical web applications, but there's a difference between familiar and simple (simple vs. easy, as it were). The behavior of most business software can be very simply expressed using simple data structures (sets, lists, maps) and simple logic.

No matter how much we simply it, via frameworks and libraries or whatever have you, things like serialization, persistence, asynchrony, concurrency, and performance end up complicating the implementation. Comparing this against a simpler spec is quite nice in practice - and a huge benefit is now you can consult a simple in-memory spec vs. worrying about distributed system deployments.


Half of the world uses Apple products, how is that not the maximum possible impact?

No website uses Apple

A sync issue in drive would barely be noticed.


Apple Pay, with 65M users, can rely on external content from Apple.

https://developer.apple.com/documentation/applepayontheweb/d...


That's not a website

You'd probably be affected if you used Sign in with Apple, same as if you used third party sign in with Google, Facebook, Microsoft, or others and their authentication was down.

Sure, I don't use/have it though.

Because the consumer market is way less demanding than businesses. Hence why B2B and B2C are categorized separately

Half the world? Not even remotely close. Not for MacBooks or iPhones or anything else. They're a niche player.

Apple market share is about 30%

For mobile - For desktop computers, below 10% even. Given that only 73% of world population is estimated to have internet access in total, that makes it just a small fraction of world population overall

As a portion of Internet users who regularly pay for and depend on hosted services, I bet that percentage is much, much higher.

US marketshare is higher.

that's a fantastic point.

And to clarify - only writes on the _branch_ lead to a copy being created right? Writes on the original don’t get propagated to the branch?


What does this even mean? Because people have locked in their data, they’re ok with downtime? I can’t imagine a world where this is true.


It costs a lot of money to move, you don't know if the alternative will be any better, and if it affects a lot of companies then it's nobody's fault. "Nobody ever got fired for buying Cloudflare/AWS" as they say.


It's just that customers are more understanding when they see their Netflix not working either otherwise they just think you're less professional. Try talking to customers after an outage and you will see.


it's not just that, it's the creation of a sorta status symbol, or at least of symbol of normality.

there was a point (maybe still) where not having a netflix subscription was seen as 'strange'.

if that's the case in your social circles -- and these kind of social things bother you -- you're not going to cancel the subscription due to bad service until it becomes a socially accepted norm.


The “simplicity” of Go is just virtue signaling. It has gotchas like that all over the language, because it’s not actually simple.


Yep.

The lack of features means all the complexity is offloaded to the programmer. Where other languages can take some of the complexity burden off the programmer.

Go isn't simple, it's basic.


Perhaps Go is a nice target language for a transpiler, so you could still benefit from the runtime and ecosystem while fixing the bugs in the language itself. Anyone working on this?



As someone who's written commercial software in well over a dozen different languages for nearly 40 years, I completely disagree.

Go has its warts for sure. But saying the simplicity of Go is "just virtue signaling" is so far beyond ignorant that I can only conclude this opinion of yours is nothing more than the typical pseudo-religious biases that lesser experienced developers smugly cling to.

Go has one of the easiest tool chains to get started. There's no esconfig, virtualenv and other bullshit to deal with. You don't need a dozen `use` headers just to define the runtime version nor trust your luck with a thousand dependencies that are impossible to realistically audit because nobody bothered to bundle a useful standard library with it. You don't have multi-page indecipherable template errors, 50 different ways to accomplish the same simple problem nor arguments about what subset of the language is allowed to be used when reviewing pull requests. There isn't undefined behaviour nor subtle incompatibilities between different runtime implementations causing fragmentation of the language.

The problem with Go is that it is boring and that's boring for developers. But it's also the reason why it is simple.

So it's not virtue signaling at all. It's not flawless and it's definitely boring. But that doesn't mean it isn't also simple.

Edit: In case anyone accuses me of being a fanboy, I'm not. I much preferred the ALGOL lineage of languages to the B lineage. I definitely don't like a lot of the recent additions to Go, particularly around range iteration. But that's my personal preference.


You are comparing Go to Python, JS, and C++, arguably the three most complex languages to build. (JS isn't actually hard, but there are a lot of seemingly arbitrary decisions that have to be made before you can begin.) There are languages out there that are easy to build, have a reasonable std lib, and don't offload the complexity of the world onto the programmer.


> You are comparing Go to Python, JS, and C++, arguably the three most complex languages to build.

No, I'm comparing to more than a dozen different languages that I've used commercially. And there were direct references there to Perl, Java, Pascal, procedural SQL, and many, many others too.

> There are languages out there that are easy to build, have a reasonable std lib

Sure. And the existence of them doesn't mean Go isn't also simple.

> and don't offload the complexity of the world onto the programmer.

I disagree. Every language makes tradeoffs, and those tradeoffs always end up being complexities that the programmer has to negotiate. This is something I've seen, without exception, in my 40 years of language agnosticism and part-time language designer.


> because it’s not actually simple

Cue Rich Hickey's Simple made Easy: https://www.youtube-nocookie.com/embed/SxdOUGdseq4 / https://ghostarchive.org/varchive/SxdOUGdseq4


How often are you writing non-trivial data structures?


I love the euphemistic thinking. “We built something that legitimately doesn’t do the thing that we advertise, but when it doesn’t do it we shall deem that hallucination.”


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

Search: