Hacker News new | past | comments | ask | show | jobs | submit login

It's unclear to me what the author is criticizing. If the argument is that putting form over function is bad, where form is more important than the thing actually working, then I agree with the post. And that's what happened in the example, the rewrites all turned out not to work. Replacing working code with broken code is never good.

If the argument that form is irrelevant as long as everything works, well then I disagree entirely.

Just working doesn't mean it's good enough, and really the big reveal in the post is completely beside the point because all those rewrites did not work but that's not what the author is criticizing.

Code has to be maintainable, it needs to be readable, and that matters.

Also it's pretty much cliché at this point to trot out the straw-man turns everything into a verbose classes programmer. I've never seen anyone turn a simple one line function into 3 files of classes with tons of unnecessary methods ever in my career. In Java you do create classes for a single function sometimes, but that's because you have to.




> It's unclear to me what the author is criticizing.

The author isn't criticizing so much as observing. From TFA:

The post is not about the Agnostic or his code, it’s about the dynamic of programmers eager to rewrite code in their own image, and the hypothesis that our (I am equally guilty of this behaviour) motivation for doing so is to emphasize the small differences between ourselves and others.


Aren't you the author?

I love how people missing the point actually reinforces the point. Well done.


I was the author. Now I'm a guy who wonders if those are my memories, or Tyrell's niece's memories ;-)


I've had the experience of violently agreeing with a comment I found on the web, only to find I wrote it years ago and had forgotten about it. Strange days.


I've had the experience of disagreeing with a comment I found on the web, only to realize that I wrote it years ago and had forgotten about it. I'm not sure if that's better or worse.


...a mournful discovery. Those who agree with you are insane. Those who do not are in power.


1. I think you complicated your point by having the Agnostic write some code without any context as to why it exists and confusing 3 other developers.

2. I think you complicated your point by having the other programmers rewrite it incorrectly.


The more complicated I/we make/made this discussion, the more obvious it seems to me that having programmers who talk to each other is simpler than trying to make up and/or enforce rules to obviate the need for talking to one another.


It almost sounds like you are advocating a style of code ownership where programmers shouldn't make changes to other's code without talking to them.

I realize the context of your article requires a coding example that is somewhat trivial to understand and pick apart by developers who have a "better way", but I also think it's a copout to claim that the programmers in your example are just refactoring code for the fun of it.

A lot of people are rightly fixating on the formatting "feature" of not padding 2-digit zip codes. If I was on that project I could easily see myself wanting to reuse the zip-code formatter and running into an issue where my use case requires the 2-digit zip codes to get padded.

On most projects a zip-code formatter shouldn't be such a big deal that it requires a meeting between programmers. If the original zip-code formatter had bizarro requirements then they should be made more explicit.

For some reason the article avoids the biggest mistake in the whole process. Why did the other programmers make changes without ensuring the test cases passed?


> It almost sounds like you are advocating a style of code ownership where programmers shouldn't make changes to other's code without talking to them.

Sure, we could say there should be more tests, or people should run them. We can say there should be issues filed before you refactor things. We can try to introduce all sorts of processes for avoiding mistakes. And we'd be right.

But it's also nice to talk to a human, even if just casually. I don't want to say "shouldn't X without Y" because then "shouldn't make changes to other's code without talking to them" is much the same thing as "shouldn't make changes without running existing tests" and "shouldn't check changes in without submitting tests that the code fixes."

Shoulds and shouldn'ts should always be secondary to talking.


> It almost sounds like you are advocating a style of code ownership where programmers shouldn't make changes to other's code without talking to them.

Talking to the person who wrote the code you want to change is always a good idea. It's not always possible (because the original coder has left the company or something), but if you have the opportunity, use it. You'll learn something.

I do this all the time. Sometimes the answer is: "You're probably right. Change it." and sometimes it's "It's like that because of good reasons X and Y, and we also use this in another project that needs it to do Z." This understanding is very valuable, and can save you a lot of time.


And the really great thing that happens is when someone says, "Yeah, that code is an ugly hack, and please fix it up, but don't forget good reasons X and Y and Z." Then you get to make it batter without regressing, add the proper tests, and document everything properly, all because you spoke to someone first. :-)


When programmers are working together, like most things in life, it isn't really about the finer details, it is about people trusting each other.

There are layers of trust.

At a fundamental level I trust that my compiler works. I trust that the the standard library is going to work as expected.

At a higher level, up in userland, I trust that libraries or modules that are used in a lot of places or that were written by respected members of the community. If I don't know them I can look at other things, like tests, demos, and documentation.

Only when there is no other information, when you don't know of the person or their work, when you see no tests and no documentation, will you need to actually go in and look at the code.

I take two things away from this.

One is that in organizations where this is happening there are fundamental problems with co-developer trust.

The other is that monolithic code bases where an organization owns the code rather than individual authors owning the code can lead to an atmosphere where no one and everyone feel that they have the say over specific implementation details.

We can design systems and workflows that can implement and support developers trusting one another. If a team is building a system, components could be authored and published under individual author ownership, and then stitched together by the team to build a product.

Of course this is fundamentally a transcendent problem. The issues aren't with the details of the system, the issues are outside of the system and with how the PEOPLE relate to one another.


This is very true. I think it's also probably true that it gets harder to trust code as you get closer to the coalface, much the same way as when collaboratively working on a document, one may become frustrated by another person's grammar or style - yet a third party reading the document would not be able to tell the difference. This I suspect also applies to chefs, plumbers, architects, and many other professions.


> It's unclear to me what the author is criticizing.

I think he is criticizing the desire of people to force their ways of programming on others.


When people are forcing their ways of programming on others becomes a problem it's because of a lack of clear guidelines for the project.

Code shouldn't be littered with half a dozen ways to do the same thing. It reduces maintainability and readability.

Use a consensus or a person in charge to pick a way to do something that can be done many ways, and then always do it that way, and yes force people to program that way for the sake of the project.

Some people, sometimes very skilled and extremely intelligent people, are just entirely process adverse, seeing it as needless as long as everything works. Yes working code is important, but being part of a team, and working with the team is pretty important. Maybe you don't need the process, maybe you can read code like Mozart writes music but others can't. But maybe think of your team sometimes who have to follow in your footsteps.


The author is not criticizing or championing anything. He's just being descriptive. He attaches to his description a reference to the psychological theory that similar people have an innate need to preserve a degree of individuality. This applies to tribes, romantic partners, and software development teams.

While one may or may not agree with Freud, the article is at least food for thought. Presenting software conflicts in this way asks us to acknowledge our instinctual psychological motives and question our claims of objectivity, technical soundness and pure logic. This kind of in-fighting serves only the individual and not the team.

Personally, I think there is great value in having a plurality of ideas and voices, but in a commercial setting, they must ultimately serve the team. This creates tension because individuals must be able to restrain their impulses.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: