2012-09-30

Tweets of the month

29 Sep
You can subscribe to the free Java magazine from Oracle here: http://www.oracle.com/technetwork/java/javamagazine/index.html

25 Sep
The 2012 updated ACM Computing Classification System (CCS) http://dl.acm.org/ccs.cfm

20 Sep
RT Joana Paulo Pardal @joanappardal DI-FCT-UNL Distinguished Lecture Series: 1st with Barbara Liskov, MIT, Oct 3, 2012, 14h30 http://www.di.fct.unl.pt/difctunl-distinguished-lecture-series

19 Sep
Unified Eclipse update site for simultaneous releases, in this case, Juno http://download.eclipse.org/releases/juno

17 Sep
Minority report for science http://www.northwestern.edu/newscenter/stories/2012/09/kording-scientist-predictions.html

7 Sep
Finished major overhaul of my research bibliography work system inspired by iAnnotate and with Google Scholar help http://googlescholar.blogspot.pt/2012/08/scholar-updates-making-new-connections.html

2012-09-26

How Computerized Tutors Are Learning to Teach Humans

How Computerized Tutors Are Learning to Teach Humans - NYTimes.com: The Machines Are Taking Over Education...

NASA Funds Advanced Robotics Projects

NASA Funds 8 Advanced Robotics Projects - Government - Information Management - Informationweek: NASA is investing $2.7 million to kick off eight advanced robotics projects aimed at improving robot technology as part of its long-term goal of putting a human on Mars. The projects, part of the White House's National Robotics Initiative, are tied to NASA's plans for an asteroid mission in 2025 and human exploration of Mars around 2035. The National Science Foundation managed the solicitation for the project proposals, each of which will receive between $150,000 and $1 million in funding.

2012-09-25

Data Centers Waste Vast Amounts of Energy

Data Centers Waste Vast Amounts of Energy - NYTimes.com: A yearlong examination by The New York Times has revealed that this foundation of the information industry is sharply at odds with its image of sleek efficiency and environmental friendliness. Most data centers, by design, consume vast amounts of energy in an incongruously wasteful manner, interviews and documents show. Online companies typically run their facilities at maximum capacity around the clock, whatever the demand. As a result, data centers can waste 90 percent or more of the electricity they pull off the grid, The Times found.

2012-09-21

You code, you learn - flat Java files

"I don't need to keep my java files in all those boring package name folders (e.g. /net/proj/...). I'll just keep them all in a single folder then let the compiler worry about it"

The above statement is true, but you should known that the IDEs like Eclipse, Netbeans, IntelliJ, assume that the java files are stored in folders according to the package structure.

The IDEs will report errors when you try to open the project in them. And sooner or later, you or someone on your team will want to do it.

The renaming process can be eased using the Eclipse refactor-move functionality, but it will be a pain, especially if your are using version control.

I wasted 2 days to rearrange the Java files to the standard structure using Eclipse and SVN.

You code, you learn!

2012-09-20

You code, you learn - Groovy to Java

Here is one mistake you might end up doing:

"I'll code in Groovy first and then convert to Java. It should be a piece of cake!"

Be prepared for a bitter and hard to chew cake!

Groovy is very loose on typing so you'll end up doing all sorts of accidental programming errors, for instance, you can easily use methods that are not accessible on a static context. Generics are also a pain.

To convert the code you will have to do major refactoring with redesign of the class hierarchies.

I wasted 2 weeks on a project when I had to convert a 200 class application from Groovy to Java.

You code, you learn!

2012-09-17

Removing accented characters

Here are two ways to replace accented characters by their equivalents in Java:

A basic solution with probably bad performance:
public static String removeAccents(String s) {
    s = s.replaceAll("[áàâãä]","a");
    s = s.replaceAll("[éèêë]","e");
    s = s.replaceAll("[íìîï]","i");
    s = s.replaceAll("[óòôõö]","o");
    s = s.replaceAll("[úùûü]","u");
    s = s.replaceAll("ç","c");

    s = s.replaceAll("[ÁÀÂÃÄ]","A");
    s = s.replaceAll("[ÉÈÊË]","E");
    s = s.replaceAll("[ÍÌÎÏ]","I");
    s = s.replaceAll("[ÓÒÔÕÖ]","O");
    s = s.replaceAll("[ÚÙÛÜ]","U");
    s = s.replaceAll("Ç","C");

    return s;
}

Another one, with JDK support that does not appear to work properly on the Mac implementation. Test carefully first.

public static String removeAccentsAlt(String s) {
    String temp = java.text.Normalizer.normalize(s, java.text.Normalizer.Form.NFD);
    return temp.replaceAll("[^\\p{ASCII}]","");
}
credits: http://www.rgagnon.com/javadetails/java-0456.html

For comparing text, there is java.text.Collator:

Collator collator = Collator.getInstance(locale);
        collator.setStrength(Collator.PRIMARY);
        collator.setDecomposition(Collator.FULL_DECOMPOSITION);

2012-09-13

John Swales' 3 moves formula for paper introduction and background

"
Move 1: Establishing a territory
1.Claiming centrality and/or
2.Making topic generalizations and/or
3.Reviewing items of previous research

Move 2: Establishing a niche
1.Counter-claiming or
2.Indicating a gap or
3.Question-raising or
4.Continuing a tradition

Move 3: Occupying the niche
1.Outlining purposes or
2.Announcing present research
3.Announcing principle findings
4.Indicating Research article structure
"

http://www.wikihow.com/Write-a-Swalesian-Introduction

via Joana, via Luísa C. Thanks! :)

2012-09-10

Data Discovery Applications

Data Discovery Applications - The TEC Blog: Data discovery tools are specifically aimed at connecting users to a wide variety of data source types (structured, semi-structured, and non-structured) and enabling users to freely explore the data within. There are no predefined data drill paths, so users can interact with data the way they want to and easily create visualizations that suit their own purposes. As such, they boast a flexibility and freshness that traditional BI solutions might find hard to match.
...

letting users explore data and discover insight without having formed a specific question
...

For now, some organizations (especially large ones) rely on full-fledged traditional BI applications to cover all their BI needs, but data discovery tools are gaining presence in the small to medium business (SMB) market.
...

Data discovery is akin to a spreadsheet on steroids

2012-09-07

Google Scholar making new connections

Scholar Updates: Making New Connections - Google Scholar Blog: We analyze your articles (as identified in your Scholar profile), scan the entire web looking for new articles relevant to your research, and then show you the most relevant articles when you visit Scholar. We determine relevance using a statistical model that incorporates what your work is about, the citation graph between articles, the fact that interests can change over time, and the authors you work with and cite.

Estonia First Graders will learn Web Coding

Estonia Reprograms First Graders as Web Coders | Wired Enterprise | Wired.com: Public schools in Estonia will soon have a curriculum for teaching web and mobile application development to students as early as first grade.

According to an article published by UbuntuLife, the program begins this month with training for primary-school teachers. This will be followed by pilot programs. Eventually, the curriculum will be available to all public schools, with educational materials for all levels from grades 1 through 12.

(...)

Back in May, Mozilla executive director Mark Surman told Wired that kids start deciding whether to be content makers or mere consumers sometime around the age of 8 to 10 years old. “If we want kids to be makers rather than consumers (our goal), this is a critical age,” he said.