Poll Summary

Number Of Votes Cast
89248
Overall Acceptance Rates
Choice Number Percentage
Yes 56480 0.6328433130154177
No 20176 0.22606669057009682
Undecided 12592 0.14108999641448547

Servlets and JSPsYesNoUndecidedVotes
A Web App Framework - WEB4J 0.618437900128041 0.17968416559965855 0.20187793427230047 2343
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.6284153005464481 0.2185792349726776 0.15300546448087432 183
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.6899509803921569 0.19607843137254902 0.11397058823529412 816
Emit flexible URLs 0.7352941176470589 0.07352941176470588 0.19117647058823528 68
Escape special characters 0.58157602663707 0.2985571587125416 0.11986681465038845 901
Forward versus redirect 0.7174825174825175 0.13846153846153847 0.14405594405594405 715
JSPs should contain only presentation logic 0.8733624454148472 0.0611353711790393 0.06550218340611354 229
Loss of data during restart 0.6636363636363637 0.14545454545454545 0.19090909090909092 110
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.7391304347826086 0.1497584541062802 0.1111111111111111 207
Prefer UTF-8 in all layers 0.7924528301886793 0.09433962264150944 0.11320754716981132 159
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.4642857142857143 0.39285714285714285 0.14285714285714285 56
Validate email addresses 0.43523316062176165 0.4170984455958549 0.14766839378238342 386
Validate generated HTML 0.7068965517241379 0.15229885057471265 0.14080459770114942 348
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.6897374701670644 0.15990453460620524 0.15035799522673032 419
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.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.6356589147286822 0.2248062015503876 0.13953488372093023 258
Look and Feel guidelines 0.8571428571428571 0.08163265306122448 0.061224489795918366 49
Minimal Swing application 0.5724137931034483 0.2620689655172414 0.16551724137931034 145
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.4634146341463415 0.2804878048780488 0.25609756097560976 82
Splash screen 0.562111801242236 0.30745341614906835 0.13043478260869565 322
Standardized dialogs 0.5555555555555556 0.3333333333333333 0.1111111111111111 27
Swing in general 0.75 0.08333333333333333 0.16666666666666666 36
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.5306122448979592 0.29591836734693877 0.17346938775510204 98
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.42727272727272725 0.3181818181818182 0.2545454545454545 440
Avoid empty catch blocks 0.8165137614678899 0.1162079510703364 0.0672782874617737 327
Be specific in throws clause 0.6064981949458483 0.3249097472924188 0.06859205776173286 277
Beware of unknown root causes 0.3548387096774194 0.2903225806451613 0.3548387096774194 31
Checked versus unchecked exceptions 0.5167785234899329 0.2788285539963392 0.20439292251372787 1639
Exception translation 0.917910447761194 0.05223880597014925 0.029850746268656716 134
Exceptions and control flow 0.6902173913043478 0.16847826086956522 0.14130434782608695 184
Finally and catch 0.6607142857142857 0.1982142857142857 0.14107142857142857 560
Javadoc all exceptions 0.5714285714285714 0.22981366459627328 0.19875776397515527 161
Pass all pertinent data to exceptions 0.9448818897637795 0.015748031496062992 0.03937007874015748 127
Stack trace as String 0.7602179836512262 0.15122615803814715 0.0885558583106267 734
Use template for repeated try-catch 0.6590909090909091 0.11363636363636363 0.22727272727272727 88
Input-OutputYesNoUndecidedVotes
Always close streams 0.7426273458445041 0.14745308310991956 0.10991957104557641 373
Buffering usually appropriate 0.8648648648648649 0.05405405405405406 0.08108108108108109 74
Console input 0.5255972696245734 0.3003412969283277 0.17406143344709898 293
Copy a file 0.675 0.225 0.1 120
Reading and writing binary files 0.4696969696969697 0.2818181818181818 0.24848484848484848 330
Reading and writing Serializable objects 0.5617128463476071 0.26700251889168763 0.1712846347607053 397
Reading and writing text files 0.6068429237947123 0.22488335925349923 0.1682737169517885 3215
DatabasesYesNoUndecidedVotes
Business identifiers as String 0.8226299694189603 0.11009174311926606 0.0672782874617737 327
Connection pools 0.8707482993197279 0.061224489795918366 0.06802721088435375 294
Consider data layer tools 0.5813953488372093 0.20930232558139536 0.20930232558139536 43
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.6344827586206897 0.1896551724137931 0.17586206896551723 290
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.5326633165829145 0.32160804020100503 0.1457286432160804 199
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.81068524970964 0.09059233449477352 0.09872241579558652 861
Encapsulate collections 0.8159203980099502 0.06467661691542288 0.11940298507462686 201
Iterate without an index 0.7716049382716049 0.1697530864197531 0.05864197530864197 324
Prefer Collections over older classes 0.8387096774193549 0.056451612903225805 0.10483870967741936 124
Two ways of using Iterator 0.6053639846743295 0.24265644955300128 0.15197956577266922 1566
Use for-each liberally 0.7596899224806202 0.15503875968992248 0.08527131782945736 258
Use interface references to Collections 0.7024793388429752 0.19008264462809918 0.10743801652892562 121
Use standard Collections 0.8247422680412371 0.061855670103092786 0.1134020618556701 194
Overriding Object MethodsYesNoUndecidedVotes
Avoid clone 0.4188191881918819 0.34686346863468637 0.23431734317343172 542
Implementing compareTo 0.4963144963144963 0.33906633906633904 0.16461916461916462 407
Implementing equals 0.5902140672782875 0.27522935779816515 0.1345565749235474 327
Implementing hashCode 0.5520833333333334 0.2708333333333333 0.17708333333333334 384
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.47586206896551725 0.35172413793103446 0.1724137931034483 290
Clipboard copy and paste 0.7740384615384616 0.13514957264957264 0.09081196581196581 1872
Command line operations 0.45714285714285713 0.3873015873015873 0.15555555555555556 315
Compare and sort Strings 0.5114754098360655 0.3442622950819672 0.14426229508196722 305
Copy an array 0.5833333333333334 0.2962962962962963 0.12037037037037036 648
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.608337186007089 0.264139312683002 0.12752350130990908 12978
Get database connection 0.5487012987012987 0.2857142857142857 0.16558441558441558 1232
Get size of object in memory 0.3850267379679144 0.4411764705882353 0.17379679144385027 374
Implement code tables 0.5714285714285714 0.23214285714285715 0.19642857142857142 56
Internationalization 0.4927536231884058 0.30434782608695654 0.2028985507246377 69
Logging messages 0.602800763844685 0.22724379376193507 0.16995544239338 1571
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.6047548291233283 0.21693907875185736 0.17830609212481427 673
Pattern-match lines of a file 0.5643939393939394 0.2765151515151515 0.1590909090909091 264
Read jar version information 0.55 0.35 0.1 100
Recovering resources 0.8529411764705882 0.08823529411764706 0.058823529411764705 34
Recursive file listing 0.7324955116696589 0.1615798922800718 0.1059245960502693 1114
Replace a substring 0.5833333333333334 0.29797979797979796 0.11868686868686869 396
Representing money 0.7457943925233644 0.11401869158878504 0.14018691588785046 535
Send an email 0.5480038022813688 0.24096958174904942 0.21102661596958175 2104
Time execution speed 0.7111111111111111 0.2074074074074074 0.08148148148148149 135
Common Design PatternsYesNoUndecidedVotes
Abstract Factory 0.6982248520710059 0.16568047337278108 0.13609467455621302 169
Command objects 0.55 0.2 0.25 20
Factory methods 0.625 0.21200980392156862 0.16299019607843138 816
Immutable objects 0.8114754098360656 0.0942622950819672 0.0942622950819672 1220
Lazy initialization 0.7551020408163265 0.1326530612244898 0.11224489795918367 196
Model Objects 0.6141732283464567 0.16535433070866143 0.2204724409448819 127
Plugin Factory 0.71875 0.09375 0.1875 32
Private constructor 0.7352297592997812 0.14332603938730853 0.12144420131291028 914
Singleton 0.7246835443037974 0.17405063291139242 0.10126582278481013 316
Template method 0.7166666666666667 0.21666666666666667 0.06666666666666667 60
Type-Safe Enumerations 0.7969543147208121 0.1116751269035533 0.09137055837563451 394
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.757085020242915 0.1659919028340081 0.07692307692307693 247
Beware of instanceof operator 0.6147757255936676 0.23113456464379947 0.15408970976253297 1895
Class for constants 0.6354056902002108 0.23076923076923078 0.13382507903055849 949
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.5585284280936454 0.2608695652173913 0.1806020066889632 299
Fields should usually be private 0.6507936507936508 0.20634920634920634 0.14285714285714285 126
Interface for constants 0.3213038416763679 0.5413271245634459 0.13736903376018628 859
Know the core libraries 0.7899159663865546 0.09243697478991597 0.11764705882352941 119
Minimize ripple effects 0.8716216216216216 0.033783783783783786 0.0945945945945946 148
Naming conventions 0.33242506811989103 0.5885558583106267 0.07901907356948229 367
Nest classes with care 0.5263157894736842 0.3157894736842105 0.15789473684210525 19
Output parameters 0.38308457711442784 0.39303482587064675 0.22388059701492538 201
Separate public and private members 0.7252747252747253 0.17582417582417584 0.0989010989010989 91
String concatenation does not scale 0.8493975903614458 0.0963855421686747 0.05421686746987952 166
Tag or marker interfaces 0.6525096525096525 0.1891891891891892 0.1583011583011583 259
Uncommon classes need explicit imports 0.7672413793103449 0.13793103448275862 0.09482758620689655 116
Use @Override liberally 0.8305084745762712 0.09110169491525423 0.07838983050847458 472
Use final liberally 0.6073446327683616 0.23022598870056496 0.16242937853107345 708
Use javadoc liberally 0.7486338797814208 0.13114754098360656 0.12021857923497267 183
Use static imports rarely 0.5742705570291777 0.29045092838196285 0.13527851458885942 754
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.770949720670391 0.07262569832402235 0.1564245810055866 179
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.6293929712460063 0.23003194888178913 0.14057507987220447 313
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.8631578947368421 0.05263157894736842 0.08421052631578947 95
Compile regular expressions once 0.7368421052631579 0.17543859649122806 0.08771929824561403 57
Conditional compile 0.502127659574468 0.3872340425531915 0.11063829787234042 235
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.7241379310344828 0.19310344827586207 0.08275862068965517 145
Defensive copying 0.8655804480651731 0.06109979633401222 0.07331975560081466 491
Design by Contract 0.8022598870056498 0.096045197740113 0.1016949152542373 177
Don't use tab characters 0.3505747126436782 0.5948275862068966 0.05459770114942529 348
Extra space in argument list 0.1873873873873874 0.7549549549549549 0.05765765765765766 555
Generating unique IDs 0.5704119850187266 0.2704119850187266 0.15917602996254682 2670
Include 'from', exclude 'to' 0.7931034482758621 0.1206896551724138 0.08620689655172414 58
Multiple return statements 0.5475206611570248 0.3347107438016529 0.11776859504132231 484
Overloading can be tricky 0.7692307692307693 0.15384615384615385 0.07692307692307693 104
Package by feature, not layer 0.7216905901116427 0.12280701754385964 0.15550239234449761 1254
Passwords never in clear text 0.6577181208053692 0.174496644295302 0.16778523489932887 149
Prefer empty items to null ones 0.680952380952381 0.20714285714285716 0.11190476190476191 420
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.6627906976744186 0.16666666666666666 0.17054263565891473 258
Test using main method 0.3709677419354839 0.5241935483870968 0.10483870967741936 124
Try alternatives to ResourceBundle 0.34375 0.328125 0.328125 64
Use a fake system clock 0.5540540540540541 0.25 0.19594594594594594 148
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.6634615384615384 0.21634615384615385 0.1201923076923077 208
Use enums to restrict arguments 0.723404255319149 0.1276595744680851 0.14893617021276595 141
Validate state with class invariants 0.5972222222222222 0.25 0.1527777777777778 72
Validation belongs in a Model Object 0.5714285714285714 0.30714285714285716 0.12142857142857143 140
AssertionsYesNoUndecidedVotes
Assert is for private arguments only 0.8175675675675675 0.13513513513513514 0.0472972972972973 148
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.6227436823104693 0.19133574007220217 0.18592057761732853 554
Beware of mistaken field redeclares 0.8387096774193549 0.0967741935483871 0.06451612903225806 31
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.5944444444444444 0.25 0.15555555555555556 180
Constructors shouldn't start threads 0.7115384615384616 0.17307692307692307 0.11538461538461539 52
Copy constructors 0.6380458919319023 0.22501850481125094 0.13693560325684678 1351
Don't pass 'this' out of a constructor 0.6271186440677966 0.23728813559322035 0.13559322033898305 59
Initializing fields to 0-false-null is redundant 0.6744186046511628 0.22739018087855298 0.09819121447028424 387
SerializationYesNoUndecidedVotes
Implementing Serializable 0.6288167938931297 0.18893129770992367 0.18225190839694658 1048
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.7396551724137931 0.11379310344827587 0.14655172413793102 580
Avoid ThreadGroup 0.5609756097560976 0.24390243902439024 0.1951219512195122 164
Data integrity first 0.7300613496932515 0.11042944785276074 0.15950920245398773 163
Document thread safety 0.7333333333333333 0.17777777777777778 0.08888888888888889 45
Dump thread information 0.8 0.16 0.04 25
Handle InterruptedException 0.6111111111111112 0.18518518518518517 0.2037037037037037 54
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.6005830903790087 0.18075801749271136 0.21865889212827988 343
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.7928571428571428 0.11071428571428571 0.09642857142857143 280
Schedule periodic tasks 0.6570144782825761 0.1967049425861208 0.14628057913130305 2003
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.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 -