Code Katas
A Code Kata is an exercise in writing code preferably in test driven way, which you do repeat periodically.
There are very good examples of them around the Internet.
Here are some of my favorites.
ETTWU -- Enter To The World of Uysal Kara
A Code Kata is an exercise in writing code preferably in test driven way, which you do repeat periodically.
There are very good examples of them around the Internet.
Posted by
Uysal KARA
at
5:26 PM
0
comments
Using virtual machines to maintain development environments ( development ide to application server config) is becoming a common practice.
8-core cpus, 4+ gb rams and 64 bit operating systems allow running guest operating systems without a lot of performance penalties.
What should be in a baseline image?
Posted by
Uysal KARA
at
4:10 PM
0
comments
Single responsibility principle
Recently i needed to compile our all jasper-report files during application start-up.
I was modifying existing code-base to enable precompiling xml reports to binary .jreport files.
It was simple enough, traverse all *.jrxml files at a certain directory and use net.sf.jasperreports.engine.JasperCompileManager to do the actual compiling.
Here is how i traversed all files under a directory.
private void visitAllFiles(File dir) {
if (dir.isDirectory()) {
String[] children = dir.list();
for (int i = 0; i < children.length; i++) {
visitAllFiles(new File(dir, children[i]));
}
} else {
//doSomething();
}
}
public interface FileVisitor {
void visit(File fileToProcess) ;
}
public FileCrawler(final File root, final FileVisitor visitor) {
this.visitor = visitor;
}
private void visitAllFiles(File dir) {
if (dir.isDirectory()) {
String[] children = dir.list();
for (int i = 0; i < children.length; i++) {
visitAllFiles(new File(dir, children[i]));
}
} else {
visitor.visit(dir);
}
}
new FileCrawler(new File(this.cacheFilePath), new ReportCompiler()).start();
public void visit(File fileToProcess) {
String name = fileToProcess.getName();
if (name.endsWith(".jrxml")){
compileReport(fileToProcess.getParent(),name);
}
}
new FileCrawler (new File (root), new FileVisitor() {
public void visit(File fileToProcess) {
String name = fileToProcess.getName();
if (name.endsWith(".jreport")){
fileToProcess.delete();
}
}
});
Posted by
Uysal KARA
at
5:22 PM
0
comments
After the success of stackoverflow, many applications with similar concepts have emerged.
while some of the chinese sites have even used the same design, some of the web applications are geniune attempts to add value.
O'Reilly with its vast knowledge base of everything related computers is trying to take advantage of it with O'Reilly Answers concept.
What other sites do you see as a stackoverflow competitor?
Update here is once stackoverflow wanna be in Turkish
http://www.sonsuzdongu.net/
Posted by
Uysal KARA
at
2:51 PM
2
comments
Processing log data and extracting valuable insight from it will not be straightforward. Fortunately there are a few pointers to help.
1- Commonj Work manager API
CommonJ is a BEA and IBM joint specification that provides a standard for executing concurrent tasks in a JEE environment. It has support for the Master/Worker pattern in its WorkManager API. It has open source implementations too.
2- Master-worker pattern can be easily distributed with Terracota infrastructure.
Posted by
Uysal KARA
at
3:52 PM
0
comments
In my current project we will probably need hardware XML accelerator to process many millions of xml messages..
There is an ongoing EU project in which Cybersoft participates.
IBM can supply the hardware XML processor via DataPower
Posted by
Uysal KARA
at
7:09 PM
0
comments
Note to myself:
You should never use System.out.println in production code.. See the synchronized block out there.
public void println(String x) {
synchronized (this) {
print(x);
newLine();
}
}
Posted by
Uysal KARA
at
1:51 PM
1 comments