问:
How big should OSGi bundles be?
Or more completely "What are the trade-offs and questions that should be raised when trying to decide the bundle structure of an OSGi application?"

Our existing OSGi bundles have tended to be quite fat: basically an API bundle and an implementation bundle, but with a lot of functionality. That has advantages in terms of project and build complexity, but maybe doesn't give us all the reusability and flexibility we desire.

So in a recent project, we intentionally made quite thin bundles. We did a walkthrough this AM and we wondered if we'd gone too far. In this quite-small service we had 7 bundles, several of which only had 1 domain class. The question raised was "This is almost like we're driving towards a bundle per package. But we have classes and packages already in the language, are we going too far with our bundle granularity?"

To make it concrete, this is a Web Service that performs a calculation on the aggregate results of other Web queries (specifically, we query a bunch of astronomical databases for objects in a given area and then we filter the results based on our own criteria and then we estimate a probability of an adequate observation based on the filtered results). We ended up with 7 bundles, which seems like a lot for what is essentially "a servlet that performs a calculation."

Is such very-fine granularity good (lots of flexibility at runtime) or bad (overly complicated)? How can we develop our intuition about the "just right" granularity of our OSGi bundles?

答:
Keep it as simple as possible until you need the complexity. Ie: Do not engineer the bundles until there is a clear value in having them. As simple as possible but no simpler.

You are unlikely to predict exactly where your bundles should be split in the future and where you will want to extend now. By over-bundling, you are creating a maintenance headache for the future, once you do have a requirement for bundle swapping.

Title: How big should OSGi bundles be?


问:
Does a website running modified GPL software have an obligation to release their changes?
If a non-profit organization runs software on its website that is modified GPL'ed software and it acknowledged to be such, do they have a legal obligation to release any changes? They are not offering binaries, they're just running it and providing public service. Does it make a difference if the original software was JavaScript (therefore users do acquire source at some point) or PHP? I have already read GNU's opinion, but it is somewhat ambiguous.</p>

答:
GNU is very clear on that: Under the GPL, you are not legally required to offer the modified source code. The word "legitimate" in the second paragraph of the FAQ entry is a bit misleading, but they rather mean something along the lines of "reasonable, understandable".

There is a special license, the GNU Affero GPL, that handles this question differently:

The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community.

There you also find a clear note about the normal GPL:

The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public.

Note: When your application uses GPLed JavaScript libraries, which are delivered to the browser (i.e. not running on the server in node.js or similar), it seems very likely to me (IANAL) that this means "releasing" the software and therefore you must make the source available; this is especially important when your server delivers unreadable minimized JavaScript code.

ContentLicense: CC BY-SA 3.0


问:
Is it legal to reuse code in other customers' projects?
I'm working as a independent software developer for mobile applications. A customer asks me to develop a mobile app. So at the moment I'm calculating the time and effort to write an offer for this project.

The app itself will only be used for a certain time as it is related to a certain event after that if will be useless. But the base functionality of the app will be reusable for other customers who want to have a similar app for their event.

At the moment I'm wondering if it is OK to develop the app for the customer let him pay the development and reuse part of the source code for another customer's app?

So what would be the best way for me to deal with this scenario?

To whom belongs the source code of the app?

Do I have to give the source code to the customer as they paid for the development?

If I have to, can I still keep a copy of it and reuse it later?

Do I have to ask the customer to reuse the code?

Do I have to work with some kind of licensing model here. And let the first customer only pay a certain part of the development so I can reuse the code without any concerns?

I hope I made my situation clear. I'm looking forward to you answers.

答:
You should decide before you start the project, who will maintain ownership of the code.

If they happily allow you to keep ownership then you're fine to use it in other projects. If they wish to take ownership after then it's a negotiating point.


问:
How do I Integrate Production Database Hot Fixes into Shared Database Development model?
We are using SQL Source Control 3, SQL Compare, SQL Data Compare from RedGate, Mercurial repositories, TeamCity  and a set of 4 environments including production.

I am working on getting us to a dedicated environment per developer, but for at least the next 6 months we are stuck with a shared model.

To summarize our current system, we have a DEV SQL server where developers first make changes/additions.  They commit their changes through SQL Source Control to a local hgdev repository.  When they execute an hg push to the main repository, TeamCity listens for that and then (among other things) pushes hgdev repository to hgrc.  Another TeamCity process listens for that and does a pull from hgrc and deploys the latest to a QA SQL Server where regression and integration tests are run.  When those are passed a push from hgrc to hgprod occurs.  We do a compare of hgprod to our PREPROD SQL Server and generate deployment/rollback scripts for our production release.

Separate from the above we have database Hot Fixes that will need to be applied in between releases.  The process there is for our Operations team make changes on the PreProd database, and then after testing, to use SQL Source Control to commit their hot fix changes to hgprod from the PREPROD database, and then do a compare from hgprod to PRODUCTION, create deployment scripts and run them on PRODUCTION.

If we were in a dedicated database per developer model, we could simply automatically push hgprod back to hgdev and merge in the hot fix change (through TeamCity monitoring for hgprod checkins) and then developers would pick it up and merge it to their local repository and database periodically.

However, given that with a shared model the DEV database itself is the source of all changes, this won't work. Pushing hotfixes back to hgdev will show up in SQL Source Control as being different than DEV SQL Server and therefore we need to overwrite the reposistory with the "change" from the DEV SQL Server.

My only workaround so far is to just have OPS assign a developer the hotfix ticket with a script attached and then we run their hotfixes against DEV ourselves to merge them back in.

I'm not happy with that solution.  Other than working faster to get to dedicated environment, are they other ways to keep this loop going automatically?

答:
Why not:

push changes from hgprod to hgdev as you suggest

Also auto apply the deployment scripts (created between hgprod and PREPROD SQL) to DEV SQL

This should hopefully mean that the 'change' doesn't appear as a difference on the DEV SQL server.

Would this work?


答:
Since you don't have a contract yet, you need to work out these issues with the customer before you sign the final contract. From my understanding, this will happen if the customer agrees with your estimates on time and cost, so it's something you should be thinking about discussing with the customer now, along with the requirements. These are things that are often included in such a document. What's included should be agreeable to both you and the person paying for the product, although depending on the person or organization, you might not get everything you want.

If you don't have a lot of experience in writing contracts, or if you have very specific questions, the best person to ask would be a lawyer who specializes in contracts and business law - they would know if what you wrote would stand up in court should there be a problem. You wouldn't want a mistake in your contract to cause problems later on.

Title: Is it legal to reuse code in other customers' projects?

Body:
I'm working as a independent software developer for mobile applications. A customer asks me to develop a mobile app. So at the moment I'm calculating the time and effort to write an offer for this project.

The app itself will only be used for a certain time as it is related to a certain event after that if will be useless. But the base functionality of the app will be reusable for other customers who want to have a similar app for their event.

At the moment I'm wondering if it is OK to develop the app for the customer let him pay the development and reuse part of the source code for another customer's app?

So what would be the best way for me to deal with this scenario?

To whom belongs the source code of the app?

Do I have to give the source code to the customer as they paid for the development?

If I have to, can I still keep a copy of it and reuse it later?

Do I have to ask the customer to reuse the code?

Do I have to work with some kind of licensing model here. And let the first customer only pay a certain part of the development so I can reuse the code without any concerns?

I hope I made my situation clear. I'm looking forward to you answers.


答:
To whom belongs the source code of the app?
  Do I have to give the source code to the customer as they paid for the
  development?

This depends on the contract. In general, you must ask the customer about what is known as exclusivity. For example, you could charge much more for exclusive development (and then the customer will own the code); alternatively you can tell them customer will have to pay less but you are legally owning the source. You can supply/install binary-only version of the software to customers so that customer's will have to come to you for modifications.

If I have to, can I still keep a copy of it and reuse it later? Do I
  have to ask the customer to reuse the code?

Generally, keeping a copy is not illegal/unethical. You can use it when customer asks more development. However, distributing code (to someone else) if the deal was exclusive, is not right.

Do I have to work with some kind of licensing model here. And let the
  first customer only pay a certain part of the development so I can
  reuse the code without any concerns?

Not only from the point of view of reuse of code otherwise, the licensing process must be there to define all items of customer's and your concerns. So you must license irrespective even if the deal is one sided. Also, you should include provisions for future development later for the same customer.


问:
Do companies hire software developers that are aspiring entrepreneurs?
There are developers out there that not only write code and solve problems, but aspire to one day be an entrepreneur and run their own company. They may participate in open source projects, go to various networking events/meetups, or even write code to help shape/start their own business outside of work.

And, for example, an fully-candid interview with a prospective hire might go something like this:

Company: Where do you see yourself in 5 years?

You: I see myself running my own software company in City Z, doing xx projects, solving yy kind of problems.

This might be a red flag to a company, who may consider this kind of developer a high risk for leaving, and that they would take with them the experience of developing a particular software or specific industry knowledge.

Should developers hide these kind of aspirations/traits from their current employers, or where they are interviewing? Is it unprofessional to mention these kind of things? Does it help or hurt their chance of getting hired?

答:
If you have entrepreneurial aspirations, i would love to hire you.

Because,

It tell me you are self driven. Probably you wont to solve the problem on your own.

It tell me you are enterprising. Probably you will not come back saying it-cann't-be-done without trying enough.

Most likely you won't come up with answers like it's-not-my-job.

Most importantly, because you at least have some aspiration 5 years ahead of you, you believe in growth and inherently you are always keen to make best out of opportunities.

But yes, it will hint the recruiter some other things

You may take time to appreciate heavy process driven approach

You may not like a boss who is very much a micro manager.

I always ask this question in the interview for exact same reasons.


问:
Does your company have a coding standard?
I recently saw that Microsoft released a coding standards document (All-In-One Code Framework Coding Standards) and it got me thinking...  The company that I work for has no formal coding standards at all.  There are only a few developers and we have been together long enough to have evolved into similar styles and its never been an issue.

Does the company you work for have a documented coding standards?  If no, why not?  Does having a standard make a difference?  Is it worth writing a standard from scratch or should you adopt another standard as your own (ie. make Microsoft's standards yours)?

答:
My former employer has a coding standard.  I'm considering formally documenting one for myself, as well.

Or, as you suggest, finding a decent existing standard and modifying/adopting that.  For a company, I would certainly suggest that they look at existing coding standards, but create/modify one for their own particular needs.  There isn't necessarily a need to create one from scratch, but some care should be taken to make sure that the coding standard makes sense for the type of software the company creates.

Yes, having a coding standard makes a difference, but it isn't a silver bullet.  Code is more legible as there aren't as many different style clashing and some common mistakes/pitfalls can be avoided.  Even with a standard you'll have some variation in coding styles, but that variability will be reduced.  The goal isn't to try avoid all variation or prepare for every possible situation.  Too complicated a coding standard can be worse than none at all.

ContentLicense: CC BY-SA 2.5


问:
Is it a bad idea to ask an interviewer what the greatest strength and weakness of their development team is?
I was wondering if this was a good question to ask a possible employer when interviewing for a developer position:

What is the greatest strength and weakness of your development team?

We all get this question when we are in an interview, so why not ask them in return? I think it is a very good question because we could find out about the team, and how this strength or weakness could affect us, but I don't want to annoy the interviewer.

Is there any downside to asking this question when interviewing for a developer position?

答:
I find it a really weird question. What kind of an answer or information would you expect?

If you are applying for a development position, I would expect you to ask more about technical aspects. Like for example, "what methodologies are you using?", "what tools are you using?", etc.


问:
At what point should I have my Windows developers upgrade to the latest release of Windows?
At what point should I begin upgrading our developer's machines to a later Windows release?

From experience, Microsoft typically has an epic fail about every other O.S. (I am really not trying to start a debate about this, it is my perception let it be) i.e. 2000 was a stable and useful O.S, yet m.e. didn't do well, xp was a great O.S. that many businesses still use, Vista didn't do well (I know that the reason this one didn't do well wasn't really Microsoft's fault and that Vista and 7 are the same major revision), while 7 seems to be an excellent O.S. that will be around for a while--sort of like xp is now.

Anyways, this makes me reluctant to upgrade our development machines to Windows 8.

a. I don't want to cost our business a ton of money for an O.S. that
will only be used for a year or two.

b. They also have to have linux dual boots, and I have read that Windows 8 and grub will not play well together.

I do want our developers to develop in the latest environment and to have a leading edge in any technology they are developing with. I do want to stay ahead of--or at least with--the technology curve, yet I want it to make business sense.

So in particular, should I upgrade their machines at this point?
In general, what calculus should I use for deciding this sort of thing?

edit

They do write desktop UI applications as well as ASP.NET applications. Also, I do make sure that they always have the latest release of Visual Studio.

答:
Windows 8 isn't even commercially available yet. If you upgrade now, it might be to a beta of questionable stability with features that may or may not make the final cut.

If you can afford it: set up an isolated test developer machine and upgrade that one. Then let all the developers play with it now and then to get used to it and find all the little quirks and and bugs and differences.


答:
I don't know how valuable it is to ask, because by hiring you (and possibly other people), they are changing the dynamic of the team. They have clearly identified some current weakness, whether it's a lack of a particular skill or just a need for another developer to carry out the work, and are seeking to fix that weakness. As soon as they add the person or people to the team, the dynamics have changed and their answer might or might not be valid anymore.

It would probably be more insightful to ask about current team practices and desired process improvements. Where the team is now in terms of how the work gets done probably won't change dramatically between the interview and your potential start date (unless your start date is several months out), and asking about desired improvements to processes, methodologies, and tools might give you the opportunity to indicate that you might have the skills or knowledge to help with these efforts.

Title: Is it a bad idea to ask an interviewer what the greatest strength and weakness of their development team is?

Body:
I was wondering if this was a good question to ask a possible employer when interviewing for a developer position:

What is the greatest strength and weakness of your development team?

We all get this question when we are in an interview, so why not ask them in return? I think it is a very good question because we could find out about the team, and how this strength or weakness could affect us, but I don't want to annoy the interviewer.

Is there any downside to asking this question when interviewing for a developer position?


答:
Is your team specifically developing windows desktop UI applications?  If yes, I think you would want at least some of your team to move to Windows 8 as the UI might look different and what not.

If you are developing other types of applications and it doesn't matter as much which version of Windows you are working on, why not just let developers make the choice for themselves?  I'm sure each one of them will pick whatever is best/more efficient for them and some will probably end up reloading their OS a few times.

Ask your team. Maybe they don't even care about Windows 8. I'm completely in Microsoft camp as far as programming tools go but will definitely have my own reservations first few months after Windows 8 is released.

Title: At what point should I have my Windows developers upgrade to the latest release of Windows?

Body:
At what point should I begin upgrading our developer's machines to a later Windows release?

From experience, Microsoft typically has an epic fail about every other O.S. (I am really not trying to start a debate about this, it is my perception let it be) i.e. 2000 was a stable and useful O.S, yet m.e. didn't do well, xp was a great O.S. that many businesses still use, Vista didn't do well (I know that the reason this one didn't do well wasn't really Microsoft's fault and that Vista and 7 are the same major revision), while 7 seems to be an excellent O.S. that will be around for a while--sort of like xp is now.

Anyways, this makes me reluctant to upgrade our development machines to Windows 8.

a. I don't want to cost our business a ton of money for an O.S. that
will only be used for a year or two.

b. They also have to have linux dual boots, and I have read that Windows 8 and grub will not play well together.

I do want our developers to develop in the latest environment and to have a leading edge in any technology they are developing with. I do want to stay ahead of--or at least with--the technology curve, yet I want it to make business sense.

So in particular, should I upgrade their machines at this point?
In general, what calculus should I use for deciding this sort of thing?

edit

They do write desktop UI applications as well as ASP.NET applications. Also, I do make sure that they always have the latest release of Visual Studio.


答:
The answers so far have been excellent. I wholeheartedly agree with the advice to:

ask a lawyer

draw up a contract every time you work with anyone

continue to work with your lawyer

profit!

In this situation, you already know that the "base functionality of the app will be resusable for other customers", and in fact I am sure you (and others) have already experienced situations in which you know some basic functionality or frameworks -- be they web, mobile, desktop, or otherwise -- are going to be reused. I mean really, why wouldn't we reuse something we know works, and we're familiar with?  We probably all do it all the time.

This might not work for you, but it has worked for me over the years:

Eat the development cost of anything you think you will reuse, retain
ownership, and license it to your clients.  No external money changes
hands in this process, to keep the ownership clear.

In that situation, with the help of a lawyer, you can make it clear that your clients are paying for everything built on top of that base functionality that you provide, they own that customization but not the base, and you continue to be free to develop for others in a similar way.

If the client demands exclusivity of use, then you can offer it to them at a price that remunerates you for the the time, effort, and inability to sell it to anyone else in the future.

The downside, of course, is that you're developing something for free.  You have to be certain it will be resusable, and that others will pay you, otherwise it's a bad gamble. But if you plan to be an independent developer for some time, and have a client base -- or at least want to -- this line of thinking might be something to consider for the long run.

And talk to a lawyer!


答:
It's not a bad  question, however I personally wouldn't phrase it quite like that.

I'd start by asking about the development team and their processes, and try and pick up what's strong and weak about them myself. It's hard to give a good set of questions to ask because they'd be different depending on the answers given, what sort of position you're applying for, and what you value most in a development team.

Best advice I can give you is to try and keep the questions sounding more like a conversation, and less like an interrogation. Also, plan a list of things you're interested in finding out about in advance.


答:
Computers are not physical monolithical entities anymore, use virtual machines !

Your developers should be able to access different work environments as they need, and virtual machines are the perfect way to do so, you can :

keep a legacy environnement easily accessible.

have multiple, independent environments (ex: 1 environment per client)

have test environments (ex: windows 8 dev preview).

Any decent laptop nowadays can run a windows 7 VM on top of a windows 7 host environment. It's really nice to be able to switch environment as a developer. The backup/versioning possibilities are also a nice plus.

If you have MSDN subscriptions, you should be able to keep the price of this kind setup not too high considering they are used for development.


答:
First, do you develop for Windows, or cross platform? If so, you may be required to eventually get at least one Windows 8 box, so that your devs can test builds on it. Secondly, Windows 8 is something of a sea change for Windows.

Get the beta and take a look. It seems to fall much more into the single app at a time camp of tablets. This is fine for some devices and software. For others, the entire point is to have a multipurpose computer. Not a media streamer. If your software is any kind of business application, then imagine a user that is required to run it full screen, with the only way to access a different program(browser, email, excel, word) is by shutting down your program, and losing their place.

There is no opportunity for synergy between programs. Every program becomes a tiny courtyard inside the hedge maze in the walled garden. All of a sudden, you have to support everything, because your users can't get different software to do what your's doesn't.

It has been said before, but we use a computers on a task-centric paradigm not an app-centric paradigm. Even a normal home user needs to use multiple programs at once. Have you ever tried to write a school paper without word and a browser? This may very well move a large portion of the computer user population to migrate to some flavor of linux.

So, my advice is to be prepared to buy copies of Windows 8, but do not get them until at least 6 months in. At that point, the fallout will have already occurred, and you can make an informed decision, based upon what your customers use and think.


答:
You can always use in your code other libraries, open source for example. Obviously client will not have copyrights over them. In special case, you can use libraries written by you. Client pays for customization - that part, that is designed for him and his business needs. Everything that is not user-specific and is to be used in multiple projects can be your own library. I see no problem there. </p>

<p>The problem would be if you reuse the interface or business logic, or even resell the same project to someone other. Utility code is something the client usually isn't aware of and doesn't care either. </p>

Body:
You can always use in your code other libraries, open source for example. Obviously client will not have copyrights over them. In special case, you can use libraries written by you. Client pays for customization - that part, that is designed for him and his business needs. Everything that is not user-specific and is to be used in multiple projects can be your own library. I see no problem there.

The problem would be if you reuse the interface or business logic, or even resell the same project to someone other. Utility code is something the client usually isn't aware of and doesn't care either.


答:
Seems like you've been able to identify which versions meet your standards and which ones don't, so I wouldn't upgrade until you are confident with the latest and greatest.

You are going to need to stay a little ahead of your customers if they are using Windows to run your desktop software. Several other answers mention ways to allow for multiple environments to test.

I use to ride on the train and saw many corporate laptops (they have those property stickers on them) that are still running XP.

Go with what is stable for you along with what your customers are using. Not sure you can rely on any formula. Let's hope Windows 8 breaks the alternating crappy version trend.


答:
At some point, they should have at least addressed the positive if they want to encourage you to join the team. Any quality manager/team leader should be asking him/herself this question on a daily basis. Nobody and nothing is perfect. You're not likely to continue doing what works if you can't recognize it.

If they find this offensive or don't feel it is your place to ask such questions, you may not want the job. Any aversion to the question could a sign of insecurity or at least poor communication.

Personally, I like people who attack problems head on because they willing to recognize them (Isn't that step 1 of 12?).

Often, there are issues beyond the leader's control: budget, legacy code, size of staff, good people leave for higher-paying jobs, the nature of the work means developers have to accomodate team members in different time zones, upper-management has some micro-management tendancies, company-wide policies like dress code, office hours, etc. Any of these can negatively impact or limit a team.


答:
The other answers are oversimplifying things.
I don't mean to have a complete answer, just to point out a few things.

You can give rights or you can give exclusive rights.

If you give exclusive rights, you can maintain that as part of the agreement, you will retain non-exclusive rights. (This will allow you to use the code/program personally)

Even if you don't supply exclusive rights, you can still supply non-exclusive rights to use, modify and distribute the source code. The two are not mutually exclusive.


问:
How to explain the history of programming to non-programmers?
Sorry if this question is not appropriate for this stack exchange site, I've never used this one before.

I am doing my senior project on computer programming. I'm going to be presenting the project to classmates, teachers and (most importantly) judges, who haven't the slightest clue what programming is.

My question is somewhat broad, but how should I make my project to be about programming but still be simple enough for the judges to understand? Here are some things I considered:

The project will focus on the history of programming, what it has accomplished, how it is used today, etc. and I will show pictures of code and say "This is what code looks like". So the presentation would be simple, easy, and average.

Try to explain a little bit of code, perhaps show a loop in action or something like that, and try to make the audience think a bit rather than just watch someone present some stuff they consider to be boring. But then again, I don't want to make them feel stupid or anything.

答:
If your presentation is about the history of programming I would focus on how a computer only understands binary, and that binary is essentially impossible for a human to understand so programming languages were created. From there I would show the same sample program in several languages to show the evolution to modern languages, something simple but not a bit more than hello world. This would cover concepts like compiling, and how language A can be used to create language B. Talking about how memory constraints factored into design would also be good.

Explaining what a loop does or steeping through code explaining why its done this way isn't as related programming, because it would be an explanation of instruction logic that has existed longer than just electronic computers (finite state machines, mechanical computers). While this is a concept that is fundamental to programming, it explains what programming is rather than what has been accomplished through programming/how its used today.


问:
Should we bind view to a model property or ViewModel should have it's own..?
I am starting a project with following technical environment :
.Net 4.0, Entity Framework 4.0, WPF with MVVM Architecture

I saw lots of examples on the net, some books with this environment. In some of the examples authors had this Idea :

Viemodel will have an instance of Model class (Entity Framework Entity e.g. Person)

Bind the WPF view controls to the properties of Model

While some authors did :

Viemodel will expose all the properties of the model.

Bind the WPF view controls to the properties of ViewModel rather than to the model
directly.

So is it a good idea to let the view bind properties from model rather than viewmodel exposing its own? Or which is more preferred?

答:
I find both methods acceptable

Binding only to the ViewModel is the "MVVM-purist" approach and leads to better separation between layers. Binding to the Model is usually faster and more convenient.

Unless I have a good reason to fully separate the layers (size of project, future maintenance concerns, type of Model I'm working with, etc), I bind to the Model.


答:
Asking a team their opinion of themselves is not as likely to be as telling as a question about how their response to events resulted in an outcome. These type of questions are known as behavioral questions, and are based on the idea that past behavior is the best predictor of future behavior.

When preparing behavioral type questions, a common way to model them is by using the STAR method, meaning the question is structured in such a way to lead discussions to a specific situation, task, action, and result of the situation being discussed.

For example, "Since joining the team, what has been the team's greatest success, what created the opportunity for it, what team actions had the most impact on making it happen, and what was the effect of this success on the company?"


答:
Yes, there more than a few downsides to asking this question.  First of all, how well does the person you are asking really have the ability to answer this question?  If you are asking someone in HR this question, they may have little idea of what a legitimate answer is here.  Even the manager may not know if the team is still relatively new and things aren't so well-known in terms of social dynamics and getting things done.  The other side is how prepared are you for the linguistic gymnastics you may be starting with this question as there is more than a slight chance of any answer being so loaded with buzzwords or vague that it has little value unless you know how to follow-up with some harder hitting questions.  For example if they claim that they co-operate and deliver well for a strength, are you prepared to interrogate that further?

On the flip side, I'd be more tempted to ask for a bit of team history:

How long has this team been together?

Who has how many years here?

What roles do the various people tend to play usually?

That would be far more useful to my mind than the question that may be perceived as rather loaded to my mind.  While I can admire the effort, I'd wonder how well would any company have studied the team dynamics to find their strengths and style to the point of being able to disclose them.

The comment about asking this to the person without knowing how well they answer gets into those "linguistic gymnastics" I mention above as I can easily foresee someone stating something akin to, "We hire only the best here," or something else that is boilerplate for an answer that would require some probing to discover the answer was just someone trying to be polite rather than offer an accurate answer.  Another generic answer would be that "everyone gets along so well" that one could wonder if there are hidden hostilities or is the team really a bunch of mature people that do work well together.

Rather than ask for weakness, I'd restate the question to be, "What is your development team's greatest challenge?" so that it isn't taken to be someone intentionally trying to stir up trouble but rather trying to gain some insight into how the team is seen.


问:
How should I approach developing a Java based client-server application?
I have been asked to develop a client-server application (requires database) for a company.

I am very handy with java so would like to go with it. Its up to me how I develop the application. It may be an JSP web application or Java Swing GUI based application.

I have following queries/doubts.

So if I go on to develop a web application, I have to teach the company personnel

How to install Tomcat

How to load the web application Tomcat

How to start the server to start the application.

If I go on to develop a Java Swing GUI based application,

It should start when the computer starts up. i.e it should be auto added into the service start-up of the OS on installation

Have application shortcut in quick launch, tray bar on installation.

On Database Part:

I would like to have MS-access like DB but free one. This is because,

No need to worry about installation of DB engine (like we have to take care in-case of MySQL).

DB would maintained in some Drive (like .mdb file in case of MS-Acess) unharmed even if their OS crashes.

Please guide me how should I approach in developing the software.

答:
You may also choose a modern approach to JAVA web development.

For example if you choose Play framework you don't need Tomcat, you will start it as a normal app (Over course: A python launcher).

It will come with a configuration file you can easily modify to connect to your database. All dependencies are already taken care for in the case of a simple client-server-db app.

I wouldn't start a 2012, edit saw this was an old question but I wouldn't start a 2011, project with STRUTS2 as you have been recommended :) Struts2 is an old framework chosen by many devs because almost everybody knows it and are afraid of change. But you are free of this backpack.


问:
How to stop the development spec from changing in mid development?
Problem: It seems with almost every development effort I'm involved in, no matter how much time is spent planning prior to starting development, there is always a large amount of changes required either midway or towards the end of the project. These are sometimes big changes which require alot of re-development.

I don't work for clients who pay money, this is an in-house development team on in-house development websites. So, it's not like I can charge for it or anything. And at the end of the day, we have to try to hit deadlines.

Questions: What are some of the best ways you guys have found to minimize and prevent spec changes from cropping up midway or after development?

答: Since you cannot prevent change, you need to embrace it. I think the most important thing you can do is: you need to try to get the change requests from the customer as early as possible, because it is less costly to change things when there is only little code. So you need to present your design as early as possible to the customer by using prototypes (perhaps even a paper prototype), use agile methods and so forth.


答:
You could consider introducing some discipline in the development process using
a methodology like SCRUM. In SCRUM, a team makes an initial plan by splitting the implementation of features into stories, and assigning each story an effort estimate (number of working hours or days needed to implement that story).

If a late change is requested (for a story that's already been implemented) you
need to create a new story and estimate the implementation effort for it.
Then you can go to your manager (the product owner) and simply explain
that the new feature is going to cost that extra time. The project manager
then has the responsibility of accepting the extra effort and adjusting
the schedule (possibly cancelling other not yet implemented stories).

Even if your team is not going to fully implement SCRUM or another development
process, you could at least introduce the planning based on stories,
estimate development effort for each story, and adjust the schedule
as new stories are requested.

Title: How to stop the development spec from changing in mid development?

Body:
Problem: It seems with almost every development effort I'm involved in, no matter how much time is spent planning prior to starting development, there is always a large amount of changes required either midway or towards the end of the project. These are sometimes big changes which require alot of re-development.

I don't work for clients who pay money, this is an in-house development team on in-house development websites. So, it's not like I can charge for it or anything. And at the end of the day, we have to try to hit deadlines.

Questions: What are some of the best ways you guys have found to minimize and prevent spec changes from cropping up midway or after development?


问:
Defining classes in JavaScript that exist in your back-end
Doesn't it seem relatively duplicative to define your Models in your backend code AND on your front end for a rich internet application?

I'm porting a GUI application I had written to have a web interface, which is all grand and nice any all, but things like Spine, SproutCore, JavascriptMVC would have you define your models and views and implement specific controllers.

Being that I've got a well defined MVC pattern on my backend code (which is making this super easy to port; the views in my app took python dicts and returned python dicts to the controllers which could easy interface with the models; I can just convert these to JSON back and forth to speak to the web front end), why would I want to recreate the entire pattern again on the front end?

What are good ways to work around this?

Should I just say "screw this" and use something like http://pyjs.org?
Should I write a bunch of code to export my models into JSON and then write some JavaScript code to build the Models on the front-end automatically so I'm still only defining them once?

What would be the best approach to this?

答:
I had a similar question / problem, for me, knockout.js and their mapping plugin worked:

http://knockoutjs.com/documentation/plugins-mapping.html

https://stackoverflow.com/questions/6796909/is-there-a-native-way-to-create-client-side-models-to-post-to-my-controllers-wit


问:
Convince someone that an app cannot be done
I am profoundly disturbed by a request that asks me to develop an iPad app to measure the actual size of an object using camera.

It is simply not practical.

Translating 2D object into 3D is never easy. I either need extra hardware, or have to make a lot of assumptions (which will almost never hold true). Regardless I will need time.

However, the person who requested me to develop the app is adamant of his vision. And he tries to show that he is right by listing a number of existing apps that do similar jobs. He does not realize that all the apps he refers to has a rating lower than three stars, which means they probably do not do their job.

How can I convince this person that such an app simply cannot be done in a practical, single developer fashion? Is there a PhD thesis I can use as my defense?

答:
Actually I'm not sure you are correct.

Provided the user assist the app it should be possible.

For example of a 1D measurement.
Stand 1meter away from 1dm high object. Add this as user input to your app.
Stand 1km from a mountain, add this as user input.
Keep the same angle from the camera with both your 1dm object and the mountain.
The app should calculate the height of the mountain easily.

I would suggest further studding Triangulation for implementation details.

You can take this further by placing your phone in a tripod and and have the object to be measured always at a known distance. This way everything can be pre calibrated and your app could by only counting the pixels in height and width tell you the 2d measurements of the object under inspection.


答:
Instead of trying to convince someone that something cannot be done try to analyze and determine what it would take to get this done.

When you calculate that it would take you alone 10 years and $1 billion the solution of what to do with the project will become obvious.

Title: Convince someone that an app cannot be done

Body:
I am profoundly disturbed by a request that asks me to develop an iPad app to measure the actual size of an object using camera.

It is simply not practical.

Translating 2D object into 3D is never easy. I either need extra hardware, or have to make a lot of assumptions (which will almost never hold true). Regardless I will need time.

However, the person who requested me to develop the app is adamant of his vision. And he tries to show that he is right by listing a number of existing apps that do similar jobs. He does not realize that all the apps he refers to has a rating lower than three stars, which means they probably do not do their job.

How can I convince this person that such an app simply cannot be done in a practical, single developer fashion? Is there a PhD thesis I can use as my defense?


答:
It's called "Forced Perspective"

Step 1.  Go outdoors with a friend.  Stand in front of a building.

Step 2.  Take a picture so that the friend is really close to you and the building is really far away.  Assure that the friend's head lines up with the top of the building.

Step 3.  Ask your customer how tall it is, given just the photograph.

Do not specify what "it" is that the customer must define the height of.  Let them assume -- or guess -- what part of the picture is relevant.


问:
Carpool logical architecture
I'm designing a carpool system (drivers can publish their routes and passengers can subscribe to them) with WebServices(axis2) and Android clients (ksoap2).

I have been having problems with the logical architecture of the system and I wondered if this architecture is fine.

And another question: for that architecture (if it is ok), how would be the packages structure?

I suppose something like that:

(In android)

package org.carpool.presentation

*All the activities here (and maybe mvc pattern)

(In the server)

package org.carpool.services

*Public interfaces (for example: register(User user), publishRoute(Route route) )

package org.carpool.domain

*Pojos (for example: User.java, Route.java, etc)

package org.carpool.persistence

*Dao Interface and implementation (jdbc or hibernate)

答:
Yes, IMO that architecture is awesome, and I would recommend it (not that that means much, lol). It has worked for me in the past and present ... Although my experience was on the .net side of things (MVC / WCF / POCO / ENTITY|MSSQL) .. but form an architecture level, the layering is nearly identical.

great idea.. good luck

Title: Carpool logical architecture


答:
Why not force the user to take the picture with a clearly displayed item of standard size next to the item being measured; a penny for example.

It's probably not as good of a solution as your employer wants but explaining a solution like this would at least show you can make something happen.

As you start listing the limitations and compromises needed, he will surely back away from a project like this (unless you have very good and sizable team behind you)


答:
I think it's a great question, although I would ask it a bit differently. In the past, I have asked questions such as:

What are the biggest technical challenges at your shop?

How's the range/spread in skillsets among your team?

How much of a problem is silo-ing at your shop?

These questions help you indirectly expose information about how the team operates. Technical challenges reveal the team's attitude towards (new) technology. Range-in-skillsets reveals the professional background within the team. Silo-ing reveals issues of code ownership and ego.


答:
It's possible - plus, you could always do the processing remotely, only using the phone to collect data and display results. Beyond that, there's also nothing that says you're not able to mount a device to the phone's camera to split and offset 2D input, and then convert those two inputs into a 3D input.

As for app ratings, that's not really a solid basis for understanding the feasibility of a concept, or it's complexity.

Just have fun with the challenge, it's not the end of the world.


答:
It's worth pointing out that Windows 2000 was based on the NT code, while Windows ME was the last (thankfully) iteration of the Win 95 kernel. So saying "2000 was solid but ME sucked" doesn't really say anything at all. XP was the update of 2000, and was reasonably solid. Vista was XP with garbage grafted on. Win 7 got rid of the clutter and introduced a lot of good fixes and features. So the real Windows updates are:

[Win 95 kernel]

95 (sucked)

98 (sucked less than 95)

ME (sucked badly)

[kernel retired]

[Win NT kernel]

...[previous NT releases, 3.1 through 4.0]...

2000 (solid but underfeatured, not well-supported in the industry)

XP (good update, good OS albeit with suboptimal defaults)

Vista (mediocre update of XP)

7 (excellent release; first Win OS that can reasonably be
compared to Linux boxes in terms of solidity)

8 (???)

Vista was a slight regression in a .1 release. Other than that, the NT kernel releases have trended upward quite solidly from release to release. I see no reason to assume that Win 8 will be an ME-type, or even a Vista-type, regression in quality.

But as others have already pointed out, the obvious answer is to experiment with VMs to find out how it will work for you.


问:
How to Use Subversion Repository Inside Git Repository?
I'm developing a project in Git.  IT depends on another project, that's in a Subversion repository.  I'd like to be able to make changes to the Subversion project in the tree, and commit to/update from the Subversion repository from within the Git project.  Is that possible?</p>

答:
Although discouraged by Charles, I think that you really are looking for git sub-modules:

Git's submodule support allows a repository to contain, as a subdirectory, a checkout of an external project. Submodules maintain their own identity; the submodule support just stores the submodule repository location and commit ID, so other developers who clone the containing project ("superproject") can easily clone all the submodules at the same revision. Partial checkouts of the superproject are possible: you can tell Git to clone none, some or all of the submodules.

While Charles seem to think that git submodules are deficient because they can't work like svn externals (referencing the head of a branch rather than a specific revision), I think this is as much because of the difference in expected workflow between git and svn as anything else.

Depending on when and where you have updated your working copy, directories at different points in your svn working directory hierarchy might be at different revisions. That isn't possible with git. In git whenever you update to a revision, you update the whole of your working copy to that revision - you expect that when you go to revision 123abc that you will get the exact same code as the last time you checked out 123abc, and that includes any and all submodules that revision might have.

If you want to update a submodule, you have to update it and then make a new commit to the super-module to update it to use the new revision in the submodule. It means submodules are less flexible than externals, but it enforces the primary git paradigm of a repository wide snapshot.

If you want svn externals always use the latest revision functionality then you are pretty much on your own. As mentioned, you just have to check out the svn submodule manually and then .gitignore it.

Given the way svn works, the way externals work is perfectly acceptable.

Given the way git works, the way submodules work is perfectly acceptable.

Incidentally, as far as I understand it, Mercurial subrepositories work in the same way as Git submodules, so that won't help either.


答:
Don't phrase it that way. Everyone hates the phony (IMHO) "strengths and weaknesses" question. There is no need to turn it around and use it again.

Much better and more authentic questions that get to the same information would be the following:

Tell me about the history of your team, how did you get started,
where did the team members come from? Where did previous team members
go when they left?

Why are you looking to fill position x?

What are the most difficult challenges you and your team face working
here?

Can you walk me through the lifecycle of a project this team has worked on? How did it start and finish? What is the team's relationship to the stakeholders, testers (if any), ops (if any) and maintenance?

When things go wrong, how does your team respond? Can you tell me about the last/current/biggest crisis?

Having an answer to these questions helps to give a picture of what it is like to work with that team. These are a comfortable opportunity for the hiring manager to really describe the pros/cons of the work environment. It is also easy to detect a phony answer to such questions that would indicate there is something being hidden.


问:
Problem with understanding "seam" word
I'm reading "Dependency Injection in .NET" by Mark Seemann (it's fantastic, and must have) and the author often uses the word "seam". But I can't understand what it means.
Here is an example of using this word:

Chapter 7 explains how to compose objects in various concrete frameworks
      such as ASP.NET MVC, WPF, WCF, and so on. Not all frameworks support DI
      equally well, and even among those that do, the ways they do it differ a lot. For
      each framework, it can be difficult to identify the SEAM that enables DI in that
      framework. However, once that SEAM is found, you have a solution for all applica-
      tions that use this particular framework. In chapter 7, I have done this work
      for the most common .NET application frameworks. Think of it as a catalog of
      framework SEAMS.

I would be gratefull for helping me with understanding this word.

答: I think the term originates from Michael Feathers Working Effectively with Legacy Code in which he explains a seam in software as a place where two parts of the software meet and where something else can be injected. The analogy is a seam in clothing: The place where two parts are stitched together. The piece on each side only touches the other right at the seam. Back to software: If you identify the seam you have identified the place where there is a well defined interface. That is what you can leverage in DI, since such an interface allows you to replace implementation without the rest of the software being able to tell (without cheating, anyway).

Title: Problem with understanding "seam" word


答: You might want to start by giving your developers a VHD with Win8 installed on it and let them start playing with that.  I'd hold off on converting any machines until they at least have a release candidate available.  I was a beta tester for WinME, Win2K and WinXP and there's a lot that changes, even during the late beta period.  Unless you're developing something that takes advantage of Win8's unique features and you need to have it available on Day 0, I'd hold off on a mass migration.  VHD boot or VM (if you've got 8G or more of memory) are both pretty usable options.


问:
Immutable design with an ORM: How are sessions managed?
If I were to make a site with a mutable language like C# and use NHibernate, I would normally approach sessions with the idea of making them as create only when needed and dispose at request end.  This has helped with keeping a session for multiple transactions by a user but keep it from staying open too long where the state might be corrupted.

In an immutable system, like F#, I would think I shouldn't do this because it supposes that a single session could be updated constantly by any number of inserts/updates/deletes/ect...   I'm not against the "using" solution since I would think that connecting pooling will help cut down on the cost of connecting every time, but I don't know if all database systems do connection pooling.  It just seems like there should be a better way that doesn't compromise the immutability goal.

Should I just do a simple "using" block per transaction or is there a better pattern for this?

答:
I'm kind of taking a wild guess here since I'm absolutely unfamiliar with F#, but it sounds like our talking about a context manager type structure similiar to the one outlined in this article:

```<code>/// <summary>
/// Returns a shared ObjectContext instance.
/// </summary>
public NorthwindObjectContext ObjectContext
{
    get
    {
        string ocKey = "ocm_" + HttpContext.Current.GetHashCode().ToString("x");
        if (!HttpContext.Current.Items.Contains(ocKey))
            HttpContext.Current.Items.Add(ocKey, new NorthwindObjectContext());
        return HttpContext.Current.Items[ocKey] as NorthwindObjectContext;
    }
}
</code>```

Complete Article here:

http://dotnetslackers.com/articles/ado_net/Managing-Entity-Framework-ObjectContext-lifespan-and-scope-in-n-layered-ASP-NET-applications.aspx

In the past I've used a "one context per request" idea and love it.. the "using" method is just too small of a scope for me.

Body:
I'm kind of taking a wild guess here since I'm absolutely unfamiliar with F#, but it sounds like our talking about a context manager type structure similiar to the one outlined in this article:

/// <summary>
/// Returns a shared ObjectContext instance.
/// </summary>
public NorthwindObjectContext ObjectContext
{
    get
    {
        string ocKey = "ocm_" + HttpContext.Current.GetHashCode().ToString("x");
        if (!HttpContext.Current.Items.Contains(ocKey))
            HttpContext.Current.Items.Add(ocKey, new NorthwindObjectContext());
        return HttpContext.Current.Items[ocKey] as NorthwindObjectContext;
    }
}

Complete Article here:

http://dotnetslackers.com/articles/ado_net/Managing-Entity-Framework-ObjectContext-lifespan-and-scope-in-n-layered-ASP-NET-applications.aspx

In the past I've used a "one context per request" idea and love it.. the "using" method is just too small of a scope for me.


问:
How to Determine # of Programmers needed for a project
How do you know how many programmers a particular project needs to be successful?

The company I work for fulfills orders for client companies.  We have written an in-house  warehouse management system that handles location based inventory management, order processing, bill-of-lading generation, invoicing, freight auditing and reporting (probably 50 reports).  It also has barcode scanning functions and a client portal along with dozens of other smaller features.  It also includes a full employee timeclock.  It integrates with Quickbooks, UPS and FedEx.  It handles work for at least 50 clients all differing slightly in their functionality.  For example, we import orders from files the customers send but each customer sends a different file format (csv, excel, flat file and web services) so we have well over a dozen order conversion methods setup.  Exports are the same story.

The project is complex and growing in complexity every day with over a quarter million lines of code.  It's about 250,000 lines of VB.NET code, 6,200 lines of Ruby code and maybe 5,000 lines of PHP.  It also has a MySQL database with about 200 tables.

Because of the constantly changing requirements and differing needs of dozens of clients the code itself varies greatly in the quality from extremely poor to relatively good code.

Currently, this project has only a single programmer - myself.  I also currently do all the product support for our company of 75 people or so.  That includes troubleshooting and setting up new clients and any new features that are needed.  Plus, we're trying to rewrite the whole thing to be 100% Ruby on Rails based.  And we would like to market the whole system within the next year or so to be used by other companies.

Currently, we have only myself as a programmer but I don't believe that is sufficient.  Does anyone have any recommendations for how many programmers a project of this magnitude should have or how we should go about determining the answer to that question?  Particularly given the fact that management would like the product to be commercial quality by next year?

答:
1 programmer on a large codebase with all the responsibility of configuring, testing, communicating, supporting, documenting and bug fixing isn't going to have much time for writing new code or adding features (or even refactoring old code).

Break your week down by the percentage of these mandatory tasks that don't expand the business and you'll be surprised at how fast management hires extra help.

Large projects have a certain amount of associated overhead that won't go away (especially if implementing/testing with new clients all the time as you seem to be).  This is the reason you have support rotations and support in general; so some of those on the team have time to work on new features.

You might also want to look into books on software estimation.  These books may not sound like they have much to say, but they contain interesting case studies from a variety of fields and back their claims up with evidence.


答:
Welcome to the oft times difficult world of resourcing!

The issue isn't one of Project Size vs Team Size. That's a very common misconception which often hides other problems which are usually management related. The issue is all about Scope.  You need to decide what it is you can achieve with your current resources - aka you.  Then you need to decide if your capacity for handling the workload is sufficient to handle the task within the time frames you have been allocated. Thus your project needs must be identified and scoped.

Do you want to spend time cleaning up the existing code base?

Is this a fundamental requirement to ensure the success of the project?

Do you have new features to add to the system? What are the most important aspects of your project that must be dealt with, and what are the minor items that are on the wish list?

Can any of the requirements be either abandoned, or at least put off until the next maintenance release?

When you have an idea of the scope of your requirements, you can more easily determine the workload required to achieve a result within a certain time frame. If your resources are likely to be overutilized, then you will need more staff.  If your resources are likely to be underutilized, then you may find yourself able to either move your deadline closer, or increase the scope of your project.

If your gut-instinct tells you that you don't have enough staff to manage the project, you may be correct, but you need to understand why it is that you gut is telling you this.  It's not enough to simply have a feeling.  Instead, you need to be able to examine the problem scientifically in order to provide proof to back up your instincts, and you need to be prepared to face the possibility that you instincts might even be wrong. Once you have gathered your evidence - I.e.: scoped the project, then you really need to sit down with your management and make a case for either reducing the scope of the project, or increasing the resources available to ensure the success of the project, based on the evidence at hand.

Title: How to Determine # of Programmers needed for a project

Body:
How do you know how many programmers a particular project needs to be successful?

The company I work for fulfills orders for client companies.  We have written an in-house  warehouse management system that handles location based inventory management, order processing, bill-of-lading generation, invoicing, freight auditing and reporting (probably 50 reports).  It also has barcode scanning functions and a client portal along with dozens of other smaller features.  It also includes a full employee timeclock.  It integrates with Quickbooks, UPS and FedEx.  It handles work for at least 50 clients all differing slightly in their functionality.  For example, we import orders from files the customers send but each customer sends a different file format (csv, excel, flat file and web services) so we have well over a dozen order conversion methods setup.  Exports are the same story.

The project is complex and growing in complexity every day with over a quarter million lines of code.  It's about 250,000 lines of VB.NET code, 6,200 lines of Ruby code and maybe 5,000 lines of PHP.  It also has a MySQL database with about 200 tables.

Because of the constantly changing requirements and differing needs of dozens of clients the code itself varies greatly in the quality from extremely poor to relatively good code.

Currently, this project has only a single programmer - myself.  I also currently do all the product support for our company of 75 people or so.  That includes troubleshooting and setting up new clients and any new features that are needed.  Plus, we're trying to rewrite the whole thing to be 100% Ruby on Rails based.  And we would like to market the whole system within the next year or so to be used by other companies.

Currently, we have only myself as a programmer but I don't believe that is sufficient.  Does anyone have any recommendations for how many programmers a project of this magnitude should have or how we should go about determining the answer to that question?  Particularly given the fact that management would like the product to be commercial quality by next year?


答:
I would say at least 5 persons. One for test, one for spec, support and documentation and 3devs.
There is a lot of things to be tested in you case, so a 50% dedicated tester should not be unreasonable. A person writing down the requirements and having customer support setting up your infra structure for testing etc should be there. Three developers I feel is quite low for a project like this. A large back end that is integrated to many third party systems, and a complete fronted with extremely many customized reports. I would like to have.

A good back end developer (persistence / business layer)

A good middle end / front end developer making action classes and JavaScript CSS Design.

A good alround developer acting architect but also making code in all layers with expert help from the two other. This developer can also do things like setting up JUnit framework Maven Jenkins Git branching and so on.

What happens if you leave, becomes sick take vacation etc. One person per project is never smart. Neither is it good to be alone as you don't evolve professionally without coworkers. I work quite often alone, setting up new architectures and so on, often in teams of say 5 developers but I never evolve as much as when I say to a coworker lets set up this together and we lock our self up a week talking, discussing and choosing frameworks. Pair programming is extremely giving and can not be done with one dev, and who will make code reviews if you feel uncertain? If you get stuck who will help you? I would only undertake a one person project if it was part of a larger scope and could get expert resources called in if needed. You as a developer should not be stressed from the outside therefore the customer support guy mentioned earlier could act as a Scrum Master blocking all external impediments and he could prioritize support, new CRs and reason with the end customer if they want to change requirements as you were afraid of.


问:
What issues should we be aware of converting to Agile/Scrum with a project that's underway?

Possible Duplicate:

  What have you seen go wrong when introducing SCRUM?

Let me preface the question by telling you that our company doesn't have any formal "thou shalt..." processes in place right now at all, at least when it comes to the software development life cycle. Some areas are doing things fairly well (T/BDD at least), but we don't have a very defined process.

Our project lead was just sent to a project management training and he came back interested in Scrum (I think he just really likes the cool word ;) which is great from my perspective because for the last month or so I've been telling co-workers that Agile practices are right down our alley. Mostly we just lack the formality/structure that a methodology provides, so at times we lean a little more towards code and fix, even if individuals try to make their own corner of the world a little better.

So we're about three months into this project that he estimates to be about a 2-year project, and he wants to start adopting Scrum methods (which I'm pretty excited about). All of the developers aside from our lead are junior developers, and I think I've got the most experience when it comes to Agile practices, and it's not that much (meaning I did some BDD on a project a while ago and have watched a few Uncle Bob videos).

So the current project health is OK. We have zero test coverage, so that's not good, but our team gets along well and I think we're all fairly strong coders.

That being said, what sorts of issues should we be aware of trying to implement Scrum/Agile?

答:
Dont Force it, determine what your team embraces and rejects, and try to come up with a thoughtful implementation of "scrumming" that works for your team. You can actually have mock "scrums" when having these short brief brainstorming discussions

Once everyone's got an idea of what everyone's willing to do and what's trying to be accomplished.. Define what the team agrees to adhere to (testing procedures, documentation, code comments, how to determine user stories, who's the scrum master etc..), create some sort of "bible" (which in my opinion should be like 10 bullet points that can print in large caps one a single piece of paper) that new comers can easily follow, etc.. and hopefully you guys will realize the benefits..

In my experience, i've had inexperienced people embrace it aimlessly without really knowing what's going on, and in the same room, have old dogs who think it's a waste of time and think "testing in place" provides the same benefits as unit tests.. luckily, sounds like you wont have that issue.. hopefully..

I think scrumming can be a useful tool and really bring a team together.. however, if you try to bulldoze one persons methodology onto a team that is set in there ways, you're more than likely to "P" some people off, and might have to start mirco-managing, which no one wants to do (well, my boss from a couple jobs ago seemed to thrive with it.. lol)..

good luck!


问:
Company PC refresh, laptop or desktop?
My company is getting PC refreshes with a choice of to have a desktop or laptop.  Each one seems to have its pros and cons. Would you want the flexibility and freedom of the laptop but take the risk of working extra hours at home? Or a desktop limited to one place, but not having to worry about taking work home and disrupting home time?

I'm not asking what would be better for coding, but more for convenience and productivity.  I currently have a desktop and work about 8 to 9 hours a day, with only coming in on the weekends for when we get behind on major deadlines. I love developing but I also have quite a busy life after work. I feel that having a work laptop will only haze the line of work and home.

答:
What flexibility and freedom would a laptop give you at work? Most offices I know aren't going to let you go plop down with the laptop anyway so what would be the point? Taking work home with you would also not be a laptop/desktop issue as most companies can VPN anyway. If they want you to work from home they will tell you, "I need you to work from home."

If I am chained to a desk, I would go with the desktop; they are faster and can support bigger screens.

Also, people are wildly overstating the "serious" work aspect. I much prefer working on a laptop b/c I can switch positions and environments I couldn't switch sitting at a desk, but you wouldn't be able to do that at work anyway.

Title: Company PC refresh, laptop or desktop?


答: If you decide to write a JVM-hosted web app, I recommend using Groovy and Grails.  Writing GSPs is much easier than writing JSPs.  You could also use HAML.  You will get the application done with about 20% as many lines of code.</p>

Title: How should I approach developing a Java based client-server application?

Body:
I have been asked to develop a client-server application (requires database) for a company.

I am very handy with java so would like to go with it. Its up to me how I develop the application. It may be an JSP web application or Java Swing GUI based application.

I have following queries/doubts.

So if I go on to develop a web application, I have to teach the company personnel

How to install Tomcat

How to load the web application Tomcat

How to start the server to start the application.

If I go on to develop a Java Swing GUI based application,

It should start when the computer starts up. i.e it should be auto added into the service start-up of the OS on installation

Have application shortcut in quick launch, tray bar on installation.

On Database Part:

I would like to have MS-access like DB but free one. This is because,

No need to worry about installation of DB engine (like we have to take care in-case of MySQL).

DB would maintained in some Drive (like .mdb file in case of MS-Acess) unharmed even if their OS crashes.

Please guide me how should I approach in developing the software.


答:
The success of the product / project will depend on the commitment of the company whose paying for it. If they're going to hire more programmers / support staff, there will be an inherent decrease of productivity from the one programmer, who know has to train, teach, manage, etc.. not that it's a bad thing.. but there will be a decrease before any increase is realized.. there's also the need for business analysts, managers, sales, and the support of the product once it's commercially available..

Hosting a commercial application is much more than just creating a solid platform. there's support requirements, technical support, bug fixing, user training, etc..

do you have any good analysis / spec / estimation procedure in place? if not, start now, you can do this by yourself.

are you working your brains out right now? If so, be prepared to work twice as hard if you're expected to manage this process and continue developing (raise due?) ..

and here's the answer from my previous experience being in a similar situation in the Southern California area pricing:

5-6 people && ~500k

1 Lead Developer / manager wearer of all hats (~100k - 120k)

2 Sr. (very capable, self driven) programmers with good DB understanding and Skills (2x ~80 - 100k)

1 Project Manager to interface with Management ($$?) this person should also be able to understand the needs of the app, and communicate those needs directly to the programmers

1? (HTML / UI) developer? with javascript skills (i hate programming UI / Markup code)

1? Database person? however, most good programmers have no problem creating scalable data structures, however, if you're going to get into optimization concerns, you'll at least want to have a consultant


问:
What is the value in hiding the details through abstractions? Isn't there value in transparency?

Background

I am not a big fan of abstraction. I will admit that one can benefit from adaptability, portability and re-usability of interfaces etc. There is real benefit there, and I don't wish to question that, so let's ignore it.

There is the other major "benefit" of abstraction, which is to hide implementation logic and details from users of this abstraction. The argument is that you don't need to know the details, and that one should concentrate on their own logic at this point. Makes sense in theory.

However, whenever I've been maintaining large enterprise applications, I always need to know more details. It becomes a huge hassle digging deeper and deeper into the abstraction at every turn just to find out exactly what something does; i.e. having to do "open declaration" about 12 times before finding the stored procedure used.

This 'hide the details' mentality seems to just get in the way. I'm always wishing for more transparent interfaces and less abstraction. I can read high level source code and know what it does, but I'll never know how it does it, when how it does it, is what I really need to know.

What's going on here? Has every system I've ever worked on just been badly designed (from this perspective at least)?

My philosophy

When I develop software, I feel like I try to follow a philosophy I feel is closely related to the ArchLinux philosophy:

Arch Linux retains the inherent complexities of a GNU/Linux system, while keeping them well organized and transparent. Arch Linux developers and users believe that trying to hide the complexities of a system actually results in an even more complex system, and is therefore to be avoided.

And therefore, I never try to hide complexity of my software behind abstraction layers. I try to abuse abstraction, not become a slave to it.

Question at heart

Is there real value in hiding the details?

Aren't we sacrificing transparency?

Isn't this transparency valuable?

答:
As others have said, "hiding details" behind an abstraction enables them to be changed without affecting users. This idea comes from Parnas' On the Criteria to Be Used in Decomposing Systems Into Modules (1972), and is related to the idea of abstract data types (ADT) and object oriented programming.

At around the same time, Codd's A Relational Model of Data for Large Shared Data Banks (1970) was motivated (see the abstract and intro) by wanting to change the internal storage representation of databases, without affecting users of the database. He had seen programmers regularly taking days, modifying pages of code, to cope with minor storage changes.

That said, an abstraction isn't very useful if you have to see what's inside it to be able to use it.  It can be very difficult to design it well. An example of a good abstraction is addition - when was the last time you had to think about what happens inside? (but at times you do, e.g. for overflow).

The essential problem (IMHO) is that to design modules well (in Parnas' sense), you need to predict what will change and what won't.  Predicting the future is difficult - but if you have a lot of experience with something, and understand it clearly, then you can do a pretty good job of predicting.  And therefore, you can design a module (abstraction) that works well.

However, it does seem the fate of all abstractions - even the very best - that eventually there will be unforeseen (and arguably, unforeseeable) changes that require breaking the abstraction.  To address this, some abstractions have an escape, where you can get access to a deeper level if you really need it.

This all seems very negative. But I think the truth is we are surrounded by abstractions that work so well that we don't notice them, or realize what they are hiding. We only notice the poor abstractions, so we have a jaundiced view of them.


问:
Does having Master's degree in Computer Science help your career?
I am curious about experiences of programmers who have gone beyond college or university and now work in the industry. I am not talking about academia (you need PhD there anyway). Do you have a Master's degree? Has it helped your career? Are there any other benefits besides the knowledge one gains while pursuing the degree?</p>

答:
Like many career questions, the answer is, "It depends..."

The single best programmer I have ever met didn't finish undergrad.  He's heads and tails above everyone else, and it's obvious to everyone who has worked with him.  It's inconceivable that he couldn't find a great job just by word of mouth.  He's been a manager, architect, individual contributor - you name it.

Then there is the rest of us...

I've seen a masters in computer science help people in any of the following situations:

Less than 5 years technology experience.

Non-CS undergrad.

In a company with an academic bent.  (Example: the old Bell Labs)

Intellectually curious and bored at work.

Strayed too far from technology.

Want a differentiator in lieu of work experience.  (Example:  5 year BS + MS)

In no way is it mandatory, but it can be useful.  A lot depends on your intellectual curiosity.


问:
Why doesn't the DART language use a special character to identify variables?
I come from a PHP background and I have been considering looking at DART in more detail.

DART is an, open source, front-end/back-end, language for web development.

PHP has a special $ (dollar) character to indicate variables:

```<code>$variable
CONSTANT
'string'
"etc"
</code>```

I find that dollar sign to be really useful for speeding up the proces of refactoring, especially if PHP code is mixed with HTML or content. It reduces the number of false positives when, say, doing a find and replace.

As DART is a completely fresh language (with no legacy) that can be embedded in HTML, it surprised me to see that it does not have any special identifier to indicate variables.

What's the reasoning behind that design decision?

答: Dart doesn't use $ to denote variables because that is not familiar to JavaScript or Java developers. One of Dart's design goals is to be familiar to a vast majority of developers, which is why it looks kind of like C, Java, and JavaScript.</p>


答:
I think work / real-world experience can go a long way too.. and personal projects..

Instead of going to school, set that time aside to build a really awesome system / service / website. Learn along the way and use the most current technologies you're comfortable with.

While I think that learning at a "schools pace" isn't bad, and good teachers are even more valuable, you can teach yourself a lot faster and learn a lot more, especially if you're fueled by ambition. It'll be easier for you to learn what you want, instead of trying to find a job that will give you that chance to get the experience.

By doing that you'll get a solid understanding of those technologies (hopefully) and when you're interviewing, you'll have examples of your abilities, instead of a piece of paper that says you can go to school, and how knows.. maybe you'll create yourself a job and be hiring yourself!!

Title: Does having Master's degree in Computer Science help your career?

Body: I am curious about experiences of programmers who have gone beyond college or university and now work in the industry. I am not talking about academia (you need PhD there anyway). Do you have a Master's degree? Has it helped your career? Are there any other benefits besides the knowledge one gains while pursuing the degree?</p>


问:
What exactly undefined means in JavaScript? Why it's there? What usages it has? How it could be useful?
In JavaScript, we have something called undefined. I said something, because I really don't know if it's a base class, or a built-in variable, or a keyword, or anything else. I just know that it's there.

To see it in action, you can simply write:

```<code>undefined;
typeof undefined;
</code>```

Can anyone please explain to me why this thing has been inserted into JavaScript? We have null value in this language, thus it shouldn't be something like null. In other languages, when we don't know the value of a property or variable, we simply set it to null. Here we can do the same thing.

How we can use this thing in JavaScript?

答:
Sorry for answering an older question but the reason you need both undefined and null is simple: in a prototype-based duck-typing language you absolutely must differentiate between "this object does not define a value for X" and "this object says X is nothing/null/empty".

Without this capability there is no way to walk the prototype chain and so inheritance can't work; you must be able to determine that obj.someProp is undefined so you can look at obj.prototype.someProp, and onward up the chain until you find a value. If obj.someProp returned null there would be no way to know if it really was null or just meant "look at my prototype". The only other way around this is to inject some kludgy magic behind the scenes which breaks your ability to fuzz with the prototype chains and do various other bits of JS black magic.

Like much of Javascript, the idea of undefined and null seems wonky and stupid at first, then absolutely brilliant later (then back to wonky and stupid but with a reasonable explanation).

A language like C# will not compile if you access a property that doesn't exist and other dynamic languages often throw exceptions at runtime when you touch a property that doesn't exist, meaning you have to use special constructs to test for them. Plus classes means when an object is instantiated you already know its inheritance chain and all the properties it has - in JS I can modify a prototype 15 steps up the chain and those changes will appear on existing objects.


问:
CFO's Expectations and Scrum Development
When it comes to financial topics, I'm admittedly not well versed.  I'm trying to lead my organization in our software development effort using a Scrum based development life-cycle.  I am often discouraged when trying to coach executive leadership due to their belief that Scrum and Agile don't play well with their finanacial objectives.  The other day I was challenged to show how my software developers could capitalize %60 of their work hours.

I've found a few articles on the web ( http://itprojectfinancials.com/insights/2011/06/05/capitalizing-software-development-costs-from-sdcl-to-agile/ ), but haven't come up with any great arguments.

I'm looking for advice or examples of organizations that capitalize software costs effectively in an Agile development environment.

This article sums up the issue pretty well, but offers no advise http://blogs.collab.net/agile/2007/12/20/the-scrum-gaap/

答:
After having an interesting twitter conversation with Berry Hawkins ( http://twitter.theinfo.org/162880048838352896#id162964857744932864 ) I think I have my answer.

The problem is that I was still thinking that I needed to have my developers account for their time spent designing software as an expense.

The solution is to look at whether the activity is before of after the product or feature is considered feasible.  Any activity, regardless of whether it's design, development, or test can be capitalized as long as it's past the research stage.

I've written up some new guidelines and have them in to my CFO for review (fingers crossed).  The real test will be the auditors, but I think getting the CFO on board is the first step.  Thanks for all your comments.


答:
The reason why most language designers don't like constructs like starting variables with special chars is that most language designers want to minimize the amount of repetitive "stuff" that is required of the programmer, so long as the compiler / interpreter can figure it out. So, to many language designers, the code:

```<code>var x = new Something()
</code>```

has less cruft than:

```<code>Something x = new Something();
</code>```

("Why repeat the type specification? The compiler can infer it. Why have the semicolon? The compiler can figure it out.")
which in turn has less cruft than:

```<code>Something $x = new Something();
</code>```

("Why make every variable start with a '$'? The compiler knows that the token at that position must be a variable name")

This design aesthetic is something that most language designers would probably agree with in principal, but of course beauty is in the eye of the beholder. The "inferred semicolons" in JavaScript, for instance, can lead to surprising behavior.

Your opinion that there's value in quickly identifying variables by their $ is perfectly valid, but another person might say "Well, the only real semantic benefit is that you can have variables named similarly to keywords ($if) and that's a dubious benefit." In the specific case of refactoring, in languages with tighter type semantics, many refactorings can actually be done in not just a quick, but "guaranteed safe" way, since the refactoring is not being done on "just some string" but on a very specific element in the parse tree.

Title: Why doesn't the DART language use a special character to identify variables?

Body:
I come from a PHP background and I have been considering looking at DART in more detail.

DART is an, open source, front-end/back-end, language for web development.

PHP has a special $ (dollar) character to indicate variables:

```<code>$variable
CONSTANT
'string'
"etc"
</code>```

I find that dollar sign to be really useful for speeding up the proces of refactoring, especially if PHP code is mixed with HTML or content. It reduces the number of false positives when, say, doing a find and replace.

As DART is a completely fresh language (with no legacy) that can be embedded in HTML, it surprised me to see that it does not have any special identifier to indicate variables.

What's the reasoning behind that design decision?

Body:
The reason why most language designers don't like constructs like starting variables with special chars is that most language designers want to minimize the amount of repetitive "stuff" that is required of the programmer, so long as the compiler / interpreter can figure it out. So, to many language designers, the code:

var x = new Something()

has less cruft than:

Something x = new Something();

("Why repeat the type specification? The compiler can infer it. Why have the semicolon? The compiler can figure it out.")
which in turn has less cruft than:

Something $x = new Something();

("Why make every variable start with a '$'? The compiler knows that the token at that position must be a variable name")

This design aesthetic is something that most language designers would probably agree with in principal, but of course beauty is in the eye of the beholder. The "inferred semicolons" in JavaScript, for instance, can lead to surprising behavior.

Your opinion that there's value in quickly identifying variables by their $ is perfectly valid, but another person might say "Well, the only real semantic benefit is that you can have variables named similarly to keywords ($if) and that's a dubious benefit." In the specific case of refactoring, in languages with tighter type semantics, many refactorings can actually be done in not just a quick, but "guaranteed safe" way, since the refactoring is not being done on "just some string" but on a very specific element in the parse tree.


答:
Very few languages use special characters to denote variables.  Perl and PHP are the only ones which are commonly used that do; the value that either derives from it is dubious; nobody complains that Python, for example, is more opaque than PHP.  Note that many languages have solutions which do allow easy substitution of variables in strings, which is the only place where a variable indicator is really useful:

Python

```<code>example = "The capital of {0} is {1}.".format(state, capital)
</code>```

Scala

```<code>val example = "The capital of %s is %s.".format(state, capital)
</code>```

Body:
Very few languages use special characters to denote variables.  Perl and PHP are the only ones which are commonly used that do; the value that either derives from it is dubious; nobody complains that Python, for example, is more opaque than PHP.  Note that many languages have solutions which do allow easy substitution of variables in strings, which is the only place where a variable indicator is really useful:

Python

example = "The capital of {0} is {1}.".format(state, capital)

Scala

val example = "The capital of %s is %s.".format(state, capital)


问:
Does your company have a coding standard?
I recently saw that Microsoft released a coding standards document (All-In-One Code Framework Coding Standards) and it got me thinking...  The company that I work for has no formal coding standards at all.  There are only a few developers and we have been together long enough to have evolved into similar styles and its never been an issue.

Does the company you work for have a documented coding standards?  If no, why not?  Does having a standard make a difference?  Is it worth writing a standard from scratch or should you adopt another standard as your own (ie. make Microsoft's standards yours)?

答:
Unfortunately not. So everyone has its own way to use spacing, indentation, and so on, everything mixed (this way we don't even have to use the "blame" function to know who is the author of a line of code!)

But, even worst, someone writes variable and class names in Italian, someone else in English...

I always adapt my style to that of the language, library and framework I'm using, so that a source code looks uniform and plain.


问:
"As" Naming Convention
I'm experimenting with a naming convention I've devised and am seeking opinion. It involves the use of an "As" infix, and at this point I am envisioning it in the context of JavaScript, C# and C++ coding to assist with clarity of data format/contract when dealing with conversions or multiple representations of the same inherent data or object.

Examples:

```<code>// ex 1. receive and convert user input.
string userInput = "123";
float userInputAsFloat = float.Parse(userInput);
int userInputAsInt = (int)Math.Round(userInputAsFloat);

// ex 2. prepare an object for json transport.
Dictionary<string,object> packet = new Dictionary<string,object>();
string packetAsJson = packet.ToJson();

// ex 3. interface with a component from various angles.
IUnknown foo = MyObjectFactory.CreateFoo();
IVisualizer fooAsVisualizer = (IVisualizer)foo;
ILocator fooAsLocator = (ILocator)foo;
</code>```

Thoughts for/against? Does this convention have a name?

答:
When I have these kind of statements in my code, I usually do nothing more than append a simple i or f or just use the name of the class.

With the common usage of IDEs and, being C#, Intellisense, it doesn't really make sense to add these to your identifiers. It wastes time typing them and makes identifier too long.

Everything should be named in accordance to its context. If it's just a simple local variable, make it obvious but not cumbersome. You want to make a program, not write code for hours.

```<code>string input = "123.4";
float fval = float.Parse(input); // I understand what fval is.
int ival = int.Parse(input);

IUnknown foo = MyObjectFactory.CreateFoo();
IVisualizer visualiser = (IVisualizer)foo;
ILocator locator = (ILocator)foo;

Dictionary<string, object> packets = new Dictionary<string, object>();
string json = packets.ToJSON(); // it's obviously the JSON output of packets since that the only context 'json' could be for.
</code>```

If you have multiple instances, just be a little bit more specific:

```<code>IUnknown srcFoo, destFoo;
IVisualiser srcVisualiser, destVisualiser;
ILocator srcLocator, dstLocator;
</code>```

For objects like arrays:

```<code>string inputString = "1,2,3";
string[] separatedInputs = inputString.Split(',');
List<int> inputs = new List(separatedInputs.Length);
foreach(var input in separatedInputs)
    inputs.Add(int.Parse(input));
</code>```

Title: "As" Naming Convention

Body:
When I have these kind of statements in my code, I usually do nothing more than append a simple i or f or just use the name of the class.

With the common usage of IDEs and, being C#, Intellisense, it doesn't really make sense to add these to your identifiers. It wastes time typing them and makes identifier too long.

Everything should be named in accordance to its context. If it's just a simple local variable, make it obvious but not cumbersome. You want to make a program, not write code for hours.

string input = "123.4";
float fval = float.Parse(input); // I understand what fval is.
int ival = int.Parse(input);

IUnknown foo = MyObjectFactory.CreateFoo();
IVisualizer visualiser = (IVisualizer)foo;
ILocator locator = (ILocator)foo;

Dictionary<string, object> packets = new Dictionary<string, object>();
string json = packets.ToJSON(); // it's obviously the JSON output of packets since that the only context 'json' could be for.

If you have multiple instances, just be a little bit more specific:

IUnknown srcFoo, destFoo;
IVisualiser srcVisualiser, destVisualiser;
ILocator srcLocator, dstLocator;

For objects like arrays:

string inputString = "1,2,3";
string[] separatedInputs = inputString.Split(',');
List<int> inputs = new List(separatedInputs.Length);
foreach(var input in separatedInputs)
    inputs.Add(int.Parse(input));


答:
You're leaving out a lot of information, and as a result I'm going to guess you're not a consulting company; since in that case, in my opinion all hours that all billable are able to be capitalized.

Okay, so honestly, what the CFO wants to hear is a good argument for why a huge percent of the hours are non-R&D hours -- and as far as I'm able to tell ruling number 86 by the FASB is the only rule that matters; though I'd highly recommend reading the real document, and not the summary.

To my knowledge the only hours that would always be categorized as R&D in Scrum are during spikes, all other hours 'might' be considered non-R&D hours in my opinion; meaning Scrum is about only doing what's feasible.

Further, if you read the accounting guidelines, they're not defining feasible by market feasibility, but the belief the effort is feasible after a full iteration of work is done. Well one iteration might easily be claimed to be one sprint, which includes "For purposes of this Statement, the technological feasibility of a computer software product is established when the enterprise has completed all planning, designing, coding, and testing activities that are necessary to establish that the product can be produced to meet its design specifications including functions, features, and technical performance requirements." After that everything is able to be capitalized, unless you believe some part of the project 'can [not] be produced'.

(Lastly, I'm not a CPA, and likely no one else here is either - and even if they were, taking advice of the internet for accounting practices is what it is.  If you're not happy with any of the answers, then honestly I'd suggest the company hire a 3rd party, make them accountable for their opinion, and be done with it.)

Title: CFO's Expectations and Scrum Development

Body:
When it comes to financial topics, I'm admittedly not well versed.  I'm trying to lead my organization in our software development effort using a Scrum based development life-cycle.  I am often discouraged when trying to coach executive leadership due to their belief that Scrum and Agile don't play well with their finanacial objectives.  The other day I was challenged to show how my software developers could capitalize %60 of their work hours.

I've found a few articles on the web ( http://itprojectfinancials.com/insights/2011/06/05/capitalizing-software-development-costs-from-sdcl-to-agile/ ), but haven't come up with any great arguments.

I'm looking for advice or examples of organizations that capitalize software costs effectively in an Agile development environment.

This article sums up the issue pretty well, but offers no advise http://blogs.collab.net/agile/2007/12/20/the-scrum-gaap/