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

I think that it means the reason for doing where 1 = 1 is sometimes to allow for easy insertion of dynamic queries which can be a security and performance issue. The actual usage of where 1 = 1 doesn't cause the security or performance issue.


Which is exactly what the site says. To insert dynamic conditions. I know that you can use 1=1 for the same reasons as trailing commas. But kinda obvious that this is not the case here.


Just to be clear I'm using it for the same reason as trailing commas.

If I'm inspecting a dataset I use WHERE 1=1 so I can add and remove conditions more easily.

I realise the confusion is in my wording of dynamic - I might amend the README.md to clarify. Thanks for the feedback!


Are you doing screenshot comparison with Playwright? If so, how? Based on my research this looks to be a missing feature but I could be incorrect.


Playwright has screenshot comparison built in, including screenshotting a single element, blanking specific elements, and comparing the textual aspects of elements without a visual comparison. You can even apply a specific stylesheet for comparisons.

Everything I can see in this demo can be done with Playwright on its own or with some very basic infrastructure e.g. from Azure to run the tests (automations). I can't see what it is adding. Is it doing some bot-detection countermeasures?

Checking if the page behaviour has changed is pretty easy in Playwright because its primary purpose is testing, so just write some tests to assert the behaviour you expect before you use it.

We use Playwright to both automate and scrape the site of a public organisation we are obliged to use, as another public body. They do have some bot detection because we get an email when we run the scripts, asking us to confirm our account hasn't been compromised, but so far we have not been blocked. If they ever do block us we will need to hire someone to do manual data entry, but the automation has already paid for itself many times over in a couple of years.


Some ideas. First, are you saving the cookies and adding them when Playwright bootstraps? [0] Second, are you using the same IP address? Or better use a server running from your office or someone's house. Those are the big ones. The first prevents you from having to continuously login.

It is a game of cat and mouse. It is impossible to stop someone determined to circumvent bot protections.

[0] https://playwright.dev/docs/api/class-browsercontext#browser...


Any recommendations for a more aggressive reset? What if you are already using a library such as bootstrap or tailwind?


If you’re using a framework, I wouldn’t (personally) layer another reset on top of it.

For me, especially when managing non-typographic layout, ensuring that all browser-default margins and padding are gone, as well as a consistent font size and line height for every element are important.

I also think that the `dvh` unit is really helpful if you’re going to be working with full-screen layouts that target any iOS browser.


100%. ORMs are good for basic queries but the messes I have seen written joining 20 plus tables with conditions and left joins, etc, oof. Just use SQL, it’s much cleaner and easier to maintain.


To add to this Commander Keen was released on a very limited platform. More people were gaming on Nintendo systems than personal computers. If Commander Keen was released on Nintendo things may have gone differently.


You don’t need electrical lines. Check out companies such as Tushy.


There are plenty of bidets that don’t require electricity. You can buy them as attachments to almost any toilet.


Oh, wow. You just changed my life. Thank you, this makes so much sense. Any other recommendations for different approaches to commonly used software?


Until the small players all close down and then the big players raise prices.


Amazon has been around nearly 30 years and the prices have gotten steadily lower. Longer for Walmart and Target.

That’s just a thing people imagine will happen. What actually happens is the big players just competing on price against each other forever.


20+ years ago I wrote a completely custom open order dashboard on top of Oracle database that was modeled after a 30+ page daily report that the warehouse guy was printing every morning (M-F) and making 15 - 20 copies, then delivering to management. Aside from saving some trees the warehouse guy was able to come into work an hour later! (He was salary, so no issues there.)


Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: