Poll Summary

Number Of Votes Cast
88085
Overall Acceptance Rates
Choice Number Percentage
Yes 55853 0.6340807174887892
No 19848 0.22532780836691832
Undecided 12384 0.14059147414429243

Servlets and JSPsYesNoUndecidedVotes
A Web App Framework - WEB4J 0.6197488090082287 0.1797314854915548 0.20051970550021656 2309
Always maintain HttpSessions 0.7239263803680982 0.15950920245398773 0.1165644171779141 163
Beware multilingual submit buttons 0.6420454545454546 0.20454545454545456 0.1534090909090909 176
Beware of common hacks 0.8484848484848485 0.07575757575757576 0.07575757575757576 132
Beware of custom cookies 0.7787610619469026 0.07079646017699115 0.1504424778761062 113
Beware of doubly escaped ampersands 0.7692307692307693 0.1282051282051282 0.10256410256410256 78
Beware of URL rewriting 0.6263736263736264 0.21978021978021978 0.15384615384615385 182
Choose form validation style carefully 0.7131147540983607 0.18032786885245902 0.10655737704918032 122
Consider Controllers for redirects 0.4878048780487805 0.24390243902439024 0.2682926829268293 41
Do not synchronize doGet, doPost 0.6895705521472393 0.19631901840490798 0.11411042944785275 815
Emit flexible URLs 0.7352941176470589 0.07352941176470588 0.19117647058823528 68
Escape special characters 0.5824053452115813 0.2984409799554566 0.11915367483296214 898
Forward versus redirect 0.7187060478199718 0.13642756680731363 0.14486638537271448 711
JSPs should contain only presentation logic 0.8766519823788547 0.06167400881057269 0.06167400881057269 227
Loss of data during restart 0.6605504587155964 0.14678899082568808 0.1926605504587156 109
Manage sessions closely 0.803921568627451 0.10457516339869281 0.0915032679738562 153
Measure web app performance 0.8629441624365483 0.08121827411167512 0.05583756345177665 197
Minimize site response time 0.7291666666666666 0.14583333333333334 0.125 96
Parse parameters into domain objects 0.4 0.32 0.28 25
Pre-populate forms 0.45714285714285713 0.34285714285714286 0.2 105
Prefer JSTL tags 0.7414634146341463 0.15121951219512195 0.1073170731707317 205
Prefer UTF-8 in all layers 0.7948717948717948 0.09615384615384616 0.10897435897435898 156
Prevent self-linking 0.39285714285714285 0.5357142857142857 0.07142857142857142 28
Refactor large Controllers 0.8 0.1 0.1 20
Repel invalid requests 0.76 0.12 0.12 25
Reuse login page for errors 0.695 0.175 0.13 200
Send trouble-ticket emails 0.5454545454545454 0.18181818181818182 0.2727272727272727 22
Serve binary content 0.5949367088607594 0.21518987341772153 0.189873417721519 79
Session-scope objects often Serializable 0.7443609022556391 0.13533834586466165 0.12030075187969924 133
Struts seems mediocre 0.4354066985645933 0.3875598086124402 0.17703349282296652 209
Thread-safety in web apps 0.7457627118644068 0.15593220338983052 0.09830508474576272 295
Understand details of FORM tags 0.7941176470588235 0.08823529411764706 0.11764705882352941 34
Use Cascading Style Sheets 0.696 0.192 0.112 125
Use extensions for fine-grained security 0.5306122448979592 0.3469387755102041 0.12244897959183673 49
Use Model-View-Controller framework 0.8919753086419753 0.033950617283950615 0.07407407407407407 324
Use templates to standardize layout 0.4642857142857143 0.39285714285714285 0.14285714285714285 56
Validate email addresses 0.43523316062176165 0.4170984455958549 0.14766839378238342 386
Validate generated HTML 0.7101449275362319 0.14782608695652175 0.14202898550724638 345
Web usability guidelines 0.8378378378378378 0.05405405405405406 0.10810810810810811 37
Wrap file upload requests 0.4626865671641791 0.26865671641791045 0.26865671641791045 67
SwingYesNoUndecidedVotes
A Swing App - StocksMonitor 0.6859903381642513 0.16183574879227053 0.15217391304347827 414
Actions 0.6979166666666666 0.20833333333333334 0.09375 96
Align menu items 0.6597938144329897 0.20618556701030927 0.13402061855670103 97
Change theme 0.6666666666666666 0.1836734693877551 0.14965986394557823 147
Consider JGoodies Forms for layouts 0.7 0.075 0.225 120
Don't bury dialogs 0.6785714285714286 0.14285714285714285 0.17857142857142858 28
Don't subclass JDialog or JFrame 0.3067484662576687 0.4110429447852761 0.2822085889570552 163
Filter table rows 0.5 0.3888888888888889 0.1111111111111111 18
Input dialogs 0.5348837209302325 0.2558139534883721 0.20930232558139536 43
Launch other applications 0.7333333333333333 0.26666666666666666 0.0 30
Layout Managers 0.6352941176470588 0.22745098039215686 0.13725490196078433 255
Look and Feel guidelines 0.8571428571428571 0.08163265306122448 0.061224489795918366 49
Minimal Swing application 0.5766423357664233 0.25547445255474455 0.1678832116788321 137
Observers and listeners 0.4567307692307692 0.2980769230769231 0.24519230769230768 208
Preferences dialogs 0.46875 0.15625 0.375 32
Provide an uncaught exception handler 0.60431654676259 0.20863309352517986 0.18705035971223022 139
Render table cells 0.656957928802589 0.18446601941747573 0.15857605177993528 309
Sort table rows 0.4567901234567901 0.2839506172839506 0.25925925925925924 81
Splash screen 0.5642633228840125 0.30407523510971785 0.13166144200626959 319
Standardized dialogs 0.5555555555555556 0.3333333333333333 0.1111111111111111 27
Swing in general 0.75 0.08333333333333333 0.16666666666666666 36
Swing threads 0.5647058823529412 0.22941176470588234 0.20588235294117646 170
Swing utility tasks 0.775 0.125 0.1 40
Timers 0.3233082706766917 0.48872180451127817 0.18796992481203006 133
Using JavaHelp 0.53125 0.2916666666666667 0.17708333333333334 96
Using preferences 0.4411764705882353 0.3088235294117647 0.25 68
Verify input with Model Objects 0.6363636363636364 0.18181818181818182 0.18181818181818182 11
Verify input with regular expressions 0.4358974358974359 0.3333333333333333 0.23076923076923078 39
ExceptionsYesNoUndecidedVotes
Avoid @throws in javadoc 0.42990654205607476 0.3247663551401869 0.24532710280373832 428
Avoid empty catch blocks 0.8179012345679012 0.11419753086419752 0.06790123456790123 324
Be specific in throws clause 0.6058394160583942 0.3248175182481752 0.06934306569343066 274
Beware of unknown root causes 0.3548387096774194 0.2903225806451613 0.3548387096774194 31
Checked versus unchecked exceptions 0.5166256157635468 0.2789408866995074 0.2044334975369458 1624
Exception translation 0.9166666666666666 0.05303030303030303 0.030303030303030304 132
Exceptions and control flow 0.6868131868131868 0.17032967032967034 0.14285714285714285 182
Finally and catch 0.6594982078853047 0.1989247311827957 0.14157706093189965 558
Javadoc all exceptions 0.569620253164557 0.22784810126582278 0.20253164556962025 158
Pass all pertinent data to exceptions 0.9448818897637795 0.015748031496062992 0.03937007874015748 127
Stack trace as String 0.761969904240766 0.15047879616963064 0.08755129958960328 731
Use template for repeated try-catch 0.6551724137931034 0.11494252873563218 0.22988505747126436 87
Input-OutputYesNoUndecidedVotes
Always close streams 0.7438692098092643 0.14713896457765668 0.10899182561307902 367
Buffering usually appropriate 0.863013698630137 0.0547945205479452 0.0821917808219178 73
Console input 0.5273972602739726 0.2979452054794521 0.17465753424657535 292
Copy a file 0.6779661016949152 0.22033898305084745 0.1016949152542373 118
Reading and writing binary files 0.48125 0.278125 0.240625 320
Reading and writing Serializable objects 0.5641025641025641 0.26153846153846155 0.17435897435897435 390
Reading and writing text files 0.6067415730337079 0.22534332084893882 0.1679151061173533 3204
DatabasesYesNoUndecidedVotes
Business identifiers as String 0.8307210031347962 0.10658307210031348 0.06269592476489028 319
Connection pools 0.8694158075601375 0.061855670103092786 0.06872852233676977 291
Consider data layer tools 0.5714285714285714 0.21428571428571427 0.21428571428571427 42
Consider using standard SQL 0.693069306930693 0.1782178217821782 0.12871287128712872 101
Consider wrapper classes for optional data 0.7681159420289855 0.13043478260869565 0.10144927536231885 69
Data access objects 0.6354166666666666 0.1909722222222222 0.1736111111111111 288
Data exception wrapping 0.7288135593220338 0.15254237288135594 0.11864406779661017 59
Data is king 0.8771929824561403 0.06140350877192982 0.06140350877192982 114
Don't perform basic SQL tasks in code 0.8533333333333334 0.08 0.06666666666666667 75
Encapsulate connections 0.8043478260869565 0.06521739130434782 0.13043478260869565 46
Keep SQL out of code 0.5384615384615384 0.31794871794871793 0.14358974358974358 195
Prefer PreparedStatement 0.8955223880597015 0.04477611940298507 0.05970149253731343 67
Reduce database code duplication 0.9032258064516129 0.03225806451612903 0.06451612903225806 31
Remember the basics of database design 0.873015873015873 0.06349206349206349 0.06349206349206349 63
Simplify database operations 0.5 0.3 0.2 20
Try pseudo-persistence for mock ups 0.6296296296296297 0.25925925925925924 0.1111111111111111 27
Use template for transactions 0.6842105263157895 0.05263157894736842 0.2631578947368421 19
CollectionsYesNoUndecidedVotes
Choosing the right Collection 0.808284023668639 0.09230769230769231 0.09940828402366864 845
Encapsulate collections 0.815 0.065 0.12 200
Iterate without an index 0.7701863354037267 0.17080745341614906 0.059006211180124224 322
Prefer Collections over older classes 0.8429752066115702 0.05785123966942149 0.09917355371900827 121
Two ways of using Iterator 0.607421875 0.240234375 0.15234375 1536
Use for-each liberally 0.7578125 0.15625 0.0859375 256
Use interface references to Collections 0.7 0.19166666666666668 0.10833333333333334 120
Use standard Collections 0.8272251308900523 0.05759162303664921 0.11518324607329843 191
Overriding Object MethodsYesNoUndecidedVotes
Avoid clone 0.41929499072356213 0.34879406307977734 0.23191094619666047 539
Implementing compareTo 0.5012406947890818 0.3349875930521092 0.16377171215880892 403
Implementing equals 0.5895061728395061 0.27469135802469136 0.13580246913580246 324
Implementing hashCode 0.5552631578947368 0.26842105263157895 0.1763157894736842 380
Implementing toString 0.4976303317535545 0.3056872037914692 0.1966824644549763 422
Never rely on finalize 0.7263157894736842 0.15789473684210525 0.11578947368421053 95
Common TasksYesNoUndecidedVotes
Arrays as String 0.4740484429065744 0.35294117647058826 0.17301038062283736 289
Clipboard copy and paste 0.7741416309012875 0.13465665236051502 0.09120171673819742 1864
Command line operations 0.45454545454545453 0.38636363636363635 0.1590909090909091 308
Compare and sort Strings 0.5067114093959731 0.34563758389261745 0.1476510067114094 298
Copy an array 0.5865834633385335 0.29329173166926675 0.12012480499219969 641
Determine if Strings are equal 0.6685499058380414 0.24293785310734464 0.08851224105461393 531
Examine bytecode 0.5217391304347826 0.3695652173913043 0.10869565217391304 46
Fetch web page and header 0.6448598130841121 0.205607476635514 0.14953271028037382 321
Generate random numbers 0.6108273748723186 0.26321992614127443 0.12595269898640685 12727
Get database connection 0.5497553017944535 0.2838499184339315 0.16639477977161501 1226
Get size of object in memory 0.3907103825136612 0.4344262295081967 0.17486338797814208 366
Implement code tables 0.5714285714285714 0.23214285714285715 0.19642857142857142 56
Internationalization 0.5 0.29411764705882354 0.20588235294117646 68
Logging messages 0.6039922730199614 0.22537025112685125 0.1706374758531874 1553
Measure application performance 0.7719298245614035 0.14035087719298245 0.08771929824561403 57
Modernize old code 0.8852459016393442 0.06557377049180328 0.04918032786885246 61
Open file in native directory 0.5555555555555556 0.3333333333333333 0.1111111111111111 9
Parse text 0.6068759342301944 0.21524663677130046 0.17787742899850523 669
Pattern-match lines of a file 0.5653846153846154 0.27692307692307694 0.1576923076923077 260
Read jar version information 0.5555555555555556 0.3434343434343434 0.10101010101010101 99
Recovering resources 0.8529411764705882 0.08823529411764706 0.058823529411764705 34
Recursive file listing 0.7322551662174304 0.16172506738544473 0.10601976639712489 1113
Replace a substring 0.5822784810126582 0.29873417721518986 0.1189873417721519 395
Representing money 0.7466918714555766 0.11531190926275993 0.13799621928166353 529
Send an email 0.5501912045889101 0.23852772466539196 0.2112810707456979 2092
Time execution speed 0.7111111111111111 0.2074074074074074 0.08148148148148149 135
Common Design PatternsYesNoUndecidedVotes
Abstract Factory 0.6946107784431138 0.16766467065868262 0.1377245508982036 167
Command objects 0.55 0.2 0.25 20
Factory methods 0.6212871287128713 0.2141089108910891 0.1646039603960396 808
Immutable objects 0.8119304059652029 0.09444904722452362 0.0936205468102734 1207
Lazy initialization 0.7525773195876289 0.13402061855670103 0.1134020618556701 194
Model Objects 0.6111111111111112 0.16666666666666666 0.2222222222222222 126
Plugin Factory 0.7 0.1 0.2 30
Private constructor 0.7346491228070176 0.14364035087719298 0.12171052631578948 912
Singleton 0.7246835443037974 0.17405063291139242 0.10126582278481013 316
Template method 0.711864406779661 0.22033898305084745 0.06779661016949153 59
Type-Safe Enumerations 0.8 0.1076923076923077 0.09230769230769231 390
Wrapper (Decorator) 0.5769230769230769 0.27884615384615385 0.14423076923076922 104
Common PracticesYesNoUndecidedVotes
Avoid basic style errors 0.8583333333333333 0.06666666666666667 0.075 120
Avoid raw types 0.7721518987341772 0.15611814345991562 0.07172995780590717 237
Beware of instanceof operator 0.6150159744408946 0.23162939297124602 0.15335463258785942 1878
Class for constants 0.6320346320346321 0.23376623376623376 0.1341991341991342 924
Construct classes from the outside in 0.9130434782608695 0.057971014492753624 0.028985507246376812 69
Do not break portability 0.7466666666666667 0.18666666666666668 0.06666666666666667 75
Don't declare local variables before use 0.5612244897959183 0.25510204081632654 0.1836734693877551 294
Fields should usually be private 0.6557377049180327 0.20491803278688525 0.13934426229508196 122
Interface for constants 0.32189349112426036 0.5396449704142012 0.13846153846153847 845
Know the core libraries 0.7966101694915254 0.0847457627118644 0.11864406779661017 118
Minimize ripple effects 0.8716216216216216 0.033783783783783786 0.0945945945945946 148
Naming conventions 0.3333333333333333 0.5867768595041323 0.07988980716253444 363
Nest classes with care 0.5263157894736842 0.3157894736842105 0.15789473684210525 19
Output parameters 0.38144329896907214 0.3917525773195876 0.2268041237113402 194
Separate public and private members 0.7252747252747253 0.17582417582417584 0.0989010989010989 91
String concatenation does not scale 0.8484848484848485 0.09696969696969697 0.05454545454545454 165
Tag or marker interfaces 0.652 0.192 0.156 250
Uncommon classes need explicit imports 0.7672413793103449 0.13793103448275862 0.09482758620689655 116
Use @Override liberally 0.834051724137931 0.08836206896551724 0.07758620689655173 464
Use final liberally 0.6103151862464183 0.22636103151862463 0.16332378223495703 698
Use javadoc liberally 0.7640449438202247 0.11797752808988764 0.11797752808988764 178
Use static imports rarely 0.5748987854251012 0.291497975708502 0.13360323886639677 741
Use System.exit with care 0.6682769726247987 0.18840579710144928 0.143317230273752 621
Use Version Control tools 0.6865671641791045 0.13432835820895522 0.1791044776119403 67
Validate method arguments 0.6260162601626016 0.21951219512195122 0.15447154471544716 246
Wisdom, not rules 0.9607843137254902 0.0196078431372549 0.0196078431372549 51
InheritanceYesNoUndecidedVotes
Consider composition instead of subclassing 0.7745664739884393 0.07514450867052024 0.15028901734104047 173
Designing for subclassing 0.7534246575342466 0.136986301369863 0.1095890410958904 73
Overridable methods need special care 0.8217821782178217 0.06930693069306931 0.10891089108910891 101
Remember styles of inheritance 0.94 0.0 0.06 50
More Common PracticesYesNoUndecidedVotes
Avoid null if possible 0.6270096463022508 0.2315112540192926 0.1414790996784566 311
Beware of Byte Order Marks 0.6764705882352942 0.2647058823529412 0.058823529411764705 34
Beware of DecimalFormat 0.43169398907103823 0.31693989071038253 0.25136612021857924 183
Beware of floating point numbers 0.8790322580645161 0.08064516129032258 0.04032258064516129 124
Clarifying method 0.8958333333333334 0.0625 0.041666666666666664 96
Coding conventions 0.8709677419354839 0.043010752688172046 0.08602150537634409 93
Compile regular expressions once 0.75 0.16071428571428573 0.08928571428571429 56
Conditional compile 0.5 0.3879310344827586 0.11206896551724138 232
Consider code generators 0.7532467532467533 0.14285714285714285 0.1038961038961039 77
Consider immutable forms for dates 0.4666666666666667 0.38333333333333336 0.15 60
Conventional name for return value 0.7291666666666666 0.1875 0.08333333333333333 144
Defensive copying 0.8651452282157677 0.06016597510373444 0.07468879668049792 482
Design by Contract 0.8045977011494253 0.09195402298850575 0.10344827586206896 174
Don't use tab characters 0.35502958579881655 0.5946745562130178 0.05029585798816568 338
Extra space in argument list 0.18840579710144928 0.7536231884057971 0.057971014492753624 552
Generating unique IDs 0.5729688101655757 0.2672314208702349 0.15979976896418946 2597
Include 'from', exclude 'to' 0.7931034482758621 0.1206896551724138 0.08620689655172414 58
Multiple return statements 0.547568710359408 0.33403805496828753 0.11839323467230443 473
Overloading can be tricky 0.7766990291262136 0.14563106796116504 0.07766990291262135 103
Package by feature, not layer 0.7209302325581395 0.12458471760797342 0.15448504983388706 1204
Passwords never in clear text 0.6527777777777778 0.1736111111111111 0.1736111111111111 144
Prefer empty items to null ones 0.6818181818181818 0.20813397129186603 0.11004784688995216 418
Quote dynamic text when logging 0.8181818181818182 0.12121212121212122 0.06060606060606061 99
Self-encapsulate fields 0.6354166666666666 0.16666666666666666 0.19791666666666666 192
Structs are occasionally useful 0.6639676113360324 0.16194331983805668 0.17408906882591094 247
Test using main method 0.3644067796610169 0.5338983050847458 0.1016949152542373 118
Try alternatives to ResourceBundle 0.3225806451612903 0.3387096774193548 0.3387096774193548 62
Use a fake system clock 0.5594405594405595 0.24475524475524477 0.1958041958041958 143
Use a testing framework (JUnit) 0.8376068376068376 0.09401709401709402 0.06837606837606838 117
Use Ant for build scripts 0.7313432835820896 0.14925373134328357 0.11940298507462686 268
Use boxing with care 0.6699507389162561 0.21182266009852216 0.11822660098522167 203
Use enums to restrict arguments 0.7246376811594203 0.12318840579710146 0.15217391304347827 138
Validate state with class invariants 0.6 0.24285714285714285 0.15714285714285714 70
Validation belongs in a Model Object 0.5777777777777777 0.3037037037037037 0.11851851851851852 135
AssertionsYesNoUndecidedVotes
Assert is for private arguments only 0.8163265306122449 0.1360544217687075 0.047619047619047616 147
Assert use cases 0.3588516746411483 0.4354066985645933 0.20574162679425836 209
Assertions in general 0.8571428571428571 0.14285714285714285 0.0 35
Force enabling of assertions 0.5689655172413793 0.27586206896551724 0.15517241379310345 58
ConstructorsYesNoUndecidedVotes
Avoid JavaBeans style of construction 0.6213768115942029 0.19202898550724637 0.18659420289855072 552
Beware of mistaken field redeclares 0.8333333333333334 0.1 0.06666666666666667 30
Construct Object using class name 0.536697247706422 0.30275229357798167 0.16055045871559634 218
Constructors in general 0.64 0.26 0.1 50
Constructors shouldn't call overridables 0.5955056179775281 0.25280898876404495 0.15168539325842698 178
Constructors shouldn't start threads 0.7 0.18 0.12 50
Copy constructors 0.6398786959818044 0.22441243366186506 0.13570887035633056 1319
Don't pass 'this' out of a constructor 0.6271186440677966 0.23728813559322035 0.13559322033898305 59
Initializing fields to 0-false-null is redundant 0.6770833333333334 0.2265625 0.09635416666666667 384
SerializationYesNoUndecidedVotes
Implementing Serializable 0.6319845857418112 0.1859344894026975 0.18208092485549132 1038
Serialization and subclassing 0.49504950495049505 0.31683168316831684 0.18811881188118812 101
Some classes need readResolve 0.76 0.12 0.12 75
ThreadsYesNoUndecidedVotes
Always shut down an ExecutorService 0.7410714285714286 0.11607142857142858 0.14285714285714285 560
Avoid ThreadGroup 0.5555555555555556 0.24691358024691357 0.19753086419753085 162
Data integrity first 0.7358490566037735 0.1069182389937107 0.15723270440251572 159
Document thread safety 0.7333333333333333 0.17777777777777778 0.08888888888888889 45
Dump thread information 0.7916666666666666 0.16666666666666666 0.041666666666666664 24
Handle InterruptedException 0.5918367346938775 0.20408163265306123 0.20408163265306123 49
Launch thread is just another user thread 0.8378378378378378 0.08108108108108109 0.08108108108108109 37
Objects communicating across threads 0.6940298507462687 0.1791044776119403 0.12686567164179105 134
Perform N tasks in parallel 0.6066066066066066 0.18018018018018017 0.2132132132132132 333
Prefer modern libraries for concurrency 0.9473684210526315 0.05263157894736842 0.0 19
Query host for the number of processors 0.8823529411764706 0.08823529411764706 0.029411764705882353 34
Read-write locks 0.7058823529411765 0.13725490196078433 0.1568627450980392 102
Remember the types of intrinsic lock 0.8044280442804428 0.0996309963099631 0.0959409594095941 271
Schedule periodic tasks 0.6592964824120603 0.19597989949748743 0.14472361809045226 1990
Stop threads through cooperation 0.6333333333333333 0.2866666666666667 0.08 150
Synchronize access to mutable fields 0.558974358974359 0.28205128205128205 0.15897435897435896 195
Synchronized is implementation detail 0.6129032258064516 0.24731182795698925 0.13978494623655913 93
Thread priorities are not portable 0.6458333333333334 0.1875 0.16666666666666666 48
Use finally to unlock 0.8048780487804879 0.12195121951219512 0.07317073170731707 41
© 2017 Hirondelle Systems | Source Code | Contact | License | RSS
Individual code snippets can be used under this BSD license - Last updated on September 21, 2013.
Over 2,000,000 unique IPs last year - Built with WEB4J.
- In Memoriam : Bill Dirani -