Poll Summary

Number Of Votes Cast
85703
Overall Acceptance Rates
Choice Number Percentage
Yes 54451 0.6353453204671948
No 19292 0.22510297189129902
Undecided 11960 0.13955170764150612

Servlets and JSPsYesNoUndecidedVotes
A Web App Framework - WEB4J 0.6197374377546401 0.17926663648709823 0.20099592575826167 2209
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.8449612403100775 0.07751937984496124 0.07751937984496124 129
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.6921151439299124 0.1964956195244055 0.1113892365456821 799
Emit flexible URLs 0.7424242424242424 0.07575757575757576 0.18181818181818182 66
Escape special characters 0.5862457722660653 0.2976324689966178 0.1161217587373168 887
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.6698113207547169 0.14150943396226415 0.18867924528301888 106
Manage sessions closely 0.8026315789473685 0.10526315789473684 0.09210526315789473 152
Measure web app performance 0.8645833333333334 0.078125 0.057291666666666664 192
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.45544554455445546 0.3465346534653465 0.19801980198019803 101
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.8 0.1 0.1 20
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.7350427350427351 0.17094017094017094 0.09401709401709402 117
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.7164179104477612 0.14626865671641792 0.1373134328358209 335
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.6847290640394089 0.1625615763546798 0.15270935960591134 406
Actions 0.6979166666666666 0.20833333333333334 0.09375 96
Align menu items 0.65625 0.20833333333333334 0.13541666666666666 96
Change theme 0.6666666666666666 0.1836734693877551 0.14965986394557823 147
Consider JGoodies Forms for layouts 0.6974789915966386 0.07563025210084033 0.226890756302521 119
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.636 0.228 0.136 250
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.6655629139072847 0.17218543046357615 0.16225165562913907 302
Sort table rows 0.44871794871794873 0.2948717948717949 0.2564102564102564 78
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.5662650602409639 0.2289156626506024 0.20481927710843373 166
Swing utility tasks 0.775 0.125 0.1 40
Timers 0.3233082706766917 0.48872180451127817 0.18796992481203006 133
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.4362745098039216 0.32107843137254904 0.2426470588235294 408
Avoid empty catch blocks 0.8238993710691824 0.11006289308176101 0.0660377358490566 318
Be specific in throws clause 0.6051660516605166 0.3247232472324723 0.07011070110701106 271
Beware of unknown root causes 0.36666666666666664 0.26666666666666666 0.36666666666666664 30
Checked versus unchecked exceptions 0.5156054931335831 0.2808988764044944 0.2034956304619226 1602
Exception translation 0.9140625 0.0546875 0.03125 128
Exceptions and control flow 0.6994219653179191 0.15606936416184972 0.14450867052023122 173
Finally and catch 0.6600361663652803 0.19710669077757687 0.14285714285714285 553
Javadoc all exceptions 0.5620915032679739 0.23529411764705882 0.20261437908496732 153
Pass all pertinent data to exceptions 0.9444444444444444 0.015873015873015872 0.03968253968253968 126
Stack trace as String 0.7641379310344828 0.1489655172413793 0.08689655172413793 725
Use template for repeated try-catch 0.6547619047619048 0.11904761904761904 0.2261904761904762 84
Input-OutputYesNoUndecidedVotes
Always close streams 0.7443820224719101 0.14606741573033707 0.10955056179775281 356
Buffering usually appropriate 0.8611111111111112 0.05555555555555555 0.08333333333333333 72
Console input 0.5314685314685315 0.2972027972027972 0.17132867132867133 286
Copy a file 0.6759259259259259 0.2222222222222222 0.10185185185185185 108
Reading and writing binary files 0.49333333333333335 0.2733333333333333 0.23333333333333334 300
Reading and writing Serializable objects 0.5736842105263158 0.26052631578947366 0.16578947368421051 380
Reading and writing text files 0.6060225846925973 0.2255332496863237 0.16844416562107906 3188
DatabasesYesNoUndecidedVotes
Business identifiers as String 0.8317152103559871 0.10355987055016182 0.06472491909385113 309
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.6405693950177936 0.19572953736654805 0.16370106761565836 281
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.8472222222222222 0.08333333333333333 0.06944444444444445 72
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.815989847715736 0.08756345177664974 0.09644670050761421 788
Encapsulate collections 0.8121827411167513 0.06598984771573604 0.1218274111675127 197
Iterate without an index 0.7721518987341772 0.17088607594936708 0.056962025316455694 316
Prefer Collections over older classes 0.8429752066115702 0.05785123966942149 0.09917355371900827 121
Two ways of using Iterator 0.6099387338325392 0.24098025867937373 0.14908100748808714 1469
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.8324324324324325 0.05945945945945946 0.10810810810810811 185
Overriding Object MethodsYesNoUndecidedVotes
Avoid clone 0.41947565543071164 0.3464419475655431 0.2340823970037453 534
Implementing compareTo 0.5012722646310432 0.33587786259541985 0.1628498727735369 393
Implementing equals 0.5930599369085173 0.2744479495268139 0.13249211356466878 317
Implementing hashCode 0.5555555555555556 0.2671957671957672 0.17724867724867724 378
Implementing toString 0.49643705463182897 0.30641330166270786 0.19714964370546317 421
Never rely on finalize 0.723404255319149 0.1595744680851064 0.11702127659574468 94
Common TasksYesNoUndecidedVotes
Arrays as String 0.46853146853146854 0.35664335664335667 0.17482517482517482 286
Clipboard copy and paste 0.7749178532311063 0.13417305585980285 0.09090909090909091 1826
Command line operations 0.45454545454545453 0.3838383838383838 0.16161616161616163 297
Compare and sort Strings 0.5121951219512195 0.34146341463414637 0.14634146341463414 287
Copy an array 0.5893416927899686 0.29310344827586204 0.11755485893416928 638
Determine if Strings are equal 0.6704545454545454 0.24242424242424243 0.08712121212121213 528
Examine bytecode 0.5111111111111111 0.37777777777777777 0.1111111111111111 45
Fetch web page and header 0.6435331230283912 0.2082018927444795 0.14826498422712933 317
Generate random numbers 0.6116307442049613 0.2634404229361529 0.12492883285888573 12295
Get database connection 0.5503300330033003 0.283003300330033 0.16666666666666666 1212
Get size of object in memory 0.3961218836565097 0.4376731301939058 0.16620498614958448 361
Implement code tables 0.5636363636363636 0.23636363636363636 0.2 55
Internationalization 0.5076923076923077 0.2923076923076923 0.2 65
Logging messages 0.6047430830039525 0.2246376811594203 0.17061923583662714 1518
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.6063829787234043 0.21732522796352582 0.1762917933130699 658
Pattern-match lines of a file 0.5647058823529412 0.2823529411764706 0.15294117647058825 255
Read jar version information 0.5578947368421052 0.3473684210526316 0.09473684210526316 95
Recovering resources 0.8529411764705882 0.08823529411764706 0.058823529411764705 34
Recursive file listing 0.7322551662174304 0.16172506738544473 0.10601976639712489 1113
Replace a substring 0.5822784810126582 0.29873417721518986 0.1189873417721519 395
Representing money 0.7471264367816092 0.11494252873563218 0.13793103448275862 522
Send an email 0.5527589545014521 0.2376573088092933 0.2095837366892546 2066
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.6215189873417721 0.21518987341772153 0.16329113924050634 790
Immutable objects 0.8129251700680272 0.09523809523809523 0.09183673469387756 1176
Lazy initialization 0.7580645161290323 0.13440860215053763 0.10752688172043011 186
Model Objects 0.6134453781512605 0.15966386554621848 0.226890756302521 119
Plugin Factory 0.6896551724137931 0.10344827586206896 0.20689655172413793 29
Private constructor 0.7376681614349776 0.14237668161434977 0.11995515695067265 892
Singleton 0.729903536977492 0.17041800643086816 0.09967845659163987 311
Template method 0.711864406779661 0.22033898305084745 0.06779661016949153 59
Type-Safe Enumerations 0.8005181347150259 0.10880829015544041 0.09067357512953368 386
Wrapper (Decorator) 0.5869565217391305 0.2717391304347826 0.14130434782608695 92
Common PracticesYesNoUndecidedVotes
Avoid basic style errors 0.853448275862069 0.06896551724137931 0.07758620689655173 116
Avoid raw types 0.7798165137614679 0.14220183486238533 0.0779816513761468 218
Beware of instanceof operator 0.6142241379310345 0.2322198275862069 0.15355603448275862 1856
Class for constants 0.6377314814814815 0.2361111111111111 0.1261574074074074 864
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.5578947368421052 0.2631578947368421 0.17894736842105263 285
Fields should usually be private 0.65 0.20833333333333334 0.14166666666666666 120
Interface for constants 0.32125 0.54375 0.135 800
Know the core libraries 0.8017241379310345 0.08620689655172414 0.11206896551724138 116
Minimize ripple effects 0.8652482269503546 0.03546099290780142 0.09929078014184398 141
Naming conventions 0.33519553072625696 0.5837988826815642 0.08100558659217877 358
Nest classes with care 0.5294117647058824 0.29411764705882354 0.17647058823529413 17
Output parameters 0.3891891891891892 0.3945945945945946 0.21621621621621623 185
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.646551724137931 0.1939655172413793 0.15948275862068967 232
Uncommon classes need explicit imports 0.7699115044247787 0.13274336283185842 0.09734513274336283 113
Use @Override liberally 0.834070796460177 0.09070796460176991 0.0752212389380531 452
Use final liberally 0.6036036036036037 0.23273273273273273 0.16366366366366367 666
Use javadoc liberally 0.7616279069767442 0.11627906976744186 0.12209302325581395 172
Use static imports rarely 0.5767045454545454 0.2883522727272727 0.13494318181818182 704
Use System.exit with care 0.6683006535947712 0.18790849673202614 0.1437908496732026 612
Use Version Control tools 0.6875 0.140625 0.171875 64
Validate method arguments 0.6276150627615062 0.2175732217573222 0.15481171548117154 239
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.75 0.1388888888888889 0.1111111111111111 72
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.6286644951140065 0.23452768729641693 0.13680781758957655 307
Beware of Byte Order Marks 0.6666666666666666 0.2727272727272727 0.06060606060606061 33
Beware of DecimalFormat 0.43333333333333335 0.31666666666666665 0.25 180
Beware of floating point numbers 0.8842975206611571 0.08264462809917356 0.03305785123966942 121
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.504424778761062 0.38495575221238937 0.11061946902654868 226
Consider code generators 0.75 0.14473684210526316 0.10526315789473684 76
Consider immutable forms for dates 0.48214285714285715 0.35714285714285715 0.16071428571428573 56
Conventional name for return value 0.7291666666666666 0.1875 0.08333333333333333 144
Defensive copying 0.8636363636363636 0.06277056277056277 0.0735930735930736 462
Design by Contract 0.8011695906432749 0.0935672514619883 0.10526315789473684 171
Don't use tab characters 0.35714285714285715 0.5900621118012422 0.052795031055900624 322
Extra space in argument list 0.19012797074954296 0.7513711151736746 0.05850091407678245 547
Generating unique IDs 0.5769388592531801 0.26590069757899054 0.1571604431678293 2437
Include 'from', exclude 'to' 0.7894736842105263 0.12280701754385964 0.08771929824561403 57
Multiple return statements 0.5488069414316703 0.3297180043383948 0.12147505422993492 461
Overloading can be tricky 0.7821782178217822 0.1485148514851485 0.06930693069306931 101
Package by feature, not layer 0.7179723502304147 0.1327188940092166 0.14930875576036867 1085
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.6754385964912281 0.16228070175438597 0.16228070175438597 228
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.572463768115942 0.2318840579710145 0.1956521739130435 138
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.6733668341708543 0.20603015075376885 0.12060301507537688 199
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.6245353159851301 0.18401486988847585 0.19144981412639406 538
Beware of mistaken field redeclares 0.8333333333333334 0.1 0.06666666666666667 30
Construct Object using class name 0.5348837209302325 0.3023255813953488 0.16279069767441862 215
Constructors in general 0.6326530612244898 0.2653061224489796 0.10204081632653061 49
Constructors shouldn't call overridables 0.5988372093023255 0.25 0.1511627906976744 172
Constructors shouldn't start threads 0.7021276595744681 0.1702127659574468 0.1276595744680851 47
Copy constructors 0.6418495297805643 0.22413793103448276 0.13401253918495298 1276
Don't pass 'this' out of a constructor 0.625 0.23214285714285715 0.14285714285714285 56
Initializing fields to 0-false-null is redundant 0.6775067750677507 0.22764227642276422 0.0948509485094851 369
SerializationYesNoUndecidedVotes
Implementing Serializable 0.634936211972522 0.18253189401373895 0.18253189401373895 1019
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.7432950191570882 0.11302681992337164 0.14367816091954022 522
Avoid ThreadGroup 0.5527950310559007 0.2484472049689441 0.19875776397515527 161
Data integrity first 0.7302631578947368 0.10526315789473684 0.16447368421052633 152
Document thread safety 0.7333333333333333 0.17777777777777778 0.08888888888888889 45
Dump thread information 0.7916666666666666 0.16666666666666666 0.041666666666666664 24
Handle InterruptedException 0.5714285714285714 0.21428571428571427 0.21428571428571427 42
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.6133333333333333 0.17333333333333334 0.21333333333333335 300
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.8053435114503816 0.10305343511450382 0.0916030534351145 262
Schedule periodic tasks 0.6614133197763091 0.19572953736654805 0.14285714285714285 1967
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 -