Poll Summary

Number Of Votes Cast
88955
Overall Acceptance Rates
Choice Number Percentage
Yes 56331 0.6332527682536114
No 20094 0.22588949468832556
Undecided 12530 0.14085773705806306

Servlets and JSPsYesNoUndecidedVotes
A Web App Framework - WEB4J 0.617558886509636 0.17987152034261242 0.2025695931477516 2335
Always maintain HttpSessions 0.7239263803680982 0.15950920245398773 0.1165644171779141 163
Beware multilingual submit buttons 0.6420454545454546 0.20454545454545456 0.1534090909090909 176
Beware of common hacks 0.8421052631578947 0.07518796992481203 0.08270676691729323 133
Beware of custom cookies 0.7719298245614035 0.07894736842105263 0.14912280701754385 114
Beware of doubly escaped ampersands 0.7692307692307693 0.1282051282051282 0.10256410256410256 78
Beware of URL rewriting 0.6284153005464481 0.2185792349726776 0.15300546448087432 183
Choose form validation style carefully 0.7131147540983607 0.18032786885245902 0.10655737704918032 122
Consider Controllers for redirects 0.4878048780487805 0.24390243902439024 0.2682926829268293 41
Do not synchronize doGet, doPost 0.6895705521472393 0.19631901840490798 0.11411042944785275 815
Emit flexible URLs 0.7352941176470589 0.07352941176470588 0.19117647058823528 68
Escape special characters 0.5811111111111111 0.29888888888888887 0.12 900
Forward versus redirect 0.7184873949579832 0.13725490196078433 0.14425770308123248 714
JSPs should contain only presentation logic 0.8728070175438597 0.06140350877192982 0.06578947368421052 228
Loss of data during restart 0.6636363636363637 0.14545454545454545 0.19090909090909092 110
Manage sessions closely 0.7987012987012987 0.1038961038961039 0.09740259740259741 154
Measure web app performance 0.8585858585858586 0.08080808080808081 0.06060606060606061 198
Minimize site response time 0.7291666666666666 0.14583333333333334 0.125 96
Parse parameters into domain objects 0.4 0.32 0.28 25
Pre-populate forms 0.45714285714285713 0.34285714285714286 0.2 105
Prefer JSTL tags 0.7391304347826086 0.1497584541062802 0.1111111111111111 207
Prefer UTF-8 in all layers 0.7911392405063291 0.0949367088607595 0.11392405063291139 158
Prevent self-linking 0.39285714285714285 0.5357142857142857 0.07142857142857142 28
Refactor large Controllers 0.8095238095238095 0.09523809523809523 0.09523809523809523 21
Repel invalid requests 0.76 0.12 0.12 25
Reuse login page for errors 0.6881188118811881 0.1782178217821782 0.13366336633663367 202
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.7407407407407407 0.13333333333333333 0.1259259259259259 135
Struts seems mediocre 0.4354066985645933 0.3875598086124402 0.17703349282296652 209
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.696 0.192 0.112 125
Use extensions for fine-grained security 0.5306122448979592 0.3469387755102041 0.12244897959183673 49
Use Model-View-Controller framework 0.8923076923076924 0.033846153846153845 0.07384615384615385 325
Use templates to standardize layout 0.4642857142857143 0.39285714285714285 0.14285714285714285 56
Validate email addresses 0.43523316062176165 0.4170984455958549 0.14766839378238342 386
Validate generated HTML 0.7089337175792507 0.14985590778097982 0.14121037463976946 347
Web usability guidelines 0.8378378378378378 0.05405405405405406 0.10810810810810811 37
Wrap file upload requests 0.4492753623188406 0.2608695652173913 0.2898550724637681 69
SwingYesNoUndecidedVotes
A Swing App - StocksMonitor 0.6897374701670644 0.15990453460620524 0.15035799522673032 419
Actions 0.6979166666666666 0.20833333333333334 0.09375 96
Align menu items 0.6597938144329897 0.20618556701030927 0.13402061855670103 97
Change theme 0.6666666666666666 0.1836734693877551 0.14965986394557823 147
Consider JGoodies Forms for layouts 0.6942148760330579 0.08264462809917356 0.2231404958677686 121
Don't bury dialogs 0.6785714285714286 0.14285714285714285 0.17857142857142858 28
Don't subclass JDialog or JFrame 0.3067484662576687 0.4110429447852761 0.2822085889570552 163
Filter table rows 0.5 0.3888888888888889 0.1111111111111111 18
Input dialogs 0.5348837209302325 0.2558139534883721 0.20930232558139536 43
Launch other applications 0.7333333333333333 0.26666666666666666 0.0 30
Layout Managers 0.6356589147286822 0.2248062015503876 0.13953488372093023 258
Look and Feel guidelines 0.8571428571428571 0.08163265306122448 0.061224489795918366 49
Minimal Swing application 0.5763888888888888 0.2638888888888889 0.1597222222222222 144
Observers and listeners 0.45454545454545453 0.3014354066985646 0.24401913875598086 209
Preferences dialogs 0.46875 0.15625 0.375 32
Provide an uncaught exception handler 0.6126760563380281 0.20422535211267606 0.18309859154929578 142
Render table cells 0.656957928802589 0.18446601941747573 0.15857605177993528 309
Sort table rows 0.4634146341463415 0.2804878048780488 0.25609756097560976 82
Splash screen 0.5638629283489096 0.3052959501557632 0.1308411214953271 321
Standardized dialogs 0.5555555555555556 0.3333333333333333 0.1111111111111111 27
Swing in general 0.75 0.08333333333333333 0.16666666666666666 36
Swing threads 0.5672514619883041 0.22807017543859648 0.2046783625730994 171
Swing utility tasks 0.775 0.125 0.1 40
Timers 0.3233082706766917 0.48872180451127817 0.18796992481203006 133
Using JavaHelp 0.5257731958762887 0.29896907216494845 0.17525773195876287 97
Using preferences 0.4411764705882353 0.3088235294117647 0.25 68
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.4302059496567506 0.3180778032036613 0.2517162471395881 437
Avoid empty catch blocks 0.8184615384615385 0.11384615384615385 0.06769230769230769 325
Be specific in throws clause 0.605072463768116 0.32608695652173914 0.06884057971014493 276
Beware of unknown root causes 0.3548387096774194 0.2903225806451613 0.3548387096774194 31
Checked versus unchecked exceptions 0.5171568627450981 0.27818627450980393 0.20465686274509803 1632
Exception translation 0.917910447761194 0.05223880597014925 0.029850746268656716 134
Exceptions and control flow 0.6902173913043478 0.16847826086956522 0.14130434782608695 184
Finally and catch 0.6607142857142857 0.1982142857142857 0.14107142857142857 560
Javadoc all exceptions 0.5714285714285714 0.22981366459627328 0.19875776397515527 161
Pass all pertinent data to exceptions 0.9448818897637795 0.015748031496062992 0.03937007874015748 127
Stack trace as String 0.7602179836512262 0.15122615803814715 0.0885558583106267 734
Use template for repeated try-catch 0.6590909090909091 0.11363636363636363 0.22727272727272727 88
Input-OutputYesNoUndecidedVotes
Always close streams 0.7412398921832885 0.14824797843665768 0.1105121293800539 371
Buffering usually appropriate 0.8648648648648649 0.05405405405405406 0.08108108108108109 74
Console input 0.5273972602739726 0.2979452054794521 0.17465753424657535 292
Copy a file 0.675 0.225 0.1 120
Reading and writing binary files 0.47530864197530864 0.2839506172839506 0.24074074074074073 324
Reading and writing Serializable objects 0.5617128463476071 0.26700251889168763 0.1712846347607053 397
Reading and writing text files 0.6067870485678705 0.225093399750934 0.16811955168119552 3212
DatabasesYesNoUndecidedVotes
Business identifiers as String 0.8240740740740741 0.1111111111111111 0.06481481481481481 324
Connection pools 0.8707482993197279 0.061224489795918366 0.06802721088435375 294
Consider data layer tools 0.5813953488372093 0.20930232558139536 0.20930232558139536 43
Consider using standard SQL 0.693069306930693 0.1782178217821782 0.12871287128712872 101
Consider wrapper classes for optional data 0.7681159420289855 0.13043478260869565 0.10144927536231885 69
Data access objects 0.6344827586206897 0.1896551724137931 0.17586206896551723 290
Data exception wrapping 0.7288135593220338 0.15254237288135594 0.11864406779661017 59
Data is king 0.8695652173913043 0.06086956521739131 0.06956521739130435 115
Don't perform basic SQL tasks in code 0.8533333333333334 0.08 0.06666666666666667 75
Encapsulate connections 0.8043478260869565 0.06521739130434782 0.13043478260869565 46
Keep SQL out of code 0.5303030303030303 0.32323232323232326 0.14646464646464646 198
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.8111888111888111 0.09090909090909091 0.0979020979020979 858
Encapsulate collections 0.815 0.065 0.12 200
Iterate without an index 0.7716049382716049 0.1697530864197531 0.05864197530864197 324
Prefer Collections over older classes 0.8387096774193549 0.056451612903225805 0.10483870967741936 124
Two ways of using Iterator 0.6061577934573444 0.2418216805644644 0.15202052597819116 1559
Use for-each liberally 0.7587548638132295 0.1556420233463035 0.08560311284046693 257
Use interface references to Collections 0.7024793388429752 0.19008264462809918 0.10743801652892562 121
Use standard Collections 0.828125 0.057291666666666664 0.11458333333333333 192
Overriding Object MethodsYesNoUndecidedVotes
Avoid clone 0.4188191881918819 0.34686346863468637 0.23431734317343172 542
Implementing compareTo 0.4963144963144963 0.33906633906633904 0.16461916461916462 407
Implementing equals 0.588957055214724 0.27607361963190186 0.13496932515337423 326
Implementing hashCode 0.5520833333333334 0.2708333333333333 0.17708333333333334 384
Implementing toString 0.4953051643192488 0.3028169014084507 0.20187793427230047 426
Never rely on finalize 0.7263157894736842 0.15789473684210525 0.11578947368421053 95
Common TasksYesNoUndecidedVotes
Arrays as String 0.47586206896551725 0.35172413793103446 0.1724137931034483 290
Clipboard copy and paste 0.774331550802139 0.13475935828877006 0.09090909090909091 1870
Command line operations 0.45714285714285713 0.3873015873015873 0.15555555555555556 315
Compare and sort Strings 0.5114754098360655 0.3442622950819672 0.14426229508196722 305
Copy an array 0.5835913312693498 0.29566563467492263 0.12074303405572756 646
Determine if Strings are equal 0.6685499058380414 0.24293785310734464 0.08851224105461393 531
Examine bytecode 0.5217391304347826 0.3695652173913043 0.10869565217391304 46
Fetch web page and header 0.6448598130841121 0.205607476635514 0.14953271028037382 321
Generate random numbers 0.6089212421590645 0.26399752187717807 0.12708123596375745 12913
Get database connection 0.5487012987012987 0.2857142857142857 0.16558441558441558 1232
Get size of object in memory 0.3844086021505376 0.44086021505376344 0.17473118279569894 372
Implement code tables 0.5714285714285714 0.23214285714285715 0.19642857142857142 56
Internationalization 0.4927536231884058 0.30434782608695654 0.2028985507246377 69
Logging messages 0.603448275862069 0.2260536398467433 0.17049808429118773 1566
Measure application performance 0.7719298245614035 0.14035087719298245 0.08771929824561403 57
Modernize old code 0.8852459016393442 0.06557377049180328 0.04918032786885246 61
Open file in native directory 0.5555555555555556 0.3333333333333333 0.1111111111111111 9
Parse text 0.6056547619047619 0.21577380952380953 0.17857142857142858 672
Pattern-match lines of a file 0.5643939393939394 0.2765151515151515 0.1590909090909091 264
Read jar version information 0.55 0.35 0.1 100
Recovering resources 0.8529411764705882 0.08823529411764706 0.058823529411764705 34
Recursive file listing 0.7322551662174304 0.16172506738544473 0.10601976639712489 1113
Replace a substring 0.5833333333333334 0.29797979797979796 0.11868686868686869 396
Representing money 0.7453183520599251 0.11423220973782772 0.1404494382022472 534
Send an email 0.5480952380952381 0.24047619047619048 0.21142857142857144 2100
Time execution speed 0.7111111111111111 0.2074074074074074 0.08148148148148149 135
Common Design PatternsYesNoUndecidedVotes
Abstract Factory 0.6982248520710059 0.16568047337278108 0.13609467455621302 169
Command objects 0.55 0.2 0.25 20
Factory methods 0.6240786240786241 0.21253071253071254 0.16339066339066338 814
Immutable objects 0.8110106820049302 0.09449465899753492 0.09449465899753492 1217
Lazy initialization 0.7551020408163265 0.1326530612244898 0.11224489795918367 196
Model Objects 0.6141732283464567 0.16535433070866143 0.2204724409448819 127
Plugin Factory 0.7 0.1 0.2 30
Private constructor 0.7352297592997812 0.14332603938730853 0.12144420131291028 914
Singleton 0.7246835443037974 0.17405063291139242 0.10126582278481013 316
Template method 0.7166666666666667 0.21666666666666667 0.06666666666666667 60
Type-Safe Enumerations 0.798469387755102 0.1096938775510204 0.09183673469387756 392
Wrapper (Decorator) 0.5963302752293578 0.26605504587155965 0.13761467889908258 109
Common PracticesYesNoUndecidedVotes
Avoid basic style errors 0.8536585365853658 0.07317073170731707 0.07317073170731707 123
Avoid raw types 0.763265306122449 0.16326530612244897 0.07346938775510205 245
Beware of instanceof operator 0.6149364406779662 0.23146186440677965 0.15360169491525424 1888
Class for constants 0.6337579617834395 0.23248407643312102 0.1337579617834395 942
Construct classes from the outside in 0.9130434782608695 0.057971014492753624 0.028985507246376812 69
Do not break portability 0.7466666666666667 0.18666666666666668 0.06666666666666667 75
Don't declare local variables before use 0.5585284280936454 0.2608695652173913 0.1806020066889632 299
Fields should usually be private 0.6507936507936508 0.20634920634920634 0.14285714285714285 126
Interface for constants 0.3212616822429907 0.5408878504672897 0.1378504672897196 856
Know the core libraries 0.7899159663865546 0.09243697478991597 0.11764705882352941 119
Minimize ripple effects 0.8716216216216216 0.033783783783783786 0.0945945945945946 148
Naming conventions 0.33060109289617484 0.5901639344262295 0.07923497267759563 366
Nest classes with care 0.5263157894736842 0.3157894736842105 0.15789473684210525 19
Output parameters 0.38308457711442784 0.39303482587064675 0.22388059701492538 201
Separate public and private members 0.7252747252747253 0.17582417582417584 0.0989010989010989 91
String concatenation does not scale 0.8484848484848485 0.09696969696969697 0.05454545454545454 165
Tag or marker interfaces 0.65748031496063 0.1889763779527559 0.15354330708661418 254
Uncommon classes need explicit imports 0.7672413793103449 0.13793103448275862 0.09482758620689655 116
Use @Override liberally 0.8315565031982942 0.09168443496801706 0.0767590618336887 469
Use final liberally 0.6096866096866097 0.22792022792022792 0.1623931623931624 702
Use javadoc liberally 0.7527472527472527 0.12637362637362637 0.12087912087912088 182
Use static imports rarely 0.5739014647137151 0.29161118508655126 0.13448735019973368 751
Use System.exit with care 0.6672 0.1888 0.144 625
Use Version Control tools 0.6666666666666666 0.13043478260869565 0.2028985507246377 69
Validate method arguments 0.6275303643724697 0.21862348178137653 0.15384615384615385 247
Wisdom, not rules 0.9622641509433962 0.018867924528301886 0.018867924528301886 53
InheritanceYesNoUndecidedVotes
Consider composition instead of subclassing 0.7752808988764045 0.07303370786516854 0.15168539325842698 178
Designing for subclassing 0.7534246575342466 0.136986301369863 0.1095890410958904 73
Overridable methods need special care 0.8217821782178217 0.06930693069306931 0.10891089108910891 101
Remember styles of inheritance 0.94 0.0 0.06 50
More Common PracticesYesNoUndecidedVotes
Avoid null if possible 0.6293929712460063 0.23003194888178913 0.14057507987220447 313
Beware of Byte Order Marks 0.6764705882352942 0.2647058823529412 0.058823529411764705 34
Beware of DecimalFormat 0.43169398907103823 0.31693989071038253 0.25136612021857924 183
Beware of floating point numbers 0.8790322580645161 0.08064516129032258 0.04032258064516129 124
Clarifying method 0.8865979381443299 0.07216494845360824 0.041237113402061855 97
Coding conventions 0.8631578947368421 0.05263157894736842 0.08421052631578947 95
Compile regular expressions once 0.7368421052631579 0.17543859649122806 0.08771929824561403 57
Conditional compile 0.502127659574468 0.3872340425531915 0.11063829787234042 235
Consider code generators 0.7564102564102564 0.14102564102564102 0.10256410256410256 78
Consider immutable forms for dates 0.47540983606557374 0.3770491803278688 0.14754098360655737 61
Conventional name for return value 0.7241379310344828 0.19310344827586207 0.08275862068965517 145
Defensive copying 0.8653061224489796 0.061224489795918366 0.07346938775510205 490
Design by Contract 0.8057142857142857 0.09142857142857143 0.10285714285714286 175
Don't use tab characters 0.35174418604651164 0.5959302325581395 0.05232558139534884 344
Extra space in argument list 0.1873873873873874 0.7549549549549549 0.05765765765765766 555
Generating unique IDs 0.5715900527505652 0.26978146194423513 0.1586284853051997 2654
Include 'from', exclude 'to' 0.7931034482758621 0.1206896551724138 0.08620689655172414 58
Multiple return statements 0.5458333333333333 0.33541666666666664 0.11875 480
Overloading can be tricky 0.7692307692307693 0.15384615384615385 0.07692307692307693 104
Package by feature, not layer 0.7222222222222222 0.12238325281803543 0.15539452495974235 1242
Passwords never in clear text 0.6575342465753424 0.17123287671232876 0.17123287671232876 146
Prefer empty items to null ones 0.6825775656324582 0.20763723150357996 0.10978520286396182 419
Quote dynamic text when logging 0.8181818181818182 0.12121212121212122 0.06060606060606061 99
Self-encapsulate fields 0.6354166666666666 0.16666666666666666 0.19791666666666666 192
Structs are occasionally useful 0.6666666666666666 0.16470588235294117 0.16862745098039217 255
Test using main method 0.37398373983739835 0.5203252032520326 0.10569105691056911 123
Try alternatives to ResourceBundle 0.34375 0.328125 0.328125 64
Use a fake system clock 0.5616438356164384 0.2465753424657534 0.1917808219178082 146
Use a testing framework (JUnit) 0.8305084745762712 0.1016949152542373 0.06779661016949153 118
Use Ant for build scripts 0.7333333333333333 0.14814814814814814 0.11851851851851852 270
Use boxing with care 0.6731707317073171 0.2097560975609756 0.11707317073170732 205
Use enums to restrict arguments 0.7266187050359713 0.1223021582733813 0.1510791366906475 139
Validate state with class invariants 0.5972222222222222 0.25 0.1527777777777778 72
Validation belongs in a Model Object 0.5755395683453237 0.30935251798561153 0.11510791366906475 139
AssertionsYesNoUndecidedVotes
Assert is for private arguments only 0.8163265306122449 0.1360544217687075 0.047619047619047616 147
Assert use cases 0.3588516746411483 0.4354066985645933 0.20574162679425836 209
Assertions in general 0.8571428571428571 0.14285714285714285 0.0 35
Force enabling of assertions 0.5689655172413793 0.27586206896551724 0.15517241379310345 58
ConstructorsYesNoUndecidedVotes
Avoid JavaBeans style of construction 0.6227436823104693 0.19133574007220217 0.18592057761732853 554
Beware of mistaken field redeclares 0.8387096774193549 0.0967741935483871 0.06451612903225806 31
Construct Object using class name 0.536697247706422 0.30275229357798167 0.16055045871559634 218
Constructors in general 0.64 0.26 0.1 50
Constructors shouldn't call overridables 0.5977653631284916 0.25139664804469275 0.15083798882681565 179
Constructors shouldn't start threads 0.7115384615384616 0.17307692307692307 0.11538461538461539 52
Copy constructors 0.6403574087862993 0.22338049143708116 0.13626209977661952 1343
Don't pass 'this' out of a constructor 0.6271186440677966 0.23728813559322035 0.13559322033898305 59
Initializing fields to 0-false-null is redundant 0.6753246753246753 0.22857142857142856 0.09610389610389611 385
SerializationYesNoUndecidedVotes
Implementing Serializable 0.630622009569378 0.1875598086124402 0.18181818181818182 1045
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.7391304347826086 0.11478260869565217 0.14608695652173914 575
Avoid ThreadGroup 0.5609756097560976 0.24390243902439024 0.1951219512195122 164
Data integrity first 0.7283950617283951 0.1111111111111111 0.16049382716049382 162
Document thread safety 0.7333333333333333 0.17777777777777778 0.08888888888888889 45
Dump thread information 0.8 0.16 0.04 25
Handle InterruptedException 0.6153846153846154 0.19230769230769232 0.19230769230769232 52
Launch thread is just another user thread 0.8378378378378378 0.08108108108108109 0.08108108108108109 37
Objects communicating across threads 0.6940298507462687 0.1791044776119403 0.12686567164179105 134
Perform N tasks in parallel 0.6023391812865497 0.18128654970760233 0.21637426900584794 342
Prefer modern libraries for concurrency 0.9473684210526315 0.05263157894736842 0.0 19
Query host for the number of processors 0.8823529411764706 0.08823529411764706 0.029411764705882353 34
Read-write locks 0.7075471698113207 0.1320754716981132 0.16037735849056603 106
Remember the types of intrinsic lock 0.7978339350180506 0.10830324909747292 0.09386281588447654 277
Schedule periodic tasks 0.6583291645822912 0.1965982991495748 0.14507253626813407 1999
Stop threads through cooperation 0.6333333333333333 0.2866666666666667 0.08 150
Synchronize access to mutable fields 0.558974358974359 0.28205128205128205 0.15897435897435896 195
Synchronized is implementation detail 0.6129032258064516 0.24731182795698925 0.13978494623655913 93
Thread priorities are not portable 0.6458333333333334 0.1875 0.16666666666666666 48
Use finally to unlock 0.8048780487804879 0.12195121951219512 0.07317073170731707 41
© 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 -