Poll Summary

Number Of Votes Cast
87645
Overall Acceptance Rates
Choice Number Percentage
Yes 55594 0.6343088596040847
No 19740 0.22522676707170974
Undecided 12311 0.1404643733242056

Servlets and JSPsYesNoUndecidedVotes
A Web App Framework - WEB4J 0.6191517271534762 0.18058592041976387 0.20026235242675994 2287
Always maintain HttpSessions 0.7204968944099379 0.16149068322981366 0.11801242236024845 161
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.6884236453201971 0.19704433497536947 0.1145320197044335 812
Emit flexible URLs 0.7352941176470589 0.07352941176470588 0.19117647058823528 68
Escape special characters 0.5843575418994413 0.29720670391061454 0.11843575418994413 895
Forward versus redirect 0.7193229901269393 0.1368124118476728 0.14386459802538787 709
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.8673469387755102 0.07653061224489796 0.05612244897959184 196
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.46153846153846156 0.33653846153846156 0.20192307692307693 104
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.7424242424242424 0.13636363636363635 0.12121212121212122 132
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.7073170731707317 0.18699186991869918 0.10569105691056911 123
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.43636363636363634 0.4155844155844156 0.14805194805194805 385
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.6852300242130751 0.162227602905569 0.15254237288135594 413
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.6352941176470588 0.22745098039215686 0.13725490196078433 255
Look and Feel guidelines 0.8571428571428571 0.08163265306122448 0.061224489795918366 49
Minimal Swing application 0.5808823529411765 0.25 0.16911764705882354 136
Observers and listeners 0.45410628019323673 0.2995169082125604 0.2463768115942029 207
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.6612377850162866 0.1791530944625407 0.15960912052117263 307
Sort table rows 0.4567901234567901 0.2839506172839506 0.25925925925925924 81
Splash screen 0.5628930817610063 0.3050314465408805 0.1320754716981132 318
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.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.4312796208530806 0.3246445497630332 0.24407582938388625 422
Avoid empty catch blocks 0.8173374613003096 0.11455108359133127 0.06811145510835913 323
Be specific in throws clause 0.608058608058608 0.32234432234432236 0.0695970695970696 273
Beware of unknown root causes 0.3548387096774194 0.2903225806451613 0.3548387096774194 31
Checked versus unchecked exceptions 0.5166461159062885 0.2792848335388409 0.20406905055487054 1622
Exception translation 0.916030534351145 0.05343511450381679 0.030534351145038167 131
Exceptions and control flow 0.6944444444444444 0.16666666666666666 0.1388888888888889 180
Finally and catch 0.6606822262118492 0.19748653500897667 0.14183123877917414 557
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.763013698630137 0.14931506849315068 0.08767123287671233 730
Use template for repeated try-catch 0.6551724137931034 0.11494252873563218 0.22988505747126436 87
Input-OutputYesNoUndecidedVotes
Always close streams 0.743801652892562 0.14600550964187328 0.11019283746556474 363
Buffering usually appropriate 0.863013698630137 0.0547945205479452 0.0821917808219178 73
Console input 0.5273972602739726 0.2979452054794521 0.17465753424657535 292
Copy a file 0.6810344827586207 0.21551724137931033 0.10344827586206896 116
Reading and writing binary files 0.4811320754716981 0.27672955974842767 0.24213836477987422 318
Reading and writing Serializable objects 0.5641025641025641 0.26153846153846155 0.17435897435897435 390
Reading and writing text files 0.6064395123476086 0.22538293216630198 0.1681775554860894 3199
DatabasesYesNoUndecidedVotes
Business identifiers as String 0.8301886792452831 0.1069182389937107 0.06289308176100629 318
Connection pools 0.8694158075601375 0.061855670103092786 0.06872852233676977 291
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.6376306620209059 0.1916376306620209 0.17073170731707318 287
Data exception wrapping 0.7241379310344828 0.15517241379310345 0.1206896551724138 58
Data is king 0.8771929824561403 0.06140350877192982 0.06140350877192982 114
Don't perform basic SQL tasks in code 0.8513513513513513 0.08108108108108109 0.06756756756756757 74
Encapsulate connections 0.8043478260869565 0.06521739130434782 0.13043478260869565 46
Keep SQL out of code 0.5416666666666666 0.3177083333333333 0.140625 192
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.8107784431137725 0.09101796407185629 0.09820359281437126 835
Encapsulate collections 0.8140703517587939 0.06532663316582915 0.12060301507537688 199
Iterate without an index 0.7694704049844237 0.17133956386292834 0.059190031152647975 321
Prefer Collections over older classes 0.8429752066115702 0.05785123966942149 0.09917355371900827 121
Two ways of using Iterator 0.6069553805774278 0.24015748031496062 0.15288713910761154 1524
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.41821561338289964 0.34944237918215615 0.23234200743494424 538
Implementing compareTo 0.5 0.3358208955223881 0.16417910447761194 402
Implementing equals 0.5882352941176471 0.2755417956656347 0.13622291021671826 323
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.4740484429065744 0.35294117647058826 0.17301038062283736 289
Clipboard copy and paste 0.7758620689655172 0.1336206896551724 0.09051724137931035 1856
Command line operations 0.4557377049180328 0.3836065573770492 0.16065573770491803 305
Compare and sort Strings 0.511864406779661 0.3423728813559322 0.14576271186440679 295
Copy an array 0.5865834633385335 0.29329173166926675 0.12012480499219969 641
Determine if Strings are equal 0.6691871455576559 0.2438563327032136 0.08695652173913043 529
Examine bytecode 0.5217391304347826 0.3695652173913043 0.10869565217391304 46
Fetch web page and header 0.64375 0.20625 0.15 320
Generate random numbers 0.6109352745687608 0.2635701851558791 0.12549454027536003 12638
Get database connection 0.5498366013071896 0.2834967320261438 0.16666666666666666 1224
Get size of object in memory 0.3939393939393939 0.4380165289256198 0.16804407713498623 363
Implement code tables 0.5714285714285714 0.23214285714285715 0.19642857142857142 56
Internationalization 0.5074626865671642 0.29850746268656714 0.19402985074626866 67
Logging messages 0.6027131782945736 0.22609819121447028 0.17118863049095606 1548
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.5637065637065637 0.277992277992278 0.1583011583011583 259
Read jar version information 0.5612244897959183 0.3469387755102041 0.09183673469387756 98
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.74573055028463 0.1157495256166983 0.13851992409867173 527
Send an email 0.5507177033492823 0.23875598086124403 0.21052631578947367 2090
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.8109908409658618 0.09492089925062448 0.09408825978351373 1201
Lazy initialization 0.7552083333333334 0.13541666666666666 0.109375 192
Model Objects 0.6209677419354839 0.1532258064516129 0.22580645161290322 124
Plugin Factory 0.7 0.1 0.2 30
Private constructor 0.736784140969163 0.1420704845814978 0.1211453744493392 908
Singleton 0.7238095238095238 0.1746031746031746 0.10158730158730159 315
Template method 0.711864406779661 0.22033898305084745 0.06779661016949153 59
Type-Safe Enumerations 0.8020565552699229 0.10796915167095116 0.08997429305912596 389
Wrapper (Decorator) 0.59 0.28 0.13 100
Common PracticesYesNoUndecidedVotes
Avoid basic style errors 0.8571428571428571 0.06722689075630252 0.07563025210084033 119
Avoid raw types 0.7692307692307693 0.1581196581196581 0.07264957264957266 234
Beware of instanceof operator 0.6149333333333333 0.232 0.15306666666666666 1875
Class for constants 0.6347634763476347 0.23432343234323433 0.13091309130913092 909
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.5582191780821918 0.2568493150684932 0.18493150684931506 292
Fields should usually be private 0.6557377049180327 0.20491803278688525 0.13934426229508196 122
Interface for constants 0.32177033492822965 0.5394736842105263 0.13875598086124402 836
Know the core libraries 0.7966101694915254 0.0847457627118644 0.11864406779661017 118
Minimize ripple effects 0.8698630136986302 0.03424657534246575 0.0958904109589041 146
Naming conventions 0.33518005540166207 0.5844875346260388 0.08033240997229917 361
Nest classes with care 0.5263157894736842 0.3157894736842105 0.15789473684210525 19
Output parameters 0.38341968911917096 0.38860103626943004 0.22797927461139897 193
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.6434426229508197 0.19672131147540983 0.1598360655737705 244
Uncommon classes need explicit imports 0.7652173913043478 0.1391304347826087 0.09565217391304348 115
Use @Override liberally 0.8333333333333334 0.08874458874458875 0.07792207792207792 462
Use final liberally 0.6095100864553314 0.22622478386167147 0.1642651296829971 694
Use javadoc liberally 0.76 0.12 0.12 175
Use static imports rarely 0.5770804911323328 0.2878581173260573 0.13506139154160982 733
Use System.exit with care 0.6666666666666666 0.18932038834951456 0.14401294498381878 618
Use Version Control tools 0.696969696969697 0.13636363636363635 0.16666666666666666 66
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.7732558139534884 0.0755813953488372 0.1511627906976744 172
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.9387755102040817 0.0 0.061224489795918366 49
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.4340659340659341 0.3131868131868132 0.25274725274725274 182
Beware of floating point numbers 0.8790322580645161 0.08064516129032258 0.04032258064516129 124
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.5021645021645021 0.3852813852813853 0.11255411255411256 231
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.8640167364016736 0.060669456066945605 0.07531380753138076 478
Design by Contract 0.8023255813953488 0.09302325581395349 0.10465116279069768 172
Don't use tab characters 0.35735735735735735 0.5915915915915916 0.05105105105105105 333
Extra space in argument list 0.18874773139745918 0.7531760435571688 0.05807622504537205 551
Generating unique IDs 0.5729813664596274 0.2674689440993789 0.1595496894409938 2576
Include 'from', exclude 'to' 0.7931034482758621 0.1206896551724138 0.08620689655172414 58
Multiple return statements 0.5501066098081023 0.3304904051172708 0.11940298507462686 469
Overloading can be tricky 0.7843137254901961 0.14705882352941177 0.06862745098039216 102
Package by feature, not layer 0.720575783234547 0.12616426756985605 0.15325994919559696 1181
Passwords never in clear text 0.6503496503496503 0.17482517482517482 0.17482517482517482 143
Prefer empty items to null ones 0.6834532374100719 0.20623501199040767 0.11031175059952038 417
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.6748971193415638 0.16049382716049382 0.1646090534979424 243
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.6683168316831684 0.21287128712871287 0.1188118811881188 202
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.6193078324225865 0.1930783242258652 0.18761384335154827 549
Beware of mistaken field redeclares 0.8333333333333334 0.1 0.06666666666666667 30
Construct Object using class name 0.5391705069124424 0.2995391705069124 0.16129032258064516 217
Constructors in general 0.64 0.26 0.1 50
Constructors shouldn't call overridables 0.5932203389830508 0.2542372881355932 0.15254237288135594 177
Constructors shouldn't start threads 0.7 0.18 0.12 50
Copy constructors 0.6389312977099236 0.22519083969465647 0.13587786259541984 1310
Don't pass 'this' out of a constructor 0.631578947368421 0.22807017543859648 0.14035087719298245 57
Initializing fields to 0-false-null is redundant 0.6771653543307087 0.22572178477690288 0.09711286089238845 381
SerializationYesNoUndecidedVotes
Implementing Serializable 0.6334622823984526 0.18375241779497098 0.1827852998065764 1034
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.7387387387387387 0.11711711711711711 0.14414414414414414 555
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.5652173913043478 0.21739130434782608 0.21739130434782608 46
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.6080246913580247 0.1728395061728395 0.2191358024691358 324
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.8029739776951673 0.10037174721189591 0.09665427509293681 269
Schedule periodic tasks 0.6597886260694514 0.19577252138902868 0.1444388525415199 1987
Stop threads through cooperation 0.6333333333333333 0.2866666666666667 0.08 150
Synchronize access to mutable fields 0.5567010309278351 0.28350515463917525 0.15979381443298968 194
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 -