Poll Summary

Number Of Votes Cast
87378
Overall Acceptance Rates
Choice Number Percentage
Yes 55444 0.6345304310009384
No 19677 0.2251939847558882
Undecided 12257 0.14027558424317335

Servlets and JSPsYesNoUndecidedVotes
A Web App Framework - WEB4J 0.6184615384615385 0.18065934065934067 0.20087912087912088 2275
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.689272503082614 0.1960542540073983 0.11467324290998766 811
Emit flexible URLs 0.7352941176470589 0.07352941176470588 0.19117647058823528 68
Escape special characters 0.5843575418994413 0.29720670391061454 0.11843575418994413 895
Forward versus redirect 0.7203389830508474 0.13559322033898305 0.1440677966101695 708
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.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.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.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.7093023255813954 0.14825581395348839 0.14244186046511628 344
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.582089552238806 0.2462686567164179 0.17164179104477612 134
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.6086956521739131 0.21014492753623187 0.18115942028985507 138
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.5621301775147929 0.23076923076923078 0.20710059171597633 169
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.4323040380047506 0.32304038004750596 0.24465558194774348 421
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.9153846153846154 0.05384615384615385 0.03076923076923077 130
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.5668789808917197 0.22929936305732485 0.20382165605095542 157
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.7430939226519337 0.1464088397790055 0.11049723756906077 362
Buffering usually appropriate 0.863013698630137 0.0547945205479452 0.0821917808219178 73
Console input 0.5273972602739726 0.2979452054794521 0.17465753424657535 292
Copy a file 0.6814159292035398 0.21238938053097345 0.10619469026548672 113
Reading and writing binary files 0.4840764331210191 0.27388535031847133 0.24203821656050956 314
Reading and writing Serializable objects 0.5629820051413882 0.2622107969151671 0.17480719794344474 389
Reading and writing text files 0.6063164477798624 0.22545340838023764 0.16823014383989993 3198
DatabasesYesNoUndecidedVotes
Business identifiers as String 0.8291139240506329 0.10759493670886076 0.06329113924050633 316
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.6398601398601399 0.19230769230769232 0.16783216783216784 286
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.8493150684931506 0.0821917808219178 0.0684931506849315 73
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.8121212121212121 0.08969696969696969 0.09818181818181818 825
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.6085808580858085 0.24092409240924093 0.1504950495049505 1515
Use for-each liberally 0.7568627450980392 0.1568627450980392 0.08627450980392157 255
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.5025 0.3325 0.165 400
Implementing equals 0.5900621118012422 0.2732919254658385 0.13664596273291926 322
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.7760388559093362 0.1332973556395035 0.09066378845116028 1853
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.5875 0.29375 0.11875 640
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.6111463956811686 0.2638139091775167 0.12503969514131472 12596
Get database connection 0.5494685200327064 0.2837285363859362 0.1668029435813573 1223
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.6032467532467533 0.22532467532467532 0.17142857142857143 1540
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.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.5515093435553426 0.23814087206516532 0.2103497843794921 2087
Time execution speed 0.7089552238805971 0.208955223880597 0.08208955223880597 134
Common Design PatternsYesNoUndecidedVotes
Abstract Factory 0.6946107784431138 0.16766467065868262 0.1377245508982036 167
Command objects 0.55 0.2 0.25 20
Factory methods 0.620817843866171 0.21437422552664187 0.16480793060718713 807
Immutable objects 0.8111946532999165 0.09523809523809523 0.0935672514619883 1197
Lazy initialization 0.7539267015706806 0.13612565445026178 0.1099476439790576 191
Model Objects 0.6260162601626016 0.15447154471544716 0.21951219512195122 123
Plugin Factory 0.7 0.1 0.2 30
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.8020565552699229 0.10796915167095116 0.08997429305912596 389
Wrapper (Decorator) 0.5959595959595959 0.2727272727272727 0.13131313131313133 99
Common PracticesYesNoUndecidedVotes
Avoid basic style errors 0.8571428571428571 0.06722689075630252 0.07563025210084033 119
Avoid raw types 0.771551724137931 0.15517241379310345 0.07327586206896551 232
Beware of instanceof operator 0.6144385026737967 0.232620320855615 0.15294117647058825 1870
Class for constants 0.6360619469026548 0.2345132743362832 0.12942477876106195 904
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.5601374570446735 0.25773195876288657 0.18213058419243985 291
Fields should usually be private 0.6557377049180327 0.20491803278688525 0.13934426229508196 122
Interface for constants 0.3217286914765906 0.539015606242497 0.13925570228091236 833
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.3894736842105263 0.3894736842105263 0.22105263157894736 190
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.6419753086419753 0.19753086419753085 0.16049382716049382 243
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.6083815028901735 0.22687861271676302 0.16473988439306358 692
Use javadoc liberally 0.76 0.12 0.12 175
Use static imports rarely 0.5769230769230769 0.28708791208791207 0.13598901098901098 728
Use System.exit with care 0.6661264181523501 0.18962722852512157 0.14424635332252836 617
Use Version Control tools 0.6923076923076923 0.13846153846153847 0.16923076923076924 65
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.6290322580645161 0.23225806451612904 0.13870967741935483 310
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.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.8652631578947368 0.061052631578947365 0.07368421052631578 475
Design by Contract 0.8023255813953488 0.09302325581395349 0.10465116279069768 172
Don't use tab characters 0.35843373493975905 0.5903614457831325 0.05120481927710843 332
Extra space in argument list 0.18874773139745918 0.7531760435571688 0.05807622504537205 551
Generating unique IDs 0.5734375 0.26640625 0.16015625 2560
Include 'from', exclude 'to' 0.7931034482758621 0.1206896551724138 0.08620689655172414 58
Multiple return statements 0.5481798715203426 0.33190578158458245 0.11991434689507495 467
Overloading can be tricky 0.7843137254901961 0.14705882352941177 0.06862745098039216 102
Package by feature, not layer 0.7201365187713311 0.12713310580204779 0.15273037542662116 1172
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.8163265306122449 0.12244897959183673 0.061224489795918366 98
Self-encapsulate fields 0.6354166666666666 0.16666666666666666 0.19791666666666666 192
Structs are occasionally useful 0.6708333333333333 0.1625 0.16666666666666666 240
Test using main method 0.36752136752136755 0.5299145299145299 0.10256410256410256 117
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.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.7279411764705882 0.125 0.14705882352941177 136
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.3605769230769231 0.4326923076923077 0.20673076923076922 208
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.64 0.26 0.1 50
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.6388036809815951 0.22469325153374234 0.13650306748466257 1304
Don't pass 'this' out of a constructor 0.631578947368421 0.22807017543859648 0.14035087719298245 57
Initializing fields to 0-false-null is redundant 0.6789473684210526 0.2236842105263158 0.09736842105263158 380
SerializationYesNoUndecidedVotes
Implementing Serializable 0.6333656644034917 0.18331716779825413 0.18331716779825413 1031
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.7404021937842779 0.11517367458866545 0.14442413162705667 547
Avoid ThreadGroup 0.5555555555555556 0.24691358024691357 0.19753086419753085 162
Data integrity first 0.7354838709677419 0.1032258064516129 0.16129032258064516 155
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.6068111455108359 0.17337461300309598 0.21981424148606812 323
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.8089887640449438 0.10112359550561797 0.0898876404494382 267
Schedule periodic tasks 0.6607773851590106 0.19586067642604746 0.14336193841494194 1981
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.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 -