Michael Duffy

Ranch Hand
+ Follow
since Oct 15, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Michael Duffy

Originally posted by Pratik R Patel:
I have a license for IDEA and was excited to use it for Grails/Groovy development - but I find it to be sluggish.
[ July 06, 2008: Message edited by: Pratik R Patel ]



I'm not sure what sluggish looks like. I'm running the Groovy/Grails plug in using IntelliJ 7.0.3 and it's anything but sluggish. The integration between Groovy, Java, Spring, and Hibernate is fantastic.

%
15 years ago
Found the problem: I had to remove the weblogic.jar from my Ant classpath.
17 years ago
I'm running Ant 1.6.4 using IntelliJ 6 EA, Weblogic 9.1 and its JDK 1.5.0_04. All is well except when I run the <junitreport> task. I get the following error message:



I've got the weblogic.jar in my Ant CLASSPATH. I've also moved the xalan.jar into Ant's /lib directory. Still have the problem. Any advice?

%
17 years ago

Originally posted by dema rogatkin:
Where can I get information about RoR? I'm working on own framework, but maybe I'm wasting time.



Wasting your time, indeed.

With Rails, Grails, Trails, Spring, AppFuse and a thousand others, why does the world need another? What is compelling about yours?
18 years ago

Originally posted by Mark Citizen:
Based on my own experience Spring is better for simple web applications (quick deployment, relatively easy to code), while EJB is better for B2B services, and complex distributed apps.



I don't agree with this. There's nothing in Spring that puts a limit on complexity. Maybe simple web apps and easy to code is all you've used Spring on, but I don't think that's a limitation that Spring imposed on you.



One thing: if you know you need to use EJBs, I wouldn't recommend mixing them with Spring, since you'd need to maintain both application descriptors and Spring xml config files (not to mention the coding part).



Since the whole point of Spring is to make it possible to do Java EE without EJBs, I'd agree that it makes less sense to deploy Spring with EJBs. But there's no reason a legacy app that already has EJBs can refactor or add new functionality using Spring that co-exists with EJBs.

Maintaining descriptors and config files aren't the worst part of complex systems. I think that's what XDoclet and annotations are for. Generate them.



Regardless of what Spring framework website says, it's not a walk in the park.



Indeed, but that's true of all complex, enterprise systems. EJBs aren't a walk in the park, either. We still haven't hit on a single technology that reduces complexity to the point where it writes itself.



quote:All skeptics aren't wrong.



They aren't right, either. That is, of course they have all the rights to be skeptic. But whether their fears actually would manifest once they try whatever they are skeptic about - who knows...

So what are we supposed to do?




I have no answer here, either. It's the questioners that move things forward, right? If Newton's laws became such dogma that questioning wasn't allowed, we'd never have heard about relativity.

But your point is well taken, too. Questioning is sacred, either. Tilt at Newton or Einstein and you might just be a crackpot. Some things are settled. Even if quantum gravity is found and explains some things better, I'll bet that F = ma will still work fine for those dynamic situations with velocities that are small fractions of the speed of light.

Your line of questioning has to have a path forward. It should predict new things or answer old questions or provide a new way of doing something that is demonstrably, measurably better and can be checked independently by others and verified or disproven.

What we're really talking about here is the scientific method. Perhaps not perfect, but still the best way we have for advancing knowledge.



quote:I find that one falls into the zealot trap when the technique becomes the One True Way and no alternatives can even be discussed and criticism is not allowed.

Does that really happen? In the Agile community? I can't remember such an incident - example please?



I was observing an XP discussion years ago, one presided over by Ron Jeffries, where I thought the tone changed from back-and-forth to zealotry. It wasn't any signatory of the Agile manifesto, more the tone of the followers on that board. I watched and participated for a while but dropped out after one long thread too many.

Originally posted by Ilja Preuss:


Does that really happen? In the Agile community? I can't remember such an incident - example please?



Sorry, I think it's a forum quirk. It only seems to quote the last block in a reply. I was disagreeing with this remark that appeared earlier:

"In my experience, the "religion" starts when the enthusiast meets a "sceptic" who insists that what the enthusiast is doing cannot possibly work."

My disagreement has to do with the clash between enthusiast and skeptic. It's not the disagreement that sparks the "religion", it's the inability for the enthusiast to even talk about alternatives or flaws. I'm saying that it's the manner in which the disagreement is handled that tends to spark the "religion" and digging in of heels.

Perhaps not such a strong disagreement.

Originally posted by garfild Baram:
Hi,
I need to retrieve SystemRoot variable value withing a java class.
I couldnt find a way to do it.
Can you help me here?
Thanks
Yossi



System root? You mean "c:" for windows or "/usr/bin" for *nix?

The better question is: why do you think you need it? Perhaps you can write your app in such a way that you aren't so dependent on file paths.
18 years ago

Originally posted by Stan James:


I have trouble when it swings the other way - the enthusiast insists that no other way can possibly work. To hear/read some agile fans (or OO or whatever the latest thing is) criticize the status quo you'd find it hard to believe any useful software was ever built before they came along, that any company ever had a IT advantage that made them wealthy, that anyone ever had any fun meeting customer needs. I'm approaching 28 years on the job and did NOT spend 25 of them in abject misery until XP saved my soul.



"I'm approaching 28 years on the job and did NOT spend 25 of them in abject misery until XP saved my soul." - I don't think the XP practices are about saving souls or saying that good s'ware wasn't possible before the XP idea took hold.

From what I know of it, XP takes "best practices" and turns them up to eleven. Testing is good; XP has you writing tests first for every class. Code review is an effective way to catch bugs; pair programming is realtime code review at all times. Getting rid of cruft and Saying It Once are good; we'll refactor cruft and repeats away whenever they appear. Consulting with our business customer is good; we'll have them on-site as a member of the team. Frequent integration helps minimize problems; we'll integrate continuously. And so on.

So if you've done fine without XP, it's likely that you've worked on high=functioning teams that were already doing lots of good practices. You're fortunate.

Originally posted by Ilja Preuss:


On the one hand, Agile *always* was broader than XP, naturally. Scrum, for example, basically being a project management method, has always been used for non-software projects, as far as I know.

And on the other hand, all the processes have become broader with increasing experience at applying them in different situations. XP, for example, has been shown to work in much larger projects than initially expected by its creators.



I disagree with this, Ilja. All skeptics aren't wrong. I find that one falls into the zealot trap when the technique becomes the One True Way and no alternatives can even be discussed and criticism is not allowed.

Originally posted by Sam Gehouse:
Is debuggable statement package a part of J2SE? If yes, which version? If no, what is the link to third party jar?



No, it's not.

Google found this:

http://www.javaworld.com/javaworld/jw-01-2002/jw-0125-overpower.html

Pretty old stuff, though (2002 vintage). Maybe P6Spy will be enough to help you.

Originally posted by Jeffrey Ye:
i'v installed the jdbc driver to the following:
D:\mysql-connector-java-3.0.17-ga

and i'v set the classpath in property in computer



This is incorrect. Eclipse (and every other IDE) and app servers like Tomcat ignore your system CLASSPATH.

Eclipse requires that you add the MySQL connector JAR to your project CLASSPATH in the way it needs to see it. Right click on the project, select "Properties", and find the spot where you add 3rd party JARs.


i'v alse started the mysql server;


the code :
import java.sql.*;



public class Dbconnection {
Connection connector;
public Dbconnect(){
try{
Class.forName("org.gjt.mm.mysql.Driver");

}catch(ClassNotFoundException e){
System.out.println(e.getMessage());

}
try{
connector=DriverManager.getConnection("jdbc:mysql://localhost/test","root","");
}catch(SQLException c){
System.out.println(c.getMessage());
}
}
public static void main(String[]args){
Dbconnection con=new Dbconnection();
}
}



Throw this class away. It's not useful at all. You've hard-wired the driver name and connection URL. You'll have to rebuild the code if you change either. You don't close connections anywhere. It's far better to keep the scope of connections as narrow as possible and close them when you're done. Go do some reading about connection pools, too. You will not want to deal with connections in the way your class is doing it except in the simplest, most throw-away, quick and dirty situations.

Originally posted by Cheenath Ajay:
Dear All,

I am not strong in Database concepts,

I am having two tables,
User and Salary

In User table UserID is my primary key and in Salary table UserID and Salary_Date are composite keys. How can i set UserId as foreign key in Salary table? Can i use cascade on delete through Salry mapping file?

Please help me out if it is possible or please let me know where i did wrong?

Thanks in Advance,

Cheenath.



My preference would be for Salary to have a non-composite key. Don't include SALARY_DATE as part of the key.

USER_ID can be foreign key in SALARY:

Difference JDBC drivers, too.

Sure you know where the time is being spent? Have you profiled it to be sure?
18 years ago

Originally posted by Artemesia Lakener:
I have tested a SQL query on Sybase and Oracle. The query involves join of 3 to 4 tables. Same data set in Sybase and Oracle. Same JDBC/Java code. Test shows the query from Oracle is significantly slower than Sybase. What can be the reason ? Just reindex ? anything else to your experience ?

Thanks.



EXPLAIN PLAN on both and see what the difference is.

Indexes, primary keys, order of JOIN - all will affect performance.
18 years ago