10 things that Java programmers are least willing to see

Source: Internet
Author: User

0. Iterate through the result set and construct the object
If you're a trendy developer rather than a professional, you've obviously read from a blog that developers are experiencing hibernate's "performance problem", and therefore think that ORM is bad, and that manual coding is "significantly better". If you like, of course you can use JdbcTemplate, but thank you for their unfounded accusations, I will continue to use my jpa/hibernate.
1. Write PL/SQL in the trading system
Over time, the business logic in your system will be progressively migrated to the relational database, and all valuable device transactions will be migrated to the database. Some people convert them into COBOL-like processing, bound to a trigger that invokes materialized views. Other flattened versions are called through them. In short, you will soon have a legacy system that is extremely difficult to control. This is good for Oracle's investors, but not for us.
2. Write, debug or even really use the swing application
For many years I've been feeling pretty bad about GUI code and not even touching the front-end stuff at all. Java doesn't seem to have anything to do with the front end, and swing is inefficient. Yes, if you're a former Sun employee who's developing NetBeans, and you don't have to worry about the browser, and you have a lot of memory space to use, you can actually write fast swing code. Otherwise swing is slow indeed. By default, swing makes a lot of noise by making a bunch of graphical interfaces that are like native GUI animations. There's also a sandbox model for Java.
3. Forced type conversion
Java generics are not perfect, not even the solution I prefer, sometimes there are boundary conditions that make generics impossible to handle effectively. For example, I really don't want to do this again:
Unfortunately, some libraries are not updated in a timely fashion, and legacy code is always present. We had to do something about it. Write more test cases and use generics.
4. Use calendar or date to do date calculation
Using date and calendar in the JDK to do complex date and time calculations is simply a waste of life. The built-in classes only support the most basic operations and are not intuitive at all. Instead of using an advanced library such as Joda time, unless you're still writing web apps with the x86 compiler, you won't get the fun of using JDK date and calendar.
5. Configuration Session Replication
2000 has passed, and now all distributed cache products and projects have been re-configured with NoSQL key values for storage. If you need a client with a status, then use Ajax/javascript, and throw the httpsession aside, which can greatly improve the reliability and scalability of the application. We don't have to bump up in the middle of the night because of a series of unusual outbreaks hidden in the depths. Don't get me wrong, the midnight bump is good, at least my wife bought a minivan (although I prefer my ninja 650 locomotive), but to be honest, it is time to replace the better, faster, smarter things.
6. Write your own sorting algorithm
This is the most disgusting, I personally do not pay attention to the sorting algorithm. The person who writes the sort code either does not know that Java has provided the sort algorithm you need (or writes a sort of third-party library file yourself), or does not know how comparable and comparator work at all. Hurry up and add some homework, and never write your own sort of trouble again.
7, write their own lists, stacks, queues, etc.
It must be admitted that writing a basic list is easy. Wikipedia has a good page on the list (link to the page), which contains the content of the code, can be directly copied and pasted, but why do you want to do so? Maybe I am lazy, but I prefer to use a data structure that has been tested, and I have spent a lot of time deciding to do so.
8. Write your own pool, collection or common concurrency code
Meet Doug Lea Master. Worship the master, then support the master's Java.util.concurrent bag bar. Master is not mortal, others can be highly parallel, so you want to get the concurrency problem countermeasures, the master has already thought.
9. Processing the log frame
What word do you use to describe Commons logging, slf4j? The answer is: Rotten! A few years ago, when Sun refused to simply bring the log4j interface into the JDK, Oracle was able to make the java.util.logging a little better. I'd rather everyone use java.util.logging as a bad standard, and don't have anyone make a great other log candidate. It's like someone's going through the following conversation:
"I have Coca-Cola."
"How about drinking Pepsi?" ”
"What difference does it take, anyway, to drink all the fat?"

10 things that Java programmers are least willing to see

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.