I also use Go, and haven't had issues with the autoformatter there, but I believe that's mostly because there is little to no room for ambiguity around intent. You tell the compiler you want to return a Bool, and if you don't it's a compile time error. There's no "I dunno, maybe nil was an intended return value".
> Every time I'm tempted to override one of these links/formats because I feel like my way is better I like to remind myself that it's going to set a precedent for the other devs on the project
I think this misses the point somewhat. This isn't about changing the defaults of Rubocop, it's about not having some of those defaults in the first place for the places in Ruby where it's possible to express intent in a way that it's not possible to check with a linter.
> That's the thing though: consistency is somewhat objective (and enforceable), readability and maintainability not so much.
I'm still not saying that people should not use linters, just because you can lint something doesn't mean you have to lint everything.
> TFA is a good example of this: they argue that explicitly returning "nil" is more readable and better communicates intent but I suspect (once again, not being a Ruby coder myself) that other experienced Rubyists could respond that everybody knows that a method finishing without an explicit value ends up returning nil, and that adding explicit code to do is is just clutter and distracts from the important things.
Oh, absolutely, most Ruby programmers do know this, but it's not really about the code specifically I think, it's about the contract. Take this code:
def foo
@some_instance_var = 123
end
It turns out that: > a = foo
=> 123
> a
=> 123
but you've not actually said that the return value is intended, or a side effect. You've not telegraphed the intent to the consumer of this tiny little API. It looks like returning a is merely something that happens to happen. this leads to uncertainty, guessing and possibly bugs. Take this addition later on: def foo
@some_instance_var = 123
@some_other_instance_var = 456
end
If someone was (perhapy mistakenly) relying in the return value of foo to be the result of the assignment to @some_instance_var they now likely have a bug. Hopefully tests caught it, but they might not have.We could fix this with (amongst other things):
def foo
return @some_instance_var = 123
end
We now know two things.1. If we are changing this method we need to respect the return
2. If we are consuming this method we know the return is deliberate
This unfortunately violates Rubocop's redundant return detection and will be rejected (as will other forms).
Ruby is a tool that I use the way I want, not the other way round
Or do you think industrializing a design is not valuable ?
[0] https://twitter.com/NAK3DDesigns/status/1303470020450750472
https://twitter.com/RealSexyCyborg/status/130099753348578508...
In parallel, I was building my first side project, or more precisely I was starting to add pricing for the first time to a side project
As a result I had, at the same time, a stream of several thousands of euros, and MY FIRST 19€ from something I BUILT MYSELF
I was incredibly more proud of the latter. There is a sense of pride, of accomplishment, in thinking that you've built something useful enough for someone to open their wallet for you
Good job on your part and keep sailing!
If your resources don't scale with usage, yes, you have a problem, but I'd say not limited to algolia
Algolia looked like shit when it started. There was none of this shine and polish. IIRC it was some text styled with Bootstrap 2. Or might have been 1.
Stripe also looked like shit when it started. No shine or polish, no developer website based developer experience to speak of, no world leading 60fps animations, no fantastically versioned docs, nothing.
Build something people want / something that solves a hard problem and makes people powerful and more enabled. Companies that do this can afford to build fantastic developer experiences after 10 years of doing it, but companies that try hard to build excellent developer experiences will not necessarily be successful.
I was a very inexperienced developer with tutorial-level experience of Rails, and I learned javascript from Algolia client tutorial. I have a 50-emails support thread with their CEO and CTO when they were doing YC.
This level of patience and care at onboarding a new dev was incredible and I always rooted for them. I came to know them better a few years later (small world) and they are absolutely adorable, very down to earth and modest despite their tremendous growth
But one thing has not changed : when you implement Algolia in a project, it feels like magic. The speed + convenience combo is unbeatable
So what is the difference between these three chart patterns then? [0] [1] [2]
[0] https://coinmarketcap.com/currencies/iron-titanium-token/
[1] https://coinmarketcap.com/currencies/defi100/
[2] https://coinmarketcap.com/currencies/dogelon/