What programming language should I learn?
August 23, 2007 7:24 AM   Subscribe

What programming language should I learn? And should I be a programmer at all?

Here's my situation. I have a BA in French and after years of low-paying jobs (administrative assistant, flight attendant, customer service, taxi driver, etc.) I finally lucked into a job at a help desk. I say lucked into because my pay immediately increased by about 40%.

When I look for job postings in IT, I see that there is a lot of demand for programmers or people with CS degrees. In school I was very good at and enjoyed math and logic, so that makes me think I might be good at and enjoy programming. I don't mind doing helpdesk work, but I do not want to be a lifer.

Several questions: I'm 32 years old. Is it too late to pursue this kind of work? Is it recommended that I get a CS degree? Bachelors or Masters? And if I decide to learn on my own, what language should I start with? I actually bought a Java book and started working through it because one of the schools I was thinking of applying to requires Java certification as a prerequisite, but I am not sure if this is the best language to start with. I have a feeling that whatever language I learn first is going to influence the way I think about programming for the rest of my life.

As a liberal arts major, I'm afraid I won't have much credibility as an IT person unless I get a more relevant degree. Anyone make the leap into programming without the proper credentials? What route should I take to become a programmer that will get me the greatest opportunity with the least wasted effort?
posted by spacewaitress to Computers & Internet (32 answers total) 38 users marked this as a favorite
 
It's never too late to pursue more education. Never stop learning. Good luck!
posted by jerseygirl at 7:30 AM on August 23, 2007 [1 favorite]


Best answer: Never to late to start.

You'll also find that lots of people have non-traditional backgrounds in the IT/Programming/Computer world. One of the greatest programmers I knew was a Philosophy major. She was hard core logical and rational and reasonable when approaching the task at hand.

Your choice of languages fall into 3 main batches. This is an ultra simplistic explanation. There are hundreds of other languages and other types but these are the main ones:

Hard core low level languages like C, C++ and assembler; Modern, mainstream statically typed languages like Java and C#; Modern dynamically typed languages like Perl, Python and Ruby.

You are very right in assuming that the languages you learn will color your experiences going forward but you have to start somewhere. For that reason, I would learn one language fairly well and then branch out from there.

I would think that you will probably get further, faster by picking one of the languages in the last category. In particular Python or Ruby (Ruby is quite the hot up and coming thing although that's more for its web app framework called Rails than the language itself). Then I would pick up Java or C# to see how the other half lives.

Good luck
posted by mmascolino at 7:36 AM on August 23, 2007 [3 favorites]


Java is a very good language to start with. Should give you good habits. I've personally found it a bit of an uphill battle, but that might be because I never had formal training. Your local community college should offer Java classes for cheap.

A formal CS degree is valuable, but I know a lot of excellent programmers and people working in IT with liberal arts degrees. A couple of the best I know have theology degrees.

Also, consider something like MIS (management information systems) in a business school. You'll get the programming, but an understanding of the business side too.

It's never too late to do something you love.
posted by idb at 7:37 AM on August 23, 2007


Many programmers start off in different fields. One of my coworkers is a tenured professor at Harvard in Celtic Studies. A friend of mine who works at Pandemic has a background in International Relations. Lots of people in this industry have math backgrounds (sometimes insane math backgrounds). I don't think having a liberal arts degree is really a hindrance. Your real hindrance is lack of experience.

As far as experience goes, you can probably start working your way from helpdesk to QA, where programming knowledge will be helpful in understanding how to best test software and maybe even to eventually start automating tests.

I would say Java is a good start to get into the market ASAP. But keep in mind that Java won't last forever, just as C didn't last forever at the top of the pile. You will need to keep learning new languages and technologies forever, unless you manage to retire.
posted by mkb at 7:38 AM on August 23, 2007


Best answer: C will teach you about the machine, and its syntax is the basis for plenty of other languages, so I'd learn it first. Lisp is mental, but if you learn it early, you won't notice, and it'll teach you some nifty, nifty ways of thinking, so I'd do it second.

I don't think you're too old, but the credentials thing is the same as anywhere -- either have good ones, or plenty of experience to show off.
posted by bonaldi at 7:39 AM on August 23, 2007 [2 favorites]


If I was starting from scratch I would have loved to have stuff like MIT's OpenCourseWare available to me as a resource. In terms of which language is 'best' to start with, it all depends of the kind of programming you want to do. By that, I mean do you have an idea of what 'field' you would like to get into. There are many.
posted by ReiToei at 7:39 AM on August 23, 2007 [4 favorites]


Your CS degree, if you decide to get one, will probably only affect your chances of landing your first programming job. After that, potential employers are probably going to care more about the real-world work experience you have.

It’s hard to recommend a first programming language; most schools will have standardized on one or another for their introductory classes. Java and C++ were both used in my intro classes.

Once you’ve made it through the basics, you should try to select a language to learn from several differing programming paradigms. The greater the differences among the languages you learn, the more flexible your skills will be.
posted by breaks the guidelines? at 7:43 AM on August 23, 2007


For the most part, you don't need to go back to school. I've got a degree in logistics and supply chain management, and I write software for a big university's athletics department. Instead, I'd find something that you can do 'better' for either your day job or your personal life ... i.e. does your helpdesk / task management app suck? Then make it better. Maybe you heard that IT wanted to do an e-commerce auction website but didn't have anyone free to do it. Start developing one. (A project like that ran for six years at my last employer, long after I'd left the company. Everyone hated it, no one could find anything better... until they redeveloped it finally, keeping most of the features!)

As far as language choice goes, start with whatever your current employer uses. If they're a microsoft shop, learn microsoft. If they're an open-source shop, learn PHP or Perl or Python/Ruby. If they're a Java shop, learn Java. At this point, there's not that huge of a difference when you're starting out which language you learn -- after about five years with that language, you can transition to ANY language and at least be able to function.
posted by SpecialK at 7:47 AM on August 23, 2007


It's never too late to pursue more education. / Never to late to start.

As a thirtysomething who is interested in this thread I'd like to see these sweeping generalizations focused more on why it's a good idea to start a CS degree from the ground floor at 32 (i.e. finishing as 40 looms closer).
posted by chef_boyardee at 7:49 AM on August 23, 2007


Best answer: The archives have lots of questions about Good First Programming Language and Relevance of a Degree for IT jobs. Or What books should be on my personal CS degree reading list?

Python's a popular answer to the first one, with good reason. (I'm not Python's biggest fan, but still consider it a good choice of first language.) See How to Think Like a Computer Scientist.

If you're doing it right, your first language won't forever bias how you think about programming, because you'll continue to learn languages with different programming paradigms that'll continue to change the way you think about programming.

Programming is much more flexible than most fields in expectations of degree. A lack of degree can make it hard for your resume to get past HR at some places, but techies themselves tend to be more impressed by accomplishment and ability than degree, and everyone can cite the example of one of the best programmers they know having never studied it in school.

What gets left out of that account a lot of the time is that much of a good computer science education really is important and relevant, and those best programmers recreated it through independent study. Many more self-taught programmers have woeful knowledge of a lot of important things.

See also Peter Norvig's Teach Yourself Programming in Ten Years.
posted by Zed_Lopez at 7:50 AM on August 23, 2007 [3 favorites]


Best answer: I'd have to say not to learn Java as a first language. It gets in the way of actually learning how to program. I think Ruby would make an excellent starter language because it is simple to start out with, and you can grow with it.

I love this book: Learn to Program for new programmers. Definitely check it out.

And its definitely never too late. Some people have a knack for programming, and if you are one of them, you'll get up to speed very quickly.
posted by AaRdVarK at 7:51 AM on August 23, 2007


Best answer: i would recommend working through how to design programs. that was written with a language called scheme in mind, which you can get here. the book is free online and has a good reputation.

once you start getting the hang of things (ie well before you finish the book) i would also suggest helping out with an open source project in another language. what you choose is up to you - something using a language that appears in the local job ads.

scheme won't get you a job directly. but if you want long-term to be a good programmer (and i suspect you need to, because you need to overcome the other prejudices against you - female, mature, arts student...) then i think it gives you a solid base. that's why i also suggest helping on an open source project. if i saw a curriculum with both those i would probably think you worth at least an interview for an entry level position.
posted by andrew cooke at 8:08 AM on August 23, 2007


Have you thought about a 1 or 2 year program at a local community college? They cover the basics and some of the theory of computer programming. That and your previous degree should be fine for any position.
posted by blue_beetle at 8:10 AM on August 23, 2007


You should know that programming is lucrative because most people are very very bad at thinking like a programmer needs to, and because you usually need to have a huge quantity of fiddly knowledge on hand at all times.

Depending on the job, you'll need to either know or learn about the ins and outs of various programming languages, know how they work (and don't work) in various deployment environments, be able to think on your feet about abstract notions of representation and consider the implications of modifications to those representations, and consume large amounts of documentation in very short periods of time.

I like this work very much, but it's not for everyone. Take a few classes first (in C++, not Java) and see how you like it.
posted by bshort at 8:31 AM on August 23, 2007


Best answer: First, you need to make sure you actually like programming. You'll have to actually try it to know that - just liking math and logic unfortunately aren't enough. I've found it does take a certain personality, and a lot of people think they'll like it, but then realize they really don't. It's nitpicky, annoying, repetitive, frustrating and yes, really awesome when you get something wicked cool to work :)

To figure this out, you don't need to go to school right away. You do need to get started on a project and just do it, however. What do you want to work on? Applications? Java or C# might be a good starting point. Websites? Python and Ruby might be a good bet, or PHP. (Don't torture yourself with Perl, it'll ruin the rest of the languages for you if it's your first exposure to programming). Get a book or two, find a good tutorial on the web, and just start. Work through the examples, and actually understand them. When you've got the basics down (and the basics are, theoretically, the same between all languages) - start a (small) project of your own. Work on it. Fix your bugs. Re-write it so it's faster, smaller, and more robust. Then, find an open source project, and contribute.

By the time you have some open source projects on your resume, you're might be qualified for some junior development positions. If not, QA is the usual jumping off point for wanna-be developers. At this point, consider school to break you of your bad habits, and to teach you algorithms and theory and other fun stuff.
posted by cgg at 8:38 AM on August 23, 2007 [3 favorites]


I got a certificate (not an AA degree) in computer programming at the local vocational-tech school at age 30. We learned C, COBOL, CICS, Mainframe assembler, and Visual BASIC. I had a decent job immediately upon graduation, because the school had an excellent reputation for producing skilled programmers. I'm now 40 years old and attending University working on my bachelor's in Poli-Sci.
posted by Cookiebastard at 8:41 AM on August 23, 2007


Best answer: Here's the thing, if you we're planning on going the degree route, then languages like C, and Java are great starting points. They're fairly low level and get you into the heart of how computer's operate at the OS and hardware level (more C than Java)

If you want to get a job in programming quickly I'd start with something easier and a higher level. This generally means starting on the web, and the best route is going from the front end to back (you'll find less requirements for CS degrees in the web field it seems). Start with the front end languages like HTML, CSS and Javascript. HTML and CSS aren't even true programming languages but Javascript is (and a better one then most give it credit for). There is still a fairly high demand for people with HTML/CSS/JS skills since most true "programmers" on the web don't like writing this stuff. This would also be a good job to do as a contractor if you're chasing a CS degree

Once you've got those languages under your belt you can kick it up a notch starting with Ruby, Python or PHP (or event better a combination). These languages power a large amount of sites on the web (particularly PHP though Python and Ruby are catching up fast). At this point start also looking at things like Design Patterns, Unit Testing etc. The programming concepts that are good practices regardless of language.

At this point you should have the basics of "programming" and now switching languages is more semantics. From here you can start looking at more complex Java based backends and playing with Java.
posted by bitdamaged at 8:44 AM on August 23, 2007 [1 favorite]


Most of industry programming is using libraries and frameworks as well. The language and a general understanding of CS will make it easier to learn them, but they're their own world (see Java). You definitely need to know the theory, the data structures, & the algorithms to be a good programmer, and you need to be able to evaluate what you see quickly, but day to day, those kinds of things are increasingly rarer (middleware is a big deal in software development).

Learning how to read doxygen documentation will make your life much easier.

Sadly, Java and .NET are where a lot of the jobs are right now. Python makes a good starting language for a lot of people, and will let you screw around with stuff like functional programming in a not too intense environment.

Norvig's 10 years link above is great.
posted by devilsbrigade at 8:50 AM on August 23, 2007


Programming is to a very large part an aptitude, like being musical. I know some really smart people who were able to pick up programming quickly, but most of the programmers I know (including my humble self) are "wired" for it - it fits our temperament (perfectionists, detail freaks) and our outlook (nerds and geeks) and our relative lack of people skills ;)

I'm self-taught and i got into programming professionally at age 39 (after 20 years in electronics), so you have lots of time yet. It's a big field. What do you want to do - web programming? writing applications? data processing? embedded programming? In each case there are popular languages and frameworks.

My field is webserver programming. I started with Perl, then moved to Java. Nowadays i believe the path would be to start with PHP - by far the most-used entry-level language for web programming. These days I mainly do Java and C#/ASP.NET; that's where the bucks are.

You said: I have a feeling that whatever language I learn first is going to influence the way I think about programming for the rest of my life

Well, you have to pick the language that will take you where you wanna go, but now that i know several, my feeling is that an experienced programmer knows how to break a project into all of its separate functions that need to be built. The choice of language becomes secondary at that point.

I'm still learning; right now it's C++ for apps and C for embedded processors, just because I want to (that geek mindset again)
posted by Artful Codger at 11:16 AM on August 23, 2007


I wouldn't necessarily fixate on being a programmer in particular: it's quite specialized and there's a lot to learn. You might find it easier to step into other technical jobs: sysadmin, database administrator, testing/QA, technical writer. In particular, with your history you might want to look at technical sales: you're probably not short on confidence or social skills.

Regarding languages, a lot of people are recommended Ruby. That's very trendy at the moment, and apparently the demand for Ruby people exceeds supply. However, it's a very small market so far.

It's not an exact science, but this and this page estimate how popular the various programming languages are. They seem to have Java, C and C++ at the top.

I would say Java is a good place to start, maybe with a Teach Yourself book rather than a formal course to see how you get on. At least if you find you hate progamming, you're only out a few dollars. I found an earlier version of Teach Yourself Java in 21 Days pretty useful. (Though back then it was Java 1.1 not Java 6.)

Java is fully object oriented, unlike C. This might make it a bit harder to start with. However, I think it's helpful to start that way. Most programming is object-oriented now, so if you start with a non-object-oriented language; you'll just have to un-learn half of what you started with and start doing things completely differently when you learn your second language.
posted by TheophileEscargot at 11:26 AM on August 23, 2007


Response by poster: There are so many good answers! I could go crazy with the "mark as best answer" button.

I think I am going to go the route of learning a web-focused language so I can start building up experience right away. I'm also going to read the links on this page.

Thanks so much everyone for your thoughtful responses. You have helped me out a lot.
posted by spacewaitress at 11:55 AM on August 23, 2007


I'm also self taught (well, still in the process really), and would enthusiastically recommend Python as a great language for self-teaching. The code is very clear, readable and friendly (comparatively), but also powerful, fairly concise, and tends to lead you toward good habits. It also has a strong and helpful community and a good deal of resources on the net, as well as loads of libraries and well-written open source stuff.

I've found the philosophy of the language lends itself very well to learning the thought-patterns required for programming. Initially it's more effort than PHP (which I started with, and wish hadn't), but the little extra work up front pays large dividends. Even if you end up switching to Java or whatever, Python enables you to get up and running, producing neat, pleasing programs very quickly.

If you choose Python, Dive Into Python is a great way to go from novice to a having an insight into programming in a short space of time. Though you may want to familiarize yourself with the basics first.
posted by MetaMonkey at 1:58 PM on August 23, 2007


There's a lot I could say about this, but here is my brief recommendation:

People come to programming from all sorts of backgrounds. Given that you are already a college graduate, I would NOT recommend go back for a 4-year computer science degree. Computer science covers only a narrow area of a what a programmer does (mainly the more abstract and mathematical aspects) and only marginally relates to the work a programmer does in real life. Plus, you'll have lots of other unrelated courses to take in order to get another Bachelor's.

Be aware that you do not have to become a stereotypical programmer, hacking away at code all day, to be involved in technology. Like other broad fields such as design or marketing, tech overlaps nearly every area of business, and it's possible to find or design a role for yourself that uses whatever unique skills you bring to the table. Therefore, take courses not only in the basics of programming (languages, data structures, databases, software engineering) but also in any practical computer-related subject that piques your interest. These could include web development, IT/business computing, Internet business, human-computer interaction, interface design, or game theory/game design, to name a few. You may decide that what you really enjoy is interface design, information architecture, project management, or applying technology skills to one particular niche or area of business. People who work at a higher level or have mastery of multiple subjects related to technology usually make more than someone who's only skill is writing code.

As for immediate actions you can take: Because Web programming is in great demand, I would specifically recommend you learn a solid, object-oriented, Web-focused language such as Ruby, and focus your effort on a small project you come up with for yourself and that you are motivated to do. PHP is a popular language but I do not recommend it as a first programming language because it doesn't embody or enforce principles of good programming. Learn it after you have studied Ruby. I would also take a course in C/C++ to understand how things work at a lower level of abstraction. Finally, read books or take courses in the broader disciplines that relate to technology, such as the ones I described above.
posted by lsemel at 2:16 PM on August 23, 2007 [1 favorite]


As a languages major, seriously consider perl (aka "the duct tape of the internet"). It has syntax in common with natural lanugages that other programming languages can't match. Just for laughs, here's a valid perl 3 program (we're up to perl 5.8 now though) that demonstrate something of this here. Personally perl does everything I need except clients side browser stuff (for which there's javascript). Perl probably has the largest collection of open source third party libraries of any programming language, which is great for those of us averse to reinventing the wheel. Here's my friend's new perl site by the way that shows you while it's an old language, it's far from dead.
posted by singingfish at 2:18 PM on August 23, 2007


I recommend Python. It was designed to be easy to learn and to look clean and nice. Basically, Java and C are fairly hard to learn; C isn't hard in itself but it may be hard to do something that will feel interesting/useful to yourself. For example, in Python or Ruby or Perl you may be able to write some very basic games, text editors, email clients, filesystem scripts, scientific apps, a web crawler (if that's your inclination), in the first few weeks as you start. With C in the same time you will still be learning how to work with pointers. Look at tutorials for Python, Ruby and Perl and see which one you like best. Python and Ruby are reputed to be much cleaner and nicer, but Perl is very widely used for web work, Ruby is slower and less used than Python, and has less docs and libraries, but many people like it better and it has a web framework (Rails) that's much more successful than any of the number of Python frameworks. There's more jobs in Python and much more in Perl though. Look at their code, there's basically a type of people who instantly prefer the look of Python code (without braces, with significant leading whitespace) and the type of people who can't stand it and prefer Ruby & Perl style of code. Python is fairly widely used in science and education, but is also generally used in very wide ranging fields, for example Google uses python extensively and it's been used in some popular commercial games, in 3d modeling companies, in NASA, and other places. Perl is what you use if you don't hate Perl and need to do something quickly in terms of web coding. Slashdot is written in Perl, and a wide range of similar sites. PHP is even more 'for web' than Perl. Ruby is what you use if you need Python but don't like Python. It's been said that Ruby's object oriented functionality is cleaner than Python's whereas Python's is more practical. I've read that Python is much faster, but that might have changed in the last half a year to a year. I really like Python and I've used it on all jobs I've held in the last 8-9 years, it's great as a sort of a helper languages like when you need a simple templating for your site or a script that automates some engineering needs or CAD work or what have you..
posted by rainy at 2:58 PM on August 23, 2007


At 30 I was a BA in Philosophy, struggling for my thesis. Then I got a job in a great company as a student hand. Two year later I was employed as a IT Project Manager and now, 7 years later, I am doing better than ever. A proper education (some kind of humanities with a logical punch), really can pay off :-) Go where the jobs are and you will go up in value - both for your employer and yourself.
posted by KimG at 3:06 PM on August 23, 2007


Best answer: As a lady programmer, I want to contradict a few of the points made by the (probably) boys in this thread.
1) You do not have to have such a drive to code that you want to write open source software to become a good programmer or have the temperment for programming. I love to code, am extremely good at it, and have very little interest in getting involved in open source software development. It's just not my thing, I am not motivated to do it, never have been. Which leads me to…

2) Just because you can't teach yourself how to code doesn't mean you can't be a programmer. Maybe you can, you know best how you learn. I am not much of a self-teacher. Now, yes, I can pick up any programming language you want me to use and run with it, but that is merely because I have years of schooling and experience under my belt. I needed the classroom to provide structure to my learning. This does not make me less of a programmer.

3) You have to be "wired" for programming, and if you aren't because you aren't a perfectionist/dork/hermit, you won't be any good at it. Ok, I am a dork at heart, and not the person you would ever elect for class president. But I am generally not what you would call a perfectionist, and I am certainly willing and able to communicate with other human beings. This is a skill absolutely necessary in my current industry (finance), where you can find a whole range of pretty, gregarious people who can also write pretty damn good code.

I am writing this not to diss the guys in the thread, but because it frustrates me to no end that people can't get beyond their own stereotypes of what a programmer "is" and discourage people from trying when they don't meet these stereotypes. If you enjoy logic and problem-solving, that's a good jumping-off point. Can you keep a lot of details in your head at once? That also helps. You know yourself. If you think you can sit down with the python manual and teach yourself enough to decide whether you will like programming or not, go nuts (I say Python because it really is extremely fast to start using and has a great tutorial). If, on the other hand, you are like me and know that you'll never get anywhere if you have to do this all by yourself, sign up for a course somewhere and give it a shot. I frankly do not think C/C++ are good first languages because dealing with pointers is a huge amount of pain to add on to learning the basic semantics of a language and basic programming concepts, although those languages are both well worth knowing. Otherwise, it really depends on what direction you want to go. You can probably pick up Python, PHP, Ruby pretty fast, but the kinds of systems people build with this are (to me) limited. I like big. For big you're talking Java, C, C++, maybe C#.

I hope that you will give this interest a shot even if you don't perfectly match up to what people think a programmer should be.
posted by ch1x0r at 4:17 PM on August 23, 2007 [4 favorites]


Check out the essay I posted to the blue today: Holding a Program in One's Head. If you can do this, you can code; the rest is just details.
posted by orthogonality at 3:20 AM on August 24, 2007


while a lot of what ch1x0r says makes sense, i was one of the few people who mentioned open source projects and i don't understand why she thinks people are saying "you need to love the open source community to be a good programmer".

i just searched back through and didn't find anyone saying anything like that.

the reason i (and, i assume, others) recommended working on some kind of project like that is that it gives an employer evidence that you are writing moderately good code (that you have met the standards that project sets for contribution). it doesn't have to be someone else's project - setting up your own project or web site would also help.

so it's not because i want you to be exactly like me, but to help you impress a future employer. as well as being a good programmer you have to convince someone else of the fact - via a couple of sheets of paper that, at first, are going to have little relevant education or experience.
posted by andrew cooke at 4:35 AM on August 24, 2007


3) You have to be "wired" for programming, and if you aren't because you aren't a perfectionist/dork/hermit, you won't be any good at it. Ok, I am a dork at heart, and not the person you would ever elect for class president. But I am generally not what you would call a perfectionist, and I am certainly willing and able to communicate with other human beings.

I agree with 99% of ch1x0r's post (and, by the way, it's very nice to hear from a female programmer. At my company, it's all boys, and it's always seemed ... lacking in "the other half's" point-of-view.)

My one disagreement is with the part I quoted, above. I don't totally disagree. I am a sloppy person in my non-programming life, and I definitely talk to people (I used to be a teacher), but I DO think programming -- at least if you do it well -- calls for perfectionism.

But let me clarify a little: there's "hacking" and there's programming, and most developers need to do a little of both in their job. Sometimes, due to deadlines, I have to throw something together really fast -- or I have to patch up something written by someone else without having the time to really understand all the ins and outs of their code. In which case, I write sloppy code that works. It works, but it's hard to maintain -- but hopefully it won't need to be maintained. Hopefully, that project is done or can be rewritten later, when things are less hectic.

Like many programmers, I work as part of a team, and everyone on the team needs to be able to understand and edit my code. (And that includes me, six months later, when I have to revisit my own code, and it might-as-well-have been written by someone else.) So the code has to be really clear -- really easy to understand.

The application I'm currently working on is (at present) 20,000 lines long. Our boss might demand a complex change at any time. And that change might mean we'll have to change dozens of lines -- hopefully without the changes causing unwanted side-effects. So, again, the code needs to be clear, logical, streamlined and structured.

I don't know about most people here, but I can't write that kind of clean code right-off-the-bat. I have to refine and refine. I have to make many drafts. THAT'S why I need to be a perfectionist. It's not because I just want to be. It's not pride. It's not geekiness. It's because I know -- if the code isn't clean -- I (and my company) will get burned later.

Sometimes, I wake up in the middle of the night and realize that if I restructure the code just so, it get 50% clearer and easier to maintain. I SO don't want to do this, because it will be complicated and time-consuming. The code works as-is, and it's so temping (as a sloppy person), to take the "if it ain't broke, don't fix it attitude." But from many past experiences, I know that attitude will bite me in the ass, later. So I force myself to be a perfectionist. I recode.

One tiny example: when you program, you have to make up names for things. Let's say that I'm programming an arcade game, so I make up the name "ship" in order to describe the alien ship in my code. I use that name over and over, in hundreds of lines of code.

THEN, my boss asks me to add a second kind of ship, one that can land on planets. It's really tempting to call this ship2, but I shouldn't. Someone reading my code won't realize what's special about this ship. So I decided to call it shipThatCanLand.

Fine, but now I realize that I have shipThatCanLand and ship. "Ship" isn't very clear, not that I have too ships, so I go through all my code and rename the original ship, shipThatStaysInSpace.

Originally, my game had alien ships only. The player didn't have a ship. He had an anti-aircraft gun. Now my boss wants the player to have a ship, too. So now I have playerShipThatCanLand and playerShipThatStaysInSpace.

But now I need to go back and rename my too original ships: alienShipThatCanLand and alienShipThatStaysInSpace.

These aren't necessarily good naming conventions and there are many other ways that coding calls for perfectionism. But I wanted you to be aware of the sort of thought process that programmers (at least this one) have to go through every day.

By the way, after receiving a BA and an MFA in theatre, I became a programmer at 40.
posted by grumblebee at 7:20 AM on August 24, 2007 [1 favorite]


dude, get a decent ide.
posted by andrew cooke at 8:11 AM on August 24, 2007


Not to digress, but Grumblebee, I believe that a well-designed development process minimizes the need for perfectionism. For example, extensive automated testing should allow developers to change code that affects huge swaths of the code base without trying to manually track down every area that affects and ensuring it didn't break. Good coding conventions should make writing readable code somewhat more natural. Good design patterns and anti-patterns help developers quickly choose a strategy for implementing common types of features. I work in a place with all three of these in place and I can confidently say that 90% of the code I write is clean the first time, and I am rather insanely productive because the demands of perfectionism have been mostly automated for me.
If your team relies on perfectionism to deliver good code, you are only as good as your most focused day. On a team of 6 with 20K lines of code, that might be ok. On a team of 60+, with well over a million lines of code, that just doesn't cut it. And yeah, andrew cooke is so right, a good IDE makes life so much better.
posted by ch1x0r at 5:40 PM on August 24, 2007


« Older Why can't my PC see my Camera? Works on the Mac.   |   Shake It Up Baby - name my children's music class Newer »
This thread is closed to new comments.