Poll Summary

Number Of Votes Cast
84469
Overall Acceptance Rates
Choice Number Percentage
Yes 53726 0.6360439924706105
No 19005 0.22499378470208006
Undecided 11738 0.13896222282730944

Servlets and JSPsYesNoUndecidedVotes
A Web App Framework - WEB4J 0.6225352112676056 0.18028169014084508 0.19718309859154928 2130
Always maintain HttpSessions 0.7290322580645161 0.16774193548387098 0.1032258064516129 155
Beware multilingual submit buttons 0.6411764705882353 0.20588235294117646 0.15294117647058825 170
Beware of common hacks 0.84375 0.078125 0.078125 128
Beware of custom cookies 0.7727272727272727 0.07272727272727272 0.15454545454545454 110
Beware of doubly escaped ampersands 0.7692307692307693 0.1282051282051282 0.10256410256410256 78
Beware of URL rewriting 0.6222222222222222 0.2222222222222222 0.15555555555555556 180
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.6922110552763819 0.19597989949748743 0.11180904522613065 796
Emit flexible URLs 0.734375 0.078125 0.1875 64
Escape special characters 0.5873015873015873 0.29705215419501135 0.11564625850340136 882
Forward versus redirect 0.7194244604316546 0.1366906474820144 0.14388489208633093 695
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.8624338624338624 0.07936507936507936 0.0582010582010582 189
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.7425742574257426 0.1485148514851485 0.10891089108910891 202
Prefer UTF-8 in all layers 0.7908496732026143 0.09803921568627451 0.1111111111111111 153
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.6871794871794872 0.1794871794871795 0.13333333333333333 195
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.7401574803149606 0.13385826771653545 0.12598425196850394 127
Struts seems mediocre 0.4320388349514563 0.3883495145631068 0.1796116504854369 206
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.8924050632911392 0.03481012658227848 0.07278481012658228 316
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.7186544342507645 0.14678899082568808 0.1345565749235474 327
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.6825 0.1625 0.155 400
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.7094017094017094 0.07692307692307693 0.21367521367521367 117
Don't bury dialogs 0.6538461538461539 0.15384615384615385 0.19230769230769232 26
Don't subclass JDialog or JFrame 0.30625 0.4125 0.28125 160
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.6341463414634146 0.23170731707317074 0.13414634146341464 246
Look and Feel guidelines 0.8541666666666666 0.08333333333333333 0.0625 48
Minimal Swing application 0.6015625 0.234375 0.1640625 128
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.6677852348993288 0.17114093959731544 0.1610738255033557 298
Sort table rows 0.44155844155844154 0.2987012987012987 0.2597402597402597 77
Splash screen 0.5654952076677316 0.30670926517571884 0.12779552715654952 313
Standardized dialogs 0.5555555555555556 0.3333333333333333 0.1111111111111111 27
Swing in general 0.7714285714285715 0.08571428571428572 0.14285714285714285 35
Swing threads 0.5670731707317073 0.23170731707317074 0.20121951219512196 164
Swing utility tasks 0.775 0.125 0.1 40
Timers 0.32575757575757575 0.49242424242424243 0.18181818181818182 132
Using JavaHelp 0.5268817204301075 0.2903225806451613 0.1827956989247312 93
Using preferences 0.45454545454545453 0.3181818181818182 0.22727272727272727 66
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.44416243654822335 0.3248730964467005 0.23096446700507614 394
Avoid empty catch blocks 0.8264984227129337 0.11041009463722397 0.06309148264984227 317
Be specific in throws clause 0.6044776119402985 0.3283582089552239 0.06716417910447761 268
Beware of unknown root causes 0.36666666666666664 0.26666666666666666 0.36666666666666664 30
Checked versus unchecked exceptions 0.5173940543959519 0.280202403542062 0.20240354206198607 1581
Exception translation 0.9140625 0.0546875 0.03125 128
Exceptions and control flow 0.6976744186046512 0.1569767441860465 0.14534883720930233 172
Finally and catch 0.6618181818181819 0.19818181818181818 0.14 550
Javadoc all exceptions 0.5570469798657718 0.24161073825503357 0.20134228187919462 149
Pass all pertinent data to exceptions 0.944 0.016 0.04 125
Stack trace as String 0.7652777777777777 0.14722222222222223 0.0875 720
Use template for repeated try-catch 0.6506024096385542 0.12048192771084337 0.2289156626506024 83
Input-OutputYesNoUndecidedVotes
Always close streams 0.7528735632183908 0.14655172413793102 0.10057471264367816 348
Buffering usually appropriate 0.8611111111111112 0.05555555555555555 0.08333333333333333 72
Console input 0.5354609929078015 0.29432624113475175 0.1702127659574468 282
Copy a file 0.6761904761904762 0.22857142857142856 0.09523809523809523 105
Reading and writing binary files 0.4982698961937716 0.2698961937716263 0.23183391003460208 289
Reading and writing Serializable objects 0.5718085106382979 0.26063829787234044 0.1675531914893617 376
Reading and writing text files 0.6064130776485382 0.22571518390443257 0.16787173844702924 3181
DatabasesYesNoUndecidedVotes
Business identifiers as String 0.8305647840531561 0.10299003322259136 0.0664451827242525 301
Connection pools 0.867595818815331 0.0627177700348432 0.06968641114982578 287
Consider data layer tools 0.6 0.175 0.225 40
Consider using standard SQL 0.6836734693877551 0.1836734693877551 0.1326530612244898 98
Consider wrapper classes for optional data 0.7647058823529411 0.1323529411764706 0.10294117647058823 68
Data access objects 0.6415770609318996 0.1971326164874552 0.16129032258064516 279
Data exception wrapping 0.7368421052631579 0.14035087719298245 0.12280701754385964 57
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.7954545454545454 0.06818181818181818 0.13636363636363635 44
Keep SQL out of code 0.5372340425531915 0.3191489361702128 0.14361702127659576 188
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.5263157894736842 0.2631578947368421 0.21052631578947367 19
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.819371727748691 0.08900523560209424 0.09162303664921466 764
Encapsulate collections 0.8134715025906736 0.06735751295336788 0.11917098445595854 193
Iterate without an index 0.7717041800643086 0.17363344051446947 0.05466237942122187 311
Prefer Collections over older classes 0.8487394957983193 0.058823529411764705 0.09243697478991597 119
Two ways of using Iterator 0.6109951287404315 0.2407794015309673 0.14822546972860126 1437
Use for-each liberally 0.7611336032388664 0.15384615384615385 0.08502024291497975 247
Use interface references to Collections 0.6982758620689655 0.1896551724137931 0.11206896551724138 116
Use standard Collections 0.8305084745762712 0.062146892655367235 0.10734463276836158 177
Overriding Object MethodsYesNoUndecidedVotes
Avoid clone 0.4215500945179584 0.3440453686200378 0.23440453686200377 529
Implementing compareTo 0.5038560411311054 0.33161953727506427 0.16452442159383032 389
Implementing equals 0.5923566878980892 0.27388535031847133 0.1337579617834395 314
Implementing hashCode 0.5555555555555556 0.2671957671957672 0.17724867724867724 378
Implementing toString 0.4988009592326139 0.3069544364508393 0.19424460431654678 417
Never rely on finalize 0.7204301075268817 0.16129032258064516 0.11827956989247312 93
Common TasksYesNoUndecidedVotes
Arrays as String 0.4664310954063604 0.36042402826855124 0.17314487632508835 283
Clipboard copy and paste 0.7767313019390581 0.13407202216066483 0.08919667590027701 1805
Command line operations 0.45051194539249145 0.3890784982935154 0.16040955631399317 293
Compare and sort Strings 0.5124555160142349 0.3416370106761566 0.14590747330960854 281
Copy an array 0.5908372827804107 0.292259083728278 0.11690363349131122 633
Determine if Strings are equal 0.6717267552182163 0.2409867172675522 0.0872865275142315 527
Examine bytecode 0.5 0.38636363636363635 0.11363636363636363 44
Fetch web page and header 0.643312101910828 0.21019108280254778 0.1464968152866242 314
Generate random numbers 0.6124326564442603 0.2628263572316618 0.12474098632407792 12065
Get database connection 0.5511221945137157 0.2817955112219451 0.16708229426433915 1203
Get size of object in memory 0.39664804469273746 0.43854748603351956 0.164804469273743 358
Implement code tables 0.5849056603773585 0.20754716981132076 0.20754716981132076 53
Internationalization 0.5076923076923077 0.2923076923076923 0.2 65
Logging messages 0.607764390896921 0.2242302543507363 0.1680053547523427 1494
Measure application performance 0.7719298245614035 0.14035087719298245 0.08771929824561403 57
Modernize old code 0.896551724137931 0.06896551724137931 0.034482758620689655 58
Open file in native directory 0.5555555555555556 0.3333333333333333 0.1111111111111111 9
Parse text 0.6070336391437309 0.21559633027522937 0.17737003058103976 654
Pattern-match lines of a file 0.5652173913043478 0.2845849802371542 0.15019762845849802 253
Read jar version information 0.5652173913043478 0.33695652173913043 0.09782608695652174 92
Recovering resources 0.8529411764705882 0.08823529411764706 0.058823529411764705 34
Recursive file listing 0.7328519855595668 0.16064981949458484 0.10649819494584838 1108
Replace a substring 0.5822784810126582 0.29873417721518986 0.1189873417721519 395
Representing money 0.7485493230174082 0.11411992263056092 0.13733075435203096 517
Send an email 0.5528612997090203 0.23811833171677982 0.2090203685741998 2062
Time execution speed 0.7045454545454546 0.21212121212121213 0.08333333333333333 132
Common Design PatternsYesNoUndecidedVotes
Abstract Factory 0.703030303030303 0.15757575757575756 0.1393939393939394 165
Command objects 0.55 0.2 0.25 20
Factory methods 0.6237113402061856 0.21391752577319587 0.16237113402061856 776
Immutable objects 0.8132530120481928 0.09380378657487091 0.09294320137693632 1162
Lazy initialization 0.7554347826086957 0.1358695652173913 0.10869565217391304 184
Model Objects 0.6086956521739131 0.1565217391304348 0.23478260869565218 115
Plugin Factory 0.6896551724137931 0.10344827586206896 0.20689655172413793 29
Private constructor 0.7378531073446327 0.14350282485875707 0.11864406779661017 885
Singleton 0.7290322580645161 0.17096774193548386 0.1 310
Template method 0.7068965517241379 0.22413793103448276 0.06896551724137931 58
Type-Safe Enumerations 0.7989556135770235 0.10966057441253264 0.09138381201044386 383
Wrapper (Decorator) 0.6 0.24705882352941178 0.15294117647058825 85
Common PracticesYesNoUndecidedVotes
Avoid basic style errors 0.8584070796460177 0.07079646017699115 0.07079646017699115 113
Avoid raw types 0.7887323943661971 0.14084507042253522 0.07042253521126761 213
Beware of instanceof operator 0.6128330614464382 0.23273518216421968 0.15443175638934203 1839
Class for constants 0.6405693950177936 0.23606168446026096 0.12336892052194544 843
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.5539568345323741 0.26618705035971224 0.17985611510791366 278
Fields should usually be private 0.6554621848739496 0.21008403361344538 0.13445378151260504 119
Interface for constants 0.320253164556962 0.5443037974683544 0.13544303797468354 790
Know the core libraries 0.8 0.08695652173913043 0.11304347826086956 115
Minimize ripple effects 0.8602941176470589 0.03676470588235294 0.10294117647058823 136
Naming conventions 0.3352112676056338 0.5859154929577465 0.07887323943661972 355
Nest classes with care 0.5333333333333333 0.26666666666666666 0.2 15
Output parameters 0.39444444444444443 0.3888888888888889 0.21666666666666667 180
Separate public and private members 0.7159090909090909 0.18181818181818182 0.10227272727272728 88
String concatenation does not scale 0.8475609756097561 0.0975609756097561 0.054878048780487805 164
Tag or marker interfaces 0.6517857142857143 0.19642857142857142 0.15178571428571427 224
Uncommon classes need explicit imports 0.7747747747747747 0.13513513513513514 0.09009009009009009 111
Use @Override liberally 0.830316742081448 0.09276018099547512 0.07692307692307693 442
Use final liberally 0.6033690658499234 0.2327718223583461 0.1638591117917305 653
Use javadoc liberally 0.7559523809523809 0.11904761904761904 0.125 168
Use static imports rarely 0.5759768451519537 0.2865412445730825 0.13748191027496381 691
Use System.exit with care 0.6694214876033058 0.18512396694214875 0.14545454545454545 605
Use Version Control tools 0.6935483870967742 0.12903225806451613 0.1774193548387097 62
Validate method arguments 0.6282051282051282 0.21794871794871795 0.15384615384615385 234
Wisdom, not rules 0.9583333333333334 0.020833333333333332 0.020833333333333332 48
InheritanceYesNoUndecidedVotes
Consider composition instead of subclassing 0.7692307692307693 0.07692307692307693 0.15384615384615385 169
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.627906976744186 0.23588039867109634 0.1362126245847176 301
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.9139784946236559 0.053763440860215055 0.03225806451612903 93
Coding conventions 0.8636363636363636 0.045454545454545456 0.09090909090909091 88
Compile regular expressions once 0.7592592592592593 0.14814814814814814 0.09259259259259259 54
Conditional compile 0.497737556561086 0.3891402714932127 0.11312217194570136 221
Consider code generators 0.75 0.14473684210526316 0.10526315789473684 76
Consider immutable forms for dates 0.46296296296296297 0.37037037037037035 0.16666666666666666 54
Conventional name for return value 0.7291666666666666 0.1875 0.08333333333333333 144
Defensive copying 0.8647450110864745 0.06208425720620843 0.07317073170731707 451
Design by Contract 0.8035714285714286 0.08928571428571429 0.10714285714285714 168
Don't use tab characters 0.3501577287066246 0.5962145110410094 0.05362776025236593 317
Extra space in argument list 0.19152854511970535 0.7495395948434622 0.058931860036832415 543
Generating unique IDs 0.5767263427109974 0.2647058823529412 0.1585677749360614 2346
Include 'from', exclude 'to' 0.7818181818181819 0.12727272727272726 0.09090909090909091 55
Multiple return statements 0.5538461538461539 0.3230769230769231 0.12307692307692308 455
Overloading can be tricky 0.78 0.15 0.07 100
Package by feature, not layer 0.7121951219512195 0.1326829268292683 0.1551219512195122 1025
Passwords never in clear text 0.65 0.17142857142857143 0.17857142857142858 140
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.6397849462365591 0.17204301075268819 0.1881720430107527 186
Structs are occasionally useful 0.6788990825688074 0.1651376146788991 0.1559633027522936 218
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.5703703703703704 0.23703703703703705 0.1925925925925926 135
Use a testing framework (JUnit) 0.8333333333333334 0.09649122807017543 0.07017543859649122 114
Use Ant for build scripts 0.7330827067669173 0.15037593984962405 0.11654135338345864 266
Use boxing with care 0.6767676767676768 0.20202020202020202 0.12121212121212122 198
Use enums to restrict arguments 0.7364341085271318 0.13178294573643412 0.13178294573643412 129
Validate state with class invariants 0.5909090909090909 0.24242424242424243 0.16666666666666666 66
Validation belongs in a Model Object 0.6048387096774194 0.29838709677419356 0.0967741935483871 124
AssertionsYesNoUndecidedVotes
Assert is for private arguments only 0.8194444444444444 0.13194444444444445 0.04861111111111111 144
Assert use cases 0.36633663366336633 0.42574257425742573 0.2079207920792079 202
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.6242990654205608 0.18504672897196262 0.19065420560747665 535
Beware of mistaken field redeclares 0.8333333333333334 0.1 0.06666666666666667 30
Construct Object using class name 0.5450236966824644 0.2938388625592417 0.16113744075829384 211
Constructors in general 0.6458333333333334 0.2708333333333333 0.08333333333333333 48
Constructors shouldn't call overridables 0.6024096385542169 0.24096385542168675 0.1566265060240964 166
Constructors shouldn't start threads 0.7021276595744681 0.1702127659574468 0.1276595744680851 47
Copy constructors 0.6428571428571429 0.22391653290529695 0.1332263242375602 1246
Don't pass 'this' out of a constructor 0.6181818181818182 0.23636363636363636 0.14545454545454545 55
Initializing fields to 0-false-null is redundant 0.6787709497206704 0.22625698324022347 0.09497206703910614 358
SerializationYesNoUndecidedVotes
Implementing Serializable 0.6374384236453202 0.1832512315270936 0.1793103448275862 1015
Serialization and subclassing 0.49 0.32 0.19 100
Some classes need readResolve 0.76 0.12 0.12 75
ThreadsYesNoUndecidedVotes
Always shut down an ExecutorService 0.747534516765286 0.11439842209072978 0.13806706114398423 507
Avoid ThreadGroup 0.5527950310559007 0.2484472049689441 0.19875776397515527 161
Data integrity first 0.7297297297297297 0.10810810810810811 0.16216216216216217 148
Document thread safety 0.7333333333333333 0.17777777777777778 0.08888888888888889 45
Dump thread information 0.7916666666666666 0.16666666666666666 0.041666666666666664 24
Handle InterruptedException 0.5384615384615384 0.23076923076923078 0.23076923076923078 39
Launch thread is just another user thread 0.8333333333333334 0.08333333333333333 0.08333333333333333 36
Objects communicating across threads 0.6992481203007519 0.17293233082706766 0.12781954887218044 133
Perform N tasks in parallel 0.6161616161616161 0.16835016835016836 0.21548821548821548 297
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.6634271099744246 0.19437340153452684 0.1421994884910486 1955
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.8157894736842105 0.13157894736842105 0.05263157894736842 38
© 2016 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 -