Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!

Dan Walin

Ranch Hand
+ Follow
since Nov 11, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
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 Dan Walin

On the question about "which applications from the 1980's are still running?". I work for a very large corporation and probably half of our applications that handle billing, inventory, etc, were developed in the 60's, 70's and 80's. Many are written in a home-grown language that few people know anymore. I have been here for 30 year and still see the applications that existed when I was hired. There is a lot off work going on to replace these systems but it takes time given the complexity and number of applications. It's funny because we are a technology company selling the latest products to customers and we use a lot of that latest technology. But a lot of the core applications that just keep running year after year, are not always upgraded so quickly.
7 years ago
Just a "post script" comment: I went back and looked at the compiled class of the Java class with an editor and it did, in fact, have the old literal String text in the byte code. I'm glad I asked this question. I was ready to go on through life thinking I learned something new - but that "something new" was wrong. Thanks again.
7 years ago
Here is the Java class that uses the Interface:

7 years ago
Yes the Interface simply defines a String:



Only the source of this interface (the .java file) was in the /test/code path. And it worked. And, as I descibed, I updated the code and generated a .class file and put that in /test/code for my second test and only the String defined in the source code was used. At that point there was no other compiled code for that Interface that would have had the same String defined.

fyi - the source code you see is now my changed code - not the original if you're trying to match up the text of the String.
7 years ago
I've been spending a lot of time this morning trying to figure out a problem and I ran into something that I did not know was possible. It seems that if you have a java Interface and just have the source code (not compiled) it can be used and it seems that if you have both the source code and compiled code, the source code is used instead of the compiled code. I discovered this because we had an update deployed for some old code. This code has all the source and compiled code in one jar file. I, naturally, only updated the compiled code and was confused why the old values from the Interface file were still being used. This situation (being able to only use the source code) seems to only apply to Interfaces and not java classes.

Here is my test example:

Created main class: TestingSource and Interface: TestOnlySource. I put TestingSource.class and TestOnlySource.java in the correct directory. The compiled code for the interface was not included. I ran the test and the output text "it worked ok!" which comes from the interface was actually found and displayed.

I then changed the source code and compiled it. I put this new compiled code in to the package directory. The new compiled code is coded to display different text "it worked from compiled code now". But when I ran the test, the text from the older source code ".java" file was what was used and not from the .class file.

I don't remember every learning about this and wondered if anyone knows if this is a standard, known thing.

7 years ago
I noticed your new book covers Swing. Over the years I have always avoided learning Swing since most of our applications that have user-interfaces are web-based and use html, jsp, servlets, etc. I have always thought that Swing was "going away". In your opinion, are there practical reasons for using Swing and do you know if it is still widely used? Thanks.
8 years ago
That's a good point. I thought maybe being static could make the code more susceptible to this type of problem and maybe some other varying factor could be the trigger to cause this. I was wondering if there are some things about static methods I should watch out for.

For example, if you create an object in a static method, when that method ends, is the object eligible for garbage collection or does the object still exist and is still accessible by each call to the method?
8 years ago
We have an application that uses a class that has static methods. This class contains methods that do "database work". There are many methods in the class but, for this issue, there are two that I am concerned about - one that reads records in a DB2 table (using sql) that are "ready to process" and one that updates records that have been processed as "processed". Also this application is single threaded.

The application calls the method to pull all records that are "ready to process" and once they are processed, the records are updated as processed. Periodically (not very often), we will read records to process, process them, mark the records as processed and then soon after (20 seconds maybe) those records will be pulled again in the "ready to process" query. Even though we know the records have already be updated as "processed". It's almost as if the queries are looking at old data and not seeing the records are already marked as processed.

I'm wondering if the fact that the methods are static could cause this type of behavior. Maybe things remain in memory so that we're looking at "old data" when calling the "ready to process" method?

I'm not sure if it's a db2 issue (auto-commit has some delay, etc), but I wanted to rule out what types of things using static methods could contribute to this issue.

Thanks for any advice.



8 years ago
That doesn't look like Java to me. Is it some type of pseudo code? Is the assignment to translate that pseudo code into Java code?
8 years ago
The AJAX recommendation was a good suggestion. It's what we use. Here is a little portion of code were we call a servlet (CreateProgramCopy) from a JSP page using javascript. One thing to notice, that in this example is that we call this servlet "synchronously" which means the javascript code waits for the servlet to finish before moving on. In this implementation we found that if we made an asynchronous call we ended up having too many open connections because this code is called many times if a user selects multiple records to copy. For example of they select 20 records to copy, this code will run 20 times and we end up with 20 connections to our server and that was too much. The user has to wait a brief period before this completes but that was acceptable.


8 years ago
I'm curious how you create the practice exam questions. Do you rely on feedback from people who have taken the exam, or your own memory if you took the exam? Or does the company who creates the exam provide you with real questions and you just make sure that your sample questions are not identical to any of them? Or do you just make up your own questions independent of anything else, just based on your knowledge of the objectives? I am just generally curious about this. And, also, I always wonder how closely the practice questions match the real thing and how prepared they will make me. In the past I have studied for exams where the questions were much harder than the actual exam. That turned out to be good because it was a nice surprise when I took the actual exam - I was relieved. Thanks for any information on how this works.
I am interested in checking this out. We us Rational Application Developer 7.5 for our development work. Do you know if Ext JS could be used in that development environment?
The book looks good and I may get it later this year. But for now, I'm still focused on the web services certification and it would be great if we could have a book of practice exams on that.
Yes. I definitely did not mean to sacrifice quality. If there are many approaches that produce the same result, then arguing over them is not always that productive. Discussions and constructive feedback should always be part of every team effort of course. I was mainly commenting on a person being a "squeeky wheel" just for the sake of proving themselves. That does not usually help and can sidetrack progress. We had a person on our team that was like that - he wanted to argue with everyone and debate everything. Even very minor issues. He is no longer with the company.

If the senior person was completely incompetent, I think that would be another matter and I would discuss it with management. But I did not get that impression from the original posting.
9 years ago