Poll Summary

Number Of Votes Cast
87035
Overall Acceptance Rates
Choice Number Percentage
Yes 55247 0.6347676222209456
No 19605 0.2252542080772103
Undecided 12183 0.1399781697018441

Servlets and JSPsYesNoUndecidedVotes
A Web App Framework - WEB4J 0.6191319751992914 0.17936226749335696 0.20150575730735165 2258
Always maintain HttpSessions 0.7142857142857143 0.16770186335403728 0.11801242236024845 161
Beware multilingual submit buttons 0.6457142857142857 0.2 0.15428571428571428 175
Beware of common hacks 0.8484848484848485 0.07575757575757576 0.07575757575757576 132
Beware of custom cookies 0.7767857142857143 0.07142857142857142 0.15178571428571427 112
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.6897404202719407 0.1965389369592089 0.11372064276885044 809
Emit flexible URLs 0.7352941176470589 0.07352941176470588 0.19117647058823528 68
Escape special characters 0.5840807174887892 0.2982062780269058 0.11771300448430494 892
Forward versus redirect 0.7209631728045326 0.1359773371104816 0.14305949008498584 706
JSPs should contain only presentation logic 0.8766519823788547 0.06167400881057269 0.06167400881057269 227
Loss of data during restart 0.6666666666666666 0.1388888888888889 0.19444444444444445 108
Manage sessions closely 0.803921568627451 0.10457516339869281 0.0915032679738562 153
Measure web app performance 0.8666666666666667 0.07692307692307693 0.05641025641025641 195
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.46601941747572817 0.33980582524271846 0.1941747572815534 103
Prefer JSTL tags 0.7450980392156863 0.14705882352941177 0.10784313725490197 204
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.7384615384615385 0.13846153846153847 0.12307692307692308 130
Struts seems mediocre 0.4326923076923077 0.3894230769230769 0.1778846153846154 208
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.71900826446281 0.18181818181818182 0.09917355371900827 121
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.4727272727272727 0.4 0.12727272727272726 55
Validate email addresses 0.43636363636363634 0.4155844155844156 0.14805194805194805 385
Validate generated HTML 0.7113702623906706 0.1457725947521866 0.14285714285714285 343
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.6861313868613139 0.16058394160583941 0.15328467153284672 411
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.6666666666666666 0.14814814814814814 0.18518518518518517 27
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.6403162055335968 0.22529644268774704 0.13438735177865613 253
Look and Feel guidelines 0.8571428571428571 0.08163265306122448 0.061224489795918366 49
Minimal Swing application 0.582089552238806 0.2462686567164179 0.17164179104477612 134
Observers and listeners 0.4563106796116505 0.2961165048543689 0.24757281553398058 206
Preferences dialogs 0.46875 0.15625 0.375 32
Provide an uncaught exception handler 0.6058394160583942 0.2116788321167883 0.18248175182481752 137
Render table cells 0.6677631578947368 0.17105263157894737 0.1611842105263158 304
Sort table rows 0.4567901234567901 0.2839506172839506 0.25925925925925924 81
Splash screen 0.5664556962025317 0.3037974683544304 0.12974683544303797 316
Standardized dialogs 0.5555555555555556 0.3333333333333333 0.1111111111111111 27
Swing in general 0.75 0.08333333333333333 0.16666666666666666 36
Swing threads 0.562874251497006 0.23353293413173654 0.20359281437125748 167
Swing utility tasks 0.775 0.125 0.1 40
Timers 0.3233082706766917 0.48872180451127817 0.18796992481203006 133
Using JavaHelp 0.5263157894736842 0.29473684210526313 0.17894736842105263 95
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.4364508393285372 0.3213429256594724 0.2422062350119904 417
Avoid empty catch blocks 0.8193146417445483 0.11526479750778816 0.06542056074766354 321
Be specific in throws clause 0.6066176470588235 0.3235294117647059 0.06985294117647059 272
Beware of unknown root causes 0.3548387096774194 0.2903225806451613 0.3548387096774194 31
Checked versus unchecked exceptions 0.5169857936998147 0.2798023471278567 0.2032118591723286 1619
Exception translation 0.9147286821705426 0.05426356589147287 0.031007751937984496 129
Exceptions and control flow 0.6966292134831461 0.16292134831460675 0.1404494382022472 178
Finally and catch 0.6600719424460432 0.19784172661870503 0.1420863309352518 556
Javadoc all exceptions 0.5612903225806452 0.23225806451612904 0.2064516129032258 155
Pass all pertinent data to exceptions 0.9444444444444444 0.015873015873015872 0.03968253968253968 126
Stack trace as String 0.7626886145404664 0.149519890260631 0.0877914951989026 729
Use template for repeated try-catch 0.6551724137931034 0.11494252873563218 0.22988505747126436 87
Input-OutputYesNoUndecidedVotes
Always close streams 0.7430939226519337 0.1464088397790055 0.11049723756906077 362
Buffering usually appropriate 0.8611111111111112 0.05555555555555555 0.08333333333333333 72
Console input 0.5273972602739726 0.2979452054794521 0.17465753424657535 292
Copy a file 0.6756756756756757 0.21621621621621623 0.10810810810810811 111
Reading and writing binary files 0.483974358974359 0.27564102564102566 0.2403846153846154 312
Reading and writing Serializable objects 0.5658914728682171 0.26356589147286824 0.17054263565891473 387
Reading and writing text files 0.6060700876095119 0.22559449311639548 0.16833541927409262 3196
DatabasesYesNoUndecidedVotes
Business identifiers as String 0.8312101910828026 0.10509554140127389 0.06369426751592357 314
Connection pools 0.8689655172413793 0.06206896551724138 0.06896551724137931 290
Consider data layer tools 0.5853658536585366 0.1951219512195122 0.21951219512195122 41
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.6421052631578947 0.19298245614035087 0.1649122807017544 285
Data exception wrapping 0.7241379310344828 0.15517241379310345 0.1206896551724138 58
Data is king 0.8761061946902655 0.061946902654867256 0.061946902654867256 113
Don't perform basic SQL tasks in code 0.8493150684931506 0.0821917808219178 0.0684931506849315 73
Encapsulate connections 0.8043478260869565 0.06521739130434782 0.13043478260869565 46
Keep SQL out of code 0.5392670157068062 0.3193717277486911 0.14136125654450263 191
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.8134969325153374 0.08957055214723926 0.09693251533742331 815
Encapsulate collections 0.8140703517587939 0.06532663316582915 0.12060301507537688 199
Iterate without an index 0.771875 0.171875 0.05625 320
Prefer Collections over older classes 0.8429752066115702 0.05785123966942149 0.09917355371900827 121
Two ways of using Iterator 0.609012591119947 0.24121935056328694 0.14976805831676607 1509
Use for-each liberally 0.7598425196850394 0.15354330708661418 0.08661417322834646 254
Use interface references to Collections 0.6974789915966386 0.19327731092436976 0.1092436974789916 119
Use standard Collections 0.8272251308900523 0.05759162303664921 0.11518324607329843 191
Overriding Object MethodsYesNoUndecidedVotes
Avoid clone 0.41899441340782123 0.34823091247672255 0.23277467411545624 537
Implementing compareTo 0.5025 0.3325 0.165 400
Implementing equals 0.5887850467289719 0.27414330218068533 0.13707165109034267 321
Implementing hashCode 0.554089709762533 0.2691292875989446 0.17678100263852242 379
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.4722222222222222 0.3541666666666667 0.1736111111111111 288
Clipboard copy and paste 0.7763941526800217 0.13318895506226314 0.09041689225771521 1847
Command line operations 0.45874587458745875 0.38283828382838286 0.15841584158415842 303
Compare and sort Strings 0.5102040816326531 0.3435374149659864 0.14625850340136054 294
Copy an array 0.5875 0.29375 0.11875 640
Determine if Strings are equal 0.6691871455576559 0.2438563327032136 0.08695652173913043 529
Examine bytecode 0.5111111111111111 0.37777777777777777 0.1111111111111111 45
Fetch web page and header 0.6426332288401254 0.20689655172413793 0.15047021943573669 319
Generate random numbers 0.6111155410254365 0.26401403396858303 0.12487042500598039 12541
Get database connection 0.55 0.2836065573770492 0.16639344262295083 1220
Get size of object in memory 0.39502762430939226 0.43922651933701656 0.16574585635359115 362
Implement code tables 0.5714285714285714 0.23214285714285715 0.19642857142857142 56
Internationalization 0.5074626865671642 0.29850746268656714 0.19402985074626866 67
Logging messages 0.603257328990228 0.2254071661237785 0.17133550488599347 1535
Measure application performance 0.7719298245614035 0.14035087719298245 0.08771929824561403 57
Modernize old code 0.8833333333333333 0.06666666666666667 0.05 60
Open file in native directory 0.5555555555555556 0.3333333333333333 0.1111111111111111 9
Parse text 0.606015037593985 0.21654135338345865 0.1774436090225564 665
Pattern-match lines of a file 0.5637065637065637 0.277992277992278 0.1583011583011583 259
Read jar version information 0.5567010309278351 0.35051546391752575 0.09278350515463918 97
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.747148288973384 0.11596958174904944 0.13688212927756654 526
Send an email 0.5512758786711603 0.2378430428502648 0.21088107847857487 2077
Time execution speed 0.706766917293233 0.21052631578947367 0.08270676691729323 133
Common Design PatternsYesNoUndecidedVotes
Abstract Factory 0.6946107784431138 0.16766467065868262 0.1377245508982036 167
Command objects 0.55 0.2 0.25 20
Factory methods 0.6221945137157108 0.21321695760598502 0.16458852867830423 802
Immutable objects 0.8115577889447236 0.09547738693467336 0.09296482412060302 1194
Lazy initialization 0.7578947368421053 0.13157894736842105 0.11052631578947368 190
Model Objects 0.6260162601626016 0.15447154471544716 0.21951219512195122 123
Plugin Factory 0.6896551724137931 0.10344827586206896 0.20689655172413793 29
Private constructor 0.7367256637168141 0.1426991150442478 0.12057522123893805 904
Singleton 0.7284345047923323 0.17252396166134185 0.09904153354632587 313
Template method 0.711864406779661 0.22033898305084745 0.06779661016949153 59
Type-Safe Enumerations 0.8010335917312662 0.10852713178294573 0.09043927648578812 387
Wrapper (Decorator) 0.5833333333333334 0.28125 0.13541666666666666 96
Common PracticesYesNoUndecidedVotes
Avoid basic style errors 0.8559322033898306 0.06779661016949153 0.07627118644067797 118
Avoid raw types 0.7695652173913043 0.1565217391304348 0.07391304347826087 230
Beware of instanceof operator 0.6150134048257373 0.232171581769437 0.15281501340482573 1865
Class for constants 0.6356502242152466 0.23542600896860988 0.1289237668161435 892
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.5586206896551724 0.25862068965517243 0.18275862068965518 290
Fields should usually be private 0.6557377049180327 0.20491803278688525 0.13934426229508196 122
Interface for constants 0.31966224366706875 0.5404101326899879 0.1399276236429433 829
Know the core libraries 0.7966101694915254 0.0847457627118644 0.11864406779661017 118
Minimize ripple effects 0.8671328671328671 0.03496503496503497 0.0979020979020979 143
Naming conventions 0.33611111111111114 0.5833333333333334 0.08055555555555556 360
Nest classes with care 0.5263157894736842 0.3157894736842105 0.15789473684210525 19
Output parameters 0.3915343915343915 0.3915343915343915 0.21693121693121692 189
Separate public and private members 0.7191011235955056 0.1797752808988764 0.10112359550561797 89
String concatenation does not scale 0.8484848484848485 0.09696969696969697 0.05454545454545454 165
Tag or marker interfaces 0.6446280991735537 0.19421487603305784 0.16115702479338842 242
Uncommon classes need explicit imports 0.7652173913043478 0.1391304347826087 0.09565217391304348 115
Use @Override liberally 0.8362445414847162 0.08951965065502183 0.07423580786026202 458
Use final liberally 0.6105417276720352 0.22693997071742314 0.16251830161054173 683
Use javadoc liberally 0.7586206896551724 0.1206896551724138 0.1206896551724138 174
Use static imports rarely 0.5767634854771784 0.28769017980636236 0.1355463347164592 723
Use System.exit with care 0.6672077922077922 0.18831168831168832 0.1444805194805195 616
Use Version Control tools 0.6923076923076923 0.13846153846153847 0.16923076923076924 65
Validate method arguments 0.6244897959183674 0.22040816326530613 0.15510204081632653 245
Wisdom, not rules 0.9607843137254902 0.0196078431372549 0.0196078431372549 51
InheritanceYesNoUndecidedVotes
Consider composition instead of subclassing 0.7732558139534884 0.0755813953488372 0.1511627906976744 172
Designing for subclassing 0.75 0.1388888888888889 0.1111111111111111 72
Overridable methods need special care 0.82 0.07 0.11 100
Remember styles of inheritance 0.9387755102040817 0.0 0.061224489795918366 49
More Common PracticesYesNoUndecidedVotes
Avoid null if possible 0.6298701298701299 0.23376623376623376 0.13636363636363635 308
Beware of Byte Order Marks 0.6764705882352942 0.2647058823529412 0.058823529411764705 34
Beware of DecimalFormat 0.43646408839779005 0.3149171270718232 0.24861878453038674 181
Beware of floating point numbers 0.8780487804878049 0.08130081300813008 0.04065040650406504 123
Clarifying method 0.8958333333333334 0.0625 0.041666666666666664 96
Coding conventions 0.8695652173913043 0.043478260869565216 0.08695652173913043 92
Compile regular expressions once 0.75 0.16071428571428573 0.08928571428571429 56
Conditional compile 0.5043478260869565 0.3826086956521739 0.11304347826086956 230
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.8652631578947368 0.061052631578947365 0.07368421052631578 475
Design by Contract 0.8023255813953488 0.09302325581395349 0.10465116279069768 172
Don't use tab characters 0.3586626139817629 0.5896656534954408 0.05167173252279635 329
Extra space in argument list 0.1890909090909091 0.7527272727272727 0.05818181818181818 550
Generating unique IDs 0.5738546603475514 0.2665876777251185 0.15955766192733017 2532
Include 'from', exclude 'to' 0.7894736842105263 0.12280701754385964 0.08771929824561403 57
Multiple return statements 0.5483870967741935 0.3311827956989247 0.12043010752688173 465
Overloading can be tricky 0.7821782178217822 0.1485148514851485 0.06930693069306931 101
Package by feature, not layer 0.7199654278305964 0.12878133102852204 0.1512532411408816 1157
Passwords never in clear text 0.647887323943662 0.176056338028169 0.176056338028169 142
Prefer empty items to null ones 0.6826923076923077 0.20673076923076922 0.11057692307692307 416
Quote dynamic text when logging 0.8163265306122449 0.12244897959183673 0.061224489795918366 98
Self-encapsulate fields 0.6354166666666666 0.16666666666666666 0.19791666666666666 192
Structs are occasionally useful 0.6751054852320675 0.16033755274261605 0.16455696202531644 237
Test using main method 0.3706896551724138 0.5258620689655172 0.10344827586206896 116
Try alternatives to ResourceBundle 0.3225806451612903 0.3387096774193548 0.3387096774193548 62
Use a fake system clock 0.5673758865248227 0.24113475177304963 0.19148936170212766 141
Use a testing framework (JUnit) 0.8362068965517241 0.09482758620689655 0.06896551724137931 116
Use Ant for build scripts 0.7313432835820896 0.14925373134328357 0.11940298507462686 268
Use boxing with care 0.6683168316831684 0.21287128712871287 0.1188118811881188 202
Use enums to restrict arguments 0.7368421052631579 0.12781954887218044 0.13533834586466165 133
Validate state with class invariants 0.6 0.24285714285714285 0.15714285714285714 70
Validation belongs in a Model Object 0.582089552238806 0.29850746268656714 0.11940298507462686 134
AssertionsYesNoUndecidedVotes
Assert is for private arguments only 0.8163265306122449 0.1360544217687075 0.047619047619047616 147
Assert use cases 0.36231884057971014 0.43478260869565216 0.2028985507246377 207
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.6208791208791209 0.19047619047619047 0.18864468864468864 546
Beware of mistaken field redeclares 0.8333333333333334 0.1 0.06666666666666667 30
Construct Object using class name 0.5370370370370371 0.30092592592592593 0.16203703703703703 216
Constructors in general 0.6326530612244898 0.2653061224489796 0.10204081632653061 49
Constructors shouldn't call overridables 0.5909090909090909 0.2556818181818182 0.1534090909090909 176
Constructors shouldn't start threads 0.7 0.18 0.12 50
Copy constructors 0.639293937068304 0.22486569455103608 0.13584036838066002 1303
Don't pass 'this' out of a constructor 0.631578947368421 0.22807017543859648 0.14035087719298245 57
Initializing fields to 0-false-null is redundant 0.6773333333333333 0.22666666666666666 0.096 375
SerializationYesNoUndecidedVotes
Implementing Serializable 0.6338851022395326 0.1830574488802337 0.1830574488802337 1027
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.7444444444444445 0.11481481481481481 0.14074074074074075 540
Avoid ThreadGroup 0.5527950310559007 0.2484472049689441 0.19875776397515527 161
Data integrity first 0.7337662337662337 0.1038961038961039 0.16233766233766234 154
Document thread safety 0.7333333333333333 0.17777777777777778 0.08888888888888889 45
Dump thread information 0.7916666666666666 0.16666666666666666 0.041666666666666664 24
Handle InterruptedException 0.5454545454545454 0.22727272727272727 0.22727272727272727 44
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.6095238095238096 0.1746031746031746 0.21587301587301588 315
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.7128712871287128 0.13861386138613863 0.1485148514851485 101
Remember the types of intrinsic lock 0.8082706766917294 0.10150375939849623 0.09022556390977443 266
Schedule periodic tasks 0.6614451743304699 0.1955533097524002 0.14300151591712987 1979
Stop threads through cooperation 0.6333333333333333 0.2866666666666667 0.08 150
Synchronize access to mutable fields 0.5544041450777202 0.2849740932642487 0.16062176165803108 193
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.8 0.125 0.075 40
© 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 -