4 days Ago
The Quino ORM manages all CrUD—Create, Update, Delete—operations for your application. This basic behavior is generally more than enough for standard user interfaces. When a user works with a single object in a window and saves it, there really isn’t that much to optimize.
A more complex editing process may include several objects at once and perhaps trigger events that create additional auditing objects. Even in these cases, there are still only a handful of save operations to execute. To keep the architecture clean, an application is encouraged to model these higher-level operations with methods in the metadata (modeled methods).
The advantage to using modeled methods is that they can be executed in an application server as well as locally in the client. When an application uses a remote application server rather than a direct connection to a database, modeled methods are executed in the service layer and therefore have much less latency to the database.
When Quino’s query language isn’t enough
If an application needs even more optimization, then it may be necessary to write custom SQL—or even to use stored procedures to move the query into the database. Mixing SQL with an ORM can be a tricky business. It’s even more of a challenge with an ORM like that in Quino, which generates the database schema and shields the user from tables, fields and SQL syntax almost entirely.
What are the potential pitfalls when using custom query text (e.g. SQL) with Quino?
There are two approaches to executing custom code:
All of the examples below are taken directly from the Quino test suite. Some variables—like
Using ADO directly
You can use the
The first example shows a test from the Quino framework that shows how easy it is to combine results returned from another method into a standard Quino query.
The ADO-access code is hidden inside the call to
There are a few drawbacks to this approach:
In the second part, we will improve on this approach by using the
Stay tuned for part 2, coming soon!
Many thanks to Urs for proofreading and suggestions on overall structure.
 This article uses features of Quino that will only become available in version 1.12. Almost all of the examples will also work in earlier versions but the
 More likely, though, is that the Quino schema migration will be prevented from applying updates if there are custom stored procedures that use tables and columns that need to be changed.↩
Mixing your own SQL into Quino queries: part 1 of 2
 In IMDb, it looks like this was Hauer’s first American movie—everything else before that was Dutch.↩
 I have that one in my list of thrillers to watch, but this one came on TV instead.↩
2 weeks Ago
She tells of Cecily McMillan, who was beaten into a seizure by police offers and who two years later stands trial for assaulting a police officer, facing seven years in prison. The officer’s record of having beaten other suspects was deemed inadmissable.
Or there is the other recent case of a black woman who tried to stand her ground, as others have successfully done. She fired a warning shot into the air, killing no one, not even wounding anyone. These were the actions of “Marissa Alexander, a PhD and mom who [wanted to] stop her husband from beating her,” That’s not a good reason, is it? Are we even sure that her husband isn’t allowed to beat her in that state? And that’s not nearly as good a reason as the guy had who killed a boy in the back-seat of his SUV for playing music too loud. Not guilty! But Marissa’s going to go away for a long time for her transgression.
Who does this uppity woman think she is? Does she think she’s white? Rich? A citizen? A human being? Do not speak of justice in a system that produces hypocrisy on this scale. And the system does everything it can to make being poor or disadvantaged increase chances of prosecution dramatically.
We still have jury trials in the States; this means that non-professional, easily misled and nigh-constantly deluded undereducated head-cases are deciding your fate. Those are your peers. They can’t string two logical sentences together; what are the odds that they can wend their way through the facts of the case to come to a just conclusion? Nearly zero. What are the odds that they will decide your fate based on how you dress or act rather than evidence? Nearly certain.
And people who haven’t yet been convicted are made to suffer beforehand. The unconvicted are left to stew behind bars because they can’t afford ridiculous bail. The homeless guy who was recently broiled to death in Riker’s Island because he couldn’t pay $2500 for bail on his charge of loitering was in jail for this reason. He was luckier than the homeless guy in the SouthWest U.S. who was executed by police officers for the same crime. Sure, those are anecdotes, but that doesn’t change the fact that “[…] the average defendant [is] a person of colour charged with a drug crime.” And more and more prisoners are going away for longer sentences; more and more people are taking years before they get their trial.
As mentioned above, 95% just take the plea bargain in order to get some form of a life back. This is a life with a felony record and drastically reduced chances of making anything of yourself in a society that hates its ex-cons.
If you don’t plea out, you lose your life savings and may still go to jail. If you do plea out, you lose all chance of ever making decent money again. You see? In America, you still have the freedom to choose.
The article Big data: are we making a big mistake? (Financial Times) bursts the bubble of the wide-eyed, overconfident and underinformed techies who think that their giant piles of data will fix everything. The article contains many interesting examples, some of which are touched on in the conclusion, cited below:
The upshot is that you think your data is “big” but it is most likely not big enough. Whereas sampling bias is diminished compared to smaller datasets, the claims made based on the big data are correspondingly bigger, eradicating the increased confidence. Selectively filtering results to focus on the expected result is a pitfall not necessarily of bad statistics, but of bad scientists/engineers as well.
The article is a good read for those who can get behind the FT paywall or who haven’t used up all of their “free views” for the year.
I am so tired of hearing of scintillatingly smart people who can’t seem to ever say anything that is even tangentially well-informed. We knew that the Bush administration was a booby-hatch full of cantankerous old farts who hadn’t been right about anything or even had an original thought since before it became illegal to beat your wife and black people, not necessarily in that order. That doesn’t excuse them in any way at all, but they didn’t even really have a veneer of intelligentsia to them.
And now we have a new administration full of supposed young guns, ready to take on the 21st century. Not only is the Obama administration a moral and ethical failure throughout the whole spectrum but this supposedly technically savvy and hyper-informed and educated pile of Rhodes and Constitutional scholars can’t even seem to grasp the basics of human interaction beyond that which you would find in any neighborhood sandbox. They are a bunch of kindergartners who don’t know enough to shut up and let the grownups handle things.
They are so seduced by what they continue to cling to as U.S. hegemony and power that they coast along, not even bothering to make up a story that even halfway jibes with reality. We end up with policy that is not only criminally stupid and dishonest and offensive to anyone with half a brain and half an education who’s read half a history book or even half-paid attention to current events, but it will drag the hubris-laden vessel of the U.S.—and likely a lot of the rest of world with it—to very murky depths before they’re through.
There is no need for diplomacy when you can just stamp your foot and scream and make up all of your own history and facts and information and have the sails of your stupidity belled out by the hot air blown in vast and steaming amounts by a slavish corporate media intent on selling lies that will buoy their bottom lines for the next quarter. And to hell with the rest of it. I got mine, jack.
Obama stood in front of an assembly in Bruges and dribbled out the most spectacularly uninformed and nuance-free drivel you could imagine, all but starting World War III with seemingly nary a thought that others on the planet may not have the global domination of the U.S. as a core guiding principle.
His advisors and helpmeets are no better, with the bevy of women he’s appointed to relatively high office doing absolutely nothing to provide evidence to support the theory that if women ruled the world, we’d have less violence. To the contrary, Samantha “boom-boom” Power nearly fell on her Russian counterpart with savage blows before she got herself under control.
There is a severe problem when the lunatics run the asylum. It is even worse when they forget where reality ends and their own propaganda begins.
John Kerry is another such laughable idiot—a buffoon if there ever was one—who doesn’t waste a single second trying to convince anyone of anything—instead averring with such a self-assured knowledge that he is telling the gospel truth that it is hard to believe that he could even tell the difference anymore.
All of these fools steamroll right past the ironies, hypocrisies and shocking double-standards that abound in all of their argumentation, assuming that we are so much stupider than they. It may well be that most people will simply go along with what these scholars say because they feel that such smart people could not possibly be deluded on so grandiose a scale.
Those believers are sadly mistaken. This is not the first time that the lunatics are at the helm. It is arguable that it has always been thus. That does not in any way make it more palatable.
Perhaps these leading lights of the U.S. State Department are justified in their cynicism. But I simply want it noted that people who are purportedly intelligent but spend all of their time grubbing for power and saying the most mind-bogglingly inane and provably false things should not be heeded. Their original intelligence does not matter because they are not employing it. At all. That they know better but are cynically manipulating the world for their personal gain is not even cold comfort. Far better if we could just get them to leave us alone.
And don’t think that this vapidity is confined to the administration and its hangers-on. The Republican love of Putin is a pure knee-jerk reaction against the Obama administration, nothing more. They are not handling this any better nor are they exhibiting any greater level of intelligence than does a plant when it leans toward the sun.
Putin is not a grand guy but he is rational, he can be eminently reasonable and he seems to have the best interests of his country at heart. He has also exhibited absolutely no designs on taking over other countries. Crimea was not a takeover. The situation was forced on him by any logical reading of the events. That the U.S. paints this in any other way is so disingenuous and cynical that it’s nearly warping the space-time continuum. Be that as it may, all of the things listed above could be used as levers by diplomats worth their name in order to come to an agreement with Russia. But an agreement is not what is sought.
What is sought instead by the U.S. is utter domination and degradation and capitulation on the part of any other country that has a whit of power remaining. Countries like Russia and Chine will not bow so easily—nor do they have any reason to, when one looks at the facts and the reality rather than the mythic world of American exceptionalism. The Idiocracy that is America is shooting itself in the foot time and again, thinking that it can create history and bend reality and facts to its whims. The rest of the world tires of these spoiled-child antics and just wishes the U.S. would go away.
Kerry leaps to support the rebels in Venezuela—but it is a rebellion of the rich against the poor, throwing a temper tantrum because they want their country back in the hands of a few oligarchic families. But the OAS was recently asked by the U.S. to vote for intervention and overthrow of Maduro in Venezuela. The U.S. received a resounding NO, with only Canada and Panama voting in favor. Everyone else in the OAS told the U.S. (and Canada) to go f&%*k themselves. And rightly so. Because only an immoral jackass would support a “revolution” promulgated by the upper class against the poor. When put that way, it makes sense that Kerry was for it.
When Honduras was overthrown by an extreme right-wing party, the Obama administration fell all over itself to validate the revolution and welcome the new rulers into the international community—constitutionality be damned. It was the same in Venezuela during the 24-hour coup of Chavez. It was the same in Libya. It was the same in Kosovo. It was the same in Ukraine, where the U.S. once again cheerfully supports a fascist government—as long as they accept U.S. (NATO) missiles on their border with Russia. Shooting distance to Iran is also not a bad consolation prize.
The lunatics are running the asylum and we’re all along for the ride. The media doesn’t care. They love the simple story told by the administration. Or is it that the administration loves the simple story told by the media? It’s so hard to tell who’s the dog and who’s the tail and who’s doing the wagging.
The danger that the rest of the world sees is that these kindergarten-level administrators and diplomats and officials have a ton of power and weapons and influence still to burn. And they have a craven and willing media at their back, which is eager to sell a ton of advertising for their Cold War Redux coverage.
We can only hope that Putin remains reasonable and picks his battles and doesn’t get drawn into the idiocy. He has been reassuringly stable and grounded so far. It is an utter shame that we have to hope for this cypher of a man to prevent the gaggle of idiots at the helms of other countries (Angela Merkel has toned down the rhetoric considerably of late, in fairness) from plunging us all into a nuclear winter.
If you’ve got so much time on your hands to poke the Russian bear, why don’t you expend some energy on doing something about climate change? You know, instead of just pretending the problem doesn’t exist because it’s politically difficult in an election year. Every other year in the States is an election year. It’s an excuse to never have to engage your giant brain and actually do something. And your giant brain has deluded you into thinking that no one else could possibly be as smart as you and therefore you should get all the toys and cupcakes. This is laziness and intellectual dishonesty at its core. Talk about entitlement.
And pro tip: Just because someone speaks English with an accent doesn’t make them stupid. Nor does it make them smart—I’m looking at you, Henry Kissinger. You are the original proponent of the take-all-the-toys-stick-your-fingers-in-your-ears-and-coast-on-your-reputation-for-smarts strategy. You and Bob Mcnamara, who admitted his oopsie only after millions of Vietnamese had died. Good timing. Lots of other people smarter than you knew that what you were doing was wrong before you even started doing it. Nobody listened to them. Just like no one is listening now, instead leaving the reins in the hands of the utter children currently in charge of the U.S.
In conclusion, stop listening to people who you’ve been told are smart but who never seem to say anything smart or reasonable or well-informed. They are going to lead us down the primrose path of destruction and make life a lot worse for everyone.
I didn’t include any citations or references in the main text although there are many good ones and they all pretty much say the same thing: the mainstream media/U.S. version of events is pure mendacity. This example from the article Obama’s Sleepwalk Toward War by Paul Craig Roberts (CounterPunch) is as good an example as any.
Paul Craig Roberts continues to report well and honestly. Tariq Ali also described the hypocrisy as breathtaking, Pepe Escobar is always informative. Diane Johnstone also wrote eloquently and well on the topic and drew parallels to NATO and the U.S. in Yugoslavia. Israel Shamir continues to provide good background. And not all members of the EU are equally deluded: Gregor Gysi gave a good and impassioned speech to the German Bundestag. James Howard Kunstler notes that “In [his] lifetime, there has never been a more pointless and unnecessary international crisis than the current rumble over Ukraine, and it’s pretty much all our doing” before returning to his reporting on the ongoing global financial collapse, suggesting that this might be more important (I chose climate change above).
Even the text of Vladimir Putin’s speech to the Kremlin after accepting Crimea back into the fold, is very good and historically informative reading (and is not without humor; see emphasis).