Mysql insert random datetime in a given datetime range

Found this nice sql.
I needed to randomize a date for the random data I was using to test a batch job I was fixing.  I would have used several excellent random data generators available online except my internet sucks so have to do this on my own.

This works perfectly even for leap years:select from_unixtime( unix_timestamp(‘2000-1-1’) + floor( rand() * ( unix_timestamp(‘2010-12-31’) – unix_timestamp(‘2000-1-1’) + 1 ) ))The idea is simple: Just take a random timestamp between the two timestamps, then convert it to a datetime using from_unixtime. This way you can ensure that each option has equal probability.

Source: sql – Mysql insert random datetime in a given datetime range – Stack Overflow

6 Reasons Why Ramon Magsaysay Was The Best President Ever

When Magsaysay ran for president, the barrio-to-barrio campaigns only opened his eyes even more to the issues of the rural folk that had been neglected by previous presidents.He realized that the Philippine government shouldn’t be a government of the elites, but an entity fully dedicated to the welfare of all its people–especially the peasant farmers long considered to be the “backbone of the nation.”Magsaysay believed that insurgency would continue to exist as long as the government stays deaf to the calls of the rural folk. “To  be really secure,” he once said, “a country must assure for its citizens the social and economic conditions that would enable them to live in decency, free from ignorance, disease, and want.” Magsaysay became the voice of the voiceless, and his impressive rural development programs only proved that he’s sincere in uplifting the lives of the oppressed.

Source: 6 Reasons Why Ramon Magsaysay Was The Best President Ever

Short Answer:"We don't know because the study is flawed"|Are Religious Children "Meaner than Secular Children?"

William Briggs, an adjunct professor of statistics at Cornell, provides an overview of the flawed design and statistical analysis of this study. He first criticizes the indicator used to quantify “altruism,” and then ridicules the “moral sensitivity test” that children completed, which suggests a serious “abuse of regression on the pseudo-quantified answers … this model has no real predictive value.” Briggs concludes that “nearly everything is wrong with it, start to finish,” and is especially dismissive of the “wild, over-reaching theorizing about cause.” Suggesting that “altruism was not measured, but kids sticking stickers in envelopes was,” and he asks: “How much influence did the researcher have, especially with the younger kids? Did kids stick stickers because they wanted to prove to the whitecoat that they were compliant or because they wanted to be liked or because they wanted to share? Altruism forsooth!”

Source: Are Religious Children “Meaner than Secular Children?”

Michael O. Church – Why “Agile” and especially Scrum are terrible

The problem with Agile’s two-week iterations (or “sprints”) and user stories is that there is no exit strategy. There’s no “We won’t have to do this once we achieve [X]” clause. It’s designed to be there forever: the business-driven engineering and status meetings will never go away. Architecture and R&D and product development aren’t part of the programmer’s job, because those things don’t fit into atomized “user stories” or two-week sprints. As a result, the sorts of projects that programmers want to take on, once they master the basics of the craft, are often ignored, because it’s annoying to justify them in terms of short-term business value. Technical excellence matters, but it’s painful to try to sell people on this fact if they want, badly, not to be convinced of it.

Source: Michael O. Church – Why “Agile” and especially Scrum are terrible

What's the Difference Between a Street and a Road? | Mental Floss

An avenue is traditionally a straight road with a line of trees or shrubs running along each side, which emphasize arrival at a landscape or architectural feature.*A boulevard is usually a widened, multi-lane arterial street with a median and landscaping between the curbs and sidewalks on either side.*A court is a short street that ends as a cul de sac.

Source: What’s the Difference Between a Street and a Road? | Mental Floss

Agriculture a must issue in 2016 presidential election – Inquirer Opinion

The campaign period officially opens on Feb. 9, so you can expect more direct messages—rather than thinly disguised ones—from the candidates starting then. I am most interested in what their agricultural policies are and so, presumably is the nation, because one of the main topics of the Commission on Elections’ first presidential debate (to be held in Cagayan de Oro) this month, is precisely agriculture.

Source: Agriculture a must issue in 2016 presidential election – Inquirer Opinion

South Korea's gender problem could lead to an existential crisis

It’s scary.
Another thing that could help is immigration. Lots of people — mostly women — from countries like China and the Philippines are moving to South Korea for marriage, to the point that the number of mixed ethnic families grew 700% from 2006 to 2014.
By 2030, it’s estimated that 10% of the population will be made up of foreign-born families, compared with a little over 2% today. This means huge changes in cultural norms for a society where being “pure-blood” Korean has long been a praise-worthy trait.

Source: South Korea’s gender problem could lead to an existential crisis

Eye-openers at SWS Survey Review | Inquirer Opinion

The second eye-opener in Mangahas’ Survey Review is what I learned about the Bangsamoro Basic Law (BBL) and the people’s reaction to it. For example: The survey shows that Catholics know the least about the proposed law—only 13 percent have either extensive or partial but sufficient knowledge of it. This, compared to 19 percent of other Christians, 27 percent of Iglesia ni Cristo, and, not surprisingly, 58 percent of Muslims.Moreover, approval of the BBL is related to knowledge about it. Among those who have extensive knowledge, the approval rating is 64 percent. With partial but sufficient knowledge, the approval drops to 41 percent. For those with little knowledge, the approval drops further to 24 percent, and for those with almost none, the approval rating is only 11 percent.

Source: Eye-openers at SWS Survey Review | Inquirer Opinion
 
I guessed as much. Most people with issues against the BBL are the ones who have not read the law. The right reaction would be to find the weaknesses and try to make clear the vague parts.

What Big Data Tools Do Java Developers Use? – DZone Big Data

Here comes another post on publishing the results of the Java survey I ran recently where I asked developers on tools/frameworks they used in the last 12 months. Respondants had the option to choose from a predefined list of options or select Others and provide their own choice. In this post we’ll be covering Big Data tools. If you haven’t seen the previous posts on the Java survey, here’s the list of topics covered in it: Languages Web Frameworks Application Servers Data Access Tools for SQL SQL Database

Source: What Big Data Tools Do Java Developers Use? – DZone Big Data
 
The struggle is real. The struggle to keep current in technology is a never ending and frankly a losing battle but it is what it is. For people who love to create, to design, to implement this is not a struggle but more of a frustration that what we design is almost never the best but a half approximation of the best. Not for lack of trying but for lack of time to study everything.
 
Hope to go through these series of post.