HackerTrans
トップ新着トレンドコメント過去質問紹介求人

daltonpinto

no profile record

投稿

Show HN: Simple mathematic syntactic sugars for Ruby

github.com
2 ポイント·投稿者 daltonpinto·2 年前·0 コメント

コメント

daltonpinto
·2 年前·議論
It is not about speed, is about quality.

When I met the other 2 blind people, one of them joked that yes, they were very organized, but because they had to be, unlike us, being not organized wasn't an option for them.

I don't question the ability you may have to deliver quicker results, but I bet that your incentive to organize stuff is smaller than what your friend has.

Maybe he will be more inclined to refactor that than you and take even more time, and that maybe it pays off. Of course, I have no idea of your deadlines or if you are in a rush for MVP in search of market fit.

But this also follows those lines of: "wanna go fast go alone, wanna go further go together".

I value more quality than speed, but also understand that sometimes speed is what is needed.
daltonpinto
·2 年前·議論
Exactly!

Not because it is split it means that was well split.

If you can reason where something should be, it may be badly organized.

Even single file projects can be organized.

If is small enough and makes sense, why not?

But even in a small file, how is it organized? Utility functions maybe at bottom so you keep business logic together and visible? Maybe some other logic to make it cleaner? The way functions are named follow some convention? What about variables?

I once read one opinion that software developers had more in common to artists and writers than engineers. Writing code is like an art of expressing yourself well to your peers in a way that a computer will also execute what you meant, not the opposite.

The computer can understand whatever entangled mess you write, other people (which may include your future self) may not.
daltonpinto
·2 年前·議論
Of course that are good things and maybe I wrote in a too much harsh way.

Linting features and autocompletes are nice, also autocomplete features are nice to have.

The issue that I pointed mostly resonates with the idea that depending on LSP is the big issue.

I personally use Neovim with minimal stuff, I run lint and tests manually and not automatically, because it feels to me like push notifications taking my attention elsewhere, so I go to fix them later after what my intention is already expressed in code.

But agree and dyisagree that "Keeping the code organized is still good advice, but has nothing to do with using an IDE.". It should not be based on IDE, but an IDE on the hands of an inexperienced dev may lead to some comfort that should not be there.

I reviewed many code written by junior people, and very often I see people adding code in random places that later may let the application to be hard to follow and everything "seems fine" to them.

Other smell is like, but "it is so easy to rename a variables with my IDE" even though I believe that refactoring is nice to be done, but if we keep changing names so often, why don't we read the code that is being edited to understand well its intention and maybe realized that a big chunk of code should be split and the name choice will be completely distinct once proper refactor is made.

My point is not about avoid automation, is about having a dependency on that because the code is not manageable to people anymore, but manageable by automation mostly.
daltonpinto
·2 年前·議論
Not only learned, but it changes with time.

When reviewing code, the reviewer responsability is not only to make sure that it works, otherwise tests and its coverage would be enough, but they aren't.

If a reviewer sees that something does not fit with the convention that the team agreed, it should be questioned and also teached or discussed (if some new addition force the team to do so).

You don't need to know all the code base by heart, but how to follow it and place it.

Something like, does your team uses DDD? Where code that interacts with database should be? And how? How your templates are done? Do you use presenters? When? How? Any other patterns?
daltonpinto
·2 年前·議論
When I mean organized it means having a structure that segrates responsabilities.

It could be applying DDD or some other pattern with that makes sense to the team.

If you are using a framework like Rails, learn well its conventions, follow them and change what your team likes and made it clear to all team members.

Also learn well SOLID principles and OO (of functional programming, or whatever you are using) and make it obvious that your code fits well your choices.

In other words, if some file (class, template, whatever) should have a single responsability, and by that, it should be obvious where that will be placed.

It has more than one responsability? How you can split it? And once it is splitted, it should be obvious where it should belong as well.
daltonpinto
·2 年前·議論
This question reminds me of the first time I met a blind programmer.

I asked him how he managed to code, and he replied with something that stayed with me: a good programmer should organize software in such a way that every piece of code has a clear and logical place. The organization should be so intuitive that anyone could build a mental model of the structure and navigate it easily, even without seeing it.

It felt like something out of a Yoda or Mr. Miyagi lesson. Skeptical, I asked his colleagues if he was truly able to code or if he was just exaggerating. To my surprise, they told me not only was he capable, but he was the best programmer they had ever worked with. They said no one else came close to writing code as organized as his.

That conversation changed my perspective. Ever since, whenever I’m unsure where to place new code, I don’t think about DDD or any specific methodology. Instead, I try to follow the logic and structure of the project in a way that feels natural and easy to follow later.

Later in life, I met two other blind programmers and heard similar stories about their ability to produce well-organized code.

To bring this back to the original question: I view LSP/IDE features the same way those programmers view "visual aids." Code should be organized according to a clear and logical structure that makes it easy to navigate.

Relying on features like Ctrl+Click to find where things are located worries me. Why? Because it can mask structural flaws in the codebase. If we can't intuitively figure out where something belongs, that’s a sign the codebase lacks structure—and that should motivate us to refactor it.

Not only do I avoid using LSP features, but I’m also opposed to their use. While they can help with navigation, they may prevent developers from experiencing and addressing the underlying structural issues in their code.