Poll Summary

Number Of Votes Cast
89654
Overall Acceptance Rates
Choice Number Percentage
Yes 56726 0.6327213509715127
No 20265 0.2260356481584759
Undecided 12663 0.14124300087001138

Servlets and JSPsYesNoUndecidedVotes
A Web App Framework - WEB4J 0.6190476190476191 0.17899659863945577 0.20195578231292516 2352
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.8421052631578947 0.07518796992481203 0.08270676691729323 133
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.6304347826086957 0.21739130434782608 0.15217391304347827 184
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.6903304773561811 0.19583843329253367 0.11383108935128519 817
Emit flexible URLs 0.7352941176470589 0.07352941176470588 0.19117647058823528 68
Escape special characters 0.581858407079646 0.29867256637168144 0.11946902654867257 904
Forward versus redirect 0.7182705718270572 0.13807531380753138 0.14365411436541142 717
JSPs should contain only presentation logic 0.8739130434782608 0.06086956521739131 0.06521739130434782 230
Loss of data during restart 0.6666666666666666 0.14414414414414414 0.1891891891891892 111
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.7403846153846154 0.14903846153846154 0.11057692307692307 208
Prefer UTF-8 in all layers 0.7875 0.09375 0.11875 160
Prevent self-linking 0.39285714285714285 0.5357142857142857 0.07142857142857142 28
Refactor large Controllers 0.8095238095238095 0.09523809523809523 0.09523809523809523 21
Repel invalid requests 0.76 0.12 0.12 25
Reuse login page for errors 0.6862745098039216 0.18137254901960784 0.1323529411764706 204
Send trouble-ticket emails 0.5454545454545454 0.18181818181818182 0.2727272727272727 22
Serve binary content 0.5875 0.225 0.1875 80
Session-scope objects often Serializable 0.7407407407407407 0.13333333333333333 0.1259259259259259 135
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.8926380368098159 0.03374233128834356 0.0736196319018405 326
Use templates to standardize layout 0.47368421052631576 0.38596491228070173 0.14035087719298245 57
Validate email addresses 0.43410852713178294 0.4160206718346253 0.14987080103359174 387
Validate generated HTML 0.7068965517241379 0.15229885057471265 0.14080459770114942 348
Web usability guidelines 0.8421052631578947 0.05263157894736842 0.10526315789473684 38
Wrap file upload requests 0.4492753623188406 0.2608695652173913 0.2898550724637681 69
SwingYesNoUndecidedVotes
A Swing App - StocksMonitor 0.6879432624113475 0.1607565011820331 0.15130023640661938 423
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.6942148760330579 0.08264462809917356 0.2231404958677686 121
Don't bury dialogs 0.6785714285714286 0.14285714285714285 0.17857142857142858 28
Don't subclass JDialog or JFrame 0.3048780487804878 0.4146341463414634 0.2804878048780488 164
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.6356589147286822 0.2248062015503876 0.13953488372093023 258
Look and Feel guidelines 0.8571428571428571 0.08163265306122448 0.061224489795918366 49
Minimal Swing application 0.5743243243243243 0.2635135135135135 0.16216216216216217 148
Observers and listeners 0.4523809523809524 0.3 0.24761904761904763 210
Preferences dialogs 0.46875 0.15625 0.375 32
Provide an uncaught exception handler 0.6126760563380281 0.20422535211267606 0.18309859154929578 142
Render table cells 0.6580645161290323 0.18387096774193548 0.15806451612903225 310
Sort table rows 0.4578313253012048 0.2891566265060241 0.25301204819277107 83
Splash screen 0.5617283950617284 0.30864197530864196 0.12962962962962962 324
Standardized dialogs 0.5555555555555556 0.3333333333333333 0.1111111111111111 27
Swing in general 0.7567567567567568 0.08108108108108109 0.16216216216216217 37
Swing threads 0.5747126436781609 0.22413793103448276 0.20114942528735633 174
Swing utility tasks 0.775 0.125 0.1 40
Timers 0.3233082706766917 0.48872180451127817 0.18796992481203006 133
Using JavaHelp 0.5252525252525253 0.30303030303030304 0.1717171717171717 99
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.42567567567567566 0.31981981981981983 0.2545045045045045 444
Avoid empty catch blocks 0.8170731707317073 0.11585365853658537 0.06707317073170732 328
Be specific in throws clause 0.6079136690647482 0.3237410071942446 0.0683453237410072 278
Beware of unknown root causes 0.3548387096774194 0.2903225806451613 0.3548387096774194 31
Checked versus unchecked exceptions 0.5158343483556638 0.2789281364190012 0.20523751522533495 1642
Exception translation 0.9185185185185185 0.05185185185185185 0.02962962962962963 135
Exceptions and control flow 0.6918918918918919 0.16756756756756758 0.14054054054054055 185
Finally and catch 0.661319073083779 0.19786096256684493 0.1408199643493761 561
Javadoc all exceptions 0.573170731707317 0.23170731707317074 0.1951219512195122 164
Pass all pertinent data to exceptions 0.9448818897637795 0.015748031496062992 0.03937007874015748 127
Stack trace as String 0.7605442176870748 0.1510204081632653 0.08843537414965986 735
Use template for repeated try-catch 0.651685393258427 0.11235955056179775 0.23595505617977527 89
Input-OutputYesNoUndecidedVotes
Always close streams 0.7427055702917772 0.14588859416445624 0.11140583554376658 377
Buffering usually appropriate 0.8666666666666667 0.05333333333333334 0.08 75
Console input 0.5254237288135594 0.3016949152542373 0.17288135593220338 295
Copy a file 0.6694214876033058 0.23140495867768596 0.09917355371900827 121
Reading and writing binary files 0.46987951807228917 0.28012048192771083 0.25 332
Reading and writing Serializable objects 0.5603015075376885 0.2663316582914573 0.17336683417085427 398
Reading and writing text files 0.6068986948415165 0.2249844623990056 0.16811684275947794 3218
DatabasesYesNoUndecidedVotes
Business identifiers as String 0.823170731707317 0.10975609756097561 0.06707317073170732 328
Connection pools 0.8707482993197279 0.061224489795918366 0.06802721088435375 294
Consider data layer tools 0.5681818181818182 0.20454545454545456 0.22727272727272727 44
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.6357388316151202 0.18900343642611683 0.17525773195876287 291
Data exception wrapping 0.7288135593220338 0.15254237288135594 0.11864406779661017 59
Data is king 0.8706896551724138 0.0603448275862069 0.06896551724137931 116
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.527363184079602 0.31840796019900497 0.15422885572139303 201
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.8112128146453089 0.08924485125858124 0.09954233409610984 874
Encapsulate collections 0.8168316831683168 0.06435643564356436 0.1188118811881188 202
Iterate without an index 0.7692307692307693 0.1723076923076923 0.05846153846153846 325
Prefer Collections over older classes 0.84 0.056 0.104 125
Two ways of using Iterator 0.6058486967577876 0.24221233312142404 0.1519389701207883 1573
Use for-each liberally 0.7596899224806202 0.15503875968992248 0.08527131782945736 258
Use interface references to Collections 0.7049180327868853 0.1885245901639344 0.10655737704918032 122
Use standard Collections 0.8256410256410256 0.06153846153846154 0.11282051282051282 195
Overriding Object MethodsYesNoUndecidedVotes
Avoid clone 0.4198895027624309 0.3462246777163904 0.23388581952117865 543
Implementing compareTo 0.4950980392156863 0.34068627450980393 0.1642156862745098 408
Implementing equals 0.5866261398176292 0.2735562310030395 0.1398176291793313 329
Implementing hashCode 0.5532467532467532 0.2701298701298701 0.17662337662337663 385
Implementing toString 0.4953051643192488 0.3028169014084507 0.20187793427230047 426
Never rely on finalize 0.7263157894736842 0.15789473684210525 0.11578947368421053 95
Common TasksYesNoUndecidedVotes
Arrays as String 0.47766323024054985 0.35051546391752575 0.1718213058419244 291
Clipboard copy and paste 0.7741076185402238 0.13532232285562068 0.09057005860415557 1877
Command line operations 0.45714285714285713 0.3873015873015873 0.15555555555555556 315
Compare and sort Strings 0.5130718954248366 0.3431372549019608 0.1437908496732026 306
Copy an array 0.5839753466872111 0.29583975346687214 0.12018489984591679 649
Determine if Strings are equal 0.6672932330827067 0.2424812030075188 0.09022556390977443 532
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.6076852277956741 0.26468783555760084 0.12762693664672495 13038
Get database connection 0.5485436893203883 0.28640776699029125 0.1650485436893204 1236
Get size of object in memory 0.38666666666666666 0.44 0.17333333333333334 375
Implement code tables 0.5714285714285714 0.23214285714285715 0.19642857142857142 56
Internationalization 0.49295774647887325 0.29577464788732394 0.2112676056338028 71
Logging messages 0.6024096385542169 0.2270133164235891 0.17057704502219403 1577
Measure application performance 0.7758620689655172 0.13793103448275862 0.08620689655172414 58
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.6029629629629629 0.21777777777777776 0.17925925925925926 675
Pattern-match lines of a file 0.5660377358490566 0.27547169811320754 0.15849056603773584 265
Read jar version information 0.55 0.35 0.1 100
Recovering resources 0.8529411764705882 0.08823529411764706 0.058823529411764705 34
Recursive file listing 0.7327354260089686 0.16143497757847533 0.10582959641255606 1115
Replace a substring 0.5833333333333334 0.29797979797979796 0.11868686868686869 396
Representing money 0.7430167597765364 0.11731843575418995 0.13966480446927373 537
Send an email 0.5483412322274882 0.24075829383886255 0.2109004739336493 2110
Time execution speed 0.7111111111111111 0.2074074074074074 0.08148148148148149 135
Common Design PatternsYesNoUndecidedVotes
Abstract Factory 0.7 0.16470588235294117 0.13529411764705881 170
Command objects 0.55 0.2 0.25 20
Factory methods 0.6260657734470159 0.21071863580998781 0.16321559074299635 821
Immutable objects 0.8119378577269011 0.09403107113654947 0.09403107113654947 1223
Lazy initialization 0.7563451776649747 0.1319796954314721 0.1116751269035533 197
Model Objects 0.6171875 0.1640625 0.21875 128
Plugin Factory 0.71875 0.09375 0.1875 32
Private constructor 0.7355191256830601 0.1431693989071038 0.12131147540983607 915
Singleton 0.7246835443037974 0.17405063291139242 0.10126582278481013 316
Template method 0.7166666666666667 0.21666666666666667 0.06666666666666667 60
Type-Safe Enumerations 0.7939698492462312 0.11306532663316583 0.09296482412060302 398
Wrapper (Decorator) 0.5909090909090909 0.2636363636363636 0.14545454545454545 110
Common PracticesYesNoUndecidedVotes
Avoid basic style errors 0.8536585365853658 0.07317073170731707 0.07317073170731707 123
Avoid raw types 0.7590361445783133 0.1646586345381526 0.07630522088353414 249
Beware of instanceof operator 0.6158696794534945 0.2306883867577509 0.1534419337887546 1903
Class for constants 0.6355042016806722 0.23109243697478993 0.1334033613445378 952
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.56 0.26 0.18 300
Fields should usually be private 0.6456692913385826 0.2047244094488189 0.14960629921259844 127
Interface for constants 0.3229527104959631 0.5374855824682814 0.1395617070357555 867
Know the core libraries 0.7916666666666666 0.09166666666666666 0.11666666666666667 120
Minimize ripple effects 0.8716216216216216 0.033783783783783786 0.0945945945945946 148
Naming conventions 0.3324324324324324 0.5891891891891892 0.07837837837837838 370
Nest classes with care 0.5263157894736842 0.3157894736842105 0.15789473684210525 19
Output parameters 0.3853658536585366 0.3951219512195122 0.21951219512195122 205
Separate public and private members 0.7311827956989247 0.17204301075268819 0.0967741935483871 93
String concatenation does not scale 0.8493975903614458 0.0963855421686747 0.05421686746987952 166
Tag or marker interfaces 0.6526717557251909 0.18702290076335878 0.16030534351145037 262
Uncommon classes need explicit imports 0.7672413793103449 0.13793103448275862 0.09482758620689655 116
Use @Override liberally 0.8291139240506329 0.09071729957805907 0.08016877637130802 474
Use final liberally 0.6055555555555555 0.22777777777777777 0.16666666666666666 720
Use javadoc liberally 0.7405405405405405 0.14054054054054055 0.11891891891891893 185
Use static imports rarely 0.5748031496062992 0.29133858267716534 0.13385826771653545 762
Use System.exit with care 0.6672 0.1888 0.144 625
Use Version Control tools 0.6666666666666666 0.13043478260869565 0.2028985507246377 69
Validate method arguments 0.6290322580645161 0.21774193548387097 0.1532258064516129 248
Wisdom, not rules 0.9622641509433962 0.018867924528301886 0.018867924528301886 53
InheritanceYesNoUndecidedVotes
Consider composition instead of subclassing 0.7722222222222223 0.07222222222222222 0.15555555555555556 180
Designing for subclassing 0.7534246575342466 0.136986301369863 0.1095890410958904 73
Overridable methods need special care 0.8235294117647058 0.06862745098039216 0.10784313725490197 102
Remember styles of inheritance 0.94 0.0 0.06 50
More Common PracticesYesNoUndecidedVotes
Avoid null if possible 0.6305732484076433 0.22929936305732485 0.14012738853503184 314
Beware of Byte Order Marks 0.6857142857142857 0.2571428571428571 0.05714285714285714 35
Beware of DecimalFormat 0.43315508021390375 0.32085561497326204 0.24598930481283424 187
Beware of floating point numbers 0.88 0.08 0.04 125
Clarifying method 0.8877551020408163 0.07142857142857142 0.04081632653061224 98
Coding conventions 0.8556701030927835 0.061855670103092786 0.08247422680412371 97
Compile regular expressions once 0.7368421052631579 0.17543859649122806 0.08771929824561403 57
Conditional compile 0.5042372881355932 0.3855932203389831 0.11016949152542373 236
Consider code generators 0.7564102564102564 0.14102564102564102 0.10256410256410256 78
Consider immutable forms for dates 0.47540983606557374 0.3770491803278688 0.14754098360655737 61
Conventional name for return value 0.7142857142857143 0.19047619047619047 0.09523809523809523 147
Defensive copying 0.8663967611336032 0.06072874493927125 0.0728744939271255 494
Design by Contract 0.8022598870056498 0.096045197740113 0.1016949152542373 177
Don't use tab characters 0.3492957746478873 0.5943661971830986 0.056338028169014086 355
Extra space in argument list 0.18705035971223022 0.7535971223021583 0.05935251798561151 556
Generating unique IDs 0.5693050910442214 0.27127461910070605 0.15942028985507245 2691
Include 'from', exclude 'to' 0.7931034482758621 0.1206896551724138 0.08620689655172414 58
Multiple return statements 0.5469387755102041 0.3346938775510204 0.11836734693877551 490
Overloading can be tricky 0.7692307692307693 0.15384615384615385 0.07692307692307693 104
Package by feature, not layer 0.7231012658227848 0.12262658227848101 0.15427215189873417 1264
Passwords never in clear text 0.6577181208053692 0.174496644295302 0.16778523489932887 149
Prefer empty items to null ones 0.6817102137767221 0.20665083135391923 0.11163895486935867 421
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.6666666666666666 0.16475095785440613 0.1685823754789272 261
Test using main method 0.368 0.528 0.104 125
Try alternatives to ResourceBundle 0.34375 0.328125 0.328125 64
Use a fake system clock 0.5526315789473685 0.25 0.19736842105263158 152
Use a testing framework (JUnit) 0.8305084745762712 0.1016949152542373 0.06779661016949153 118
Use Ant for build scripts 0.7333333333333333 0.14814814814814814 0.11851851851851852 270
Use boxing with care 0.6650717703349283 0.215311004784689 0.11961722488038277 209
Use enums to restrict arguments 0.7202797202797203 0.1258741258741259 0.15384615384615385 143
Validate state with class invariants 0.5972222222222222 0.25 0.1527777777777778 72
Validation belongs in a Model Object 0.574468085106383 0.3049645390070922 0.12056737588652482 141
AssertionsYesNoUndecidedVotes
Assert is for private arguments only 0.8187919463087249 0.1342281879194631 0.04697986577181208 149
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.6214285714285714 0.19285714285714287 0.18571428571428572 560
Beware of mistaken field redeclares 0.84375 0.09375 0.0625 32
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.5934065934065934 0.24725274725274726 0.15934065934065933 182
Constructors shouldn't start threads 0.7115384615384616 0.17307692307692307 0.11538461538461539 52
Copy constructors 0.639235855988244 0.2233651726671565 0.13739897134459955 1361
Don't pass 'this' out of a constructor 0.6349206349206349 0.2222222222222222 0.14285714285714285 63
Initializing fields to 0-false-null is redundant 0.6752577319587629 0.2268041237113402 0.0979381443298969 388
SerializationYesNoUndecidedVotes
Implementing Serializable 0.6291706387035272 0.18875119161105816 0.18207816968541468 1049
Serialization and subclassing 0.49019607843137253 0.3235294117647059 0.18627450980392157 102
Some classes need readResolve 0.76 0.12 0.12 75
ThreadsYesNoUndecidedVotes
Always shut down an ExecutorService 0.7389078498293515 0.11433447098976109 0.14675767918088736 586
Avoid ThreadGroup 0.5609756097560976 0.24390243902439024 0.1951219512195122 164
Data integrity first 0.7245508982035929 0.10778443113772455 0.16766467065868262 167
Document thread safety 0.717391304347826 0.17391304347826086 0.10869565217391304 46
Dump thread information 0.8076923076923077 0.15384615384615385 0.038461538461538464 26
Handle InterruptedException 0.625 0.17857142857142858 0.19642857142857142 56
Launch thread is just another user thread 0.8378378378378378 0.08108108108108109 0.08108108108108109 37
Objects communicating across threads 0.6888888888888889 0.17777777777777778 0.13333333333333333 135
Perform N tasks in parallel 0.5988538681948424 0.1833810888252149 0.2177650429799427 349
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.7075471698113207 0.1320754716981132 0.16037735849056603 106
Remember the types of intrinsic lock 0.7943262411347518 0.1099290780141844 0.09574468085106383 282
Schedule periodic tasks 0.6567015445939213 0.19681116093672146 0.14648729446935724 2007
Stop threads through cooperation 0.6357615894039735 0.2847682119205298 0.07947019867549669 151
Synchronize access to mutable fields 0.5634517766497462 0.27918781725888325 0.15736040609137056 197
Synchronized is implementation detail 0.6210526315789474 0.24210526315789474 0.1368421052631579 95
Thread priorities are not portable 0.6458333333333334 0.1875 0.16666666666666666 48
Use finally to unlock 0.8048780487804879 0.12195121951219512 0.07317073170731707 41
© 2018 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 -