HNHacker News
TopNewBestAskShowJobs

sakisv

973 karma · joined September 16, 2015

https://www.sakisv.net
submissionscomments
sakisv··on Mastercard DNS error went unnoticed for years
> A record to an non-elastic IP, and the box gets rebooted

Oh mate, I've seen that happen with a company that was selling security-adjacent services, which were running on servers with just random IPs ffs

sakisv··on Is Iceland getting ready to join the EU?
I wonder how things would have played out back in the crisis of 2008 if Iceland was a member of the Eurozone:

What they would have been allowed or forced to do and whether their response could have been the same.

sakisv··on Meta fined $102M for storing passwords in plain text
Honest question: How was it discovered?

Was it reported by a pentester? (ex-)employee? Facebook itself? How do we know that it goes back to 2012?

I know in the public sector you have to disclose such things to ICO, but does that also apply to private companies? Who is going to hold them accountable?

sakisv··on Tracking supermarket prices with Playwright
Well I'm just thinking of concourse the same way it describes itself, "a continuous thing doer".

I want something that will run some code when something happens. In my case that "something" is a specific time of day. The code will spin up a server, connect it to tailscale, run the 3 scraping jobs and then tear down the server and parse the data. Then another pipeline runs that loads the data and refreshes the caches.

Of course I'm also using it for continuously deploying my app across 2 environments, or its monitoring stack, or running terraform etc.

Basically it runs everything for me so that I don't have to.

sakisv··on Tracking supermarket prices with Playwright
...or worse, if there _is_ an API call but the response is HTML instead of a json
sakisv··on Tracking supermarket prices with Playwright
Ha, you can't imagine how many times I've thought of doing just that - it's just that it's somewhat blocked by other things that need to happen before I even attempt to do it
sakisv··on Tracking supermarket prices with Playwright
Thanks!

> I have found that it is best to split the task of scraping and parsing into separate processes. By saving the raw JSON or HTML, you can always go back and apply fixes to your parser.

Yes, that's exactly what I've been doing and it saved me more times than I'd care to admit!

sakisv··on Tracking supermarket prices with Playwright
Haha all we have to do is agree on the format, right?
sakisv··on Tracking supermarket prices with Playwright
When you click on a product you get its full price history by default.

I did consider adding a 3 and 6 month button, but for some reason I decided against it, don't remember why. It wasn't performance because I'm heavily caching everything so it wouldn't have made a difference. Maybe aesthetics?

sakisv··on Tracking supermarket prices with Playwright
The few random checks that I did on a few products as I was shopping didn't show any difference.

Either I was lucky or they don't bother, who knows

sakisv··on Tracking supermarket prices with Playwright
Thanks for your kind words!

I haven't thought about monetizing it, because honestly I don't really see anything about it to be monetized in its current form.

sakisv··on Tracking supermarket prices with Playwright
Thankfully I'm not there yet.

Since this is just a side project, if it starts demanding too much of my time too often I'll just stop it and open both the code and the data.

BTW, how could the network request not appear in the network tab?

For me the hardest part is to correlate and compare products across supermarkets

sakisv··on Tracking supermarket prices with Playwright
Yeah I thought about that, but I've seen cases that a product jumped more than 100%.

I used this kind of heuristic to check if a scrape was successful by checking that the amount of products scraped today is within ~10% of the average of the last 7 days or so

sakisv··on Tracking supermarket prices with Playwright
I do track the price per unit (kg, lt, etc) and I was a bit on the fence on whether I should show and graph that number instead of the price that someone would pay at the checkout, but I opted for the latter to keep it more "familiar" with the prices people see.

Having said that, that's definitely something that I could add and it would show when the shrinkflation occured if any.

sakisv··on Tracking supermarket prices with Playwright
Initially that's what I wanted to do, but the first supermarket I did is sending back HTML rendered on the server side, so I abandonded this approach for the sake of "consistency".

Lately I've been thinking to bite the bullet and Just Do It, but since it's working I'm a bit reluctant to touch it.

sakisv··on Tracking supermarket prices with Playwright
I gave it a very quick try with chatgpt, but wasn't very impressed from the results.

Granted it was around January, and things may have progressed...

(Βut then again why take the easy approach when Ι can waste a few afternoons playing around with string comparisons)

sakisv··on Tracking supermarket prices with Playwright
Thanks!
sakisv··on Tracking supermarket prices with Playwright
Ah yes.

My approach so far has been to first extract the brand names (which are also not written the same way for some fcking reason!), update the strings, and then compare the remaining.

If they have a high similarity (e.g. >95%) then they could be automatically merged, and then anything between 75%-95% can be reviewed manually.

sakisv··on Tracking supermarket prices with Playwright
Oh nice!

A thorny problem in my case is that the same item is named in 3 different ways between the 3 supermarkets which makes it very hard and annoying to do a proper comparison.

Did you have a similar problem?

sakisv··on Tracking supermarket prices with Playwright
Thanks!

If Greece's case is anything to go by, I doubt they'd ever accept that as it may bring to light some... questionable practices.

At some point I need to deduplicate the products and plot the prices across all 3 supermarkets on the same graph as I suspect it will show some interesting trends.

sakisv··on Tracking supermarket prices with Playwright
When I first started it there was a couple of instances that my IP was blocked - despite being a residential IP behind CGNAT.

I then started randomising every aspect of the scraping process that I could: The order that I visited the links, the sleep duration between almost every action, etc.

As long as they don't implement a strict fingerprinting technique, that seems to be enough for now

sakisv··on Google now defaults to not indexing your content
I know that Google has extremely talented people tackling these kind of things, and with vastly more experience than I, but I can't help to think that the problem is that we as users have extremely diverse needs and use cases, which is impossible to satisfy them all.

It's even more impossible to satisfy them in a way that's also useful for Google's own business model.

The most obvious and potentially naive way of doing that would be to allow end users to upvote or downvote search results. I know that Google already does that in an automated way to some extend, but the problem is that that signal is then used to determine the quality across all the users which, as I mentioned in the beginning, is impossible to get right.

Instead that metric should only affect each user's own search results and not everyone else's. This could improve the quality of the results, bring more people back, and eventually increase the revenue. It would also help prevent "gaming" the system.

What am I missing here? I can't believe that they're not aware of that. I also can't believe that they don't want to fix it or that they're so focused on ai that internal politics don't allow them to do anything else. So what gives?

sakisv··on Zed Editor automatically downloads binaries and NPM packages without consent
Hi Antonio, thanks for Zed, love it.

If I may offer a small piece of feedback based on your comment here:

Apart from its speed, the single thing I loved about Zed and made it stand out from the likes of vscode, was the built-in language support.

This made for a great first time experience where I didn't have to search and download anything and everything was working out of the box.

In fact it was so good an experience, that when I had to download another thing for terraform support, it struck me as much more annoying than usually

Reading that your plan is to move in the exact opposite direction is disappointing and, I'm sorry to say, I hope it doesn't come to pass.

sakisv··on Cloudflare automatically fixes Polyfill.io for free sites
While I appreciate their intention and their transparency on what they're doing, I'll echo other comments here in that I, too, feel a bit uneasy that a 3rd party is rewriting my content.

The good news is that a (strict) CSP can help with that - and they do mention it in their blog post that they don't rewrite anything if there's a CSP header.

It's also worth noting that a (strict) CSP also prevents them from injecting their analytics JS from being injected to your site.

sakisv··on Chat Control Must Be Stopped – Now
I think this sums it up pretty nicely. It's a failed state with corrupt people at the top of the government.

The parliament, i.e. the majority, i.e. these people, are also the ones who appoint the judges of the top courts of the country, which all but ensures their immunity.

Their immunity is also enshrined in the consistution[4, article 86] - only the parliament can take an MP to the courts, but guess who controls the majority

Also, they are in the pockets of the local oligarchic mafia [1]: A few families that control the vast majority of the media AND the big construction companies AND the energy companies. They are also the ones that own big part of the shipping industry in Greece. For their sake, back in 2022 when the EU was considering to ban oil shipments from Russia, Greece vetoed that [2]

Oh, and just to be safe, the oligarch's tax exemptions are written in the constitution[4, article 107]

So, the people in the government have an almost complete immunity from everything, which makes them extremely arrogant.

If you add to that mix the total disregard of public services, even hospitals during the pandemic, you get a very beautiful-to-look-but-terrible-to-live-in failed state.

A state that even the EU can no longer turn a blind eye on[5]

[1]: https://newrepublic.com/article/159252/noor-one-vampire-ship...

[2]: https://foreignpolicy.com/2022/11/23/how-greek-companies-and...

[3]: https://rsf.org/en/country/greece

[4]: https://www.hellenicparliament.gr/UserFiles/f3c70a23-7696-49...

[5]: https://www.europarl.europa.eu/news/en/press-room/20240202IP...

sakisv··on Chat Control Must Be Stopped – Now
You'd be 100% correct if that was the case.

However, the problem is that she is not a politician and she has no public presense whatsoever.

She was chosen by her party, and eventually elected because her last name starts with A which put her near the top of the ballot paper.

sakisv··on Apple Intelligence for iPhone, iPad, and Mac
They did do that. Back in 2013-2015 or so. It was called Google Now, and it was a bit like magic.

It showed you contextual cards based on your upcoming trips/appointments/traveling patterns. E.g. Any tube delays on your way home from work. How early you should leave to catch your flight.

This alongside Google Inbox was among the best and most "futuristic" products.

I was glad to see today Apple implementing something similar to both of these.

sakisv··on Ask HN: Who wants to be hired? (May 2024)

  Location: UK/Greece
  Remote: Yes or Hybrid
  Willing to relocate: Yes - to Switzerland
  Technologies: AWS, terraform, docker, CI/CD (concourse), prometheus, grafana, python, bash, rust, go
  Résumé/CV: Available on request
  Email: hn at sakisv dot net
I'm an SRE / DevOps with 10 years of experience in managing on premises and cloud systems. My last project included designing and implementing the migration of a large government service from CloudFoundry to AWS and everything that came along with it (security, monitoring, deployments, load testing, traffic migration strategies, etc)
sakisv··on Unplug Your Laptop Now, or It Will Stay Plugged in Forever
Personal anecdata:

- Work MPB which I got 2021-12, 99% of the time plugged in because I was WFH, last time I unplugged it to return it to my employer, the battery was at ~95% of max capacity (as reported by MacOS)

- Personal MBP bought 2021-12, only plugging in when battery was low, and 1.5y later the battery was at 80% of max capacity

It was then that I investigated a bit and learned the trick of charging only up to 80%, which is something that MacOS does automatically when it's constantly plugged in which preserves battery life.

Since then, my personal laptop also stays plugged in most of the time, its battery is almost always at 80% and the battery hasn't decayed further.

sakisv··on Web Scraping in Python – The Complete Guide
Yeah in this case between these 3 supermarkets there are 2 options:

1. You choose your general location or 2. You don't choose

In the first option you get one less general category to choose from (for example they may not have fresh fish)

As far as I can tell, in both cases the supermarket closest to the delivery address is responsible for filling out your order and usually what happens is that they call you to let you know that they don't have something and suggest substitutions.

← PreviousPage 2 of 7Next →