Poll Summary

Number Of Votes Cast
84855
Overall Acceptance Rates
Choice Number Percentage
Yes 53956 0.6358611749454952
No 19096 0.22504271993400507
Undecided 11803 0.13909610512049966

Servlets and JSPsYesNoUndecidedVotes
A Web App Framework - WEB4J 0.6201298701298701 0.1813543599257885 0.19851576994434136 2156
Always maintain HttpSessions 0.7261146496815286 0.17197452229299362 0.10191082802547771 157
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.7747747747747747 0.07207207207207207 0.15315315315315314 111
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.6925972396486826 0.19573400250941028 0.11166875784190715 797
Emit flexible URLs 0.7384615384615385 0.07692307692307693 0.18461538461538463 65
Escape special characters 0.5873015873015873 0.29705215419501135 0.11564625850340136 882
Forward versus redirect 0.721030042918455 0.13590844062947066 0.1430615164520744 699
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.7438423645320197 0.1477832512315271 0.10837438423645321 203
Prefer UTF-8 in all layers 0.7922077922077922 0.09740259740259741 0.11038961038961038 154
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.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.8927444794952681 0.03470031545741325 0.07255520504731862 317
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.7195121951219512 0.14634146341463414 0.13414634146341464 328
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.683291770573566 0.16209476309226933 0.1546134663341646 401
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.6666666666666666 0.14814814814814814 0.18518518518518517 27
Don't subclass JDialog or JFrame 0.30434782608695654 0.40993788819875776 0.2857142857142857 161
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.6356275303643725 0.23076923076923078 0.13360323886639677 247
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.6688963210702341 0.1705685618729097 0.1605351170568562 299
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.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.5268817204301075 0.2903225806451613 0.1827956989247312 93
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.44191919191919193 0.32575757575757575 0.23232323232323232 396
Avoid empty catch blocks 0.8264984227129337 0.11041009463722397 0.06309148264984227 317
Be specific in throws clause 0.6022304832713755 0.3271375464684015 0.07063197026022305 269
Beware of unknown root causes 0.36666666666666664 0.26666666666666666 0.36666666666666664 30
Checked versus unchecked exceptions 0.5157629255989912 0.2812105926860025 0.2030264817150063 1586
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.56 0.24 0.2 150
Pass all pertinent data to exceptions 0.944 0.016 0.04 125
Stack trace as String 0.7656033287101248 0.14701803051317613 0.08737864077669903 721
Use template for repeated try-catch 0.6506024096385542 0.12048192771084337 0.2289156626506024 83
Input-OutputYesNoUndecidedVotes
Always close streams 0.7471590909090909 0.14488636363636365 0.10795454545454546 352
Buffering usually appropriate 0.8611111111111112 0.05555555555555555 0.08333333333333333 72
Console input 0.5352112676056338 0.29577464788732394 0.16901408450704225 284
Copy a file 0.6761904761904762 0.22857142857142856 0.09523809523809523 105
Reading and writing binary files 0.4965753424657534 0.2705479452054795 0.2328767123287671 292
Reading and writing Serializable objects 0.5725593667546174 0.2612137203166227 0.1662269129287599 379
Reading and writing text files 0.6064698492462312 0.22581658291457288 0.16771356783919597 3184
DatabasesYesNoUndecidedVotes
Business identifiers as String 0.8327868852459016 0.10163934426229508 0.06557377049180328 305
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.6868686868686869 0.18181818181818182 0.13131313131313133 99
Consider wrapper classes for optional data 0.7647058823529411 0.1323529411764706 0.10294117647058823 68
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.5343915343915344 0.32275132275132273 0.14285714285714285 189
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.8146718146718147 0.0888030888030888 0.09652509652509653 777
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.8487394957983193 0.058823529411764705 0.09243697478991597 119
Two ways of using Iterator 0.6096885813148789 0.24152249134948098 0.14878892733564014 1445
Use for-each liberally 0.7590361445783133 0.15261044176706828 0.08835341365461848 249
Use interface references to Collections 0.6949152542372882 0.19491525423728814 0.11016949152542373 118
Use standard Collections 0.8287292817679558 0.06077348066298342 0.11049723756906077 181
Overriding Object MethodsYesNoUndecidedVotes
Avoid clone 0.4207547169811321 0.3452830188679245 0.2339622641509434 530
Implementing compareTo 0.5025641025641026 0.3333333333333333 0.1641025641025641 390
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.47017543859649125 0.35789473684210527 0.17192982456140352 285
Clipboard copy and paste 0.7769784172661871 0.13392363032650803 0.08909795240730492 1807
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.5899053627760252 0.2917981072555205 0.11829652996845426 634
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.643312101910828 0.21019108280254778 0.1464968152866242 314
Generate random numbers 0.6124886728725595 0.26295411483647746 0.12455721229096302 12139
Get database connection 0.5510373443983403 0.2821576763485477 0.16680497925311202 1205
Get size of object in memory 0.3955431754874652 0.4401114206128134 0.16434540389972144 359
Implement code tables 0.5849056603773585 0.20754716981132076 0.20754716981132076 53
Internationalization 0.5076923076923077 0.2923076923076923 0.2 65
Logging messages 0.606951871657754 0.22393048128342247 0.16911764705882354 1496
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.6067073170731707 0.21646341463414634 0.17682926829268292 656
Pattern-match lines of a file 0.562992125984252 0.28346456692913385 0.15354330708661418 254
Read jar version information 0.5652173913043478 0.33695652173913043 0.09782608695652174 92
Recovering resources 0.8529411764705882 0.08823529411764706 0.058823529411764705 34
Recursive file listing 0.7330928764652841 0.16050495942290352 0.10640216411181244 1109
Replace a substring 0.5822784810126582 0.29873417721518986 0.1189873417721519 395
Representing money 0.7461538461538462 0.11538461538461539 0.13846153846153847 520
Send an email 0.5525933107125546 0.23800290838584587 0.2094037809015996 2063
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.6230769230769231 0.2153846153846154 0.16153846153846155 780
Immutable objects 0.8125 0.09503424657534247 0.09246575342465753 1168
Lazy initialization 0.7567567567567568 0.13513513513513514 0.10810810810810811 185
Model Objects 0.6153846153846154 0.15384615384615385 0.23076923076923078 117
Plugin Factory 0.6896551724137931 0.10344827586206896 0.20689655172413793 29
Private constructor 0.7381489841986456 0.1433408577878104 0.11851015801354402 886
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.6046511627906976 0.2441860465116279 0.1511627906976744 86
Common PracticesYesNoUndecidedVotes
Avoid basic style errors 0.8521739130434782 0.06956521739130435 0.0782608695652174 115
Avoid raw types 0.7850467289719626 0.14485981308411214 0.07009345794392523 214
Beware of instanceof operator 0.6133405639913232 0.232646420824295 0.1540130151843818 1844
Class for constants 0.6394799054373522 0.2364066193853428 0.12411347517730496 846
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.5535714285714286 0.2642857142857143 0.18214285714285713 280
Fields should usually be private 0.6554621848739496 0.21008403361344538 0.13445378151260504 119
Interface for constants 0.3211586901763224 0.5440806045340051 0.13476070528967254 794
Know the core libraries 0.8 0.08695652173913043 0.11304347826086956 115
Minimize ripple effects 0.8623188405797102 0.036231884057971016 0.10144927536231885 138
Naming conventions 0.3352112676056338 0.5859154929577465 0.07887323943661972 355
Nest classes with care 0.5333333333333333 0.26666666666666666 0.2 15
Output parameters 0.39779005524861877 0.3867403314917127 0.2154696132596685 181
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.6475770925110133 0.19823788546255505 0.15418502202643172 227
Uncommon classes need explicit imports 0.7747747747747747 0.13513513513513514 0.09009009009009009 111
Use @Override liberally 0.8314606741573034 0.09213483146067415 0.07640449438202247 445
Use final liberally 0.6012176560121766 0.2343987823439878 0.1643835616438356 657
Use javadoc liberally 0.7559523809523809 0.11904761904761904 0.125 168
Use static imports rarely 0.5767575322812052 0.28694404591104733 0.13629842180774748 697
Use System.exit with care 0.6705107084019769 0.18451400329489293 0.14497528830313014 607
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.6291390728476821 0.23509933774834438 0.1357615894039735 302
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.5022421524663677 0.38565022421524664 0.11210762331838565 223
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.865934065934066 0.06153846153846154 0.07252747252747253 455
Design by Contract 0.8 0.09411764705882353 0.10588235294117647 170
Don't use tab characters 0.3522012578616352 0.5943396226415094 0.05345911949685535 318
Extra space in argument list 0.19117647058823528 0.75 0.058823529411764705 544
Generating unique IDs 0.5766484670306594 0.2650146997060059 0.15833683326333473 2381
Include 'from', exclude 'to' 0.7857142857142857 0.125 0.08928571428571429 56
Multiple return statements 0.5526315789473685 0.32456140350877194 0.12280701754385964 456
Overloading can be tricky 0.78 0.15 0.07 100
Package by feature, not layer 0.7140115163147792 0.1324376199616123 0.15355086372360843 1042
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.6363636363636364 0.1711229946524064 0.1925133689839572 187
Structs are occasionally useful 0.6832579185520362 0.16289592760180996 0.15384615384615385 221
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.8333333333333334 0.09649122807017543 0.07017543859649122 114
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.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.5952380952380952 0.30158730158730157 0.10317460317460317 126
AssertionsYesNoUndecidedVotes
Assert is for private arguments only 0.8206896551724138 0.1310344827586207 0.04827586206896552 145
Assert use cases 0.36764705882352944 0.4264705882352941 0.20588235294117646 204
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.5952380952380952 0.25 0.15476190476190477 168
Constructors shouldn't start threads 0.7021276595744681 0.1702127659574468 0.1276595744680851 47
Copy constructors 0.6427432216905901 0.2240829346092504 0.1331738437001595 1254
Don't pass 'this' out of a constructor 0.6181818181818182 0.23636363636363636 0.14545454545454545 55
Initializing fields to 0-false-null is redundant 0.6786703601108033 0.22437673130193905 0.09695290858725762 361
SerializationYesNoUndecidedVotes
Implementing Serializable 0.6368110236220472 0.1830708661417323 0.18011811023622049 1016
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.7470817120622568 0.11284046692607004 0.14007782101167315 514
Avoid ThreadGroup 0.5527950310559007 0.2484472049689441 0.19875776397515527 161
Data integrity first 0.7315436241610739 0.10738255033557047 0.1610738255033557 149
Document thread safety 0.7333333333333333 0.17777777777777778 0.08888888888888889 45
Dump thread information 0.7916666666666666 0.16666666666666666 0.041666666666666664 24
Handle InterruptedException 0.55 0.225 0.225 40
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.6627551020408163 0.19489795918367347 0.14234693877551022 1960
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 -