In other words, you don't know what the difference is, and you've fallen prey to the idea that C/C++ are hard to code? You're right though -- anytime you code anything in C, you should recode everything else too. Maybe the same should be true of PHP and Perl, too.
Indeed. Java, which compiles to native cpu byte code, is apparently faster than perl and php, which don't (that I've heard of.) I didn't see any CGI/C tests nor mod_my_custom_code/apache. Valid tests here, but more comprehensiveness would have been nice. Anyone have that for me? (Nope, not language trolling today. Honest question.)
I wish I could suggest something good. As mentioned by someone else, the constraint and type mechanisms offered today in most products are horrendous, treasonous to the concepts they represent. You could read product manuals, but that won't give you a very good theoretical basis. You could read theory, but there are a lot of concepts in today's dbms' that the theoreticians don't address (not interesting, don't care, not useful in their eyes.) You'll have to do a bit of both. Look for the product manuals of the most feature-full databases, but ignore anything related to tuning, options, etc. That should give you a good idea of what sorts of things are made available in today's systems. For theory, read Chris Date, Hugh Darwen, and others (I think Amazon has a good "so you want to..." list somewhere of such books.) They cover the theory of relational operations, of datatypes (particularly in "The Third Manifesto", though I disagree with their proposals concerning type inheritance), and constraints (what they should be, and why.) Most everything you learn about databases applies equally well to programming languages and file systems (the converse is likely true as well.)
For an example of things gone wrong: there's a thread on-going right now on firebird-support about constraints, about how powerful they should be -- mostly because the more powerful a constraint is, the more likely it is to take a long time to verify after each change. Firebird only looks at modified rows when checking constraints, so checking things like "keep the total positive" become a problem. You can have the check constraint go call a stored procedure which will itself look at the whole table... but you get the idea, things would be messy. Someone, somewhere, didn't think that "full integrity constraints" were necessary, no matter what the theoreticians said. This is true of all current database systems.
Most database systems make very odd distinctions between all sorts of very closely related issues -- domains/datatypes are constraints on possible values of a variable/attribute, table/database constraints affect more than that, constraints are just functions that return a boolean-like value, which means they're functions -- and functions tend to be split up in most databases into stored procedures and check constraints (compiled bytecode specific to the database system, using PL/SQL or some variant), user-defined functions (usually a C dynamically loaded library) with mappings into the database (you tell the database where the function is, what to call it, what its parameters are, etc.), and built-in functions (come with server, can't rename, can't replace)... but tables and variables act just like functions with no parameters, in a sense, so they're related too. Triggers are functions called by events, where typical events are usually defined as before/after update/insert/delete in a table (but the list of possible events is really arbitrary.)
Also as mentioned in another response, yes, people (at least seem to) abuse the abilities of the database system in terms of stored procedures. It's argued they make it simpler and safer to create client applications -- by using views and stored procedures, you effectively design an entire SDK inside your database, and give client applications access only to see and do what you want, rather than giving them free reign over your tables (or somewhere in-between.) Most complaints with stored procedures center around the difficulty of finding your way through thousands of stored procedures (but the same is true of finding the function you need in any large library like java's or CPAN, etc.) or speed (valid complaint from an admin worried about CPU time, but invalid in the sense that it's not exactly the fault of the stored-procs.) That's part of the recurring "two- vs. three-tier" discussion. Databases (in theory) provide everything you need to put your business/app/whatever logic in a single place. In fact,
Re:Why MySQL? create user foo createdb;
on
Beginning PHP and MySQL
·
· Score: 5, Interesting
Last I heard, the same sorts of reasons were involved in Firebird (the dbms) not being commonly available from hosting companies -- the admin side of things isn't quite geared toward hundreds of independent DBA's all on the same server and all needing to be kept out of each others' stuff. I'm pretty sure hosting companies would also want to make sure you can't load your own modules (user-defined-functions) out of fear you might load something that crashes a lot, or has nasty side-effects. Stored-procs seem safer though. Then there's managing CPU/memory/disk resources trying to make sure no single user's queries monopolize the server (particularly badly-written queries.)
From what I've seen, people who use MySQL rarely have a good understanding of even the fundamentals of normalization, joins (all types), the difference between WHERE and HAVING, etc. -- stored procedures, constraints, domains, triggers, etc. are just entirely lost on them. They might start to see some benefits to another server system when they run into the quirks of MySQL (and particularly its data-integrity issues, silent conversions, "transactions", etc.)
But where's my C++/Firebird book? Or my Java/PostgreSQL book? Or my Cobol/Oracle book? What we really need to figure out is how we can learn from this duo (PHP/MySQL) what makes a good set of language bindings, a good database interface, and in general a good programmer experience. I'm sure we can improve these aspects in other languages, giving ourselves more (good) options.
... and they're still supported, and still work (as far as I know -- that code is now quite disabled.) At the time at least, mailslots were listed in the MSDN alongside shared-memory as good, valid ways of doing interprocess communication. Nothing was marked as deprecated, none of the issues I experienced were discussed, and... well, I was in a hurry. D'oh.
Yup, this would have been good to know a couple years ago when I wrote our client/server tcp stuff for our database app. (Initial revision had used samba 'mailslots' -- serverless-ish, damned slow, damned annoying across subnets, and did I mention really slow?) It was (is) responsible for forwarding refresh information from each client to other connected clients, to keep listviews refreshing with the data (callbacks to decide if the updates are relevant, etc.) It works, it's messy, it was a good learning experience, and it's going to be a pain to extend when that becomes necessary... I wish I had known I could just use this. (Oh, and we eventually gave our users a chat program embedded in our software, using the same protocol. From looking at the logs, they don't use it for anything work-related. Go figure.)
States and federal government are nothing but the expression of people's will -- you are part of your government, one way or another. (Unless you're too young to vote.) What you mean is that sometimes a minority, or a distant group of people, should get to decide for you, whether you like it or not, what laws should apply to you. I hope you don't actually want that; as much as it may seem to solve problems like slavery, it also invites every nation to write up laws for neighbors, for people with a stupid agenda to force that agenda down your throat, and otherwise make your life miserable more than necessary.
The problem has never been that there's a large body of laws that obviously make sense in one place but not another -- it's that people are stupid enough to create more laws (take away more rights) than necessary, and you'll wind up living under those laws if you can't separate yourself from the idiots. That's what local government does -- it shields you from stupidity elsewhere, at least temporarily. If everyone were kind, gentle, smart, and tolerant, we probably wouldn't need local laws to this extent -- but then we likely also wouldn't need laws at all.
Should the north have intervened in southern affairs over slavery? Absolutely -- take the slaves out, free them, give them part of the land they were in, and separate the two. Let the southerners have laws allowing them to have slaves, just don't let them actually have any. (By that, I mean "help those who want to be helped" -- if you don't want help, you're not really a slave, you're a volunteer.) We were a nation founded by a war of independence, we should understand that sometimes it's best to just let it go. Let people be stupid, together, elsewhere. Just protect those (in any place) who have no wish to be there, give them some way to get out. By staying in a place when you have the option to leave, you consent to the rules imposed on you.
(And no, those who don't like Bush shouldn't have to go to France. If they don't want to be under our rules, then yes, they should leave. If they consent to be under our rules, but also wish to change those rules, they should stay and fight. A lot of people really want to stay and fight to change their own nation, rather than leave, even if it means being imprisoned under the very rules they're fighting.)
You generally have rather high moderations to your comments, so I'll assume you're not trolling, and perhaps you're actually serious. (I considered modding you funny, if that's any indication.)
I understand your wish for simplicity, but let's consider the complexity we have right now, and mostly -why- we have it (and might want to keep it.)
Not only do you have the UN and international courts above the federal level, and districts between the federal and state level, but states are then divided into counties (or parishes?), cities/townships, and so forth. Each decreasingly-sized area (generally-speaking) gets to define its own local laws. Theoretically, if you don't like the laws in one area, you can move to another area more favorable to you. You can control your own environment without changing the environment for everyone, which lets us cohabitate a little more easily. If we were slightly more flexible with our geography and laws, and we were more willing to move to areas where we could be around people who actually agree with us in terms of laws, we would be creating mini-nations in which the citizens are happy with their government because it fits them perfectly. If you want your government to punish you for masterbating, I'm sure you can find enough other people to get together and form a little community in which such punishment is law. Everyone else would leave.
On the other hand, I've always hoped we could be smarter than that; first get the flexibility to have such a system (rather than all attempts and self-governance/independence being squashed for no good reason) then decide we don't need it. (Get freedom, then realize freedom is itself more worthwhile than whatever it was you were going to do with it?) Most of us agree on the most basic laws (murder, rape, etc.,) and a lot of laws people want aren't important to living around each other -- we just don't like to think our neighbors might be doing something together we don't agree with (why does sexuality always come up in this sort of discussion?) Sure, some people will always refuse to live under a government so free it allows "naughtiness" to go on in the bedroom... but I think a lot of us could be happy with such a small government. Just the basics. And then we wouldn't need quite so many divisions. But in the mean time... divisions can serve us well (though as we currently do them, they're rather arbitrary, they don't separate us based on our beliefs,... and they're admittedly rather stupid.) See? I know what I'm talking about. (Or I will when you tell me.)
The sun and earth aren't going to stop being radioactive just to meet our ideological demands. Nor is the earth going to stop existing just because it came about through a process we'd rather not have going on in our cities.
The point of the renewable-energy debate is rather to use energies we receive constantly from the sun and earth in the form of energy (already) rather than matter. Matter-conversion means we have to mine (and sometimes strip-mine) leaving surrounding miles in tatters for years to come. The earth also doesn't just produce more coal and oil on demand whenever we want it, and we already know we're going to run low on easily-accessed oil in the near future (likely our lifetimes.) After that, we can get more serious about mining, but that just makes a mess of the environment.
Unless we want to dig up the entire topsoil of our planet looking for dirt with slight quantities of something we want, we know we have access to energy (as such) in the form of heat, wind, light, ocean currents and waves, and plenty of others. We're looking for as low of a one-time cost as we can get in terms of tearing up our planet, with longer return-on-investment. You set up a wind turbine and just let it run. Sure, these technologies require us to dig up oils and metals for construction materials, but not for the energy itself. We'll have waste to deal with when turbines fail, but the waste won't be radioactive, nor will it be in the form of smoke/dust/particles which damage our lungs. Nothing's perfect. (Though the earth is an awfully big sink -- that core furnace could probably eat just about anything we throw to it. Seems a main problem is that every hole we find has stuff bubbling up, not so much going down. We could bury nuclear waste directly into tectonic plates right before the point at which they disappear into the earth... hey, it's an idea.)
Yes, other countries need energy "now" and are going to do whatever they can to get it. Nations that have already done this should probably go ahead and start the next phase of our energy evolution, pave the way, show it's possible, and be responsible citizens. Once newer nations have finished their growing pains, they'll hopefully join us.
You may not see us able to sustain our energy needs with new methods, but we can't currently deal with the waste-management issues either. If we must pick, I'd rather we pick energy-starvation rather than waste-overflow.
Presenting two differing points of view does not make something unbiased; even a billion points of view cannot provide objective reporting. Some of us don't favor "either of the candidates", some of us don't think this is a simple "liberal vs. conservative" spectrum of opinion. It won't matter if they throw in some "conservative"-related stuff, it's still biased editing -- assuming, that is, that their input pool isn't just as biased as their output pool seems to be. (You could correct that by submitting your own, non-lefty, stories.)
But more importantly, some of us realize that the benefit of slashdot isn't that the editors are unbiased, it's that the comments are only moderated, not censored. (And I just finished using up my mod points.) You and I are free to speak, to present alternate points of view... we can fight back, right here. And considering how few people "read the fucking article", it's possible your comments matter more than the story itself.
But do you really want the editors to throw you a bone by sending your way something you already agree with? Will it make your day better? Do you feel so oppressed and alone that the sympathy of slashdot editors would be sufficient to bring an end to your gloomy mood? You're not even in the minority, according to current presidential polls! ("Lefties" of course are welcome to be offended that slashdot editors would feel they need the extra boost of having mostly/nothing-but stories "in their favor".)
I've been watching the devel list as those creating fyracle have been asking about how to go about implementing this compatibility... don't expect these features to be merged into the main tree. Oracle's made some pretty silly design decisions along the way, and other database teams/vendors take exception at the suggestion they should reproduce the quirks found in other products. They're trying to build a good system from the ground up, nice and clean -- not copy every good or bad decision someone else made.
For some of us, that's a really good thing: ideas get re-thought and we get better solutions. For others, yes, that's a bad thing: software vendors go implementing their solutions for only one database server that costs out the butt, and think nothing of it -- software's expensive, why not make it more expensive? The client pays for it anyway, not the vendor. There are two solutions here: make a cheaper version of the database server (fyracle) or recode the application so it's not oracle-specific.
How many Oracle-clone databases do we need? Should we encourage vendors to continue making oracle-only software, should we encourage them to use badly-designed language features? (Oracle's a bit of a whore as far as implementing just about anything they think will get software sold -- even if it's an absolutely abysmal idea.)
Thanks, that pretty much answers that. It's sad, considering I've only come across a handful of research papers looking into how such merge plugins (rather, their api's) could be designed. The problem is related to (relational and other) databases: being able to specify that a value can, in fact, be updated by several users at once without a conflict; two users could both request $val += 20, and the end result could be $val += 40, if that's how the database designer wanted it to be. (For some problems, maybe most, but not all, that's a bad idea.) It's an extra level of flexibility we don't have, for really no good reason. Quite sad.
Do any of these systems have good support for automatic conflict-resolution? While we don't run into conflicts often, their annoyance is compounded by the obviousness of their resolution (that is, yes, it's easy for us to fix, but why should we have to?) We're still using CVS (oh, stop laughing already)... does anything else have support for (and preferably already-implemented) rules to auto-resolve conflicts?
... it's bipartisan politics because we let it be. When I get polled, the questions are: which of "the two" (Bush/Kerry) are you planning on voting for, and why (like him/dislike opponent/issues)... there's no room for saying that I -will- vote for a third candidate, nor to say that I'd rather vote for a third candidate.
With polls like that, no wonder everyone thinks the "independent candidates" are pointless to vote for -- we don't think they have a chance because we don't know how not-alone we are in our opinion, and our system makes our votes "useless" if not voting for the top two candidates.
If we had a smarter voting system, polls might make less sense -- your decision to vote for a candidate wouldn't have a reason to be influenced by who had the best chance of winning among your personal "okay" list. Rather than banning them (which is stupid and wrong) let's make them irrelevant?
Re:For those not using Macs...
on
iMac G5 Porn Roundup
·
· Score: 3, Informative
well, winzip opens it just fine... i'd guess it's not the only tool out there that can?
... which is why it'd be interesting to have teams from various CPU manufacturers helping software like GCC work better with their own products, with someone in charge of making sure they don't overstep their boundaries and suggest "improvements" in name only for other architectures (or at least make sure other teams are notified of anything relevant.)
I live down in south-western colorado; a majority of the people in this county are registered republicans, yet from talking to them, they really seem to be more democrat-leaning. I've yet to figure out how this works -- perhaps there are just one or two issues that take it all in their minds?
Regardless of whether or not our voting system attracts presidential candidates to "care" about our state (it's lip-service everywhere, I don't think we're missing out on much), do we expect people to say "I want the way I vote to possibly count less if I'm on the winning side"? If the republicans have the voting majority, they'll want to get the biggest bang out of it, which means keeping the all/nothing system. (The same would be true of democrats, I'm pretty sure. We're all power-hungry.)
For senate/congress -- if we're going to have everyone campaigning on party platforms, how 'bout we just all select the party platforms we like best (with an oz-style system so the votes to rare entries can still count for something) and then later elect people to fill those positions? 35% republican? Fine, republicans get 35% of the available seats, and you get to pick which candidates you want for those. Greens get 5%? That's fine, they may just get one seat, but at least they get one. Yes, it's two-phase, and yes, I'm sure some of us will hate it. But it'd be nice for the little guys to get a little say, as opposed to no say at all.
For president -- even if our state is proportional, our president isn't. Once elected, the fact that a president won by a margin of 1% doesn't seem to phase him; he'll continue to act as if they're the leaders of the whole country, representing the values of half of us. Our proportional vote would still be swaying a winner-takes-all at the national level. Every four years or so we bounce back and forth, hoping to equalize the various extreme measures taken. Nobody seems willing to say "yes, I was elected by people who mostly believe X, but on the whole, the people I work for believe Y -- so I'll do Y." Once you're elected, you're working for all of your constituents, not just those who voted for you. I don't see any good way to enforce this, but maybe we could try to convince them it's only ethical. (And yes, nobody who does this, they'll be called "whiners" and told they'll get another chance when the next election comes around.)
The political compass... for those of you looking for ways to express the (at least) two-dimensional nature of our politics. Somewhere in there, you can find charts with the relative positions of various world leaders, artists, current US 2004 presidential candidates, and more.
"SQL" didn't stand for anything at first, and now has several meanings of which 'simple' is one, 'structured' is another, etc. And if you use SQL a lot, you can find that it's anything but simple, particularly when it doesn't natively do what you need it to do. A few paragraphs of ugly joins, sub-queries, NULL-handling, and temp tables later, and you begin to realize that what you're doing could probably be done more easily by the server, if only it knew what you wanted -- but your language doesn't allow you to accurately express what you actually want, limiting you to a simple vocabulary.
There's a point at which you stop fixing something up, and just go ahead and replace it. Mistakes happen. Some of these guys were involved in the SQL specs the first time around, it's not like they never wanted to have anything to do with it.
As far as they're concerned, it's like a bunch of people thinking that math goes as far as their 4-function calculator, which is "good enough" for them. It is good enough, yes, for some people, but others want much more, and want a good way to express what they want. Symbolic math, symbolic relational operations, it's all the same idea. (Relational databases are firmly grounded in mathematics, it's not a stretch at all to use this simile.) The new language they propose (as an example only, not as a final product) isn't particularly hard to read and understand, but is much more expressive when you need it to be. You can do 6*8 using nothing but the '6', '8', and '+' keys, but wouldn't it be easier if they just gave you a '*' key, and while they're at it, made it easier to extend your calculator for new operators too?
There's a good whole chapter in "the third manifesto" concerned with mapping the current SQL language to the "D" language they propose; they don't want to force you to switch over without some time to learn, and they'd like to keep existing applications working on new server software as much as possible. Yes, they want to replace SQL, but want to give you a migration plan too. (Note, however, that the cost of using this SQL translation feature would be the same, more or less, as trying to switch to a different dbms vendor -- not all SQL is the same! Identical syntax can even give you different results on different servers!)
It's just who he is. Fabian Pascal, Chris Date, Hugh Darwen, and even sometimes Joe Celko (though the rest would likely never admit to it) have good ideas most of the time. But that's the purely academic part of who they are. Fabian reacts hotly to just about anything. Most of his posts on db-debunk are cynical in nature, with little else to offer. When I've tried to get useful clarification out of him, all I got was "read my book, I write so I only have to say anything once." After buying it and reading it thoroughly, I found I still had a question, because he seemed to contradict himself. His answer was, to paraphrase, "I can't convince you if you don't already believe." What a sad answer from an author whose book you're reading, and even worse from someone steeped in "truth", "proof", "logical correctness" and the like!
Communication is breaking down between those who are pretty sure they have a clue, and the rest, and it's not (as they seem to think) entirely the fault of those not in the know. They've given up, they feel they have no reason to try to teach anymore, and that's that. What's worse, there are very few people trying to push their ideas, so when they turn to cynicism, it reflects on their academic work as well. As suggested by Fabian's comments about usernames vs. 'real-world' names, it's hard to divorce the person pushing an idea from the idea itself. But we need to!
There's some good stuff in "the third manifesto", and more to be done. I'm saddened that part of the book is based on what they feel is obvious/established, and part of it is conjecture, but on the whole it presents a fresh look at a not-quite-old-yet idea. We should build on the shoulders of those who came before us, even if they've given up all hope. I hope the slashdot crowd won't give up on this group of researchers just because they can become hot-headed, stubborn, or even flat-out bitter. We've got work to do.
There's a significant difference between allowing communists (self-admitted, reported, suspected, or just disliked by others) in sensitive positions and allowing known spies in sensitive positions. The best option is to have no clue about someone's political views, to avoid fallacious thinking. That's why employers are required to disregard religion, ethnic background, political view, etc. when hiring -- none of it matters. What does matter is the integrity of the individual, which can only be judged on a per-case basis.
The secret ballot helps preserve this distinction, but we must be ever vigilant against this sort of profiling. A communist is not a traitor, and neither is a republican. A more effective spy would pose as a moderate, and might even be a moderate -- who said money can't buy allegiance, regardless of political conviction?
The solution in Interbase/Firebird (original MVCC?) was to setup the 'sweep' process to run when too much of a difference exists between transaction numbers (old/new active/useful -- it's a mess). You can disabled it and run sweeps manually, and they're not needed if you backup/restore on a regular basis, but eh... Firebird also cleans up unneeded record versions each time it reads a row (as I recall) to keep the db as clean as possible. That slows it down a bit on reads, but prevents rows from accumulating needlessly. What's not cleaned up by a read is cleaned up by a sweep later. (By the way, it's 2+ versions of a row -- if you have a long-running transaction in the background, there may be hundreds of record versions accumulating during that time.) Okay, so my memory of "how it works" is a bit fuzzy.
When we took him to a vet in Tulsa right before going overseas, I wound up having to retrieve him from the back of a now-fluffy dog cage in the back room, where he was holding everyone off with hissing. They had had every assistant holding him down, still unable to give him a shot. And it was worse when he was getting a butt smear to check for worms. We could have sworn it was a human child screaming. He loves being held upside-down; he's afraid of the vacuum cleaner, though he's grown out of it slightly (as a kitten, he would refuse to touch a recently-vacuumed floor for hours after the fact) -- but he's deathly afraid of light fixtures/fans (if he happens to look up while being held.) And my post-it notes are never safe around him.
He likes bread crumbs, flour, lime sherbet, and granola, yet manages to refuse to eat buffalo, beef, or even chicken under most circumstances. (We tried to put him on a "more natural for cats" diet -- that failed, even trying both raw and cooked meats, hot and cold, with and without veggie/calcium/vitamin add-ins. As did training him to use a human toilet rather than a litter box. It was just "impossible" for him to place his paws that way.)
except the hash isn't part of the hash. if i wanted to modify it, knowing this method, all i have to do is modify the executable part, hash it again, and re-insert. at best, the checksum lets me know i got the copy intended by the sender, nothing more.
even if the hash were part of the hash (come to think of it), having a method for generating such executables would still make tampering possible. at best, it'd make it a slow process (assuming it's not something you can generate in O(1) time.)
In other words, you don't know what the difference is, and you've fallen prey to the idea that C/C++ are hard to code? You're right though -- anytime you code anything in C, you should recode everything else too. Maybe the same should be true of PHP and Perl, too.
Indeed. Java, which compiles to native cpu byte code, is apparently faster than perl and php, which don't (that I've heard of.) I didn't see any CGI/C tests nor mod_my_custom_code/apache. Valid tests here, but more comprehensiveness would have been nice. Anyone have that for me? (Nope, not language trolling today. Honest question.)
[Crap. This is a book now. Sorry.]
... but you get the idea, things would be messy. Someone, somewhere, didn't think that "full integrity constraints" were necessary, no matter what the theoreticians said. This is true of all current database systems.
... but tables and variables act just like functions with no parameters, in a sense, so they're related too. Triggers are functions called by events, where typical events are usually defined as before/after update/insert/delete in a table (but the list of possible events is really arbitrary.)
I wish I could suggest something good. As mentioned by someone else, the constraint and type mechanisms offered today in most products are horrendous, treasonous to the concepts they represent. You could read product manuals, but that won't give you a very good theoretical basis. You could read theory, but there are a lot of concepts in today's dbms' that the theoreticians don't address (not interesting, don't care, not useful in their eyes.) You'll have to do a bit of both. Look for the product manuals of the most feature-full databases, but ignore anything related to tuning, options, etc. That should give you a good idea of what sorts of things are made available in today's systems. For theory, read Chris Date, Hugh Darwen, and others (I think Amazon has a good "so you want to..." list somewhere of such books.) They cover the theory of relational operations, of datatypes (particularly in "The Third Manifesto", though I disagree with their proposals concerning type inheritance), and constraints (what they should be, and why.) Most everything you learn about databases applies equally well to programming languages and file systems (the converse is likely true as well.)
For an example of things gone wrong: there's a thread on-going right now on firebird-support about constraints, about how powerful they should be -- mostly because the more powerful a constraint is, the more likely it is to take a long time to verify after each change. Firebird only looks at modified rows when checking constraints, so checking things like "keep the total positive" become a problem. You can have the check constraint go call a stored procedure which will itself look at the whole table
Most database systems make very odd distinctions between all sorts of very closely related issues -- domains/datatypes are constraints on possible values of a variable/attribute, table/database constraints affect more than that, constraints are just functions that return a boolean-like value, which means they're functions -- and functions tend to be split up in most databases into stored procedures and check constraints (compiled bytecode specific to the database system, using PL/SQL or some variant), user-defined functions (usually a C dynamically loaded library) with mappings into the database (you tell the database where the function is, what to call it, what its parameters are, etc.), and built-in functions (come with server, can't rename, can't replace)
Also as mentioned in another response, yes, people (at least seem to) abuse the abilities of the database system in terms of stored procedures. It's argued they make it simpler and safer to create client applications -- by using views and stored procedures, you effectively design an entire SDK inside your database, and give client applications access only to see and do what you want, rather than giving them free reign over your tables (or somewhere in-between.) Most complaints with stored procedures center around the difficulty of finding your way through thousands of stored procedures (but the same is true of finding the function you need in any large library like java's or CPAN, etc.) or speed (valid complaint from an admin worried about CPU time, but invalid in the sense that it's not exactly the fault of the stored-procs.) That's part of the recurring "two- vs. three-tier" discussion. Databases (in theory) provide everything you need to put your business/app/whatever logic in a single place. In fact,
Last I heard, the same sorts of reasons were involved in Firebird (the dbms) not being commonly available from hosting companies -- the admin side of things isn't quite geared toward hundreds of independent DBA's all on the same server and all needing to be kept out of each others' stuff. I'm pretty sure hosting companies would also want to make sure you can't load your own modules (user-defined-functions) out of fear you might load something that crashes a lot, or has nasty side-effects. Stored-procs seem safer though. Then there's managing CPU/memory/disk resources trying to make sure no single user's queries monopolize the server (particularly badly-written queries.)
From what I've seen, people who use MySQL rarely have a good understanding of even the fundamentals of normalization, joins (all types), the difference between WHERE and HAVING, etc. -- stored procedures, constraints, domains, triggers, etc. are just entirely lost on them. They might start to see some benefits to another server system when they run into the quirks of MySQL (and particularly its data-integrity issues, silent conversions, "transactions", etc.)
But where's my C++/Firebird book? Or my Java/PostgreSQL book? Or my Cobol/Oracle book? What we really need to figure out is how we can learn from this duo (PHP/MySQL) what makes a good set of language bindings, a good database interface, and in general a good programmer experience. I'm sure we can improve these aspects in other languages, giving ourselves more (good) options.
... and they're still supported, and still work (as far as I know -- that code is now quite disabled.) At the time at least, mailslots were listed in the MSDN alongside shared-memory as good, valid ways of doing interprocess communication. Nothing was marked as deprecated, none of the issues I experienced were discussed, and ... well, I was in a hurry. D'oh.
Yup, this would have been good to know a couple years ago when I wrote our client/server tcp stuff for our database app. (Initial revision had used samba 'mailslots' -- serverless-ish, damned slow, damned annoying across subnets, and did I mention really slow?) It was (is) responsible for forwarding refresh information from each client to other connected clients, to keep listviews refreshing with the data (callbacks to decide if the updates are relevant, etc.) It works, it's messy, it was a good learning experience, and it's going to be a pain to extend when that becomes necessary ... I wish I had known I could just use this. (Oh, and we eventually gave our users a chat program embedded in our software, using the same protocol. From looking at the logs, they don't use it for anything work-related. Go figure.)
States and federal government are nothing but the expression of people's will -- you are part of your government, one way or another. (Unless you're too young to vote.) What you mean is that sometimes a minority, or a distant group of people, should get to decide for you, whether you like it or not, what laws should apply to you. I hope you don't actually want that; as much as it may seem to solve problems like slavery, it also invites every nation to write up laws for neighbors, for people with a stupid agenda to force that agenda down your throat, and otherwise make your life miserable more than necessary.
The problem has never been that there's a large body of laws that obviously make sense in one place but not another -- it's that people are stupid enough to create more laws (take away more rights) than necessary, and you'll wind up living under those laws if you can't separate yourself from the idiots. That's what local government does -- it shields you from stupidity elsewhere, at least temporarily. If everyone were kind, gentle, smart, and tolerant, we probably wouldn't need local laws to this extent -- but then we likely also wouldn't need laws at all.
Should the north have intervened in southern affairs over slavery? Absolutely -- take the slaves out, free them, give them part of the land they were in, and separate the two. Let the southerners have laws allowing them to have slaves, just don't let them actually have any. (By that, I mean "help those who want to be helped" -- if you don't want help, you're not really a slave, you're a volunteer.) We were a nation founded by a war of independence, we should understand that sometimes it's best to just let it go. Let people be stupid, together, elsewhere. Just protect those (in any place) who have no wish to be there, give them some way to get out. By staying in a place when you have the option to leave, you consent to the rules imposed on you.
(And no, those who don't like Bush shouldn't have to go to France. If they don't want to be under our rules, then yes, they should leave. If they consent to be under our rules, but also wish to change those rules, they should stay and fight. A lot of people really want to stay and fight to change their own nation, rather than leave, even if it means being imprisoned under the very rules they're fighting.)
You generally have rather high moderations to your comments, so I'll assume you're not trolling, and perhaps you're actually serious. (I considered modding you funny, if that's any indication.)
... but I think a lot of us could be happy with such a small government. Just the basics. And then we wouldn't need quite so many divisions. But in the mean time ... divisions can serve us well (though as we currently do them, they're rather arbitrary, they don't separate us based on our beliefs, ... and they're admittedly rather stupid.) See? I know what I'm talking about. (Or I will when you tell me.)
I understand your wish for simplicity, but let's consider the complexity we have right now, and mostly -why- we have it (and might want to keep it.)
Not only do you have the UN and international courts above the federal level, and districts between the federal and state level, but states are then divided into counties (or parishes?), cities/townships, and so forth. Each decreasingly-sized area (generally-speaking) gets to define its own local laws. Theoretically, if you don't like the laws in one area, you can move to another area more favorable to you. You can control your own environment without changing the environment for everyone, which lets us cohabitate a little more easily. If we were slightly more flexible with our geography and laws, and we were more willing to move to areas where we could be around people who actually agree with us in terms of laws, we would be creating mini-nations in which the citizens are happy with their government because it fits them perfectly. If you want your government to punish you for masterbating, I'm sure you can find enough other people to get together and form a little community in which such punishment is law. Everyone else would leave.
On the other hand, I've always hoped we could be smarter than that; first get the flexibility to have such a system (rather than all attempts and self-governance/independence being squashed for no good reason) then decide we don't need it. (Get freedom, then realize freedom is itself more worthwhile than whatever it was you were going to do with it?) Most of us agree on the most basic laws (murder, rape, etc.,) and a lot of laws people want aren't important to living around each other -- we just don't like to think our neighbors might be doing something together we don't agree with (why does sexuality always come up in this sort of discussion?) Sure, some people will always refuse to live under a government so free it allows "naughtiness" to go on in the bedroom
The sun and earth aren't going to stop being radioactive just to meet our ideological demands. Nor is the earth going to stop existing just because it came about through a process we'd rather not have going on in our cities.
... hey, it's an idea.)
The point of the renewable-energy debate is rather to use energies we receive constantly from the sun and earth in the form of energy (already) rather than matter. Matter-conversion means we have to mine (and sometimes strip-mine) leaving surrounding miles in tatters for years to come. The earth also doesn't just produce more coal and oil on demand whenever we want it, and we already know we're going to run low on easily-accessed oil in the near future (likely our lifetimes.) After that, we can get more serious about mining, but that just makes a mess of the environment.
Unless we want to dig up the entire topsoil of our planet looking for dirt with slight quantities of something we want, we know we have access to energy (as such) in the form of heat, wind, light, ocean currents and waves, and plenty of others. We're looking for as low of a one-time cost as we can get in terms of tearing up our planet, with longer return-on-investment. You set up a wind turbine and just let it run. Sure, these technologies require us to dig up oils and metals for construction materials, but not for the energy itself. We'll have waste to deal with when turbines fail, but the waste won't be radioactive, nor will it be in the form of smoke/dust/particles which damage our lungs. Nothing's perfect. (Though the earth is an awfully big sink -- that core furnace could probably eat just about anything we throw to it. Seems a main problem is that every hole we find has stuff bubbling up, not so much going down. We could bury nuclear waste directly into tectonic plates right before the point at which they disappear into the earth
Yes, other countries need energy "now" and are going to do whatever they can to get it. Nations that have already done this should probably go ahead and start the next phase of our energy evolution, pave the way, show it's possible, and be responsible citizens. Once newer nations have finished their growing pains, they'll hopefully join us.
You may not see us able to sustain our energy needs with new methods, but we can't currently deal with the waste-management issues either. If we must pick, I'd rather we pick energy-starvation rather than waste-overflow.
"Either way", "pro-kerry", "pro-bush" ...
... we can fight back, right here. And considering how few people "read the fucking article", it's possible your comments matter more than the story itself.
Presenting two differing points of view does not make something unbiased; even a billion points of view cannot provide objective reporting. Some of us don't favor "either of the candidates", some of us don't think this is a simple "liberal vs. conservative" spectrum of opinion. It won't matter if they throw in some "conservative"-related stuff, it's still biased editing -- assuming, that is, that their input pool isn't just as biased as their output pool seems to be. (You could correct that by submitting your own, non-lefty, stories.)
But more importantly, some of us realize that the benefit of slashdot isn't that the editors are unbiased, it's that the comments are only moderated, not censored. (And I just finished using up my mod points.) You and I are free to speak, to present alternate points of view
But do you really want the editors to throw you a bone by sending your way something you already agree with? Will it make your day better? Do you feel so oppressed and alone that the sympathy of slashdot editors would be sufficient to bring an end to your gloomy mood? You're not even in the minority, according to current presidential polls! ("Lefties" of course are welcome to be offended that slashdot editors would feel they need the extra boost of having mostly/nothing-but stories "in their favor".)
I've been watching the devel list as those creating fyracle have been asking about how to go about implementing this compatibility ... don't expect these features to be merged into the main tree. Oracle's made some pretty silly design decisions along the way, and other database teams/vendors take exception at the suggestion they should reproduce the quirks found in other products. They're trying to build a good system from the ground up, nice and clean -- not copy every good or bad decision someone else made.
For some of us, that's a really good thing: ideas get re-thought and we get better solutions. For others, yes, that's a bad thing: software vendors go implementing their solutions for only one database server that costs out the butt, and think nothing of it -- software's expensive, why not make it more expensive? The client pays for it anyway, not the vendor. There are two solutions here: make a cheaper version of the database server (fyracle) or recode the application so it's not oracle-specific.
How many Oracle-clone databases do we need? Should we encourage vendors to continue making oracle-only software, should we encourage them to use badly-designed language features? (Oracle's a bit of a whore as far as implementing just about anything they think will get software sold -- even if it's an absolutely abysmal idea.)
Thanks, that pretty much answers that. It's sad, considering I've only come across a handful of research papers looking into how such merge plugins (rather, their api's) could be designed. The problem is related to (relational and other) databases: being able to specify that a value can, in fact, be updated by several users at once without a conflict; two users could both request $val += 20, and the end result could be $val += 40, if that's how the database designer wanted it to be. (For some problems, maybe most, but not all, that's a bad idea.) It's an extra level of flexibility we don't have, for really no good reason. Quite sad.
Do any of these systems have good support for automatic conflict-resolution? While we don't run into conflicts often, their annoyance is compounded by the obviousness of their resolution (that is, yes, it's easy for us to fix, but why should we have to?) We're still using CVS (oh, stop laughing already) ... does anything else have support for (and preferably already-implemented) rules to auto-resolve conflicts?
When it's an automatically-dialed phone poll with touch-tone answering and two choices each time ... that gets harder.
... it's bipartisan politics because we let it be. When I get polled, the questions are: which of "the two" (Bush/Kerry) are you planning on voting for, and why (like him/dislike opponent/issues) ... there's no room for saying that I -will- vote for a third candidate, nor to say that I'd rather vote for a third candidate.
With polls like that, no wonder everyone thinks the "independent candidates" are pointless to vote for -- we don't think they have a chance because we don't know how not-alone we are in our opinion, and our system makes our votes "useless" if not voting for the top two candidates.
If we had a smarter voting system, polls might make less sense -- your decision to vote for a candidate wouldn't have a reason to be influenced by who had the best chance of winning among your personal "okay" list. Rather than banning them (which is stupid and wrong) let's make them irrelevant?
well, winzip opens it just fine ... i'd guess it's not the only tool out there that can?
... which is why it'd be interesting to have teams from various CPU manufacturers helping software like GCC work better with their own products, with someone in charge of making sure they don't overstep their boundaries and suggest "improvements" in name only for other architectures (or at least make sure other teams are notified of anything relevant.)
I live down in south-western colorado; a majority of the people in this county are registered republicans, yet from talking to them, they really seem to be more democrat-leaning. I've yet to figure out how this works -- perhaps there are just one or two issues that take it all in their minds?
Regardless of whether or not our voting system attracts presidential candidates to "care" about our state (it's lip-service everywhere, I don't think we're missing out on much), do we expect people to say "I want the way I vote to possibly count less if I'm on the winning side"? If the republicans have the voting majority, they'll want to get the biggest bang out of it, which means keeping the all/nothing system. (The same would be true of democrats, I'm pretty sure. We're all power-hungry.)
For senate/congress -- if we're going to have everyone campaigning on party platforms, how 'bout we just all select the party platforms we like best (with an oz-style system so the votes to rare entries can still count for something) and then later elect people to fill those positions? 35% republican? Fine, republicans get 35% of the available seats, and you get to pick which candidates you want for those. Greens get 5%? That's fine, they may just get one seat, but at least they get one. Yes, it's two-phase, and yes, I'm sure some of us will hate it. But it'd be nice for the little guys to get a little say, as opposed to no say at all.
For president -- even if our state is proportional, our president isn't. Once elected, the fact that a president won by a margin of 1% doesn't seem to phase him; he'll continue to act as if they're the leaders of the whole country, representing the values of half of us. Our proportional vote would still be swaying a winner-takes-all at the national level. Every four years or so we bounce back and forth, hoping to equalize the various extreme measures taken. Nobody seems willing to say "yes, I was elected by people who mostly believe X, but on the whole, the people I work for believe Y -- so I'll do Y." Once you're elected, you're working for all of your constituents, not just those who voted for you. I don't see any good way to enforce this, but maybe we could try to convince them it's only ethical. (And yes, nobody who does this, they'll be called "whiners" and told they'll get another chance when the next election comes around.)
The political compass ... for those of you looking for ways to express the (at least) two-dimensional nature of our politics. Somewhere in there, you can find charts with the relative positions of various world leaders, artists, current US 2004 presidential candidates, and more.
"SQL" didn't stand for anything at first, and now has several meanings of which 'simple' is one, 'structured' is another, etc. And if you use SQL a lot, you can find that it's anything but simple, particularly when it doesn't natively do what you need it to do. A few paragraphs of ugly joins, sub-queries, NULL-handling, and temp tables later, and you begin to realize that what you're doing could probably be done more easily by the server, if only it knew what you wanted -- but your language doesn't allow you to accurately express what you actually want, limiting you to a simple vocabulary.
There's a point at which you stop fixing something up, and just go ahead and replace it. Mistakes happen. Some of these guys were involved in the SQL specs the first time around, it's not like they never wanted to have anything to do with it.
As far as they're concerned, it's like a bunch of people thinking that math goes as far as their 4-function calculator, which is "good enough" for them. It is good enough, yes, for some people, but others want much more, and want a good way to express what they want. Symbolic math, symbolic relational operations, it's all the same idea. (Relational databases are firmly grounded in mathematics, it's not a stretch at all to use this simile.) The new language they propose (as an example only, not as a final product) isn't particularly hard to read and understand, but is much more expressive when you need it to be. You can do 6*8 using nothing but the '6', '8', and '+' keys, but wouldn't it be easier if they just gave you a '*' key, and while they're at it, made it easier to extend your calculator for new operators too?
There's a good whole chapter in "the third manifesto" concerned with mapping the current SQL language to the "D" language they propose; they don't want to force you to switch over without some time to learn, and they'd like to keep existing applications working on new server software as much as possible. Yes, they want to replace SQL, but want to give you a migration plan too. (Note, however, that the cost of using this SQL translation feature would be the same, more or less, as trying to switch to a different dbms vendor -- not all SQL is the same! Identical syntax can even give you different results on different servers!)
It's just who he is. Fabian Pascal, Chris Date, Hugh Darwen, and even sometimes Joe Celko (though the rest would likely never admit to it) have good ideas most of the time. But that's the purely academic part of who they are. Fabian reacts hotly to just about anything. Most of his posts on db-debunk are cynical in nature, with little else to offer. When I've tried to get useful clarification out of him, all I got was "read my book, I write so I only have to say anything once." After buying it and reading it thoroughly, I found I still had a question, because he seemed to contradict himself. His answer was, to paraphrase, "I can't convince you if you don't already believe." What a sad answer from an author whose book you're reading, and even worse from someone steeped in "truth", "proof", "logical correctness" and the like!
Communication is breaking down between those who are pretty sure they have a clue, and the rest, and it's not (as they seem to think) entirely the fault of those not in the know. They've given up, they feel they have no reason to try to teach anymore, and that's that. What's worse, there are very few people trying to push their ideas, so when they turn to cynicism, it reflects on their academic work as well. As suggested by Fabian's comments about usernames vs. 'real-world' names, it's hard to divorce the person pushing an idea from the idea itself. But we need to!
There's some good stuff in "the third manifesto", and more to be done. I'm saddened that part of the book is based on what they feel is obvious/established, and part of it is conjecture, but on the whole it presents a fresh look at a not-quite-old-yet idea. We should build on the shoulders of those who came before us, even if they've given up all hope. I hope the slashdot crowd won't give up on this group of researchers just because they can become hot-headed, stubborn, or even flat-out bitter. We've got work to do.
... no, he was not right.
There's a significant difference between allowing communists (self-admitted, reported, suspected, or just disliked by others) in sensitive positions and allowing known spies in sensitive positions. The best option is to have no clue about someone's political views, to avoid fallacious thinking. That's why employers are required to disregard religion, ethnic background, political view, etc. when hiring -- none of it matters. What does matter is the integrity of the individual, which can only be judged on a per-case basis.
The secret ballot helps preserve this distinction, but we must be ever vigilant against this sort of profiling. A communist is not a traitor, and neither is a republican. A more effective spy would pose as a moderate, and might even be a moderate -- who said money can't buy allegiance, regardless of political conviction?
The solution in Interbase/Firebird (original MVCC?) was to setup the 'sweep' process to run when too much of a difference exists between transaction numbers (old/new active/useful -- it's a mess). You can disabled it and run sweeps manually, and they're not needed if you backup/restore on a regular basis, but eh ... Firebird also cleans up unneeded record versions each time it reads a row (as I recall) to keep the db as clean as possible. That slows it down a bit on reads, but prevents rows from accumulating needlessly. What's not cleaned up by a read is cleaned up by a sweep later. (By the way, it's 2+ versions of a row -- if you have a long-running transaction in the background, there may be hundreds of record versions accumulating during that time.) Okay, so my memory of "how it works" is a bit fuzzy.
That is a -nice- tail.
(Indy's folder)
When we took him to a vet in Tulsa right before going overseas, I wound up having to retrieve him from the back of a now-fluffy dog cage in the back room, where he was holding everyone off with hissing. They had had every assistant holding him down, still unable to give him a shot. And it was worse when he was getting a butt smear to check for worms. We could have sworn it was a human child screaming. He loves being held upside-down; he's afraid of the vacuum cleaner, though he's grown out of it slightly (as a kitten, he would refuse to touch a recently-vacuumed floor for hours after the fact) -- but he's deathly afraid of light fixtures/fans (if he happens to look up while being held.) And my post-it notes are never safe around him.
He likes bread crumbs, flour, lime sherbet, and granola, yet manages to refuse to eat buffalo, beef, or even chicken under most circumstances. (We tried to put him on a "more natural for cats" diet -- that failed, even trying both raw and cooked meats, hot and cold, with and without veggie/calcium/vitamin add-ins. As did training him to use a human toilet rather than a litter box. It was just "impossible" for him to place his paws that way.)
except the hash isn't part of the hash. if i wanted to modify it, knowing this method, all i have to do is modify the executable part, hash it again, and re-insert. at best, the checksum lets me know i got the copy intended by the sender, nothing more.
even if the hash were part of the hash (come to think of it), having a method for generating such executables would still make tampering possible. at best, it'd make it a slow process (assuming it's not something you can generate in O(1) time.)