Win a copy of Head First Android this week in the Android forum!

Costa lamona

Ranch Hand
+ Follow
since Sep 24, 2006
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 Costa lamona

Hi

I am new to jdbc, closing a Statement is releasing its resources, I am wondering if this will include closing the connection itself.
also If I am connecting to localhost db,
Is creating a new Connection will be costy?
Is creating new Statement will be costy?

Thanks
Hi

I don't understand at all how this code works?
it comes from this tutorial
http://java.sun.com/docs/books/tutorial/jdbc/basics/connecting.html




Thanks
Hi

I have Netbeans 6.1, its editor is just like notepade, no Braces no highlighting and no right clicks menus, Nothing work, even errors marking are not there, where is that nice colored Editor which show me errors of my code?

Thanks
Hi



I just tried that I found that c1.getTime().getTime(); takes longer but that because of two method calling, hence it did not appear except after
1000000 iteration, hmmm why I did not try it in Nanos, I would use System.currentTimeMillis(); just in case it will make difference in another situations
13 years ago
Thanks

but I am wondering why Calendar might be that nasty and System is that good.
13 years ago
Hi

if you have a Runnable class and you start it in Timer
Assume that run is in infinite loop
setting all references of that thread to null will kill the thread??

Giving that the class inherits from Thread and run is in infinite loop, setting the class ref to null will
kill the thread immediately or
kill the thread in next garbage collection run or
will not kill the thread because it is actually referenced by Java Virtual Machine somehow.


Thanks
Hi

java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
frame.setVisible(true);
}
});

When create a Frame using netBeans, netBeans automatically add this code.
As I understand from previous reading, there is always Event-Dispatch thread where events are fired and handled. I assumed that EventQueue is the responsible to queue and fire events on the event-dispatch thread!!

Is that correct?

The run method in the above code is executing in Event-Dispatch thread...Why I would want to do that?? what happens if code runs in the main thread??

I think this is common question, however I did not find it!!

Thanks
13 years ago
Hi

I zipped a third party doc and place it in Library-Manager-> on the left-> Beans-Binding-> on the right-> javadoc tab

then I created a testing project, open, close NetBeans, still don't see documentation tips.

I think I should add this doc to the testing project, the question is how??
Hi
I was seeking for answer for this question. I cannot find a topic called
Direct or indirect association, please give me an example about that term.

Thanks
Hi
I am SCJP 5, but I am not familiar with j2EE, Do you think
that I can be SCEA.

Actually I want to learn stuff like OOD, Design Paterns, UML, extra.
I am already design systems with OOD, and use OOP.

Thanks
Thank you Ilja

I beleive that I will learn that art over the time, Thank you for your guidance.

Originally posted by Ilja Preuss:
Mohammed, if I understand correctly, you were hurt by the need to change the system, so you are trying to find a way to reduce the need for change in future systems.

I'd like to kindly suggest that there is a better way: building the next system so that it is easier to change. Important parts of that would be to learn how to refactor a system so that the design doesn't become worse and worse while you implement changes; to manage code dependencies so that changes don't ripple through the whole system; and to write an extensive suite of automated tests, so that you get immediate feedback when you break something.



Thanks again for the advice

I think you agree with me that one of the key targets of the software design art is the project extensibility, so that you have to expect where are the places you will need an update, and facilitate that update by isolating changeable things from those things that not likely to be changed, and that is why you should have a good vision to the whale system, thus we need to understand the system through requirements, What is the input?, what user should see? , and what is the output?, what is the system should provide to the user to customize program output?, changing requirements is not the problem, the problem is if there is no requirements, there is no correct vision to the system.

Furthermore, I think it is normal to update the requirements every time mangers decide that we will go for the next version, you cannot say after we start implementation "Sorry, this does not work, we have to update the design in places we did no expect a change, and with things that have nothing to do with the current system, simply it is new system!!", this will lead to what I was talking about.

But again the problem could be "I cannot create a good vision" even if the requirements file is well done. Because It is first time I involved in any thing "not tiny application"
I will tell you something funny, they decide to put me in C# group although there is a java group and I am SCJP5!!

Originally posted by Ilja Preuss:

As an aside, I don't understand at all what this has to do with the analyst or requirements - the usage of MVC typically is a purely technical decision, as far as I can tell...



Thanks Ilja, The requirements determine what the application will do (at least its basic functionality) in very detailed way, if you put your design, then extra requirements appear this will lead to a need to change the design, especially in low level design (determine the API of each interface and class), for example in a Book Creation Application, I assumed that the View will handle the user actions in every page like change a font in a text, (and send any update to the model), while Controller will be responsible of determining which page will appear to the user now, the low level design is completed and Software specifications (How every thing works) is written, suddenly, I was told that page flow of one Book type is differ from another type, this information lead to x change to the design, after a while another piece of information appeared, it need y change, and because there was no really any kind of analysis and requirements, we need after one month to do a, b, c, d, e ,f , g, h, i, j and k changes, as a result program readability is destroyed and because a lot of changes and poor readability, you might face a lot of debugging problems, you cannot read it, you don't know where is the Controller and where is the Model, and where is the View, you cannot trace bugs, the project is not extensible (how you can extend thing you cannot understand how it works), we have to go for "though away prototyping software engineering Model" which is not acceptable for my company, there must be a good imagination for requirements written neatly on a piece of paper to avoid a lot of changes in the design.
For next versions, we should have another requirement file, and take a deep look to the design and decide, who will stay, and who should be re-created
Yes it has nothing to do with MVC except re-Creating MVC all over again.

Note that as I told you I am not sure if it is my design fault, or it is his fault, simply I have less than one year experience in professional Application development. But I am saying, simply If you don't know what exactly you should do, how you will do it??

Thanks
Hi
I am using Head First Design Patterns, I did not read a design pattern book before, but I read some tutorials about design patterns, and I read some MVC tutorials, However I had a bad time in my designing using MVC , I am telling my boss that this problem raise because we don't have a written requirment file, I have fack written requirment file which made to make un-techniqal people think that the system analyst did his job (in my openion, he did not, and he cannot do it, I am sure, I might be wrong!!!), but I am .

Ok, because I might be wrong I have to read MVC from a good resource
and I have to "run", so I want to jump into MVC section in chapter 12.

1- Do you think I had to read the rest of the book first??
2- if no, What chapters do you recomend before start read before MVC??
3- Do think it is a very bad idea to go into MVC directly??
4- Why I did not choose to be a doctor? or a Hitman??!!!
5- Can I kill the System Analyst? Which way you recommend?

Note that I don't want to wast my time in reading MVC and then All I got is mis-understanding. I prefer to not-understand than mis-understand

Any thoughts
Thanks
I don't want to mislead you so you say, yah you are right.
and don't be suspecious . I know it does not make any sense to ask about such simple stright forword pattern, but It will make a sense if you don't know what is ^, I just guess it is "not".
14 years ago