Hacker News new | past | comments | ask | show | jobs | submit | arximboldi's comments login

Interesting. This is a problem with the english language, where verbs and adjectives are often the same. It would not happen in Spanish, where "Abrir" (Infinitive) is different than "Abierto" (adjective).

I guess this could be avoided by using "Do open" or "Is open". Would this sound off to a native speaker?


The immutable data-structures library Immer provides such type:

https://sinusoid.es/immer/containers.html#box


The post peaks with this example is this one:

  bool usersHairColorMatchesThisMonthsAdsColour = _user.hair == HairColour::Red;
  bool userFeetSizeFitsInShoe = _user.feetSize <= _requestedShoe.size;
  bool shoePriceFitsInUserBudget = _requestedShoe.price <= BudgetHelpers::Calculator(_user);

  bool shoeIsProbablyOkayForUser = usersHairColorMatchesThisMonthsAdsColour && userFeetSizeFitsInShoe && shoePriceFitsInUserBudget;

  if(shoeIsProbablyOkayForUser)
That they compare, with the "uglier":

  // this months ad campaign color is red 
  if(_user.hair == HairColor::Red && _user.feetSize <= _requestedShoe.size && _requestedShoe.price <= BudgetHelpers::Calculator(_user))   
I very much prefer the latter, I'm sorry (except it needs some new lines, of course). It performs better (that `BudgetHelper::Calculator` doesn't look very cheap ;) but crucially it is, to me personally, more "readable". First, I find a comment easier to read than a variable name, particularly when you use the not so readable dromedaryCaseToCrambleWordsInLongSentences. Thus, a variable adds no value when it's only used once (arguably, it adds more noise, since one has to go twice through the same text). And it is often debatable how a programmers poor translation of code into English adds any value: in fact, I find `_user.feetSize <= _requestedShoe.size` to be way more succint, precise and easier to parse than `userFeetSizeFitsInShoe`.

We really need to get over this school of thought that "the more wordy your variables the more readable" because it is simply not true. You don't have to go all the other way to the other end and write code using greek letters like in math. Meet somewhere in the middle, be aware of context and use the tools of the language (e.g. lexical scoping) to your power.

Unlike many of these bloggers want us to believe, you can't just boil "readability" down to some simple universal rules, and only experience makes the master. Taste, preference, purpose and context take a big part. As such, I find it useless to talk about "readable" code: readable for who? A law text, a maths paper, a school maths book, a user manual, a tutorial, a novel, a HN comment... they may all be written in English and with great skill in consideration for their "readability" by their target audiences, yet manifest completely different styles even when discussing the same topics.

For me, I like my code like I often enjoy most good writting: succint and precise. Wordy variables that add no value or abstraction are of little use to me.


I find that people want to find a name for some condition or computed result so they can box away a concept and use it without thinking about it anymore. That's great when you're writing software and you have lots of time to consider and remember your names, but not always so great when you revisit software and now you need to actually _know what those things are and whether they are logically correct_. Sometimes even the best name isn't enough to describe what it is you have in your hands right now, and instead of seeing it where it's used, you have to go find where it was originally defined, and you potentially have to repeat this process for several named objects at once, keeping them all in your head. IMO you need a better reason to name something than the example from the article, or you actually sacrifice clarity and readability.


I tend to prefer the method of defining clearly named variables, but I agree those names are ridiculous.

    hair_col_matches && size_fits && in_budget
is less than half the length and imho more readable because it doesn't turn each variable intoNeedlesslyWordyCamelCaseSentences.

> you can't just boil "readability" down to some simple universal rules

Yes, in the end blindly following rules doesn't turn out as well as understanding why those best practices exist in the first place.



I did run my own server with properly setup DKIM and SPF and all. Gmail and Hotmail would still mark my emails as spam whenever they felt like it. Sometimes, even for emails that were a reply to an email coming from their own servers. I almost lost a client because of that once. Maybe it was because of the IP range (I was in a cheap Scaleway server)?

At some point I just accepted reality and paid for a third party email server (Runbox) but the situation with the monopoly of these giants marking as spam anything they don't manage made just really sad.


HN often talks about running your own email server like it's this wonderful example of a decentralized service that anybody can take part in. That's kind of true, but there's this whole other aspect that gets ignored.

Email is not this wonderful, democratic system of equals. Email is more like a school playground where a handful of enormous bullies control everything. You either learn to work with them, cater to their demands, or you'll never be able to visit large sections of the playground.

Gmail is relatively easy to appease, mostly just configuring your nameservers and email headers to Google's standards, then slowly building "reputation". Hotmail will block an entire domain (IP?) randomly every few years, then you fill out one of their infamous forms and pray they unblock you quickly. Yahoo (technically Verizon now) is even more difficult to work with, they block you out of nowhere and I've never figured out how to appeal. Seems like they do some kind of ratelimiting for smaller email servers, I don't know if it's some kind of punishment or just by default.

Then there's the dozen other major email providers. Some easy to work with, others not so much.


> Gmail is relatively easy to appease, mostly just configuring your nameservers and email headers to Google's standards,...

Do you mean SPF, DKIM and DMARC or something else? I will check the records again, just in case, but afaik they are perfect and Gmail still often classifies my mail as spam. It is annoying as hell (and your comparison to playground bullies is very apt).


SPF, DKIM and DMARC, but there's other factors as well. Gmail will usually tell you exactly why something was flagged spam. If you go to "Show Original" SPF, DKIM and DMARC should all show "PASS" if everything is configured correctly.


Hmm, not always. I've just setup my own mail server, I PASS SPF, DMARC and DKIM according to Gmail headers and yet my email is still classified as spam, as determined by "Gmail magic". I believe this is because the domain is relatively new and Gmail treats you as guilty until you prove your innocence (ie. Enough people mark my emails as not spam)


Try adding an IPv6 address. Got the tip here on HN.


Interesting, didn't know that as I don't use gmail myself. Thank you!


"Gmail and Hotmail would still mark my emails as spam whenever they felt like it. Sometimes, even for emails that were a reply to an email coming from their own servers. I almost lost a client because of that once. Maybe it was because of the IP range (I was in a cheap Scaleway server)?"

Like you, I have properly set up DKIM and SPF and blah blah.

I also have a 12 year "clean" IP from he.net.

Sometimes gmail will mark something I send as spam that is, like yours, a reply to their user and is a recipient that I have a years long history of corresponding with.

That's frustrating but what really makes me angry is that there is no indication given that this occurs. Why can't google send a proper bounce or warning message ... or even an error code that I could at least see in my logs ?

In the arms race between spammers and (providers) are error indications exploited in some way ?

Or is google just being lazy ?


That's so frustrating. The biggest AI company in the world and their anti-spam system is so stupid? Really lowers your expectations on state of the art tech.


They're not stupid. It's part of a sophisticated long-term strategy. They deliberately make things complicated to maintain so that you give up and use their services. This strategy is working. Many small and mid-sized businesses today gave up on email maintenance altogether and outsourced it to either Google or Microsoft. Many individuals end up using Gmail, because it seems more "reliable" now that so many other people are on Gmail.


I have a similar impression from dealing with deliverability issues.

Relevant providers usually just require a few days of sending legit mail and occasionally asking to be unblocked, but there seems to be no chance getting into the inbox on GMail and Outlook with a "too low" sending volume.

If it wasn't for regulations, I would have already given up and switched to GMail.


From my cold, dead hands ...


> I did run my own server with properly setup DKIM and SPF and all

Ah. But the million dollar question is WHERE did you run that server?

If you ran it off your home connection then there's your problem.

Pretty much everyone on the receiving end (ISPs, corporates etc.) will either block or assign a low reputation to home ISP IP ranges.

So basically you can do all the DKIM and SPF you like on your home MX server, but you're going to have the high hurdle of your untrustworthy IP range to fix first !

EDIT: Just saw you said "cheap Scaleway" ... well that's a similar sort of problem. Perceived "spammer friendly" hosts tend to be assigned a low rep in spam scanning. You won't be auto-blocked like residential IPs are, just a low rep set. (for any lawyers reading, I am NOT making any comment on Scaleway here, I am speaking in general terms !)


I have one domain that uses Google's G suite. But sometimes when I send mail from this domain to a gmail address it gets marked as spam. It doesn't leave Google's network or cloud of servers, but they flag it.

It's not a very good system.


I was very disappointed with this book. To be fair, I haven't even finish it.

I was expecting something philosophical, this is, something that actually connect the philosophy and software design disciplines. Outside of the title however, there is no philosophy in this book. Just general typical practical "good practice" tips of the kind you find in blog posts, without much empirical nor philosophical discussion for them.


It seems strange to assume anything truly "philosophical" when the main topic of the book is something as practical as software engineering/design.

Even if he did try to shoehorn a few bits of metaphysics in, most of the book would've had to lean more on the practical side of the domain.


Yes. Motion blur is temporal interpolation, this is, it's a way of representing what happens "in between frames". The shorter the time between frames, the more subtle the effects of interpolation (like the higher the resolution of an image, the less blurry it becomes in between pixels).


I agree with you.

When I got into Nix and Guix I tried both and I leaned towards Guix because "it's scheme" but ended up sticking to Nix because of maturity, Darwing support and it being way more performant.

In the end I realized that I actually prefer Nix as a language. I like that it's a very simple and limited language, with, for example, no way of performing side-effects. It is tailored towards it's purpose and, while not perfect, it does the job well.

As other point out, Nixpkgs and the Nix toolchain in general just uses very weird names for everything, plus the docs. That's the difficult bit. It's slightly improving over time.


How did you do that? I'm interested...



Yes! I find it so ironic, in a country that prides itself for it's stance for "privacy", that random predatory lawyers can just get from ISP's the personal details behind any IP address on the basis of potential IP infringement. It is really infuriating...


They need to go and get a court order, and with that they request the personal data from the respective ISP. The whole process is pretty steamlined and partly automated though.

Source: have been through many copyright claims and currently have a supreme court lawsuit pending.


Many claims by copyright predators go through the courts in Munich and Koeln which seem to rubberstamp every case. Cunts from Waldorf Frommer being among the most notorius. If only the healthcare, local administration and other services in Germany were working so seamlessly...


Yep, Waldorf Frommer, and District Court Koeln, fond memories :)


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

Search: