Poll Summary

Number Of Votes Cast
85283
Overall Acceptance Rates
Choice Number Percentage
Yes 54211 0.6356600963849771
No 19199 0.22512106750466096
Undecided 11873 0.13921883611036198

Servlets and JSPsYesNoUndecidedVotes
A Web App Framework - WEB4J 0.6209419295839049 0.18061271147690902 0.1984453589391861 2187
Always maintain HttpSessions 0.7278481012658228 0.17088607594936708 0.10126582278481013 158
Beware multilingual submit buttons 0.6374269005847953 0.2046783625730994 0.15789473684210525 171
Beware of common hacks 0.84375 0.078125 0.078125 128
Beware of custom cookies 0.7767857142857143 0.07142857142857142 0.15178571428571427 112
Beware of doubly escaped ampersands 0.7692307692307693 0.1282051282051282 0.10256410256410256 78
Beware of URL rewriting 0.6243093922651933 0.22099447513812154 0.15469613259668508 181
Choose form validation style carefully 0.7131147540983607 0.18032786885245902 0.10655737704918032 122
Consider Controllers for redirects 0.475 0.25 0.275 40
Do not synchronize doGet, doPost 0.6917293233082706 0.19674185463659147 0.11152882205513784 798
Emit flexible URLs 0.7424242424242424 0.07575757575757576 0.18181818181818182 66
Escape special characters 0.5871040723981901 0.29638009049773756 0.1165158371040724 884
Forward versus redirect 0.7203994293865906 0.1355206847360913 0.14407988587731813 701
JSPs should contain only presentation logic 0.8766519823788547 0.06167400881057269 0.06167400881057269 227
Loss of data during restart 0.6761904761904762 0.14285714285714285 0.18095238095238095 105
Manage sessions closely 0.8026315789473685 0.10526315789473684 0.09210526315789473 152
Measure web app performance 0.8638743455497382 0.07853403141361257 0.05759162303664921 191
Minimize site response time 0.7446808510638298 0.1276595744680851 0.1276595744680851 94
Parse parameters into domain objects 0.4 0.32 0.28 25
Pre-populate forms 0.46 0.35 0.19 100
Prefer JSTL tags 0.7438423645320197 0.1477832512315271 0.10837438423645321 203
Prefer UTF-8 in all layers 0.7935483870967742 0.0967741935483871 0.10967741935483871 155
Prevent self-linking 0.39285714285714285 0.5357142857142857 0.07142857142857142 28
Refactor large Controllers 0.7894736842105263 0.10526315789473684 0.10526315789473684 19
Repel invalid requests 0.76 0.12 0.12 25
Reuse login page for errors 0.6887755102040817 0.17857142857142858 0.1326530612244898 196
Send trouble-ticket emails 0.5454545454545454 0.18181818181818182 0.2727272727272727 22
Serve binary content 0.5949367088607594 0.21518987341772153 0.189873417721519 79
Session-scope objects often Serializable 0.7421875 0.1328125 0.125 128
Struts seems mediocre 0.4326923076923077 0.3894230769230769 0.1778846153846154 208
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.7327586206896551 0.1724137931034483 0.09482758620689655 116
Use extensions for fine-grained security 0.5306122448979592 0.3469387755102041 0.12244897959183673 49
Use Model-View-Controller framework 0.8930817610062893 0.03459119496855346 0.07232704402515723 318
Use templates to standardize layout 0.4727272727272727 0.4 0.12727272727272726 55
Validate email addresses 0.4348958333333333 0.4166666666666667 0.1484375 384
Validate generated HTML 0.7168674698795181 0.14759036144578314 0.1355421686746988 332
Web usability guidelines 0.8378378378378378 0.05405405405405406 0.10810810810810811 37
Wrap file upload requests 0.4696969696969697 0.25757575757575757 0.2727272727272727 66
SwingYesNoUndecidedVotes
A Swing App - StocksMonitor 0.684863523573201 0.16129032258064516 0.15384615384615385 403
Actions 0.6979166666666666 0.20833333333333334 0.09375 96
Align menu items 0.6631578947368421 0.21052631578947367 0.12631578947368421 95
Change theme 0.6758620689655173 0.18620689655172415 0.13793103448275862 145
Consider JGoodies Forms for layouts 0.7033898305084746 0.07627118644067797 0.22033898305084745 118
Don't bury dialogs 0.6666666666666666 0.14814814814814814 0.18518518518518517 27
Don't subclass JDialog or JFrame 0.30246913580246915 0.41358024691358025 0.2839506172839506 162
Filter table rows 0.5 0.3888888888888889 0.1111111111111111 18
Input dialogs 0.5238095238095238 0.2619047619047619 0.21428571428571427 42
Launch other applications 0.7241379310344828 0.27586206896551724 0.0 29
Layout Managers 0.6330645161290323 0.22983870967741934 0.13709677419354838 248
Look and Feel guidelines 0.8541666666666666 0.08333333333333333 0.0625 48
Minimal Swing application 0.6046511627906976 0.23255813953488372 0.16279069767441862 129
Observers and listeners 0.45588235294117646 0.29411764705882354 0.25 204
Preferences dialogs 0.46875 0.15625 0.375 32
Provide an uncaught exception handler 0.6060606060606061 0.21212121212121213 0.18181818181818182 132
Render table cells 0.6677740863787376 0.16943521594684385 0.16279069767441862 301
Sort table rows 0.44155844155844154 0.2987012987012987 0.2597402597402597 77
Splash screen 0.5668789808917197 0.3057324840764331 0.12738853503184713 314
Standardized dialogs 0.5555555555555556 0.3333333333333333 0.1111111111111111 27
Swing in general 0.7714285714285715 0.08571428571428572 0.14285714285714285 35
Swing threads 0.5636363636363636 0.23030303030303031 0.20606060606060606 165
Swing utility tasks 0.775 0.125 0.1 40
Timers 0.32575757575757575 0.49242424242424243 0.18181818181818182 132
Using JavaHelp 0.5319148936170213 0.2872340425531915 0.18085106382978725 94
Using preferences 0.44776119402985076 0.31343283582089554 0.23880597014925373 67
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.4375 0.3225 0.24 400
Avoid empty catch blocks 0.8264984227129337 0.11041009463722397 0.06309148264984227 317
Be specific in throws clause 0.6037037037037037 0.32592592592592595 0.07037037037037037 270
Beware of unknown root causes 0.36666666666666664 0.26666666666666666 0.36666666666666664 30
Checked versus unchecked exceptions 0.5150564617314931 0.2810539523212045 0.2038895859473024 1594
Exception translation 0.9140625 0.0546875 0.03125 128
Exceptions and control flow 0.6976744186046512 0.1569767441860465 0.14534883720930233 172
Finally and catch 0.6612318840579711 0.19746376811594202 0.14130434782608695 552
Javadoc all exceptions 0.5629139072847682 0.23841059602649006 0.1986754966887417 151
Pass all pertinent data to exceptions 0.944 0.016 0.04 125
Stack trace as String 0.7651933701657458 0.1477900552486188 0.08701657458563536 724
Use template for repeated try-catch 0.6547619047619048 0.11904761904761904 0.2261904761904762 84
Input-OutputYesNoUndecidedVotes
Always close streams 0.7478753541076487 0.14447592067988668 0.10764872521246459 353
Buffering usually appropriate 0.8611111111111112 0.05555555555555555 0.08333333333333333 72
Console input 0.5333333333333333 0.2982456140350877 0.16842105263157894 285
Copy a file 0.6728971962616822 0.22429906542056074 0.102803738317757 107
Reading and writing binary files 0.4899328859060403 0.2751677852348993 0.2348993288590604 298
Reading and writing Serializable objects 0.5736842105263158 0.26052631578947366 0.16578947368421051 380
Reading and writing text files 0.6058989645434578 0.2256040163162849 0.1684970191402573 3187
DatabasesYesNoUndecidedVotes
Business identifiers as String 0.8333333333333334 0.10130718954248366 0.06535947712418301 306
Connection pools 0.867595818815331 0.0627177700348432 0.06968641114982578 287
Consider data layer tools 0.5853658536585366 0.1951219512195122 0.21951219512195122 41
Consider using standard SQL 0.6868686868686869 0.18181818181818182 0.13131313131313133 99
Consider wrapper classes for optional data 0.7681159420289855 0.13043478260869565 0.10144927536231885 69
Data access objects 0.6428571428571429 0.19642857142857142 0.16071428571428573 280
Data exception wrapping 0.7241379310344828 0.15517241379310345 0.1206896551724138 58
Data is king 0.875 0.0625 0.0625 112
Don't perform basic SQL tasks in code 0.8591549295774648 0.08450704225352113 0.056338028169014086 71
Encapsulate connections 0.8 0.06666666666666667 0.13333333333333333 45
Keep SQL out of code 0.5368421052631579 0.32105263157894737 0.14210526315789473 190
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.8163265306122449 0.08801020408163265 0.09566326530612244 784
Encapsulate collections 0.8112244897959183 0.0663265306122449 0.12244897959183673 196
Iterate without an index 0.7738853503184714 0.17197452229299362 0.054140127388535034 314
Prefer Collections over older classes 0.8429752066115702 0.05785123966942149 0.09917355371900827 121
Two ways of using Iterator 0.6105769230769231 0.24107142857142858 0.14835164835164835 1456
Use for-each liberally 0.76 0.152 0.088 250
Use interface references to Collections 0.6974789915966386 0.19327731092436976 0.1092436974789916 119
Use standard Collections 0.8306010928961749 0.060109289617486336 0.1092896174863388 183
Overriding Object MethodsYesNoUndecidedVotes
Avoid clone 0.41947565543071164 0.3464419475655431 0.2340823970037453 534
Implementing compareTo 0.5038363171355499 0.33248081841432225 0.1636828644501279 391
Implementing equals 0.5917721518987342 0.27531645569620256 0.13291139240506328 316
Implementing hashCode 0.5555555555555556 0.2671957671957672 0.17724867724867724 378
Implementing toString 0.5 0.3062200956937799 0.1937799043062201 418
Never rely on finalize 0.7204301075268817 0.16129032258064516 0.11827956989247312 93
Common TasksYesNoUndecidedVotes
Arrays as String 0.47017543859649125 0.35789473684210527 0.17192982456140352 285
Clipboard copy and paste 0.7766776677667767 0.13366336633663367 0.08965896589658966 1818
Command line operations 0.4527027027027027 0.38513513513513514 0.16216216216216217 296
Compare and sort Strings 0.5140845070422535 0.3380281690140845 0.14788732394366197 284
Copy an array 0.5886970172684458 0.29356357927786497 0.11773940345368916 637
Determine if Strings are equal 0.6717267552182163 0.2409867172675522 0.0872865275142315 527
Examine bytecode 0.5111111111111111 0.37777777777777777 0.1111111111111111 45
Fetch web page and header 0.6444444444444445 0.20952380952380953 0.14603174603174604 315
Generate random numbers 0.6123586297328307 0.26298967382396327 0.12465169644320603 12202
Get database connection 0.5495867768595041 0.2834710743801653 0.1669421487603306 1210
Get size of object in memory 0.3961218836565097 0.4376731301939058 0.16620498614958448 361
Implement code tables 0.5740740740740741 0.2222222222222222 0.2037037037037037 54
Internationalization 0.5076923076923077 0.2923076923076923 0.2 65
Logging messages 0.6043737574552683 0.22597746852220013 0.16964877402253148 1509
Measure application performance 0.7719298245614035 0.14035087719298245 0.08771929824561403 57
Modernize old code 0.8813559322033898 0.06779661016949153 0.05084745762711865 59
Open file in native directory 0.5555555555555556 0.3333333333333333 0.1111111111111111 9
Parse text 0.6057838660578386 0.2176560121765601 0.1765601217656012 657
Pattern-match lines of a file 0.562992125984252 0.28346456692913385 0.15354330708661418 254
Read jar version information 0.5578947368421052 0.3473684210526316 0.09473684210526316 95
Recovering resources 0.8529411764705882 0.08823529411764706 0.058823529411764705 34
Recursive file listing 0.7320143884892086 0.1618705035971223 0.10611510791366907 1112
Replace a substring 0.5822784810126582 0.29873417721518986 0.1189873417721519 395
Representing money 0.746641074856046 0.11516314779270634 0.1381957773512476 521
Send an email 0.5525933107125546 0.23800290838584587 0.2094037809015996 2063
Time execution speed 0.706766917293233 0.21052631578947367 0.08270676691729323 133
Common Design PatternsYesNoUndecidedVotes
Abstract Factory 0.6987951807228916 0.16265060240963855 0.13855421686746988 166
Command objects 0.55 0.2 0.25 20
Factory methods 0.6229299363057325 0.21528662420382166 0.16178343949044585 785
Immutable objects 0.8127659574468085 0.09531914893617022 0.09191489361702128 1175
Lazy initialization 0.7580645161290323 0.13440860215053763 0.10752688172043011 186
Model Objects 0.6186440677966102 0.15254237288135594 0.2288135593220339 118
Plugin Factory 0.6896551724137931 0.10344827586206896 0.20689655172413793 29
Private constructor 0.7376681614349776 0.14237668161434977 0.11995515695067265 892
Singleton 0.7290322580645161 0.17096774193548386 0.1 310
Template method 0.711864406779661 0.22033898305084745 0.06779661016949153 59
Type-Safe Enumerations 0.8 0.10909090909090909 0.09090909090909091 385
Wrapper (Decorator) 0.5934065934065934 0.26373626373626374 0.14285714285714285 91
Common PracticesYesNoUndecidedVotes
Avoid basic style errors 0.8521739130434782 0.06956521739130435 0.0782608695652174 115
Avoid raw types 0.786046511627907 0.14418604651162792 0.06976744186046512 215
Beware of instanceof operator 0.6134271792095289 0.23280996210070384 0.1537628586897672 1847
Class for constants 0.6378504672897196 0.2371495327102804 0.125 856
Construct classes from the outside in 0.9117647058823529 0.058823529411764705 0.029411764705882353 68
Do not break portability 0.7466666666666667 0.18666666666666668 0.06666666666666667 75
Don't declare local variables before use 0.5547703180212014 0.26501766784452296 0.18021201413427562 283
Fields should usually be private 0.6554621848739496 0.21008403361344538 0.13445378151260504 119
Interface for constants 0.3208020050125313 0.543859649122807 0.13533834586466165 798
Know the core libraries 0.8017241379310345 0.08620689655172414 0.11206896551724138 116
Minimize ripple effects 0.8642857142857143 0.03571428571428571 0.1 140
Naming conventions 0.3342696629213483 0.5870786516853933 0.07865168539325842 356
Nest classes with care 0.5 0.3125 0.1875 16
Output parameters 0.39344262295081966 0.3879781420765027 0.2185792349726776 183
Separate public and private members 0.7191011235955056 0.1797752808988764 0.10112359550561797 89
String concatenation does not scale 0.8484848484848485 0.09696969696969697 0.05454545454545454 165
Tag or marker interfaces 0.6462882096069869 0.1965065502183406 0.1572052401746725 229
Uncommon classes need explicit imports 0.7678571428571429 0.13392857142857142 0.09821428571428571 112
Use @Override liberally 0.8322147651006712 0.09172259507829977 0.07606263982102908 447
Use final liberally 0.6027190332326284 0.2326283987915408 0.1646525679758308 662
Use javadoc liberally 0.7588235294117647 0.11764705882352941 0.12352941176470589 170
Use static imports rarely 0.5779685264663805 0.2861230329041488 0.13590844062947066 699
Use System.exit with care 0.6693944353518821 0.18657937806873978 0.14402618657937807 611
Use Version Control tools 0.6875 0.140625 0.171875 64
Validate method arguments 0.6271186440677966 0.22033898305084745 0.15254237288135594 236
Wisdom, not rules 0.9591836734693877 0.02040816326530612 0.02040816326530612 49
InheritanceYesNoUndecidedVotes
Consider composition instead of subclassing 0.7705882352941177 0.07647058823529412 0.15294117647058825 170
Designing for subclassing 0.7464788732394366 0.14084507042253522 0.11267605633802817 71
Overridable methods need special care 0.826530612244898 0.061224489795918366 0.11224489795918367 98
Remember styles of inheritance 0.9387755102040817 0.0 0.061224489795918366 49
More Common PracticesYesNoUndecidedVotes
Avoid null if possible 0.631578947368421 0.23355263157894737 0.13486842105263158 304
Beware of Byte Order Marks 0.6666666666666666 0.2727272727272727 0.06060606060606061 33
Beware of DecimalFormat 0.43575418994413406 0.31843575418994413 0.24581005586592178 179
Beware of floating point numbers 0.8833333333333333 0.08333333333333333 0.03333333333333333 120
Clarifying method 0.9148936170212766 0.05319148936170213 0.031914893617021274 94
Coding conventions 0.8636363636363636 0.045454545454545456 0.09090909090909091 88
Compile regular expressions once 0.7592592592592593 0.14814814814814814 0.09259259259259259 54
Conditional compile 0.5044642857142857 0.38392857142857145 0.11160714285714286 224
Consider code generators 0.75 0.14473684210526316 0.10526315789473684 76
Consider immutable forms for dates 0.4727272727272727 0.36363636363636365 0.16363636363636364 55
Conventional name for return value 0.7291666666666666 0.1875 0.08333333333333333 144
Defensive copying 0.8649237472766884 0.06318082788671024 0.0718954248366013 459
Design by Contract 0.8 0.09411764705882353 0.10588235294117647 170
Don't use tab characters 0.35514018691588783 0.5919003115264797 0.0529595015576324 321
Extra space in argument list 0.19012797074954296 0.7513711151736746 0.05850091407678245 547
Generating unique IDs 0.5768911055694098 0.2647547797173732 0.15835411471321695 2406
Include 'from', exclude 'to' 0.7894736842105263 0.12280701754385964 0.08771929824561403 57
Multiple return statements 0.55119825708061 0.32679738562091504 0.12200435729847495 459
Overloading can be tricky 0.78 0.15 0.07 100
Package by feature, not layer 0.7169811320754716 0.1320754716981132 0.1509433962264151 1060
Passwords never in clear text 0.6453900709219859 0.1773049645390071 0.1773049645390071 141
Prefer empty items to null ones 0.6788321167883211 0.20924574209245742 0.11192214111922141 411
Quote dynamic text when logging 0.8125 0.125 0.0625 96
Self-encapsulate fields 0.6402116402116402 0.1693121693121693 0.19047619047619047 189
Structs are occasionally useful 0.6784140969162996 0.16299559471365638 0.15859030837004406 227
Test using main method 0.3783783783783784 0.5135135135135135 0.10810810810810811 111
Try alternatives to ResourceBundle 0.3225806451612903 0.3387096774193548 0.3387096774193548 62
Use a fake system clock 0.5766423357664233 0.23357664233576642 0.1897810218978102 137
Use a testing framework (JUnit) 0.8347826086956521 0.09565217391304348 0.06956521739130435 115
Use Ant for build scripts 0.7340823970037453 0.149812734082397 0.11610486891385768 267
Use boxing with care 0.6767676767676768 0.20202020202020202 0.12121212121212122 198
Use enums to restrict arguments 0.7384615384615385 0.13076923076923078 0.13076923076923078 130
Validate state with class invariants 0.5909090909090909 0.24242424242424243 0.16666666666666666 66
Validation belongs in a Model Object 0.5984251968503937 0.2992125984251969 0.10236220472440945 127
AssertionsYesNoUndecidedVotes
Assert is for private arguments only 0.8206896551724138 0.1310344827586207 0.04827586206896552 145
Assert use cases 0.36585365853658536 0.4292682926829268 0.2048780487804878 205
Assertions in general 0.8571428571428571 0.14285714285714285 0.0 35
Force enabling of assertions 0.5614035087719298 0.2807017543859649 0.15789473684210525 57
ConstructorsYesNoUndecidedVotes
Avoid JavaBeans style of construction 0.6231343283582089 0.18470149253731344 0.1921641791044776 536
Beware of mistaken field redeclares 0.8333333333333334 0.1 0.06666666666666667 30
Construct Object using class name 0.539906103286385 0.3004694835680751 0.1596244131455399 213
Constructors in general 0.6458333333333334 0.2708333333333333 0.08333333333333333 48
Constructors shouldn't call overridables 0.5941176470588235 0.2529411764705882 0.15294117647058825 170
Constructors shouldn't start threads 0.7021276595744681 0.1702127659574468 0.1276595744680851 47
Copy constructors 0.6413301662707839 0.22486144101346 0.13380839271575615 1263
Don't pass 'this' out of a constructor 0.6181818181818182 0.23636363636363636 0.14545454545454545 55
Initializing fields to 0-false-null is redundant 0.6811989100817438 0.22343324250681199 0.09536784741144415 367
SerializationYesNoUndecidedVotes
Implementing Serializable 0.6355599214145383 0.18271119842829076 0.18172888015717092 1018
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.7451737451737451 0.1138996138996139 0.14092664092664092 518
Avoid ThreadGroup 0.5527950310559007 0.2484472049689441 0.19875776397515527 161
Data integrity first 0.7266666666666667 0.10666666666666667 0.16666666666666666 150
Document thread safety 0.7333333333333333 0.17777777777777778 0.08888888888888889 45
Dump thread information 0.7916666666666666 0.16666666666666666 0.041666666666666664 24
Handle InterruptedException 0.5609756097560976 0.21951219512195122 0.21951219512195122 41
Launch thread is just another user thread 0.8378378378378378 0.08108108108108109 0.08108108108108109 37
Objects communicating across threads 0.6992481203007519 0.17293233082706766 0.12781954887218044 133
Perform N tasks in parallel 0.6153846153846154 0.1705685618729097 0.2140468227424749 299
Prefer modern libraries for concurrency 0.9444444444444444 0.05555555555555555 0.0 18
Query host for the number of processors 0.8823529411764706 0.08823529411764706 0.029411764705882353 34
Read-write locks 0.7142857142857143 0.14285714285714285 0.14285714285714285 98
Remember the types of intrinsic lock 0.8038461538461539 0.10384615384615385 0.09230769230769231 260
Schedule periodic tasks 0.6612410986775178 0.1958290946083418 0.14292980671414038 1966
Stop threads through cooperation 0.6333333333333333 0.2866666666666667 0.08 150
Synchronize access to mutable fields 0.5520833333333334 0.2864583333333333 0.16145833333333334 192
Synchronized is implementation detail 0.6086956521739131 0.25 0.14130434782608695 92
Thread priorities are not portable 0.6595744680851063 0.1702127659574468 0.1702127659574468 47
Use finally to unlock 0.8205128205128205 0.1282051282051282 0.05128205128205128 39
© 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 -