SlideShare uma empresa Scribd logo
1 de 83
Baixar para ler offline
Seven Ineffective
Coding Habits of
Many Programmers
@KevlinHenney
It turns out that style matters in
programming for the same
reason that it matters in writing.
It makes for better reading.
Douglas Crockford
JavaScript: The Good Parts
Noisy Code
Signal-to-noise ratio (often abbreviated SNR or
S/N) is a measure used in science and engineering
that compares the level of a desired signal to the
level of background noise.
Signal-to-noise ratio is sometimes used informally
to refer to the ratio of useful information to false or
irrelevant data in a conversation or exchange.
http://en.wikipedia.org/wiki/Signal_to_noise_ratio
To be, or not to be: that is the question:
Whether 'tis nobler in the mind to suffer
The slings and arrows of outrageous fortune,
Or to take arms against a sea of troubles,
And by opposing end them?
William Shakespeare
Hamlet
Continuing existence or cessation of
existence: those are the scenarios. Is it
more empowering mentally to work towards
an accommodation of the downsizings and
negative outcomes of adversarial
circumstance, or would it be a greater
enhancement of the bottom line to move
forwards to a challenge to our current
difficulties, and, by making a commitment
to opposition, to effect their demise?
Tom Burton
Long Words Bother Me
public class RecentlyUsedList
{
private List<string> items;
public RecentlyUsedList()
{
items = new List<string>();
}
public void Add(string newItem)
{
if (items.Contains(newItem))
{
int position = items.IndexOf(newItem);
string existingItem = items[position];
items.RemoveAt(position);
items.Insert(0, existingItem);
}
else
{
items.Insert(0, newItem);
}
}
public int Count
{
get
{
int size = items.Count;
return size;
}
}
public string this[int index]
{
get
{
int position = 0;
foreach (string item in items)
{
if (position == index)
return item;
++position;
}
throw new ArgumentOutOfRangeException();
}
}
}
public class RecentlyUsedList
{
private List<string> items;
public RecentlyUsedList()
{
items = new List<string>();
}
public void Add(string newItem)
{
if (items.Contains(newItem))
{
int position = items.IndexOf(newItem);
string existingItem = list[position];
items.RemoveAt(position);
items.Insert(0, existingItem);
}
else
{
items.Insert(0, newItem);
}
}
public int Count
{
get
{
int size = items.Count;
return size;
}
}
public string this[int index]
{
get
{
int position = 0;
foreach (string value in items)
{
if (position == index)
return value;
++position;
}
throw new ArgumentOutOfRangeException();
}
}
}
public class RecentlyUsedList
{
private List<string> items = new List<string>();
public void Add(string newItem)
{
items.Remove(newItem);
items.Add(newItem);
}
public int Count
{
get
{
return items.Count;
}
}
public string this[int index]
{
get
{
return items[Count - index - 1];
}
}
}
Comments
A delicate matter, requiring taste and judgement. I tend to err on the side of
eliminating comments, for several reasons. First, if the code is clear, and uses
good type names and variable names, it should explain itself. Second, comments
aren't checked by the compiler, so there is no guarantee they're right, especially
after the code is modified. A misleading comment can be very confusing. Third,
the issue of typography: comments clutter code.
Rob Pike, "Notes on Programming in C"
There is a famously bad comment style:
i=i+1; /* Add one to i */
and there are worse ways to do it:
/**********************************
* *
* Add one to i *
* *
**********************************/
i=i+1;
Don't laugh now, wait until you see it in real life.
Rob Pike, "Notes on Programming in C"
A common fallacy is to assume authors
of incomprehensible code will somehow
be able to express themselves lucidly
and clearly in comments.
Kevlin Henney
https://twitter.com/KevlinHenney/status/381021802941906944
Unsustainable Spacing
To be, or not to be: that is the question:
Whether 'tis nobler in the mind to suffer
The slings and arrows of outrageous fortune,
Or to take arms against a sea of troubles,
And by opposing end them?
William Shakespeare
Hamlet
Continuing existence or cessation of
existence: those are the scenarios. Is it
more empowering mentally to work towards
an accommodation of the downsizings and
negative outcomes of adversarial
circumstance, or would it be a greater
enhancement of the bottom line to move
forwards to a challenge to our current
difficulties, and, by making a commitment
to opposition, to effect their demise?
Tom Burton
Long Words Bother Me
Continuing existence or cessation of existence:
those are the
more empowe
to work towa
accommodati
downsizings
outcomes of
circumstance
a greater enh
the bottom li
forwards to a
our current d
by making a
opposition, t
demise?
How many programmers lay out their code
Column 80
How people read
To answer the question "What is clean design?"
most succinctly: a clean design is one that
supports visual thinking so people can meet their
informational needs with a minimum of
conscious effort.
Daniel Higginbotham ∙ "Clean Up Your Mess — A Guide to Visual Design for Everyone" ∙ http://www.visualmess.com/
You convey information by the way you arrange
a design's elements in relation to each other. This
information is understood immediately, if not
consciously, by the people viewing your designs.
Daniel Higginbotham ∙ "Clean Up Your Mess — A Guide to Visual Design for Everyone" ∙ http://www.visualmess.com/
This is great if the visual relationships are
obvious and accurate, but if they're not, your
audience is going to get confused. They'll have to
examine your work carefully, going back and
forth between the different parts to make sure
they understand.
Daniel Higginbotham ∙ "Clean Up Your Mess — A Guide to Visual Design for Everyone" ∙ http://www.visualmess.com/
public int howNotToLayoutAMethodHeader(int firstArgument,
String secondArgument)
public int ensureArgumentsAreAlignedLikeThis(
int firstArgument,
String secondArgument)
public int orEnsureArgumentsAreGroupedLikeThis(
int firstArgument, String secondArgument)
public int butNotAlignedLikeThis(int firstArgument,
String secondArgument)
int doNotFormat = likeThis(someArgumentOrExpression,
anotherArgumentOrExpression);
int insteadFormat =
somethingLikeThis(
someArgumentOrExpression,
anotherArgumentOrExpression);
int orFormat = somethingLikeThis(
someArgumentOrExpression,
anotherArgumentOrExpression);
int asItIs = unstable(someArgumentOrExpression,
anotherArgumentOrExpression);
int butThisIs =
stable(
someArgumentOrExpression,
anotherArgumentOrExpression);
int andThisIs = stable(
someArgumentOrExpression,
anotherArgumentOrExpression);
public ResultType arbitraryMethodName(FirstArgumentType firs
SecondArgumentType sec
ThirdArgumentType thir
LocalVariableType localVariable = method(firstArgument,
secondArgument)
if (localVariable.isSomething(thirdArgument,
SOME_SHOUTY_CONSTANT)) {
doSomethingWith(localVariable);
}
return localVariable.getSomething();
}
public ResultType arbitraryMethodName(
FirstArgumentType firstArgument,
SecondArgumentType secondArgument,
ThirdArgumentType thirdArgument) {
LocalVariableType localVariable =
method(firstArgument, secondArgument);
if (localVariable.isSomething(
thirdArgument, SOME_SHOUTY_CONSTANT)) {
doSomething(localVariable);
}
return localVariable.getSomething();
}
XXXXXX XXXXXXXXXX XXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXX XXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXX XXXXXXXXXXXXX
XXXXXXXXXXXXXXXXX XXXXXXXXXXXXX
XXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXX
XX XXXXXXXXXXXXX XXXXXXXXXXX
XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXX XXXXXXXXXXXXX
XXXXXX XXXXXXXXXXXXX XXXXXXXXXXXX
public ResultType arbitraryMethodName(
FirstArgumentType firstArgument,
SecondArgumentType secondArgument,
ThirdArgumentType thirdArgument) {
LocalVariableType localVariable =
method(firstArgument, secondArgument);
if (localVariable.isSomething(
thirdArgument, SOME_SHOUTY_CONSTANT)) {
doSomething(localVariable);
}
return localVariable.getSomething();
}
XXXXXX XXXXXXXXXX XXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXX XXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXX XXXXXXXXXXXXX
XXXXXXXXXXXXXXXXX XXXXXXXXXXXXX
XXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXX
XX XXXXXXXXXXXXX XXXXXXXXXXX
XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXX XXXXXXXXXXXXX
XXXXXX XXXXXXXXXXXXX XXXXXXXXXXXX
public ResultType arbitraryMethodName(
FirstArgumentType firstArgument,
SecondArgumentType secondArgument,
ThirdArgumentType thirdArgument)
{
LocalVariableType localVariable =
method(firstArgument, secondArgument);
if (localVariable.isSomething(
thirdArgument, SOME_SHOUTY_CONSTANT))
{
doSomething(localVariable);
}
return localVariable.getSomething();
}
XXXXXX XXXXXXXXXX XXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXX XXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXX XXXXXXXXXXXXX
XXXXXXXXXXXXXXXXX XXXXXXXXXXXXX
XXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXX
XX XXXXXXXXXXXXX XXXXXXXXXXX
XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXX XXXXXXXXXXXXX
XXXXXX XXXXXXXXXXXXX XXXXXXXXXXXX
Lego Naming
Agglutination is a process in linguistic morphology
derivation in which complex words are formed by
stringing together morphemes, each with a single
grammatical or semantic meaning. Languages that
use agglutination widely are called agglutinative
languages.
http://en.wikipedia.org/wiki/Agglutination
Proxy
validate
Service
Value
get
create
Manager
check
Controller
set
Factory
Object
doenable
process
disable
Exception
add
remove
public interface ConditionChecker
{
boolean checkCondition();
}
public interface Condition
{
boolean isTrue();
}
public Connection createConnection(Provider...)
throws ConnectionFailureException
...
public Connection connectTo(Provider...)
throws ConnectionFailure
...
AccessViolationException
ArgumentOutOfRangeException
ArrayTypeMismatchException
BadImageFormatException
CannotUnloadAppDomainException
EntryPointNotFoundException
IndexOutOfRangeException
InvalidOperationException
OverflowException
AccessViolation
ArgumentOutOfRange
ArrayTypeMismatch
BadImageFormat
CannotUnloadAppDomain
EntryPointNotFound
IndexOutOfRange
InvalidOperation
Overflow
ArgumentException
ArithmeticException
ContextMarshalException
FieldAccessException
FormatException
NullReferenceException
ObjectDisposedException
RankException
TypeAccessException
Argument
Arithmetic
ContextMarshal
FieldAccess
Format
NullReference
ObjectDisposed
Rank
TypeAccess
InvalidArgument
InvalidArithmeticOperation
FailedContextMarshal
InvalidFieldAccess
InvalidFormat
NullDereferenced
OperationOnDisposedObject
ArrayRankMismatch
InvalidTypeAccess
Omit needless words.
William Strunk and E B White
The Elements of Style
Underabstraction
http://fragmental.tw/2009/04/29/tag-clouds-see-how-noisy-your-code-is/
http://fragmental.tw/2009/04/29/tag-clouds-see-how-noisy-your-code-is/
if (portfolioIdsByTraderId.get(trader.getId())
.containsKey(portfolio.getId()))
{
...
}
Dan North, "Code in the Language of the Domain"
97 Things Every Programmer Should Know
if (trader.canView(portfolio))
{
...
}
Dan North, "Code in the Language of the Domain"
97 Things Every Programmer Should Know
Unencapsulated State
public class RecentlyUsedList
{
private List<string> items = new List<string>();
public List<string> Items
{
get
{
return items;
}
}
public void Add(string newItem)
{
if(newItem == null)
throw new ArgumentNullException();
items.Remove(newItem);
items.Insert(0, newItem);
}
...
}
public class RecentlyUsedList
{
private List<string> items = new List<string>();
public List<string> Items
{
get
{
return items;
}
}
public void Add(string newItem)
{
if(newItem == null)
throw new ArgumentNullException();
items.Remove(newItem);
items.Insert(0, newItem);
}
...
}
public class RecentlyUsedList
{
private List<string> items = new List<string>();
public List<string> Items
{
get
{
return items;
}
}
public void Add(string newItem)
{
if(newItem == null)
throw new ArgumentNullException();
items.Remove(newItem);
items.Insert(0, newItem);
}
...
}
var list = new RecentlyUsedList();
list.Add("Hello, World!");
Console.WriteLine(list.Items.Count);
list.Items.Add("Hello, World!");
Console.WriteLine(list.Items.Count);
list.Items.Add(null);
Don't ever invite a
vampire into your
house, you silly boy.
It renders you
powerless.
public class RecentlyUsedList
{
private IList<string> items = new List<string>();
public int Count
{
get
{
return items.Count;
}
}
public string this[int index]
{
get
{
return items[index];
}
}
public void Add(string newItem)
{
if(newItem == null)
throw new ArgumentNullException();
items.Remove(newItem);
items.Insert(0, newItem);
}
...
}
public class RecentlyUsedList
{
private IList<string> items = new List<string>();
public int Count
{
get
{
return items.Count;
}
}
public string this[int index]
{
get
{
return items[Count – index - 1];
}
}
public void Add(string newItem)
{
if(newItem == null)
throw new ArgumentNullException();
items.Remove(newItem);
items.Add(newItem);
}
...
}
Getters and Setters
public class Money implements ...
{
...
public int getUnits() ...
public int getHundredths() ...
public Currency getCurrency() ...
...
public void setUnits(int newUnits) ...
public void setHundredths(int newHundredths) ...
public void setCurrency(Currency newCurrency) ...
...
}
public final class Money implements ...
{
...
public int getUnits() ...
public int getHundredths() ...
public Currency getCurrency() ...
...
}
public final class Money implements ...
{
...
public int units() ...
public int hundredths() ...
public Currency currency() ...
...
}
When it is not
necessary to
change, it is
necessary not to
change.
Lucius Cary
Uncohesive Tests
Everybody knows that TDD stands for Test Driven
Development. However, people too often concentrate
on the words "Test" and "Development" and don't
consider what the word "Driven" really implies. For
tests to drive development they must do more than
just test that code performs its required functionality:
they must clearly express that required functionality
to the reader. That is, they must be clear specifications
of the required functionality. Tests that are not written
with their role as specifications in mind can be very
confusing to read.
Nat Pryce and Steve Freeman
"Are Your Tests Really Driving Your Development?"
public class RecentlyUsedList
{
...
public RecentlyUsedList() ...
public int Count
{
get...
}
public string this[int index]
{
get...
}
public void Add(string newItem) ...
...
}
[TestFixture]
public class RecentlyUsedListTests
{
[Test]
public void TestConstructor() ...
[Test]
public void TestCountGet() ...
[Test]
public void TestIndexerGet() ...
[Test]
public void TestAdd() ...
...
}
methodtest
test
test
method
method
test
test
namespace RecentlyUsedList_spec
{
[TestFixture]
public class A_new_list
{
[Test] public void Is_empty() 
}
[TestFixture]
public class An_empty_list
{
[Test] public void Retains_a_single_addition() 
[Test] public void Retains_unique_additions_in_stack_order() 
}
[TestFixture]
public class A_non_empty_list
{
[Test] public void Is_unchanged_when_head_item_is_readded() 
[Test] public void Moves_non_head_item_to_head_when_it_is_readded() 
}
[TestFixture]
public class Any_list_rejects
{
[Test] public void Addition_of_null_items() 
[Test] public void Indexing_past_its_end() 
[Test] public void Negative_indexing() 
}
}
namespace RecentlyUsedList_spec
{
[TestFixture]
public class A_new_list
{
[Test] public void Is_empty() 
}
[TestFixture]
public class An_empty_list
{
[Test] public void Retains_a_single_addition() 
[Test] public void Retains_unique_additions_in_stack_order() 
}
[TestFixture]
public class A_non_empty_list
{
[Test] public void Is_unchanged_when_head_item_is_readded() 
[Test] public void Moves_non_head_item_to_head_when_it_is_readded() 
}
[TestFixture]
public class Any_list_rejects
{
[Test] public void Addition_of_null_items() 
[Test] public void Indexing_past_its_end() 
[Test] public void Negative_indexing() 
}
}
A test case should
be just that: it
should correspond
to a single case.
At some level
the style
becomes the
substance.

Mais conteúdo relacionado

Mais procurados

AI App Pitch Deck
AI App Pitch DeckAI App Pitch Deck
AI App Pitch DeckKinLTrung18
 
Ladder - "crown jewel" of insurtech nabs $100M
Ladder - "crown jewel" of insurtech nabs $100MLadder - "crown jewel" of insurtech nabs $100M
Ladder - "crown jewel" of insurtech nabs $100MPitch Decks
 
Pitch Deck Teardown: Laoshi's $570K Angel deck
Pitch Deck Teardown: Laoshi's $570K Angel deckPitch Deck Teardown: Laoshi's $570K Angel deck
Pitch Deck Teardown: Laoshi's $570K Angel deckHajeJanKamps
 
Y Combinator Pitch Deck Template For Startup Founders
Y Combinator Pitch Deck Template For Startup FoundersY Combinator Pitch Deck Template For Startup Founders
Y Combinator Pitch Deck Template For Startup FoundersAA BB
 
Pitch Deck Teardown: Oii.ai's $1.9M Seed deck
Pitch Deck Teardown: Oii.ai's $1.9M Seed deckPitch Deck Teardown: Oii.ai's $1.9M Seed deck
Pitch Deck Teardown: Oii.ai's $1.9M Seed deckHajeJanKamps
 
Pitch Deck Teardown: Tanbii's $1.5M Pre-seed deck
Pitch Deck Teardown: Tanbii's $1.5M Pre-seed deckPitch Deck Teardown: Tanbii's $1.5M Pre-seed deck
Pitch Deck Teardown: Tanbii's $1.5M Pre-seed deckHajeJanKamps
 
Pitch Deck Teardown: Fibery's $5.2M Series A deck
Pitch Deck Teardown: Fibery's $5.2M Series A deckPitch Deck Teardown: Fibery's $5.2M Series A deck
Pitch Deck Teardown: Fibery's $5.2M Series A deckHajeJanKamps
 
Aircall - NOAH19 Berlin
Aircall - NOAH19 BerlinAircall - NOAH19 Berlin
Aircall - NOAH19 BerlinNOAH Advisors
 
Airbyte - Seed deck
Airbyte  - Seed deckAirbyte  - Seed deck
Airbyte - Seed deckAirbyte
 
Publishing Production: From the Desktop to the Cloud
Publishing Production: From the Desktop to the CloudPublishing Production: From the Desktop to the Cloud
Publishing Production: From the Desktop to the CloudDeanta
 
Dropbox's original pitch deck
Dropbox's original pitch deckDropbox's original pitch deck
Dropbox's original pitch deckPitch Decks
 
Launchrock Pitch Deck
Launchrock Pitch DeckLaunchrock Pitch Deck
Launchrock Pitch Deckstartuphome
 
Pitch Deck Teardown: Card Blanch's $460K Angel deck
Pitch Deck Teardown: Card Blanch's $460K Angel deckPitch Deck Teardown: Card Blanch's $460K Angel deck
Pitch Deck Teardown: Card Blanch's $460K Angel deckHajeJanKamps
 
Pitch Deck Teardown: Faye's $10M Series A deck
Pitch Deck Teardown: Faye's $10M Series A deckPitch Deck Teardown: Faye's $10M Series A deck
Pitch Deck Teardown: Faye's $10M Series A deckHajeJanKamps
 
Key Metrics for Product-led SaaS with Unusual Ventures
Key Metrics for Product-led SaaS with Unusual VenturesKey Metrics for Product-led SaaS with Unusual Ventures
Key Metrics for Product-led SaaS with Unusual Venturessaastr
 
Pitch Deck Teardown: DeckMatch's $1M Seed deck
Pitch Deck Teardown: DeckMatch's $1M Seed deckPitch Deck Teardown: DeckMatch's $1M Seed deck
Pitch Deck Teardown: DeckMatch's $1M Seed deckHajeJanKamps
 
Pitch Deck Teardown: Netmaker's $2.3M Seed deck
Pitch Deck Teardown: Netmaker's $2.3M Seed deckPitch Deck Teardown: Netmaker's $2.3M Seed deck
Pitch Deck Teardown: Netmaker's $2.3M Seed deckHajeJanKamps
 
MySQL fundraising pitch deck ($16 million Series B round - 2003)
MySQL fundraising pitch deck ($16 million Series B round - 2003)MySQL fundraising pitch deck ($16 million Series B round - 2003)
MySQL fundraising pitch deck ($16 million Series B round - 2003)Robin Wauters
 

Mais procurados (20)

AI App Pitch Deck
AI App Pitch DeckAI App Pitch Deck
AI App Pitch Deck
 
Ladder - "crown jewel" of insurtech nabs $100M
Ladder - "crown jewel" of insurtech nabs $100MLadder - "crown jewel" of insurtech nabs $100M
Ladder - "crown jewel" of insurtech nabs $100M
 
Pitch Deck Teardown: Laoshi's $570K Angel deck
Pitch Deck Teardown: Laoshi's $570K Angel deckPitch Deck Teardown: Laoshi's $570K Angel deck
Pitch Deck Teardown: Laoshi's $570K Angel deck
 
Y Combinator Pitch Deck Template For Startup Founders
Y Combinator Pitch Deck Template For Startup FoundersY Combinator Pitch Deck Template For Startup Founders
Y Combinator Pitch Deck Template For Startup Founders
 
Pitch Deck Teardown: Oii.ai's $1.9M Seed deck
Pitch Deck Teardown: Oii.ai's $1.9M Seed deckPitch Deck Teardown: Oii.ai's $1.9M Seed deck
Pitch Deck Teardown: Oii.ai's $1.9M Seed deck
 
Pitch Deck Teardown: Tanbii's $1.5M Pre-seed deck
Pitch Deck Teardown: Tanbii's $1.5M Pre-seed deckPitch Deck Teardown: Tanbii's $1.5M Pre-seed deck
Pitch Deck Teardown: Tanbii's $1.5M Pre-seed deck
 
Pitch Deck Teardown: Fibery's $5.2M Series A deck
Pitch Deck Teardown: Fibery's $5.2M Series A deckPitch Deck Teardown: Fibery's $5.2M Series A deck
Pitch Deck Teardown: Fibery's $5.2M Series A deck
 
Aircall - NOAH19 Berlin
Aircall - NOAH19 BerlinAircall - NOAH19 Berlin
Aircall - NOAH19 Berlin
 
Airbyte - Seed deck
Airbyte  - Seed deckAirbyte  - Seed deck
Airbyte - Seed deck
 
task.ly pitch deck
task.ly pitch decktask.ly pitch deck
task.ly pitch deck
 
Publishing Production: From the Desktop to the Cloud
Publishing Production: From the Desktop to the CloudPublishing Production: From the Desktop to the Cloud
Publishing Production: From the Desktop to the Cloud
 
Dropbox's original pitch deck
Dropbox's original pitch deckDropbox's original pitch deck
Dropbox's original pitch deck
 
Launchrock Pitch Deck
Launchrock Pitch DeckLaunchrock Pitch Deck
Launchrock Pitch Deck
 
Pitch Deck Teardown: Card Blanch's $460K Angel deck
Pitch Deck Teardown: Card Blanch's $460K Angel deckPitch Deck Teardown: Card Blanch's $460K Angel deck
Pitch Deck Teardown: Card Blanch's $460K Angel deck
 
Pitch Deck Teardown: Faye's $10M Series A deck
Pitch Deck Teardown: Faye's $10M Series A deckPitch Deck Teardown: Faye's $10M Series A deck
Pitch Deck Teardown: Faye's $10M Series A deck
 
Key Metrics for Product-led SaaS with Unusual Ventures
Key Metrics for Product-led SaaS with Unusual VenturesKey Metrics for Product-led SaaS with Unusual Ventures
Key Metrics for Product-led SaaS with Unusual Ventures
 
Pitch Deck Teardown: DeckMatch's $1M Seed deck
Pitch Deck Teardown: DeckMatch's $1M Seed deckPitch Deck Teardown: DeckMatch's $1M Seed deck
Pitch Deck Teardown: DeckMatch's $1M Seed deck
 
Pitch Deck Teardown: Netmaker's $2.3M Seed deck
Pitch Deck Teardown: Netmaker's $2.3M Seed deckPitch Deck Teardown: Netmaker's $2.3M Seed deck
Pitch Deck Teardown: Netmaker's $2.3M Seed deck
 
Rewind Pitch Deck
Rewind Pitch DeckRewind Pitch Deck
Rewind Pitch Deck
 
MySQL fundraising pitch deck ($16 million Series B round - 2003)
MySQL fundraising pitch deck ($16 million Series B round - 2003)MySQL fundraising pitch deck ($16 million Series B round - 2003)
MySQL fundraising pitch deck ($16 million Series B round - 2003)
 

Destaque

Worse Is Better, for Better or for Worse
Worse Is Better, for Better or for WorseWorse Is Better, for Better or for Worse
Worse Is Better, for Better or for WorseKevlin Henney
 
Clean code, Feb 2012
Clean code, Feb 2012Clean code, Feb 2012
Clean code, Feb 2012cobyst
 
Clean code: meaningful Name
Clean code: meaningful NameClean code: meaningful Name
Clean code: meaningful Namenahid035
 
Scub Foundation, usine logicielle Java libre
Scub Foundation, usine logicielle Java libreScub Foundation, usine logicielle Java libre
Scub Foundation, usine logicielle Java libreStéphane Traumat
 
ERTS 2008 - Using Linux for industrial projects
ERTS 2008 - Using Linux for industrial projectsERTS 2008 - Using Linux for industrial projects
ERTS 2008 - Using Linux for industrial projectsChristian Charreyre
 
ERTS 2008 - Using Linux for industrial projects
ERTS 2008 - Using Linux for industrial projectsERTS 2008 - Using Linux for industrial projects
ERTS 2008 - Using Linux for industrial projectsChristian Charreyre
 
BibBase Linked Data Triplification Challenge 2010 Presentation
BibBase Linked Data Triplification Challenge 2010 PresentationBibBase Linked Data Triplification Challenge 2010 Presentation
BibBase Linked Data Triplification Challenge 2010 PresentationReynold Xin
 
Comment travailler avec les logiciels Open Source
Comment travailler avec les logiciels Open SourceComment travailler avec les logiciels Open Source
Comment travailler avec les logiciels Open SourceChristian Charreyre
 
Créer une distribution Linux embarqué professionnelle avec Yocto Project
Créer une distribution Linux embarqué professionnelle avec Yocto ProjectCréer une distribution Linux embarqué professionnelle avec Yocto Project
Créer une distribution Linux embarqué professionnelle avec Yocto ProjectChristian Charreyre
 
A System Is Not a Tree
A System Is Not a TreeA System Is Not a Tree
A System Is Not a TreeKevlin Henney
 
Yocto une solution robuste pour construire des applications à fort contenu ap...
Yocto une solution robuste pour construire des applications à fort contenu ap...Yocto une solution robuste pour construire des applications à fort contenu ap...
Yocto une solution robuste pour construire des applications à fort contenu ap...Christian Charreyre
 
Présentation Yocto - SophiaConf 2015
Présentation Yocto - SophiaConf 2015Présentation Yocto - SophiaConf 2015
Présentation Yocto - SophiaConf 2015Christian Charreyre
 
Open Embedded un framework libre pour assurer la cohérence de son projet
Open Embedded un framework libre pour assurer la cohérence de son projetOpen Embedded un framework libre pour assurer la cohérence de son projet
Open Embedded un framework libre pour assurer la cohérence de son projetChristian Charreyre
 
Using heka
Using hekaUsing heka
Using hekaExotel
 
Python Foundation – A programmer's introduction to Python concepts & style
Python Foundation – A programmer's introduction to Python concepts & stylePython Foundation – A programmer's introduction to Python concepts & style
Python Foundation – A programmer's introduction to Python concepts & styleKevlin Henney
 

Destaque (20)

Functional C++
Functional C++Functional C++
Functional C++
 
Worse Is Better, for Better or for Worse
Worse Is Better, for Better or for WorseWorse Is Better, for Better or for Worse
Worse Is Better, for Better or for Worse
 
Clean code, Feb 2012
Clean code, Feb 2012Clean code, Feb 2012
Clean code, Feb 2012
 
Clean code: meaningful Name
Clean code: meaningful NameClean code: meaningful Name
Clean code: meaningful Name
 
Scub Foundation, usine logicielle Java libre
Scub Foundation, usine logicielle Java libreScub Foundation, usine logicielle Java libre
Scub Foundation, usine logicielle Java libre
 
Clean architectures
Clean architecturesClean architectures
Clean architectures
 
ERTS 2008 - Using Linux for industrial projects
ERTS 2008 - Using Linux for industrial projectsERTS 2008 - Using Linux for industrial projects
ERTS 2008 - Using Linux for industrial projects
 
ERTS 2008 - Using Linux for industrial projects
ERTS 2008 - Using Linux for industrial projectsERTS 2008 - Using Linux for industrial projects
ERTS 2008 - Using Linux for industrial projects
 
Meetup Systemd vs sysvinit
Meetup Systemd vs sysvinitMeetup Systemd vs sysvinit
Meetup Systemd vs sysvinit
 
BibBase Linked Data Triplification Challenge 2010 Presentation
BibBase Linked Data Triplification Challenge 2010 PresentationBibBase Linked Data Triplification Challenge 2010 Presentation
BibBase Linked Data Triplification Challenge 2010 Presentation
 
Comment travailler avec les logiciels Open Source
Comment travailler avec les logiciels Open SourceComment travailler avec les logiciels Open Source
Comment travailler avec les logiciels Open Source
 
Créer une distribution Linux embarqué professionnelle avec Yocto Project
Créer une distribution Linux embarqué professionnelle avec Yocto ProjectCréer une distribution Linux embarqué professionnelle avec Yocto Project
Créer une distribution Linux embarqué professionnelle avec Yocto Project
 
A System Is Not a Tree
A System Is Not a TreeA System Is Not a Tree
A System Is Not a Tree
 
Yocto une solution robuste pour construire des applications à fort contenu ap...
Yocto une solution robuste pour construire des applications à fort contenu ap...Yocto une solution robuste pour construire des applications à fort contenu ap...
Yocto une solution robuste pour construire des applications à fort contenu ap...
 
Présentation Yocto - SophiaConf 2015
Présentation Yocto - SophiaConf 2015Présentation Yocto - SophiaConf 2015
Présentation Yocto - SophiaConf 2015
 
Open Embedded un framework libre pour assurer la cohérence de son projet
Open Embedded un framework libre pour assurer la cohérence de son projetOpen Embedded un framework libre pour assurer la cohérence de son projet
Open Embedded un framework libre pour assurer la cohérence de son projet
 
OS libres pour l'IoT - Zephyr
OS libres pour l'IoT - ZephyrOS libres pour l'IoT - Zephyr
OS libres pour l'IoT - Zephyr
 
Autotools
AutotoolsAutotools
Autotools
 
Using heka
Using hekaUsing heka
Using heka
 
Python Foundation – A programmer's introduction to Python concepts & style
Python Foundation – A programmer's introduction to Python concepts & stylePython Foundation – A programmer's introduction to Python concepts & style
Python Foundation – A programmer's introduction to Python concepts & style
 

Semelhante a Seven Ineffective Coding Habits of Many Programmers

Seven Ineffective Coding Habits of Many Programmers
Seven Ineffective Coding Habits of Many ProgrammersSeven Ineffective Coding Habits of Many Programmers
Seven Ineffective Coding Habits of Many ProgrammersKevlin Henney
 
Seven Ineffective Coding Habits of Many Java Programmers
Seven Ineffective Coding Habits of Many Java ProgrammersSeven Ineffective Coding Habits of Many Java Programmers
Seven Ineffective Coding Habits of Many Java ProgrammersKevlin Henney
 
Seven Ineffective Coding Habits of Many Programmers
Seven Ineffective Coding Habits of Many ProgrammersSeven Ineffective Coding Habits of Many Programmers
Seven Ineffective Coding Habits of Many ProgrammersKevlin Henney
 
Seven Ineffective Coding Habits of Many Programmers
Seven Ineffective Coding Habits of Many ProgrammersSeven Ineffective Coding Habits of Many Programmers
Seven Ineffective Coding Habits of Many ProgrammersKevlin Henney
 
Turning Development Outside-In
Turning Development Outside-InTurning Development Outside-In
Turning Development Outside-InKevlin Henney
 
Incompleteness Theorems: Logical Necessity of Inconsistency
Incompleteness Theorems:  Logical Necessity of InconsistencyIncompleteness Theorems:  Logical Necessity of Inconsistency
Incompleteness Theorems: Logical Necessity of InconsistencyCarl Hewitt
 
Giving Code a Good Name
Giving Code a Good NameGiving Code a Good Name
Giving Code a Good NameKevlin Henney
 
Intuition & Use-Cases of Embeddings in NLP & beyond
Intuition & Use-Cases of Embeddings in NLP & beyondIntuition & Use-Cases of Embeddings in NLP & beyond
Intuition & Use-Cases of Embeddings in NLP & beyondC4Media
 
Causal inference-for-profit | Dan McKinley | DN18
Causal inference-for-profit | Dan McKinley | DN18Causal inference-for-profit | Dan McKinley | DN18
Causal inference-for-profit | Dan McKinley | DN18DataconomyGmbH
 
DN18 | A/B Testing: Lessons Learned | Dan McKinley | Mailchimp
DN18 | A/B Testing: Lessons Learned | Dan McKinley | MailchimpDN18 | A/B Testing: Lessons Learned | Dan McKinley | Mailchimp
DN18 | A/B Testing: Lessons Learned | Dan McKinley | MailchimpDataconomy Media
 
NDC 2011 - The FLUID Principles
NDC 2011 - The FLUID PrinciplesNDC 2011 - The FLUID Principles
NDC 2011 - The FLUID Principlesanoras
 
Experiments in Reasoning
Experiments in ReasoningExperiments in Reasoning
Experiments in ReasoningAslam Khan
 
Mike Kotsur - What can philosophy teach us about programming - Codemotion Ams...
Mike Kotsur - What can philosophy teach us about programming - Codemotion Ams...Mike Kotsur - What can philosophy teach us about programming - Codemotion Ams...
Mike Kotsur - What can philosophy teach us about programming - Codemotion Ams...Codemotion
 
Everything you always wanted to know about psychology and technical communica...
Everything you always wanted to know about psychology and technical communica...Everything you always wanted to know about psychology and technical communica...
Everything you always wanted to know about psychology and technical communica...Chris Atherton @finiteattention
 
Diagnosing cancer with Computational Intelligence
Diagnosing cancer with Computational IntelligenceDiagnosing cancer with Computational Intelligence
Diagnosing cancer with Computational IntelligenceSimon van Dyk
 
2013 - Andrei Zmievski: Machine learning para datos
2013 - Andrei Zmievski: Machine learning para datos2013 - Andrei Zmievski: Machine learning para datos
2013 - Andrei Zmievski: Machine learning para datosPHP Conference Argentina
 
KevlinHenney_PuttingThereIntoArchitecture
KevlinHenney_PuttingThereIntoArchitectureKevlinHenney_PuttingThereIntoArchitecture
KevlinHenney_PuttingThereIntoArchitectureKostas Mavridis
 
Why Agile Works But Isn't Working For You
Why Agile Works But Isn't Working For YouWhy Agile Works But Isn't Working For You
Why Agile Works But Isn't Working For YouDavid Harvey
 

Semelhante a Seven Ineffective Coding Habits of Many Programmers (20)

Seven Ineffective Coding Habits of Many Programmers
Seven Ineffective Coding Habits of Many ProgrammersSeven Ineffective Coding Habits of Many Programmers
Seven Ineffective Coding Habits of Many Programmers
 
Seven Ineffective Coding Habits of Many Java Programmers
Seven Ineffective Coding Habits of Many Java ProgrammersSeven Ineffective Coding Habits of Many Java Programmers
Seven Ineffective Coding Habits of Many Java Programmers
 
Seven Ineffective Coding Habits of Many Programmers
Seven Ineffective Coding Habits of Many ProgrammersSeven Ineffective Coding Habits of Many Programmers
Seven Ineffective Coding Habits of Many Programmers
 
Seven Ineffective Coding Habits of Many Programmers
Seven Ineffective Coding Habits of Many ProgrammersSeven Ineffective Coding Habits of Many Programmers
Seven Ineffective Coding Habits of Many Programmers
 
Turning Development Outside-In
Turning Development Outside-InTurning Development Outside-In
Turning Development Outside-In
 
Incompleteness Theorems: Logical Necessity of Inconsistency
Incompleteness Theorems:  Logical Necessity of InconsistencyIncompleteness Theorems:  Logical Necessity of Inconsistency
Incompleteness Theorems: Logical Necessity of Inconsistency
 
Giving Code a Good Name
Giving Code a Good NameGiving Code a Good Name
Giving Code a Good Name
 
Intuition & Use-Cases of Embeddings in NLP & beyond
Intuition & Use-Cases of Embeddings in NLP & beyondIntuition & Use-Cases of Embeddings in NLP & beyond
Intuition & Use-Cases of Embeddings in NLP & beyond
 
The Rule of Three
The Rule of ThreeThe Rule of Three
The Rule of Three
 
Causal inference-for-profit | Dan McKinley | DN18
Causal inference-for-profit | Dan McKinley | DN18Causal inference-for-profit | Dan McKinley | DN18
Causal inference-for-profit | Dan McKinley | DN18
 
DN18 | A/B Testing: Lessons Learned | Dan McKinley | Mailchimp
DN18 | A/B Testing: Lessons Learned | Dan McKinley | MailchimpDN18 | A/B Testing: Lessons Learned | Dan McKinley | Mailchimp
DN18 | A/B Testing: Lessons Learned | Dan McKinley | Mailchimp
 
NDC 2011 - The FLUID Principles
NDC 2011 - The FLUID PrinciplesNDC 2011 - The FLUID Principles
NDC 2011 - The FLUID Principles
 
Design Patterns: Back to Basics
Design Patterns: Back to BasicsDesign Patterns: Back to Basics
Design Patterns: Back to Basics
 
Experiments in Reasoning
Experiments in ReasoningExperiments in Reasoning
Experiments in Reasoning
 
Mike Kotsur - What can philosophy teach us about programming - Codemotion Ams...
Mike Kotsur - What can philosophy teach us about programming - Codemotion Ams...Mike Kotsur - What can philosophy teach us about programming - Codemotion Ams...
Mike Kotsur - What can philosophy teach us about programming - Codemotion Ams...
 
Everything you always wanted to know about psychology and technical communica...
Everything you always wanted to know about psychology and technical communica...Everything you always wanted to know about psychology and technical communica...
Everything you always wanted to know about psychology and technical communica...
 
Diagnosing cancer with Computational Intelligence
Diagnosing cancer with Computational IntelligenceDiagnosing cancer with Computational Intelligence
Diagnosing cancer with Computational Intelligence
 
2013 - Andrei Zmievski: Machine learning para datos
2013 - Andrei Zmievski: Machine learning para datos2013 - Andrei Zmievski: Machine learning para datos
2013 - Andrei Zmievski: Machine learning para datos
 
KevlinHenney_PuttingThereIntoArchitecture
KevlinHenney_PuttingThereIntoArchitectureKevlinHenney_PuttingThereIntoArchitecture
KevlinHenney_PuttingThereIntoArchitecture
 
Why Agile Works But Isn't Working For You
Why Agile Works But Isn't Working For YouWhy Agile Works But Isn't Working For You
Why Agile Works But Isn't Working For You
 

Mais de Kevlin Henney

The Case for Technical Excellence
The Case for Technical ExcellenceThe Case for Technical Excellence
The Case for Technical ExcellenceKevlin Henney
 
Empirical Development
Empirical DevelopmentEmpirical Development
Empirical DevelopmentKevlin Henney
 
Lambda? You Keep Using that Letter
Lambda? You Keep Using that LetterLambda? You Keep Using that Letter
Lambda? You Keep Using that LetterKevlin Henney
 
Lambda? You Keep Using that Letter
Lambda? You Keep Using that LetterLambda? You Keep Using that Letter
Lambda? You Keep Using that LetterKevlin Henney
 
Solid Deconstruction
Solid DeconstructionSolid Deconstruction
Solid DeconstructionKevlin Henney
 
Procedural Programming: It’s Back? It Never Went Away
Procedural Programming: It’s Back? It Never Went AwayProcedural Programming: It’s Back? It Never Went Away
Procedural Programming: It’s Back? It Never Went AwayKevlin Henney
 
Structure and Interpretation of Test Cases
Structure and Interpretation of Test CasesStructure and Interpretation of Test Cases
Structure and Interpretation of Test CasesKevlin Henney
 
Refactoring to Immutability
Refactoring to ImmutabilityRefactoring to Immutability
Refactoring to ImmutabilityKevlin Henney
 
Clean Coders Hate What Happens To Your Code When You Use These Enterprise Pro...
Clean Coders Hate What Happens To Your Code When You Use These Enterprise Pro...Clean Coders Hate What Happens To Your Code When You Use These Enterprise Pro...
Clean Coders Hate What Happens To Your Code When You Use These Enterprise Pro...Kevlin Henney
 
Thinking Outside the Synchronisation Quadrant
Thinking Outside the Synchronisation QuadrantThinking Outside the Synchronisation Quadrant
Thinking Outside the Synchronisation QuadrantKevlin Henney
 
The Error of Our Ways
The Error of Our WaysThe Error of Our Ways
The Error of Our WaysKevlin Henney
 
SOLID Deconstruction
SOLID DeconstructionSOLID Deconstruction
SOLID DeconstructionKevlin Henney
 

Mais de Kevlin Henney (20)

Program with GUTs
Program with GUTsProgram with GUTs
Program with GUTs
 
The Case for Technical Excellence
The Case for Technical ExcellenceThe Case for Technical Excellence
The Case for Technical Excellence
 
Empirical Development
Empirical DevelopmentEmpirical Development
Empirical Development
 
Lambda? You Keep Using that Letter
Lambda? You Keep Using that LetterLambda? You Keep Using that Letter
Lambda? You Keep Using that Letter
 
Lambda? You Keep Using that Letter
Lambda? You Keep Using that LetterLambda? You Keep Using that Letter
Lambda? You Keep Using that Letter
 
Solid Deconstruction
Solid DeconstructionSolid Deconstruction
Solid Deconstruction
 
Get Kata
Get KataGet Kata
Get Kata
 
Procedural Programming: It’s Back? It Never Went Away
Procedural Programming: It’s Back? It Never Went AwayProcedural Programming: It’s Back? It Never Went Away
Procedural Programming: It’s Back? It Never Went Away
 
Structure and Interpretation of Test Cases
Structure and Interpretation of Test CasesStructure and Interpretation of Test Cases
Structure and Interpretation of Test Cases
 
Agility ≠ Speed
Agility ≠ SpeedAgility ≠ Speed
Agility ≠ Speed
 
Refactoring to Immutability
Refactoring to ImmutabilityRefactoring to Immutability
Refactoring to Immutability
 
Old Is the New New
Old Is the New NewOld Is the New New
Old Is the New New
 
Clean Coders Hate What Happens To Your Code When You Use These Enterprise Pro...
Clean Coders Hate What Happens To Your Code When You Use These Enterprise Pro...Clean Coders Hate What Happens To Your Code When You Use These Enterprise Pro...
Clean Coders Hate What Happens To Your Code When You Use These Enterprise Pro...
 
Thinking Outside the Synchronisation Quadrant
Thinking Outside the Synchronisation QuadrantThinking Outside the Synchronisation Quadrant
Thinking Outside the Synchronisation Quadrant
 
Code as Risk
Code as RiskCode as Risk
Code as Risk
 
Software Is Details
Software Is DetailsSoftware Is Details
Software Is Details
 
Game of Sprints
Game of SprintsGame of Sprints
Game of Sprints
 
Good Code
Good CodeGood Code
Good Code
 
The Error of Our Ways
The Error of Our WaysThe Error of Our Ways
The Error of Our Ways
 
SOLID Deconstruction
SOLID DeconstructionSOLID Deconstruction
SOLID Deconstruction
 

Último

MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGSIVASHANKAR N
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 

Último (20)

MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 

Seven Ineffective Coding Habits of Many Programmers

  • 1. Seven Ineffective Coding Habits of Many Programmers @KevlinHenney
  • 2. It turns out that style matters in programming for the same reason that it matters in writing. It makes for better reading. Douglas Crockford JavaScript: The Good Parts
  • 3.
  • 5. Signal-to-noise ratio (often abbreviated SNR or S/N) is a measure used in science and engineering that compares the level of a desired signal to the level of background noise. Signal-to-noise ratio is sometimes used informally to refer to the ratio of useful information to false or irrelevant data in a conversation or exchange. http://en.wikipedia.org/wiki/Signal_to_noise_ratio
  • 6. To be, or not to be: that is the question: Whether 'tis nobler in the mind to suffer The slings and arrows of outrageous fortune, Or to take arms against a sea of troubles, And by opposing end them? William Shakespeare Hamlet
  • 7. Continuing existence or cessation of existence: those are the scenarios. Is it more empowering mentally to work towards an accommodation of the downsizings and negative outcomes of adversarial circumstance, or would it be a greater enhancement of the bottom line to move forwards to a challenge to our current difficulties, and, by making a commitment to opposition, to effect their demise? Tom Burton Long Words Bother Me
  • 8. public class RecentlyUsedList { private List<string> items; public RecentlyUsedList() { items = new List<string>(); } public void Add(string newItem) { if (items.Contains(newItem)) { int position = items.IndexOf(newItem); string existingItem = items[position]; items.RemoveAt(position); items.Insert(0, existingItem); } else { items.Insert(0, newItem); } } public int Count { get { int size = items.Count; return size; } } public string this[int index] { get { int position = 0; foreach (string item in items) { if (position == index) return item; ++position; } throw new ArgumentOutOfRangeException(); } } }
  • 9. public class RecentlyUsedList { private List<string> items; public RecentlyUsedList() { items = new List<string>(); } public void Add(string newItem) { if (items.Contains(newItem)) { int position = items.IndexOf(newItem); string existingItem = list[position]; items.RemoveAt(position); items.Insert(0, existingItem); } else { items.Insert(0, newItem); } } public int Count { get { int size = items.Count; return size; } } public string this[int index] { get { int position = 0; foreach (string value in items) { if (position == index) return value; ++position; } throw new ArgumentOutOfRangeException(); } } } public class RecentlyUsedList { private List<string> items = new List<string>(); public void Add(string newItem) { items.Remove(newItem); items.Add(newItem); } public int Count { get { return items.Count; } } public string this[int index] { get { return items[Count - index - 1]; } } }
  • 10.
  • 11.
  • 12. Comments A delicate matter, requiring taste and judgement. I tend to err on the side of eliminating comments, for several reasons. First, if the code is clear, and uses good type names and variable names, it should explain itself. Second, comments aren't checked by the compiler, so there is no guarantee they're right, especially after the code is modified. A misleading comment can be very confusing. Third, the issue of typography: comments clutter code. Rob Pike, "Notes on Programming in C"
  • 13. There is a famously bad comment style: i=i+1; /* Add one to i */ and there are worse ways to do it: /********************************** * * * Add one to i * * * **********************************/ i=i+1; Don't laugh now, wait until you see it in real life. Rob Pike, "Notes on Programming in C"
  • 14. A common fallacy is to assume authors of incomprehensible code will somehow be able to express themselves lucidly and clearly in comments. Kevlin Henney https://twitter.com/KevlinHenney/status/381021802941906944
  • 15.
  • 17. To be, or not to be: that is the question: Whether 'tis nobler in the mind to suffer The slings and arrows of outrageous fortune, Or to take arms against a sea of troubles, And by opposing end them? William Shakespeare Hamlet
  • 18. Continuing existence or cessation of existence: those are the scenarios. Is it more empowering mentally to work towards an accommodation of the downsizings and negative outcomes of adversarial circumstance, or would it be a greater enhancement of the bottom line to move forwards to a challenge to our current difficulties, and, by making a commitment to opposition, to effect their demise? Tom Burton Long Words Bother Me
  • 19. Continuing existence or cessation of existence: those are the more empowe to work towa accommodati downsizings outcomes of circumstance a greater enh the bottom li forwards to a our current d by making a opposition, t demise?
  • 20. How many programmers lay out their code Column 80
  • 22. To answer the question "What is clean design?" most succinctly: a clean design is one that supports visual thinking so people can meet their informational needs with a minimum of conscious effort. Daniel Higginbotham ∙ "Clean Up Your Mess — A Guide to Visual Design for Everyone" ∙ http://www.visualmess.com/
  • 23. You convey information by the way you arrange a design's elements in relation to each other. This information is understood immediately, if not consciously, by the people viewing your designs. Daniel Higginbotham ∙ "Clean Up Your Mess — A Guide to Visual Design for Everyone" ∙ http://www.visualmess.com/
  • 24. This is great if the visual relationships are obvious and accurate, but if they're not, your audience is going to get confused. They'll have to examine your work carefully, going back and forth between the different parts to make sure they understand. Daniel Higginbotham ∙ "Clean Up Your Mess — A Guide to Visual Design for Everyone" ∙ http://www.visualmess.com/
  • 25. public int howNotToLayoutAMethodHeader(int firstArgument, String secondArgument) public int ensureArgumentsAreAlignedLikeThis( int firstArgument, String secondArgument) public int orEnsureArgumentsAreGroupedLikeThis( int firstArgument, String secondArgument) public int butNotAlignedLikeThis(int firstArgument, String secondArgument)
  • 26. int doNotFormat = likeThis(someArgumentOrExpression, anotherArgumentOrExpression); int insteadFormat = somethingLikeThis( someArgumentOrExpression, anotherArgumentOrExpression); int orFormat = somethingLikeThis( someArgumentOrExpression, anotherArgumentOrExpression);
  • 27. int asItIs = unstable(someArgumentOrExpression, anotherArgumentOrExpression); int butThisIs = stable( someArgumentOrExpression, anotherArgumentOrExpression); int andThisIs = stable( someArgumentOrExpression, anotherArgumentOrExpression);
  • 28. public ResultType arbitraryMethodName(FirstArgumentType firs SecondArgumentType sec ThirdArgumentType thir LocalVariableType localVariable = method(firstArgument, secondArgument) if (localVariable.isSomething(thirdArgument, SOME_SHOUTY_CONSTANT)) { doSomethingWith(localVariable); } return localVariable.getSomething(); }
  • 29. public ResultType arbitraryMethodName( FirstArgumentType firstArgument, SecondArgumentType secondArgument, ThirdArgumentType thirdArgument) { LocalVariableType localVariable = method(firstArgument, secondArgument); if (localVariable.isSomething( thirdArgument, SOME_SHOUTY_CONSTANT)) { doSomething(localVariable); } return localVariable.getSomething(); }
  • 30. XXXXXX XXXXXXXXXX XXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXX XXXXXXXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXXXXX XXXXXXXXXXXXX XXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXX XX XXXXXXXXXXXXX XXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXX XXXXXXXXXXXXX XXXXXX XXXXXXXXXXXXX XXXXXXXXXXXX
  • 31. public ResultType arbitraryMethodName( FirstArgumentType firstArgument, SecondArgumentType secondArgument, ThirdArgumentType thirdArgument) { LocalVariableType localVariable = method(firstArgument, secondArgument); if (localVariable.isSomething( thirdArgument, SOME_SHOUTY_CONSTANT)) { doSomething(localVariable); } return localVariable.getSomething(); }
  • 32. XXXXXX XXXXXXXXXX XXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXX XXXXXXXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXXXXX XXXXXXXXXXXXX XXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXX XX XXXXXXXXXXXXX XXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXX XXXXXXXXXXXXX XXXXXX XXXXXXXXXXXXX XXXXXXXXXXXX
  • 33. public ResultType arbitraryMethodName( FirstArgumentType firstArgument, SecondArgumentType secondArgument, ThirdArgumentType thirdArgument) { LocalVariableType localVariable = method(firstArgument, secondArgument); if (localVariable.isSomething( thirdArgument, SOME_SHOUTY_CONSTANT)) { doSomething(localVariable); } return localVariable.getSomething(); }
  • 34. XXXXXX XXXXXXXXXX XXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXX XXXXXXXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXXXXX XXXXXXXXXXXXX XXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXX XX XXXXXXXXXXXXX XXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXX XXXXXXXXXXXXX XXXXXX XXXXXXXXXXXXX XXXXXXXXXXXX
  • 35.
  • 37. Agglutination is a process in linguistic morphology derivation in which complex words are formed by stringing together morphemes, each with a single grammatical or semantic meaning. Languages that use agglutination widely are called agglutinative languages. http://en.wikipedia.org/wiki/Agglutination
  • 39.
  • 49. Omit needless words. William Strunk and E B White The Elements of Style
  • 50.
  • 54. if (portfolioIdsByTraderId.get(trader.getId()) .containsKey(portfolio.getId())) { ... } Dan North, "Code in the Language of the Domain" 97 Things Every Programmer Should Know
  • 55. if (trader.canView(portfolio)) { ... } Dan North, "Code in the Language of the Domain" 97 Things Every Programmer Should Know
  • 56.
  • 58. public class RecentlyUsedList { private List<string> items = new List<string>(); public List<string> Items { get { return items; } } public void Add(string newItem) { if(newItem == null) throw new ArgumentNullException(); items.Remove(newItem); items.Insert(0, newItem); } ... }
  • 59. public class RecentlyUsedList { private List<string> items = new List<string>(); public List<string> Items { get { return items; } } public void Add(string newItem) { if(newItem == null) throw new ArgumentNullException(); items.Remove(newItem); items.Insert(0, newItem); } ... }
  • 60. public class RecentlyUsedList { private List<string> items = new List<string>(); public List<string> Items { get { return items; } } public void Add(string newItem) { if(newItem == null) throw new ArgumentNullException(); items.Remove(newItem); items.Insert(0, newItem); } ... } var list = new RecentlyUsedList(); list.Add("Hello, World!"); Console.WriteLine(list.Items.Count); list.Items.Add("Hello, World!"); Console.WriteLine(list.Items.Count); list.Items.Add(null);
  • 61. Don't ever invite a vampire into your house, you silly boy. It renders you powerless.
  • 62. public class RecentlyUsedList { private IList<string> items = new List<string>(); public int Count { get { return items.Count; } } public string this[int index] { get { return items[index]; } } public void Add(string newItem) { if(newItem == null) throw new ArgumentNullException(); items.Remove(newItem); items.Insert(0, newItem); } ... }
  • 63. public class RecentlyUsedList { private IList<string> items = new List<string>(); public int Count { get { return items.Count; } } public string this[int index] { get { return items[Count – index - 1]; } } public void Add(string newItem) { if(newItem == null) throw new ArgumentNullException(); items.Remove(newItem); items.Add(newItem); } ... }
  • 64.
  • 66.
  • 67.
  • 68.
  • 69.
  • 70. public class Money implements ... { ... public int getUnits() ... public int getHundredths() ... public Currency getCurrency() ... ... public void setUnits(int newUnits) ... public void setHundredths(int newHundredths) ... public void setCurrency(Currency newCurrency) ... ... }
  • 71. public final class Money implements ... { ... public int getUnits() ... public int getHundredths() ... public Currency getCurrency() ... ... }
  • 72. public final class Money implements ... { ... public int units() ... public int hundredths() ... public Currency currency() ... ... }
  • 73. When it is not necessary to change, it is necessary not to change. Lucius Cary
  • 74.
  • 76. Everybody knows that TDD stands for Test Driven Development. However, people too often concentrate on the words "Test" and "Development" and don't consider what the word "Driven" really implies. For tests to drive development they must do more than just test that code performs its required functionality: they must clearly express that required functionality to the reader. That is, they must be clear specifications of the required functionality. Tests that are not written with their role as specifications in mind can be very confusing to read. Nat Pryce and Steve Freeman "Are Your Tests Really Driving Your Development?"
  • 77. public class RecentlyUsedList { ... public RecentlyUsedList() ... public int Count { get... } public string this[int index] { get... } public void Add(string newItem) ... ... }
  • 78. [TestFixture] public class RecentlyUsedListTests { [Test] public void TestConstructor() ... [Test] public void TestCountGet() ... [Test] public void TestIndexerGet() ... [Test] public void TestAdd() ... ... }
  • 80. namespace RecentlyUsedList_spec { [TestFixture] public class A_new_list { [Test] public void Is_empty()  } [TestFixture] public class An_empty_list { [Test] public void Retains_a_single_addition()  [Test] public void Retains_unique_additions_in_stack_order()  } [TestFixture] public class A_non_empty_list { [Test] public void Is_unchanged_when_head_item_is_readded()  [Test] public void Moves_non_head_item_to_head_when_it_is_readded()  } [TestFixture] public class Any_list_rejects { [Test] public void Addition_of_null_items()  [Test] public void Indexing_past_its_end()  [Test] public void Negative_indexing()  } }
  • 81. namespace RecentlyUsedList_spec { [TestFixture] public class A_new_list { [Test] public void Is_empty()  } [TestFixture] public class An_empty_list { [Test] public void Retains_a_single_addition()  [Test] public void Retains_unique_additions_in_stack_order()  } [TestFixture] public class A_non_empty_list { [Test] public void Is_unchanged_when_head_item_is_readded()  [Test] public void Moves_non_head_item_to_head_when_it_is_readded()  } [TestFixture] public class Any_list_rejects { [Test] public void Addition_of_null_items()  [Test] public void Indexing_past_its_end()  [Test] public void Negative_indexing()  } }
  • 82. A test case should be just that: it should correspond to a single case.
  • 83. At some level the style becomes the substance.