Forum Project: Most common misunderstandings people have

Hi all
I know this is a holiday weekend and all so there might be fewer people using the java boards. But I thought it might be fun to colaboratively put together a little list of common misconceptions that people have in the java world. I am starting this of with a common misconception about I/O
=======
Common misconception: Using a BufferedInputStream or a BufferedReader will make all reading faster
Answer: Using a buffer will only make your reads faster if you are doing inefficient reading, meaning for example that rather than load a whole file in one big chunk you are reading line by line.

tjacobs01 wrote:
1. How do you know your buffer is going to be big enough?I use the same buffer size on the client. Which is an advantage of a closed system. (Actually its a bit more complicated, the client and server exchange the maximum message size on connection and take the highest of these two values)
2. Assuming that once you've done a read, you copy the data somewhere else and effectively flush the buffer / start at 0 again, you have to do a whole bunch of extra work if the buffer is completely filled by the incoming data and there is no more waiting.I have a large buffer like 256KB or 1 MB so a message always fits into the buffer.
What I do is have the size of the message at the start and a minimum message size of 256 bytes.
So I read 256 bytes which is often all I need, but if the length is longer I read the full length. This gives me one message with no need for copying. (And I use DirectByteBuffer)
It also gives me the message in a single read.
Maybe I just don't understand your solution entirely. It goes back to question 1. That wouldn't be surprising. I make a few assumptions. :)
The other thing is that the call to available() in socket reading effectively costs you nothing - the bottleneck is the rate at which data is coming in through the socket.I find the number of calls you make also creates overhead...
BTW: My solution is for server to server communications so I can assume there is a small number (<100) of controlled connections but there is a high volume of data which requires a low latency.
The solution (with custom serialization/RMI) can perform RMI calls as low at 20 us. (on loopback) and 110 us on a LAN. And send over 100,000 message per second over a single channel.
The custom serialization support serialization to/from DirectByteBuffer.

Similar Messages

  • What are the most common questions in the forums?

    I have my own ideas about what are the questions we see asked over and over and over again in here. Everyone post your ideas here so we can compile a FAQ and maybe post it somewhere (Virum, your new site? :) )

    Please do my homework/coursework/think for me
    This has to be by far the most common type of question asked on the forums.
    Classpath questions
    HashCode questions
    Pointer vs Reference Debate (totally spurious but people spew 100's of pages arguing about something that is perfectly obvious)
    A very good Thread that is probably 1000's of entries long by now is the
    "How to get your questions answered promptly" one (or however this is called). A recap of that published somewhere would be of tremendous value, especially if it was presented as a page you had to go through before landing in the forums to post your latest "Java Challenge" aka "do my coursework" on the boards.

  • Why isn't there a TechNet forum for ADFS yet? They have been forwarding questions to the "Project Geneva" forum for years now.

    Why isn't there a TechNet forum for ADFS yet? They have been forwarding questions to the "Project Geneva" forum for years now.
    It would be nice if there was IT Pro specific forum. The MSDN Geneva forum has people who have programming questions for WIF in addition to people trying to get ADFS and Web App Proxy setup.
    WHY?

    Given the growing importance of Office 365 and the role of ADFS in some of the larger deployments, that may happen. Someday.
    It is somewhat arbitrary.
    AD DS, AD CS, AD FS, and AD RMS are all considered components of Active Directory.
    I suppose that's what the AD stands for...
    Yet, most ADCS questions are posted and answered in the Technet Security forum.
    ADFS questions are often referred to Project Geneva.
    Directory Services has its own forum.
    Group Policy has its own forum.
    +++
    If you look in "related threads", someone asked a question precisely about ADCS:
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/f6abf662-7927-4f72-91db-433c95eddcc8/why-isnt-there-a-forum-dedicated-to-certificate-services?forum=winserversecurity
    Please mark as helpful if you find my contribution useful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you.

  • Have you officially joined BPX?  How many people have you invited?

    For those who are watching the Business Process Expert "general discussion" forum:
    The first question is: <b>Have you officially joined the BPX Community here? </b>
    If so, <u>thank you</u>.  You are one of the 8,328 people who have already joined in only the first four weeks of this community being available.  Note, too, that we're still in "sneak preview" mode so we haven't even done any announcements or awareness campaigns!  You're in on the "ground floor" with visionaries and leaders. 
    If you're not an official member yet, please join ... just go to the top of the page in the header under "Profile Management," see the category for "Update Profile," and check the box at the very bottom of that page that says "I would like to join the new Business Process Expert (BPX) Community."  Of course it's free and you get the benefits of posting forum questions and answers, blogging, etc. etc. 
    Please also sign-up for the newsletter while you're already on that page.  More than 100,000 people already subscribe and find it valuable.  We send a newsletter approximately every two weeks to highlight just a few of the new items and topics -- mostly as a reminder to return to the online community area(s) if you're not already in the good habit of doing so. 
    Second question is: <b>How many people have you referred to this new community with the recommendation to join?</b> 
    If you've invited at least three people who have joined, then "<u>thank you</u>!"  If they are new members of BPX and SDN (and if they used your name/email as a referrer when they joined), then you received award points as our thanks. 
    If you haven't yet invited at least three colleagues to join, please do so.  We think it'll help them in their jobs and careers, and we think it'll help you in your work with them (they're smarter, better informed, on the same page with their colleagues -- including you...). 
    Thank you for your membership, participation, and for spreading the word. 
    Mark Y.

    I have had numerous issues. Originally, I couldn't get video to work at all in Leopard (worked fine in Tiger). I just recently did all of the following things:
    Set QT STreaming to 1.5
    Set bandwidth (in iChat) to 500kbps (Comcast)
    Deleted iChat prefs and ichatagent prefs
    Set parallels network to "host only" (was on shared)
    Reset PRAM
    Reset security port to 443 (in iChat prefs, server settings)
    Restart iChat (obviously)
    Right now, all of my buddies are currently offline, but I did test with apple's auto-bots and interestingly, I'm getting video to work with appleu3test01 and appleu3test03, but I get the same connection problem as before with appleu3test02 ("There was a communication error during your chat"). I'm curious what's different about this bot's settings. I'll report more when I get to test with a real person.

  • Most common errors in submitting book created in iBA to iBooks?

    I'm getting ready to submit a book I've created in iBooks Author to the iBooks store.  (Still waiting on approval from iTunes Connect.)  Judging by discussions in this forum, many submissions fail because of problems with the iBA file that is sent to iBooks.  I'm wondering what the most common mistakes are--so I can avoid them!  My book looks fine on my iPad in preview but I have a feeling iBooks will have numerous issues with it when I submit it.  What kinds of things should I be aware of so I don't get "ticketed" by iBooks?

    Seen this User Tip?
                     iBA Tips and Tricks 01

  • Most common Java Runtime used by Windows Users

    I would like to know, what runtime environment is most commonly installed in Windows machines.
    On my website I use applets, however, I do not know which version of Java to use. The latest version has close to zero users who have it installed - and i dont want to anger my visitors with PLEASE DOWNLOAD LATEST JAVA RUNTIME messages. however, what ive been using so far, 1.1.8, is positively ANCIENT!
    i have been using that to be compatible with the MVM, but now i need additional features that come only 1.2 onwards... but do people have the JVMs for those versions?
    which should be my target compilation for optimum results?
    or should i just lump it and stick with 1.1.8?
    bear in mind that my target consumer is the average browser who doesnt have any high tech knowledge/inclination
    thanks

    There are really too many considerations, but here's my take on it....
    If you can write it to support 1.1.8 (although, technically, the MS JVM was really 1.1.4, but that won't matter much), then you could do that. Most of the people with the latest plugin versions will be using the plugin to run the applet anyway.
    But if you have to do stuff with Swing and some of the newer API stuff for 1.2 or higher, then I personally don't think it's worth the hassle to include the swingall.jar for Swing in 1.1.8, or to try to write/find AWT components that are rich enough to mimic Swing. My feeling is that eventually, you have to move on, cut the cord, whatever.
    IE/Windows isn't supposed to have the MS JVM anymore anyway. I haven't heard anything about MS putting it back in. Older systems (98, ME will, XP won't, especially after SP2) will still have it though. Netscape, Opera and Safari users will have to have the plugin anyway (except Netscape 4.x, which I hope no one's still using).
    One of the bigger considerations tends (or tended) to be that the JRE/Plugin was a fairly large download. So for dial-up users, that's a problem. For broadband users, that's not a problem at all, and I think I recently saw an article claiming broadband has overtaken dial-up in the US. No idea about other countries though. As mentioned, it can be set up to auto-download and install.
    If you are going to go with the plugin, stick with 1.4 for now, as more will have that then have upgraded to 1.5. Those that have, well, it won't matter.
    And finally, a lot of PC manufacturers (Dell, certainly) have been installing the JRE 1.4 for the last 2 couple of years anyway.
    Some people will certainly say that applets suck and aren't worth doing and there's no user support and all this stuff. Or tell you to try to use Flash, as the plugin has a larger install base.
    Flash is certainly something usable, if you want to buy Flash. But there are things that Java can do that Flash can't. There are certainly things Flash is better at then Java applets. So it comes down to what the thing needs to do.

  • Most commonly used format

    Hello Everyone,
    I have just made a promo reel for my girlfriend and I need some advice as to which format to export it in.
    I need to do two things; firstly I want to save it as a file we can give to people on a memory stick or via my idisk. I am not an expert with file formats and this is going to be viewed by people with macs and PC's. Is there a format that is recognised more than all the others? I know the quicktime option is probably the best but then within quicktime there are many other options which I am not sure about.
    Secondly (and im being a little lazy here because I haven't begun to learn DVD studio pro), if im planning on burning this to DVD, which format will DVD studio pro want to work with? (the footage is NTSC)
    Thanks very much for any help.
    Double_ohh

    It must just be the film industry then. I deal with all sorts of codecs on a daily basis and every time anyone comes across a .wmv file in our company they complain (and we're mainly on PCs except for us in editorial).
    We have done extensive research into which codecs are most common, easiest for a machine to run, maintains consistent color across platforms, and doesn't require additional downloads. We deal with everyone from super tech savvy people (we're in visual effects) to producers and directors that only check their e-mail and surf the web.
    MotionJpegA and/or PhotoJpeg have zero color loss when compared to the original files. The codec has been around for quite a while so it will play even in older versions of Quicktime. The main drawback is that the file size can get quite large.
    My girlfriend is in market research and consulting and she says they use .wmv files all the time. She also said they have had a few cases when they've sent the files to a client on a Mac only to have the client become frustrated because they had a hard time playing them back.
    Codecs are a messy thing and certain codecs work best for certain situations. We have had more success with H.264 than Windows Media files but that is just our experience. If you plan on sending it mainly to PC users in a professional office environment then Windows Media will probably work great, if you plan to send it out to a professional creative environment on mixed platforms I would look at using something else.

  • I am in a group chat with like 7 other people who all have smartphones. 6 of the people have iPhones, but the other person has android. I'm wondering if the iMessage works for the other 6, and my text count is only being accounted for by the android.

    I am in a group chat with like 7 other people who all have smartphones. 6 of the people have iPhones, but the other person has android. I'm wondering if the iMessage works for the other 6, and my text count is only being accounted for by the android user. I have a monthly limit of 1000 text so I dont want to go over my plan by being in this group if the iMessage doesnt work because of that one android user.

    Use the trackpad to scroll, thats what it was designed for. The scroll bars automatically disappear when not being used and will appear if you scroll up or down using the trackpad.
    This is a user-to-user forum and most people will post on here if they have problems. You very rarely get people posting to say there update went smooth. The fact is the vast majority of Mountain Lion users will not be experiencing any major problems with the OS, or maybe with apps which are not compatible, but thats hardly Apple's fault if developers don't update their apps.

  • EP forum is the worst forum when it comes to people rewarding points

    EP forum is the worst forum when it comes to people rewarding points. I wish somebody could moderate the EP forums.

    Hello Prakash,
    You have company. I do not know the exact statistics, but the ABAP Programming Forum is not far behind. Of late I find a lot of newbies in there and most of them don't even return back to look at what answers they've got, forget about rewarding points. If they do return, I keep trying to coax them into doing so :-).
    But there's always a trade-off between having the satisfaction of having cracked a tough problem and helping someone out and the disappointment of not getting the points for those answers which you have really spent effort trying to solve.
    There's one thing that you might want to do -
    1. Since you're a seasoned user here, you will be knowing about the trend of the points. For example, there are some users who always reward points. you can have a Watch for the posts made by them and the chances are you'll get the points you deserve. You'll even strike a rapport with some of them, as I have in the ABAP Forum.
    2. There will be certain questions which you simply can't let go, because they are so ineresting. You may have never thought about a particular possibility which someone else is trying to explore. but since you do have the basics very string, you can really set off and come up with a good answer. In such cases, you may not really bother about the points - because the idea might prod you to write a whole weblog on that, which will give you the points anyways. But, such questions are rare to come by - at least from my experience with the ABAP Forum.
    3. And lastly there are a few questions (actually there are several in the ABAP Forum) which have been asked several times in the past and answered. The person asking the question is either too lazy to do a search / is very new around here. If you want to, then you can remind that user to first do a search. These questions do not add value to the content on SDN. So <i>ideally</i>, we shouldn't be expecting to get any points for them. If the user remembers to give you the points, then it's okay, otherwise, I don't think it's a good idea to insist the user to give the points (this is of course, my personal opinion).
    4. Anyways, thanks to the increasing awareness about SDN among the developer community, there are more and more people who are getting conversant with new stuff. And these users will be able to solve questions which an experienced guy might consider very trivial - the reason, this guy had also learnt that answer very recently and answering the questions reinforces the concept. And he wouldn't mind the points too much :-). Hopefully, there'll always be such users  - which will ensure that every question gets answered regardless of whether the user asking the question is the kind who rewards points or not.
    Hmmm... That was a bit too long, wasn't it ? I just wanted to let you know that you're not alone :-). Let me know what you think.
    Regards,
    Anand Mandalika.

  • Most common issue on RMAN 11gR2 and MyOracleSupport Community

    Hello,
    under the My Oracle support Community, we have just posted a link to a list of most common RMAN issues when running 11gR2 release.
    You may want to check it and collaborate with other customers and experts to get the best from it.
    The My Oracle Support Community which covers all support related questions on Backup and Recovery (and Recovery Manager of course) is available under: [https://communities.oracle.com/portal/server.pt/community/database_backup_and_recovery/243]
    Have you ever visited the Community to exchange, learn, share and get answers to your support related questions?
    This My Oracle Support Community is a vibrant forum for Oracle customers, partners and employees to share knowledge, discover best practices and ask questions. We encourage you to use these communities for all your support related topics.
    Generally with over 427,000 members and 227 communities dedicated to product and industry-specific topics, the My Oracle Support Community encompasses a huge range of technologies, applications, and business processes—including 30 focused communities for Oracle Database, 6 for Enterprise Manager, 4 for Engineered Systems etc.
    Join a community of peers with real-world experience using Oracle products, and Oracle support engineers who moderate and contribute to discussions, for unparalleled access to deep and practical expertise. With My Oracle Support Community, you’ll get faster, real-time access to information about Oracle technologies to help you improve your operational efficiency and reduce downtime.
    An existing support contract is required for this service.
    If you have not used the My Oracle Support Communities before, please watch this brief (2 minute) video to help you quickly understand the benefits available to you.
    [http://bcove.me/rvjqwdn5]
    Regards,
    Carmelo Amoroso
    (Snr Manager High Availability Produts for Global Customer Support)

    Hi,
    Permissions Issue on STANDBY machine?First problem I see is the sysdba password must be the same on both sides (target and auxiliary dbs).
    From the documentation.
    The source database and auxiliary instances must use the same SYSDBA password, which means that both instances must have password files. You can
    create the password file with a single password so you can start the auxiliary instance and enable the source database to connect to it.Check all prereqs for the standby db duplicate here.
    http://download.oracle.com/docs/cd/E11882_01/backup.112/e10643/rcmsynta020.htm#i81724
    Rgds,
    Tycho

  • I see that many people have already complained about Itunes' backup encryption. I NEVER set a password for it (and the corresponding option is still unticked, as always) yet it asked me for a pwd when I upgraded my 3GS to the 5.0 OS. How to solve this?

    I see that many people have already complained about Itunes' backup encryption. I NEVER set a password for it (and the corresponding option is still unticked, as always) yet it asked me for a pwd when I upgraded my 3GS to the 5.0 OS. How to solve this?

    To prevent others from reading your mail, don't give them access to your account. If others need to use your computer for some reason, set up personal accounts, or a guest account, and switch to it before allowing them access. This is the simplest, and most effective, method.
    Email message files can be read as plain text in TextEdit or any word processor.
    To protect your email messages from being viewed by others while in your account, you would have to lock the folder, putting it into an encrypted disk image that required a password to be opened and mounted. You would have to double-click on the image and give your password to mount it before launching Mail then unmount it as soon as you're done. My guess is that you could replace the ~/Library/Mail folder with an alias pointing to the folder on the disk image.
    It may work, but it seems like a lot of unnecessary hassle.

  • Most Common Interview questions... help needed

    Hello,
    I have an interview coming up for a BEA WebLogic developer position. Please let me know what are the most common questions could be for WebLogic (including Portal, Integration, Workshop, and WLServer)if any one knows/or has a list or somethin....i appreciate any help
    Thanks
    Vishal

    Hello,
    I have an interview coming up for a BEA WebLogic developer position. Please let me know what are the most common questions could be for WebLogic (including Portal, Integration, Workshop, and WLServer)if any one knows/or has a list or somethin....i appreciate any help
    Thanks
    Vishal

  • How would I find the most common value every nth row in a column

    SCENARIO 1
    I have a column with a series of numbers in c1:c1000 as follows:
    2
    2
    3
    1
    1
    4
    2
    3
    1
    2...
    and I would like to find the most common value for every nth (in this case, second) row.
    SCENARIO 2
    Originally, I created a separate column in J and used this to find a value of 0 or 1 via a filter to label the rows odd or even. I was then going to create two separate columns, one for even rows of data and another for odd rows of data to separate them and perform functions on each column. But I do not know how to copy just the filtered data to one of the new columns to apply the MODE function (or any other for that matter).
    Perhaps my question should be: after applying a filter, how do i copy just the visible filtered data of every nth row to a new column in my spreadsheet while retaining the original column with all rows of data? 
    BACK TO SCENARIO 1
    If I do not need to go through this effort, I would just apply the MODE function (or AVERAGE or SUM) to every nth row in the original data column.

    Since Index and Offset were already taken, I used INDIRECT(ADDRESS()) in my example.
    Here's how I approached it:
    Expressions are as follows...
    Data Subset, Column A, Row 2: =IF(StartingRow :: A, 1, NSelector :: $A)
    Subsequent rows in Column A: =IF(ROW()<COUNT(Input :: $B)/NSelector :: A:$A+2, A2+NSelector :: $A, "")
    Data Subset, Column B, Rows 3
    throuth the last: =IFERROR(INDIRECT(ADDRESS(A+1, 2, ,,"Input")), "")
    Stats, Column A, Row 2: =IFERROR(MODE(Data Subset :: B), "No Mode")
    Stats, Column B, Row 2: =COUNTIF(Data Subset :: B, A)
    Lots of ways to skin this cat.
    Jerry

  • Most common errors occurred to your PROD EBS

    Hi Friends,
    Can you share the most common errors happened to your EBS production system?
    That I have to be aware of or be careful with or be watchful of.
    As far as our PROD EBS R12 is concerned: (we have implemented GL yet) on production
    and to follow is AR,AP,FA,CE.
    The following errors happened,
    1. PASTA printing does not work. where you have to kill or restart something process at
    the OS level. but it happened long time like (1 in every quarter).
    2. Tablespace full ( i wonder why that tablespace was not autoextend on)
    3. Temp tablespace full (I wonder why some reports are very heavy user of TEMP)
    4. Performance downgraded (the solution was to gather stats monthly)
    5. OPP process wont start even if you reboot the server
    ( the solution was to kill -9 all the "applmgr" owned process)
    ...can you and more please...:) with your PROD experience
    Thanks a lot

    Hi again :)
    By the way, If I have to be proactive with my managing our EBS system, are these the logs that I have to check frequently? or there are other logs aside from these:
    /u02/applmgr/PROD/inst/apps/PROD_rel12/logs/appl/admin/log/adopmnctl.txt
    /u02/applmgr/PROD/inst/apps/PROD_rel12/logs/appl/admin/log/adapcctl.txt
    /u02/applmgr/PROD/inst/apps/PROD_rel12/logs/appl/admin/log/adoacorectl.txt
    /u02/applmgr/PROD/inst/apps/PROD_rel12/logs/appl/admin/log/adformsctl.txt
    /u02/applmgr/PROD/inst/apps/PROD_rel12/logs/appl/admin/log/adoafmctl.txt
    /u02/applmgr/PROD/inst/apps/PROD_rel12/logs/appl/admin/log/adalnctl.txt
    /u02/applmgr/PROD/inst/apps/PROD_rel12/logs/appl/admin/log/adcmctl.txt
    /u02/applmgr/PROD/inst/apps/PROD_rel12/logs/appl/admin/log/adstrtal.log
    Can I delete these logs on from time to time after checking that the logs got no error in it?
    Why is that I can not find logs for these other two (2) scripts?
    /u02/applmgr/PROD/inst/apps/PROD_rel12/admin/scripts/ieo/ieoicsm.sh start
    /u02/applmgr/PROD/inst/apps/PROD_rel12/admin/scripts/jtffmctl.sh start
    Thanks a lot

  • I am unable to aceess torrentz website.its coming that your IP address is abusing this server and most common reason is broken RSS reader

    i am unable to aceess torrentz website.its coming that your IP address is abusing this server and most common reason is broken RSS reader

    I have discovered it is most likely because you have Ad-Blocking software.
    If your posting on a Mozilla site, then you probably (like me) use FireFox and probably also have the addon: AdBlock Plus, like I also do. I simply disabled on Torrentz.eu (also Torrentz.me would cause this problem) & when I refreshed it allowed me again.

Maybe you are looking for