Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I'm still in university at the moment, and I'll likely either try to get security or programming job. My first programming course used a custom library that came with the book. It replaced and added many of the basics of Java like Arrays, completely custom math functions, input (scanner), Hashmaps, Queues and Stacks.
If I did land a programming gig, is it considered unprofessional to use a given custom library such as the one above? Either way, I've pretty much weaned myself off of 75% of the custom classes in favor of standard Java classes/objects, but I wanted to know if slipping in a premade class from a textbook is frowned upon. Thanks guys.
"Custom library" is too broad a category to be useful. Libraries that reimplement functionality that's standard in the JRE, such as the Collections API, are almost certainly useless, and probably did more harm than help in an educational setting. However, there are a large number of tools, particularly Google Guava (enhanced collections like multisets and bimaps), the Apache Commons tools (including string parsing, hashCode building, and the like), slf4j/log4j for logging, and runtime environments such as Spring that are basically standard in the industry.
The general principle is "don't reinvent the wheel". If you have an example class out of a textbook that gets a basic job done that isn't in the standard API or one of the de facto standard third-party libraries, by all means use it, but don't prefer some professor's half-baked and untested implementation to ones that have been in use by thousands of developers for years.
Good programmers write good code, excellent programmers find excellent code.
If your library is any good I suspect it's more a case of everyone grabbing a copy.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am going to develop a (relatively) simple game for the Android platform.
It's gonna be 2D-Game (no heavy stuff, maybe simple animations)
I am considering using a framework (like AndEngine)
What are the advantages/disadvantages of using a framework? (rather than developing from scratch)
Thanks!
Well this can be a broad subject, nonetheless I'll toss in my 2 cents.
There are plenty of advantages using a framework and this applies to many other scenarios. Just think of a framework as a bridge to shorten the path and not have to reinvent the wheel.
A framework will pretty much handle the boring plumbing you would have to do otherwise.
Using a framework will, in most cases, make you code faster and some will probably «force» you to code in a cleaner and more organized fashion. Although this has much more to do with the programmer itself...but there are opinionated frameworks out there that will at least lead you the way.
The biggest disadvantage is not using a framework in itself, but picking the right framework. I think you have to make a few questions before deciding to pick Framework A, B or C such as : Is it sufficientlly mature for my needs? Does it have a good community or vendor support? Is it here to stay? What happens if the framework loses pace or support? Will I be in trouble?
There are other disadvantages of course. You may be putting yourself open to the risk of learning the Framework and neglecting the language behind it. For example, you may know jQuery but it's not liquid that you know javascript. See where I'm going?
Also, you can find yourself shackled by the framework limits. You may not be able to have full control of the code you write or at least not be able to express your code better because the framework it self has tight bounds. In other words, you are forced to respect its limits and work the way it is required. Again, pick the right framework for your needs.
I hope this helped.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
They seem identical to java.util counterparts.
In a project I have to review these apis are used and an external jar is present for that.
But...in what they are different from java.util ones?
The Guava libraries, much like the Apache Commons libraries, are intended to complement the core java libraries, as outlined in the Philosophy Explained document:
Guava is a productivity multiplier for Java projects across the board: we aim to make
working in the Java language more pleasant and more productive. The JDK utilities, e.g.
the Collections API, have been widely adopted and have significantly simplified virtually
all Java code. We hope to continue in that tradition.
That article goes on to explain how they realise that you could implement the procedures they provide to fill the gaps in the core API yourself, but believe there are a number of advantages to using their code:
Guava has been battle-tested in production at Google.
Guava has staggering numbers of unit tests: as of July 2012, the guava-tests package
includes over 286,000 individual test cases. Most of these are automatically generated,
not written by hand, but Guava's test coverage is extremely thorough, especially for
com.google.common.collect.
Guava is under active development and has a strong, vocal, and involved user base.
The best libraries seem obvious in retrospect, but achieving this state is notoriously
challenging.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am considering using Akka in one of my projects, but I have to use only Java. A majority of the material (books/articles) are on Scala version, so I am wondering if I use Java I would be a second-class citizen.
Are there any significant functional/performance differences between the two?
Thanks
In terms of performance of Akka itself it will be the same since you are going to be running the same Akka byte code. However in terms of integrating you will be using the Java API and be limited to the language features of Java. As such you will be a second-class citizen in terms of using the API. However in functional and performance terms it will be pretty much identical. Just keep in mind that your Java code will be interacting with the library differently from Scala code. With Scala you have access to closure and other constructs that you cant use with Java (yet). Nevertheless Akka is a great library also when used from Java....
I think the main web site page on Akka sums it all: 11 lines of Scala, 17 lines of Java (+50%).
No or negligible performance difference (bytecode, JVM,...). The performance issues will be around what you write on top of Akka.
Significant functional performance (not in terms of possibilities but code clarity... and clarity has a direct relationship to bugs and fixing them)
Between the two implementations, there are no differences in terms of performance and functionality. If your formation is Java then Akka can be a good solution to introduce the actor model in your Java projects. Clearly with Scala would have the advantages that the whole expressiveness of the language offers.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I am researching the possibility of starting a data mining project which will include intensive calculations and transformation on data, and should be relatively easy to scale.
In your experience, is the choice of programming language critical for said project?
For example, if I am already working on a JVM environment, should I prefer Clojure over plain Java? Does the functional environment guarantee easier scalability? Better performance?
Put aside other factors such as familiarity with the language, toolchain, etc. In your experience, is the choice of language a critical one?
There are a few good reasons for choosing functional programming for data mining projects.
Usually data mining projects
involve algorithmics and mathematics
(than other types of systems) which
can be more easily expressed in
functional programming
Data
mining projects would involve
aggregate functions - which are better in functional
programming, say Clojure
Data
mining programs also would be more
suitable to parallelism - definitely
data parallelism and could even be
task parallelism, again a forte of
functional programming
And
functional languages like Clojure
can interface with java anyway for I/O, file read and write
I
think one can learn the tool chain
easily; it is not that different and so that shouldn't be a factor.
I was asking the same question myself and came with a big Yes for Clojure - am still thinking through how to include R in the mix.
Use the most powerful language you are comfortable with.
In any case, if you want to get scalability you need to have a map-reduce implementation which allow you to parallellize and collect the results.
No particular reason. Pick whatever language you feel most comfortable with.
See my answer to a similar question about natural language processing. I think that some of the features people think obscure languages are suited to AI are really counterproductive.
Often, functional programming solutions are more scalable.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 months ago.
Improve this question
I'm looking for a well-maintained Java bytecode manipulation library with an intuitive API. There seem to be quite a lot of them out there. Any suggestions on which ones to try?
The best answer to your question will be governed by your specific needs and objectives; if you can expand upon what you're trying to accomplish, I can perhaps offer a more tailored response.
In lieu of that, however, in my experience, ASM offers probably the best combination of maturity, flexibility, and ease-of-use:
It's under relatively active development: even though the latest release is from June 2009, developers are regularly making commits to their VCS.
It's already in wide use in a number of prominent Java products, such as AspectJ, Groovy, Cobertura, and many others, which promises a wide user-base and thus a wide community for support.
It's fairly thoroughly documented, and there are a number of tutorials, user guides, and reference documents available both from the OW2 Consortium and the community at large.
N.B. The comment #Yuri left below describes a situation I personally haven't yet encountered but that may potentially pose a significant obstacle. Keep his observation/experience in mind while evaluating the various bytecode manipulation libraries.
That actually depends on how you define intuitive ;-) I started using ASM two weeks ago for a certain task on my current project and it worked like a charm. It only took me a couple hours to understand it and be able to use it, but I wouldn't exactly call the API intuitive. But if you know a little bit about Java bytecode and are familiar with the visitor pattern, the learning curve is not very high, IMO.
Another advantage of ASM is that it is apparently bundled with the standard API at least in the Sun JDK, although in a different package (com.sun.xml.internal.ws.org.objectweb.asm and subpackages).
Take a look at this article :
http://www.pabrantes.net/blog/space/start/2008-03-24/1
A little old but still relevant.
ASM And Javassist are the most used ones now.
Bcel is dying.