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

It’s a little thing, but one that keeps coming up again and again with new apps, so I thought I’d get down some thoughts about how the origin checks performed by Phoenix to protect websocket connections from cross-site attacks.


I'm excited about this as a way to configure my Fly.io apps in a more declarative way. One of my biggest gripes about Fly.io is that there's a lightly documented bespoke config format to learn (fly.toml), and at the same time there's a ton of stuff you can't even do with that config file.

I love Kubernetes because the .yaml gives you have the entire story, but I'd _really_ love to get that experience w/o having to run Kubernetes. (Even in most managed k8s setups, I've found the need to run lots of non-managed things inside the cluster to make it user-friendly.)


Also, motor-driven pottery wheel, and old school transcription machines, where the pedal controls the rate and direction of audio playback


My favorite feature is the way source code links are added automatically and consistently. Just look for the little </> links to the right of the module / function / macro name!


I send links to specific lines or chunks of code pretty much every day (using a similar VS Code plugin), usually to show an example of a pattern or show where / how a particular piece of logic is implemented. Or sometimes to give an idea of a possible home for a new piece of logic


I thought the article was pretty careful to attribute the rise of canning more to psychological factors than to household budgets:

In times of economic insecurity like the last recession in 2009, when McClellan started her Food in Jars blog, people turned to canning to soothe their fears, and mason jar sales took off.

...

“When there are these big downfalls of trust in systems of government or economy or institutions, there’s this desire to retain control wherever we can find it,” she says.


I always do destructive SQL commands in two steps: first run a select using the WHERE clause you intend to use and verify which records will be affected, then hit the up arrow and edit the beginning of the query leaving the WHERE intact.

I also like adding redundant conditions to the WHERE so a typo in any single one of them won't sink me.


For the rare but critical manual SQL mod our common safety measure is to wrap every DELETE or UPDATE in BEGIN TRAN...ROLLBACK TRAN first. Run on test systems or snapshots multiple times, checking the result inside the transaction.

Finally, change ROLLBACK to COMMIT only when you are positive all is well.


IIRC (without checking the manuals) data-definition commands might not be covered by such transactions: such as altering, dropping tables and possibly truncates.


PostgreSQL is quite good about DDL being transactional. So I was surprised (tbf, I shouldn't have been) when Redshift autocommitted after a TRUNCATE. But DROP TABLE is transactional, go figure.


DDL is transactional in Microsoft SQL Server as well.


I do the same thing. I also keep auto commit off and make sure the rows updated looks correct before committing the change.


Just because it's not enough doesn't mean it's delusional.

I'm a vegetarian partly out of compassion for the animals who might be eaten and partly because of the other harmful effects of industrialized meat production.

In addition, I don't own a car and try to avoid non-human-powered transportation in general, I use air conditioning extremely sparingly despite living in Louisiana, I avoid buying crap I don't need online or in person, and I choose my foods and their sources carefully.

These are all personal choices, and I'm sharing them not to lecture or to be holier than thou. I'm just trying to say this: Maybe the correct reaction to "being a vegetarian alone won't save the world," is "I should be thoughtful about all the ways my choices impact the world" rather than "I'll have the 72oz steak."


No offense, but the hard reality is that those things don't have much of an impact in emissions.

I was like you a few years ago. Even left the world and moved to an off the grid cabin for a year until I realized I was only trying to feel better about myself.

Me installing some solar panels on that cabin: http://imgur.com/5mfDVHv.jpg

Everything that we do, like using the internet, is still consuming massive amounts of energy and resources. From manufacturing the computer(s) you are using, to networking.

Energy consumption for example is the number one cause of CO2 emissions, not transportation, and certainly not the food industry.

https://www.epa.gov/ghgemissions/global-greenhouse-gas-emiss...


Agriculture and forestry is listed as the second largest sector with 24% of GHG emissions, second to energy production at 25% so I'm not sure where you're getting that information in your second link.

Animal agriculture is a huge drain on resources and the environment. There's clear cutting of the Amazon for cattle feed and grazing. Cows and cattle emit huge amounts of methane, many times more potent in climate change than CO2. Nearly a quarter of ice free land in the world is dedicated to animal ag.

Some estimates put 20 kg of grain for a single kg of beef. That is not efficient.

https://alumni.stanford.edu/get/page/magazine/article/?artic... check out this link.

Yes every human activity uses energy. Does that mean we shouldn't try be consious in limiting our consumption and be damage we inflict on others?


> Agriculture and forestry is listed as the second largest sector

That second sector includes quite a few things. For example deforestation for non livestock agriculture, city building, etc. None of which are alleviated by vegetarianism.

Also note this:

> This estimate does not include the CO2 that ecosystems remove from the atmosphere by sequestering carbon in biomass, dead organic matter, and soils, which offset approximately 20% of emissions from this sector.

So in practice this 24% is really 19.2%, and less than that is really caused purely by livestock.

> Some estimates put 20 kg of grain for a single kg of beef. That is not efficient.

Indeed, but chicken or pork produce less emissions than fruits or even dairy products.

http://imgur.com/a/Rwm5R

> Does that mean we shouldn't try be consious in limiting our consumption and be damage we inflict on others?

Sounds good in theory.

In practice if you care about suffering, you should realise that agriculture is one of the biggest environmental disasters of the last couple thousands years. Agriculture has destroyed (and destroys) entire ecosystems.

And before you argue about organic agriculture: that would not feed 7 billion people. Maybe aquaponics / hydroponics could save the world, but it remains to be seen.

If you do really care about emissions and your impact on the planet you could do a number of things like not having kids and getting out of the industrial lifestyle. Many have done it (I tried and failed). Otherwise there is really no moral high ground in vegetarianism.


never, ever push changes on a Friday.

I think this goes a little too far.

I personally push code every Friday morning, and keep my Friday schedule relatively open so I have time to deal with any surprises.

Many successful companies brag (justifiably) about their continuous deployment systems and speed of deployment. I can't believe they suspend all of that every Friday.

http://product.hubspot.com/blog/how-we-deploy-300-times-a-da...

https://github.com/blog/1241-deploying-at-github

https://www.wired.com/2013/04/linkedin-software-revolution/

https://www.facebook.com/notes/facebook-engineering/ship-ear...


Pushing twice a day in that Facebook story gave me a shiver.


If they were deploying to their entire fleet all at the same time, I would also shiver.

However, most likely that have many stages in their deployment with testing and monitoring that exponentially deploys and if any of those stages don't pass, they auto-rollback.

The End game: minimizing risk with code changes.

1. Deploying more often allows easier root cause analysis to identify the code breaking change.

2. exponential deployment allows developers to monitor their services as it partakes in more variation (more users = greater chance of edge case breaking bug)

3. proper monitoring and test coverage while using auto-rollbacks allows developers to deploy without fear as any unintended effects will be detected at the soonest possible moment while minimizing cost to the users of that breaking change. Then, auto-rollbacks will redeploy code changes that previously worked which should automatically mitigate that code breaking change.


Facebook legitimized the "move fast and break things" attitude by demonstrating that users don't care about reliability, at least nowhere near as much as some of us wish they did.


I don't think it's being taught adequately to lots of people who aren't destined for careers in tech or academia. Look at the nearly universal disdain for math and especially "story problems," as well as the mystical aura of "coding" outside of those tech / academic circles.

In that context, I do think early encounters with programming might be a great entry point to "computational thinking" for some who aren't well served by existing curricula. It certainly makes more sense to me than trying to train every child to write code for its own sake.


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: