Configuring Console2 with Cygwin – Blog::Quibb

Making Windows Console just a little bit more livable. Click through to get the shell.

Configuring Console2 with Cygwin
When using Windows, Console2 does a great job of managing my console windows, but it’s not intuitive how to configure it with Cygwin (my console of choice).  It’s not that hard to simply get Cygwin to open in Console2, but it can be tricky to get it open to a startup directory.
Here are the steps to get Console2 to open to a specific startup directory:
Launch Console2
Open settings through Edit > Settings
Click tabs from the tree on the left
Click the ‘Add’ button to add a new tab
Set the title to ‘Cygwin’ (or another appropriate name)
via Configuring Console2 with Cygwin – Blog::Quibb.

Unfogged::Andrew Ross Sorkin Is Not Good At Calculating Odds

No. There are a whole lot more people with high-prestige educations than there are “prominent posts”. I don’t know a thing particularly about Rubin, but I’m pretty sure that, like Clinton, he’s neither more nor less qualified for prominent positions than hundreds of his classmates, and the reason why he and she are on a different career track than their classmates are is their parents rather than any particular individual excellence.
This is the smallest of possible justice issues — the people who are qualified on paper for the jobs that get handed to Clinton and Rubin are doing just fine doing something else. But it still burns me having Sorkin patiently explain that the children of the powerful are running things because of their objectively judged merit.
via Unfogged.

Private school vs. public school: Only bad people send their kids to private school. – Slate Magazine

I am not an education policy wonk: I’m just judgmental. But it seems to me that if every single parent sent every single child to public school, public schools would improve. This would not happen immediately. It could take generations. Your children and grandchildren might get mediocre educations in the meantime, but it will be worth it, for the eventual common good. (Yes, rich people might cluster. But rich people will always find a way to game the system: That shouldn’t be an argument against an all-in approach to public education any more than it is a case against single-payer health care.)
So, how would this work exactly? It’s simple! Everyone needs to be invested in our public schools in order for them to get better. Not just lip-service investment, or property tax investment, but real flesh-and-blood-offspring investment. Your local school stinks but you don’t send your child there? Then its badness is just something you deplore in the abstract. Your local school stinks and you do send your child there? I bet you are going to do everything within your power to make it better.
And parents have a lot of power. In many underresourced schools, it’s the aggressive PTAs that raise the money for enrichment programs and willful parents who get in the administration’s face when a teacher is falling down on the job. Everyone, all in. (By the way: Banning private schools isn’t the answer. We need a moral adjustment, not a legislative one.)
via Private school vs. public school: Only bad people send their kids to private school. – Slate Magazine.

How Surveillance Changes Behavior: A Restaurant Workers Case Study – NYTimes.com

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.

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.

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.