13 years Ago

Quino: an introduction to query-mapping in the ORM

Published by marco on in Programming

The following article was originally published on the Encodo blogs and is cross-published here.


One of the most-used components of Quino is the ORM. An ORM is an Object-Relational Mapper, which accepts queries and returns data.

  • Applications formulate queries in Quino using application metadata
  • The ORM maps this query to the query language of the target database
  • The ORM transforms the results returned by the database to objects (the classes for which were also generated from application... [More]

The job of a descriptivist linguist

Published by marco on in Quotes

“Yes, there are rules of grammar. It is Coogan’s job (and yours) to try to obey them. And it is my job as a linguist to try and figure out what they are, and to state them precisely. And also to not be a jerk about it: my job as a language user is to forgive Coogan (or you) for any difficulty he (or you) might have in following them in spontaneous speech, and to use my common sense in trying to figure out what he (or you) might have meant.”
Everything he was in he raised the quality by Geoffrey K. Pullum (Language Log)

Super Bowl XLVIII (Euro edition)

Published by marco on in Sports

 The Super Bowl takes place way too late on a school night for all but the most ardent fans on this side of the pond. This is not to say that there are no such fans over here. The Germans and British both had full coverage, with the British channel Film4 having gotten Terrel Davis and Mike Carlson to assist the Scottish announcer Colin Murray, who started off slowly but got steadily more hilarious as the game unfolded into a slaughter of Denver by Seattle. There were plenty of people willing to... [More]

Generating JSON from Dart object graphs

Published by marco on in Programming

 A while back, I participated in an evaluation of languages that could replace JavaScript for our web front-end development language at Encodo. We took a look at two contenders: Dart and TypeScript. At the time, Dart was weaker for the following reasons:

  • It had not yet been released
  • It had little to no tool support
  • Integration with existing JS libraries was somewhat laborious

Though TypeScript has its weaknesses (it has technically not yet hit a 1.0 release), we eventually decided to go in... [More]

The Ruby language: where you can randomize your base class

Published by marco on in Programming

 I have never really examined Ruby in detail but it seems to be even more of a treasure-trove of ad-hoc features than PHP.

It takes full advantage of being evaluated at run-time to offer features that I haven’t seen in even other dynamic languages. Some of these features seem like they might be nice shortcuts but also seem like they would be difficult to optimize. Not only that, but they seem so obscure that they would likely will trip up even more seasoned users of the language.

At any rate,... [More]

Setting up the Lenovo T440p Laptop

Published by marco on in Technology & Engineering

I recently got a new laptop and ran into a few issues while setting it up for work. There’s a tl;dr at the end for the impatient.

Lenovo has finally spruced up their lineup of laptops with a series that features:

  • An actually usable and large touchpad
  • A decent and relatively sensibly laid-out keyboard
  • Very long battery life (between 6-9 hours, depending on use)
  • Low-power Haswell processor
  • 14-inch full-HD (1920x1080)
  • Dual graphics cards
  • Relatively light at 2.1kg
  • Relatively small/thin... [More]

Is Fukushima radiation polluting the entire Pacific Ocean?

Published by marco on in Science & Nature

Take a deep breath. Step back. Does that sound plausible? Is the mighty power of the atom, harnessed by decades-old technology, likely to be able to effect such mighty change?

Because the Pacific Ocean is huge. Like, really gigantic. It has 16 times as much surface area as the entire United States of America. Hell, there’s a Pacific Garbage Patch whose estimated size is about the surface area of the US of A and we can barely even tell it’s there.

The article True facts about Ocean Radiation... [More] by Kim Martini (Deep Sea News)

WEF (World Economic Forum) Panel

Published by marco on in Finance & Economy

The panel from the World Economic Forum on Saturday ended at 16:45 GMT+1. SRF Info was streaming it live in Switzerland in English and I caught the tail end of one of the panels. The discussion included Schäuble from Germany, Christine LaGarde (president of the IMF) and the presidents of the banks of Japan, England (who seems to be American?) and India as well as the president of Blackrock (an investment company) and was moderated by Martin Wolf of the Financial Times.

They discussed the... [More]

Cursing: for when you really hate something

Published by marco on in Miscellaneous

There are things that make us mad in this world. There are various release mechanisms for this. A common—and very effective—one is to curse.

But sometimes the thing about which we need to curse is so terrible, so skull-fuc&$kingly bad that you have to invent new curses for it. And sometimes, you have to invent entirely new technologies and possible futures in order to envision a situation bad enough to engender the creation of a language that would include language severe enough to... [More]

Police stories from the trenches

Published by marco on in Public Policy & Politics

The first rule of policing

The post Dallas Cops Fight For the First Rule of Policing by Scott H. Greenfield (Simple Justice) defines that rule as “make it home for dinner”. No matter what else is going on that day or how a given situation develops, the first rule is self-preservation. Everything else—including gunned-down innocents—can be handled later and usually papered over with the help of others, both on the force and on the bench.

This post discusses a shooting incident in Dallas, in which a 48-year–old officer was,... [More]

The constitutional professor

Published by marco on in Public Policy & Politics

Cartoonist Ted Rall published the following cartoon at the end of 2013:

 On Sec. 107(a) of the NDAA

The first couple of panels document the most recent transgressions that the Obama administration has made under the auspices of the NDAA—the National Defense Authorization Act. These include sweeping away constitutionally guaranteed rights in a manner breathtaking even for citizens who survived eight years of the Bush/Cheney administration.

The final panel shows a soldier wondering how this can be, while another... [More]

The Internet will consume you

Published by marco on in Fun

The following screenshot of the post What is an example of a “useless/worthless PhD” or its opposite? by Mathbosss (Reddit) presents a prime example of how the Internet actively works to consume your every waking moment.

 Screenshot of a /r/math post

I found the conversation quite interesting and somewhat humorous and was sorely tempted to continue. Fortitude intervened.

TrueCrypt: yet another organically grown user interface

Published by marco on in Technology & Engineering

I use TrueCrypt at work to encrypt/protect the volume where I store source code for various customers. It generally works pretty seamlessly and I don’t even notice that I’m working on an encrypted volume.

The other day, Windows started complaining in the Action Center that my drive needed checking because errors had been discovered. At first, I thought that it was referring to my system drive—which is not encrypted—and I rebooted Windows to let it do its thing.

Windows was back up and... [More]

Maybe it’s as bad as they say?

Published by marco on in Public Policy & Politics

Purely out of morbid curiosity, I visited Healthcare.gov to see what’s going on over there. I’d heard so much.

Here are some comments additional to those embedded in the screenshot:

 Home page is decent, if a little careless

  • It did not reject me because I’m browsing from a foreign country. +1
  • It redirected me from www.healthcare.gov to healthcare.gov. Canonical name is the short one. +1
  • It loaded quickly. +1
  • It’s pretty light on graphics. +1
  • There are way too many fonts and font sizes. –1
  • Stop using small-caps for anything other... [More]

Deliberate vs. Accidental Terrorism

Published by marco on in Philosophy, Sociology, & Culture

It matters quite a lot whether an act of destruction was deliberate.

If someone takes credit for such an act, the act is denounced and it is immediately decided that we must do everything in our power to prevent its repetition.

When the perpetrators are known but deny responsibility, we enter a gray zone, which can be whitewashed by clout and connections and money.

When planes are flown into towers, killing about 3000 people, it is terrorism. When chemicals are spilled on Bhopal, killing... [More]

The Self-hating American

Published by marco on in Quotes

Page 128–130 of Slaughterhouse-Five by Kurt Vonnegut in 1969
“America is the wealthiest nation on Earth, but its people are mainly poor, and poor Americans are urged to hate themselves. To quote the American humorist Kin Hubbard, ‘It ain’t no disgrace to be poor, but it might as well be.’ It is in fact a crime for an American to be poor, even though America is a nation of poor. Every other nation has folk traditions of men who were poor but extremely wise and virtuous, and therefore more estimable than anyone with power and gold. No such tales are told... [More]”

The Internet of Things

Published by marco on in Technology & Engineering

This article originally appeared on earthli News and has been cross-posted here.


The article Smart TVs, smart fridges, smart washing machines? Disaster waiting to happen by Peter Bright (Ars Technica) discusses the potential downsides to having a smart home[1]: namely our inability to create smart software for our mediocre hardware. And once that software is written and spread throughout dozens of devices in your home, it will function poorly and quickly be taken over by hackers because “[h]ardware companies are generally bad... [More]”

ELI5 answer to: How and why do computer programs crash?

Published by marco on in Technology & Engineering

ELI5 is the “Explain LIke I’m Five” forum at Reddit. I recently answered the question “How and why do computer programs crash?” and thought the answer might be worth cross-posting (even though the post itself never gained any traction).

What is a program?

Programs comprise a limited set of instructions that tell them what they should do when they encounter certain inputs under certain conditions.

Who writes programs?

People write computer programs. Therefore, programs only do what those... [More]

Apple Developer Videos

Published by marco on in Programming

It’s well-known that Apple runs a walled garden. Apple makes its developers pay a yearly fee to get access to that garden. In fairness, though, they do provide some seriously nice-looking APIs for their iOS and OS X platforms. They’ve been doing this for years, as listed in the post iOS 7 only is the only sane thing to do by Tal Bereznitskey. It argues that the new stuff in iOS 7 is compelling enough to make developers consider dropping support for all older operating systems. And this for pragmatic reasons, such... [More]

Interesting take on the future of Netflix

Published by marco on in Miscellaneous

The article Netflix’s dumbed-down algorithms by Felix Salmon (Reuters) discusses a change in focus in recent years at Netflix—actually since they switched to emphasizing streaming content over DVD delivery.

Netflix has started to position itself more as a television company than a “great movies” company because of purely economic reasons. As Salmon puts it, “Netflix’s big problem, it seems to me, is that it can’t afford the content that its subscribers most want to watch.” The big blockbusters that people actual... [More]

Dara Ó Briain: a comedian…for science

Published by marco on in Science & Nature

Dara Ó Briain is London-based Irish comedian with a show on BBC2 called Dara Ó Briain’s Science Club. His act is a good deal bawdier on stage though the focus remains on promulgating a pro-science agenda. In the segment below, he discusses a show he did with physicist Brian Cox in which the topic of astrology just happened to arise.

Some choice tidbits from this segment:

“The astrologers get going on Twitter and write, ‘if you were really a scientist, then you’d be more open-minded.‘ And I... [More]”

Radiation is everywhere! (And we’re all gonna die.)

Published by marco on in Science & Nature

A story of Fukushima radiation is making the rounds, reported variously as Navy sailors have radiation sickness after Japan rescue by Laura Italiano and Kerry Murtha (NY Post) and 70+ USS Ronald Reagan Crew Members, Half Suffering From Cancer, to Sue TEPCO For Fukushima Radiation Poisoning by Brandon Baker (EcoWatch) (with a re-post at AlterNet). Other source cited in the articles are the Washington Times and FOX News, paragons of journalistic integrity.

The user comments on the article are uniformly horrible and make you despair for mankind. They are a cornucopia... [More]

Brilliant articles by the funniest guy at Microsoft

Published by marco on in Programming

I recently stumbled upon some Essays from the funniest man in Microsoft Research by Raymond (Old New Thing). He is such a funny writer that this article, against convention, will consist mostly of citations rather than an even mix of citations and paraphrasing that I naturally consider to be much more lucid and pithy. I quote at length to do the material justice, for documentation and to ensure that you all download the PDFs to see if there is more where that came from (there is). All emphases have been added.

Mobile... [More] by James Mickens (Microsoft Research)

Modern nature documentaries

Published by marco on in Science & Nature

I was recently sent this link, presumably because I enjoy short nature documentaries.

Man vs. Wild − Eating Giant Larva by Bear Grylls (YouTube)

Some thoughts:

  • Do larvae really get bigger the older they get? Isn’t a larva a limited stage of development? How is it that some are so much larger than others? Isn’t it more likely to be related to food intake rather than age?[1]
  • People are weird. If Bear were to eat fluffy baby animals (say chicks) rather than slimy ones (larvae in this case), he would be drummed off the air.
  • Bear Grylls: Allergic to Bees... [More]

TED talks about city design and capitalism

Published by marco on in Public Policy & Politics

Why buses represent democracy in action by Enrique Peñalosa (TED)
The title is a way of saying that building bus lines before four-lane highways for cars is inherently more democratic because more people use the buses. It has less to do with democracy and more to do with social fairness and providing for the basic rights to which civilized peoples are entitles. We are talking about a form of socialism here. Instead of letting the elites bend the will of the market with their gravitational wells of overwhelming buying... [More]

Free Speech != Right to Airtime

Published by marco on in Public Policy & Politics

So there is, apparently, a redneck actor on a fake-reality show called “Duck Dynasty” who turns out to be, in real life, an anti-gay bigot with completely humdrum and bigoted ideas of everyone’s place in society.

I’ll let you gather your wits as you recover from your shock.

Also unsurprisingly, he thinks that white guys with beards, guns and inappropriate sunglasses sit at the top of the heap.

A&E, which broadcasts this paragon to culture, pulled on his leash and suspended him for a little... [More]