The funniest/scariest programming topic ever submitted to Reddit
Friday, 2. November 2007, 04:25:02
By Behrang Saeedzadeh (the 3rd incarnation)
Friday, 2. November 2007, 04:25:02
Thursday, 25. October 2007, 09:16:32
Till today, I used to read an entire text file like this:
String newLine = System.getProperty("line.separator");
StringBuilder sb = new StringBuilder();
String line;
while ((line = br.readLine()) != null) {
sb.append(line).append(newLine);
}
return sb.toString();
That's not beautiful. But today I came up with this alternative:
String newLine = System.getProperty("line.separator");
StringBuilder sb = new StringBuilder();
for (String line = br.readLine(); line != null; line = br.readLine()) {
sb.append(line).append(newLine);
}
return sb.toString();
And I like its beauty. What do you think? Isn't this more beautiful?
It would be more convenient if BufferedReader had a readFile() method though. Also it makes sense to make BufferedReader iterable so we could have:
for (String line : buffReader) { // do something with line }
Tuesday, 16. October 2007, 15:10:30
A few days ago a fella asked me how he can notify (Swing-based) clients of his EJB based application of certain events that occur inside the EJB server (deletes, updates, inserts, etc.)?
My answer was that he has two use JMS for this purpose. He was arguing that JMS is for server-to-server communication, which, of course, is incorrect.
He was asking for something that accomplishes this in a way "as easy as ICEFaces". Well, the problem with ICEFaces' approach is that in ICFaces, your clients periodically send requests to the server to synchronize their states, and this approach, is very inefficient. Actually, it is possible to implement an efficient solution this way, but ICEFaces' approach, is inefficient.
He didn't have a very happy experience with JMS and did not want to go through its complexities once again. But fortunately, there are a few nice POJO based solutions (such as Spring) available today that hides away lots of these complexities and makes using JMS much easier.
Showing posts 1 - 3 of 4.
Ted Neward [Java - .NET ...]
PJ Hyett [Java - Ruby ...]
Garbett [Java - Ruby ...]
[Java - BPEL - Web Services ...]
[Web Services ...]
Jeff Schneider [Web Services - SOA ...]
Simon Brunning [Java ...]
Steve Vinoski [Web Services - CORBA ...]
Stefan Tilkov [Java - Web Services ...]
Harold Carr [Web Services - SOA - Lisp ...]
Mark Baker [Web Services - ...]
Richard Monsin-Haefel [Web Services - Java ...]
David Chappel [ ]
Val [Java - Software Engineering - ...]
Don Box [Programming ...]
Eric Newcomer [Software Standardization - Web Services - Transactions - Mobility ...]
Joseph B. Ottinger [Java ...]
Tim Edwald [XML ...]
Dion Hinchcliffe [Java - .NET - Web Services ... ]
Cyrus Najmabadi [.NET ...]
The Guru of Groovy
Pankaj Kumar's Professional Blog
Pankaj Kumar's Personal Blog
Stefan Tilkov’s Weblog
Wil Shipley's Weblog
Challenging accepted wisdom
Critical Thinking in Software Development
Programming Languages Weblog
A cool blog by an ex-Amazonian
Donald Smith's Eclipse blog
Weblog of Stephan Strittmatter
Weblog of my dearest American friend
Mats Henricson
Ashkan's Ruby'ish weblog