Buy a second domain, ideally using the same TLD as your production domain (some firewalls and filters will be prejudiced against specific TLDs). Mimic the subdomains exactly as they are in production for staging/dev.
That only works if you (and any third party code that might run on such a domain) are completely consistent about always specifying the domain as one of your subdomains whenever you set a cookie.
And if your marketing/SEO/business people are ok with having something like "prod" as a subdomain for all your production web pages.
Usually it's mainsite.com for the marketing site, and then app.mainsite.com for actual production, or if you have multiple it'll have the product name, like coolproduct.mainsite.com
We then have app-stg and app-canary subdomains for our test envs which can only be accessed by us (enforced via zero trust). No reason for marketing or SEO teams to care in any case.
This works fine and is what I’ve done. But if you’re sending email from those domains or working with enterprise customers using the same TLD will be helpful.
Yep. Even within the prod environment it's ideal to have a separate domain (as defined by the Public Suffix List) for sketchy stuff like files uploaded by users. Eliminates a whole class of security issues and general fuckery
I had the option to re-use the prod domain for non-prod a few years ago (the company's other two projects use the prod domain for all non-prod environments).
I didn't really think about cookies back then but it just felt like a generally bad idea because disastrously messing up a URL in some config or related service would be much easier.
Nah dev should probably be a separate tld so the cookies are completely isolated.
Stage, it depends - if you want stage to have production data with newer code, and are fine with the session / cookies being shared - host it on the same domain and switch whether users get stage or prod based on IP, who is logged in, and/or a cookie. That way your code doesn't have to do anything different for stage vs prod every time it looks at the request domain (or wants to set cookies).
If you want an isolated stage environment, why not just use a separate top level domain? Otherwise you are likely seeing yourself up for the two interfering with each other via cookies on the TLD.
I'm sure this will be replicated in future projects because it's much easier to argue "we're already following this pattern so let's be consistent" than "this pattern is bad and let's not have two ruined projects"
Absolutely, and this is a common pitfall of large companies. However, history also shows us that many large companies can and do adapt and do go on to dominate newer fields. For example, American express was a shipping company (and a massive one at that) before it started venturing into novel financial services.
If anything, large companies are better positioned than startups to enter new capital-intensive verticals, and I think history bears this out.
I think this related to the “critical thinking” skill that all my teachers always stressed about growing up.
But I still don’t know how to put in useful words what “critical thinking” is because it’s not one thing.
It requires synthesizing a lot of information together in very specific and meticulous ways. And through feedback, collecting your previous thoughts and keeping track of how often you are correct or incorrect.
You can explain critical thinking in many ways but none of it will teach someone critical thinking.
The real trick is that critical thinking is almost always being critical with someone that's trying to mislead you.
Many people try to do it with many different methods. So you're right it's not one thing. Also nobody will teach you all the techniques because they're keeping theirs secret.
> Also nobody will teach you all the techniques because they're keeping theirs secret.
Sounds more like people who like to use propaganda who keep their methods in shadows (not always, though). I try to teach critical thinking all the time. I bet you do too. Do you not try to inform loved ones how detect spam or scams? How to evaluate what's true in their inbox or on a webpage? Do you have anything to withhold in such a scenario?
Critical thinking is one thing but that "thing" is a process rather than an individual item. Critical thinking, like science, is a process that iterates upon itself. You analyze the information you have and make a conclusion based on that information. The "critical" part comes in when you take a step back and then use that same process to analyze your conclusion and poke holes in it, checking to see if the information you have supports that hole or supports the conclusion.
It's like saying that a computer is one thing despite the fact that the one thing is made up of multiple pieces.
I go with critical thinking being thinking about thinking, or meta thinking. Which is to say have a thought, doesn’t really matter what, and then analyse it.
Example is throw a dart at the board and then evaluate it compared to your expectations and desires. Feel free to throw a bullseye right away but that’s a different thing.
Which is to say, imo, that critical thinking isn’t about being perfect all the time.
I think of Critical Thinking as a closed loop process that aligns a person's mental model of the world with reality. It is just using the scientific method to analyze information in daily life. When done correctly and consistently it is like a really good spam filter against lies and bullshit.
Java has a great ecosystem. It’s well thought out and I can compile and run 10 year old projects no problem. In fact, I wish everyone had just copied Java’s model instead of inventing their own worse model.
I love Python but it has a terrible package ecosystem with mediocre tooling that has only gotten worse with time.
JavaScript has gotten better but it seems they are just re-learning things that were long figured out.
When I see new package managers, I just see a list of problems that they forgot to account for. Which I find strange when there have been many package managers that you can learn from. Why are you re-inventing the wheel?
In JetBrains's Developer Ecosystem 2023 survey, 50% of developers were still regularly working in Java 8 [0]—the exact kind of "stick with the old version of the runtime" solution described in TFA.
Java 8 is 10 years old. If you had a project with a Java version that was recent 4 years ago (11 - 14), you could run it without any problems or changes.
Because they made the design choice to stop making large breaking changes to the language and tooling. Java 8 to 9 wasn't easier than Java 8 to 17 is, it's getting off of Java 8 that is hard because they made the choice to break so much in 9.
Node does not promise indefinite backwards compatibility, which is a design choice that they've made that allows them to shed old baggage, the same way that the Java developers chose to shed baggage in 8->9. Neither choice is inherently better, but you do have to understand which choice a language's designers were making during the time window in question when you go to run it later.
"Java has a great ecosystem. It’s well thought out and I can compile and run 10 year old projects no problem."
We just had to workaround breaking changes in a patch version update of Spring Boot. Maybe it was true in 2005, but certainly not the case today. I know of products that are stuck in Java 1.8 and not because they are too lazy to upgrade.
I've been involved in bringing real old Java 1.4 and 6 and whatnot up to 17 and from classic app servers into cloud, can take a bit of work but it's pretty straightforward, mostly switching out deprecated methods to their successors and copying over boilerplate config from similar applications.
Depends on the frameworks in use. I have done the same as you in bringing code that was originally started on 1.4 up to 17 and now 21 and it just took grunt work, but not too crazy since most of it was bog standard Java.
However, some other projects around here using different application frameworks are stuck since the frameworks aren’t maintained or upgraded in ways that aren’t compatible anymore.
Looking into old Java code, it is hard to remember a time before enums and what a pain that is to deal with int constants instead of typed constants.
Then sign a contract with Akamai, who has been in business for 25 years? You outsource if you aren’t planning to do something very often.
There is no middle ground where you commit a mediocre amount of resources, end up with downtime and a mediocre experience, and then go “but we saved money.”
When Apple moved off Akamai for their Keynote live streaming, ( I remember they also used Limestone or EdgeCast ) they had some percentage of audience using Akamai and some on their own CDN. I think it took them three years before they completely moved off Akamai. Not sure if that is still case as that was more than 10 years ago.
But like you stated, they dont want to spend money and their technical people couldn't deliver on time. This isn't a technical issue a lot of people on HN and Twitter wants to discuss about. It is a management issue.
For pedestrian crossings at least, I did a long distance walk in England where there was signage at a couple crossings to the effect of look, listen, and be aware.
On other walks, there was a phone you were supposed to use (I did) to call an operations center to get a go ahead to cross.
Static files have been pretty much the standard streaming protocols for both VOD and live for the last 15 years ago. Before, it was Adobe Flash (RTMP).
With the way that they are designed, you can even use a regular CDN.
You can push these files to all the edges before you release the content which will protect your origin. Livestream all your edge servers are grabbing content from the origin unless you have another tier of regional servers to alleviate load.
Sure but that’s why your edge servers do request collapsing. And there are full blown CDN companies that will write an enterprise contract with you that can do this stuff with ease. Akamai is like 25 years old now.
Scale has increased but the techniques were figured out 20 years ago. There is not much left to invent in this space at the current moment so screwing up more than once is a bit unacceptable.
While I am not ready to recommend that everyone install Traefik, this is false.
You can get a single node Docker “cluster” going with Traefik in 15 seconds. There is no maintenance except updating occasionally. It doesn’t use much more resources. You do not need to install any third party tools. There is no onion of services. You literally just boot up Traefik plus your app.
This has been doable since at least 2019 by just installing Docker via your OS’ package manager.
I’ve started using containers before 99% of people and so got to see the fundamentals build up. You do not need to skip directly to “Kubernetes.” That’s like needing to wash your clothes so you skip directly to buying an industrial washing machine and then lamenting how all washing machines are overkill.
Traefik plus my service is two layers. My service has a DB hidden behind it, it's three layers. I put a VPN in front of it, and now it's four.
My service doesn't take much resources, also the DB I use is light by itself. I added traefik, which is also light, and the VPN daemon which is also light.
However, these four layers are not light. They're heavier. I'd rather don't have Traefik in front and have a lighter stack, because for that much resources, I can run another server at another port, which can save me another VPS (money, maintenance time, documentation and interconnection).
I mean, we were using jails before Linux had containers. I'm not new to system administration or computers in general.
I don't get angry because things are complicated/hard. I get angry because we waste resources and write bad software because we somehow think "worst is the best".
Things add up. Light becomes heavy, easy becomes meaninglessly complex. This shouldn't be like that.
Wait until AI prints out something that doesn't work and you can't figure out how to fix it because you don't know how it works so you do trial and error for 3 hours.
The difference is that you can trust a good calculator. You currently can't trust AI to be right. If we get a point where the output of AI is trustworthy, that's a whole different kind of world altogether.
>The difference is that you can trust a good calculator.
I found a bug in the ios calculator in the middle of a masters degree exam. The answer changed depending on which way the phone was held. (A real bug - I reported it and they fixed it). So knowing the expected result matters even when using the calculator.
I'm not changing goalposts, I was responding to what you said about AI spitting out something wrong and you spending 3 hours debugging it.
My original point about not needing fundamentals would obviously require AI to, y'know, not hallucinate errors that take three hours to debug. We're clearly not there yet. The original goalposts remain the same.
Since human conversations often flow from one topic to another, in addition to the goal post of "not needing fundamentals" in my original post, my second post introduced a goalpost of "being broadly useful". You're correct that it's not the same goalpost as in my first comment, which is not unexpected, as the comment in question is also not my first comment.
There is only one correct way to calculate 5/2+3. The order is PEMDAS[0]. You divide before adding. Maybe you are thinking that 5/(2+3) is the same as 5/2+3, which is not the case. Improper math syntax doesn’t mean there are two potential answers, but rather that the person that wrote it did so improperly.
So we agree that there is more than one way to interpret 5/2+3 (a correct and an incorrect way) and therefore that the GP statement below is wrong.
“Which is a question that can be interpreted in only one way. And done only one way.”
The question for calculators is then the same as the question for LLMs: can you trust the calculator? How do you know if it’s correct when you never learned the “correct” way and you’re just blindly believing the tool?
>>How do you know if it’s correct when you never learned the “correct” way and you’re just blindly believing the tool?
This is just splitting hairs. People who use calculators interpret it in only one way. You are making a different and a more broad argument that words/symbols can have various meanings, hence anything can be interpreted in many ways.
While these are fun arguments to be made. They are not relevant to practical use of the calculator or LLMs.
> So we agree that there is more than one way to interpret 5/2+3 (a correct and an incorrect way) and therefore that the GP statement below is wrong.
No. There being "more than one way" to interpret implies the meaning is ambiguous. It's not.
There's not one incorrect way to interpret that math statement, there are infinite incorrect ways to do so. For example, you could interpret as being a poem about cats.
Maybe user means the difference between a simple calculator that does everything as you type it in and one that can figure out the correct order. We used those simpler ones in school when I was young. The new fancy ones were quite something after that :)
> Wait until AI prints out something that doesn't work and you can't figure out how to fix it because you don't know how it works so you do trial and error for 3 hours.
This is basically how AI research is conducted. It's alchemy.
What a colossal mistake.