Siamak Saarmann

Ranch Hand
+ Follow
since Aug 21, 2004
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 Siamak Saarmann

Hi and congratulations.

1- May I know how much lower was your Entuware than the exam?

For OCJP my Entuware average was around 15% lower than the real exam.

2- Also how much of the Entuware tests did you finish and learn before the exam?

Thank you
9 years ago

Petr Vasicek wrote:After this experience I'm not so sure it will be useful to contact Oracle again, so I better ask here. Is someone 100% sure the 1st October rule does NOT apply to OCPJP and I can schedule my exam for October without worries? Or should I rather take in on 30th September to be on the safe side?

What a mess. If their support line is not sure, then how we can know?

I guess the only way to become 100% sure is to wait until that time and see what is happening to those sitting for the exam!!

However, i also think they have thought you are taking Java developer exam (which has assignment). Only 2 exams have assignment, JC developer and JC Architect.

Aah, it seems those lists present the available courses (not certificates) from which you should select one (for either developer certificate or the architect).

Tommy , Thanks

But it seems they have changed the terminology a bit.

in the table in announcement page all JSE exams are coming under "Oracle Certified Master, Java SE 6 Developer" certification path and all JEE exams are listed under "Oracle Certified Master, Java EE 5 Enterprise Architect" path.

The sentence above the table says : "One of the courses in each list below will be required for each certification path. Candidates do not need to complete more than one course for each certification path."

I hope it does not apply to all exams or it will become very difficult to fulfill the requirements.

Hi everyone

As you know those who pass the exams after 1st October should have class attendance!:

Oracle Announcement

- In the above announcement it talks about assignment submission. Does SCJP (OCPJP) now include assignment? A few years ago only other exams (developer, web ...) had an assignment.

- I have been programming Java since perhaps 15 years ago and recently decided to do a certification exam (I have almost finished my PhD in computer science and have free time again). Does that mean I should pay US$$$$ to attend a class (even with 15 years of experience with java and a PhD in computer science) before I can sit for the exam?

Isn't that stupid?!
Just wanted to give a feedback on this.

For the simplicity I used HashTable with String keys (integer agent id's are converted to string and used as key) and even though this is not a professional work (I should rather use Integer keys) I was able to get from 8 to 80 times (depending on the number of agents in my collection) speedup.

It means a simulation which takes 80 seconds with linear search will only need 10 seconds or less now.

I was thinking if I work on the performance (in every section of the 20,000-30,000 lines of code software) I can make huge difference.
15 years ago
Hello again,

Actually the collection is the list of agents in a simulation software. In each time step each agent will perform its actions, however it needs to look at several other agents (at least 5) to be able to decide. So I need 50,000 * 5 searches for each time step.

Considering that I need to simulate hundred thousands of time steps I will need 100,000 * 50,000 * 5 searches in each simulation.

@Dmitri : I already use colt for random numbers, thank you for mentioning the capability of Colt. I never looked at other features of it.

@campbell and arulk: thanks for suggestions. I guess experimenting will give me the best choice.

@fred : Agents come and go (added and removed) and the size of the collection is not fixed (a very dynamic system is being simulated).

Regards, Mac
15 years ago

I have a very big unordered collection (10,000-50,000) and I need a very fast search method using their int id. Is a hashtable (with Integer key) the best method to use? Or there is a better alternative?

Thanks, Mac
[ November 06, 2008: Message edited by: Siamak Saarmann ]
15 years ago

Thank you very much. But I have char array.

In order to convert the char[] to byte[], I guess I need to first convert char[] to string and then use getByte method of the string.

However the char[] contains binary data (which might change due to conversion to String and from it). Am I right?

Thank you again.

PS: By the way I have used char[] because I use BufferedReader and InputStreamReader for socket programming.
15 years ago

I have a char array buffer of data (contains different data types) sent by a server (developed in C++) over socket connection.

Now I want to read an integer (4 bytes) from a specific offset in the char array.

How should I do this?

15 years ago
Hello again. I mad a little progress in debugging the reason.

1- I removed this line:

System.out.println("Server response: " + ir.readLine());

and I no more receive the exception. (what does this mean? The receive socket is synchronous blocking, why the connection is closed?)

2- After removing above line I start to send data:

If I comment th last line (writeByte) all write commands before it are received in server side. As soon as I un-comment the last line, only a single "V" character is received in server side (the server closes the connection?)

What is going on here. I am becoming crazy.

Hello Everyone,

I have this strange problem which has ruined my weekend.

I have been developing a client program for a server (which is developed in C). I was able to send full strings + different data types and get response from the server without problem.

Now (even though I think I have not changed anything), the connection resets after receiving first character of a string or first data item (like integer).

I receive this exception (after I receive a single character "V" at server side):

IOException: Connection reset

Your help is very much appreciated.

My code snippet:

[ July 27, 2008: Message edited by: Siamak Saarmann ]

One of my fellow researchers (a C/C++ developer) was assigned to design a protocol and because he is a C programmer he designed something which is hard to implement in other languages which we need (VB, php, Java, C#).

If it had built something like SMTP and HTTP protocol (where even numbers are transferred in string format) it could be easily implemented. However he has used C structures.

1) Now the problem is that how can I create such commands (which contain binary coded numbers with different lengths) in Java?

2) What primitive data types I should use for 8bit and 32bit unsigned data types (in a way that later a C program does not have problem interpreting them as normal C data types)?

Thank you for your help.
15 years ago
Norm, I normally use this method, however I guess I will try Campbell's method also. I wish it is not much slower than literals.

Thank you very much.
15 years ago

I need to solve some partial differential equations using java (using finite difference). In past I used to ignore this problem with double precision in Java. but now I am caught.

I have variable t which I increase 0.1 each time for example. Now when I print t:


Then I use the t in my calculations. In addition to the difference of above numbers to what I need for my calculations (which is small) these are not the numbers I need. I need to find the result for t=1.1 entry (by comparing t to 1.1 in an results array but there is no 1.1).

How can I deal with this? And generally how can I compare double variables (if it is possible at all).

15 years ago