Rodion Gork

Ranch Hand
+ Follow
since Sep 09, 2015
Cows and Likes
Cows
Total received
1
In last 30 days
0
Total given
0
Likes
Total received
13
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rodion Gork

Just an article, claiming to represent some insider's view. I personally can not judge - initially for me it seemed Oracle give Java significant kick after 5 years with stagnation of Java 6...

http://www.infoworld.com/article/2987529/java/insider-oracle-lost-interest-in-java.html
6 years ago
Technically they are internal data types of JVM itself. JVM can work with few primitive data types, with arrays and objects. The latest two can be built of the other types. But at the end you surely need some "basic" data types...

From the practical point of view - some languages, like Scala for example, make them all objects (i.e. they simply hide primitives from you giving you only wrappers). But this is more memory- and time-consuming surely, though coding is sometimes simplified.
6 years ago

Not sure how this is working?



Just call System.out.println(yourList.subList(...).getClass()) to find out which class is really returned. It would be surely the subclass of AbstractList, but not itself
But it is anyway quite unclear how this structure can work and what for it can be used in concurrent context.

Seek operations on linked list are quite time consuming and it does not seem a good idea to use them in concurrency at all. While concurrent access to head / end could be easily governed by a single sinchronization.

The only "more complicated" use-case I can think of - if several threads have used iterators to seek to certain points of the list and start adding or removing items at these points. And here we theoretically may get into very curious problems. But I have no idea what for we may want to use such processing...

I know java has concurrent skip lists, but for sorted map/set implementation based on them.
6 years ago
I'm sorry to say this, but it is better to provide full snippet of code and proper input data - something like this:
http://ideone.com/ZKVDjN
otherwise it is hard to make sure we understand you right.

However the main thing you are missing is that String#split uses not plain strings but regexps, so you should write "\\=" or "\\." for example when you are using special characters.

Also, I'm sorry about the variable names. They're just temporary local variables


Anyway I dare say your method looks long enough and seems to be asking "split me toooo" in several smaller 1-3 lines methods. Then some local variables will become parameters and it would be easier to give them and the inner methods clear names.
6 years ago
Well, it is hard to answer in details as your question is not very detailed.

I usually use some combination of methods marked with @Scheduled and @Async. E.g. some method is scheduled to launch every second and call several asynchronous methods (sometimes I use atomic counters of work in progress).

the total number of DB connections to be 9000


Just make sure you use connection pool properly to avoid hitting performance with reopening every single connection
6 years ago
I vote for option 5 as it looks the simplest to me if I am to support your code in future.

Issues: Every object of transactionsDetails is bound to have a null for either refund or charge transaction.


I do not feel it is an "issue"
Though it would be good to care that nulls are not written to json itself.

If by your business-logic you still do not feel it convenient / natural enough, then Options 3 or 2 also look at least not painful. For me 2 looks somewhat more logical.

The client will have to unmarhsal the class to the appropriate type based on the type parameter sent while calling the rest endpoint


Yes, this concerns me much in both 2 and 3 cases. If these two classes could be in the same place of the JSON - then I prefer them be a single class. Polymorphic tricks do not look well when used with JSON. Especially as we use strictly-typed language.

There are many ways to solve this in some way but all of them look more complicated compared to having null fields.
Usually no. Different versions of java gets into different folders on your computer. The only minor annoyance can arise if newly installed one will set either PATH variable or symbolic link for "java" command to the java 1.6 folder - but you will easily discover this with "which java" command and change to appropriate value, if necessary.

It is hard to explain in more details as I do not know how do you use java for work and how it is going to be installed. Nevertheless we often have from 2 to 5 versions of java side by side for certain needs.
6 years ago
Two years ago I've started my own site - I wanted something like ProjectEuler, but more about programming, not number theory. Right now it looks like this:

CodeAbbey

There are about 200 problems, about 7000 users - and, well, even personal Certificates!

There was a short screencast demo:



So I meekly dare to invite any who may be interested to join our small community
6 years ago
But you do not add anything to "guess" unless when the value is guessed.

If you use debugger you probably can see it in step-by-step execution mode.
6 years ago
How the error message looks exactly, please?

UPD. Ah, I see, it is "variable label1 might not have been initialized".

Surely, when your execution come to this line, label1 is not yet assigned a value. But you already try to use label1.RIGHT.

As it is a static field, you should use JLabel.RIGHT instead, or more precisely SwingConstants.RIGHT.
6 years ago

AmazonEC2Client ec2 = new AmazonEC2Client(credentials);


Am I right supposing that "credentials" here are null - it looks like you never initialize them?
6 years ago
I believe - yes, though I'm not quite sure what you mean by "test suite".
6 years ago

to know what version of exam could be effective and put some weight in my resume while applying for jobs



Well, I can only relate my personal experience. I'm working as EE developer for about 5 years already (before it I was C programmer and electronics developer) - and when I just started with Java I also wondered whether I can interest my potential employers with some Java Certificate.

However, after working in several companies, I found that they are only interested in these certificates when their customers request that certain percent of developers of given projects are certified. It may be necessary, for example, if customer wants to certify the project somehow in order to sold it further.

But in such cases your future employer usually tells you "we want you to have certificate. you have 2-3 months to prepare. if you succeed, we pay the expences."

So to conclude - much more weight is put on resume by your "portfolio" on github, some side projects etc.

If you will get Master in CS - this will also put "additional weight" and I believe increase in salary - especially if you will apply to some project about data warehouse analytics, bigdata etc...

I have gone through that website already


Yes, oracle's site is quite a clumsy thing. See now:

1. Open the page by the link above
2. Above green buttons click "Professional Level Certification"
3. Green buttons will change - choose "Oracle Certified Professional - Java SE 8 Programmer"
4. Now you'll get two links

Oracle Certified Associate, Java SE 8 Programmer - leading to this form - it is Associate level, required prerequisite

Exam for Professional level itself - this link

P.S. I do not think it is worth getting older certificates as Java 8 added serious changes. Also I'd say that though you can surely stop just at Associate level, without pretending to Professional level - but to be honest the range of topics covered by Associate do not sound impressive
Yes, it looks correct

Why not trying it yourself?

two boolean statements


You meant two boolean variables, to be precise
6 years ago