Poll Summary

Number Of Votes Cast
91375
Overall Acceptance Rates
Choice Number Percentage
Yes 57902 0.6336744186046511
No 20567 0.22508344733242133
Undecided 12906 0.1412421340629275

Servlets and JSPsYesNoUndecidedVotes
A Web App Framework - WEB4J 0.6183110367892977 0.1793478260869565 0.20234113712374582 2392
Always maintain HttpSessions 0.7245508982035929 0.16167664670658682 0.11377245508982035 167
Beware multilingual submit buttons 0.6424581005586593 0.2011173184357542 0.1564245810055866 179
Beware of common hacks 0.8444444444444444 0.07407407407407407 0.08148148148148149 135
Beware of custom cookies 0.7711864406779662 0.0847457627118644 0.1440677966101695 118
Beware of doubly escaped ampersands 0.7721518987341772 0.12658227848101267 0.10126582278481013 79
Beware of URL rewriting 0.6329787234042553 0.2127659574468085 0.15425531914893617 188
Choose form validation style carefully 0.72 0.176 0.104 125
Consider Controllers for redirects 0.5116279069767442 0.23255813953488372 0.2558139534883721 43
Do not synchronize doGet, doPost 0.6912832929782082 0.19491525423728814 0.11380145278450363 826
Emit flexible URLs 0.7428571428571429 0.07142857142857142 0.18571428571428572 70
Escape special characters 0.5813186813186814 0.2978021978021978 0.12087912087912088 910
Forward versus redirect 0.717032967032967 0.13873626373626374 0.14423076923076922 728
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.7961783439490446 0.10191082802547771 0.10191082802547771 157
Measure web app performance 0.8606965174129353 0.07960199004975124 0.05970149253731343 201
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.45794392523364486 0.34579439252336447 0.19626168224299065 107
Prefer JSTL tags 0.7416267942583732 0.14832535885167464 0.11004784688995216 209
Prefer UTF-8 in all layers 0.7791411042944786 0.09815950920245399 0.12269938650306748 163
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.680952380952381 0.18571428571428572 0.13333333333333333 210
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.7410071942446043 0.12949640287769784 0.12949640287769784 139
Struts seems mediocre 0.44339622641509435 0.38207547169811323 0.17452830188679244 212
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.7007874015748031 0.1889763779527559 0.11023622047244094 127
Use extensions for fine-grained security 0.5490196078431373 0.3333333333333333 0.11764705882352941 51
Use Model-View-Controller framework 0.8942598187311178 0.03323262839879154 0.07250755287009064 331
Use templates to standardize layout 0.4915254237288136 0.3728813559322034 0.13559322033898305 59
Validate email addresses 0.4358974358974359 0.4128205128205128 0.15128205128205127 390
Validate generated HTML 0.7094017094017094 0.150997150997151 0.1396011396011396 351
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.6892523364485982 0.16121495327102803 0.14953271028037382 428
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.4558139534883721 0.2930232558139535 0.25116279069767444 215
Preferences dialogs 0.5142857142857142 0.14285714285714285 0.34285714285714286 35
Provide an uncaught exception handler 0.6148648648648649 0.20270270270270271 0.18243243243243243 148
Render table cells 0.6603174603174603 0.18095238095238095 0.15873015873015872 315
Sort table rows 0.45977011494252873 0.28735632183908044 0.25287356321839083 87
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.3382352941176471 0.47794117647058826 0.18382352941176472 136
Using JavaHelp 0.5346534653465347 0.297029702970297 0.16831683168316833 101
Using preferences 0.4583333333333333 0.3055555555555556 0.2361111111111111 72
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.4192139737991266 0.32532751091703055 0.2554585152838428 458
Avoid empty catch blocks 0.8168168168168168 0.11411411411411411 0.06906906906906907 333
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.5172205438066465 0.27794561933534745 0.20483383685800605 1655
Exception translation 0.920863309352518 0.050359712230215826 0.02877697841726619 139
Exceptions and control flow 0.6931216931216931 0.164021164021164 0.14285714285714285 189
Finally and catch 0.6625222024866785 0.19715808170515098 0.14031971580817051 563
Javadoc all exceptions 0.5798816568047337 0.23076923076923078 0.1893491124260355 169
Pass all pertinent data to exceptions 0.9465648854961832 0.015267175572519083 0.03816793893129771 131
Stack trace as String 0.7611940298507462 0.15061058344640435 0.08819538670284939 737
Use template for repeated try-catch 0.6391752577319587 0.10309278350515463 0.25773195876288657 97
Input-OutputYesNoUndecidedVotes
Always close streams 0.7408376963350786 0.14659685863874344 0.112565445026178 382
Buffering usually appropriate 0.8589743589743589 0.05128205128205128 0.08974358974358974 78
Console input 0.5250836120401338 0.3010033444816054 0.17391304347826086 299
Copy a file 0.6666666666666666 0.23015873015873015 0.10317460317460317 126
Reading and writing binary files 0.46839080459770116 0.28448275862068967 0.2471264367816092 348
Reading and writing Serializable objects 0.5643564356435643 0.26485148514851486 0.1707920792079208 404
Reading and writing text files 0.6065015479876161 0.22476780185758513 0.16873065015479877 3230
DatabasesYesNoUndecidedVotes
Business identifiers as String 0.8253012048192772 0.10843373493975904 0.06626506024096386 332
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.6990291262135923 0.17475728155339806 0.1262135922330097 103
Consider wrapper classes for optional data 0.7777777777777778 0.125 0.09722222222222222 72
Data access objects 0.6338983050847458 0.1864406779661017 0.17966101694915254 295
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.8769230769230769 0.06153846153846154 0.06153846153846154 65
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.8072687224669604 0.09140969162995595 0.1013215859030837 908
Encapsulate collections 0.8186274509803921 0.06372549019607843 0.11764705882352941 204
Iterate without an index 0.7713414634146342 0.17073170731707318 0.057926829268292686 328
Prefer Collections over older classes 0.8320610687022901 0.05343511450381679 0.11450381679389313 131
Two ways of using Iterator 0.6046365914786967 0.243734335839599 0.15162907268170425 1596
Use for-each liberally 0.7633587786259542 0.15267175572519084 0.08396946564885496 262
Use interface references to Collections 0.7086614173228346 0.18110236220472442 0.11023622047244094 127
Use standard Collections 0.8291457286432161 0.06030150753768844 0.11055276381909548 199
Overriding Object MethodsYesNoUndecidedVotes
Avoid clone 0.41847826086956524 0.34782608695652173 0.23369565217391305 552
Implementing compareTo 0.5023923444976076 0.33253588516746413 0.16507177033492823 418
Implementing equals 0.5873493975903614 0.2740963855421687 0.13855421686746988 332
Implementing hashCode 0.5526992287917738 0.26735218508997427 0.17994858611825193 389
Implementing toString 0.49767441860465117 0.3023255813953488 0.2 430
Never rely on finalize 0.7244897959183674 0.16326530612244897 0.11224489795918367 98
Common TasksYesNoUndecidedVotes
Arrays as String 0.48484848484848486 0.3434343434343434 0.1717171717171717 297
Clipboard copy and paste 0.7708113804004215 0.13751317175974712 0.0916754478398314 1898
Command line operations 0.46273291925465837 0.38509316770186336 0.15217391304347827 322
Compare and sort Strings 0.5128205128205128 0.33974358974358976 0.14743589743589744 312
Copy an array 0.5823170731707317 0.29573170731707316 0.12195121951219512 656
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.6070646841271039 0.2651520869499585 0.1277832289229376 13249
Get database connection 0.5491143317230274 0.286634460547504 0.1642512077294686 1242
Get size of object in memory 0.3894736842105263 0.4368421052631579 0.1736842105263158 380
Implement code tables 0.5833333333333334 0.21666666666666667 0.2 60
Internationalization 0.5066666666666667 0.29333333333333333 0.2 75
Logging messages 0.6007509386733417 0.2284105131414268 0.17083854818523153 1598
Measure application performance 0.7704918032786885 0.13114754098360656 0.09836065573770492 61
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.6058823529411764 0.2161764705882353 0.17794117647058824 680
Pattern-match lines of a file 0.5645756457564576 0.2767527675276753 0.15867158671586715 271
Read jar version information 0.5229357798165137 0.3669724770642202 0.11009174311926606 109
Recovering resources 0.8611111111111112 0.08333333333333333 0.05555555555555555 36
Recursive file listing 0.7321428571428571 0.1625 0.10535714285714286 1120
Replace a substring 0.585 0.2975 0.1175 400
Representing money 0.7430683918669131 0.11829944547134935 0.13863216266173753 541
Send an email 0.545668549905838 0.24246704331450095 0.211864406779661 2124
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.6262019230769231 0.20793269230769232 0.1658653846153846 832
Immutable objects 0.8098307816277196 0.09427880741337631 0.0958904109589041 1241
Lazy initialization 0.7524752475247525 0.12871287128712872 0.1188118811881188 202
Model Objects 0.6259541984732825 0.16030534351145037 0.21374045801526717 131
Plugin Factory 0.7428571428571429 0.08571428571428572 0.17142857142857143 35
Private constructor 0.7330462863293864 0.14531754574811626 0.1216361679224973 929
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.6016949152542372 0.2457627118644068 0.15254237288135594 118
Common PracticesYesNoUndecidedVotes
Avoid basic style errors 0.856 0.072 0.072 125
Avoid raw types 0.7509727626459144 0.16731517509727625 0.08171206225680934 257
Beware of instanceof operator 0.6171875 0.23020833333333332 0.15260416666666668 1920
Class for constants 0.6371951219512195 0.22967479674796748 0.133130081300813 984
Construct classes from the outside in 0.9166666666666666 0.05555555555555555 0.027777777777777776 72
Do not break portability 0.7532467532467533 0.18181818181818182 0.06493506493506493 77
Don't declare local variables before use 0.5606557377049181 0.25901639344262295 0.18032786885245902 305
Fields should usually be private 0.6564885496183206 0.1984732824427481 0.1450381679389313 131
Interface for constants 0.3258426966292135 0.5314606741573034 0.14269662921348314 890
Know the core libraries 0.7983870967741935 0.08870967741935484 0.11290322580645161 124
Minimize ripple effects 0.8670886075949367 0.03164556962025317 0.10126582278481013 158
Naming conventions 0.3333333333333333 0.5866666666666667 0.08 375
Nest classes with care 0.5714285714285714 0.2857142857142857 0.14285714285714285 21
Output parameters 0.3933649289099526 0.3933649289099526 0.2132701421800948 211
Separate public and private members 0.7422680412371134 0.16494845360824742 0.09278350515463918 97
String concatenation does not scale 0.8520710059171598 0.09467455621301775 0.05325443786982249 169
Tag or marker interfaces 0.6505576208178439 0.18587360594795538 0.16356877323420074 269
Uncommon classes need explicit imports 0.773109243697479 0.13445378151260504 0.09243697478991597 119
Use @Override liberally 0.8309278350515464 0.088659793814433 0.08041237113402062 485
Use final liberally 0.6049046321525886 0.22752043596730245 0.167574931880109 734
Use javadoc liberally 0.743455497382199 0.14136125654450263 0.11518324607329843 191
Use static imports rarely 0.573076923076923 0.2948717948717949 0.13205128205128205 780
Use System.exit with care 0.6682464454976303 0.18641390205371247 0.14533965244865718 633
Use Version Control tools 0.6666666666666666 0.125 0.20833333333333334 72
Validate method arguments 0.6259842519685039 0.2125984251968504 0.16141732283464566 254
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.6332288401253918 0.22884012539184953 0.13793103448275862 319
Beware of Byte Order Marks 0.6842105263157895 0.2631578947368421 0.05263157894736842 38
Beware of DecimalFormat 0.44502617801047123 0.31413612565445026 0.24083769633507854 191
Beware of floating point numbers 0.8837209302325582 0.07751937984496124 0.03875968992248062 129
Clarifying method 0.8921568627450981 0.06862745098039216 0.0392156862745098 102
Coding conventions 0.8543689320388349 0.06796116504854369 0.07766990291262135 103
Compile regular expressions once 0.7619047619047619 0.15873015873015872 0.07936507936507936 63
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.484375 0.375 0.140625 64
Conventional name for return value 0.7181208053691275 0.18791946308724833 0.09395973154362416 149
Defensive copying 0.8643410852713178 0.06201550387596899 0.07364341085271318 516
Design by Contract 0.8055555555555556 0.09444444444444444 0.1 180
Don't use tab characters 0.3546666666666667 0.584 0.06133333333333333 375
Extra space in argument list 0.1903914590747331 0.7508896797153025 0.05871886120996441 562
Generating unique IDs 0.5672937771345875 0.27243125904486254 0.16027496382054993 2764
Include 'from', exclude 'to' 0.7868852459016393 0.11475409836065574 0.09836065573770492 61
Multiple return statements 0.5485148514851486 0.3326732673267327 0.1188118811881188 505
Overloading can be tricky 0.7706422018348624 0.14678899082568808 0.08256880733944955 109
Package by feature, not layer 0.7256970610399397 0.11981914091936699 0.1544837980406933 1327
Passwords never in clear text 0.6580645161290323 0.17419354838709677 0.16774193548387098 155
Prefer empty items to null ones 0.6838407494145199 0.20374707259953162 0.11241217798594848 427
Quote dynamic text when logging 0.82 0.12 0.06 100
Self-encapsulate fields 0.6410256410256411 0.1641025641025641 0.19487179487179487 195
Structs are occasionally useful 0.6784452296819788 0.15901060070671377 0.1625441696113074 283
Test using main method 0.375 0.5234375 0.1015625 128
Try alternatives to ResourceBundle 0.373134328358209 0.31343283582089554 0.31343283582089554 67
Use a fake system clock 0.5625 0.2375 0.2 160
Use a testing framework (JUnit) 0.8333333333333334 0.1 0.06666666666666667 120
Use Ant for build scripts 0.7362637362637363 0.14652014652014653 0.11721611721611722 273
Use boxing with care 0.6650943396226415 0.21226415094339623 0.12264150943396226 212
Use enums to restrict arguments 0.7133333333333334 0.12666666666666668 0.16 150
Validate state with class invariants 0.6 0.25333333333333335 0.14666666666666667 75
Validation belongs in a Model Object 0.5804195804195804 0.3006993006993007 0.11888111888111888 143
AssertionsYesNoUndecidedVotes
Assert is for private arguments only 0.8223684210526315 0.13157894736842105 0.046052631578947366 152
Assert use cases 0.3644859813084112 0.43457943925233644 0.20093457943925233 214
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.6217162872154116 0.19614711033274956 0.18213660245183888 571
Beware of mistaken field redeclares 0.8484848484848485 0.09090909090909091 0.06060606060606061 33
Construct Object using class name 0.5377777777777778 0.30666666666666664 0.15555555555555556 225
Constructors in general 0.6415094339622641 0.2641509433962264 0.09433962264150944 53
Constructors shouldn't call overridables 0.5967741935483871 0.24731182795698925 0.15591397849462366 186
Constructors shouldn't start threads 0.7272727272727273 0.16363636363636364 0.10909090909090909 55
Copy constructors 0.6396848137535817 0.22206303724928367 0.13825214899713467 1396
Don't pass 'this' out of a constructor 0.6428571428571429 0.21428571428571427 0.14285714285714285 70
Initializing fields to 0-false-null is redundant 0.6742424242424242 0.22727272727272727 0.09848484848484848 396
SerializationYesNoUndecidedVotes
Implementing Serializable 0.6296992481203008 0.18890977443609022 0.18139097744360902 1064
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.7423014586709886 0.11345218800648298 0.14424635332252836 617
Avoid ThreadGroup 0.5688622754491018 0.23952095808383234 0.19161676646706588 167
Data integrity first 0.7235294117647059 0.10588235294117647 0.17058823529411765 170
Document thread safety 0.7291666666666666 0.16666666666666666 0.10416666666666667 48
Dump thread information 0.8214285714285714 0.14285714285714285 0.03571428571428571 28
Handle InterruptedException 0.6290322580645161 0.16129032258064516 0.20967741935483872 62
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.5906593406593407 0.18956043956043955 0.21978021978021978 364
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.7931034482758621 0.11379310344827587 0.09310344827586207 290
Schedule periodic tasks 0.6551554020720276 0.19585594474592993 0.14898865318204244 2027
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.8181818181818182 0.11363636363636363 0.06818181818181818 44
© 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 -