Bryan Welch

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

Recent posts by Bryan Welch

I've been asked to take a group of developers with little or no experience in Java/UML/OOAD and create a solid team of applications developers. Around 25% of them have learned some Java on their own. The rest have experience only in mainframes and database tools using COBOL. There's no software development process or lifecycle. The company uses many IBM products, so Visual Age for Java and WebSphere will be tools they definitely use.
I'm wondering how to best introduce all this to them. Start is basic java and teach that including UML and OOAD concepts within the context of the java work? Maybe forget java at first, and introduce OOAD?
A few books might be helpful, also. "Thinking in Java" by Bruce Eckel and "Beginning Java 2" by Ivor Horton come to mind.
Anyway, I'm looking for people who have been in similar situations and recommendations on what to do or not do.
21 years ago
Many clients talk about wanting to purchase a tool for doing OOAD and UML design, but really are just starting to learn the process. They commonly mention wanting to purchase Rational Rose and make it a standard. This worries me, as I see this as trying to find a tool to do OOAD without spending time to learn the process. Now, Rational Rose is a great tool and it can do many useful things. Do I use it for my work? No, mostly I do sequence and timing diagrams on paper, figuring out the design that way and then coding it. Yes, I know this isn't great high level documentation, but managers want to see code quickly and really don't care about having good design documents.
How many of you are in this same boat? Do most people actually use Rational Rose (or another tool) for OOAD?
After just asking some colleagues nearly that same question, but best response was to read Sun's Javamail API. Be sure you get the one that's installed in your environment. They are here:
21 years ago
Good content.
I noticed what looks like a typo on slide 6 with the " � -ilities"
In the QA slide, this comment surprised me:
"Developer:QA ratio should be 2:1 or better (even 1:2)"
Two QA people for each developer? I could see that as useful toward later stages of the project, possibly. In early stages when developers are doing small unit tests, wouldn't many QA people be bored?
21 years ago
Thanks, Nate. That does make sense, and I think that's what I'll use in our style sheet. Any comments from other readers? The more comments I get, the better this document will end up becoming.
22 years ago
I saw a rule in the style guide saying not to use underscores in java field names. Why? I'm hearing a lot of local opposition to making that a rule in the style guide.
22 years ago
To add a bit more about the debate between /* */ and //:
For temporarily commenting out blocks of code, avoid using
/* */. Instead, use an if block such as this:
if ( false )
< code to be commented out >
Reasoning: The big reason is that java doesn't allow nested comments. Let's say you have a many comments in your code and you used /* */. Later on, suppose you want to temporarily comment out a big block of code. With /* */, you will need to carefully work around your comments, turning on and off the /* */ blocks. With // comments, this isn't a problem. Using an if block to disable the block of code works in either situation.
Can anyone think of any problems with this logic?
22 years ago
I'm trying to put together a JSP and JSP style guide for my company. Could you tell me some of the reasoning for your rules for comments in the Javaranch guide?
>Try to use the // commenting style for a majority of your comments.
Why? For block comments, why is // better than /*?
>Try to use the /* */ commenting style only for temporarily commenting out blocks of code.
Why? Benefits?

22 years ago
Does anyone know of some good articles that talk about using the MVC model with java and JSP? There's the usual relationships:
Model = Java Object (session, database, etc)
Controller = Java Servlet
I'm looking for some articles with details on using this model. For example, I like splitting the View between Java and JSP. The flow of logic is then:
1. Web page displays.
2. User makes selection (gives some kind of input)
3. Java Servlet Controller interprets input, makes decisions about flow, modifies model appropriately.
4. Servlet redirects to JSP page
5. JSP page uses beans to access model and a java View class
to create the view.
There are other control issues with this. Error handling can be tricky. Should all jsp be inside of some kind of try/catch to make sure the view can't break? How do you handle errors at the lower lever, where do you catch them, and how do you make them easier to trace and debug?
There's a lot for discussion. Any articles or books that get into this kind of thing?
22 years ago
Sorry! Here's the URL for the company that makes JOVE:
From the web site above:
The JOVE� Optimizing Native Compiler for Java� Technology lets you create and deploy the world's fastest, most efficient Java applications. JOVE combines aggressive whole-program and object-oriented optimization technologies, native compilation, and a scaleable runtime architecture and deployment environment.
Simply put, JOVE takes standard Java class files that are the output of any Java IDE, performs aggressive optimizations, packs them with extremely high performance runtime support, reduces them to native machine code, and creates an executable file for easy deployment on either a server or standalone system.
Developers still use their favorite Java IDE and continue to create the write-once-run- anywhere class file versions of their applications. When it is time to deploy however, they run their code through JOVE to produce the most efficient and highest performance application possible!

22 years ago
My company investigated using JOVE (and other tools) to boost the performance of their client java application. It almost worked, but JOVE at the time couldn't handle large amounts of reflection. Great company support, though, and their product seemed to be based on a good premise.
Has anyone has success in using JOVE? TOWERJ got good reviews, but it was only for server applications.
22 years ago
Another idea to solve this problem: What about using getHostByName() to see if the URL can be resolved? Haven't found a java version of this, but it's a thought...
Summary: I need to create a child thread/process that tries to reach an outside URL, get some info, and return. That child needs to be monitored so that if it doesn't return with results within five seconds, it parent gives up and goes on.
Now, with that in mind, here's the situation:
I have a servlet that creates a web page with local information, weather, and stock quotes. The weather and stock quotes come from an outside company. When the DNS got messed up Friday, the weather/stock URL was unreachable, and since it was a DNS timeout happening this took over five minutes. That stopped our web page from being displayed at all. The process got stalled on these lines:
HttpMessage message = new HttpMessage( url );
InputStream data = message.sendPostMessage( weatherInfo );
What's the best way to create a child process for this, monitor it, and give up after a set time. This would make it so that if the weather or stock info isn't available, a message could be shown like "Weather not available." without waiting excessively. If the weather/stock URL is reached and the server is down, I get a reply anyway and the message above is shown. There's only a problem if I don't get a reply, i.e. DNS problems. Changing the DNS timeout isn't an option here, unfortunately.
So, if anyone has recommendations or knows of some code that does something like this, I'd greatly appreciate the help.
As I understand it, a servlet functions as this:
html <---> web server <---> application server (running servlets)
an HTTP message is sent to a web server, and the web server interprets the message and when appropriate turns over control to a servlet. For a servlet, you need a system that can execute the program being called, be it Perl, Java, or whatever.
So the short answer is that you must have a web server. In some cases, however, the web server and application server may be the same machine. Why would they be separate machines? What if your servlet crashes the system? It's better to keep the web server alive and your site up.
22 years ago