Poll Summary

Number Of Votes Cast
90602
Overall Acceptance Rates
Choice Number Percentage
Yes 57455 0.6341471490695569
No 20382 0.22496192137038917
Undecided 12765 0.14089092956005386

Servlets and JSPsYesNoUndecidedVotes
A Web App Framework - WEB4J 0.6186655405405406 0.17947635135135134 0.20185810810810811 2368
Always maintain HttpSessions 0.7289156626506024 0.1566265060240964 0.1144578313253012 166
Beware multilingual submit buttons 0.6460674157303371 0.20224719101123595 0.15168539325842698 178
Beware of common hacks 0.8444444444444444 0.07407407407407407 0.08148148148148149 135
Beware of custom cookies 0.7758620689655172 0.07758620689655173 0.14655172413793102 116
Beware of doubly escaped ampersands 0.7721518987341772 0.12658227848101267 0.10126582278481013 79
Beware of URL rewriting 0.6344086021505376 0.21505376344086022 0.15053763440860216 186
Choose form validation style carefully 0.717741935483871 0.1774193548387097 0.10483870967741936 124
Consider Controllers for redirects 0.5116279069767442 0.23255813953488372 0.2558139534883721 43
Do not synchronize doGet, doPost 0.6909975669099757 0.19586374695863748 0.11313868613138686 822
Emit flexible URLs 0.7428571428571429 0.07142857142857142 0.18571428571428572 70
Escape special characters 0.5814977973568282 0.2973568281938326 0.1211453744493392 908
Forward versus redirect 0.7154696132596685 0.13950276243093923 0.14502762430939226 724
JSPs should contain only presentation logic 0.8755364806866953 0.060085836909871244 0.06437768240343347 233
Loss of data during restart 0.6696428571428571 0.14285714285714285 0.1875 112
Manage sessions closely 0.8012820512820513 0.10256410256410256 0.09615384615384616 156
Measure web app performance 0.86 0.08 0.06 200
Minimize site response time 0.7346938775510204 0.14285714285714285 0.12244897959183673 98
Parse parameters into domain objects 0.4444444444444444 0.2962962962962963 0.25925925925925924 27
Pre-populate forms 0.46226415094339623 0.33962264150943394 0.19811320754716982 106
Prefer JSTL tags 0.7416267942583732 0.14832535885167464 0.11004784688995216 209
Prefer UTF-8 in all layers 0.7839506172839507 0.09259259259259259 0.12345679012345678 162
Prevent self-linking 0.41379310344827586 0.5172413793103449 0.06896551724137931 29
Refactor large Controllers 0.8260869565217391 0.08695652173913043 0.08695652173913043 23
Repel invalid requests 0.7777777777777778 0.1111111111111111 0.1111111111111111 27
Reuse login page for errors 0.6908212560386473 0.178743961352657 0.13043478260869565 207
Send trouble-ticket emails 0.5652173913043478 0.17391304347826086 0.2608695652173913 23
Serve binary content 0.6024096385542169 0.21686746987951808 0.18072289156626506 83
Session-scope objects often Serializable 0.7391304347826086 0.13043478260869565 0.13043478260869565 138
Struts seems mediocre 0.44075829383886256 0.38388625592417064 0.17535545023696683 211
Thread-safety in web apps 0.7466216216216216 0.1554054054054054 0.09797297297297297 296
Understand details of FORM tags 0.8055555555555556 0.08333333333333333 0.1111111111111111 36
Use Cascading Style Sheets 0.6984126984126984 0.19047619047619047 0.1111111111111111 126
Use extensions for fine-grained security 0.5490196078431373 0.3333333333333333 0.11764705882352941 51
Use Model-View-Controller framework 0.8936170212765957 0.03343465045592705 0.0729483282674772 329
Use templates to standardize layout 0.4915254237288136 0.3728813559322034 0.13559322033898305 59
Validate email addresses 0.4370179948586118 0.4138817480719794 0.14910025706940874 389
Validate generated HTML 0.7085714285714285 0.15142857142857144 0.14 350
Web usability guidelines 0.85 0.05 0.1 40
Wrap file upload requests 0.4647887323943662 0.2535211267605634 0.28169014084507044 71
SwingYesNoUndecidedVotes
A Swing App - StocksMonitor 0.687793427230047 0.1619718309859155 0.15023474178403756 426
Actions 0.7040816326530612 0.20408163265306123 0.09183673469387756 98
Align menu items 0.6666666666666666 0.20202020202020202 0.13131313131313133 99
Change theme 0.6733333333333333 0.18 0.14666666666666667 150
Consider JGoodies Forms for layouts 0.7016129032258065 0.08064516129032258 0.21774193548387097 124
Don't bury dialogs 0.7096774193548387 0.12903225806451613 0.16129032258064516 31
Don't subclass JDialog or JFrame 0.31736526946107785 0.40718562874251496 0.2754491017964072 167
Filter table rows 0.55 0.35 0.1 20
Input dialogs 0.5555555555555556 0.24444444444444444 0.2 45
Launch other applications 0.75 0.25 0.0 32
Layout Managers 0.6374045801526718 0.22137404580152673 0.14122137404580154 262
Look and Feel guidelines 0.86 0.08 0.06 50
Minimal Swing application 0.5789473684210527 0.2565789473684211 0.16447368421052633 152
Observers and listeners 0.45539906103286387 0.29577464788732394 0.24882629107981222 213
Preferences dialogs 0.5 0.14705882352941177 0.35294117647058826 34
Provide an uncaught exception handler 0.6180555555555556 0.2013888888888889 0.18055555555555555 144
Render table cells 0.6592356687898089 0.18152866242038215 0.1592356687898089 314
Sort table rows 0.46511627906976744 0.29069767441860467 0.2441860465116279 86
Splash screen 0.5613496932515337 0.3098159509202454 0.12883435582822086 326
Standardized dialogs 0.5862068965517241 0.3103448275862069 0.10344827586206896 29
Swing in general 0.7692307692307693 0.07692307692307693 0.15384615384615385 39
Swing threads 0.5819209039548022 0.22033898305084745 0.1977401129943503 177
Swing utility tasks 0.7857142857142857 0.11904761904761904 0.09523809523809523 42
Timers 0.3333333333333333 0.48148148148148145 0.18518518518518517 135
Using JavaHelp 0.5346534653465347 0.297029702970297 0.16831683168316833 101
Using preferences 0.4507042253521127 0.30985915492957744 0.23943661971830985 71
Verify input with Model Objects 0.6923076923076923 0.15384615384615385 0.15384615384615385 13
Verify input with regular expressions 0.4634146341463415 0.3170731707317073 0.21951219512195122 41
ExceptionsYesNoUndecidedVotes
Avoid @throws in javadoc 0.4212860310421286 0.328159645232816 0.25055432372505543 451
Avoid empty catch blocks 0.8192771084337349 0.1144578313253012 0.06626506024096386 332
Be specific in throws clause 0.6107142857142858 0.32142857142857145 0.06785714285714285 280
Beware of unknown root causes 0.3939393939393939 0.2727272727272727 0.3333333333333333 33
Checked versus unchecked exceptions 0.516969696969697 0.2775757575757576 0.20545454545454545 1650
Exception translation 0.9197080291970803 0.051094890510948905 0.029197080291970802 137
Exceptions and control flow 0.6951871657754011 0.1657754010695187 0.13903743315508021 187
Finally and catch 0.6625222024866785 0.19715808170515098 0.14031971580817051 563
Javadoc all exceptions 0.5748502994011976 0.23353293413173654 0.19161676646706588 167
Pass all pertinent data to exceptions 0.9461538461538461 0.015384615384615385 0.038461538461538464 130
Stack trace as String 0.7611940298507462 0.15061058344640435 0.08819538670284939 737
Use template for repeated try-catch 0.6521739130434783 0.10869565217391304 0.2391304347826087 92
Input-OutputYesNoUndecidedVotes
Always close streams 0.7427821522309711 0.14435695538057744 0.11286089238845144 381
Buffering usually appropriate 0.8701298701298701 0.05194805194805195 0.07792207792207792 77
Console input 0.5268456375838926 0.2986577181208054 0.174496644295302 298
Copy a file 0.6666666666666666 0.23015873015873015 0.10317460317460317 126
Reading and writing binary files 0.47230320699708456 0.282798833819242 0.24489795918367346 343
Reading and writing Serializable objects 0.5625 0.265 0.1725 400
Reading and writing text files 0.6068879925535215 0.2249457027614024 0.168166304685076 3223
DatabasesYesNoUndecidedVotes
Business identifiers as String 0.8242424242424242 0.10909090909090909 0.06666666666666667 330
Connection pools 0.8695652173913043 0.06020066889632107 0.07023411371237458 299
Consider data layer tools 0.5869565217391305 0.1956521739130435 0.21739130434782608 46
Consider using standard SQL 0.696078431372549 0.17647058823529413 0.12745098039215685 102
Consider wrapper classes for optional data 0.7746478873239436 0.1267605633802817 0.09859154929577464 71
Data access objects 0.6382252559726962 0.18771331058020477 0.17406143344709898 293
Data exception wrapping 0.7377049180327869 0.14754098360655737 0.11475409836065574 61
Data is king 0.8728813559322034 0.059322033898305086 0.06779661016949153 118
Don't perform basic SQL tasks in code 0.8571428571428571 0.07792207792207792 0.06493506493506493 77
Encapsulate connections 0.8125 0.0625 0.125 48
Keep SQL out of code 0.5320197044334976 0.31527093596059114 0.15270935960591134 203
Prefer PreparedStatement 0.8985507246376812 0.043478260869565216 0.057971014492753624 69
Reduce database code duplication 0.9090909090909091 0.030303030303030304 0.06060606060606061 33
Remember the basics of database design 0.875 0.0625 0.0625 64
Simplify database operations 0.5454545454545454 0.2727272727272727 0.18181818181818182 22
Try pseudo-persistence for mock ups 0.6551724137931034 0.2413793103448276 0.10344827586206896 29
Use template for transactions 0.7142857142857143 0.047619047619047616 0.23809523809523808 21
CollectionsYesNoUndecidedVotes
Choosing the right Collection 0.8081264108352144 0.09142212189616253 0.10045146726862303 886
Encapsulate collections 0.8177339901477833 0.06403940886699508 0.11822660098522167 203
Iterate without an index 0.7706422018348624 0.1712538226299694 0.0581039755351682 327
Prefer Collections over older classes 0.84251968503937 0.05511811023622047 0.10236220472440945 127
Two ways of using Iterator 0.6064434617814277 0.24131396083385975 0.15224257738471256 1583
Use for-each liberally 0.7615384615384615 0.15384615384615385 0.08461538461538462 260
Use interface references to Collections 0.7063492063492064 0.18253968253968253 0.1111111111111111 126
Use standard Collections 0.8274111675126904 0.06091370558375635 0.1116751269035533 197
Overriding Object MethodsYesNoUndecidedVotes
Avoid clone 0.41894353369763204 0.34790528233151186 0.2331511839708561 549
Implementing compareTo 0.49635036496350365 0.3381995133819951 0.1654501216545012 411
Implementing equals 0.5878787878787879 0.2727272727272727 0.1393939393939394 330
Implementing hashCode 0.5555555555555556 0.268733850129199 0.17571059431524547 387
Implementing toString 0.4976635514018692 0.3014018691588785 0.20093457943925233 428
Never rely on finalize 0.7319587628865979 0.15463917525773196 0.1134020618556701 97
Common TasksYesNoUndecidedVotes
Arrays as String 0.4847457627118644 0.34576271186440677 0.1694915254237288 295
Clipboard copy and paste 0.7735949098621421 0.1352067868504772 0.0911983032873807 1886
Command line operations 0.4625 0.384375 0.153125 320
Compare and sort Strings 0.5129032258064516 0.3387096774193548 0.14838709677419354 310
Copy an array 0.583206106870229 0.29465648854961835 0.12213740458015267 655
Determine if Strings are equal 0.6660447761194029 0.24253731343283583 0.0914179104477612 536
Examine bytecode 0.5319148936170213 0.3617021276595745 0.10638297872340426 47
Fetch web page and header 0.6470588235294118 0.2043343653250774 0.14860681114551083 323
Generate random numbers 0.6073007163542143 0.26512726718488033 0.12757201646090535 13122
Get database connection 0.5491935483870968 0.2862903225806452 0.16451612903225807 1240
Get size of object in memory 0.3888888888888889 0.43915343915343913 0.17195767195767195 378
Implement code tables 0.5932203389830508 0.22033898305084745 0.1864406779661017 59
Internationalization 0.5068493150684932 0.2876712328767123 0.2054794520547945 73
Logging messages 0.6013853904282116 0.22795969773299748 0.17065491183879095 1588
Measure application performance 0.7833333333333333 0.13333333333333333 0.08333333333333333 60
Modernize old code 0.8888888888888888 0.06349206349206349 0.047619047619047616 63
Open file in native directory 0.6153846153846154 0.23076923076923078 0.15384615384615385 13
Parse text 0.6047197640117994 0.2168141592920354 0.17846607669616518 678
Pattern-match lines of a file 0.5666666666666667 0.2777777777777778 0.15555555555555556 270
Read jar version information 0.5480769230769231 0.34615384615384615 0.10576923076923077 104
Recovering resources 0.8611111111111112 0.08333333333333333 0.05555555555555555 36
Recursive file listing 0.7325581395348837 0.16189624329159213 0.10554561717352415 1118
Replace a substring 0.585427135678392 0.2964824120603015 0.11809045226130653 398
Representing money 0.7425925925925926 0.11851851851851852 0.1388888888888889 540
Send an email 0.5470004723665565 0.2413793103448276 0.21162021728861596 2117
Time execution speed 0.717391304347826 0.2028985507246377 0.07971014492753623 138
Common Design PatternsYesNoUndecidedVotes
Abstract Factory 0.7034883720930233 0.16279069767441862 0.13372093023255813 172
Command objects 0.5909090909090909 0.18181818181818182 0.22727272727272727 22
Factory methods 0.6266666666666667 0.2096969696969697 0.16363636363636364 825
Immutable objects 0.8112286411716843 0.0935720097640358 0.0951993490642799 1229
Lazy initialization 0.7524752475247525 0.12871287128712872 0.1188118811881188 202
Model Objects 0.6230769230769231 0.16153846153846155 0.2153846153846154 130
Plugin Factory 0.7352941176470589 0.08823529411764706 0.17647058823529413 34
Private constructor 0.7356446370530878 0.14301191765980498 0.12134344528710726 923
Singleton 0.728125 0.171875 0.1 320
Template method 0.7258064516129032 0.20967741935483872 0.06451612903225806 62
Type-Safe Enumerations 0.7960199004975125 0.11194029850746269 0.09203980099502487 402
Wrapper (Decorator) 0.5929203539823009 0.25663716814159293 0.1504424778761062 113
Common PracticesYesNoUndecidedVotes
Avoid basic style errors 0.856 0.072 0.072 125
Avoid raw types 0.7579365079365079 0.1626984126984127 0.07936507936507936 252
Beware of instanceof operator 0.6164742917103883 0.23032528856243442 0.15320041972717732 1906
Class for constants 0.6361746361746362 0.23076923076923078 0.13305613305613306 962
Construct classes from the outside in 0.9154929577464789 0.056338028169014086 0.028169014084507043 71
Do not break portability 0.7532467532467533 0.18181818181818182 0.06493506493506493 77
Don't declare local variables before use 0.5592105263157895 0.2598684210526316 0.18092105263157895 304
Fields should usually be private 0.6538461538461539 0.2 0.14615384615384616 130
Interface for constants 0.32685714285714285 0.5337142857142857 0.13942857142857143 875
Know the core libraries 0.7950819672131147 0.09016393442622951 0.11475409836065574 122
Minimize ripple effects 0.868421052631579 0.03289473684210526 0.09868421052631579 152
Naming conventions 0.3351206434316354 0.5844504021447721 0.08042895442359249 373
Nest classes with care 0.5714285714285714 0.2857142857142857 0.14285714285714285 21
Output parameters 0.391304347826087 0.391304347826087 0.21739130434782608 207
Separate public and private members 0.7395833333333334 0.16666666666666666 0.09375 96
String concatenation does not scale 0.8511904761904762 0.09523809523809523 0.05357142857142857 168
Tag or marker interfaces 0.6490566037735849 0.18867924528301888 0.16226415094339622 265
Uncommon classes need explicit imports 0.773109243697479 0.13445378151260504 0.09243697478991597 119
Use @Override liberally 0.83125 0.08958333333333333 0.07916666666666666 480
Use final liberally 0.6057692307692307 0.22664835164835165 0.16758241758241757 728
Use javadoc liberally 0.7433155080213903 0.13903743315508021 0.11764705882352941 187
Use static imports rarely 0.5747724317295189 0.29128738621586475 0.13394018205461639 769
Use System.exit with care 0.6671949286846276 0.18700475435816163 0.14580031695721077 631
Use Version Control tools 0.676056338028169 0.1267605633802817 0.19718309859154928 71
Validate method arguments 0.6284584980237155 0.2134387351778656 0.15810276679841898 253
Wisdom, not rules 0.9642857142857143 0.017857142857142856 0.017857142857142856 56
InheritanceYesNoUndecidedVotes
Consider composition instead of subclassing 0.7759562841530054 0.07103825136612021 0.15300546448087432 183
Designing for subclassing 0.7567567567567568 0.13513513513513514 0.10810810810810811 74
Overridable methods need special care 0.8269230769230769 0.0673076923076923 0.10576923076923077 104
Remember styles of inheritance 0.9423076923076923 0.0 0.057692307692307696 52
More Common PracticesYesNoUndecidedVotes
Avoid null if possible 0.6329113924050633 0.22784810126582278 0.13924050632911392 316
Beware of Byte Order Marks 0.6842105263157895 0.2631578947368421 0.05263157894736842 38
Beware of DecimalFormat 0.43915343915343913 0.31746031746031744 0.24338624338624337 189
Beware of floating point numbers 0.8828125 0.078125 0.0390625 128
Clarifying method 0.8910891089108911 0.06930693069306931 0.039603960396039604 101
Coding conventions 0.85 0.07 0.08 100
Compile regular expressions once 0.7540983606557377 0.16393442622950818 0.08196721311475409 61
Conditional compile 0.5062240663900415 0.3817427385892116 0.11203319502074689 241
Consider code generators 0.7625 0.1375 0.1 80
Consider immutable forms for dates 0.49206349206349204 0.36507936507936506 0.14285714285714285 63
Conventional name for return value 0.7162162162162162 0.1891891891891892 0.0945945945945946 148
Defensive copying 0.8651911468812877 0.06237424547283702 0.07243460764587525 497
Design by Contract 0.8055555555555556 0.09444444444444444 0.1 180
Don't use tab characters 0.35714285714285715 0.5851648351648352 0.057692307692307696 364
Extra space in argument list 0.18962432915921287 0.7513416815742398 0.059033989266547404 559
Generating unique IDs 0.569643513414186 0.27048879088570377 0.15986769570011025 2721
Include 'from', exclude 'to' 0.7868852459016393 0.11475409836065574 0.09836065573770492 61
Multiple return statements 0.5533199195171026 0.3299798792756539 0.11670020120724346 497
Overloading can be tricky 0.7757009345794392 0.14953271028037382 0.07476635514018691 107
Package by feature, not layer 0.7255813953488373 0.12248062015503876 0.15193798449612403 1290
Passwords never in clear text 0.6580645161290323 0.17419354838709677 0.16774193548387098 155
Prefer empty items to null ones 0.6832151300236406 0.20567375886524822 0.1111111111111111 423
Quote dynamic text when logging 0.82 0.12 0.06 100
Self-encapsulate fields 0.6391752577319587 0.16494845360824742 0.1958762886597938 194
Structs are occasionally useful 0.6727941176470589 0.16176470588235295 0.16544117647058823 272
Test using main method 0.3779527559055118 0.5196850393700787 0.10236220472440945 127
Try alternatives to ResourceBundle 0.36363636363636365 0.3181818181818182 0.3181818181818182 66
Use a fake system clock 0.5612903225806452 0.24516129032258063 0.1935483870967742 155
Use a testing framework (JUnit) 0.8333333333333334 0.1 0.06666666666666667 120
Use Ant for build scripts 0.7352941176470589 0.14705882352941177 0.11764705882352941 272
Use boxing with care 0.6650943396226415 0.21226415094339623 0.12264150943396226 212
Use enums to restrict arguments 0.7162162162162162 0.12837837837837837 0.1554054054054054 148
Validate state with class invariants 0.6081081081081081 0.24324324324324326 0.14864864864864866 74
Validation belongs in a Model Object 0.5804195804195804 0.3006993006993007 0.11888111888111888 143
AssertionsYesNoUndecidedVotes
Assert is for private arguments only 0.8211920529801324 0.13245033112582782 0.046357615894039736 151
Assert use cases 0.36492890995260663 0.4312796208530806 0.2037914691943128 211
Assertions in general 0.8648648648648649 0.13513513513513514 0.0 37
Force enabling of assertions 0.5737704918032787 0.2786885245901639 0.14754098360655737 61
ConstructorsYesNoUndecidedVotes
Avoid JavaBeans style of construction 0.6216696269982238 0.1936056838365897 0.1847246891651865 563
Beware of mistaken field redeclares 0.8484848484848485 0.09090909090909091 0.06060606060606061 33
Construct Object using class name 0.5426008968609866 0.3004484304932735 0.15695067264573992 223
Constructors in general 0.6538461538461539 0.25 0.09615384615384616 52
Constructors shouldn't call overridables 0.5978260869565217 0.24456521739130435 0.15760869565217392 184
Constructors shouldn't start threads 0.7272727272727273 0.16363636363636364 0.10909090909090909 55
Copy constructors 0.6378809869375908 0.22351233671988388 0.1386066763425254 1378
Don't pass 'this' out of a constructor 0.6567164179104478 0.208955223880597 0.13432835820895522 67
Initializing fields to 0-false-null is redundant 0.6725888324873096 0.22842639593908629 0.09898477157360407 394
SerializationYesNoUndecidedVotes
Implementing Serializable 0.6294896030245747 0.1890359168241966 0.18147448015122875 1058
Serialization and subclassing 0.49523809523809526 0.3142857142857143 0.19047619047619047 105
Some classes need readResolve 0.7662337662337663 0.11688311688311688 0.11688311688311688 77
ThreadsYesNoUndecidedVotes
Always shut down an ExecutorService 0.7381756756756757 0.11317567567567567 0.14864864864864866 592
Avoid ThreadGroup 0.5662650602409639 0.24096385542168675 0.1927710843373494 166
Data integrity first 0.7218934911242604 0.10650887573964497 0.17159763313609466 169
Document thread safety 0.7291666666666666 0.16666666666666666 0.10416666666666667 48
Dump thread information 0.8214285714285714 0.14285714285714285 0.03571428571428571 28
Handle InterruptedException 0.639344262295082 0.16393442622950818 0.19672131147540983 61
Launch thread is just another user thread 0.8461538461538461 0.07692307692307693 0.07692307692307693 39
Objects communicating across threads 0.6884057971014492 0.17391304347826086 0.13768115942028986 138
Perform N tasks in parallel 0.603399433427762 0.1813031161473088 0.21529745042492918 353
Prefer modern libraries for concurrency 0.9523809523809523 0.047619047619047616 0.0 21
Query host for the number of processors 0.8918918918918919 0.08108108108108109 0.02702702702702703 37
Read-write locks 0.7129629629629629 0.12962962962962962 0.1574074074074074 108
Remember the types of intrinsic lock 0.7972027972027972 0.10839160839160839 0.0944055944055944 286
Schedule periodic tasks 0.656575682382134 0.1965260545905707 0.14689826302729528 2015
Stop threads through cooperation 0.6405228758169934 0.28104575163398693 0.0784313725490196 153
Synchronize access to mutable fields 0.5678391959798995 0.27638190954773867 0.15577889447236182 199
Synchronized is implementation detail 0.625 0.23958333333333334 0.13541666666666666 96
Thread priorities are not portable 0.66 0.18 0.16 50
Use finally to unlock 0.813953488372093 0.11627906976744186 0.06976744186046512 43
© 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 -