As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I have graduated from my university almost a year ago. Since then I have worked with many different technologies, such as PHP, JQuery, ASP.NET, C# etc. Recently I have switched to a company where powerbuilder is being used for development.
The problem is that I haven't mastered any of the above languages. I can do stuff with those but when it comes to the complex tasks I often struggle with it because I don't have enough deep knowledge about it. After looking at powerbuilder for a few days I sense that this is going to happen again because most of the application code have been done using some sort of library which requires some advanced level of skill on powerbuilder.
My question is, is it OK for me to work on different technologies without mastering a single one of them?
If you choose to specialise the you are taking an opportunity cost by making yourself unavailable for other types of work. This is good if you can be confident that your chosen specialisation will last for a reasonable length of time. However, you can guarantee (along with death and taxes) that software will change. You will always be required to learn some new framework or approach in order to remain current.
So to avoid finding yourself at an intellectual dead end (are transputers still in use anywhere?) you should adopt a doctrine of constant learning. Learning is usually fun and almost always leads to a joy of discovery of some new tool or design. And never keep this knowledge to yourself (it only has a half-life of 18 months anyway). Share what you have learned with others.
So to answer your question: don't specialise.
According to the Pragmatic Programmer book, one of the tips for a good programmer is:
Invest Regularly in Your Knowledge Portfolio
Make learning a habit.
This means that you constantly have to use, or learn about, new technologies. While becoming a master in one particular technology may be rewarding, technologies come and go, today more quickly than ever. A mastery in one particular programming language, tool or API may make you a guru today, but may mean nothing tomorrow.
IIRC they also recommended developers to master several technologies, but remain versed in many - at least in the sense of having heard about them, played around with them, being able to engage in a conversation about them.
So, I would say yes - specialization is necessary, but this doesn't mean one should ignore domains outside his own.
There is no 'right answer' to this question other than maybe, 'it depends'.
You will find it easier to find better jobs if you specialise, as you call it. I would think of it more as working with a specific language/framework. Further, it is important to solve difficult problems and gain experience, irrespective of the language chosen.
Once you've accepted the above as a truism and specialised, then I would suggest that you branch out and learn new languages. Fortunately, languages become easier to learn when you have more experience.
However, more than anything, you have to look at keeping yourself interested over a long period of time. That is the real key. If you have interest, you will continue learn and gain experience. Maybe that will mean you do something that is not particularly relevant to most jobs, such as writing a language compiler. Or maybe you will find that the rush of working for big clients on big projects is more important than a specific language/framework.
So that's it - just keep interested, and keep learning. And, where possible, build focus in the thing that interests you, as that will make it easier for you to find employment going forward.
It is important to be specialized in at least one programming language/platform, especially early on in your career. By specialized i mean reading a book about it, cover to cover, and having extensive hands on experience developing for it, at work or participating in an open source project.
The idea behind this is that when you specialize in a language, you will learn many concepts that you can carry over to different languages/platforms. e.g: The master of a language can master another with relative ease.
Further on in you career being exposed to many platforms is a good thing, as you start to shift from begin a developer to a developer/architect, and you need to make decisions about which platform to use, the pros and cons of each platform and so no.
So my advice is try to master at least one language, along with its tools and frameworks. After that you can move on to different platforms. It is important to use the right platform for the current project, you will need to determine that case by case, with the assistance of a senior developer.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Coding a new 3D engine is fascinating but I there are so many out there. Is it sane for a programmer to start a new one? Are there industry sections in need?
Reasons to do it:
You want to learn about how to make a 3D engine, and don't really care if anyone but yourself uses it.
None of the existing engines do what you want and it's too much trouble to modify their source code (if you can even get it).
You have such an awesome idea and no other engine has done it so you need to do it because whatever you're doing doesn't exist yet.
Reasons not to do it:
You don't have enough of these resources: time/budget/expertise.
An existing engine fits your needs perfectly.
There are lots of reasons to build a new 3D engine (in no particular order):
The old one is a first person shooter, but you want a flight simulator.
The old one works, but isn't easy to use or has too many bugs
Someone else owns the old one
New hardware feature XYZ is fundamentally incompatible with the old engine
Someone is paying you to build one
You've never built one before.
Your game (simulation) only needs χ, but the old engine provides χ, ψ, ζ, α, β, γ, δ, and even π.
I happen to be building an OpenGL-based 3D engine in my off time right now. By implementing it myself, I'm expanding my basic knowledge of OpenGL way more than I would have by programming to someone else's interface (way more than I did when I implemented my own software affine texture mapped engine years ago). The downside is that I may never finish it :)
Generally, you code one if you have a need for one and there doesn't already exist one that suits your need.
Is there someone out there who needs an engine built for them because there doesn't exist one that suits their needs? Probably.
This is highly similar to the question should I write my own program/technology/framework X instead of using an existing one?" and that has been asked plenty, so I won't go over the usual boilerplate reasons.
While the answer to this question will always be somewhat subjective, a great deal depends on the context in which it is asked.
If it's being asked along the lines of I want to learn about game engines and rendering then it always can be beneficial to write your own game engine as developing the code is arguably the best way to learn. However, there may already exist good open sourced well documented engines to learn from as well.
If it's a commercial endeavor, then it's more of an issue of whether or not an existing engine provides what is needed. Modern commercial engines are written by some truly brilliant people and contain all the latest bells and whistles so it's more than likely they would suffice. This is evident by the sheer number of games that have been developed on two of the most popular game engines: idTech and Unreal engine. However, there still may be no tech related prohibiting factors to using an existing engine where writing your own is better. Such as if it can afford to be done, whether the engine can be licensed adequately, and, if the license can be afforded.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
How often is language the deciding factor for selecting a job?
Many of us here are well versed in many languages, C++, Java, C#, and likely have many other languages under our belt for the right occassion (really any occasion is the right occasion for Python, AMIRITE?), so this isn't so much a question of choosing a job that is a good fit based on your skill set. Rather, if you are skilled with most languages, do you pick your favorite, or do you follow the money (given the tight economy).
I'm considering coming out of retirement, and have started to look around and what's available.
Over the years, I've moved towards C# and Python; many jobs in the area are looking for .NET developers, but there are plenty of them that do not. I cut my teef on C++, consider myself adept at the language, and know my way around a Java. But I find myself really digging what they're doing to C#, and I have always loved python.
Even if the work will be interesting, how important is the language to you?
I think that although in its essence programming is bigger than any language(languages are just the means, not the goals) everyone has a preference toward some languages. However, it often turns out that our preferences are towards languages not considered mainstream.
I live and work in Bulgaria(a country known from the movies as the center of crime in Europe, though that's not the case). Here 90% of the job ads are for PHP, Java and C# developers... There is also C for embedded development(which I hate), C++ (for maintenance of older systems - no one starts new projects in C++ anymore) and Cobol :-) I'd very much like to make money developing in Clojure or Ruby for instance, but the reality is that there is simply no demand around here. Of the three options I've found Java to appeal most to me - it's a nice language, with a nice community around it and a great VM behind it. So I naturally consider Java ads first, but I'm always open to any challenges as long as find them intriguing...
I would think that one would have a bias towards not just the language they want to develop in, but in the environment and type of applications they are likely to be working with. I think that would be the deciding factor?
Java - Coffee grinder
Python - Snake charmer
C - Optician
C# - Laser eye surgeon
C++ - Night vision goggle manufacturer
Ruby - Jeweller
.NET - Fisherman
the language itself doesnot matter so much, as the technology used does.
for example, a php/mySQL developer could easier convert to ASP.NET/MSSQL, than a .NET Windows Forms programmer will. I was both and felt more support from my php/mysql skills than my desktop C# programming ones.
But when the working process is annoying to you (e.g. you don't even want to go back to C++ coz it was hell for you), you better go find .NET desktop jobs - you will find that 90% of work done in the past by you in C++ was abstracted in .NET libraries and you'll get more fun from programming (though some people love that so-called 'c++ hell' for hacking).
as Chuck Jazdzewski fatherly said, (at the end of http://www.removingalldoubt.com/PermaLink.aspx/a32977e2-cb7d-42ea-9d25-5e539423affd ) , programming is fun, but shipping is your job. Joel Spolsky (www.joelonsoftware.com) has also nice entries about that.
Consider this when you are looking for a new working environment.
I've chosen Java. I know many more, but I think its the best decision to stick with one. If you work one year Java, one year c#, one year python you will not get a job as Java programmer that should have at least 3 years of experience.
For a coder, who's profession is based on it, is should be the main deciding factor. (...with Money a very close second!)
This may sound shallow but I tend to stick with the one I know best. Having spent several years in C# and .NET I wouldn't go back to PHP or Java, not because they are bad but rather I don't want to have to re-learn everything again... it would be sort of like starting all over again.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Its always said that more you program, the better you become. Sounds good and true.
But I was wondering if there is a proven route to becoming a better programmer.
Something like:
Learn a
Learn b
Learn c > 'Now you are good to burn the engines'
Try stuff around based on your learning.
The answer might be similar to a CS course roadmap, but I want to hear from successful programmers who might want to pitch in with something notable.
Thanks
It's not true that practice makes perfect.
It's perfect practice that makes perfect.
If all you do is keep repeating the same bad practices again and again, you'll only make it possible to create bad code faster.
By all means keep coding. But at the same time be critical of everything you do. Always have a jaundiced eye that looks for ways to do things better. Read widely to get new ideas. Talk to others about how they do things. Look at other people's code, good and bad.
There's no "sure" way to learn anything that I know of. If there was, anyone could master this.
All questions are rhetorical and meant to stimulate thought.
Technical parts:
Design Patterns - There are probably some specific to a domain but generally these are useful ways of starting parts of an application. Do you know MVC or MVP?
Basic algorithm starting points - Divide and conquer, dynamic programming, recursion, creating special data types like a heap, being greedy, etc.
Problem solving skills - How easily can you jump in and find where a bug is? Can you think of multiple solutions to the problem?
Abstract modelling - How well can you picture things in your head in terms of code or classes when someone is describing a problem?
High level versus low level - How well do you understand when one wants something high or low? This is just something I'd toss out there as these terms get through around a lot, like a high level view of something or a low level language.
Process parts:
Agile - Do you know Scrum, XP, and other new approaches to managing software projects? How about principles like YAGNI, DRY and KISS? Or principles like SOLID? Ideas like Broken Windows?
Developer Environment - How well do you know the IDE you use? Source Control? Continuous Integration? Do you know the bottle necks on your machine in terms of being productive?
xDD - Do you know of TDD, BDD, and other developments driven from a paradigm?
Refactoring - Do you go back over your old code and make it better or do you tend to write once and then abandon your code?
Soft skills:
Emotional Intelligence - Can be useful for presentations and working with others mostly.
Passions/Motivation - Do you know what gets your juices flowing and just kick butt in terms of being productive? Do you know what you would like to do for many many years?
My main piece of advice would be: don't be afraid to rewrite your own code. Look at stuff you wrote even a month ago and you will see flaws and want to rewrite stuff.
Make sure that you understand some fundamentals: collections, equality, hashcodes etc. These are useful across pretty much all modern languages.
Depending on the language you use - use lint and metric tools and run them over your code. Not all their suggestions will be applicable but learning which are important and which are not is important. E.g FindBugs, PMD etc for Java.
Above all refine and keep refining your work. Don't treat your work as abandonware!
Learn your 1st programming language a new programming paradigm or a
find a mentor you can learn from
Apply what you've learnt in a real world project
Learn from your mistakes and successes and goto step one
The trick is knowing what to learn first:
Programming languages - this is the place to start bcause you cannot write software without knowing at least one of these. After you've mastered one language try learning another.
Programming paradigm - i.e. object oriented, dynamic/functional programming etc. Try to learn a new one with each new language.
Design concepts - S.O.L.I.D, design patterns as well as architectural concepts.
People skills - learn to communicate your ideas.
Team leadership - learn how to sweep others and how to become a team or technological lead.
After that the sky is the limit.
I would look at improving roughly in this order, in iterations with each building on the previous one:
Programming concepts. Understand things like memory management, pointers, stacks, variable scope, etc.
Languages. Work on mastering several modern languages.
Design concepts. Learn about design patterns. Practice using them.
Communication. Often-overlooked. You can only become a highly valued Software Engineer if you can communicate effectively with non-tech people. Learn to listen and understand the needs that people are expressing, translate that into a set of requirements and a technical design, but then explain what you understood (and designed) back to them, in terms they can understand, for validation before you code. This is not an easy one to master, but it is essential.
Architectural concepts. Learn to understand the big picture of large, complex systems.
Learning a programming language is in many ways similar to learning a spoken language. The only way to get good at it is to do it as often as possible. In other works
Practice, practice, read and then practice more
Take time to learn about all sorts of coding techniques, tools and programming wisdom. This I have found to be crucial to my development. It's to easy to just code away and feel productive. What about what could be if you just had some more knowledge / weaponry under your belt to bang out that next widget.
Knowledge/know how is our real currency. The more we know the more we can make a better decision about how something should be done and do it faster.
For example, learn about:
•Development Practices, Software Design, Estimation, Methodologies Business Analysis Database Design (there are a lot of great books out there and online resources)
•Read Code - Open Source Projects are a good place for this. Read
Programming blogs
•Try to participate on Open Source
Projects.
•Look for programming user groups in
your town and/or someone who can mentor you.
And yes, as mentioned practice. Don't just read, do and watch how you will improve. :)
Practice, practice, practice.
Once you're over the basic hump of being able to program, you can also read useful books (i.e. Code Complete, Effective Java or equivalents, etc.) for ideas on how to improve your code.
First and foremost write code. Write as much as you can. Tackle hard problems. If you want to be a really good programmer you need to get into the guts of what you are doing. Spend a lot of time in debuggers looking at how things work. If you want to be a good programmer who really understands what is going on you need to get down to the metal and write highly async code, learn about how processors work and why SSE is so awesome. Understand threading primitives and be able to write them as well as describe what is actually happening in the processor. I could keep going here but you get the idea.
Second find someone who knows a lot more than you and learn. This relationship will work better if you are already deeply immersed in writing lots of code.
Third, spend some time in a large high quality open source code base. I learned a ton from the Quake I and Quake II code. Helped me be a better programmer.
Fourth take on hard problems. Push your limits. Build things that you thought were impossible. Right now I am writing a specialized compiler. I have learned so much just working on this for the last couple of months.
Sure, strictly speaking, the more you practice programming, the better you become at solving those sorts of problems. But is that what you really want?
Programming is a human activity more than a technological one, at its heart. It's easy to improve your computer skills, not so hard to improve your interpersonal skills.
Read "Journey of the Software Professional" by Hohmann. One of the concepts the concepts Hohmann describes is the "cognitive library," which includes both programming skills and non-programming skills. Expand your cognitive library, and your programming skill will improve too.
Read a lot of non-programming books too, and observe the world around you. Creating useful metaphors is an essential skill for the successful programmer. Why do restaurants do things how they do? What trade-offs is the garbage department making when they pick up the garbage every few days instead of every day? How does scaling affect how a grocery store does business? Be an inquisitive human to be a better programmer.
For me, there has to be a reason to learn something new... that is, unless I have a project in mind or some problem I need to solve, there's no hope. If that prerequisite is met, then I usually try to get "Hello, world" working, and after that the sky's the limit. So much of development these days is just learning new APIs. Occasionally there's some kind of paradigm shift that blows your mind, but that's not as common as people like to think, IMHO.
Find a program that intrigues you, one that solves a problem, or one that would simplify many of your tasks. Try to write something similar. You'll get up to speed very quickly and have fun doing it at the same time.
You can try learning one thing really well and then expanding out to programming areas that are associated with the things that you have learnt, so that you can offer complete solutions to customers.
At the same time, devote part of your time to explore things outside your comfort zone.
One you have learned something, try to learn something a little harder. Read and practice a lot about things that seem confusing at first time (lambda functins, threading, array manipulation, etc). It will take its time, but once you have practiced enough, what seemed confusing at first, will be familiar and easy.
In addition to the rest of the great advice already given here, don't be afraid to read about coding and good practice, but also take everything with a grain of salt and see what works best for you. A lot of advice is opinion.
Good sites to read:
-thedailywtf.com
-joelonsoftware.com
-codinghorror.com
-blogs.msdn.com/oldnewthing
A great place to get practice is programming competition websites. Those will help you learn how to write good algorithms, not necessarily maintainable code, but they're still a good place to start for learning.
The one I used to use (back when I had time) was:
http://uva.onlinejudge.org/
Learn more than one language. One at a time, definitely, but ultimately you should be fluent in a couple. This will give you a better perspective I think, and help you to become an expert at programming, rather than being an expert at a certain language.
Learn the ins and outs of computers at all levels, hardware, os, etc. Ideally you should be able to build your own system, install multiple operating systems on it, and diagnose just about every problem that can arise. I know many programmers who are not "computer tech people" and their failure to understand what is happening at every level becomes a major hindrance in diagnosing and fixing unusual bugs or performance issues.
As well as looking at 'last weeks code', talk to users of your work after delivery - be one yourself if possible.
Its not my bag, but some of the best coders I know have spent time supporting applications. The experience improved their product I'm sure.
eat breath dream the programming language your using (no seriously, it helps)
There are two kinds of learning -
1. Informal (like how you learned how to function in society- through interaction with peers and family)
2. Formal (like your high school training- through planned instruction)
If you want an entry-level programming job, formal training via an undergrad Computer Science/Engineering degree is the way to go. However, if you want to become a rock-star developer, it is best done by informal training- make unintentional mistakes and have senior developers curse at you, learn a design pattern because an app you are updating uses it, almost cry because a bad developer wrote a huge messy program lacking documentation and best practices and now you have to do several updates to it ASAP; thing of these nature.
It is hard for anyone to give you a list of all you need to know. It varies per area (e.g. a web developer vs. to a desktop developer) and it varies per company (e.g. Microsoft that sells software vs. General Motors that mainly just use it in their cars.) Informal traiing and being engaged in trying to learn to do your job better and get promoted is your best bet in my opinion.
To prove my point, everyone here has great answers but they all differ. Ask a rock-star developer how he learned something or when, why; they may not know- things just happen.
Practice, individually and collectively
Keep an open mind, always learn new things, don't limit yourself to what's familiar. Not solely from a tech perspective, ui design, people skills, ... Don't be afraid of what's new
Peer review, talk to people about your code, let people talk to you about their code, everyone has a unique way of looking at a problem and you will learn a great deal from peers
Love coding. If you love what you're doing, putting in alot of time seems effortless. Every coder needs the drive!
One small addition to these good answers. When I work on someone else's code, usually I pick up something new. If you have the opportunity to work with someone else that is of equal or greater skill, noticing their programming style can teach you tons.
For example, in C++ & Javascript I no longer use if() statements without braces. The reason is that it's just too easy to mistakenly put:
while (true) {
if (a > b)
print a
print b
}
This is an obvious typo, but very easy to introduce, especially if you're editing existing code. I just call it defensive programming in my mind, but little tricks like this are valuable at making you better.
So, find a peer or mentor, and work on their code.
I am not sure if the OP was looking for general advice on how to be a good programmer, but rather something more specific.
I know I am reviving this thread, but I found it because I was trying to see if anyone asked this question already.
What I had in mind was, can we come up with a "knowledge-map" of programming concepts similar to the map that Khan Academy uses.
As a programmer, I want to be able to visualize the dependencies and relationships between different ideas, so that I can understand what skill level I am currently at; what I need to know before tackling a challenging subject; and be able to visualize my progress.
The very belief in the roadmap's existence blocks the road to perfection.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Okay, so far, I have been taking computer science courses in my high school and doing some of my own research on the web, and I have found I really like the subject. However, the computer science courses, having given me a small amount of experience in a few languages (C++, java, and python), leave me wondering where to go for development on my own.
I would like to create desktop applications, or even web applications if I could wrap my head around it. What language would you think would best facilitate this?
As a side-note, what are some good books or online documents that explain general computer science topics? I have found some good ones, but they haven't given me the depth I really want.What are some good ones?
Find an "itch"--a program you wish existed, that would be useful for you to have, but you can't find (or costs money). Then try writing it, using online resources (like Stack Overflow) to help you.
At this stage in your career, language doesn't matter very much. Some languages are better than others at certain tasks, but often your own level of comfort with the language outweighs other issues. So just pick a language you're interested in, and a project you're interested in, and get to work.
You may find that you need to start with a simpler project, or you may find more resources for a different language or framework. But getting started with something--no matter what that something is--is probably the most important thing.
Here is a classic but still quite relevant book if you ever want to level up from coder to software engineer.
Since you're still in high school, I would tell you that time is on your side. You have plenty of time to develop as a computer scientist. Therefore, take the long view for your development. So it's much better for you to understand the abstractions that underly software technology.
In my humble opinion, C++ and Java will always be around and you have plenty of time to develop your skills in that arena. However, a higher level language like Scheme or Python will pay plenty of dividends. You might find this recommendation highly enlightening.
In addition, every application will deal with a database as its system of record. Understanding SQL and data modeling is a win-win.
Also, understanding formal logic and/or discrete mathematics is indispensable for computer science. Computer languages are nothing but formal languages for executing
procedures: i.e. mathematical induction is used to define their syntax and semantics.
It sounds like you would enjoy jumping into a high level, modern language that's native to the operating system you want to target; Objective-C or C# for example. On the other hand if you really want to do something for the web, building a web app isn't much harder (there are just more choices to pick from for the back end and front end technologies you decide to use).
Basically, decide what project you want to work on and choose the best language for it. What really matters is that you're working on something.
What language to further develop in?
Given that you know C++, Java, and Python already, a next language I might suggest would be SQL and DDL: defining databases, and getting data in and out of them.
If your CS course didn't touch on it, I highly advise spending a bit of time with a more functional style of language like erlang, haskell or even lisp.
They won't become your day-to-day hacking language overnight, but can really help you grasp important programming concepts relavent accross all languages.
....especially the one about choosing the right language for the task at hand.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
What type of client is likely to support XP (Extreme Programming) practices?
I'm working for a company which is doing Agile (not strictly XP, but still applicable), and our client base is exclusively government organizations. Once they saw the results of the agile process at work, even those who had requirements to provide documentation in a Waterfall like manner were more than happy to continue to reap the benefits of the agile process.
And, yes, I agree with vfilby. Your customers should care about the results, not how you achieve them.
If your team achieves great results with a proven track-record, then companies desiring a successful result. If the converse is true, only companies who are wandering blindly will be interested.
There is the odd case where the client will want a certain practices followed. Like a experienced dev manager outsourcing a project to an external firm, or potentially a client who has heard that XP is good in passing but has no real knowledge or experience with it. In the former the experienced consumer will know what he wants and if you do not provide those services they will go elsewhere. If you try to fake it, they will know and be most displeased. The later, it doesn't matter so much as long as they get good results and think it was their own wisdom that brought them forth from the ground.
Either way, it is results that matter.
Now begins my diatribe which so far has inspired much ire:
Would you jeopardize your good practices just to suit a client? If you are staunchly in favour of XP, sell it! If they want you to use a methodology that you strongly disagree with. Tell them that. If you can't come to a consensus, there should be no deal.
Do I tell a baker what grain to use? How hot to have the ovens? Hell no. If I say I want poppy seeds on the buns I don't care how they are put there so long as they are there. Dp I select a baker based on his methods, or on how damn tasty the bread is? Letting a non programmer tell you how to do your craft is just plain bad.
If you are trying to extol the virtues of XP then be upfront, pitch the cost-benefits and ROI. Show them why it is better for them in terms of developer efficiency and defect reduction. If you are working for non-programmers, you are the expert, take the reigns and give advice.
If your team excels at XP and has great results you will have no problem selling any potential client on your practices. Results matter to clients; if you can prove that you consistently produce high quality products within consistent timelines you should have no problem selling your methodology. (with some exceptions that absolutely require waterfall).
Either clients who've already had good results on XP projects.
Or clients who've swallowed the Kool-Aid.
Which arguably makes these clients few and far between :-)
I think it probably takes less convincing than it used to for customers to accept agile development practices, particularly XP, since they are now much more mainstream. Customers who have had positive experiences with agile teams in the past are more likely to buy into these methods. It's probably easier for a smaller customer, or a customer with a smaller problem to accept XP if they have concerns about it. With a skeptical customer, I would suggest starting small and building confidence. And make sure you deliver on your promises!
Almost everyone else seems to be interpreting your question in the context that you are or work for an ISV writing custom software for a client. Is that the situation?
If your question had been something along the lines of what kind of company is likely to adopt XP, then I would say a company who has been burned in the past spending too much time writing developer documentation and designing for reuse only to have to throw it all away as a big waste of time and effort.
The customer has to accept iterative delivery with fixed time, fixed resources, fixed quality (it's working to 100%), and a slightly variable scope, per iteration.
However, it is much more usual that they want to fix time, resources, quality AND scope.
The type of client that is likely to support XP practices,
is one that already understands the benefits and drawbacks of the software production system that XP provides.