Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×

Comment Re:Postgres has referential integrity (Score 1) 320

How do OIDs solve this? Updating a record it still updating a record. OIDs don't magically make that problem go away.

One solves this problem the way one solves any other data problem: logical thinking and planning ahead. If you are creating a long-running business application where things like addresses may change, you design your database to take that into account. You store a timestamped address with every order record, or you store multiple addresses by date range. It's not exactly rocket science.

There is literally no reason to use OIDs except as a crutch when one has created a table without a primary or candidate key--and even then OIDs won't save you from bad logic, such as duplicate records or other idiocy.

BTW, it is important to also remember that OIDs are not enabled by default for new table creation. Many times the PostgreSQL core team has discussed whether to deprecate OIDs completely. The decision was made to keep them for two reasons: a) some applications still depend on them, however misguided their reasons and b) Some PostgreSQL add-ons and external solutions (replication, etc...) use them.

Comment Re:I thought we were over the whole SQL thing (Score 1) 320

I wouldn't even recommend bothering with hstore. There are several even better ways to use Postgres in a "NoSQL" setting.

For example there is the Mongres project, that lets a PostgreSQL database emulate the MongoDB protocol. So you could literally drop Postgres into a Mongo-powered application with not a single hiccup, and get a) better performance and b) all the back-end relational stuff you need when it comes time to do reporting or other business logic.

There's also the new JSONB datatype in PostgreSQL 9.4, which I would recommend over hstore if you want to just store "free-form" data in records.

EnterpriseDB did a very well-thought-out study on PostgreSQL/NoSQL.

Comment Re:Postgres has referential integrity (Score 5, Insightful) 320

That's not even close to what "referential integrity" means. In fact, it could be used to accomplish quite the opposite.

OIDs are one feature of PostgreSQL that should be buried inside the implementation and not allowed to be accessed from the developer side. Otherwise you are pretty much completely going around the whole point of the Relational Model. If you are developing an application in such a way that it needs pointers to rows, you might as well just store data on the filesystem and be done with it. Or use one of those fancy NoSQL thingies and enjoy your data corruption.

Comment Re:Easy life (Score 1) 208

"Lifting heavy" is relative to one's capabilities, genetics, age and so on. I don't mean you should lift beyond capacity to control a weight or keep proper form. And, lifting light is how you repair joints, IMHO. If there are joint problems, start light, do high reps, slowly and carefully focusing on range of motion and keeping joints seated right. Then as the body begins to adjust, gradually add weight, but never to the point that you are sacrificing form. Also, lifting heavy is only a small component of good fitness. Other sorts of high-intensity work (like rock-climbing, sprinting, swimming) help round out the picture, and I think even low-intensity exercise (long walks) fill out the picture completely. That which is highest intensity should be done to shortest duration.

Some people don't add a lot of muscle mass, but small gains are still gains ( Usually offset by fat loss, making the subject think nothing's happening). If you are adding strength you are going in the right direction.

Comment Re:Easy life (Score 1) 208

Really, I have to remind myself often that most people (even slashdot nerds) are simplistic binary thinkers. They latch onto a certain way of looking at something (ooh, I'm all sciency!) and try to hit everything with the same hammer.

What we are having here is not a scientific study. Nor is it a debate. What we are having here is a discussion. This being a discussion forum. When I bring up something anecdotal, it doesn't mean I am basing a decision or opinion purely on that anecdote. It just means I find it interesting and possibly indicative of a truth. I look at all sorts of anecdotes around me, I look at scientific studies, I look at statistical reports (statistics alone are not science), and I also like to use logical inference when I examine ideas (again, this is not science). When a broad preponderance of different types of evidence points me in a certain direction, I tend to give it credence. It's not an absolute, any more than science itself is a set of absolutes.

Here's an example of empiricism: every damn person on the planet knows that if you want to strengthen a muscle, you have to exercise it, and in general the more intense the exercise, the greater the gains. Of course there are limits after which too much exercise will be counterproductive, blah blah blah, but the core truth is there. Don't need a scientific study to prove that. It is part and parcel of everyone's experience, just like everyone knows you have to breathe in order to stay alive. When the variables get more complex of course it's not always so clear, but one has to be a particularly obtuse person not to agree that in general exercise leads to better health. By logical inference, better health would obviously lead to the likelihood of living longer. Where scientific studies help is in identifying just what the upper and lower bounds are to these benefits. But I'm not here to do your work for you. I'm just shooting the breeze on a Sunday afternoon. If you want that sort of information, complete with box plots, scatter charts, and explanations about sample size and selection bias, well you have access to the same information I do. Get to it.

Comment Re: Easy life (Score 1) 208

My overall takeaway from years of reading on the topic is that variety is key. Note that the cardiologist wasn't saying "only lift heavy", but just saying that it's a "should" (I.E. make it part of your routine). If you never lift heavy--as in pushing your body up to and past plateaus--your body never experiences certain types of hormesis. And heavy is relative. I wouldn't recommend some 70-year-old woman be deadlifting 300lbs, but there should be a certain amount of strength exercise that actually...exercises the muscle instead of just fatiguing it.

My routine is a combo of calisthenics, weights, general outdoor work (living on 2 acres), running on occasion, and sprinting on occasion. Let's just say my health and mental attitude have seen an absolute turnaround from the age of 45-49 as I implemented all this. Currently deadlifting up to 345lb and I can tell I'm nowhere near my limit yet.

Comment Re:Easy life (Score 2) 208

Exactly what anonymous said. Anything can be overdone, and this tends to happen when people go on crazes. The jogging craze was last generation's example. Jogging can be an excellent part of an exercise regimen, but when you do it to the exclusion of all else, for 2 hours a day... you're courting disaster. Ditto for the current "crossfit" craze, where people with zero experience are jumping around in the gym, lifting (or even throwing!) heavy weights with zero ramp-up and zero instruction on good form, and once again you're courting disaster

Comment Re: Easy life (Score 4, Insightful) 208

Yeah, and my experience is that a) most doctors are physically lazy and have abominable fitness, and b) they are stuck on years or even decades-outdated studies of fitness and diet. And, c) they tend to favor medical and pharmaceutical intervention rather than lifestyle changes. This is a natural outcome of how their money is made and their social position in Western society. Which is why I don't have *blanket* trust in their fitness recommendations as a majority. This particular cardiologist was doing his own original research, which is why he came to these conclusions.

I come from a family of doctors and medical people, BTW. I have no axe to grind. I just try to observe as clearly as possible.

Comment Re:Easy life (Score 4, Informative) 208

Yes really. Anecdotal evidence is still evidence. Consult a dictionary. You asked for citations, which I did not have at hand, but directed you to a couple sites that have lots of them. Knock yourself out.

There is no such thing as conclusive proof in any of these areas. I tend to prefer empiricism and general pattern-recognition to theory-directed research because in the area of health it is so fraught with false positives, statistical failures, presuppositions and downright fraud due to industry influence. But if you browse through PubMed or PLOS for research in these areas, you will be hard-pressed to find negative implications for weightlifting or strength training. Positive implications abound.

Comment Re:Easy life (Score 4, Informative) 208

There have been many, many studies on this matter over the past couple decades. A couple of my favorite meta-aggregators of these studies are Rogue Health and Fitness and Mark's Dailly Apple (yeah, he's a paleo advocate, but he's also a former top competitive runner, Ironman winner, and currently a sculpted buff dude in his 60s -- and his wife only a few years younger looks like a fitness model). Even more interesting, look into guys like Art Devany. He and his wife are in their mid-70s, yet fitter than most people in their 40s.

Basically, the health promises of the 70s-80s were found to be false along several axes. The most notorious being recommendations for the low-fat, high-carb diet, but also the whole jogging/aerobics craze that started in the late 70s has been found to be empirically a failure. This is what led to the renewed interest in weight-lifting and other strength training. Long-duration, plodding exercise really isn't ideal to longevity. Running 10 miles a day used to be thought the peak of fitness, but really it results in muscle atrophy, heart strain, joint problems, etc...

And the problem with focusing on athletes is generally that they overdo it. Athletes are people singularly focused on *winning* not on health and longevity. Athletes will gladly trade a decade of life for a short-term competitive edge. This is what Mark Sisson (Mark's Daily Apple above) found. His competitive running had him constantly sick and/or injured. He scaled his workout way back, stopped the long-distance running, and focused more on short-duration high-intensity exercise to stimulate the hormesis/recovery cycle, and specifically worked on gaining muscle mass.

There is sort of a golden mean to exercise, recovery, muscle mass, strength, etc... And generally it looks about like the "fitness model" ideal for women and the wrestler physique for men. Muscular but not freakish. Slim but not skinny, low body fat, but not veins showing everywhere... you get the idea.

Side note: I was flying back from SCALE 13x last week, and ended up sitting next to a cardiologist who has been doing research in these areas. His synopsis: we should all be lifting weights, and lifting *heavy*.

Comment Re:Easy life (Score 4, Interesting) 208

Not at all the case, actually. I did the math on this once, based on the most conservative estimate of years added to live for moderate-to-intense exercise.

For one thing, it turns out that the best exercise is of fairly short duration. You can get all the strength training you need in 1 or 2 hours a week. Add another hour a week for some moderate aerobics and, make a few other "life hacks" such as a stand-up desk, and you have every likelihood of adding at least 5 years to your life. And we're not talking about those painful last 5 years where you can't do anything, but 5 years of vitality to your productive mid-life. And a good deal more mobility and independence during your last 10 years.

And let's just say you exercised at 3 hrs/week for 50 years, starting at age 30. By the time you are 80, you have burned up a grand total of 1 year exercising. Those other 4 years are gravy.

How about that? the 80/20 principle at work.

Slashdot Top Deals

Two can Live as Cheaply as One for Half as Long. -- Howard Kandel

Working...