The Pragmatic Craftsman :: Simplicity from complexity : by Stanley Kubasek ::

Archive for the 'Craftsmanship' Category

Craftsman's Values October 11th, 2007
Definition of Software Craftsman August 30th, 2007
What is a Craftsman? May 31st, 2007
PPP: Practice, practice, practice February 2nd, 2007
Seven Secrets of Successful Programmers February 3rd, 2006
Hoover on Craftsmen November 3rd, 2005
Every Craftsman is Dump and Lazy August 29th, 2005
Continuous Learning by Reading May 16th, 2005
Matz on Craftsmanship January 22nd, 2005
Will not ship shit! November 15th, 2004

Craftsman's Values

Here’s what Ben Rady, who calls himself software craftsman, states under his Statement of Values. I value similar things: I can sign my name under this statement. Excellent summary.

As a technical leader, I value:

* Talented People* Rapid Feedback* Individual Relationships* Facilitation over command and control* Continuous Improvement* Frequent Delivery

As a programmer, I value:

* Working Software* Clean Code* Rich Communication* Flexibility over efficiency* Sustainable Pace* Simplicity* Failing Fast over hiding errors

As a human being, I value:

* Courage, not cowardice* Humility, not hubris* Compassion, not callousness* Curiosity, not apathy* Discipline, not carelessness* Honesty, not deceit* Patience, not intolerance

ReferenceStatement of Values, Ben Rady

Definition of Software Craftsman

Here’s a great definition of what a software craftsman is. It’s also similar to the way I think. And this is also part of the Introduction in the book Agile Java.

I am a software craftsman. I have spent much of my software development career trying to quickly build solutions to problems. At the same time I have tried to ensure that my solutions demonstrate carefully crafted code. I strive for perfection in code, yet I know that it is unattainable, particularly with the constant pressure from business to get product out the door. I take modest pride in the code I build daily, yet when I look at the code I wrote the day before, I wonder, “What the heck was I thinking?” This is what keeps the craft challenging to me—the constant desire to figure out how to do things a little better the next time, and with a little less pain than this time.

ReferenceSafari eBooks – ACM – 0131482394 – Agile Java™: Crafting Code with Test-Driven Development

What is a Craftsman?

I found a great, pragmatic, and simple to understand definition of what a craftsman is from Dean Wampler, read below.

Am I a craftsman? No. Not yet. :-) But I work hard in that regard. Besides the first quality — being widely recognized — I think I can get good marks in the other characteristics. I strive to deliver quality; I am passionate about coding; and I continuously learn.

A craftsman is widely recognized by peersRino recently won an international competition in Italy, one of many times he’s been recognized nationally and internationally.

A craftsman is passionate about the craftRino says that if you are passionate about food, you will work on the presentation of even humble dishes. Pasta, as well as lobster, deserves an attractive presentation.

A craftsman delivers value to the customer while meeting business objectivesRino keeps the kitchen lean and efficient. He keeps costs low by relying on high-quality ingredients, keeping waste to a minimum, and constantly improving the skills of his staff, all without ever compromising quality. In the year Rino has been at Pazzaluna, costs have dropped, while business and profits have increased.

A craftsman knows that quality is the number one priorityRino knows that cutting quality today means less business tomorrow. He keeps quality high by keeping morale high. Morale is high because his staff is constantly learning new and better recipes. Also, as you watch him interact with his staff, you can see that he treats all of them, from his sous chefs to the dishwashers, with dignity and respect, while always holding them to high standards.

A craftsman never stops learningYou would think that he knows it all, by now. Yet, he has never forgotten a lesson his own mentor taught him, “you can learn something from even the worst cook, because he always knows something you don’t!” How many gurus do you know that think they have nothing left to learn?

Dean Wampler on Craftsmanship

What does all this have to do with software? Pretty much everything. Like cuisine, clean code is part art, part science. Clean code is created by passionate craftsman who are fanatical and fastidious about every detail. Clean code is the product of years of accumulated experience. The decisions a master makes moment-by-moment, whether test-driving the next feature or fighting a fire, reflect the wisdom and breadth of knowledge that produce high-quality results quickly and efficiently. Finally, a master leads by example, bringing the rest of the team up to his or her standards.

So, if you’re young and ambitious, latch onto the mentors around you. If you can’t find any, find another job. (Your organization is doomed anyway; so you might as well move on now.) If you’re older and wiser, seek out the promising junior people, teach them what you know, and learn from them as well! Oh, and if you want to taste real Italian food, make a pilgrimage to St. Paul. Tell Rino I sent you.

ReferenceWhat I’ve Learned from Master Chef Rino Baglio, Dean Wampler

PPP: Practice, practice, practice

Practice makes perfect.

I think you can agree with me on that. To become a craftsman, you not only need to acquire new knowledge and new skills, you need to be able to apply that knowledge, be able to polish your skills, and improve the output every time. I don’t remember who said it, Mozart I think, that every time he played the same piece, he did it differently. He was always looking to improve it. That’s the type of mentality of a true craftsman. And that’s what I need to develop to become a true craftsman.

Practice new technologies: put your knowledge to the testOver the last few years, I must have read 20-30 software books. I learn a lot, no doubt. But rarely do I actually put that knowledge to test. I just read, make notes (sometimes), and move on to another book. Doing it this way, I think my knowledge is not deep enough. I really cannot do anything with it, and I easily forget it.

I need to read a little and be able to put that knowledge to practice: I need to apply it. How do I do that? By writing a project based on that technology. By practicing — playing — with the new technology.

For instance, I want to learn Ruby (and Rails). Before I can say that I learned it, I should build a website or another project in Ruby. Only then I can say that I learned Ruby.

Same with any new technology. To really learn it, I should create my own project based on it. Anything new, whether it is a pattern or a technique, before you really learn it, you need to be able to put it into context. Ask yourself, how can I put that technology to use?

Practice to polish your skillsIn an ideal work environment, we would get to work on new and different technologies fairly often. That does not happen in the real world too often (or you’re lucky). As a result, we stagnate and get used to our working environment. I don’t think that’s a good situation. As a craftsman, you can never let your skills stagnate — lose freshness. You have to stay abreast with new technologies, acquire new skills constantly. But how? On your own!

Use your down time at work to freshen up on your skills. Once again, practice comes into play. Think the project you’re working on could benefit from migration to a newer, better technology. Do it! On your own. Start a new project, and migrate the old project to the new technology. Doing this keeps your skills fresh. You’re gaining new skills.

Playing with new technologies is very important. If you cannot do it at work, you need to find time for it, whether at work or at home.

Practice to polish — improve — the productEvery time you build a product, always strive to make it better. Better than your previous one. That’s the mentality of Mozart. I think that’s a mentality of a craftsman. And that’s what you want to become, right? Then you have to have that mentality! In design meetings, suggest a better way; when designing on your own, reflect and see what could be improved from your last project.

By practicing continuously, you’ll be able to see how things can improve. You’ll be able to build on your skills. You’ll be able to keep your skills up to date. This is key to getting better, improving your skills, and becoming a better developer, a craftsman. And remember: you can never stop practicing!

Once again, and that’s the bottom line, to move into architecture, to move up, to become a craftsman, you need a lot of practice. You need to continue practicing or you will not be “crafting” but “hacking.” Practicing takes time, but that’s the only way to make sure that you “got it.” BTW, as a craftsman, you should be loving it! :-)

Seven Secrets of Successful Programmers

There was an article today on reddit, Seven Secrets of Successful Programmers. The article contains some good tips, but overall it is too simplistic and not challenging enough, as pointed by Lars Wirzenius, in his follow up to the first article, Rant: Secrets of Successful Programmers.

What are the good points from the first article? Code for human consumption. That’s true. You should code for humans first, computers second. Make your code readable, it’s very important. Comment often and comment well. I think it’s critical to write a self-documenting code, as recommended by Steve McConnell. If you have to comment your code, your code is not good. Change it so you don’t need a comment, and then add a comment. Name your variables to aid readability. True, variables should not be cryptic. Keep your functions simple. That’s very important. Your function should do one thing and do it well. Same goes with your objects. Your object should have a well defined, cohesive set of responsibilities and do them well.

In his follow up, Lars suggests different seven secrets. They’re very good. In fact, I think they’re excellent. Much more comprehensive, and challenging. Maybe in the future I’ll come up with my own list. :-)

Lars Wirzenius, Rant: Secrets of Successful Programmers

1. Learn to worship the goddess of simplicity. KISS a lot. This is much harder than it seems: it’s more difficult to be simple and good than to be complicated and adequate. Simplicity starts with the specification of the program or system, and needs to permeate the design, and the implementation, at every step.

2. Pick good tools, and learn them well. You need to know many tools, and know them well, or you’ll waste time on doing unnecessary things. Tools include software programs, books, algorithms, data structures, and mental models. Learn editors, programming languages, Unix command line tools, and so on. Learn at least three different paradigms for programming.

3. Learn how to learn and keep on learning. New stuff is invented daily, and you need to keep up with it, or you’ll end up as useless as a COBOL programmer doing a web shop.

4. Develop debugging muscles. This is perhaps the hardest thing to learn, since no-body seems to be teaching it. You’ll be spending most of your time doing it.

5. Learn how to do testing well. Unit tests, test driven development, black-box testing, integration testing, regression testing, test automation, … There’s lots of ways of reducing the likelihood that code escapes your hands with bugs still in it. It will inevitably happen, but if you know what you do, you can be better than most everyone else. The industry standard for commercial, proprietary code seems to be around 20 to 30 bugs per thousand lines of code; the Linux kernel has less than 1, and is known as a cesspool of bug-infested muck, so surely you can do better?

6. Learn to write prose well. Then write a lot. If you can’t write a README, a manual page, or the specification for your next work project, who’s going to know about your great programming?

7. Oh, you need to learn how to program well as well, and that isn’t so easy either. Knowing how to program well merely isn’t enough to be a successful programmer.

ReferenceDuncan Merrion, Seven Secrets of Successful ProgrammersLars Wirzenius, Rant: Secrets of Successful ProgrammersSteve McConnell, Code Complete

Hoover on Craftsmen

The critical distinction between a craftsman and an expert is what happens after a sufficient level of expertise has been achieved. The expert will do everything she can to remain wedded to a single context, narrowing the scope of her learning, her practice, and her projects. The craftsman has the courage and humility to set aside her expertise and pick up an unfamiliar technology or learn a new domain.
–Dave Hoover
in article on StickyMinds.com

This is a great definition of a software craftsman: the best I found so far. The article by Dave Hoover on StickyMinds.com is a very good one, link below. Especially if you want to find out who a craftsman really is.

What can you learn from this? Be humble. Be curious. Be eager to learn new technologies. And be lazy. :-)

ReferenceExperts, Craftsman, and Ignorance by Dave Hoover

Related PostEvery Craftsman is Dump and Lazy

Every Craftsman is Dump and Lazy

Yeah, that’s true. :-)

Craftsman is lazy because he does not want to repeat what he wrote before.

Crafstman is dump because he knows that if he’s not, he’ll stop learning and stop being critical of his work. Both are essential for being successful.

It’s good to be dump and lazy after all, huh? So be dump, be lazy — those are qualities of the best!

Read the post, link below, by Jeff to see more explanation. Great stuff.

ReferenceHow to be Lazy, Dumb, and Successful by Jeff Atwood (Coding Horror blog)

Continuous Learning by Reading

I was slipping…

I got my B.S. in Computer Science from NJIT after four years. I spent another two years there and got my M.S., in CS as well. In between, I got my first full-time job. I can say that everything was going well. What could be better? Yet, not realizing it, I was slipping. I wasn’t learning any new technologies. I wasn’t keeping up with new books. I wasn’t improving myself. Yet I thought I was doing fine.

So what happened? I came across Steve McConnell and The Pragmatic Programmers (Dave Thomas and Andrew Hunt). I met Steve through his classic book, Code Complete. It opened my eyes. It woke me up from my sleep. The Pragmatic Programmers made sure I’m awake.

Steve and The Pragmatic Programmers directed me to a path of continual improvement. In order to improve, they told me, I have to constantly read. They told me to constantly learn and practice new technologies. They told me to invest in my knowledge portfolio continuously, just like I invest in my stocks.

That’s why, I know now, to be a software craftsman, and stay a craftsman, the most critical element for me is to get better every month, every year. Constantly. Reading is a great way to accomplish that.

ReadingReading is probably the best way of improving yourself. There are a lot of experts in the software industry. But we don’t get to meet or hear them (unless we’re lucky). A lot of the experts want to share their information with those that want to learn, though. How do they do that? They do it by writing. We, on the other side, can receive that information by reading their works. Read…

Read books.Read at least 5 to 6 books per year. Steve McConnell recommends reading a book every two months (roughly 35 pages per week). The Pragmatic Programmers recommend reading a book every quarter, and then eventually moving to a book a month (mixing it with non-technical books). I think both of the recommendations are adequate. Steve goes on to say, that if you do that, you’ll distinguish yourself from everybody around you.

I have taken their recommendation to heart. I have started reading a technical book every two months. Recently, I’ve upped it to a book every month. I’ve been on this continuous reading path for over a year now. And you know what? I’ve never been more confident. I want to stay humble here, but I can see that I’m doing more than the guys around me. I’m distinguishing myself more and more every month. I知 feeling good. :-)

But there are so many books to read! Yes, that’s true. But I follow this approach: I read the best books. I read books with a 5-star rating on Amazon.com (or close to it). “I only read the great ones,” said Jerry Weinberg, when asked by Joshua Kerievski how he keeps up with all the books that come out. Follow this approach and you’ll be fine.

Read magazine articles and journals.Reading books is great, but you also have to keep up with the industry. You should know what new technology are coming up. You should be aware of your surroundings. The best way to do that is by reading magazines and journals.

I read a lot of magazines. I start off a week by checking out eWeek and InfoWorld (both free). Every other week I receive an issue of SD Times (free). These 3 magazines are the Newsweek for IT, they tell me what’s happening. Every month I get JDJ, Communications of the ACM, Queue, IEEE Computer, Software Development (very good; free), Better Software (very good), and an issue of CrossTalk (free). Every other month I receive the IEEE Software (my favorite). These magazines tell me about new technologies. They tell me about new development techniques. They teach me new ways of doing development. And they also lead me to good books. All of this for almost nothing (I only pay for IEEE Software).

Read blogs and newsletters.I read books every month, magazines every week, and I read software blogs every day. There are so many good, expert bloggers out there that I think it would be a waste not to check out what they have to say. You have to pick what you like as there are a lot of good developers writing/bloggin. Reading Joel on Software (especially the archive) is one of the best, though. (I have over 100 feeds at my Bloglines account.)

When I graduated from college, I thought I knew it all. I thought that on-the-job learning and experience will be enough. It might have been enough for my current job, but what would happen if I lost that job? Would I be prepared? No! I have to take things into my own hands. I have to learn for myself and by myself. Reading continuously is a great way to learn and has been my savior for my renewed confidence.

Steve made me realize that it doesn’t take that much to be one of the best in your group, to be on par with the best in the software industry, to feel like you belong in the software industry. My advice? Read constantly and you’ll get there.

I’ve recently changed the way I work as well. I said it to myself, I have two things to do at work: one, to do what’s asked of me in the best possible way, and two, to improve myself as a developer, and I do that by reading books and technical blogs. I have virtually eliminated reading news, sports, and other time consuming resources. I’m on a mission here: I want to be one of the best in the industry. I want to be a software craftsman.

Matz on Craftsmanship

Yukihiro Matsumoto, the creator of Ruby, the object-oriented scripting language (I don’t know it but I hear it is a good language — Pragmatic Programmers recommend learning it), shares his top 10 tips for programmers. I like the list. The list is inline with what I believe good programmers should do and believe in. The list describes what a crafstman should do. Read this interview on Aritma, Matz on Craftsmanship, where he is asked about the tips that are found below. I extracted the Top 10 list and showing it to you below.

Q: Can you share your 10 top tips for those thinking of getting into the computing field? Can you describe your role with your company and how you plan to shape the company one year and two years into the future, and in the long term?

Yukihiro Matsumoto (creator of Ruby – OO scripting language):

  1. Learn more than one programming languages, preferably many different style ones, like scripting, object-oriented, functional, logic, etc. Learning languages teaches you many about programming.
  2. Read good books, for example, “Pragmatic Programmers”, “Refactoring”, and “Art of Computer Science”.
  3. Read the source code. The source code is the source of information and knowledge. Thanks to the opensource.
  4. Don’t focus too much on tools. Tools changes. Algorithms and basic fundamentals don’t.
  5. Don’t focus too much on machines. Programmers often fall in the computer’s view point. But human make programs, programs serve human. Don’t forget that programming is a human oriented activity.
  6. Be lazy. Machines should serve human being. Often programmers serve machines unconsciously. Let machines serve you. Do everything you can to make you lazy.
  7. Test early, test often. Write test suites before you code, if possible.
  8. Be nice to others. Consider interface first, man to man, man to machine, and machine to machine. Again, remember, human factor is important.
  9. Be creative.
  10. Enjoy programming and life. I believe that is one of the purposes of life.

Will not ship shit!

Software Crafstmanship defined. Defined by nobody else but by a true craftsman himself, Uncle Bob. This entry was so good and so relevant to this blog that I had to include it in full. Read it and re-read it often. I will.

Uncle Bob’s Software Craftsmanship CornerWe will not ship shit.by Robert C. MartinJuly 15, 2003

As software craftsmen we have rules, disciplines, and practices that we followto help us maintain a high degree of quality and professionalism. However,there are always trade-offs, always considerations, always possibilities.Sometimes we abandon a complex test case because we need to finish the task,and visual inspection or manual testing is sufficient. Sometimes we fail towrite an acceptance test because it’s complicated, and the bang-for-buck islow. Sometimes we don’t program in pairs, because — well — we don’t havea partner nearby, or we’re sick of programming with someone else, or thecurrent task is mechanical. Sometimes we keep a module checked out for morethan a couple of hours. Sometimes (damned rarely!) we check in code thatfails to pass all the acceptance tests, or all the unit tests.

They’re just rules, and rules are made to be broken.

Blindly following rules is a fools errand. We have enough grey matter todiscern when the rules are helpful and when they are not. We have theresponsibility to continuously measure whether the rules are helpful, orwhether they are not.

But then — there’s something else.

Something that is cold and hard, and yet simultaneously hot and blazing.Something, amidst all the compromise and ambiguity, that is neithercompromised nor ambiguous. Something that spawns and respawns the rules wefollow, and yet challenges those rules at every turn.

The still small voice; the angel’s trumpet, the grim determination, thejoyous declaration:

“I WILL NOT SHIP SHIT.”

- “I am a professional — a craftsman!”– “No matter what pressures are on me.”– “No matter how I’ve had to bend the rules.”– “No matter what shortcuts I’ve had to take.”– “No matter what the gods, or managers, have done or may do.”

– — “I WILL DO THE BEST WORK I CAN POSSIBLY DO.”– — “Anything short of my best is shit.”– — “I _ WILL _ NOT _ SHIP _ SHIT.”

For me, at least, this is what it all comes down to. I find that the rulesof XP help me to achieve this most of the time — more of the time than anyother set of rules I have followed. But rules are rules, and when they getin the way of this goal, they get set aside.

I do not set the rules aside lightly. Indeed, when in doubt, I follow them.When the pressure is on, I follow them. When the deadline looms, I followthem. I try hard not to let fear drive me.

Fear is the mind killer. It breeds idiocies like:

“We don’t have time to write tests.”"We don’t have time to program in pairs.”"We don’t have time to integrate continuously.”"We don’t have time to automate our acceptance tests.”

These idiocies are a siren’s song. Their lure is strong. Look in theirdirection and The Despair begins. All the rules will fall away.

Our core of professional pride is the cure. That something that is bothcold and hard, yet hot and blazing. It won’t set aside a rule out of fear.It sets aside a rule when *the rule* will cause you to ship shit.

Go now, the lesson has ended.

Favorite Quote

Topics

Tags

Archive

Currently Reading

Info

© 2001-2017 Stanley Kubasek About me :: Contact me

Me on Twitter

»see more

Recent Entries