Live data from Hacker News

Mining my mailbox for top email service providers

obem.be

41–50 of 110 posts

Re: Mining my mailbox for top email service providers

#41
post #23

I must admit that I was a bit shocked when I realized that the author had used javascript for this task. At first I assumed that he was scripting some webmail interface but then I saw that he was using 'emailjs-imap-client'. I understand that people use what they're familiar with and there seems to be a vibrant ecosystem for JS outside of the browser but it'll never not be weird seeing it take over what would once ha…

who cares, it's just a 100-line long script that probably won't be maintained or used anymore

Temporary code is permanent code in many, many cases.

Re: Mining my mailbox for top email service providers

#42
post #27

Earlier quoted context omitted.

Modern JavaScript/TypeScript is fine. Especially when compared to Perl, of all languages.

I disagree. JavaScript is one of those languages who's default failure mode seems to be to pretend everything worked and just produce nonsensical results.

You're thinking of PHP. Modern Javascript has good error handling and is a pretty nice language to use.

Re: Mining my mailbox for top email service providers

#43
[Nitpick] Instead of this:

    ;(async function () {
      try {
        // All your code
      } catch (e) {
        console.log(e)
      }
    })()
Just do this:

    ;(async function () {
      // All your code
    })().catch(console.error)
Overuse of try/catch is probably the #1 mistake I see when people use async/await.

Re: Mining my mailbox for top email service providers

#46
post #27

Earlier quoted context omitted.

Modern JavaScript/TypeScript is fine. Especially when compared to Perl, of all languages.

I disagree. JavaScript is one of those languages who's default failure mode seems to be to pretend everything worked and just produce nonsensical results.

As opposed to perl? :D

Re: Mining my mailbox for top email service providers

#47
post #27
post #23

I must admit that I was a bit shocked when I realized that the author had used javascript for this task. At first I assumed that he was scripting some webmail interface but then I saw that he was using 'emailjs-imap-client'. I understand that people use what they're familiar with and there seems to be a vibrant ecosystem for JS outside of the browser but it'll never not be weird seeing it take over what would once ha…

Modern JavaScript/TypeScript is fine. Especially when compared to Perl, of all languages.

Modern Perl is fine too

Re: Mining my mailbox for top email service providers

#48
post #42

Earlier quoted context omitted.

I disagree. JavaScript is one of those languages who's default failure mode seems to be to pretend everything worked and just produce nonsensical results.

You're thinking of PHP. Modern Javascript has good error handling and is a pretty nice language to use.

Modern PHP has good error handling, too.

There are differences in style and views on things from the way they were long ago that float around. These impact a lot of opinions.

Re: Mining my mailbox for top email service providers

#49

Earlier quoted context omitted.

who cares, it's just a 100-line long script that probably won't be maintained or used anymore

I'm not sure I could count the number of 100-line long throwaway scripts that I wrote that are still being used in production systems before I realized how dangerous that idea is and stopped treating any code as throwaway code. If I show my code to another human, there's a chance it will end up in production. The Pragmatic Programmer says to throw away prototypes, but in practice it always seems easier to click the m…

Reverse-survivor bias.

You aren't seeing the non-existence all the well engineered stuff you never had time to build "properly".

Re: Mining my mailbox for top email service providers

#50
post #42

Earlier quoted context omitted.

I disagree. JavaScript is one of those languages who's default failure mode seems to be to pretend everything worked and just produce nonsensical results.

You're thinking of PHP. Modern Javascript has good error handling and is a pretty nice language to use.

I know that PHP gets a lot of flak but come on. Compared to javascript PHP is a marvel. I recommend you to try it.
Post reply on HN