this post was submitted on 08 Sep 2023
165 points (99.4% liked)

Explain Like I'm Five

15771 readers
6 users here now

Simplifying Complexity, One Answer at a Time!

Rules

  1. Be respectful and inclusive.
  2. No harassment, hate speech, or trolling.
  3. Engage in constructive discussions.
  4. Share relevant content.
  5. Follow guidelines and moderators' instructions.
  6. Use appropriate language and tone.
  7. Report violations.
  8. Foster a continuous learning environment.

founded 2 years ago
MODERATORS
 

Do they get some kind of real-time feed that tells them "hey this URL popped up in the web today, but it is a tracker, so block it", or is this exercise is mostly helped by the crowd ?

all 30 comments
sorted by: hot top controversial new old
[–] [email protected] 152 points 2 years ago (1 children)
[–] [email protected] 35 points 2 years ago
[–] [email protected] 75 points 2 years ago (4 children)

Regular expression magic.

A lot of ad networks have a pattern to the name or the window the advert appears in.

Using regular expression you can find just the adwindow and ignore the actual content.

Now what is regular expression? A wizard language.
ask any programmer about RE after 4 beers and watch the hate wash over their face.

[–] [email protected] 37 points 2 years ago (3 children)

I love regex, I'm not even gonna lie. To be fair, my expressions haven't been 50+ characters long, but still.

[–] [email protected] 19 points 2 years ago (1 children)

Regex absolutely has many great uses. The issue is people trying to use for things they shouldn't. Then it suddenly becomes a nightmare.

[–] [email protected] 10 points 2 years ago (1 children)

Can I parse [X]HTML with regex?

[–] [email protected] 8 points 2 years ago (1 children)

You can parse any plaintext with regex, but I would recommend using XPath for that use case, instead.

[–] [email protected] 11 points 2 years ago

Same, I've never understood the hate. But then again I memorize based off of patterns and regex in my brain is just a pattern.

[–] [email protected] 8 points 2 years ago (1 children)

I used to play regex games online lol. I once wrote a pattern for work that was ~200 characters. I loved doing it lol.

[–] [email protected] 2 points 2 years ago

Seems like an interesting way to learn. Do you remember any of them?

[–] [email protected] 11 points 2 years ago

Zawinski’s second law - “Sometimes a person looks at a problem and says ‘I know what I’ll do, I’ll use regular expressions’. And now they have two problems.”

[–] [email protected] 3 points 2 years ago (1 children)

Decade of c# game design under my belt, but never dealt with web scripting. Am I missing out?

[–] [email protected] 5 points 2 years ago

You are missing out on headaches.

[–] [email protected] 46 points 2 years ago

Nerds. Hundreds and hundreds of them.

[–] [email protected] 24 points 2 years ago (2 children)

I thought they could just tell by the code if they had a pop up or not and they just have to stay updated on how they keep changing the way they're presented. I could be wrong though.

[–] [email protected] 1 points 2 years ago (1 children)

The problem with this approach is that the companies will just change the way ads are shown. DNS blocking is impossible to stop, provides you block every ad website.

[–] [email protected] 11 points 2 years ago* (last edited 2 years ago) (1 children)

DNS blocking is easy to stop, you just host the ads on the same domain instead of putting them on a subdomain. There are plenty of ways to do this already. Only reason it works right now is that lots of them have their own separate ad domain that they host from.

[–] [email protected] 2 points 2 years ago

I hate Amazon for this, and won’t use their apps or pages if I can avoid it (including the amazingly brief foray into the Amazon App Store years ago which only served ads from Amazon domains)

Because so much of the world runs off Amazon I really can’t block that domain effectively without breaking large portions of the internet. Tho now that I’m not using Amazon actively for anything, the broken-ness might be fine. Guess we’ll find out!

[–] [email protected] 15 points 2 years ago

As someone who runs a popular blocklist collection, I've come to find that most of the MASSIVE lists are people who collate a whole bunch of lists together and then promote their "one size fits all" solution alongside their donation link. There are very few original high quality ad-blocking lists maintained (where originality is defined as a sizeable amount of unique entries not shared by other lists) and almost all don't appear to openly discuss the magic sauce behind their lists, outside of the obvious case of user submissions.

[–] [email protected] 8 points 2 years ago

The easy way would be to make a website sign up for all the ads and see what happens. Subtract your website from the data and there's the ads.

[–] [email protected] -5 points 2 years ago

The real answer will probably end up being that they ARE the ad companies in disguise.