The Pragmatic Programmer
244 views | +0 today
Follow
The Pragmatic Programmer
Good readings for good programmers
Curated by AM
Your new post is loading...
Your new post is loading...
Scooped by AM
Scoop.it!

The Boy Scout Rule

The Boy Scout Rule | The Pragmatic Programmer | Scoop.it

The Boy Scouts have a rule: "Always leave the campground cleaner than you found it." If you find a mess on the ground, you clean it up regardless of who might have made the mess. You intentionally improve the environment for the next group of campers. Actually the original form of that rule, written by Robert Stephenson Smyth Baden-Powell, the father of scouting, was "Try and leave this world a little better than you found it."

 
more...
No comment yet.
Scooped by AM
Scoop.it!

Preemptive commit comments

Preemptive commit comments | The Pragmatic Programmer | Scoop.it

tl;dr version

 

Rule #1: write commit comments before coding

Rule #2: write what the software should be supposed to do, not what you did 

more...
No comment yet.
Scooped by AM
Scoop.it!

An Autofac Lifetime Primer

An Autofac Lifetime Primer | The Pragmatic Programmer | Scoop.it

IoC containers are not just about dependency injection.

They are about lifetime management.

more...
No comment yet.
Scooped by AM
Scoop.it!

git bugfix branches: choose the root wisely

git bugfix branches: choose the root wisely | The Pragmatic Programmer | Scoop.it

When bugfixing, the branching approach I like best involves first finding the commit that introduced the bug, and then branching from there.

 

This approach has several advantages.

more...
No comment yet.
Scooped by AM
Scoop.it!

A CRAP way to improve usability

A CRAP way to improve usability | The Pragmatic Programmer | Scoop.it
Within the field of user experience, visual design is sometimes perceived as a bit of an outsider. Indeed, some visual designers are apparently feeling a pressure to rebrand themselves as “user experience” designers to progress their careers. In my experience with clients, visual design is often likened to decorating the walls of your living room. It makes everything a little nicer, but it’s hardly a key part of the architecture of your house.

 

In fact, visual design has an important impact on the usability of designs. Research shows that people believe that more attractive designs are easier to use than less attractive designs — even when they’re not. This is known in psychology as the aesthetic usability effect and in folklore more simply as, “first impressions count”.

But good visual design offers more than improving people’s attitudes to a design. Good visual design will actually make interfaces easier to use.

 

There are at least four key principles of visual design that have an important impact on usability. These four principles — contrast, repetition, alignment and proximity — were originally given the engaging acronym CRAP by Robin Williams (the visual designer, not the comedian). You can exploit these four principles to make user interfaces both more attractive and easier to use.

more...
No comment yet.
Scooped by AM
Scoop.it!

Objects, Classes, and Constructors, Smalltalk Style

Objects, classes, and constructors are an interesting thing in Smalltalk. Coming from languages like C#, Visual Basic, or Java, one expects to be able to declare constructors in your classes. You also expect them to be "special" nameless methods that can only be called by the "new" keyword when creating instances of your class. Smalltalk is different, and better, or worse, depending on your point of view.

more...
No comment yet.
Scooped by AM
Scoop.it!

Big Ball of Mud Design Pattern

Big Ball of Mud Design Pattern | The Pragmatic Programmer | Scoop.it

Big Ball of Mud ... alias Shantytown or Spaghetti Code

Shantytowns are usually built from common, cheap materials with simple tools and using unskilled labor. The construction and maintenance of the shantytown is labor intensive, and there is little or no labor specialization - each builder must be a jack of all trades. There's no overall planning, or regulation of future growth. 

Too many of our software systems are, architecturally, little more than shantytowns. Investment in tools and infrastructure is often inadequate and the tools that are used are primitive. Parts of the system grow unchecked, and the lack of architecture and planning allows problems in one part of the system to erode and pollute adjacent portions. Deadlines loom like monsoons, and architectural elegance seems unattainable. 

The time and money to chase perfection are seldom available and there is a survival at all costs attitude, to do what it takes to get the software working and out the door on time. The biggest cost borne by the Big Ball of Mud development is the lack of a decent architecture.

more...
No comment yet.
Scooped by AM
Scoop.it!

DevOps is not a technology problem. DevOps is a business problem.

DevOps is not a technology problem. DevOps is a business problem. | The Pragmatic Programmer | Scoop.it

I’ve spent the past nine months or so overcoming resistance to the DevOps movement in both public forums and inside client companies. During that time, I’ve begun to notice a common misconception that I think is fueling much of the negative initial reaction that some people have to DevOps ideas. I want to take a shot at clearing it up now:

 

DevOps is not a technology problem.

 

Technology plays a key part in enabling solutions to DevOps problems. However, DevOps itself is fundamentally a businessproblem.

more...
No comment yet.
Scooped by AM
Scoop.it!

Rules for Commenting

Rules for Commenting | The Pragmatic Programmer | Scoop.it
I used to be a huge supporter of comments.

I loved to see glorious, rich, voluminous comments in all the code I read. I loved to write them. I thought that for a program to be 60% comments was a pretty good start. But as my teams began to write cleaner code, they sometimes would brag that the code was so clean that it almost didn't need comments.

Now I want all of my code to go beyond almost.
more...
No comment yet.
Scooped by AM
Scoop.it!

Letter to an Undergraduate Computer Science Class | Atomic Spin

Letter to an Undergraduate Computer Science Class | Atomic Spin | The Pragmatic Programmer | Scoop.it
Last week I spoke to an undergraduate data structures class at GVSU. The talk was partially about data structures, but mostly about becoming a good developer. Most of this is old hat, but I think it’s good advice to just about anyone.

 

Hi everyone,

 

Thanks for sitting through my talk on Friday. It’s always fun to come back to my alma mater and talk to new computer scientists. If you have any questions, whether it be about a talk topic, career advice, or internships, feel free to send me an email.

Below are resources on some of the topics I mentioned

more...
No comment yet.
Scooped by AM
Scoop.it!

Constructors Considered Harmful

Constructors Considered Harmful | The Pragmatic Programmer | Scoop.it

In mainstream object oriented programming languages, objects are created by invoking constructors. This is rather ironic, since you can say a lot about constructors, but you cannot honestly say that they are object oriented. Ok, so what? Isn’t “object-oriented” just an old buzzword? If constructors work well, who cares?

more...
No comment yet.
Scooped by AM
Scoop.it!

Anti-Pattern: Too much of your application is about interacting with external resources | Mind Dump

Anti-Pattern: Too much of your application is about interacting with external resources | Mind Dump | The Pragmatic Programmer | Scoop.it

Firstly, what am I talking about? Applications that meet some of the following descriptions:

 

1. Stored procedures with a fair amount of conditional logic or complicated business rules buried in a sub-query (some would argue sprocs at all).

 

2. Web pages with lots of conditional output again encoding business rules in snippets of view logic. if else checks that display the latest price for something if before and certain date or a default price.

 

3. The majority of ‘unit tests’ require a database, or web and application server to be up and running.

 

4. The majority of code files make reference to language default I/O or database libraries.

 

5. Hours are spent trying to determine if differences in version of infrastructure are the cause of certain bugs.


6. Changing database schema results in hours of refactoring, as hundreds of querys and sprocs are hunted through to see if this index or that index is being properly hit.

more...
No comment yet.