But monitoring software is now available to track all transactions and detect suspicious patterns. In the new study, the tracking software was NCR’s Restaurant Guard product, and NCR provided the data. The software is intentionally set so that a restaurant manager gets only an electronic theft alert in cases that seem to clearly be misconduct. Otherwise, a manager might be mired in time-consuming detective work instead of running the restaurant.
The savings from the theft alerts themselves were modest, $108 a week per restaurant. However, after installing the monitoring software, the revenue per restaurant increased by an average of $2,982 a week, or about 7 percent.
The impact, the researchers say, came not from firing workers engaged in theft, but mostly from their changed behavior. Knowing they were being monitored, the servers not only pulled back on any unethical practices, but also channeled their efforts into, say, prompting customers to have that dessert or a second beer, raising revenue for the restaurant and tips for themselves.
“The same people who are stealing from you can be set up to succeed,” said Mr. Pierce of Washington University.
In the research, the data sets were sizable. For example, there were more than 630,000 transactions by servers tracked and collected each week over the course of the project.
But more significant, the researchers say, is what the data analysis might contribute to fields of study like social psychology and behavioral economics — and the business discipline of human resources management.
In human resources, much emphasis is placed on employee selection: if you pick the right people, they will do the right thing. Instead, this research suggests that the surveillance effect on employee behavior is striking.
“What’s surprising is the weird effectiveness of the intervention, once the monitoring technology is in place,” said Mr. McAfee of M.I.T.
Not surprisingly, NCR is delighted by the results. “It validates the customer data we’ve seen,” said Jeff Hindman, a vice president at NCR. “But this is done by outside experts with the academic standards and statistical rigor they bring to the analysis.”
Related Articles Also Tagged:
via How Surveillance Changes Behavior: A Restaurant Workers Case Study – NYTimes.com.
Don’t Blame the Fed for Asia’s Problems – Bloomberg
The same can’t be said of 1994, the year the Federal Reserve last reminded the world that its monetary policy is decided in Washington, not Bangkok, Jakarta or Seoul. Then-Fed Chairman Alan Greenspan doubled benchmark interest rates over 12 months, causing hundreds of billions of dollars in bond-market losses and helping set the Asian financial crisis in motion. The dollar’s post-1994 rally made currency pegs impossible to maintain, leading to devastating devaluations across the region.
Asia’s real problem was hubris. All that hot money coursing in its direction in the 1990s made rapid growth too easy. Policy makers were too busy signing foreign-direct investment deals, attending ribbon-cutting ceremonies for factories and flashy skyscrapers, and congratulating themselves for surging stocks to do their real jobs. Financial systems went neglected, unproductive investments accumulated and cronyism ran wild.
via Don’t Blame the Fed for Asia’s Problems – Bloomberg.
Coding Horror: YSlow: Yahoo's Problems Are Not Your Problems
I first saw Yahoo’s 13 Simple Rules for Speeding Up Your Web Site referenced in a post on Rich Skrenta’s blog in May. It looks like there were originally 14 rules; one must have fallen off the list somewhere along the way.
Make Fewer HTTP Requests
Use a Content Delivery Network
Add an Expires Header
Gzip Components
Put CSS at the Top
Move Scripts to the Bottom
Avoid CSS Expressions
Make JavaScript and CSS External
Reduce DNS Lookups
Minify JavaScript
Avoid Redirects
Remove Duplicate Scripts
Configure ETags
via Coding Horror: YSlow: Yahoo’s Problems Are Not Your Problems.
Creative Work is the Answer to Inequality | In Their Own Words | Big Think
The main message of my work over the past decade or more has been a fairly basic message and that’s that every single human being is creative. But as with anything one has to put statistical parameters around what that means, and what I’ve found, is that our society is really divided into people who are principally paid to use their creativity at work and those who maybe are quite creative but they’re principally paid to use their physical labor or they’re involved in low-skill service work.
In any event, there are about 40 million Americans who are privileged to be members of what I call the creative class. There are people in science and technology. There are people who are entrepreneurs who work in research and development. They are architects, they’re designers; they work in arts and culture, the entertainment and media. They are the kind of classic knowledge-based professionals that great management thinkers like Peter Drucker taught us about, people in business and management and healthcare and law and education.
via Creative Work is the Answer to Inequality | In Their Own Words | Big Think.
Don’t Wash Your Chicken campaign: Why don’t cookbook authors agree?
If you feel confused and betrayed by all your favorite cookbook authors, take heart: Theres one typically impeccable source thats told us the truth for almost a decade. “Dont rinse poultry before cooking,” say the editors of Cooks Illustrated in The Science of Good Cooking. “You arent killing any bacteria and you may be spreading bacteria around your kitchen.” Cooks Illustrated has taken this safety-minded stance since 2004. However, a glance at their 1999 publication The Cooks Illustrated Complete Book of Poultry indicates that they recommended rinsing birds in the late 20th century. We guess nobodys perfect, especially when it comes to the counterintuitive danger of washing chicken.
via Don’t Wash Your Chicken campaign: Why don’t cookbook authors agree?.
Steve Ballmer and the Art of Managing a Monopoly : The New Yorker
Ballmer isn’t a technologist; he’s a businessman who started out at Procter & Gamble. To describe him as a failure is to misunderstand how the technology industry works these days. At once oligopolistic and highly competitive, it is perhaps best described as an ongoing lottery in which the prizes, bestowed at irregular intervals, are temporary monopolies in a given market, such as P.C. operating systems, search, or tablets.In this setup, there are two very different types of players, each with very different incentives: those entering the lotteries, and those who have already won one. The job of the lottery entrants, such as Zuckerberg when he launched Facebook, in 2004, and Karp when he launched Tumblr, in 2007, is to come up with innovative and exciting products that the judges—investors and the public—are likely to award first prize. The contest is a lottery because there are often many competing products, with little to distinguish them save that one has first-mover advantage. The job of the lottery winners is to make the most of their monopoly franchise, building it out and making it last as long as possible.
via Steve Ballmer and the Art of Managing a Monopoly : The New Yorker.
How To: Tune the performance of Grails apps
If your developers don’t know how to squeeze performance out of your server then they should either be taught how or shown.
Tune the performance of Grails apps
For many developers, a standard Grails application works plenty fast enough, particularly with judicious use of caching. Yet there is almost always a trade-off between convenience and flat out speed. So if you need to increase the number of concurrent users that can be handled or increase the number of requests per second that are processed, read on.
But! Before you do, please remember that every application is different. Sometimes an application is slow simply because it’s executing way more queries than it needs to. For that reason, you should always profile your application to find out what’s happening. The following suggestions only really apply if you discover that it’s not your application code that’s the problem.
via How To: Tune the performance of Grails apps.
Grails Best Practices
I’ve worked with grails for about as long or maybe even longer than the author and the list looks good.
Grails Best Practices Posted by Amit Jain on Apr 03, 2012 | 3 comments Share|
I work at IntelliGrape, a company which specializes in Groovy & Grails development. This article is a basic list of best practices that our Grails projects follow, gathered from mailing lists, Stack Overflow, blogs, podcasts and internal discussions at IntelliGrape. They are categorized under controller, service, domain, views, taglibs, testing and general.
The advice here is specifically for Grails 2.0, although much of it is generally applicable.
Controller
Don’t allow the controller to take over another role. The role of a controller is to accept incoming requests, check permissions etc, ask a domain or a service for a result, give the result back to the requester in the desired format such as HTML, JSON, or XML. Keep the controller as thin as possible. Don’t perform business logic, queries, or updates within controllers.
If a controller represents a single domain class, use the standard naming convention of “<DomainClass>Controller”.
Avoid code duplication – common operations should be extracted as a closure or a method. See this blog entry for more information.
Split complex data binding into a command object. You can make command objects rich (just like rich domain classes). Creating a hierarchy of command objects can also be useful in some scenarios.
Service
A service is the right candidate for complex business logic or coarse grained code. If required, the service API can easily be exposed as a RESTful/SOAP web service.
Services are transactional by default, but can be made non-transactional if none of their methods update the persistence store.
Views
Keep views as simple as possible – avoid the temptation to put business or database logic in this layer.
Use layouts to ensure a consistent look across all, or a sub-set of, the application’s pages.
Keep your views DRY (“Don’t Repeat Yourself”). Split the repeated content into templates.
Use custom TagLibs for common UI elements.
via Grails Best Practices.
Hibernate Performance Tips: Dirty Collection Effect | Java Code Geeks
Why using property mapping Hibernate runs queries during commit and using field mapping are not executed? When a Transaction is committed, Hibernate execute a flush to synchronize the underlying persistent store with persistable state held in memory. When property mapping is used, Hibernate calls getter/setter methods to synchronize data, and in case of getOfficers method, it returns a dirty collection (because of unmodifiableList call). On the other side when we are using field mapping, Hibernate gets directly the field, so collection is not considered dirty and no re-creation is required.
But we have not finished yet, I suppose you are wondering why we have not removed Collections.unmodifiableList from getter, returning Hibernate collection? Yes I agree with you that we finished quickly, and change would look like @OneToMany(cascade={CascadeType.ALL}) public List<Officer> getOfficers() {officers;} but returning original collection ends up with an encapsulation problem, in fact we are broken encapsulation!. We could add to mutable list anything we like; we could apply uncontrolled changes to the internal state of an object.
Using an unmodifiableList is an approach to use to avoid breaking encapsulation, but of course we could have used different accessors for public access and hibernate access, and not calling Collections.unmodifiableList method.
Considering what we have seen today, I suggest you to use always field annotations instead of property mapping, we are going to save from a plenty of surprises.
Hope you have found this post useful.
via Hibernate Performance Tips: Dirty Collection Effect | Java Code Geeks.
rePost::Pork by any name | Vera Files
Pork by any name
AUGUST 23, 2013
By YVONNE T. CHUA and BOOMA B. CRUZ
(Note: The excerpt on the history of pork barrel in the Philippines was written by VERA Files trustees Yvonne T. Chua and Booma Cruz in 2004 for the book, The Rulemakers: How the Wealthy and Well-Born Dominate Congress.)
WHETHER they come in large or small amounts, pork barrel allocations have generated a lot of controversy since they were first introduced in the Philippines in 1922. In 1925, Senate Minority Leader Juan Sumulong stunned colleagues when, standing on a question of privilege, he charged that the ruling party had “misused public funds in the form of pork barrel appropriations.”
Legislators and citizens alike who have lobbied for the abolition — or at least the taming — of pork barrel over the years have proffered other reasons, ranging from the inequitable distribution of funds among the legislative districts and congressmen overstepping their mandate to make laws, to the failure of pork barrel-funded projects to respond to development needs, to the use of pork as a tool for political patronage.
But many have come to the defense of pork barrel legislation as well. Just like cholesterol, there is bad pork and good pork, they say. Without pork barrel, goes their argument, most of the countryside would have been neglected by the national government, being remote from the seat of power to wield much influence.
Pork barrel, or simply pork, refers to appropriations and favors obtained by a representative for his or her district. G. Luis Igaya of the Institute for Popular Democracy defines pork barrel legislation as “any attempt by Congress to divert national funds directly into their districts whether it be in the form of public works (such as highways or bridges), social services (such as education funds or public school buildings), or special projects (such as livelihood programs or community development projects).”
The difference between pork barrel and ordinary expenditures, explains Igaya, lies chiefly in the manner it is obtained. “Whereas the share of line agency budgets is based on annual financial reports,” he says, “pork barrel shares are based on lobbying efforts between and among members of Congress itself. Whoever can flex the strongest political muscle usually gets the largest share.”
The district funds are discretionary in nature. This means it is up to each congressman or senator to identify the projects of their pork barrel allocation and the beneficiaries. On too many occasions, however, lawmakers have exceeded their discretion, going as far as picking even the project contractors and suppliers.
American origins
Pork barrel has American origins. In 1823, the U.S. Congress enacted the first appropriation for rivers and harbors for the different states, promptly drawing criticisms from opponents that it was purely political in purpose. The measure was branded pork barrel legislation, supposedly after a pre-Civil War custom in the U.S. South in which landowners set aside a definite portion of pork salted in barrels for their black slaves. In 1919 a U.S political pundit wrote, “Oftentimes, the eagerness of the slaves would result in a rush upon the pork barrel, in which each would strive to grab as much as possible for himself. Members of Congress, in their rush to get their local appropriations…behaved so much like Negro slaves rushing to the pork barrel.” (Parreno 1998)
Other texts meantime suggest that the term “pork barrel” originated from a practice of American farmers who preserved pork in barrels in anticipation of the hardships of winter, when the pork is shared with their needy neighbors. A third version says the term simply comes from the old adage, “Bring home the bacon.”
By the time the notion of pork barrel rolled into the Philippines, it was already 1922. That was when a public works act separate from the general appropriations act (GAA) was first passed. It didn’t take long, however, before the Philippine version of the pork barrel acquired a sleazy sheen, no thanks to the shenanigans of legislators.
Act 3044, the first pork barrel appropriation, essentially divided public works projects into two types. The first type—national and other buildings, roads and bridges in provinces, and lighthouses, buoys and beacons, and necessary mechanical equipment of lighthouses—fell directly under the jurisdiction of the director of public works, for which his office received appropriations. The second group—police barracks, normal school and other public buildings, and certain types of roads and bridges, artesian wells, wharves, piers and other shore protection works, and cable, telegraph, and telephone lines—is the forerunner of the infamous pork barrel.
Although the projects falling under the second type were to be distributed at the discretion of the secretary of commerce and communications, he needed prior approval from a joint committee elected by the Senate and House of Representatives. The nod of either the joint committee or a committee member it had authorized was also required before the commerce and communications secretary could transfer unspent portions of one item to another item.
Pork barrel took on a somewhat different form in 1950. First, the public work act passed that year ended the practice of releasing the amount in lump sum, meaning the law did not specify projects. Second, it transferred the discretion of choosing projects from the secretary of commerce and communications to legislators. For the first time, the law carried a list of projects selected by members of Congress, they “being the representatives of the people, either on their own account or by consultation with local officials or civil leaders.”
In an apparent bid to make pork barrel more palatable, Congress also segregated the legislative-sponsored projects from other items in the public works act and christened them “community projects”— “miscellaneous community projects” for projects of congressmen and “nationwide selected projects” for those of the senators—and then “short-term rural progress projects under the socio-economic program.”
During this period, the pork barrel process began with local government councils, civil groups, and individuals asking congressmen or senators for projects through formal resolutions or verbal communications. Petitions that were accommodated formed part of a legislator’s allocation. The majority then convened a caucus, which determined the amount each legislator would get. The amount was built into the administration bill prepared by the Department of Public Works and Communications (DPWC), although the pork barrel section was left unfilled but for the words “to be inserted in the House…” The Senate and the House of Representatives then added their own provisions to the bill until it was signed into law, the Public Works Act, by the president.
Interest groups pushed for the funds’ release as soon as the law got approved, even though the president still got to decide when to release the money. When funds were approved for release, the budget commissioner transmitted an allotment advice to the DPWC, which in turn routed a sub-allotment advice to the city or district engineer. The engineer’s officer would then inspect the site, prepare a program of work, and schedule construction either by the department or private contractors or, in some cases, by barrio councils, parent-teacher associations, or civic organizations.
Martial-law pork
Public work acts lasted a good 50 years, interrupted only by the outbreak of war in 1942, and then in the mid-1960s, when stalemate between the House of Representatives and the Senate resulted in no pork barrel legislation getting passed. Martial law was another pork barrel legislation spoiler, pulling the plug on it, albeit only temporarily. By 1982, the Batasang Pambansa introduced a new item in the annual general appropriations act’s National Aid to Local Government Units: the Support for Local Development Projects or SLDP.
Journalist Belinda Olivarez-Cunanan would write three years later, “The SLDP is closest thing that today’s assemblymen have to the controversial pork barrel fund of the old glory days. In fact, the SLDP may be said to be truly one of the carryover practices from the old Congress, which contradicts the claim of the Batasan to being the parliamentary system based not on patronage, but on programs and principles.”
Each assemblyman received P500,000 in SLDP. But pork barrel items no longer just came under the form of public works projects, or “hard” projects as they are called these days. Sure, legislators still allocated their SLDP to capital outlays and infrastructure projects like schoolhouses, municipal buildings, roads, and the like. But they also used the money for what are now known as “soft projects”– the purchase of medicines, fertilizers, fumigants and insecticides, paints, and sports equipment, or for scholarships for constituents.
The SLDP worked this way: The assemblyman expressed his project preferences to the Ministry of Budget and Management, which had been delegated by the Office of the President to approve projects. The MBM, in turn, released the allocation papers to the Ministry of Local Governments, which would issue the checks to the city or municipal treasurers in the assemblyman’s constituency, who then paid project suppliers.
Enter Cory’s CDF
Four years after the fall of Ferdinand Marcos and the return of democracy, President Corazon Aquino restored the pork barrel of members of Congress. But it was rechristened “Countrywide Development Fund” or CDF. Pork was to go by that name for the next eight years.
As in pork’s initial years, the budget provided just a lump sum. Beginning 1992, however, amid widespread clamor among congressmen for equitable distribution, the General Appropriations Act (GAA) adopted the Batasang Pambansa’s practice of allocating members of Congress equal amounts. Initially, each congressman got P12.5 million and each senator P18 million.
Basically, no limitation was made on the legislators’ CDF-funded projects. A congressman or senator could identify any kind of project, from hard or infrastructure projects such as roads, bridges, and buildings to soft projects such as textbooks for schools, medicines to each household, scholarships for constituents and financial support to some seminar.
But the CDF was by no means the only type of pork the lawmakers could partake of. During his administration, Fidel V. Ramos, a minority president, fashioned other forms in an attempt to ensure continued support for his legislative agenda from Congress. Among these were the Public Works Fund, restored in 1996; School building Fund; Congressional Initiative Allocation or CIA; El Niño Fund; and the Poverty Alleviation Fund.
By and large, members of Congress do not acknowledge the School building Fund as pork barrel, but a special provision of the GAA clearly marks it as such: “The allocation of demountable school building shall be made upon prior consultation with the representative of the legislative district concerned.” Ramos restored the School building Program, which was administered by the education department during Aquino’s time, to the Department of PublicWorks and Highways in 1995 upon the strong lobbying of members of Congress. Close to P5 billion was appropriated that year for this purpose.
Congressional Initiative Allocations were not clearly provided in GAAs. Rather, they were items inserted to the budget of a government agency through the negotiations with the Speaker and the chairman of the appropriations committee. Legislators had the power to direct how, where, and when these particular appropriations were to be spent. Most of the funds were contained in the budgets of the Department of Public Works and Highways, Department of Education, Department of Interior and Local Government, and the Department of Health.
CIAs ran into billions of pesos as well. At one point, they even reached as much P28 billion, according to some accounts. But since they formed part and parcel of the budgets of executive departments, they were not easily identifiable and were thus harder to monitor. Those who knew the most about the insertions were the lawmakers themselves, the finance and budget officials of the implementing agency, and the Department of Budget and Management.
From CDF to PDAF
When he campaigned for the presidency, Joseph Estrada vowed to abolish pork barrel, which by then had been swirling in controversy after controversy. But once he got into office, the former action-film star did not entirely scrap the legislators’ discretionary funds. He simply changed the system, taking pains to remove only the CDF-type of pork barrel and retaining the rest, such as the School building Fund and the CIAs. He even added his own type of pork barrel, the Lingap para sa Mahirap Program.
Estrada at first sought to limit the use of district funds to only hard projects, and created the Rural Development Infrastructure Fund or RUDIF, a facility that was exactly the same creature as the Public Works Fund. Each congressman was supposed to receive P30 million, but the amount was merely a gentlemen’s agreement. The 1999 national budget carried no special provision that indicated the amount each congressman would get, leaving legislators at the mercy of the executive branch, namely Estrada.
Clamoring for the restoration of funds for soft projects, Congress successfully lobbied for a share of P2.5 billion Lingap para sa Mahirap Fund, which was supposed to be channeled to poor families in the form of a package of assistance, including food, nutrition and medical assistance; price support for rice and corn; protective services for children and youth; rural waterworks; socialized housing; and livelihood development. The congressmen gained two-thirds control of the fund for their so-called projects.
Then came the comeback of the CDF – or as then President Estrada preferred to call it, the Priority Development Assistance Fund or PDAF. Given a ballooning budget deficit and rising criticism against pork at the time, though, a trade-off was inevitable: Legislators lost some of their discretionary power. Under the new system, at least on paper, congressmen would identify projects from a narrow set of project categories determined by the executive.
Today, the PDAF is still very much around. So are other special-purpose funds, especially the Public Works Fund and the School Building Fund.
Tagged pork barrel
– See more at: http://verafiles.org/pork-by-any-name/#sthash.vqDLE3fI.dpuf
via Pork by any name | Vera Files.
