Looking too far into this issue depresses me so much that it's hard for me to talk about without getting emotional.
Consider an easy recipe for a tasty lunch- bread, cheese, tomato, mustard. In the US, buying these ingredients off the shelf of a major grocery store and assembling a sandwich results in a disgusting combination.
These are four ingredients that should be delicious- and yet you have to hunt to find edible versions of each of these items and often pay wildly high prices. Store-bought tomatoes taste like water. Even the artisan bakery sections yield bitter, preservative-laden bread. Mustard is created in vats to maximize shelf life instead of quality. If you don't know how to find artisan cheese, you're stuck with plastic garbage. But the sandwich will look* incredible, like the platonic ideal of a sandwich.
This trend of cheap, attractive food is trickling up even into restaurants. I just moved to Houston, and with every new restaurant I go to I become more and more frustrated with the bland, uninspiring food even at local "hot spots". I've seen the most beautiful, awe-inspiring sushi, tacos, and burgers- all that taste like nothing.
The only places that remain safe are immigrant-run foreign grocery stores, most of which who will go out of business in the next two decades as their owners die, and their kids go into fields that actually generate money.
*Emotional because of how the basic pleasures of existing are continually sold out in order to protect the bottom line- for instance imagine living in a world with zero wilderness, in which there literally wasn't a direction you couldn't turn without seeing human influence. It's already hard to go to coastal towns and watch the waves because you'll be able to see the giant mega-hotels lit up with balcony lights.
South Korea and the United States are politically weak right now -- not necessarily the leaders, but the political systems are at a low point of unity and resolve. Neither country really wants to deal with North Korea right now. People in each country would like this drama to be over, because it feels dangerous and intractable. The leaders in each country would love to deliver that feeling to us.
Kim Jong-un has an incredibly strong hand. He has nuclear missiles at his disposal, with apparently rapid progress toward increasing their range. He knows that other nations are fearful of those weapons, and that they won't do anything that risks putting them on the receiving end of even one.
We've had one bold historic headline after another now: Kim Jong-un has telegraphed a desire to denuclearize and to end the Korean war. He has raised the hopes of South Koreans and of Americans just enough that they each want a deal now, and their leaders now need to deliver.
But the price has not yet been negotiated.
What will be the price? Will Kim promise to stop further nuclear development? Will Kim promise to stop further missile development? Will Kim promise not to help other states develop nuclear missiles? Will Kim promise not to radically modernize his military in other ways as the floodgates of trade open?
Promises are inexpensive and reversible. Will he actually take any real steps to diminish or eliminate his nuclear and military power? I doubt it. Kim's not an idiot. He only needs to present the illusion.
People in the West seem to believe that Kim has experienced some sort of rebirth as a student of peace and nonviolence of late. But there's been no explanation and no demonstration (to my ears) of where that came from. It's possible perhaps that Xi Jinping whispered wonderful ideas and/or threats in Kim Jong-un's ear when he visited, but that's opaque to us and media I've read seems to be ignorant of such potential influence. If Kim were so serious, we should need him to demonstrate that credibly to us, through actions that are costly for him to take: in particular, pitching this change of vision directly and passionately to the populace of North Korea.
Kim Jong-un wants to get out from under the chokehold of heavy trade sanctions. He wants to be legitimized in the international community as the leader of a real nation. He wants to modernize both his military and his nation and his personal life. He probably dreams of visiting Paris and Manhattan.
It is my belief that he will be able to get these things -- without giving up nuclear weapons, missiles, nor giving up his political or military power over North Korea. From Kim's perspective, democratic politicians are weak and manipulable, and he will find it to be especially true right now.
Oh, man, as a seasoned DBA/Data Analyst, don't do this unless you have a really good reason to. This is premature optimization of the kind you want to avoid.
Yes, it's really neat to update everything in a single statement, and in some situations it can perform significantly better, but CASE expressions in an UPDATE statement quickly get complicated to map out in your head. It gets extremely difficult extremely quickly to tell where you have an error, and it's very, very easy to make a very costly mistake.
If you really need an atomic change you can just do this:
BEGIN;
UPDATE reward_members SET member_status = 'gold_group' WHERE member_status = 'gold';
UPDATE reward_members SET member_status = 'bronze_group' WHERE member_status = 'bronze';
UPDATE reward_members SET member_status = 'platinum_group' WHERE member_status = 'platinum';
UPDATE reward_members SET member_status = 'silver_group' WHERE member_status = 'silver';
COMMIT;
In general, however, make your queries difficult for the server and easy for you, because you make a ton more mistakes than the server ever will. Let the query planner and optimizer do the work. If performance becomes a problem on this query, you can fix it later when you can focus on just that one issue and understand the specific problem much better.
> You can imagine how many round trips this would take to the server if multiple individual UPDATE statements had been run.
If you're not returning data and you reuse the connection like you're supposed to, "round trips" cost is essentially nothing. What's expensive here is that the database server has to scan the index or row data on member_status. However, if the table is not billions of rows, it can probably fit that index (or even the row data for small tables) in memory and will cache hit on everything.
However, the list of single UPDATE statement can perform much better than a monolithic statement. If you're only updating a portion of the table, or if the number of rows that you'll actually be updating is comparatively small, then the list of single UPDATE statements can perform much better. It all depends on exactly what you're doing with the table.
I'm deriving a perverse kind of pleasure from all this. Maciej Ceglowski has a fantastic talk called Haunted By Data, where he compares data to radioactive waste: we collect a lot of it, and ultimately don't know how to handle it safely and responsibly.
He ends the talk with a warning that unless the tech sector is careful, they will have their own Three Mile Island, and will forever afterwards be regulated into the ground. Facebook and Google are almost begging for it. May we see them become a shadow of their powerful selves in not too distant a future.
"The statements you quoted are about apathetic students. Do you have a cure for apathy in learning? I don't."
You have to look for the cause of the apathy to have any hope of "curing" it.
Was the apathy caused by depression? Then you have to treat the depression. Was it caused by lack of interest in the subject? Well, then you have to get students interested in the subject, and so on. Usually there are reasons for the poor attitudes some students have towards learning, and helps to understand those reasons before one can be effective at channeling them towards something more positive.
"If a student can't devote 5 hours a week to a 5 credit course in homework then they likely won't do well. The reason for their inability is somewhat irrelevant in the sense that one needs to put in the effort. If you can't you won't learn the material. Nothing I do can change this fact."
You can't change the amount of work required, but you and the school as a whole can influence the student's willingness and ability to put in that amount of work.
"Is a teacher supposed to be a great motivator? I don't know. I do know that I'm not particularly good in the inspiration department."
If you're not, then you're just not going to be as effective as a teacher who is good at inspiring students. Whether or not a teacher is "supposed to" be a great motivator, there's no denying that when the goal is having students learn, and when student apathy is a real problem, having inspiring teachers should be a priority.
https://www.linkedin.com/pulse/learning-play-guitar-jay-paul...