Hacker Newsnew | past | comments | ask | show | jobs | submit | forgotmypw17's commentslogin


Wouldn't the correct answer be 5?

    result = result + x
    //   5   0        5


Iteration starts from the first element. X is 3, 3, then 5.


The logic results in 3 + 3 - 5 = 1, so it's not 5, sorry.

I'd love to know what logic path you followed to get 5 though!


I did it in my head but got 4 (3 * 3 - 5), so I fail, too. Hopefully I'd be paying closer attention if I was actually applying for a job.


where did your multiplication come from?


From not paying close attention :)


Presumably you'd get it if you short-circuited and didn't evaluate the else part.


Thanks to everyone who replied. I failed to account for the else condition when x is not > 3.


3 comes before. Read it again.


It’s in a loop


    2020 1577836800 15
    2021 1609459200 16
    2022 1640995200 16
    2023 1672531200 16
    2024 1704067200 17
    2025 1735689600 17


It’s really fun to explore, no two spaces are alike, and lots of nooks and crannies. Definitely in my top 5 favorite buildings on campus and in Cambridge.


I've come up with an easy solution, which works almost all the time. When a cookie consent dialog interferes with me using the website, I close the tab and move on.

I've found a high correlation between cookie consent notices and low-signal content, so this strategy has actually saved me a lot of time I would've spent reading/watching something that doesn't help me.


How do you book airline tickets? Ir other critical business ? My doctors office has a cookie banner . Should I just stop going ?


That's why I said "almost all of the time".

But to the flights example, I was just looking for flights starting at Google Flights, which doesn't have cookie banners, and the two sites I went to for booking also did not have cookie banners.


Which booking website are you going to that doesn't have cookie banners? I spot checked multiple EU and US airlines just now (Ryanair, Air France, United, Alaska) and all of them had a cookie banner.


I started with Google Flights and went to two other sites that it directed me to.

Just to reiterate, I'm not religious about this practice. If I need to click a cookie banner to book a plane ticket, so be it.

I just treat cookie banners as a strong negative signal.


Google, including Google Flights, does have a cookie banner. It's just likely that you already accepted/denied the prompt at some point.


That’s certainly possible. I don’t deny occasionally clicking them. I just don’t bother most of the time.

Edit: I just tried the flight ordering flow again (starting at google.com/flights) in a private/incognito tab, and did not encounter any cookie banners.


any site with a cart or user prefs should have a cookie disclosure


Not all cookie banner implementations are obstructive to the users. Only the ones that really want you click on "accept all" are.


This is not true, cookie disclosure is only required for non-essential cookies.


Well they need to track the above activities


Yes, they are essential. Therefore no permission needed for those.


> any site with a cart or user prefs should have a cookie disclosure

In the name of all that is holy!

Once again....

You are free to use whatever cookies you want to run your site with no need for "cookie banners". HOWEVER, if you are using those cookies to track me (advertisers take a bow) then you need my clear, opt-in informed consent to do so.

I remain utterly astounded at the ignorance some tech people have of the GDPR; a vital privacy law and one that is fundamental to modern data use and respect for the customer.


every business needs to "track" it's audience. how do you run an app without measurement?


Bizarre question.

You can gather statistical data for an "app" (meaning software installed on a users personal device holding that holds their private data) without tracking users or invading their privacy.


It may be possible, but it be nearly impossible to make money off of it, which is why nearly every app/website has a consent prompt.

I love how every argument is like "this extremely rare and practically useless application is possible, so you don't need cookie prompts".


and don't be so smug. user prefs are non-essential and require consent.


User preference cookies generally do not require consent under most privacy regulations, including the EU’s GDPR and ePrivacy Directive, as long as they serve a functional purpose directly requested by the user and are not used for tracking or profiling.


my point is that it's ambiguous, even gdpr.eu says otherwise, and it's so unclear that app developers err on the side of caution. It's nothing to be smug about. All of these seemingly capable people struggle with it .


Yeah I agree, that sentiment works if you only consume content online. But for real stuff? Good luck


When you write an app without using an existing framework, you are bound to write your own framework. And there's nothing wrong with that.


Yes, they would. And it valid for them to want to do so.

And the fact that software developers think that they "know better" is part of the problem with our software world today.


> And it valid for them to want to do so.

Sure, if they don't make it everybody else's problem. Not to defend MS too hard, but they supported Windows XP with security updates for 18 years. At some point software needs to be "finished", and once it is, all responsability falls upon the user.

The enterprises with competent IT that will airgap their XP machines to keep running the control plane for their factory probably "know better" than MS, the power user who refuses to use a Linux distro for their Pentium 3 box or who will disable Windows Defender and run random scripts on the internet to "debloat the OS" without understanding it, or the ones who run LTSC and then complain that their games aren't working - they all absolutely don't know better, but unfortunately they tend to be the louder voices in the conversation.


Exactly. If customers prefer your old product to your new product there is something wrong.

It is not just MS that does this.


I disagree. If there is a fundamental architectural issue with the current platform that is getting in the way of progress, the right thing to do is to fix it.

By ‘progress’ I mean compatibility with new innovations like DirectX or some new instruction set that enable dumb things like transparency, or spacial audio, as well genuinely useful things.

You simply can’t bolt that onto an 18 year old system without breaking things irreversibly.

It also means depreciation of insecure ways of doing things. MS’ attempt to get TPMs into every desktop is clumsy, but it serves a greater good.

None of those things require W11 to operate, but I can see why they needed to make it look fancier than W10 to convince people that it’s somehow ‘better’.


> None of those things require W11 to operate, but I can see why they needed to make it look fancier than W10 to convince people that it’s somehow ‘better’.

It has the opposite effect. People do not like the fancier look.

It also depends on what you mean by progress. if it is genuinely better for customers why do you have to force them to use it?


This has happened for me on regular residential Internet access.

(Check the box, and get redirected to check the box again.)


I hit this too, maybe on the order of one day every month or two?

I'm using a fairly mainstream ISP in a fairly mainstream country.

I don't get why I seem to have such a hard time. I've kept the same IP for months.

But the worst thing overall is that it just doesn't acknowledge it.

Want to block me? OK. But tell me that! Don't just make me tick a box again and again and untick it. It's infuriating.


I use Total Commander on Windows all the time. It is much better than Explorer at so many things, such as:

- Actually letting you navigate the directory structure.

- Making WSL volumes easy to work with.

- Keyboard accessibility.

- Dealing with many tabs and bookmarks.

- A stable interface that doesn't randomly change without my consent.

- Many other things I'll omit for time reasons.


- Multi-rename tool.

- Synchronize directories (symmetric and asymmetric, with subdirectories).

- Background operations.

- Operation queue (so that you don't thrash disks while doing many operations).

- Start menu.

- Displaying directory sizes easily.

- Great file search.

- Diff viewer for text files.

- F3 quick file viewer.

- Compare directories.

- Plugins.

Those are my favorites.


I do this with Perl.

One of the reasons I like Perl is because of its high committment to backwards compatibility.

I like PHP because it's so easy to set up an installation of my app, but the breaking changes have bit me hard in the past, so I try to minimize its use.

Together, it's a great combo.


How is php easy to setup?


Step 1: Copy the files.

Step 2: (There is no step 2.)


This is not realistic. I have not seen that since little league soccer homepage back in the late 90s.

For "simple" deployment you need a binary that you ship. Anything else requires more steps, php included.


I don't understand the difference between one binary and several files, except that the files are easier to version...


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

Search: