Java is a high-level, platform-independent, object-oriented programming language originally developed by Sun Microsystems. Java is currently owned by Oracle, which purchased Sun in 2010.

learn more… | top users | synonyms

1
vote
2answers
430 views

How to set up something like an integration server that measures the quality of code and reject the code if the score is below a certain number?

Even if I don't like enforcing people to do things (and I believe that it may decline the productivity and cause anger), I really want to enforce good coding style. Is there a way to set up ...
21
votes
11answers
2k views

Should I use a code repository if I am the only one working on a project? [duplicate]

Possible Duplicate: Version control for independent developers? I am not sure if I should use a code repository when I am the only one working on a project.
15
votes
3answers
1k views

Does decoupling trump DRY in REST?

I am building a REST API to expose most of functionality of an existing Java API. Both APIs are for internal use within my organization; I do not have to design for external use. I have influence ...
10
votes
6answers
802 views

What factors to consider when choosing runtime/language for Windows desktop applications?

My users all have Windows. Some of them use Linux or a Mac, but if they do they're generally capable of using something like Mono, Wine, Parallels or dual-boot. My development team (including myself) ...
9
votes
4answers
1k views

Is there any reason lazy initialization couldn't be built into Java?

Since I'm working on a server with absolutely no non-persisted state for users, every User-related object we have is rolled out on every request. Consequently I often find myself doing lazy ...
8
votes
6answers
867 views

Static functions vs classes

Let's say that I want to build some utility functions to do some basic maths with the BigDecimals, for example I want to have a function that computes the average of a List<BigDecimal>. What is ...
8
votes
3answers
668 views

C++ for Java Programmers

I am going to have a lecture about C++ for experienced Java programmers. Because C++ is a big language and I have just one lecture, I want to point out the most important "gotchas" and C++ features ...
8
votes
3answers
4k views

Differences between “Java OOP” and “Pythonic OOP”? [closed]

I started with ActionScript 2.0 and then went on with Java. I have learned, or at least used, a bunch of languages since then, including Python (probably my favorite). I'm afraid that my style of ...
8
votes
2answers
10k views

Open source projects, how to choose?

I would like to join an open source project since I think I am good enough at programming to progress onto reading others code and to modify it. But the problem is, how would I choose an open source ...
2
votes
8answers
980 views

tips, guidelines, points to remember for rendering professional code? [closed]

I'm talking about giving clients professional looking code. The whole nine yards, everything you hardcore professional highly experienced programmers here probably do when coding freelance or for the ...
2
votes
7answers
1k views

Becoming a better C/Java programmer [closed]

I've currently hit a plateau and want to get better at coding in C and Java. I want to improve, but I think I hit a plateau on my learning curve. I can't find any "advanced" tutorials on the net; most ...
1
vote
2answers
9k views

Java language book for an experienced programmer? [duplicate]

Possible Duplicate: Is there a canonical book for learning Java as an experienced developer? I am looking for book to get up to speed with (start with) a Java language. I am experienced ...
1
vote
7answers
4k views

What is the best way to remember Java APIs? [duplicate]

I have been doing Java for nearly a year now and I have difficulty remembering Java APIs and method names. What is the best way to remember them?
34
votes
6answers
3k views

Good or bad practice to mask Java collections with meaningful class names?

Lately I've been in the habit of "masking" Java collections with human-friendly class names. Some simple examples: // Facade class that makes code more readable and understandable. public class ...
13
votes
6answers
514 views

Expected behavior when an request for a collection will have zero items

Let's say you are given the following... List<Thing> theThings = fubar.Things.All(); If there were nothing to return, what would you expect fubar.Things.All() to return? Edit: Thanks for the ...
12
votes
6answers
4k views

Are Java's public fields just a tragic historical design flaw at this point? [closed]

It seems to be Java orthodoxy at this point that one should basically never use public fields for object state. (I don't necessarily agree, but that's not relevant to my question.) Given that, would ...
11
votes
3answers
1k views

How to create better OO code in a relational database driven application where the database is poorly designed

I am writing a Java web application that consists mainly of a bunch of similar pages in which every page has several tables and a filter that applies to those tables. The data on these tables comes ...
11
votes
3answers
644 views

Introducing a new JVM programming language into an established enterprise environment

Imagine that your current workplace is a Java shop. There is a lot of built-up knowledge about the Java language and there is a comprehensive build and deployment process in place to handle everything ...
10
votes
2answers
5k views

How to debug/change Java code while the program is running?

I just saw a video showing how Notch (of Minecraft fame) is debugging and changing Minecraft while it is running. He pauses the game, changes something in the code and then unpauses the game where the ...
10
votes
4answers
445 views

Is it better idea to call an external command-line application or to internalize that application's logic?

I have a "pipeline" sort of process that is essentially just linking together a bunch of existing tools to automate a workflow. For one of the steps, there is an existing command-line tool that ...
8
votes
10answers
6k views

Can programmer certifications substitute for degree requirements [closed]

I am a Computer Technician without a computer science background and planning to become a Java programmer. My question is, if I pass a Java certification, would that be enough to for me to get a job ...
7
votes
2answers
3k views

Is it a bad habit to (over)use reflection?

Is it a good practice to use reflection if greatly reduces the quantity of boilerplate code? Basically there is a trade-off between performance and maybe readability on one side and ...
5
votes
2answers
11k views

Why shouldn't I be using public variables in my Java class? [duplicate]

In school, I've been told many times to stop using public for my variables. I haven't asked why yet. This question: Are Java's public fields just a tragic historical design flaw at this point? ...
5
votes
4answers
790 views

Starting Java Web Services and feeling lost [closed]

After building mainly Java desktop apps and some small GWT services, I'm trying to learn how to build Web Services in Java but I feel overwhelmed by the sheer amount of buzzwords, terms, ...
4
votes
5answers
1k views

Switching Programming Languages [duplicate]

I'm a senior level Delphi developer looking for move into either C# or possibly Java roles. I have around 8 years of development experience of which pretty much all of it is in Delphi, I have very ...
2
votes
2answers
6k views

Do pointers really exist in Java? [duplicate]

I read quite a few resources on the internet and now I am quite confused about the existence of pointers in Java. Some claim that there are pointers and some claim that there is no such concept. So ...
2
votes
3answers
777 views

What is minimalistic setup for Agile Development for a small team?

I have 10 developers and 3 Testes team and I want to setup CruiseControle as CI for automated builds, tests and deployment to production server and some repository for SCM ( Source Code Management). ...
1
vote
1answer
144 views

Problems with OO design for application with pluggable components

I'm trying to refactor an ugly code and make it easly extendable in the future. The application should be nothing else but a series of components that have input(s) and output(s). The components ...
0
votes
4answers
2k views

what is best book to learn optimized programming in java [duplicate]

Possible Duplicate: Is there a canonical book for learning Java as an experienced developer? Let me elaborate a little: I used to be a C/C++ programmer where I used data structure ...
27
votes
16answers
5k views

How do I explain a “Hello World” program for beginners? [closed]

I am going to give some beginners a presentation about writing first program in Java. This program will be about printing "hello world". I'm not sure how can I explain the concepts such as main method ...
24
votes
6answers
2k views

How is major software protected? [duplicate]

I am a new software developer and I wish to sell my software. I recently realized that from C++ code we can not stop the user seeing parts of the code that are related to scripts or system commands. ...
18
votes
7answers
1k views

How do I avoid “Developer's Bad Optimization Intuition”?

I saw on a article that put forth this statement: Developers love to optimize code and with good reason. It is so satisfying and fun. But knowing when to optimize is far more important. ...
12
votes
8answers
16k views

Best practices for constants

How do you guys handle constants, especially in Java (static final) and C++ (define)? Do you use dedicated headers (C++) or classes (Java) for all constants? Do you turn all literal values into ...
11
votes
8answers
1k views

Does low latency code sometimes have to be “ugly”?

(This is mainly aimed at those who have specific knowledge of low latency systems, to avoid people just answering with unsubstantiated opinions). Do you feel there is a trade-off between writing ...
10
votes
5answers
2k views

What are you thoughts on GWT? [closed]

Since I'm learning Java in this period and I just finished with the tutorials I think I'm ready to start contributing to a project (since I know from experience this is the best way to really learn). ...
9
votes
6answers
19k views

A way to return multiple return values from a method: put method inside class representing return value. Is it a good design?

I need to return 2 values from a method. My approach is as follows: create an inner class with 2 fields that will be used to keep those 2 values put the method inside that class instantiate the ...
9
votes
6answers
727 views

Is there an infinite amount of knowledge in a programming language?

I can program in Java, C#, C, Scala, and Javascript fluently. I'm comfortable with Objective-C, but I don't remember the conventions used for memory management. I can read Python and Ruby and I've ...
9
votes
1answer
937 views

Multiple Dispatch vs. Function Overloading

I'm trying to understand the difference (if any) between the two. According to the Wikipedia page for Multiple Dispatch it is synonymous with Function Overloading, but then later on goes on to say: ...
9
votes
9answers
462 views

Studies on code documentation productivity gains/losses

After much searching, I have failed to answer a basic question pertaining to an assumed known in the software development world: WHAT IS KNOWN: Enforcing a strict policy on adequate code ...
7
votes
2answers
7k views

What does RESTful web applications mean? [duplicate]

Possible Duplicate: What is REST (in simple English) What does RESTful web applications mean? A web service is a function that can be accessed by other programs over the web (Http). To ...
7
votes
12answers
18k views

Do coding puzzles make good interview questions

I am interviewing candidates for Java programmer positions. My colleague insists in filling more than half of the interview with java coding puzzles.His view is that, if candidates are able to ...
7
votes
5answers
2k views

Suggest other people's code to study [closed]

What open source Java code would you suggest for me to study? EDIT: I'm interested in the design, simplicity(?), their programming style, logic. EDIT2: The first thing that came to my mind is ...
6
votes
2answers
3k views

Open Close Principle (OCP) vs Dependency Inversion Principle (DIP)

I was trying to understand the difference between Open Closed Principle (OCP) and Dependency Inversion Princible (DIP). Based on research I've made on the internet so far, I came to the conclusion ...
6
votes
1answer
665 views

How to refactor a Java singleton to Clojure?

I'm writing a simple game in Java and I want to learn Clojure, so I've decided to refactor my current Java code to Clojure. The problem is that I've coded so much in object-oriented languages that I ...
6
votes
2answers
3k views

Can Java be considered a managed programming language?

I am curious; can Java be referred to as a managed language? I am mainly thinking about the Microsoft model when it comes to unmanaged versus managed code (say native vc++ to C#). With the ...
6
votes
8answers
8k views

Why Java as a First Language? [closed]

Why is Java so popular as a first language to teach beginners? To me it seems like a terrible choice: It's statically typed. Static typing isn't useful unless you care a lot about either ...
6
votes
2answers
513 views

Why would anyone need this java syntax?

One day while trawling through the Java language documentation, as you do, I found this little beauty lurking within Double: 0.25 == 0x1.0p-2 Now, obviously (!) this means take the number ...
5
votes
4answers
4k views

Importance of certifications for Java programmer without BS degree? [closed]

I've read some posts here and other places about how a lot of people don't put much value in certifications but I am beginning to think it may be necessary for me at this point to be able to move to a ...
4
votes
5answers
15k views

Java web application folder structure

As a beginner to J2EE, I have recently started developing my own project from scratch using the Core of J2EE : Servlets & Jsps. I could not evaluate whether my project folder structure is right ...
4
votes
3answers
443 views

Storing object-graphs with class-evolution in Java with transformation (long time archiving)

Abstract A common problem is to store objects (with graph), and to load them back. This is easy as long the stored object representation matches the executing code. But as time goes by, requirements ...