答:
Rejecting them is not only protecting the company, it is protecting your reputation down the road. Your main requirements in this role imo are:

Provide a list of requirements for HR to have some sort of idea of what to look for

Screen appropriately

Be clear about timelines, both for the training necessary and your specific departure

If the meat of the job is backend development, then that might involve a CS degree as a bare minimum as web programming can be learned but basic programming understanding is harder to pick up on the job.


问:
How can I find own replacement when the company wants someone far less experienced?
I told the company I work for that I want to phase myself out, but that I would stick around for a couple months before applying anywhere to help in the recruitment of my replacement. I offered this because I am the sole web developer and I didn't want to leave them helpless.

The problem is, they want to hire someone very under qualified to avoid having to pay a high salary.

As far as I'm concerned, it's their company and they can run it how they want. However, when it comes to me helping find and train someone before I go, I'm in a position where I don't know what to do.

To give a little perspective, I built them a medium sized e-commerce system using an MVC framework; there's more to it, but I'll leave it at that. The candidates they are finding me to review are people who have never worked as a programmer, have made a couple really crappy static websites using a WYSIWYG program and are calling themselves web designers.

I know these people have no chance at success. I have tried to explain it to the company, but they don't want to hear it; they think one of these people can be trained and be up and running at my level in about a year. The reality is, I don't think their site will last a year if they go this route.

I think maybe they think I am just trying to make myself look good and the new candidates look bad for some reason, which is not the case at all. I would like to leave what I have worked hard on in capable hands.

So what is the ethical and professional thing to do here? Just keep telling them that these candidates are no good until they actually find a decent one, up until its time for me to leave, at which point I leave them with no one? Or just accept that they are going to destroy themselves and do the best I can to pick the best out of the candidates and teach him/her what I can before I go?

I really just want to do the right thing here, so I can leave on good terms. And if a year down the road they fail, I can have a clean conscience.

答:
You need to try your hardest to explain they need someone with experience, and preferably someone who has worked alone before. I would ask them who and how they expect to train someone when you are gone, you need to make them understand that 99% of the knowledge of their system is going to leave with you, and they can either have you spending time teaching basics, or teaching someone how to actually work with the application. I suggest hiring an example to so them that they need someone with experience. Don't hire a total failure, but if you have a reasonable candidate hire them and show your company how much its going to take to make this person even half of you. this will likely end in that guy getting fired though and your company not liking you too much.

you are in a lose/lose situation that you tried to be nice about and offer the chance to make it a win. If you hire no one and leave they will hate you when everything collapses, because you abandoned them, if you hire someone unqualified they will hate you when everything collapses, because you hired someone bad to spite them. your best hope is to have everything collapse on an unqualified developer while you are still there to fix it and get someone qualified to replace you, assuming your company realizes that they need some one qualified after the unqualified guy screws up.

ContentLicense: CC BY-SA 3.0


答:
Do both things - 1) keep telling them that these candidates are no good until they actually find a decent one, that you don't think their site will last a year if they go this route and 2) keep telling them who is the one you would pick from those out of those you reviewed so far.

As far as I can tell this is most safe way if you want to both leave on good terms and have a clean conscience when (if) they fail.

several years ago I would probably recommend only rejecting the candidates because, well because that felt right to me back then - after all the the "experienced guy leaving" seems to be the best one to know. Actually it still feels right but since then, I have been on the both sides and I learned that what I feel is not the whole story.

First thing I learned is if you don't inform them about who is currently "best of the worst" so to speak, this will most likely make a very bad impression. Second thing is that there's a (slight but non-zero) chance that you overestimate the damage and that they will be able to handle things even with inferior replacement.

Title: How can I find own replacement when the company wants someone far less experienced?

Body:
I told the company I work for that I want to phase myself out, but that I would stick around for a couple months before applying anywhere to help in the recruitment of my replacement. I offered this because I am the sole web developer and I didn't want to leave them helpless.

The problem is, they want to hire someone very under qualified to avoid having to pay a high salary.

As far as I'm concerned, it's their company and they can run it how they want. However, when it comes to me helping find and train someone before I go, I'm in a position where I don't know what to do.

To give a little perspective, I built them a medium sized e-commerce system using an MVC framework; there's more to it, but I'll leave it at that. The candidates they are finding me to review are people who have never worked as a programmer, have made a couple really crappy static websites using a WYSIWYG program and are calling themselves web designers.

I know these people have no chance at success. I have tried to explain it to the company, but they don't want to hear it; they think one of these people can be trained and be up and running at my level in about a year. The reality is, I don't think their site will last a year if they go this route.

I think maybe they think I am just trying to make myself look good and the new candidates look bad for some reason, which is not the case at all. I would like to leave what I have worked hard on in capable hands.

So what is the ethical and professional thing to do here? Just keep telling them that these candidates are no good until they actually find a decent one, up until its time for me to leave, at which point I leave them with no one? Or just accept that they are going to destroy themselves and do the best I can to pick the best out of the candidates and teach him/her what I can before I go?

I really just want to do the right thing here, so I can leave on good terms. And if a year down the road they fail, I can have a clean conscience.


问:
How important is the ability to touch-type?
Did you learn to touch-type when you were already working as a programmer?  If so how did it affect your productivity?  Or are you still unable to touch type and do you think it holds you back?

According to Steve Yegge it is essential,

Personally I did not notice much difference, possibly because I was spending less than 25% of my work time actually typing (I was working on a large legacy project at the time and I was spending more time on reading and debugging existing code.)

答:
My impression is that people who know how to touch type tend to write more documentation in their code - just because it's easy. This does not directly benefit you, but all the others you work with, maybe including your future self when debugging / extending your own code.

Personally, I am that sick of people who don't document their code that I probably would test programmers on their ability to type fast if I was in charge of selecting people for a project.

ContentLicense: CC BY-SA 2.5


问:
How useful are Lisp macros?
Common Lisp allows you to write macros that do whatever source transformation you want.

Scheme gives you a hygienic pattern-matching system that lets you perform transformations as well.  How useful are macros in practice?  Paul Graham said in Beating the Averages that:

The source code of the Viaweb editor was probably about 20-25% macros.

What sorts of things do people actually end up doing with macros?

答:
Macros are useful to embedded some patterns.

For example, Common Lisp doesn't define the while loop but has do
which can be used to define it.

Here is an example from
On Lisp.

```<code>(defmacro while (test &body body)
  `(do ()
       ((not ,test))
     ,@body))

(let ((a 0))
  (while (< a 10)
    (princ (incf a))))
</code>```

This will print "12345678910", and if you try to see what happens with
macroexpand-1:

```<code>(macroexpand-1 '(while (< a 10) (princ (incf a))))
</code>```

This will return:

```<code>(DO () ((NOT (< A 10))) (PRINC (INCF A)))
</code>```

This is a simple macro, but as said before, they're usually used to
define new languages or DSLs, but from this simple example you can
already try to imagine what you can do with them.

The loop macro is a good example of what macros can do.

```<code>(loop for i from 0 to 10
      if (and (= (mod i 2) 0) i)
        collect it)
=> (0 2 4 6 8 10)
(loop for i downfrom 10 to 0
      with a = 2
      collect (* a i))
=> (20 18 16 14 12 10 8 6 4 2 0)
</code>```

Common Lisp has another kind of macros called reader macro which can
be used to modify how the reader interprets the code, i.e. you can
use them to use #{ and #} has delimiters like #( and #).

Title: How useful are Lisp macros?

Body:
Macros are useful to embedded some patterns.

For example, Common Lisp doesn't define the while loop but has do
which can be used to define it.

Here is an example from
On Lisp.

(defmacro while (test &body body)
  `(do ()
       ((not ,test))
     ,@body))

(let ((a 0))
  (while (< a 10)
    (princ (incf a))))

This will print "12345678910", and if you try to see what happens with
macroexpand-1:

(macroexpand-1 '(while (< a 10) (princ (incf a))))

This will return:

(DO () ((NOT (< A 10))) (PRINC (INCF A)))

This is a simple macro, but as said before, they're usually used to
define new languages or DSLs, but from this simple example you can
already try to imagine what you can do with them.

The loop macro is a good example of what macros can do.

(loop for i from 0 to 10
      if (and (= (mod i 2) 0) i)
        collect it)
=> (0 2 4 6 8 10)
(loop for i downfrom 10 to 0
      with a = 2
      collect (* a i))
=> (20 18 16 14 12 10 8 6 4 2 0)

Common Lisp has another kind of macros called reader macro which can
be used to modify how the reader interprets the code, i.e. you can
use them to use #{ and #} has delimiters like #( and #).


问:
Selling LINQ To Management
I recently started working at a new company that currently doesn't use linq, but does use C# and the .net framework.  I'm coming from a LINQ background, so I'm biased, but I still think there are a lot of advantages to using linq. </p>

<p>That being said, it's still going to be hard to influence change as I'm still very new.  What suggestions do you have to sell this to management?  The database systems are still relatively new, so I think now, as things are still developing, would be the best time to try convincing people to use this.  This is both a technical and political question.  Any help would be appreciated.  </p>

答: To sell to managment you need to focus on cost savings. LINQ to SQL (im assuming you meant that) is much faster to write so can reduce project costs.</p>

Title: Selling LINQ To Management


答:
Articles

If you want to convince management you need outside sources.  Try to find some articles that shows how LINQ improves productivity.  This will help your case and help management feel more confident in the decision to move forward with LINQ.

They're not going to pick up a new technology simply because one of the "new hires" has suggested it.  However, if there are solid, reliable resources that are talking about how this new technology will improve productivity, then they'll be much more likely to consider it.

Here are a couple of articles that I found (for a couple of bad examples):

a bad example

another bad example

a decent example

Sample Code

Another idea would be to write some simple code with LINQ in order for them to see how it would be used compared to their current technology.  Essentially do a "sample conversion" for them to examine.

Title: Selling LINQ To Management

Body:
I recently started working at a new company that currently doesn't use linq, but does use C# and the .net framework.  I'm coming from a LINQ background, so I'm biased, but I still think there are a lot of advantages to using linq. </p>

<p>That being said, it's still going to be hard to influence change as I'm still very new.  What suggestions do you have to sell this to management?  The database systems are still relatively new, so I think now, as things are still developing, would be the best time to try convincing people to use this.  This is both a technical and political question.  Any help would be appreciated.  </p>


问:
Should the deploy script be an artifact of the build?
This is a web project written in Java.

So, I'm writing the build and the deploy scripts. To create the build, I used ant. The continuous build is done with Jenkins.

The build generates 3 different artifacts:

The war file

A zip with layouts

A zip with images

So far, so good, but now I need to write the deploy script, which should:

Deploy the war (artifact 1) to the tomcat running at server 1

Place the artifact 2 at server 1 in a specific directory

Place the artifact 3 at server 2 in a specific directory

So I was talking with my colleague and he said that we should also generate an artifact (maybe deploy.xml) that deploys these artifacts when placed at the correct server.

So there would be another script, that would:

Download the jenkins artifacts

scp to each server and place the deploy.xml there

remotely invoke the deploy.xml

What makes me a little uncomfortable is the act of having the deploy.xml as a build artifact. The motivation behind this would be to be able to make a deploy without needing to have access to the VCS repositories, so a build would be self-contained, ie, any build could go into production only with what was generated by Jenkins.

Where should the deploy scripts be placed? Should they be only at the VCS or should they be build artifacts too?

答:
My experience is that everything that can be automated should be. If you can describe it as step 1, step 2, .... then it should be a script. If the script can be auto-generated to include build specific info (e.g. revision tag), then that's what you should do. This is not for the sake of being lazy, but for the sake of being predictable and reproducible.

Note bene: you should also have an auto-generated revert script that can be used by anyone on the team in case the auto-generated deploy script goes bat sh*t crazy and hoses the production server.


问:
What is the starting point for Ubuntu app development?
I'm thinking of developing software for Ubuntu and other related Linux-based distros (like Linux Mint). But currently am at a loss for where to start.

Would learning Python be enough/good?
And what are the other things I should know about before starting this kind of developing?

And will I be able to publish my apps to a software store like Ubuntu store even if I am from outside USA/UK? If not, what are the options I have to make my apps reach the audience?

As a lot of users had asked, I intend to build applications only for Linux (I'm thinking of Gnome) that will be a bit business and enterprise oriented.

Currently I am an Oracle certified Java developer in J2SE and J2ME. And I know Python a bit.

答:
What type of apps do you want to write?

Python + Qt can produce perfectly good gui apps on Linux

There is a conference on beginning Liunux app development with talks online

I don't know if/why Ubuntu would limit access to US/UK programmers - see the software center for details


问:
New vs Clone Git in Eclipse with EGit
I'm not sure I have either my new repo or clone repo workflow, or both, setup correctly. When I create a new project I create a repo on github, can't clone from it as it's empty so I create a new project which goes into my workspace and then the git init runs on the workspace copy. So I end up with everything in workspace\project-name.

However, when I clone from github first I need to clone the repo and this goes into my default git directory (C:\git) as git\cloned-project-name, I then need to import this Git repo as a project into my workspace and I end up with workspace\cloned-project-name effectively duplicating the project folder in the git area.

I've tried to clone to workspace\cloned-project-name but then it asks to import the git project and if I try to use workspace\cloned-project-name again, it errs.

What am I doing wrong? Thanks, Matt.

答: Nope. There's no way to get this to work. You can't use egit to checkout a git project into the workspace and if you check it out elsewhere and try to copy it into the workspace, you will lose your connection to the remote repository. If you want VCS that works, use svn or mercurial.</p>

Title: New vs Clone Git in Eclipse with EGit


答:
It also would help your case if you had additional backing from coworkers, so try to see if anyone else would like to use Linq as well.  Creating some realistic sample benchmarks (using actual non-cherry picked data) would be a good idea as well.

Sometimes organizations do things for one reason or another because of the dreaded "we've always done it this way" line of reasoning and not because labor or management really feel it's the best way to do things.  Getting a discussion going in your team is a good way to make changes away from that line of thinking.

Title: Selling LINQ To Management


问:
Why should I use reflection?
I am new to Java; through my studies, I read that reflection is used to invoke classes and methods, and to know which methods are implemented or not.

When should I use reflection, and what is the difference between using reflection and instantiating objects and calling methods the traditional way?

答:
I'd group uses of reflection into three groups:

Instantiating arbitrary classes. For example, in a dependency injection framework, you probably declare that interface ThingDoer is implemented by the class NetworkThingDoer. The framework would then find the constructor of NetworkThingDoer and instantiate it.

Marshalling and unmarshalling to some other format. For example, mapping an object with getters and settings that follow the bean convention to JSON and back again. The code doesn't actually know the names of the fields or the methods, it just examines the class.

Wrapping a class in a layer of redirection (perhaps that List isn't actually loaded, but just a pointer to something that knows how to fetch it from the database) or faking a class entirely (jMock will create a synthetic class that implements an interface for testing purposes).

Title: Why should I use reflection?


答:
Before anything, be specific about what parts of LINQ you want to them to adapt to.

In general, to create change, you'd have to define what they're already using, the problems they're having, the ways LINQ could solve those problems, how much of a increase in performance they could have with LINQ based on your assessment. You can't expect to bring them something unknown and have them see the big picture. You'll have to bring them that picture.

Title: Selling LINQ To Management


问:
What modern alternatives to Numerical Recipes exist?
In the past, the Numerical Recipes book was considered the gold standard reference for numerical algorithms.  The earliest Fortran Edition was followed by editions in C and C++ and others, bringing it then more up-to-date.  Through these, it provided reference code for the state-of-the-art algorithms of the day.

Older editions are available online for free nowadays.

Unfortunately, I think it is now mostly useful only as a historic tome.  The "software engineering" practices seem to me to be outdated, and the actual content hasn't kept pace with the literature.

What similarly comprehensive yet approachable references should the modern programmer look at instead?

答:
Personally I like it, it's about the level I can understand

The code is Fortran translated to 'C' but that's OK you can just translate it back to Fortran and then into C++ yourself!  There are advantages to the Fortran or C versions in that the code is pretty much self contained, you don't have to drag in a bunch of C++ classes to do matrices, complex, etc - especially given the quality of their coding!

There is a justifiable objection to the ludicrous copyright claims by the authors and I know a number of lecturers that ban NR in their classes. Among numerical experts the books also have a reputation as "enough information to get you into trouble". But their only suggestion is generally to use their personal code or buy NAG.

A suggested collection of alternate high quality numerical libs is at http://www.netlib.org/


问:
Simplified knapsack in PHP
I have two instances where I'd like to display information in a "justified" alignment - but I don't care if the values are switched in order. One example being displaying the usernames of people online:

Anton Brother68 Commissar Dougheater Elflord Foobar Goop Hoo Iee Joo

Rearranging them we could get exactly 22 characters long on each line:

```<code>Anton Brother68 Foobar
Commissar Elflord Goop
Dougheater Hoo Iee Joo
</code>```

This is kind of a knapsack, except seems like there ought to be a P solution since I don't care about perfection, and I have multiple lines.

Second instance is identical, except instead of names and character count I would be displaying random images and use their width.

答:
Decide the number of lines, for example by taking the total length and dividing by some maximum line size. Sort the list of names by descending length. Repeatedly take the longest name off the sorted list and add it to the shortest line so far. After you have added all names to the lines, you may want to randomize the order or sort alphabetically within the lines to make it look better.

This is a very close approximation of the optimum solution.

Title: Simplified knapsack in PHP


问:
Do you have a find/replace list of C/C++ code improvements that doesn't cause side effects?
Time after time you have to work with code that's not as safe as you would like it to be. Either that's someone elses code, or something you wrote at 3am 5 years ago, but it happens.

And in those cases it would be good to make that code a little bit safer and more typing-error prone.

At the same time, you want to avoid extensive testing, and if code is not covered with unit-tests, well, let's be honest, even if it is, you can't be sure you won't break anything when doing most refactoring things.

So, what I'm wondering is, what would be a shortlist for C/C++ code that can be automated to almost "find/replace all" that would make the code safer, without having high risk of changing the programs behavior.

Few things that came to my mind:

Make all member functions const

Make all arguments for internally linked functions const

Remove all C style casts and replace them with C++ style casts on errors

Turn most macros into inline functions or templates

Change enums to typed enums

But most of them would need a recompile and manual verifications Do you have other candidates, and maybe even safer ones?

答: Pointer arithmetic, in the general case. Not all pointer arithmetic is bad but the vast majority of it should be well encapsulated and never shown to the user. I'd also flag up calls to new and delete as worthy of a second look.


问:
Why is it so hard to make a great app?
Maybe a better way to ask the question would be: why is the Facebook app so bad?

This is not so much a question specific to the Facebook iOS app, it just uses that as an example. What I want to know is how is it possible that a company like Facebook that has all the resources it needs can make such a bad app. Facebook is famous and "cool" so a lot of devs, designers and architects want to work for them, and it has the money to pay for the best of those. And it's not like it doesn't care about the app. It's not some small internal unimportant project, it's one of the most downloaded apps on the app store. But also one of the most complained about. This brings me to my question, how is it possible that an entity with such resources and desire can end up making such a bad product?

To put it another way, what are the main complexities involved in such a big project that can ultimately lead a collection of perfectly skilled individuals to collectively create something that is not so perfect? Put in a more positive way, what is required (other than skilled people) to make a great product?

答:
Why is it so hard to write a good song? To shoot a good film? To paint a masterpiece?

This is a rhetorical question. Because not everybody is as gifted as Paganini, Spielberg or Da Vinci. And software development, like every craftsmanship or every art, depending upon you viewpoint, requires some talent and endurance. Obviously, not everyone has them both.

Title: Why is it so hard to make a great app?


答:
Sounds like a question that would probably result in lists, but here are some thoughts, mostly to do with company politics:

Software that doesn't earn the company much money often becomes neglected, even if the company's public image hinges on it. Ironically, I see this kind of myopia most often in companies run by marketing people.

Companies often have interns or inexperienced/rusty programmers work on high-profile non-mission-critical programs to give them experience and/or boost their confidence. It often sucks for the end users, but it's a great way for people to learn and make better programs in the future.

Companies also often have the originator of an idea implement the idea. They may have a great idea, but not be so great at programming.

Having infinite resources doesn't necessarily mean you'll be able to make the best software. If you're developing, say, a menu UI, you can't have more than a two or three people working on it -- never, ever more than one graphics designer if you want to avoid fights, and a couple programmers at most working on a few pieces of code that responds to the UI. Too many chefs spoil the broth.

You need lots of time, and given the globally competitive nature of the industry, time is not on any developer's side.

Changes arise in the needs of the clients, or of the software itself. For instance, the customer might suddenly decide a week before release that they want this or that they want that; or, it might suddenly turn out that a library you were lying on didn't have adequate performance in a certain scenario. Painful and demoralizing backtracking ensues.

In the same vein, programming inherently relies on the code of not just yourself or your teammates but of the code and code quality and maintenance of dozens, hundreds, maybe even thousands of other programmers. You usually don't have control over all of them, and your choices are often limited.

(With all that said, yeah, I feel that the iOS Facebook app really could use some improvement...)

Title: Why is it so hard to make a great app?

Body:
Maybe a better way to ask the question would be: why is the Facebook app so bad?

This is not so much a question specific to the Facebook iOS app, it just uses that as an example. What I want to know is how is it possible that a company like Facebook that has all the resources it needs can make such a bad app. Facebook is famous and "cool" so a lot of devs, designers and architects want to work for them, and it has the money to pay for the best of those. And it's not like it doesn't care about the app. It's not some small internal unimportant project, it's one of the most downloaded apps on the app store. But also one of the most complained about. This brings me to my question, how is it possible that an entity with such resources and desire can end up making such a bad product?

To put it another way, what are the main complexities involved in such a big project that can ultimately lead a collection of perfectly skilled individuals to collectively create something that is not so perfect? Put in a more positive way, what is required (other than skilled people) to make a great product?


答:
If you want to persuade somebody of using LINQ you might use the following reasons:

LINQ is just a framework feature, it does not require any modification of your runtime. This means that there is no danger for existing .Net application as long as those are written against .Net 2.0 CLR.

LINQ is implemented through extension methods, so you just need to deploy the libraries containing these methods to your project to enable LINQ support -- easy deployment, no need of re-compiling the libraries that are not affected.

LINQ is universal and in some respect source-independent. This means that you can reach higher code reuse in your project.

LINQ allows you to easily parallelize your application using PLINQ just by adding .AsParallel() to you IEnumerable -- there is no need to write sophisticated code for syncronisation (this requires .Net 4.0, however).

Title: Selling LINQ To Management


答:
I would personally say there is no such list.

There are many kinds of syntax that have some "safer equivalent" but for which there are too many justifiable reasons to use to say that it should be replaced with the "safer" code.

For example, not all member functions should be const, and there are cases where you don't want to do such a thing. There are good reasons for not making parameters to functions const, just as there are reasons to make them const. There are cases where a function-like macro is actually a code-generating macro or where turning it into an inline function isn't justified. There may be reasons to prefer a "plain" enum over a typed enum.

There aren't enough hard-and-fast rules, I think, to even consider any candidates.

There are some general rules: Prefer references over pointers; avoid the use of new when possible; avoid writing operator overloads; and so on. But there are exceptions to all of these "rules" and there are arguments for ignoring them.

Most of this is a matter of style. Use whatever style is appropriate.

Title: Do you have a find/replace list of C/C++ code improvements that doesn't cause side effects?

Body:
Time after time you have to work with code that's not as safe as you would like it to be. Either that's someone elses code, or something you wrote at 3am 5 years ago, but it happens.

And in those cases it would be good to make that code a little bit safer and more typing-error prone.

At the same time, you want to avoid extensive testing, and if code is not covered with unit-tests, well, let's be honest, even if it is, you can't be sure you won't break anything when doing most refactoring things.

So, what I'm wondering is, what would be a shortlist for C/C++ code that can be automated to almost "find/replace all" that would make the code safer, without having high risk of changing the programs behavior.

Few things that came to my mind:

Make all member functions const

Make all arguments for internally linked functions const

Remove all C style casts and replace them with C++ style casts on errors

Turn most macros into inline functions or templates

Change enums to typed enums

But most of them would need a recompile and manual verifications Do you have other candidates, and maybe even safer ones?


答: The Facebook app is considered bad because people expect it to be a fully functional Facebook on a platform Facebook never was intended or likely planned to be on. Its like expecting a Prius to Preform the same as a Lamborghini.</p>

Title: Why is it so hard to make a great app?


问:
Do you prefer conciseness or readability in your code?
Language shortcuts can often be used to make code more concise.

For example, ternary and null coalescing operators can reduce the amount of code, but arguably to the detriment of readability:

In C#:

```<code>Person newGuy = new Person();
if (boss == null) {
    newGuy.Boss = GetDefaultBoss();
} else {
    newGuy.Boss = boss;
}
</code>```

is functionally equivalent to:

```<code>Person newGuy = new Person();
newGuy.Boss = boss ?? GetDefaultBoss();
</code>```

but obviously a lot more verbose.

Where do you draw the line when it comes to conciseness vs readability?

答:
Readability should come first, long-term most people spend most time modifying or extending existing code - readability is a big part of maintainability.

That said, conciseness is something which can contribute towards readability. For example, in your question the second snippet is both more readable and more concise.


答:
"Bad" is in the eye of the beholder; judgements about the quality of the Facebook app (or any app) are pretty subjective. What are the criteria by which you judge the app? Your list probably looks something like this:

Beautiful user interface.

Does exactly what I want, when I want it.

Impresses my friends.

Fun to use.

Doesn't crash.

What are the criteria that Facebook's development team uses? Probably something like:

Makes the FB executive team happy and results in a steady stream of paychecks.

Breaking that down a bit further, we might guess at:

Easy for anyone to figure out.

UI acceptable to iOS users.

Unlikely to offend many users.

Minimizes load on FB servers.

Doesn't crash.

As you can see, there's not much overlap there. I may have guessed wrong on your priorities, and I may have guessed wrong on FB's priorities, but even if I could magically divine the correct answers it's a good bet that the lists would still be different.

Also, realize that FB is famous for its web user interface adjustments, and FB users are famous for complaining about the FB user interface, particularly when it changes. The real lesson here is:

You can't please everybody.

To address your question more directly:

Put in a more positive way, what is required (other than skilled
  people) to make a great product?

• Understanding of the needs and desires of the users.

• Consideration of requirements from other stakeholders, such as service providers.

• Design skill (and political clout) to maximize the alignment of user requirements and other stakeholder requirements as possible.

• Marketing.

Title: Why is it so hard to make a great app?


问:
SONAR and DesignForExtensionCheck Rule
When enabling SONAR on an in-house Java project, there are a large number of violations being reported due to the rule DesignForExtensionCheck. Whilst I agree with the theory that all classes/methods should be marked up as being either Abstract, Final, etc. But is it strictly necessary for an in-house application where the developers have full contorl over the code base and unit tests etc?

An example is a Value Object who's every getter/setter is required to be final to pass this check. When you have 500+ such issues being reported its a big ask to retrofit the code.

Some people have stated that Java has some flaws, and one of those is that classes/methods are not final by default. Bearing in mind that we don't have final as the default behaviour how much effort do we realy have to go to declar everything as final?

Note: I realise that API's being used by third parties must have tighter controls. This question is levelled at in-house applications.

答:
It's not the first rule I would be worried about if you have an internal app.  Be aware though that if some other party within your org wants to use that app then some of those warnings should be heeded.

Some would say the warnings should be heeded regardless, has it been causing you major issues in PRD?  If not, then don't sweat it, focus on the other areas.

Title: SONAR and DesignForExtensionCheck Rule


答:
In my experience, some development groups tend to dislike LINQ. Of those I've encountered who don't like it or who don't want to use it, there have been 3 types. I'm primarily referring to LINQ to SQL/Entities/XML here.

First, there are those who're using other/older object management methods like CSLA or Microsoft Enterprise Library. They're comfortable with this, have time invested in it and don't want to disrupt their existing work by adding in LINQ.

Second, there are those who're more "hands on" thinking coders who see LINQ as a something a 'real' programmer wouldn't do, sort of a cheat or shortcut. One I ran into was even against using built-in generics and IEnumerable objects in favor of coding these algorithms themselves. This seems most common among ex-C++ programmers.

Third, there are those who're still thinking in terms of 10-12 years ago VB6 client-server programming even though they're coding it in C#. LINQ scares and confuses them.

I don't know if your organization falls into any of these. The first one at least holds out hope that you can move toward LINQ in some new development. You may also be able to show them some of the advantages of LINQ to Objects and get them more comfortable with it. The other two are more difficult and you'll face resistance in moving them in the LINQ direction, even in a small way.

Title: Selling LINQ To Management


问:
Agile,Waterfall and requirement changes
Has anyone had this issue of a project defined as 'Agile' being overrun by requirement changes ? I work on a development project which is run in 4 weeks Sprint but there are always changes in between these Sprints . Is it still defined as Agile then ? I feel it's sort of a sub Agile process - The requirements of an Agile process should be defined at the beginning of a sprint and reviewed towards its end. Am I right in this? Please let me know your experiences in this .</p>

答:
For the sanity of the programmers it is best if requirements do not change during a revision/sprint.

In your situation, there are two obvious options:

shorter sprints

get the customer to agree not to alter the requirements during a revision/sprint unless the entire revision/sprint is cancelled and re-planned

I highly recommend both.

Title: Agile,Waterfall and requirement changes


问:
database migration: upgrade schema deployed on client machines
I'm working on an application, which when deployed is installed locally on client machines, and uses a local database server.  Stupidly, I didn't plan for schema changes -- and now it needs to change.

Perusing lots of SO and Programmers questions, and googling, I've found a few strategies:

many SQL files.  One for each version.  When upgrading, use version number to decide which SQL file(s) to execute

one SQL file.  No drop-statements, tables created with `create table if not exists  -- so when upgrading or installing the first time, simply run this file.  Everything already in the db will be fine, all new tables etc. will be created

blow away, then rebuild db.

make a copy of all the data

drop the entire schema

load in the new schema

reload the data

auto-generated diff file.  Seems to be mistrusted by some; tool for generating such a file costs money (??)

I'm looking for advice to help decide between these strategies.

An additional note:  the data is upwards-compatible (if that's the right term):  none of the schema changes involve dropping tables or columns, or changing FK/PK relationships.

答:
I would personally do it the following way:

The applications released to your clients must have clear version numbers, for example "1.2", "1.4" etc, which is easy to be quickly determined on the client machine (registry/configuration file/table).

The database schema for every single version is known and constant on every client machine.

When you roll-out a newer version of your application you just implement the necessary upgrade the the latest public version (upgrade from previous minor version), for example from 1.2 to 1.4, 1.4 to 1.6 etc. In your script you perform all necessary updates: adding new columns, keys, tables, references etc.

You installer should bundle all update scripts:

When your customer runs the installer it first checks for the installed version.

Depending upon the determined version all scripts are applied sequentially until the database is updated to the latest version.

If your release cycle is short and you often release new versions, you might think of impelementing a cummulative updating scripts from one major version to another, so that you can diminish the number of scripts applied. You still first update the client DB to the next major version using single scripts and then quickly upgrade from major version to major version using this cummulative update scripts.

The main advantage here is that you don't have to support many scenarios for update: you just make diff against the latest public version and maintain this part of your update.


答: SQL file for each schema version change with creates/alters/etc.</p>

Title: database migration: upgrade schema deployed on client machines

Body:
I'm working on an application, which when deployed is installed locally on client machines, and uses a local database server.  Stupidly, I didn't plan for schema changes -- and now it needs to change.

Perusing lots of SO and Programmers questions, and googling, I've found a few strategies:

many SQL files.  One for each version.  When upgrading, use version number to decide which SQL file(s) to execute

one SQL file.  No drop-statements, tables created with `create table if not exists  -- so when upgrading or installing the first time, simply run this file.  Everything already in the db will be fine, all new tables etc. will be created

blow away, then rebuild db.

make a copy of all the data

drop the entire schema

load in the new schema

reload the data

auto-generated diff file.  Seems to be mistrusted by some; tool for generating such a file costs money (??)

I'm looking for advice to help decide between these strategies.

An additional note:  the data is upwards-compatible (if that's the right term):  none of the schema changes involve dropping tables or columns, or changing FK/PK relationships.


答:
What do you already know?... That's something that would help us provide better answers.

In any case, you'll probably have to decide on a GUI toolkit first, some questions that will help you choose:

Do you want your apps to run on Linux only? (no thoughts on Windows/Mac compatibility)?

Which desktop environment your app will favor? Gnome, KDE? (if I'm not mistaken, Gnome's Ubuntu default)

This might steer you towards GTK, for instance (the "native" Gnome toolkit).

Then you will need a language which has bindings for the toolkit you choose. Even though a toolkit might support a lot of languages, often just a few of them are "first-class citizens"- some languages will have not up-to-date bindings or even worse (less documentation, things not working, harder to build, etc.). For GTK I think C, Vala, Python are the first-class citizens.

Unless you are strange requirements, I'd pick the most higher-level language/the one you are more familiar with/etc.

It will also help if you are familiar with packaging- i.e. making .debs for Ubuntu (I think Launchpad helps a lot for hosting/building Ubuntu packages).

Finally, you should be familiar with all the technologies you'll need- not just your toolkit, but even the desktop environment's libraries, the stuff from freedesktop, etc.

Title: What is the starting point for Ubuntu app development?

Body:
I'm thinking of developing software for Ubuntu and other related Linux-based distros (like Linux Mint). But currently am at a loss for where to start.

Would learning Python be enough/good?
And what are the other things I should know about before starting this kind of developing?

And will I be able to publish my apps to a software store like Ubuntu store even if I am from outside USA/UK? If not, what are the options I have to make my apps reach the audience?

As a lot of users had asked, I intend to build applications only for Linux (I'm thinking of Gnome) that will be a bit business and enterprise oriented.

Currently I am an Oracle certified Java developer in J2SE and J2ME. And I know Python a bit.


问:
Using Django without a database
Is Django a good solution for creating applications that won't use any database and communicate only through an internal API? </p>

答:
From the Django book:

Django is well suited for making database-driven Web sites, as it comes with easy yet powerful ways of performing database queries using Python.

You can use the framework to make a site with some logic in it, but you will be wasting some of its potential. Besides, interacting with the database from Django layer is too easy to ignore it.

Title: Using Django without a database


问:
Is there a canonical tutorial or book on functional programming concepts?
Coming from a procedural/OO programming background, I tend to write Scheme programs in a procedural fashion. I would be intersted in learning Scheme or Lisp in a functional way from the ground up, to kind of reset my programmer's mind.

Is there a tutorial or book out there that's the de-facto standard for describing best practices, design methodologies, and other helpful information on functional programming concepts? What about that book makes it special?

答:
Use it.

If you do functional programming daily, maybe smaller applications or exercises from books, then you will be better on it.

I have used it since the first programming lecture in university. At the beginning it was very hard, because it is so different, but now I prefer it to imperative programming.

If you are looking for a good book, I would recommend Real World Functional Programming: With Examples in F# and C# by Tomas Petricek and Jon Skeet

ContentLicense: CC BY-SA 4.0


答:
There is one thing that the verbose version has as an advantage.

It has more lines, and most debuggers are line-oriented!   It is very hard to set a break point in the middle of an expression, but it is usually trivially simple to set it inside a block statement.

In other words, which one would you want to see in your editor if you want your debugger to kick in when boss == null ?

(That said I like the ??-operator)

Title: Do you prefer conciseness or readability in your code?

Body:
Language shortcuts can often be used to make code more concise.

For example, ternary and null coalescing operators can reduce the amount of code, but arguably to the detriment of readability:

In C#:

```<code>Person newGuy = new Person();
if (boss == null) {
    newGuy.Boss = GetDefaultBoss();
} else {
    newGuy.Boss = boss;
}
</code>```

is functionally equivalent to:

```<code>Person newGuy = new Person();
newGuy.Boss = boss ?? GetDefaultBoss();
</code>```

but obviously a lot more verbose.

Where do you draw the line when it comes to conciseness vs readability?


答: If it doesnt alter the external dependencies, I dont see why they would need to micromanage this in the first place.  Your first mistake was probably asking them.  Personally, I'd just use it.  When they see you can get the job done with a tenth of the code others are using, they'll come along.  'course, you better be darn sure it will end up better than the current approach being used.</p>

Title: Selling LINQ To Management


问:
How to reach to the advanced level in SQL?
I think I have a good grasp of SQL and the most features it has, but sometimes when I've done some more advanced Reporting Services a fellow developer has helped me with some stuff and when I open some existing procedures in T-SQL I understand that I have some learning to do.
I think I have focused more in later years at application code (C# and javascript mostly) and somehow my SQL skills aren't there where It should be. Because at work the most stuff is very database centric with procedures, so I think I need to get better at SQL.
But when I google around about features and look in books about SQL I know the most stuff, but somehow getting better at SQL ain't so easy any more. Does anybody have any advice how to become an advanced SQL programmer? What books to pick up? By the way I work exclusively with SQL Server. </p>

<p>I've done tons of basic procedures with inserts, updates, selects with joins and group by and so on. But doing bigger problems I've always done a more application-centric approach with arrays and collections, but sometimes (Reporting) there's no choice than do it in SQL and work with temporary tables and so on. I'm tempted to do cursors because then I can loop through everything but that kills database performance (how about looping through a half million rows with a cursor?). </p>

答:
The temptation to do cursors is very common with procedural programmers. Focus on learning the set-based mindset behind great database programming, and you will become a superstar.

In addition to the Joe Celko and Bill Karwin books (recommendations enthusiastically seconded), the series of Microsoft Press books on SQL 2008 by Itzik Ben-Gan et al. are also top notch.  They will whip you into shape and train you in the direction of sophisticated set-based problem solving.

After that, Kalen Delaney's book on SQL Server Internals (also from Microsoft Press) will explain the "why" behind a lot of things other books recommend and say "this performs better".


答:
The main problem is that you believe that you are using Scrum but you don't. Especially your product owner doesn't follow it. In Scrum a sprint is a safe zone and no changes to committed user stories can be made unless current sprint is canceled. It is responsibility of Scrum master to enforce this. If this doesn't work in your environment then it is a process problem = you are not using Scrum.

The simplest change you can do (if you want to follow Scrum) is make your sprint shorter - one week for example. 4 week sprints were considered as option in early days of Scrum but today common is 1 - 2 weeks and 3 weeks is considered as upper boundary. 4 weeks is very long time in changing environment.

Title: Agile,Waterfall and requirement changes

Body: Has anyone had this issue of a project defined as 'Agile' being overrun by requirement changes ? I work on a development project which is run in 4 weeks Sprint but there are always changes in between these Sprints . Is it still defined as Agile then ? I feel it's sort of a sub Agile process - The requirements of an Agile process should be defined at the beginning of a sprint and reviewed towards its end. Am I right in this? Please let me know your experiences in this .</p>


问:
Will I ever be able to code client-side browser code in a language of my choice?
I'll be brutally honest: I hate writing client side code in JavaScript. I'm not a fan of this language, to say the least.

It seems silly to me that browsers support a programming language, rather than an intermediate virtual machine (like CIL or JVM). The latter would allow programmers to write in a language of their choice (to some extent), rather than in one fixed pre-set language. This language could evolve more rapidly, because only changes to the CIL/JVM/whatever would require every major browser to upgrade. Language features could be added without affecting old browser experience.

The massive savings of effort that intermediate langauges bring about are well known. Are there any initiatives out there to promote browser "scripting" in something other than JavaScript, and especially in an already designed, developed and optimized virtual machine? Do they have any momentum?

答:
You might just be in luck. This is the opening paragraph of a submission on the webkit-dev forum:

Many languages compile to JavaScript today to run on the web.  As
  alternative, we’ve been experimenting with enabling different language
  runtimes in WebKit to run in web pages alongside JavaScript...

You can view the rest of the message here.


答:
I was like you once, I didn't know much about reflection - still don't - but I did use it once.

I had a class with two inner classes, and each class had lots of methods.

I needed to invoke all of the methods in the inner class, and invoking them manually would've been too much work.

Using reflection, I could invoke all these methods in just 2-3 lines of code, instead of the number of the methods themselves.

Title: Why should I use reflection?

Body:
I am new to Java; through my studies, I read that reflection is used to invoke classes and methods, and to know which methods are implemented or not.

When should I use reflection, and what is the difference between using reflection and instantiating objects and calling methods the traditional way?


答:
fix all warnings

compile with maximum warning level

remove all c-style casts

remove all unnecessary macros

try to get 100% code coverage with good unit tests and code quality


答:
We have the same issue in our legacy app. I was the one who enabled this rule at the beginning, but I am not happy with the result. Fact is, many classes and methods we can't even declare final, because that would make it impossible to mock them in unit tests. And mock them we must, because some of them are so tangled up, there is no other way to initialize them in a test fixture. (We use EasyMock, for the record, but I am not aware of any Java mocking framework which could do this trick.)

At any rate, we have many more important rule violations reported by Sonar, so I am not worried about this very much. Maybe at the point where most of the more important issues have been fixed, I can review how many of these warnings can be realistically eliminated, then once those are done, turn off this rule.

Title: SONAR and DesignForExtensionCheck Rule

Body:
When enabling SONAR on an in-house Java project, there are a large number of violations being reported due to the rule DesignForExtensionCheck. Whilst I agree with the theory that all classes/methods should be marked up as being either Abstract, Final, etc. But is it strictly necessary for an in-house application where the developers have full contorl over the code base and unit tests etc?

An example is a Value Object who's every getter/setter is required to be final to pass this check. When you have 500+ such issues being reported its a big ask to retrofit the code.

Some people have stated that Java has some flaws, and one of those is that classes/methods are not final by default. Bearing in mind that we don't have final as the default behaviour how much effort do we realy have to go to declar everything as final?

Note: I realise that API's being used by third parties must have tighter controls. This question is levelled at in-house applications.


问:
Using IIS as a server for non-http server
I am developing a system that is designed for multiple forms of interfacing. There is a website, but that is connected through an SDK, as well as an HTTP query interface to access data. But to improve speed and quality, I was thinking of creating a system inside IIS that get any message sent to the server, any response, but still let IIS manage SSL and normal socket connections.

Is there a way to host my project in IIS without ASP or any other kind of script with extra behavioral events?

答:
You could, but there are likely better solutions.

Two that spring to mind are TheServerFramework and the venerable ACE toolkit.

Both of them are general purpose socket/server type frameworks that may serve as more useful jumping off points than IIS would.

If you have control over both sides of the application, as it sounds like you do, then you could also move towards MOM-type solutions like ZeroMQ or any of the various MOM (Message Oriented Middleware) products on the market, depending on how much control you want or need over the payload and its delivery characteristics.

Good Luck.


答:
By leveraging the Windows Communications Foundation framework, you can create services over a number of different network protocols.  This includes HTTP, HTTPS, MSMQ, and even TCP/IP sockets.  In addition to these, it also support Named Pipes for connections between two processes on the same machine.

IIS can host applications developed for WCF, even if they aren't HTTP or HTTPS based.

For more in-depth information about the different protocols that WCF supports, and information about the relative strengths and weaknesses of each, MSDN has good information about this.

While many people have argued that WCF is complicated to configure, it does an excellent job of allowing you to focus on writing code at a fairly high level of abstraction without worrying about the actual transport layer implementation details.  I know of a number of projects that have made excellent use of the MSMQ transport in particular in order to enable durable transports that survive intermittent connectivity.

Title: Using IIS as a server for non-http server

Body:
I am developing a system that is designed for multiple forms of interfacing. There is a website, but that is connected through an SDK, as well as an HTTP query interface to access data. But to improve speed and quality, I was thinking of creating a system inside IIS that get any message sent to the server, any response, but still let IIS manage SSL and normal socket connections.

Is there a way to host my project in IIS without ASP or any other kind of script with extra behavioral events?


问:
I need help designing a long running job processing server
I'm about to propose a new architecture for several pieces of the system I'm working on; it's going to entail getting a lot of number crunching and data translation jobs off of tomcat, and on a more fitting platform and I need a little advice.

First, the way this system is currently setup: There is an AS400 and a PostgreSQL database; some of those tables need to be synchronized at various points in the year. An administration application running on Tomcat6 would have a button, "Synchronize" and the struts action class will spawn a new thread to run the job. The job can take anywhere from 15 seconds to 4 days (this is the maximum time we have experienced so far).

I do not like this design. Tomcat is a web server, not a job processing server.

So, the solution I have in mind is to take one of our unused servers and put Jboss 7 on it. then have a simple interface on that job processing server (e.g. web, JMS) that would listen for triggers. when someone clicks on the "synchronize" button on the web page, the job server is sent the signal telling it what job to fire, what parameters are included and to start processing the job.

Years ago I designed a similar concept in job processing where I had a JMS queue that would listen for jobs to come in. when a certain task was added to the queue the system would fire off and run that task. But on that system the jobs would never take more than 5 or 6 seconds, not several days so I'm not sure that JMS Queues would be the best fit here. I looked at Quartz but thats more of a recurring task scheduling system. Although I know I can code around that and make it work, I'm still wondering if thats the best tech for the problem.

Do you have any suggestion?

答:
Me and my team had to wrote a solution regarding a massive XML upload processing and inclusion in database. We used Spring Batch to create a very fast and robust solution capable of processing hundreds of gigabytes in just a few hours. If you use Spring in your development and because of its POJO-based approach, it should not be hard to use it for your task IMHO.

If you want to know more about it, please take a look at http://static.springsource.org/spring-batch/


答:
You can run Java programs as batch jobs natively on the AS/400 and there is a Java JDBC driver for Postgres.

RUNJVA is the native command, and QSH provides an AIX emulator if you like a Unix environment better.

Note:  If you want a more generic Java'ish solution then consider a Continuous Integration engine which is designed to run jobs in a controlled fashion over a very long time either triggered or scheduled, and to avoid having multiple instances of the same job.  We use Jenkins for this - it should be possible to make it run what you need too.

Title: I need help designing a long running job processing server

Body:
I'm about to propose a new architecture for several pieces of the system I'm working on; it's going to entail getting a lot of number crunching and data translation jobs off of tomcat, and on a more fitting platform and I need a little advice.

First, the way this system is currently setup: There is an AS400 and a PostgreSQL database; some of those tables need to be synchronized at various points in the year. An administration application running on Tomcat6 would have a button, "Synchronize" and the struts action class will spawn a new thread to run the job. The job can take anywhere from 15 seconds to 4 days (this is the maximum time we have experienced so far).

I do not like this design. Tomcat is a web server, not a job processing server.

So, the solution I have in mind is to take one of our unused servers and put Jboss 7 on it. then have a simple interface on that job processing server (e.g. web, JMS) that would listen for triggers. when someone clicks on the "synchronize" button on the web page, the job server is sent the signal telling it what job to fire, what parameters are included and to start processing the job.

Years ago I designed a similar concept in job processing where I had a JMS queue that would listen for jobs to come in. when a certain task was added to the queue the system would fire off and run that task. But on that system the jobs would never take more than 5 or 6 seconds, not several days so I'm not sure that JMS Queues would be the best fit here. I looked at Quartz but thats more of a recurring task scheduling system. Although I know I can code around that and make it work, I'm still wondering if thats the best tech for the problem.

Do you have any suggestion?


问:
How do quick & dirty programmers know they got it right?
If you ask programmers why they should write clean code, the number one answer you get is maintainability.  While that's on my list, my main reason is more immediate and less altruistic:  I can't tell if my new code is correct if it's too dirty.  I find that I have focused on individual functions and lines of code so much that when I finish my first draft and step back to look at the big picture again it sometimes doesn't fit together very neatly.  Spending an hour or two refactoring for cleanliness frequently uncovers copy/paste errors or boundary conditions that were very difficult to detect in the rough draft.

However, some people feel it's occasionally okay to intentionally check in dirty code in the interest of shipping software, with a plan to "clean it up later."  Is there is some practicable technique that gives them confidence in the correctness of their code when the readability is less than ideal?  Is it a skill worth trying to develop?  Or is a lack of confidence in the code something some people just find easier to accept?

答:
One may probably think that a not optimal part of a code could make no difference, because of the short lifetime, little impact in business, or little time to get it done. The correct answer is you don't really know. Every time I listen to somebody saying that "this is a small feature", or "let's make it as fast and as simple as we can" and spend insufficient time on thinking about the right design, the only two things that actually and up occurring are:

1-) The project get's bigger and the team motivation lower, working on code full of "stitches". In that case the project will probable to a fast lane towards chaos.

2-) The project becomes known to be a non optimal solution and its use starts to be discouraged, in favor of a new solution or a refactoring that is as expensive as a new solution.

Try always to do the best code you can. If you don't have enough time, explain why you need more. Don't put yourself at risk with poorly made work. Be always a better professional. No one can punish you for this if you are reasonable. If they do, it's not where you should care to work at.


问:
Programming certificates

Possible Duplicate:

  Are certifications worth it?

I'd be glad to hear your opinions on which programming certificates are the most widely recongnized in the industry and how useful are they actually. I've googled a lot this question but I've never asked here and I'd like to gather as many opinions as possible before applying for any. I'm interested mainly in developing business application. I have knowledge in Java, SQL, PHP, some C#. Thank you in advance!

答:
None of them.

Certifications are normally seen as a joke by programmers, and I'd say to avoid companies that require them (as they don't really get software development).

Title: Programming certificates


问:
What are the advantages to BDD for a solo developer?
I have found this lines below about the advantages of BDD (Behavior Driven Development)

The domain experts define what they need in the program in a way that
  the developers can not misinterpret (or at least not as much as in
  most other approaches).

Are there any more advantages apart from that?

If I'm working alone (I'm not in contact with managers that could write BDD features),

do I need to use BDD?

答:
I'd ignore BDD as a buzzword and just get on with design/code. These methodologies are all so trivial you will re-invent it or come up with something better without making a conscious effort.

Also known as programming, motherf*cker


答: In my experience, programming certifications are not interesting to companies whose product is software.  Those companies are much more interested in general problem-solving ability than in deep knowledge of some specific technology.  They expect developers to be able to learn specific technologies as needed.</p>

Title: Programming certificates

Body:
Possible Duplicate:

  Are certifications worth it?

I'd be glad to hear your opinions on which programming certificates are the most widely recongnized in the industry and how useful are they actually. I've googled a lot this question but I've never asked here and I'd like to gather as many opinions as possible before applying for any. I'm interested mainly in developing business application. I have knowledge in Java, SQL, PHP, some C#. Thank you in advance!


问:
How can I create Assert.AreEqual(myobject,somevariable) a test in TDD before writing production code?
Im researching TDD, I'm not really sure how to write a test before I have written production code. The problem is that TDD states that you make assertions and then write your code so that these assertions pass. But You have not created any classes yet (as part of the production code) so how are you meant to write the tests if you dont have any classes with which to assert.

Hope someone can explain....

答:
The first error that the test exposes is that using your API doesn't compile, because the class doesn't exist.

So you fix it so that the test compiles.

Then it will probably fail because the production code doesn't do what the test demands.

So you implement just enough of the class to make it pass.

Then you demand more sophisticated behaviour in your test.

Repeat again and again.

(Note: This is the orthodox, hardcore version of TDD. Opinions differ on whether it is really necessary to start with a deliberately uncompilable test, or how much business code to write between iterations. The extreme view is that more than 3-5 lines is always too much; others are more variable.)

OwnerDisplayName: Kilian Foth


答: You probably will start with a test that just instantiates a class. The compiler will emit an error because the class does not exist (red). To make the test succeed you have to create the class to test. The compiler will now run the test (green). Now you can, for example, call an nonexistent method. The compiler will complain (red). Create the method in the class, the compiler will stop complaining (green). Place an assertion in your test for the method. The test will fail (red). Extend the method such that the assertion works. The test will run (green).</p>

Title: How can I create Assert.AreEqual(myobject,somevariable) a test in TDD before writing production code?

Body:
Im researching TDD, I'm not really sure how to write a test before I have written production code. The problem is that TDD states that you make assertions and then write your code so that these assertions pass. But You have not created any classes yet (as part of the production code) so how are you meant to write the tests if you dont have any classes with which to assert.

Hope someone can explain....

OwnerDisplayName: Arne


答: Javascript itself can be viewed as being an intermediate language, defining a virtual machine into which other languages can be compiled. In projects like GWT this notion is already taking off. It might not be what you'd design from scratch, but it's already becoming a reality that you could compile "your favourite language" into Javascript.</p>

Title: Will I ever be able to code client-side browser code in a language of my choice?

Body:
I'll be brutally honest: I hate writing client side code in JavaScript. I'm not a fan of this language, to say the least.

It seems silly to me that browsers support a programming language, rather than an intermediate virtual machine (like CIL or JVM). The latter would allow programmers to write in a language of their choice (to some extent), rather than in one fixed pre-set language. This language could evolve more rapidly, because only changes to the CIL/JVM/whatever would require every major browser to upgrade. Language features could be added without affecting old browser experience.

The massive savings of effort that intermediate langauges bring about are well known. Are there any initiatives out there to promote browser "scripting" in something other than JavaScript, and especially in an already designed, developed and optimized virtual machine? Do they have any momentum?


答:
I deal with this in code - this is a variation on having a set of database files that you run in that its a sequence of DDL (and CRUD SQL where appropriate) that needs to be run in a specific order but I have it embedded in a file rather than as a set of scripts.

I then put a version table in the database.

The code is then straightforward:

If the database doesn't exist then create a standard blank database.

The database does now exist, so run all the schema update methods in order - each method updates (adds a row to) the version table. Each update is a transaction so that if it fails you're left with the previous version.

Because its code you can wire it in to wherever is appropriate, the installation process, the application itself (good for desktop apps), wherever - and you may well be able to setup a backup of the data prior to the schema changes. Additionally you can wire the schema version check into your application - so that it won't run if the versions don't match.

I won't assert that this is a perfect system - but I will assert that it has been consistently successful for me for at least 15 years using first Access and subsequently SQL Server databases.

In terms of your current setup, the biggest issue is working out a reasonable method to establish a baseline for existing systems - once that's done subsequent updates become almost trivial.


答:
JavaScript is the very soul of browsers, thats why the majority of new attempts are generating JavaScript (CoffeeScript is a clear example).

In GWT, you code your client-side logic in Java programming language and the toolkit with generates JavaScript.

ClojureScript is an interesting project if you are in Lisp coding.

So it looks no matter what, JavaScript is here to stay. (COBOL of the web maybe?).


问:
What are the essential Clojure libraries to learn beyond the basics of "core"
I am teaching myself Clojure. I've started using Leiningen, I'm working on Clojure Koans, plan to do LabREPL next, and will have a look at Noir.

My question is: what are the essential "must know" Clojure libraries and functions to know beyond those covered in the above learning plan?

Looking at Clojure Contrib, there are large number of libraries. As a professional (or OSS) Clojure developer, which do you find yourself using on a daily basis?  Which ones are not so useful or otherwise not commonly used (i.e. are esoteric / do not come up often in day-to-day coding).

答:
That is really depends on your domain and on what you going to code.

Avout brings Clojure state to the distributed world.

And Lojic brings logic programming to Clojure programming language, it is an interesting project.

Cascalog for example is a Clojure-based query language for Hadoop, amazing thing if you are going to do Hadoop programming.

FleetDB is a schema free database written in Clojure.

So it is really based on what you are doing.

(Ok, my answer covers the first section of your question).

My list of most used contribs:
clojure.contrib.accumulators, clojure.contrib.duck-streams, clojure.contrib.lazy-xml and clojure.contrib.zip-filter.

Those are essential to me, YMMV.


问:
What is the starting point for Ubuntu app development?
I'm thinking of developing software for Ubuntu and other related Linux-based distros (like Linux Mint). But currently am at a loss for where to start.

Would learning Python be enough/good?
And what are the other things I should know about before starting this kind of developing?

And will I be able to publish my apps to a software store like Ubuntu store even if I am from outside USA/UK? If not, what are the options I have to make my apps reach the audience?

As a lot of users had asked, I intend to build applications only for Linux (I'm thinking of Gnome) that will be a bit business and enterprise oriented.

Currently I am an Oracle certified Java developer in J2SE and J2ME. And I know Python a bit.

答:
1) Learn C

2) Learn ncurses

3) Write some rogue-likes

4) Profit?

Before I get cast down and burn in eternal fire, let me state that it IS, at least A place to start. It may not be the best. It may not be the newest or hippest. But by god's teeth, it's where I started. It was good enough for me, it'll be good enough for him.

Also, please stop with this "app" nonsense. We write applications here.


问:
Is it a bad idea to stray from CSS selector syntax in a JavaScript selector engine?
I'm designing a JavaScript selector engine, and I'm currently focused on parsing the selector string. Specifically, combinators.

The CSS3 combinators I know of are:

> (children)

space (descendants)

+ (next sibling)

~ (all next siblings)

Which is fine for how CSS works (how style rules are applied). However, I'm now realizing (now that I'm examining this paradigm more closely) that this seems a bit limiting in a JavaScript setting.

Below I've created an alternative list of combinators. What I would like to know is:

Do any of the current selector engines stray from standard CSS selection methods? (I'm familiar with Sizzle and Sly, but none of the others)

Do you see any reason why any of the combinators I've listed wouldn't work well?

Do you think having more selector string options (more combinators, more filters, etc) is beneficial or are just a waste/confusing/dumb/etc?

Thanks all in advance for your thoughts!

> (children)

>> (descendants) (also, space would still work)

+ (next sibling)

++ (all next siblings) (also, tilde would still work)

- (previous sibling)

-- (all previous siblings)

* (previous and next siblings)

** (all siblings)

^ (parent)

Example 1: div ^ span - get all spans with a div child

Example 2: div ** span - get all span siblings of div

Example 3: .lastListItem -- li - all li previous to the li with class .lastListItem

Example 4: #thing ^ div ** .error - all items with class .error that are siblings of #thing's parent (assuming #thing's parent is a div)

p.s. Oh, and I also thought of having a placeholder character that could stand in for any simple selector. So, Example 4 might look like this (with an underscore as a placeholder):

Example 4 alt: #thing ^ _ ** .error - all items with class ".error" that are siblings of #thing's parent (no matter what kind of element #thing's parent is)

答:
Instead of making things up, I would possibly look into implementing features from CSS Selectors 4 Spec

And use the ! to mark the subject of a selector

So instead of div ^ span to select spans with a div child you could use span! > div

EDIT: sorry, spec changed, it's not a $ prepended , it's a ! appended


答:
At a previous job, we used what I jokingly called "redundant array of inexpensive computers" {1} to distribute a number of jobs. Some took seconds to run, others took more than a day (quarterly reports). All were designed to be capable of being restarted if they crashed. Some jobs ran on a schedule, some were run only on demand. The schedule was sophisticated enough to include things as simple as "run daily" or "run monthly" or as complicated as "run monthly, except for the last week of the quarter run daily". Any of the regularly scheduled tasks could be run "now" (on demand).

Because the array {2} lacked displays, the "scoreboard" of who was running what job was read from a database table. In order to determine if a job crashed or hung, I took a concept from embedded computers called a "watch dog". In this case, a running job would periodically update a status column with a 0. The monitoring software would periodically increment that status column, and if the number got above a threshold in a certain period of time, would send a message to a person to basically reboot machine X. The idea was to put this "heart beat" at the end of a loop, but not the innermost loop. I planned to have the "pulse" go off about every minute with the checking circuit checking every 5 or 10 minutes.

Notes:

1 - Folks might now call this a "grid" or "cluster", but they were a pile of Pentium 75 and 100 that hadn't been depreciated, so I could use them.

2 - Well, a 1 dimensional array, as they stacked reasonably well and were worthless enough that if they fell over and broke, no one would miss them. They hadn't been fully depreciated yet, so technically could not be discarded, but were slow enough that they were useless as desktop computers.


答:
First off, let me add a little clarity. BDD is not exactly TDD.  A lot of people confuse the two because they both start with the concept that you write tests before you code. BDD has been described as "better TDD" or "doing TDD right", but I'm not sure that really applies either. Personally, I consider BDD as a Refocused TDD.

The idea is that you are able to do a number of things that many other approaches sometimes struggle with, and these are some of the advantages that you are probably looking for:

Your test code captures all of your requirements in a human readable form.  I'm not just talking about method names and cleverly factored code, but instead the use of a good BDD framework allows you to write your tests using the language of the feature or story text you would have written down in a requirements document.  (Look at something like StoryQ for dotNet as an example).

Your test code actually ends up testing to your requirements. If you write your test in the language of your feature specification, your end up testing to the specifications directly.

Test output reads like a report.  Most unit testing scenarios result in a bunch of lights or onscreen flags to indicate pass or failure, but you get very little idea where the actual error has occurred beyond the approximate place that it was triggered.  BDD output provides you with failure information regardless of whether the failure occurred in the execution of the code, or in the setup parts of your test, which leads me to the next point...

Your test code becomes highly granular, allowing you to more easily pinpoint the nature of failures in your tests/code.

Continuous live feedback through your tests means that you tend to work a little more efficiently, especially if you are applying a Test Driven process rigorously. Personally, I write all of my tests before I start to write any code.  IT's a kind of up-front design without getting too tied to anything specific, and easily refactored if I change my mind later on.

For what it's worth, I use BDD regardless of whether it's at my job, or on my own side projects at home.  I'm slowly converting others in my workplace to this approach, because I am able to show the advantages in terms of my productivity, and the lovely side-effect of having cleaner and more readable tests, and by extension cleaner and more readable code - although that last bit is not implied as a BDD benefit, but just to show you that I personally found myself leaning more in that direction.

Cheers.

Title: What are the advantages to BDD for a solo developer?

Body:
I have found this lines below about the advantages of BDD (Behavior Driven Development)

The domain experts define what they need in the program in a way that
  the developers can not misinterpret (or at least not as much as in
  most other approaches).

Are there any more advantages apart from that?

If I'm working alone (I'm not in contact with managers that could write BDD features),

do I need to use BDD?


问:
What differentiates the exceptional programmers from the really good ones?
You know who they are.  They are the rock stars of programming:

They code 10X
faster.

Their code just works.

They not only know their primary
language inside and out, but they
also know how it works under the
hood.

They know the answer to most any
question before you ask it.

A few of them invented the programming
principles we all use.

And they tend to be
uncharacteristically humble, as well.

What is it about these folks?  Is there something about their thought process that is fundamentally different from the above-average programmer?  Or are they simply very talented people that work hard?

To put it another way: How can I be like them?  I know what I think I need to learn to be that good, but it seems like it will take me the next ten years to learn it, and then my knowledge will be obsolete.

答:
Having the quality of self motivation and self determination as well having the willingness to go into an abyss of the unknown and being comfortable with being absolutely confused as part of the process is huge. Its not so much about initial smarts as you would think because the brain becomes much better at things its always doing and thinking about. I came from nothing in college and then became very well off just by sheer persistence, never giving up, being that guy that kept at a problem when all others got tired of trying to figure it out. After that type of persistence, problems became easier and easier and coming from being the noob in college to putting most of them to shame at this point. Sheer talent is not enough and can sometimes lead to resting on your laurels.

Also, to Robert Harvey, you keep doinking my posts when I mention anything to do with my CMS that I wrote from scratch. You see several others listing links that they may or may have not written. You are pushing people down that are self motivated which is ironic that you posted this. You are "the man" in this small universe and not reading things on their merit, rather just doinking and deleting at your whim. You also love Star Wars way too much and probably wave your hand at the automatic opening doors at the grocery store kind of believing you have the force.


问:
How can I find own replacement when the company wants someone far less experienced?
I told the company I work for that I want to phase myself out, but that I would stick around for a couple months before applying anywhere to help in the recruitment of my replacement. I offered this because I am the sole web developer and I didn't want to leave them helpless.

The problem is, they want to hire someone very under qualified to avoid having to pay a high salary.

As far as I'm concerned, it's their company and they can run it how they want. However, when it comes to me helping find and train someone before I go, I'm in a position where I don't know what to do.

To give a little perspective, I built them a medium sized e-commerce system using an MVC framework; there's more to it, but I'll leave it at that. The candidates they are finding me to review are people who have never worked as a programmer, have made a couple really crappy static websites using a WYSIWYG program and are calling themselves web designers.

I know these people have no chance at success. I have tried to explain it to the company, but they don't want to hear it; they think one of these people can be trained and be up and running at my level in about a year. The reality is, I don't think their site will last a year if they go this route.

I think maybe they think I am just trying to make myself look good and the new candidates look bad for some reason, which is not the case at all. I would like to leave what I have worked hard on in capable hands.

So what is the ethical and professional thing to do here? Just keep telling them that these candidates are no good until they actually find a decent one, up until its time for me to leave, at which point I leave them with no one? Or just accept that they are going to destroy themselves and do the best I can to pick the best out of the candidates and teach him/her what I can before I go?

I really just want to do the right thing here, so I can leave on good terms. And if a year down the road they fail, I can have a clean conscience.

答:
You should not care.

The company is obviously run by morons and you are better off leaving. The question is silly and indicates a naive sense that you somehow are valued for your programming skill in a company with no understanding or appreciation of it.

First make sure you have your ducks in a row and jump the hell out of there.

Just to qualify my opinion, I have jumped from place to place on contracts and once I arrived at Microsoft and other places like those, the world was a beautiful place. I eventually realized after that there is a bit of a ceiling on those ones too in terms of pay although software companies are so much nicer to work for.

When you graduate from being a worker, the real world opens up and you are truly free. Just make sure you have saved up enough since business has its ups and downs.


答:
YES! Its a terrible idea. Sizzle uses CSS syntax and rocks because of it. Why make something off your own standard, use the standards out there. Who is going to use it if its non standard? The HTML 5 craze is here and be on it to get the most user base.

Take sizzle that is the core of jQuery selector engine. Take that and add to it. You may learn something too from John Resig in terms of shortcuts and parsing techniques. That guy is a legend. I studied his code and became way wiser besides looking through all of Douglass Crockford videos.

Title: Is it a bad idea to stray from CSS selector syntax in a JavaScript selector engine?

Body:
I'm designing a JavaScript selector engine, and I'm currently focused on parsing the selector string. Specifically, combinators.

The CSS3 combinators I know of are:

> (children)

space (descendants)

+ (next sibling)

~ (all next siblings)

Which is fine for how CSS works (how style rules are applied). However, I'm now realizing (now that I'm examining this paradigm more closely) that this seems a bit limiting in a JavaScript setting.

Below I've created an alternative list of combinators. What I would like to know is:

Do any of the current selector engines stray from standard CSS selection methods? (I'm familiar with Sizzle and Sly, but none of the others)

Do you see any reason why any of the combinators I've listed wouldn't work well?

Do you think having more selector string options (more combinators, more filters, etc) is beneficial or are just a waste/confusing/dumb/etc?

Thanks all in advance for your thoughts!

> (children)

>> (descendants) (also, space would still work)

+ (next sibling)

++ (all next siblings) (also, tilde would still work)

- (previous sibling)

-- (all previous siblings)

* (previous and next siblings)

** (all siblings)

^ (parent)

Example 1: div ^ span - get all spans with a div child

Example 2: div ** span - get all span siblings of div

Example 3: .lastListItem -- li - all li previous to the li with class .lastListItem

Example 4: #thing ^ div ** .error - all items with class .error that are siblings of #thing's parent (assuming #thing's parent is a div)

p.s. Oh, and I also thought of having a placeholder character that could stand in for any simple selector. So, Example 4 might look like this (with an underscore as a placeholder):

Example 4 alt: #thing ^ _ ** .error - all items with class ".error" that are siblings of #thing's parent (no matter what kind of element #thing's parent is)


问:
Is it better to target iOS 5 and ARC or an earlier version with MRC?
I personally don't know much about iOS 5, but it seems like with automatic reference counting (ARC), you get rid of much of the memory management issues of the previous operating systems.

So is it better to target iOS5 (and create apps that can only run on the newest iOS devices), or is it better for her to target iOS 4 or even iOS 3, so she understands the fundamentals of memory management in Objective-C? Are there any important aspects of iOS development that she might miss out on by jumping into iOS 5?

答:
Around 500,000 apps were written without ARC, many by kids. Also many millions of  potential app users with devices not (yet) on iOS 5.  Many developers are waiting for that number to be a smaller fraction of their potential market share before jumping strictly to iOS 5.  And experience with manual memory management might be very helpful when tracking down bugs in future apps that use ARC.

So at this point in time, I might recommend learning both, using MRC for today's apps and ARC for future apps.


问:
Has anyone successfully used Windows Workflow for a Business Rules/Validation engine?
I was wondering if anyone has successfully used Windows Workflow Foundation for a BusinessRules/Validation engine, or if you know of some sample code or articles about this.

If you have used it before, what do you think of it? How is it compared to other BusinessRule/Validation systems?

I am thinking of rules like

```<code>if (A, B, and C)
    AllowAccess();
</code>```

Or

```<code>if (Value between X and Y)
    return true;
</code>```

答:
I have to agree with ironcode. We wrote a drag-and-drop flowchart-style system a couple of years before the new Biztalk came out (strangely enough). The idea was that non-programmers could program and the system would be easily maintainable and changeable.

The result: you still needed 'business analysts' who needed to be as highly trained as a programmer would be, but in the new 'language' of the WWF system. So you didn't gain much at all there. The debugger was nowhere near as good as a true development system, so you lost there. You also needed programmers to write the tricky modules that were the core of the data and GUI processing. The scalability also died off very quickly. Simple business rules were easy to put together, but once you got past a dozen you were in spaghetti.

I think it had some benefits, but basically you'd be better off using a scripting engine to tie together custom-written modules.

It did look really cool to the marketing types though, made for a great demo :)


答:
Yes. You can already compile Dart, Coffeescript and Java to Javascript. You have Emscripten, which is a compiler backend for LLVM for generating Javascript bytecode (and LLVM handles quite a few languages, I believe).

But other than compiling to JS, not in a short time frame. IE6 is 10 years old and still kicking. I hope that current browsers (which do not support other languages) won't survive so long, but they'll be around for a few years, provoking the tail-biting cycle of "we still have to support browsers which only support Javascript, so we have to use Javascript", in a much harder way than say CSS3- your site might work without CSS3, but try making it work without client-side scripting.


答:
A lot of great answers have already been posted, so I'll avoid rehashing those.

I would also add:

attempt to document things, so that when they finally do realize they've hired someone woefully unqualified, that once they get around to hiring someone with a clue (and maybe the docs you produce can be used to filter out the wannabes), the new hire will be able to use your docs as a jumping-off point

presumably there will be an exit interview; present a short document (1 page will probably do) explaining your efforts/reasons at trying to get the company to hire someone appropriate, perhaps highlight some skills they should look for, mention that you've made a reasonable effort at trying to document the environment; if at all possible, make a couple copies, have both yourself and the HR contact sign and date both copies, ie, "I have read and understood the above"

Merely a CYA effort.

Body:
I told the company I work for that I want to phase myself out, but that I would stick around for a couple months before applying anywhere to help in the recruitment of my replacement. I offered this because I am the sole web developer and I didn't want to leave them helpless.

The problem is, they want to hire someone very under qualified to avoid having to pay a high salary.

As far as I'm concerned, it's their company and they can run it how they want. However, when it comes to me helping find and train someone before I go, I'm in a position where I don't know what to do.

To give a little perspective, I built them a medium sized e-commerce system using an MVC framework; there's more to it, but I'll leave it at that. The candidates they are finding me to review are people who have never worked as a programmer, have made a couple really crappy static websites using a WYSIWYG program and are calling themselves web designers.

I know these people have no chance at success. I have tried to explain it to the company, but they don't want to hear it; they think one of these people can be trained and be up and running at my level in about a year. The reality is, I don't think their site will last a year if they go this route.

I think maybe they think I am just trying to make myself look good and the new candidates look bad for some reason, which is not the case at all. I would like to leave what I have worked hard on in capable hands.

So what is the ethical and professional thing to do here? Just keep telling them that these candidates are no good until they actually find a decent one, up until its time for me to leave, at which point I leave them with no one? Or just accept that they are going to destroy themselves and do the best I can to pick the best out of the candidates and teach him/her what I can before I go?

I really just want to do the right thing here, so I can leave on good terms. And if a year down the road they fail, I can have a clean conscience.


答:
Being in a similar situation in the past, I found the best approach is to actually find them a contractor that can come in when/as needed. Since it sounds like they are in a maintenance phase, they might not need a body full time and you could probably sell this as a cost savings option to the company.

It's upper managements job to find and hire a suitable replacement and you should only be sending them people you would recommend for the position. Be there to help screen if you want to, but it's not your responsibility. The fact that they're relying on someone who is leaving the company to hire a replacement shows how irresponsible they are.

As for ethics, the only issue I see is not having (high-level) documentation in place for whomever takes over your role. If things like username/passwords/sshkeys, repository locations, etc are in your head, get them down and make sure that your higher-ups know where to find the information.


答:
You probably can't change their mind

I went through almost the exact same situation: I was hired as a non-programmer by a company with 50 or so employees, saw a need, and over the course of several years, taught myself programming and built a fairly sophisticated intranet system for them.

When I got ready to leave, I wanted to help with the transition, for three reasons:

I was grateful that I'd been given the chance to tinker and learn

I liked my system and wanted to leave it in good hands.

I wanted another developer to see and appreciate my careful coding and documentation.

Honestly, I felt that it would show that they valued what I had built. It would make me feel good.

So I offered to help hire and train a programmer. Like yours, my company underestimated the skill and training needed to pick up where I'd left off, and didn't want to pay a real developer's salary. They basically ignored my list of qualifications. I gave only one actual technical interview to someone who failed miserably, and didn't get any other candidates.

The result

In the end, they had me spend a few days "training" someone who already worked at the company and was in the process of learning HTML. He showed some promise, but knew he had a long way to go.

As you hope to do, I left with a clean conscience. I knew I had done my best to help them carry on. I was disappointed that they thought so little of my work that they assumed someone so inexperienced could take it over, but despite how self-explanatory I'd tried to make the system, I knew that wasn't true.

After I left, I heard that their sysadmin (who was good) had also left, and, due to their seriously undervaluing technical ability, the company had also pushed the burden of that job also onto the poor guy who took over for me. And predictably, he too, soon left for greener fields.

A couple of months ago I got an email from a non-technical employee asking a question like "do you remember which server the application is running on and the password to it?" I hardly knew how to respond.

Do your best and move on

You can't make people value quality if they don't already. All you can do is give good information. Tell them what kind of person is needed and what they'd need to pay to get someone qualified. Give them some tips on sites where programmers look for jobs. Give honest evaluations of candidates.

Most of all, set a deadline and keep it. Be helpful, and then be gone.