Poll Summary

Number Of Votes Cast
91621
Overall Acceptance Rates
Choice Number Percentage
Yes 58042 0.6335010532519837
No 20633 0.22519946300520624
Undecided 12946 0.14129948374281007

Servlets and JSPsYesNoUndecidedVotes
A Web App Framework - WEB4J 0.6185910796165068 0.17924135056273446 0.20216756982075865 2399
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.5 0.25 0.25 44
Do not synchronize doGet, doPost 0.6916565900846433 0.1946795646916566 0.11366384522370013 827
Emit flexible URLs 0.7428571428571429 0.07142857142857142 0.18571428571428572 70
Escape special characters 0.5817782656421515 0.29747530186608123 0.1207464324917673 911
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.6637168141592921 0.1504424778761062 0.18584070796460178 113
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.7373737373737373 0.1414141414141414 0.12121212121212122 99
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.6876456876456877 0.16317016317016317 0.14918414918414918 429
Actions 0.7070707070707071 0.20202020202020202 0.09090909090909091 99
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.31547619047619047 0.40476190476190477 0.27976190476190477 168
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.5816993464052288 0.2549019607843137 0.16339869281045752 153
Observers and listeners 0.4537037037037037 0.2962962962962963 0.25 216
Preferences dialogs 0.5277777777777778 0.1388888888888889 0.3333333333333333 36
Provide an uncaught exception handler 0.610738255033557 0.2080536912751678 0.18120805369127516 149
Render table cells 0.6540880503144654 0.18553459119496854 0.16037735849056603 318
Sort table rows 0.45454545454545453 0.29545454545454547 0.25 88
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.7906976744186046 0.11627906976744186 0.09302325581395349 43
Timers 0.3382352941176471 0.47794117647058826 0.18382352941176472 136
Using JavaHelp 0.5346534653465347 0.297029702970297 0.16831683168316833 101
Using preferences 0.4657534246575342 0.3013698630136986 0.2328767123287671 73
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.41830065359477125 0.32679738562091504 0.2549019607843137 459
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.5174698795180723 0.27710843373493976 0.20542168674698796 1660
Exception translation 0.9214285714285714 0.05 0.02857142857142857 140
Exceptions and control flow 0.6947368421052632 0.1631578947368421 0.14210526315789473 190
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.946969696969697 0.015151515151515152 0.03787878787878788 132
Stack trace as String 0.7611940298507462 0.15061058344640435 0.08819538670284939 737
Use template for repeated try-catch 0.6428571428571429 0.10204081632653061 0.25510204081632654 98
Input-OutputYesNoUndecidedVotes
Always close streams 0.741514360313316 0.1462140992167102 0.1122715404699739 383
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.46875 0.2869318181818182 0.24431818181818182 352
Reading and writing Serializable objects 0.562962962962963 0.26666666666666666 0.17037037037037037 405
Reading and writing text files 0.6060606060606061 0.22510822510822512 0.16883116883116883 3234
DatabasesYesNoUndecidedVotes
Business identifiers as String 0.8228228228228228 0.10810810810810811 0.06906906906906907 333
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.8056768558951966 0.0927947598253275 0.10152838427947598 916
Encapsulate collections 0.8186274509803921 0.06372549019607843 0.11764705882352941 204
Iterate without an index 0.7720364741641338 0.1702127659574468 0.057750759878419454 329
Prefer Collections over older classes 0.8320610687022901 0.05343511450381679 0.11450381679389313 131
Two ways of using Iterator 0.605 0.24375 0.15125 1600
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.41696750902527074 0.3483754512635379 0.23465703971119134 554
Implementing compareTo 0.5035799522673031 0.3317422434367542 0.16467780429594273 419
Implementing equals 0.5873493975903614 0.2740963855421687 0.13855421686746988 332
Implementing hashCode 0.5526992287917738 0.26735218508997427 0.17994858611825193 389
Implementing toString 0.4988399071925754 0.30162412993039445 0.19953596287703015 431
Never rely on finalize 0.7244897959183674 0.16326530612244897 0.11224489795918367 98
Common TasksYesNoUndecidedVotes
Arrays as String 0.4865771812080537 0.3422818791946309 0.17114093959731544 298
Clipboard copy and paste 0.770241850683491 0.13722397476340695 0.09253417455310199 1902
Command line operations 0.4613003095975232 0.38699690402476783 0.15170278637770898 323
Compare and sort Strings 0.5111821086261981 0.33865814696485624 0.1501597444089457 313
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.6067288875508053 0.26546740930302576 0.1278037031461689 13286
Get database connection 0.5482315112540193 0.2869774919614148 0.1647909967845659 1244
Get size of object in memory 0.3894736842105263 0.4368421052631579 0.1736842105263158 380
Implement code tables 0.5901639344262295 0.21311475409836064 0.19672131147540983 61
Internationalization 0.5066666666666667 0.29333333333333333 0.2 75
Logging messages 0.600375234521576 0.22889305816135083 0.17073170731707318 1599
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.5835411471321695 0.2967581047381546 0.11970074812967581 401
Representing money 0.7435424354243543 0.11808118081180811 0.13837638376383765 542
Send an email 0.5450704225352113 0.24366197183098592 0.2112676056338028 2130
Time execution speed 0.7194244604316546 0.2014388489208633 0.07913669064748201 139
Common Design PatternsYesNoUndecidedVotes
Abstract Factory 0.7034883720930233 0.16279069767441862 0.13372093023255813 172
Command objects 0.5909090909090909 0.18181818181818182 0.22727272727272727 22
Factory methods 0.6263473053892216 0.20718562874251498 0.1664670658682635 835
Immutable objects 0.8093322606596943 0.09412711182622686 0.09654062751407884 1243
Lazy initialization 0.75 0.12745098039215685 0.12254901960784313 204
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.7258566978193146 0.17445482866043613 0.09968847352024922 321
Template method 0.7258064516129032 0.20967741935483872 0.06451612903225806 62
Type-Safe Enumerations 0.7960199004975125 0.11194029850746269 0.09203980099502487 402
Wrapper (Decorator) 0.6033057851239669 0.2396694214876033 0.15702479338842976 121
Common PracticesYesNoUndecidedVotes
Avoid basic style errors 0.8571428571428571 0.07142857142857142 0.07142857142857142 126
Avoid raw types 0.7538461538461538 0.16538461538461538 0.08076923076923077 260
Beware of instanceof operator 0.6181818181818182 0.2296103896103896 0.1522077922077922 1925
Class for constants 0.6376518218623481 0.22874493927125505 0.13360323886639677 988
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.5620915032679739 0.2581699346405229 0.17973856209150327 306
Fields should usually be private 0.6564885496183206 0.1984732824427481 0.1450381679389313 131
Interface for constants 0.3258678611422172 0.5307950727883539 0.1433370660694289 893
Know the core libraries 0.7983870967741935 0.08870967741935484 0.11290322580645161 124
Minimize ripple effects 0.8625 0.03125 0.10625 160
Naming conventions 0.3351063829787234 0.5851063829787234 0.0797872340425532 376
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.6051560379918589 0.22795115332428764 0.16689280868385345 737
Use javadoc liberally 0.7447916666666666 0.140625 0.11458333333333333 192
Use static imports rarely 0.5741687979539642 0.29411764705882354 0.13171355498721227 782
Use System.exit with care 0.668769716088328 0.1861198738170347 0.14511041009463724 634
Use Version Control tools 0.6712328767123288 0.1232876712328767 0.2054794520547945 73
Validate method arguments 0.6274509803921569 0.21176470588235294 0.1607843137254902 255
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.4427083333333333 0.3177083333333333 0.23958333333333334 192
Beware of floating point numbers 0.8837209302325582 0.07751937984496124 0.03875968992248062 129
Clarifying method 0.8921568627450981 0.06862745098039216 0.0392156862745098 102
Coding conventions 0.8557692307692307 0.0673076923076923 0.07692307692307693 104
Compile regular expressions once 0.7619047619047619 0.15873015873015872 0.07936507936507936 63
Conditional compile 0.5020576131687243 0.3868312757201646 0.1111111111111111 243
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.8656429942418427 0.061420345489443376 0.07293666026871401 521
Design by Contract 0.8066298342541437 0.09392265193370165 0.09944751381215469 181
Don't use tab characters 0.35185185185185186 0.582010582010582 0.06613756613756613 378
Extra space in argument list 0.1903914590747331 0.7508896797153025 0.05871886120996441 562
Generating unique IDs 0.5667506297229219 0.2727599856063332 0.16048938467074486 2779
Include 'from', exclude 'to' 0.7868852459016393 0.11475409836065574 0.09836065573770492 61
Multiple return statements 0.550098231827112 0.3320235756385069 0.11787819253438114 509
Overloading can be tricky 0.7706422018348624 0.14678899082568808 0.08256880733944955 109
Package by feature, not layer 0.7256371814092953 0.1199400299850075 0.15442278860569716 1334
Passwords never in clear text 0.6580645161290323 0.17419354838709677 0.16774193548387098 155
Prefer empty items to null ones 0.6822429906542056 0.205607476635514 0.11214953271028037 428
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.6769759450171822 0.15807560137457044 0.16494845360824742 291
Test using main method 0.3769230769230769 0.5230769230769231 0.1 130
Try alternatives to ResourceBundle 0.373134328358209 0.31343283582089554 0.31343283582089554 67
Use a fake system clock 0.5590062111801242 0.2422360248447205 0.19875776397515527 161
Use a testing framework (JUnit) 0.8333333333333334 0.1 0.06666666666666667 120
Use Ant for build scripts 0.7372262773722628 0.145985401459854 0.11678832116788321 274
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.6223776223776224 0.1958041958041958 0.18181818181818182 572
Beware of mistaken field redeclares 0.8484848484848485 0.09090909090909091 0.06060606060606061 33
Construct Object using class name 0.5330396475770925 0.31277533039647576 0.15418502202643172 227
Constructors in general 0.6415094339622641 0.2641509433962264 0.09433962264150944 53
Constructors shouldn't call overridables 0.5989304812834224 0.24598930481283424 0.15508021390374332 187
Constructors shouldn't start threads 0.7272727272727273 0.16363636363636364 0.10909090909090909 55
Copy constructors 0.6407142857142857 0.22142857142857142 0.13785714285714284 1400
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.6300469483568075 0.18873239436619718 0.1812206572769953 1065
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.7400318979266348 0.11642743221690591 0.14354066985645933 627
Avoid ThreadGroup 0.5688622754491018 0.23952095808383234 0.19161676646706588 167
Data integrity first 0.7192982456140351 0.1111111111111111 0.1695906432748538 171
Document thread safety 0.7291666666666666 0.16666666666666666 0.10416666666666667 48
Dump thread information 0.8275862068965517 0.13793103448275862 0.034482758620689655 29
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.5885558583106267 0.1907356948228883 0.22070844686648503 367
Prefer modern libraries for concurrency 0.9090909090909091 0.045454545454545456 0.045454545454545456 22
Query host for the number of processors 0.8947368421052632 0.07894736842105263 0.02631578947368421 38
Read-write locks 0.7064220183486238 0.12844036697247707 0.1651376146788991 109
Remember the types of intrinsic lock 0.7952218430034129 0.11262798634812286 0.09215017064846416 293
Schedule periodic tasks 0.6545096106456383 0.19615574174470182 0.14933464760965992 2029
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.6288659793814433 0.23711340206185566 0.13402061855670103 97
Thread priorities are not portable 0.66 0.18 0.16 50
Use finally to unlock 0.8 0.1111111111111111 0.08888888888888889 45
© 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 -