Poll Summary

Number Of Votes Cast
88487
Overall Acceptance Rates
Choice Number Percentage
Yes 56065 0.6335958954422684
No 19972 0.22570547086012635
Undecided 12450 0.1406986336976053

Servlets and JSPsYesNoUndecidedVotes
A Web App Framework - WEB4J 0.6184323858742463 0.18044788975021533 0.20111972437553832 2322
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.7719298245614035 0.07894736842105263 0.14912280701754385 114
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.5817575083426029 0.2992213570634038 0.11902113459399333 899
Forward versus redirect 0.7187060478199718 0.13642756680731363 0.14486638537271448 711
JSPs should contain only presentation logic 0.8728070175438597 0.06140350877192982 0.06578947368421052 228
Loss of data during restart 0.6605504587155964 0.14678899082568808 0.1926605504587156 109
Manage sessions closely 0.7987012987012987 0.1038961038961039 0.09740259740259741 154
Measure web app performance 0.8585858585858586 0.08080808080808081 0.06060606060606061 198
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.7427184466019418 0.15048543689320387 0.10679611650485436 206
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.6915422885572139 0.1791044776119403 0.12935323383084577 201
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.708092485549133 0.15028901734104047 0.1416184971098266 346
Web usability guidelines 0.8378378378378378 0.05405405405405406 0.10810810810810811 37
Wrap file upload requests 0.4492753623188406 0.2608695652173913 0.2898550724637681 69
SwingYesNoUndecidedVotes
A Swing App - StocksMonitor 0.6889952153110048 0.16028708133971292 0.1507177033492823 418
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.6342412451361867 0.22568093385214008 0.14007782101167315 257
Look and Feel guidelines 0.8571428571428571 0.08163265306122448 0.061224489795918366 49
Minimal Swing application 0.5827338129496403 0.2517985611510791 0.16546762589928057 139
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.6099290780141844 0.20567375886524822 0.18439716312056736 141
Render table cells 0.656957928802589 0.18446601941747573 0.15857605177993528 309
Sort table rows 0.4567901234567901 0.2839506172839506 0.25925925925925924 81
Splash screen 0.5625 0.30625 0.13125 320
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.5257731958762887 0.29896907216494845 0.17525773195876287 97
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.42824074074074076 0.32175925925925924 0.25 432
Avoid empty catch blocks 0.8184615384615385 0.11384615384615385 0.06769230769230769 325
Be specific in throws clause 0.6072727272727273 0.3236363636363636 0.06909090909090909 275
Beware of unknown root causes 0.3548387096774194 0.2903225806451613 0.3548387096774194 31
Checked versus unchecked exceptions 0.5162876459741856 0.27904118008604795 0.20467117393976644 1627
Exception translation 0.9166666666666666 0.05303030303030303 0.030303030303030304 132
Exceptions and control flow 0.6885245901639344 0.16939890710382513 0.14207650273224043 183
Finally and catch 0.6601073345259392 0.19856887298747763 0.1413237924865832 559
Javadoc all exceptions 0.5723270440251572 0.22641509433962265 0.20125786163522014 159
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.6590909090909091 0.11363636363636363 0.22727272727272727 88
Input-OutputYesNoUndecidedVotes
Always close streams 0.7445652173913043 0.14673913043478262 0.10869565217391304 368
Buffering usually appropriate 0.8648648648648649 0.05405405405405406 0.08108108108108109 74
Console input 0.5273972602739726 0.2979452054794521 0.17465753424657535 292
Copy a file 0.6722689075630253 0.226890756302521 0.10084033613445378 119
Reading and writing binary files 0.4782608695652174 0.2826086956521739 0.2391304347826087 322
Reading and writing Serializable objects 0.5623409669211196 0.26463104325699743 0.17302798982188294 393
Reading and writing text files 0.6067976301839726 0.225444340505145 0.16775802931088243 3207
DatabasesYesNoUndecidedVotes
Business identifiers as String 0.8291925465838509 0.10869565217391304 0.062111801242236024 322
Connection pools 0.8703071672354948 0.06143344709897611 0.06825938566552901 293
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.6332179930795848 0.1903114186851211 0.17647058823529413 289
Data exception wrapping 0.7288135593220338 0.15254237288135594 0.11864406779661017 59
Data is king 0.8695652173913043 0.06086956521739131 0.06956521739130435 115
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.5357142857142857 0.32142857142857145 0.14285714285714285 196
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.8094117647058824 0.09176470588235294 0.0988235294117647 850
Encapsulate collections 0.815 0.065 0.12 200
Iterate without an index 0.7708978328173375 0.17027863777089783 0.058823529411764705 323
Prefer Collections over older classes 0.8442622950819673 0.05737704918032787 0.09836065573770492 122
Two ways of using Iterator 0.6073738680465718 0.23932729624838292 0.15329883570504527 1546
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.828125 0.057291666666666664 0.11458333333333333 192
Overriding Object MethodsYesNoUndecidedVotes
Avoid clone 0.4185185185185185 0.34814814814814815 0.23333333333333334 540
Implementing compareTo 0.5012406947890818 0.3349875930521092 0.16377171215880892 403
Implementing equals 0.5895061728395061 0.27469135802469136 0.13580246913580246 324
Implementing hashCode 0.5535248041775457 0.2689295039164491 0.17754569190600522 383
Implementing toString 0.49764150943396224 0.30424528301886794 0.19811320754716982 424
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.7740899357601713 0.1349036402569593 0.09100642398286937 1868
Command line operations 0.45980707395498394 0.38263665594855306 0.15755627009646303 311
Compare and sort Strings 0.5066225165562914 0.347682119205298 0.1456953642384106 302
Copy an array 0.5856697819314641 0.29283489096573206 0.12149532710280374 642
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.6096248342562982 0.26409796427735743 0.12627720146634427 12821
Get database connection 0.5496742671009772 0.28420195439739415 0.16612377850162866 1228
Get size of object in memory 0.3875338753387534 0.4363143631436314 0.17615176151761516 369
Implement code tables 0.5714285714285714 0.23214285714285715 0.19642857142857142 56
Internationalization 0.4927536231884058 0.30434782608695654 0.2028985507246377 69
Logging messages 0.6038585209003215 0.2257234726688103 0.17041800643086816 1555
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.6050670640834576 0.21609538002980627 0.17883755588673622 671
Pattern-match lines of a file 0.5627376425855514 0.27756653992395436 0.1596958174904943 263
Read jar version information 0.55 0.35 0.1 100
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.5493562231759657 0.23938960419647115 0.21125417262756319 2097
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.6226880394574599 0.21331689272503082 0.16399506781750925 811
Immutable objects 0.8117258464079273 0.09413707679603633 0.09413707679603633 1211
Lazy initialization 0.7538461538461538 0.13333333333333333 0.11282051282051282 195
Model Objects 0.6141732283464567 0.16535433070866143 0.2204724409448819 127
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.7166666666666667 0.21666666666666667 0.06666666666666667 60
Type-Safe Enumerations 0.8 0.1076923076923077 0.09230769230769231 390
Wrapper (Decorator) 0.5887850467289719 0.27102803738317754 0.14018691588785046 107
Common PracticesYesNoUndecidedVotes
Avoid basic style errors 0.8583333333333333 0.06666666666666667 0.075 120
Avoid raw types 0.7666666666666667 0.1625 0.07083333333333333 240
Beware of instanceof operator 0.614240170031881 0.2316684378320935 0.15409139213602552 1882
Class for constants 0.6305048335123523 0.23523093447905477 0.13426423200859292 931
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.5604026845637584 0.25838926174496646 0.18120805369127516 298
Fields should usually be private 0.648 0.208 0.144 125
Interface for constants 0.32 0.5423529411764706 0.1376470588235294 850
Know the core libraries 0.7966101694915254 0.0847457627118644 0.11864406779661017 118
Minimize ripple effects 0.8716216216216216 0.033783783783783786 0.0945945945945946 148
Naming conventions 0.3324175824175824 0.5879120879120879 0.07967032967032966 364
Nest classes with care 0.5263157894736842 0.3157894736842105 0.15789473684210525 19
Output parameters 0.38461538461538464 0.38974358974358975 0.22564102564102564 195
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.6561264822134387 0.18972332015810275 0.1541501976284585 253
Uncommon classes need explicit imports 0.7672413793103449 0.13793103448275862 0.09482758620689655 116
Use @Override liberally 0.8347639484978541 0.08798283261802575 0.07725321888412018 466
Use final liberally 0.6094420600858369 0.22746781115879827 0.1630901287553648 699
Use javadoc liberally 0.7611111111111111 0.12222222222222222 0.11666666666666667 180
Use static imports rarely 0.5756358768406962 0.29049531459170014 0.13386880856760375 747
Use System.exit with care 0.6688102893890675 0.18810289389067525 0.14308681672025725 622
Use Version Control tools 0.6764705882352942 0.1323529411764706 0.19117647058823528 68
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.7740112994350282 0.07344632768361582 0.15254237288135594 177
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.6282051282051282 0.23076923076923078 0.14102564102564102 312
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.8865979381443299 0.07216494845360824 0.041237113402061855 97
Coding conventions 0.8723404255319149 0.0425531914893617 0.0851063829787234 94
Compile regular expressions once 0.75 0.16071428571428573 0.08928571428571429 56
Conditional compile 0.5 0.3888888888888889 0.1111111111111111 234
Consider code generators 0.7532467532467533 0.14285714285714285 0.1038961038961039 77
Consider immutable forms for dates 0.47540983606557374 0.3770491803278688 0.14754098360655737 61
Conventional name for return value 0.7241379310344828 0.19310344827586207 0.08275862068965517 145
Defensive copying 0.8639175257731959 0.061855670103092786 0.07422680412371134 485
Design by Contract 0.8057142857142857 0.09142857142857143 0.10285714285714286 175
Don't use tab characters 0.35398230088495575 0.5929203539823009 0.05309734513274336 339
Extra space in argument list 0.18772563176895307 0.7545126353790613 0.05776173285198556 554
Generating unique IDs 0.5718095238095238 0.2693333333333333 0.15885714285714286 2625
Include 'from', exclude 'to' 0.7931034482758621 0.1206896551724138 0.08620689655172414 58
Multiple return statements 0.5439330543933054 0.3368200836820084 0.1192468619246862 478
Overloading can be tricky 0.7766990291262136 0.14563106796116504 0.07766990291262135 103
Package by feature, not layer 0.7222222222222222 0.12336601307189543 0.15441176470588236 1224
Passwords never in clear text 0.6527777777777778 0.1736111111111111 0.1736111111111111 144
Prefer empty items to null ones 0.6825775656324582 0.20763723150357996 0.10978520286396182 419
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.6693227091633466 0.1593625498007968 0.17131474103585656 251
Test using main method 0.371900826446281 0.5206611570247934 0.10743801652892562 121
Try alternatives to ResourceBundle 0.3333333333333333 0.3333333333333333 0.3333333333333333 63
Use a fake system clock 0.5655172413793104 0.2413793103448276 0.19310344827586207 145
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.6715686274509803 0.2107843137254902 0.11764705882352941 204
Use enums to restrict arguments 0.7246376811594203 0.12318840579710146 0.15217391304347827 138
Validate state with class invariants 0.5915492957746479 0.2535211267605634 0.15492957746478872 71
Validation belongs in a Model Object 0.5766423357664233 0.30656934306569344 0.11678832116788321 137
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.6220614828209765 0.19168173598553345 0.18625678119349007 553
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.7115384615384616 0.17307692307692307 0.11538461538461539 52
Copy constructors 0.6397889977392615 0.22456669178598343 0.1356443104747551 1327
Don't pass 'this' out of a constructor 0.6271186440677966 0.23728813559322035 0.13559322033898305 59
Initializing fields to 0-false-null is redundant 0.6753246753246753 0.22857142857142856 0.09610389610389611 385
SerializationYesNoUndecidedVotes
Implementing Serializable 0.6323387872954764 0.18575553416746873 0.18190567853705486 1039
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.7403508771929824 0.11578947368421053 0.14385964912280702 570
Avoid ThreadGroup 0.558282208588957 0.24539877300613497 0.19631901840490798 163
Data integrity first 0.7267080745341615 0.11180124223602485 0.16149068322981366 161
Document thread safety 0.7333333333333333 0.17777777777777778 0.08888888888888889 45
Dump thread information 0.7916666666666666 0.16666666666666666 0.041666666666666664 24
Handle InterruptedException 0.6 0.2 0.2 50
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.6017699115044248 0.17994100294985252 0.2182890855457227 339
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.7115384615384616 0.1346153846153846 0.15384615384615385 104
Remember the types of intrinsic lock 0.8029197080291971 0.10218978102189781 0.0948905109489051 274
Schedule periodic tasks 0.6586466165413534 0.19699248120300752 0.1443609022556391 1995
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 -