问:
Responsive Design vs. Separate applications/views
I'm involved in a project for a redesign of an existing site. The Designer Team delivered us -the Engineering Team- four separate HTML/CSS prototypes of how the site should look:

On a Desktop Browser.

On a Table Device, a similar but simplified design of the Desktop View

A High-Tech Smartphone, the design is mobile-app like and very different from the Desktop and Tablet designs. Also, less content is shown there.

A Low-End Smartphone, a simplified version of the precedent design but still very similar.

My first impulse was build one HTML/CSS prototype using Responsive Web Design, and merge the prototypes made by the Design Team, but now i'm having some concerns:

Merging disparate prototypes might produce low-quality code.

We might be sending code/files to some mobile devices that they don't need.

We need to handle the situation where -for example- some option must be present in Tablets but must be hidden in Smartphone. Using CSS to hide can be bandwidth waste, so maybe there's a need of some server side code.

Because of that, the idea of building two different Web Applications -or even better, handle two Views in a same web application using some server side Framework like Spring Mobile- was being considered. I am not an expert on Responsive Design, so I wan't to know what's the best approach is this situation or the standard way to tackle this problem.

PS: If it's worth saying, I'm building a Portal using WebSphere Portal as Portlet Container and building the Portlets using Spring Portlet MVC.

答:
I would follow your first impulse and go responsive - I feel that when implemented properly it makes for a better user experience. Use a responsive CSS library and some javascript MVC frameworks/templating libraries to do your heavy lifting on the client side.

Addressing your concerns:

Low Quality Code from Handling Disparate Prototypes

I think using battle tested JS and CSS libraries and best practices should help you here. Think along the lines of backbone, knockout or angular to provide your clientside code with structure.

Sending Unneeded Code Files to Mobile Devices

I don't think this will that big an issue. Build out mobile functionality first and go from there. This will ensure you get the core functionality created and allow you to build out to the bigger devices from there. Use only the bare necessities to keep things light. If you use templating engines you can reduce the amount of HTML you're sending over the wire. Combine and minify JS and CSS files on the server side to minimize what you're sending to the mobile devices.

Wasting CSS when Hiding HTML Elements

Use a templating engine. These can either be built into the clientside MVC frameworks or separate (Mustache, Handlebars). This will prevent you from sending over too much extra HTML. Additionally, you can lazy load certain sections if that floats your boat.

Conclusion

A well thought out Responsive Web Design should be capable of either avoiding or minimizing each of the issues. A lot of work has been done in the open source community to help negate those problems. I would highly suggest searching out those solutions and seeing if they are helpful with your project.

Its your team's decision in the end, but make sure you consider the vast number of libraries and elect for the best user experience your team can support within the non-functional requirements (timeline, cost, staff knowledge) of your project.

Popular Libraries

JS MVC: backbone + templating library (see below), Knockout, Angular, Ember

Templating: Handlerbars, Mustache

CSS: Twitter Bootstrap, Foundations, Skeleton

Minification/Combination Tools: Yahoo YUI, UglifyJS

Miscellaneous JS: underscore, require

These are the examples I hear the most about. I've personally used Knockout and Twitter Bootstrap. I'm looking to play around with backbone and Foundations as well though. There is a lot of research to do in this area and not really enough space in a single answer. I think if you start researching these libraries and tools you should find plenty of information to get you to the right endpoint.


问:
Multiple scrum teams moving to single backlog
We currently have 5 scrum teams that work off their own product backlog for the past year.
Each team works on their own dedicated system but underlying technology is the same .Net.

There has been a lot of discussion on moving to feature based teams working off a single backlog. The reason is one of our main systems has a significant amount of work coming and their is not enough capacity to deliver all the work in the year. The other reason which I believe is the significant one is it gives greater flexibility to adjust to changes in the portfolio rapidly.

A decision been made to change two teams to work on a single backlog but the devs don't have experience on the other systems. One thing we're doing is cross-skilling by moving an experience system developer over to the team.

My question is, have you experienced moving to single backlog for two or more different systems. What were your challenges? What did you need to do to get it to work?

答:
We just recently absorbed another team's backlog. The team only had one member (not much of a team, I know), but there is actual work on their backlog. We're not very familiar with their work, and they're not very familiar with ours.

Even though your backlogs are merged, that doesn't mean everyone has to work on everything right away. It's unreasonable to expect that, so don't worry too much about everyone being able to do everything in both backlogs right away.

Instead, start out having both teams working on exactly what they were working on before; the only difference is everything is in the same backlog.

Then, every iteration/sprint have some of the members from each team work on stories from the other backlog. By not having everyone working on unfamiliar items at the same time, you spread out the cost of learning each others' systems. Over time your team will gradually absorb each others' knowledge.

If you do all the learning up-front, there will be significant performance penalties. Someone in senior management will surely notice, and you'll be forced to absorb another team's backlog in hope that new team can compensate for the poor performance... :) Jokes aside, however, this would be my recommendation.

ContentLicense: CC BY-SA 3.0


答:
We manage about a half dozen projects using a single backlog.  I say "about" because it depends upon how you want differentiate projects.

Loosely, we have five or six product owners, some of whom own more than one product.  We have a reasonably small team with seven devs and a team lead who also codes when he has time.  And we have a few evangelizers who work with our process folk to move ideas into the pipeline.  Of course, several folk wear several hats which muddies things but I'll ignore that for my answer.  Interestingly, we do not have a formal scrum master.

We didn't have to merge backlogs together, but it sounds like a straightforward task on your side.

Keeping things organized can be a real pain, so here are some points you'll want to consider.

Governance is key.  Everyone who has an administrative finger in the pie must communicate with others before making significant changes.  And / or those making changes must be comfortable with their authority to do so (and be prepared to take the heat for a bad change).  Our change makers have strong executive backing and lines are pretty clearly drawn around areas.  But when there's a doubt, we ask before we change.

There can be more overhead involved with backlog grooming, prioritization, and kick-offs.  Prioritization as a ritual suffers the most because it's hard to get all of the owners together on a regular basis.  We use a number of go-betweens to negotiate priority and / or deliver the bad news of not making the priority cut.

A lot of our work is driven by external commitment.  That takes away some of the autonomy out of our decisions, but that's the reality of business.  Your devs need to be aware of that change though.  Feathers can get ruffled if there is a perceived loss of control.  We try not to over-commit though, and we've had to say "no" to some product owners who were sitting on the cusp of making it into the sprint.

We generally use two methods to tag what product a product backlog item belongs to.  We use both simply because it makes grooming and other tasks easier.

We'll preface the PBI title with the product name or shorthand version.

We have a separate field that indicates overall product, and that has to be filled out as well.

We have to put conscious effort into cross-training and making sure that everyone gets a hand in the various areas.  We have a very large code base with respect to our development team.  Some of the code we do is very specialized as well.  Our team lead is awesome in that regard and he'll push our commitment level down a notch so we can afford the inefficiencies that come from cross-training.  Having a strong team lead is critical in this regard.

We do our best to maintain our sprint time frames.  Complex projects with newer team members translates into not uncommon bleed over with commitments.  Process around your branching will really help here.  All of our work is done against a branch that is then merged back to a trunk release.  We also have a build server that runs nightly in addition to ad-hoc triggers.  Devs who break the build know and resolve the issue within 24 hours. Period.  Failure to resolve within 24 hours means your commit is rolled back and the senior devs give them grief.  And the senior devs are hardest on themselves when it comes to maintaining the build.

Code walk-throughs and reviews become even more critical.  It helps keep everyone up to date on what's changing in the various areas.

Likewise, the daily standup involves all the devs plus our UI people.  We're right at the edge of beneficial collaborative communication and inefficiency from too many people.  But we keep the standup to less than 15 minutes and will quickly move on from side discussions.  Usually we're done in 5 to 10 minutes.

I can't speak to the effects on metrics like velocity or overall commitment and burndown rates.  Those aspects just haven't been important enough for us to follow closely.  YMMV, so take that under consideration.  This also presumes that each team has a reasonably similar definition of story point.  If not, that's going to mess up initial estimates after the merge.  It will also generate some problems for historical comparisons since you're not using the same unit of measure as you were before.  Easy way out is to just declare it a "new team" for the metrics and just start gathering data after the merge.

We have seen significant benefit from this approach.  We've had some sprints where all hands are focused on one area and we can knock out a lot of change in a short period of time.  You shouldn't underestimate the value that comes from being able to quickly apply double the normal number of developers on a particular project.  But you have to put in the cross-training ahead of time.  It also means we never have devs with "nothing to do" because of test cycles or grooming or whatever.  We always have a backlog to tackle.

Dedicate time for R&D projects.  Otherwise it's too easy for them to slip through the cracks and you lose the opportunity to invest in those areas.

Really work on ego-less coding and that while you may have experts in an area, you don't have owners of a code area.  Preventing the opportunity for bruised egos is important when different styles are introduced into an area.  So long as the new code meets the team standards and is functional, it should be good.  Just because it's not how the expert would have done it doesn't matter.

Make sure the teams involved are using the same coding conventions and style.  Nothing like inconsistency here to wreak havoc on your attempts at integration.

Keep holding your retrospectives, and hold them as a group.  It's important to get everyone's feedback on what's working, what's not working, and what needs to be tried differently.  This helps drive a sense of camaraderie within the team and gives a sense of ownership around the development process.

Title: Multiple scrum teams moving to single backlog

Body:
We currently have 5 scrum teams that work off their own product backlog for the past year.
Each team works on their own dedicated system but underlying technology is the same .Net.

There has been a lot of discussion on moving to feature based teams working off a single backlog. The reason is one of our main systems has a significant amount of work coming and their is not enough capacity to deliver all the work in the year. The other reason which I believe is the significant one is it gives greater flexibility to adjust to changes in the portfolio rapidly.

A decision been made to change two teams to work on a single backlog but the devs don't have experience on the other systems. One thing we're doing is cross-skilling by moving an experience system developer over to the team.

My question is, have you experienced moving to single backlog for two or more different systems. What were your challenges? What did you need to do to get it to work?


问:
How to practice ATDD if design is not yet emerged from TDD?
Despite being very stakeholders friendly, ATDD aimed to provide a "stop" line when a feature has just been done. This avoids wasting time to add non-focused (and sometimes useless) code.

That's why some teams start by establishing a walking skeleton of the application, and directly specifying with an acceptance test the first required feature.

Let's suppose this first acceptance test (not representing a relevant first acceptance test, just being an example):

Given Michael has just been created in the application,
his status should be left to non-activated.

I want to write my acceptances tests focusing on business logic directly (use-cases), not dealing with GUI for business rules.

Thus my question would be...how to write it? since I don't even already know what is a "User", what is a status etc...
Indeed, shouldn't it be the role of TDD to emerge the design and therefore these components?

But if I firstly practice TDD in order to emerge them, the benefit of ATDD (as a stop line) would disappear.

I imagine that it would be more consistent to write some acceptance tests (before entering TDD cycle) when the project has well progressed, since all main components would already be designed.

To sum up, should I always write my acceptances test BEFORE my TDD cycle?

答:
...shouldn't it be the role of TDD to emerge the design and therefore these components?

No.

This is a common misconception about TDD. The purpose of TDD is not to "grow a design."  The purpose of TDD is to insure that a program stays "well-designed."  TDD will force you to create an API that's testable, and specific functional requirements will emerge from that.  But it will not create your design for you. You have to do that yourself.

ATDD will help you design your program by providing concrete, testable customer requirements. It is an eminently practical approach: by stating the acceptance test requirements up front, the customer has told you exactly what your program must do in order to declare success.

See Also

Jim Coplien and Bob Martin Debate TDD

Return of Uncle Bob (page 3)


问:
Strategy for keeping secret info such as API keys out of source control?
I'm working on a website that will allow users to log in using OAuth credentials from the likes of Twitter, Google, etc.  To do this, I have to register with these various providers and get a super-secret API key that I have to protect with pledges against various body parts.  If my key gets ganked, the part gets yanked.

The API key has to travel with my source, as it is used at runtime to perform authentication requests.  In my case, the key must exist within the application in a configuration file or within the code itself.  That isn't a problem when I build and publish from a single machine.  However, when we throw source control into the mix, things get more complicated.

As I'm a cheap bastard, I'd much prefer to use free source control services such as TFS in the cloud or GitHub.  This leaves me with a slight conundrum:

How can I keep my body intact when my API keys are in my code, and my code is available in a public repository?

I can think of a number of ways to handle this, but none of them are that satisfying.

I could remove all private info from code, and edit it back in after deployment.  This would be a severe pain to implement (I won't detail the many ways), and isn't an option.

I could encrypt it.  But as I have to decrypt it, anyone with the source could figure out how to do so.  Pointless.

I could pay for private source control.  LOL j/k spend money?  Please.

I could use language features to segregate sensitive info from the rest of my source and therefore keep it from source control.  This is what I'm doing now, but it could easily be screwed up by mistakenly checking in the secret file.

I'm really looking for a guaranteed way to ensure I don't share my privates with the world (except on snapchat) that will work smoothly through development, debugging and deployment and be foolproof as well.  This is completely unrealistic.  So what realistically can I do?

Technical details:  VS2012, C# 4.5, source control is either going to be TF service or GitHub.  Currently using a partial class to split the sensitive keys off in a separate .cs file that won't be added to source control.  I think GitHub may have the advantage as .gitignore could be used to ensure that partial class file isn't checked in, but I've screwed that up before.  Am hoping for a "oh, common issue, this is how you do it" but I may have to settle for "that doesn't suck as much as it could have", :/

答:
Use environment variables for secret things that change for each server.

http://en.wikipedia.org/wiki/Environment_variable

How to use them is language dependent.


问:
Difference between trigger, handler and callback
It's current to see the terms callback, trigger and handler in some API documentations. It is just synonymous or each term correspond to a specific concept?

I used to think that this terms are just synonymous, but I must be wrong ...

Thanks !

答:
These are general terms in programming. Often can mean different things but generally speaking...

callback is a reference to a function or block of code that is executed by a third party.

trigger is a behavior in response to stimuli, and an event may trigger the change of state or as the result of that trigger execute the associated callback.

handler is a reference to an object or class that is associated with a behavior. A handler is different from a callback because it's an object that represents a state.

Using jQuery AJAX as an example.

```<code>$.ajax({
   url: "test.html",
   context: document.body
}).done(function() {
   $(this).addClass("done");
});
</code>```

The function() is a callback.

The object passed to $.ajax(...) is a handler.

The event done() is a trigger.

The handler has an event done that when triggered calls the callback to perform $(this).addClass("done");.

Body:
These are general terms in programming. Often can mean different things but generally speaking...

callback is a reference to a function or block of code that is executed by a third party.

trigger is a behavior in response to stimuli, and an event may trigger the change of state or as the result of that trigger execute the associated callback.

handler is a reference to an object or class that is associated with a behavior. A handler is different from a callback because it's an object that represents a state.

Using jQuery AJAX as an example.

$.ajax({
   url: "test.html",
   context: document.body
}).done(function() {
   $(this).addClass("done");
});

The function() is a callback.

The object passed to $.ajax(...) is a handler.

The event done() is a trigger.

The handler has an event done that when triggered calls the callback to perform $(this).addClass("done");.


答:
You're not suppose to distribute that key with your application or store it in the source code repository. This question is asking how to do that, and that isn't what is normally done.

Mobile Web Application

For Android/iPhone the device should request the KEY from your own web service when the app is first run. The key is then stored in a safe location. Should the key be changed or revoked by the publisher. Your web service can publish a new key.

Hosted Web Application

Customers using a license of your software will have to manually input the key when first configuring the software. You can give everyone the same key, different keys or they get their own.

Published Source Code

You store your source code in a public repository but not the KEY. In the configuration of the file you add the lines *place key here*. When a developer uses your source code they make a copy of the sample.cfg file and add their own key.

You do not keep yourconfig.cfg file used for development or production in the repository.

Title: Strategy for keeping secret info such as API keys out of source control?

Body:
I'm working on a website that will allow users to log in using OAuth credentials from the likes of Twitter, Google, etc.  To do this, I have to register with these various providers and get a super-secret API key that I have to protect with pledges against various body parts.  If my key gets ganked, the part gets yanked.

The API key has to travel with my source, as it is used at runtime to perform authentication requests.  In my case, the key must exist within the application in a configuration file or within the code itself.  That isn't a problem when I build and publish from a single machine.  However, when we throw source control into the mix, things get more complicated.

As I'm a cheap bastard, I'd much prefer to use free source control services such as TFS in the cloud or GitHub.  This leaves me with a slight conundrum:

How can I keep my body intact when my API keys are in my code, and my code is available in a public repository?

I can think of a number of ways to handle this, but none of them are that satisfying.

I could remove all private info from code, and edit it back in after deployment.  This would be a severe pain to implement (I won't detail the many ways), and isn't an option.

I could encrypt it.  But as I have to decrypt it, anyone with the source could figure out how to do so.  Pointless.

I could pay for private source control.  LOL j/k spend money?  Please.

I could use language features to segregate sensitive info from the rest of my source and therefore keep it from source control.  This is what I'm doing now, but it could easily be screwed up by mistakenly checking in the secret file.

I'm really looking for a guaranteed way to ensure I don't share my privates with the world (except on snapchat) that will work smoothly through development, debugging and deployment and be foolproof as well.  This is completely unrealistic.  So what realistically can I do?

Technical details:  VS2012, C# 4.5, source control is either going to be TF service or GitHub.  Currently using a partial class to split the sensitive keys off in a separate .cs file that won't be added to source control.  I think GitHub may have the advantage as .gitignore could be used to ensure that partial class file isn't checked in, but I've screwed that up before.  Am hoping for a "oh, common issue, this is how you do it" but I may have to settle for "that doesn't suck as much as it could have", :/


问:
Should I encrypt files saved by my program
I'm trying to decide on what format I should save data in, and hopefully this question will help me come to a decision. The program I'm writing uses 'databases' in which word=meaning (not a dictionary, that was just an example). I don't really want people to be able to manually edit these 'databases' without my program easily, but at the same time I'm looking for interoperability between programming langauges (namely C#, PHP, Java and Objective C)

At the minute, the main contenders are SQLite, XML and SQL Server CE (although PHP doesn't have support for Server CE, but that doesn't have to be too much of an issue). Really, my question is, should I use encryption because I have read that it is often just as easy to decrypt? And if you support encryption, how do you deal with the encryption key - do I just generate a long, complicated string?

Or is binary enough? Nothing in the database is too critical, however I would like to have an isEditable 'key' so my program knows whether to allow edits or not. And I'd also like to use my own file extension.

答:
I'd say no, you should not encode them for multiple reasons

Having them more open is less work for you. Does your business need to spend the extra work hiding it?

Having it encrypted creates lock-in. Lock-in is not a selling feature

If your app decrypts it, that means that the encryption can be cracked by examining your app, so you've just done work for little gain - as soon as one person cracks it, anyone can repeat it.

Having it open empowers your users to do things with the data you did not foresee and did not add to your app - this means that you've given them extra utility.

Open data will make future partnerships easier because a partner will not need to write handing logic.

Open data does not mean that competing tools using that data will magically appear - competitors still need to write their own software, which is likely not as good a proposition as just using yours - how much effort will someone want to go to just to NOT use your software?

This is by no means a complete list, just what's off the top of my head.


问:
When being a technical genius is not enough to be a successful developer?
There has been a lot of discussion around the excellent question "Will high reputation in Stack Overflow help to get a good job?". I immediately agreed with JoshK that basically said "No" (I'll will explain why), but Joel chimed in with lot of convincing facts which made me upvote him as well.

My question is what other skills (other than being a technical genius) do you require from a developer? To get the job, or to keep it.

I believe being a genius is far from being enough. I have met many technical geniuses in various companies I have worked for that impressed me a lot, but sadly in lot of cases, they were simply fired after a few months or put in ivory towers (mainly because of internal mutiny from other developers). I've seen many in personal distress as a result of this which I understand.

That's why I'm a big fan of non-technical questions for technical positions. I like to know how the candidate will interact with others (including non-technical employees), how much consideration he will have for the business, if he will work for the desired outcome, and so on.

I would like to know what you require from your developers and WHY it's important (after all, you hire someone to write code, don't you? Why would you want him to be assertive?). Ideally, I'd like you to come up with an example question you would ask during interviews in support of your answer.

答:
1) Communication is probably the most important skill for anyone, including software engineering types to have.  Those communication skills are equally important for dealing with managers and clients as they are for dealing with coworkers.

2) Teamwork is a slightly different skill that depends heavily on the first.  Essentially, I need to determine if the person I'm trying to hire will benefit the team as a whole, or will there be some personality conflicts that I'm potentially hiring.  No one can predict the future, but you can't ignore warning signs in the interview either.

One tactic that I use in the interview process is to ask the person to describe one of the more challenging technical problems (that they can talk about) and how they solved them.  As they talk through their reasoning process and how they uncovered the problem you can get a better idea about how well they can communicate about potentially complicated things.  If they seek some additional help in the process, I see that as a plus.  None of us are perfect technologists.  If the problem they chose ended up being a personality clash (which has only happened once), you can either pass or probe a bit deeper.

In many ways the interview process is like going on a blind date.  Both people are putting on their best face, trying to figure out if they want to spend any more time with the other party.  The more you can get the interview to flow like a conversation, the more relaxed the interviewee will be; and consequently the better you'll see if they are a good fit.

ContentLicense: CC BY-SA 2.5


答:
One really important fact that people always overlook about encryption is that it does absolutely nothing to ensure the integrity of your data. Encryption solves the problem of confidentiality; it prevents unauthorized users from reading the data. Encryption will make it harder for someone to modify the data in a useful way, but it isn't solving the right problem.

If you're worried about other programs changing your data, what you actually need is a trusted fingerprint of your data. A common way to do this is to generate a hash of the database when your program modifies it and then sign that hash with a private key. When you load the database, compute the hash, compare it to the signed hash, and verify that the signature is valid.

Now that the matter of theory is out of the way, it is worth noting that, in practice, encrypting your data might well be good enough for this kind of thing. Any blind modifications to encrypted structured data will likely corrupt the database, so that will prevent users from modifying the database using anything other than your application. If you also want to make sure no one else can read your data (it wasn't clear in the question), then you're probably safe to leave it at encryption and be done with it.

Title: Should I encrypt files saved by my program

Body:
I'm trying to decide on what format I should save data in, and hopefully this question will help me come to a decision. The program I'm writing uses 'databases' in which word=meaning (not a dictionary, that was just an example). I don't really want people to be able to manually edit these 'databases' without my program easily, but at the same time I'm looking for interoperability between programming langauges (namely C#, PHP, Java and Objective C)

At the minute, the main contenders are SQLite, XML and SQL Server CE (although PHP doesn't have support for Server CE, but that doesn't have to be too much of an issue). Really, my question is, should I use encryption because I have read that it is often just as easy to decrypt? And if you support encryption, how do you deal with the encryption key - do I just generate a long, complicated string?

Or is binary enough? Nothing in the database is too critical, however I would like to have an isEditable 'key' so my program knows whether to allow edits or not. And I'd also like to use my own file extension.


问:
How Client Side Programming Works
I'm not coming from web-development at all, but am looking to build a web application.

So far, I've looked into all the server-side stuff (for example, I think my stack will be Linux + node.js + ExpressJS + MongoDB), and have learnt a lot! At this point, I'm comfortable setting up an HTTP server, routing requests, using RESTfull interaction with a database, and serving dynamic HTML using an HTML template engine like ejs or Jade. I even looked into Websockets as a means for establishing a TCP connection to add fast user interaction without page refreshing.

Now I'm looking to do pretty stuff; add graphs, tabs, ect to my web-applications! I've looked into things like Dojo, JQuery, CanvasJS, AngularJS ect, and all them seem cool. Problem is, now that I think of it, I have no idea how client-side programming works. For example, in AngularJS I may find something like:

```<code>   <head>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
    <script src="components.js"></script>
  </head>
</code>```

What is this saying? Does my server actually replace "components.js" with the actual "componennts.js" code before transmitting the response? What's going on with the https://ajax... source? Does the browser, (or the server?) actually have to go to this url, and retrieve code?

As I said, as far as I'm concerned, the server responds with an HTML document composed of ASCII characters. What then, is actually running on the client side, and how does it get this code? (i.e. on V8 or whatever).

答:
When a client makes a request to your Web Server requesting a resource -for example, the main Page- your server returns that resource. In case that resource is an HTML file, it is possible -and common- that to show your site you also require additional resources -images, CSS stylesheets, JS files- so the Browser can render your page correctly. That assets can be on the same web server that host your application or can be hosted somewhere else.

With this line of code:

```<code> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
</code>```

Your HTML file is saying that it requires the file angular.min.js, and that file is locate in the https://ajax.googleapis.com servers. On the other side, this line of code:

```<code> <script src="components.js"></script>
</code>```

States that your site requires the components.js, and that file is located within your Web Server (for example, in http://www.mysite.com/components.js). So, when a user access to your site his Browser will load some files from your Web Server and some other from external repositories. Every file will be downloaded and stored in the Client's PC to load your site.

Title: How Client Side Programming Works

Body:
When a client makes a request to your Web Server requesting a resource -for example, the main Page- your server returns that resource. In case that resource is an HTML file, it is possible -and common- that to show your site you also require additional resources -images, CSS stylesheets, JS files- so the Browser can render your page correctly. That assets can be on the same web server that host your application or can be hosted somewhere else.

With this line of code:

 <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>

Your HTML file is saying that it requires the file angular.min.js, and that file is locate in the https://ajax.googleapis.com servers. On the other side, this line of code:

 <script src="components.js"></script>

States that your site requires the components.js, and that file is located within your Web Server (for example, in http://www.mysite.com/components.js). So, when a user access to your site his Browser will load some files from your Web Server and some other from external repositories. Every file will be downloaded and stored in the Client's PC to load your site.


答:
Instead of having the OAuth key stored as raw data anywhere, why not run the string through some encryption algorithm, and store it as a salted hash? Then use a configuration file to restore it at runtime. That way the key isn't stored anywhere, whether it is stored on a development box, or the server itself.

You could even create an API such that your server automatically generates a new salted and hashed API key on a per request basis, that way not even your team can see the OAuth source.

Edit: Perhaps try the Stanford Javascript Crypto Library, it allows for some pretty secure symmetric encryption/decryption.


问:
When is it appropriate to start using the next revision of a tool when dogfooding?
Specifically, I am working on a tool that integrates a DVCS and build system, but I image the challenge I am facing would arise for anyone developing a "meta" tool (compiler, VCS, build system, test runner, etc.) that they wish to develop through "dogfooding".

My question is: in a scrum-style release process using the branching workflow, at what point do I start using a newer version of the tool in the development cycle of the tool?

I'm looking for a process to create balance between:

constantly use the develop version of the tool:  I find I am breaking my own development as changes get incorporated.

constantly use the master version of the tool: any issues I uncover through dogfooding are issues that have already been released.

答:
If this tool is being used to produce production-quality software (especially if it is being used recursively, i.e. to develop itself), I would increase your up-front testing efforts, and wait on dogfooding until the release is stable enough that you are fairly confident you won't be breaking production code by using it.

If you have to wait for the master version to have that level of confidence, then so be it.


答:
The first thing to do is have very thorough automated offline regression tests.  Make passing those tests a minimum requirement for what you officially use.

Second, you need a dead simple way to fall back to the previous working version, for problems that your automated tests don't catch.

For example, my Linux kernel was custom patched for a while.  I would patch and compile my kernel on the same computer I intended to use it on, which meant I could lose my development environment if I created a faulty kernel.  So I made sure to always keep a known good kernel in my GRUB menu, so if I made a mistake, I was back to a good development environment with a simple reboot.

Coordinating that with a team is tricky, but I suppose it's mostly a matter of allowing anyone to initiate a fallback and communicate the reasons.  In version control, one way to designate that would be with something like a last_known_good branch, somewhere between develop and master in your workflow.  Nothing gets pushed there until you have successfully dogfooded a build.

Title: When is it appropriate to start using the next revision of a tool when dogfooding?

Body:
Specifically, I am working on a tool that integrates a DVCS and build system, but I image the challenge I am facing would arise for anyone developing a "meta" tool (compiler, VCS, build system, test runner, etc.) that they wish to develop through "dogfooding".

My question is: in a scrum-style release process using the branching workflow, at what point do I start using a newer version of the tool in the development cycle of the tool?

I'm looking for a process to create balance between:

constantly use the develop version of the tool:  I find I am breaking my own development as changes get incorporated.

constantly use the master version of the tool: any issues I uncover through dogfooding are issues that have already been released.


问:
What roadblocks face the development process in using plain-text markup languages as opposed to, e.g., Microsoft Word?
I'm currently an intern at a government contractor and am getting the (obnoxiously unavoidable) feeling that Word is the de-facto standard in the software development process.

Its binary format makes it very difficult to collaborate on documents in the way I am used to collaborating on a code base.  The use of plain text markup (with such languages as LaTeX, Markdown, ReStructured Text, etc.) allows for a diff-friendly document that works well with the normal workflow of a developer.  As for comments where the language doesn't support them (eg Markdown), there are many existing solutions that allow collaborative comments on code bases (eg GitHub, Bitbucket) that could easily be applied to other plain-text files containing markup.

I understand the need to cooperate with technologically illiterate management necessitates some sort of graphical interface to everything, but such interfaces exist for most of these formats.  For example, LaTeX has a 'fork' of sorts called LyX that puts a graphical front-end to a plain-text, LaTeX-like syntax.  This file, even though primarily graphical in its editing, is still diff-friendly.  (It even also has Word-style comments.) Many of these solutions could yet be used instead of Word, and the vast majority are free or open-source.

However, we use Word even for our own internal documentation that nobody else sees.  We work with text for a significant chunk of our career---why is documentation so special?  Aside from the trivial "We didn't know any better and now we're stuck here", there must be reasons supporting such a decision.  What challenges face the software development process in using plain-text documentation in lieu of other, more colloquial (and debatably less powerful) means of writing documents?

Since the reasons will differ, perhaps answering for these two closely related scenarios separately should be in order.

Using plain-text documentation from the start

Migrating to plain-text documentation over time

答:
Personally I think it's an issue of education.

Most people have been tricked into thinking that using a tool like MS Word makes it easier to produce quality documents, but from what I've seen it actually makes it harder. You end up having to debug formatting endlessly and fight your tools to get the result you want.

Tools like Scrivener allow you to get a bit closer to the reality of the document without having to fight it like you do with Word. Partly because of the realisation the WYSIWYG doesn't actually work very well.

In my own organisation the more people I move to using MarkDown for most of their document needs the more people are happier and more productive.


答:
Do you want to limit tampering or limit the view of the data?  The potential solution for each would require slightly different implementations.

Tampering you would use hashes.  As a real world example, one application I worked on we would compute the hashes of strings and/or files.  When users downloaded the file, we checked the hash.  When user opened the file, we checked the hash.  This is because our client didn't want end users tampering with the files (jpg, etc.)  This prevented users from tampering with the file, because if they did, the hashes didn't match and they got an error.  Any file/string can be hashed, and if your don't want user tampering with strings or files without issue, store a hash of that data along with the string/file.  Passwords do not need to be encrypted, the solution would be to salt the password and then hash it.  Then the data store and application has no knowledge of user passwords.

Encryption would be used to hide information such as credit card and/or personal data.  Legal and regulatory requirements should define what needs to be encrypted.  If the application is storing sensitive data, then one fo the ways to prevent access is via encryption.  You can also limit access by defining ACLs etc.  but if you only want your user(s) to view the data, then encryption is your best option.

Also, only implement if required.  Going back to the example above, originally we did have any tamper resistence in the application.  Users downloaded files and opened and viewed locally.  Only after we had a requirement from a customer that users couldn't tamper with files then we implemented a hashing check.  When in design we considered two options, limiting access on the file system to the files that were downloaded, or using a hash.  We choose a hash because we were already calculating it on upload so it was relatively easy to add a check before the user could view it.


问:
Why do old C-style method names continue being used in modern languages?
I understand that in the earlier days of computing, shorter method names like printf made sense, because storage was limited. But why do modern languages like Python and Go still use the less readable names from the C APIs? Why don't they switch to a more readable form like print_format, the same goes for other names. I wouldn't mind having to write make_directory instead of mkdir in go.

People have suggested that this question has been asked before, but the questions I've found are about whether abbreviated names are bad practice. This question assumes that the answer to this question is usually yes.

答:
But why do modern languages like python and go still use the less readable names from the C apis?

Because everyone (in their domain) knows the short names. If you made different names, people would question "what makes this different from mkdir?" and generally get confused that stuff isn't where they expect it.

Because without auto-complete in an IDE, long names with generally difficult to type characters like _ annoy skilled programmers. Annoyed programmers limit the adoption of a language, meaning designers don't make the names or you never hear about the languages that used them since they never took off.

These are both kinda flimsy arguments of course.

Readable code is known to be better than writable code these days. And having an IDE with auto-complete handles option 2, though there are still people who argue against IDE's as bloat, or a crutch that hinder programmers' abilities. Having an IDE with intellisense (or the equivalent) helps a bunch with #1 as well, though that has the same arguments and works less well in a non-object oriented environment.

Still, these flimsy arguments (and the vagaries of human taste) are enough momentum to keep the trend going.


答:
As I understand your question, you don't really care if someone modifies or looks at your database, it's just you'd rather they didn't.

Daenyth makes a good argument why you shouldn't do that but if you decide to go with it anyway, consider a few things:

Crypto is hard to get right

Even if you do encrypt your data with AES or what have you, the value of the data doesn't really call for encryption/protection. It may also make it harder to read the data in the future in a different language or even with a different library.

You are better off with obfuscation

which means a simple Base64 will do. Of course that will do nothing to verify the integrity of the data as Dan noted but implementing signatures is still too costly. As an alternative, you might add padding to your file to conform with a set of fixed checksums (for some checksum function). Much lighter than signatures but still quite expensive.

If in the future you need to have a trusted connection to a remote database, ask again when you implement it.

As for SQLite vs XML there is a question on StackOverflow on the same topic. Although closed it has some excellent answers.

Edit: If you are using Java you might want to consider zipping the file. You get both an illegible binary blob and a checksum. I'm sure C# also has a version of this but I'm not familiar with that language.


问:
How to tackle a 'branched' arrow head anti-pattern?
I recently read this question that features, the arrow anti-pattern.

I have something similar in code I'm trying to refactor except that it branches. It looks a little something like this:

```<code>if(fooSuccess==true&&barSuccess!=true){
    if(mooSuccess==true){
           .....
    }else if (mooSuccess!=true){
           .....
    }
}else if(fooSuccess!=true&&barSuccess==true){
    if(mooSuccess==true){
           .....
    }else if (mooSuccess!=true){
        if(cowSuccess==true){
                    .....
        }else if (cowSuccess!=true){
                    .....
        }
    }
}
......
</code>```

In short it looks like this

```<code>if
   if
     if
       if
         do something
       endif
    else if
     if
       if
         do something
        endif
    endif
    else if
     if
       if
         do something
        endif
    endif
 endif
</code>```

Outline borrowed from Coding Horror article on the subject

And the code goes on through different permutations of true and false for various flags. These flags are set somewhere 'up' in the code elsewhere, either by user input or by the result of some method.

How can I make this kind of code more readable? My intention is that eventually I will have a Bean-type object that contains all the choices the previous programmer tried to capture with this branching anti-pattern. For instance, if in the outline of the code above we really do only have three, I have an enum set inside that bean:

```<code>enum ProgramRouteEnum{
    OPTION_ONE,OPTION_TWO,OPTION_THREE;

    boolean choice;
    void setChoice(boolean myChoice){
        choice = myChoice;
    }
    boolean getChoice(){
        return choice;
    }
}
</code>```

Is this an acceptable cure? Or is there a better one?

答:
user61852 has a pretty good answer solving the general problem of simplifying nested conditionals.  However, I was intrigued with your proposed state machine-like solution, and wanted to illustrate how that can sometimes be preferable to a set of binary flags.

It all depends on the sequence of obtaining the flags' values and how many combinations are valid.  If you have n flags, you have 2n states.  For 4 flags, that's 16 states, and as you observed, only 3 of them may have any useful meaning.  In situations like that, using a state variable instead can simplify things greatly.

Let's say you have a lock that will open if 4 keys are pressed in the right order.  If you press any key incorrectly, it immediately resets back to the start of the sequence.  A very naïve way to implement a keypress handler using binary flags is:

```<code>void key_pressed(char key)
{
   if (!key1correct)
   {
      if (key == pin[0])
      {
         key1correct = true;
      }
   }
   else if (!key2correct)
   {
       if (key == pin[1])
       {
           key2correct = true;
       }
       else
       {
           key1correct = false;
       }
   }
   else if (!key3correct)
   {
       if (key == pin[2])
       {
           key3correct = true;
       }
       else
       {
           key1correct = false;
           key2correct = false;
       }
   }
   else
   {
       if (key == pin[3])
       {
           key4correct = true;
       }
       else
       {
           key1correct = false;
           key2correct = false;
           key3correct = false;
       }
   }

   if (key1correct && key2correct && key3correct && key4correct)
   {
       open_lock();
       key1correct = false;
       key2correct = false;
       key3correct = false;
       key4correct = false;
   }
}
</code>```

A simplified, flattened version using binary flags (like user61852's answer) looks like this:

```<code>void key_pressed(char key)
{
    if (!key1correct && key == pin[0])
    {
        key1correct = true;
        return;
    }

    if (key1correct && !key2correct && key == pin[1])
    {
        key2correct = true;
        return;
    }

    if (key1correct && key2correct && !key3correct && key == pin[2])
    {
        key3correct = true;
        return;
    }

    if (key1correct && key2correct && key3correct && key == pin[3])
    {
        open_lock();
        key1correct = false;
        key2correct = false;
        key3correct = false;
        return;
    }

    key1correct = false;
    key2correct = false;
    key3correct = false;
}
</code>```

That's a lot easier to read, but still in both of these solutions you have states like key2correct && !key1correct that are completely invalid and unused.  Whereas using a state variable num_correct_keys instead of the binary flags looks like this:

```<code>void key_pressed(char key)
{
    if (key == pin[num_correct_keys])
        ++num_correct_keys;
    else
        num_correct_keys = 0;

    if (num_correct_keys == 4)
    {
        open_lock();
        num_correct_keys = 0;
    }
}
</code>```

Granted, this is a contrived example, but people often write code like the first version in less obvious situations, sometimes spread across multiple files.  Using a state variable often greatly simplifies code, especially when the flags represent a sequence of events.

Body:
user61852 has a pretty good answer solving the general problem of simplifying nested conditionals.  However, I was intrigued with your proposed state machine-like solution, and wanted to illustrate how that can sometimes be preferable to a set of binary flags.

It all depends on the sequence of obtaining the flags' values and how many combinations are valid.  If you have n flags, you have 2n states.  For 4 flags, that's 16 states, and as you observed, only 3 of them may have any useful meaning.  In situations like that, using a state variable instead can simplify things greatly.

Let's say you have a lock that will open if 4 keys are pressed in the right order.  If you press any key incorrectly, it immediately resets back to the start of the sequence.  A very naïve way to implement a keypress handler using binary flags is:

void key_pressed(char key)
{
   if (!key1correct)
   {
      if (key == pin[0])
      {
         key1correct = true;
      }
   }
   else if (!key2correct)
   {
       if (key == pin[1])
       {
           key2correct = true;
       }
       else
       {
           key1correct = false;
       }
   }
   else if (!key3correct)
   {
       if (key == pin[2])
       {
           key3correct = true;
       }
       else
       {
           key1correct = false;
           key2correct = false;
       }
   }
   else
   {
       if (key == pin[3])
       {
           key4correct = true;
       }
       else
       {
           key1correct = false;
           key2correct = false;
           key3correct = false;
       }
   }

   if (key1correct && key2correct && key3correct && key4correct)
   {
       open_lock();
       key1correct = false;
       key2correct = false;
       key3correct = false;
       key4correct = false;
   }
}

A simplified, flattened version using binary flags (like user61852's answer) looks like this:

void key_pressed(char key)
{
    if (!key1correct && key == pin[0])
    {
        key1correct = true;
        return;
    }

    if (key1correct && !key2correct && key == pin[1])
    {
        key2correct = true;
        return;
    }

    if (key1correct && key2correct && !key3correct && key == pin[2])
    {
        key3correct = true;
        return;
    }

    if (key1correct && key2correct && key3correct && key == pin[3])
    {
        open_lock();
        key1correct = false;
        key2correct = false;
        key3correct = false;
        return;
    }

    key1correct = false;
    key2correct = false;
    key3correct = false;
}

That's a lot easier to read, but still in both of these solutions you have states like key2correct && !key1correct that are completely invalid and unused.  Whereas using a state variable num_correct_keys instead of the binary flags looks like this:

void key_pressed(char key)
{
    if (key == pin[num_correct_keys])
        ++num_correct_keys;
    else
        num_correct_keys = 0;

    if (num_correct_keys == 4)
    {
        open_lock();
        num_correct_keys = 0;
    }
}

Granted, this is a contrived example, but people often write code like the first version in less obvious situations, sometimes spread across multiple files.  Using a state variable often greatly simplifies code, especially when the flags represent a sequence of events.


答:
It's simple.  Using the traditional names is convenient for millions of experienced programmers.  We know what "mkdir" and "printf" mean.  It is slightly inconvenient for novices, but they soon get over it.

Similarly, most (all?) LISP dialects continue to use "car" and "cdr" instead of "head" and "tail".

Title: Why do old C-style method names continue being used in modern languages?

Body:
I understand that in the earlier days of computing, shorter method names like printf made sense, because storage was limited. But why do modern languages like Python and Go still use the less readable names from the C APIs? Why don't they switch to a more readable form like print_format, the same goes for other names. I wouldn't mind having to write make_directory instead of mkdir in go.

People have suggested that this question has been asked before, but the questions I've found are about whether abbreviated names are bad practice. This question assumes that the answer to this question is usually yes.


问:
Where should I handle fatal exceptions
Suppose I have a controller that loads a file and hands it over to the processing.

Should I handle the exception in the file loader and return Null if something is wrong, or should I throw the exception and handle it in the controller?

Without the file the rest of the program can´t work. Where should I handle a exception that shuts down the program properly?

I want to shut down an Android application properly.

答:
Exceptions should go up until they reach the layer where you need to take care of them (i.e. catch them and act accordingly).

In your example, it seems you need to load a file; if the file is not found or is corrupt, you want to close the application. In this case, it seems that you should catch the exception at the outermost layer (loader -> controller -> ... -> entry point -- catch here), present an error message to the user, and quit. Catching the exception anywhere else will only make your code more convoluted and difficult.

This makes sense if the file is not something that depends on the user and the user cannot do anything to fix the file if it is wrong or missing.

On the other hand, if the file is one that is chosen by the user (or can be), you should show an error message to the user, and then give the opportunity of finding the right file instead of quitting.

Title: Where should I handle fatal exceptions


答:
As others have already said, a lot of these keywords have well established meanings and make it very easy to pickup a new language etc. They are usually shorthand for existing words by omitting some letters (mostly vowels), its not like someone mashed random letters and decided, 'eokjgv' is going to be my function for make_directory.

Shorter names do have actual benefits beyond not having to rely on auto complete:

Can fit more context into fewer lines or a single screen

No confusion of trying to reconcile strict computer science meaning with the common language meaning

Faster disambiguation: if you want to distinguish between print_formatted_string, print_formatted_string_from_file, print_string_with_line it will take far longer than printf, sprintf, println.

Of course, inertia and culture are also massive factors - in common languages, your question is similar to asking: Why don't people switch to Esperanto instead of English with its confusing grammar and huge vocabulary?

You can see verbose programs by reading pseudocode : create pseudocode for some small method and see how much volume is added to it, and remember that human short term memory is also a finite quantity.


问:
How can I work on multiple programming languages at same time
It always happen to me that if I leave the stuff for 1-2 months I forget the stuff.

5 months back I had symfony project and I did that. At that time I was very much confident that I can do any project in symfony2.

Then we got one Python project in django and I worked full time on that for few months.

But now when I had to fix the error in symfony2, I completely forgot the structure and I keep mixing python stuff with php symfony.

I want to know that how people work with different languages at same time.

Should I need to keep studying all languages at same time so that I don't forget?

I am confused what should I do. Or whenever I do some project then I keep notes of each and every step so that I can follow that later on how I did it?

答:
If you forget after only 1-2 months, you didn't really know it.

As a programmer progresses, you start learning less about syntax, and more about concepts. Even if you switch languages, you're often using the same sort of concepts. Since you're constantly using the concepts, they're harder to forget. Since the syntax is less important, it becomes easier to pick up new syntaxes and far easier to remember syntaxes you once knew.


答:
To do anything useful, all languages need to interact with operating systems but not all languages make calls to OS directly because there's no API defined for these languages. POSIX, for example, only defines API with binding to C and Ada.

A very important part of OS is the C library (libc), which implements the OS' API, at least
after POSIX was defined. POSIX was basically defined based on existing libcs implementations.

If there's no language specific API for a language, then it has to use functions available in libc. It is up to the language designer then to either rename or reuse libc function names and export that as libraries.

I think languages that run on virtual machine (vm as in jvm) shouldn't have the same problem (if it's really a problem).


答:
As others have said, it's mainly because these are frequently just wrappers around the C calls.  And there is a huge benefit in that being the case (including the short name), basically programmers new to the language know what to expect from it -- what arguments it takes, what side effects it might have, how error conditions are handled.

If I see:

printf ("Width trick: %*d \n", 5, 10)

I know that (a) this is a right justified, and (b) that it can take up to 5 spaces.  If I see:

```<code>printf_formatted_string("Width trick: %*d \n", 5, 10)
</code>```

I have no idea what it means, without looking it up.

Body:
As others have said, it's mainly because these are frequently just wrappers around the C calls.  And there is a huge benefit in that being the case (including the short name), basically programmers new to the language know what to expect from it -- what arguments it takes, what side effects it might have, how error conditions are handled.

If I see:

printf ("Width trick: %*d \n", 5, 10)

I know that (a) this is a right justified, and (b) that it can take up to 5 spaces.  If I see:

printf_formatted_string("Width trick: %*d \n", 5, 10)

I have no idea what it means, without looking it up.


答:
You only need to keep studying another language should you be required not to adjust your thinking when switching to that language. If you don't need to work in language X next week, then why waste time reading about it? Focus on what you're doing in the now.

For example;

I have to work on two projects constantly. One is in C# and the other is in PHP. These two projects communicate with each other. So I'm often programming in one or the other. As a result, there is no start up time required to program in either language. I can just sit down and start writing code.

In this same project there is a command line tool developed in native C++. I only perform maintenance on this project once a year. I try to allow a back log of issues to build up before starting work on it. This ensure that I can commit myself to working in C++ for a fixed period to complete multiple tasks. Part of my estimating to work on things includes time required to start up again in C++. I have to force my brain to think in C++ again and that sometimes takes a few days to fully kick in. I start with simple tasks and progress to harder ones.

What I can not do, and have sometimes been forced too. Is constantly switch languages. This creates extra fatigue in my head. Each language has it's own does and don'ts. It's own flavor of approaches and sticky catches if you don't fully know the language. If I constantly switch languages then I run the risk of not really knowing that language well.

The best advice I can give is not to mix purpose. Use each language for what it's good for. Otherwise you become frustrated because one method is quicker/easier done in the other. This becomes a distraction and opens the door to second guessing an implementation.

Title: How can I work on multiple programming languages at same time

Body:
It always happen to me that if I leave the stuff for 1-2 months I forget the stuff.

5 months back I had symfony project and I did that. At that time I was very much confident that I can do any project in symfony2.

Then we got one Python project in django and I worked full time on that for few months.

But now when I had to fix the error in symfony2, I completely forgot the structure and I keep mixing python stuff with php symfony.

I want to know that how people work with different languages at same time.

Should I need to keep studying all languages at same time so that I don't forget?

I am confused what should I do. Or whenever I do some project then I keep notes of each and every step so that I can follow that later on how I did it?


问:
Single sign on if you do not have control of one or more of the client/web apps?
I have a customer who has a client app and when they log in to their client app, they will see a link to my website.  When they click on the link, it should log in them in automatically to the website without asking for the credentials.  Is this only possible if the username/password are the same between the client app and the website?  Also, what if the username/password is not known for the client app?  How is this handled? I have heard of technologies such as openId, oAuth, etc, but these don't seem to fit my scenario where there is an existing client app that already has a membership base and it not needs access to my website.

I am not sure what approach to make take here?  If the above is confusing, I will give a scenario:

User A logs into there desktop application.

User A clicks a link to go to wwww.mysite.com.

User A is authenticated and authorized for www.mysite.com, so they do not need to provide credentials.

答:
This can only be done with the aid of the desktop/website that contains your link.  If you can change that app, then this is possible, if not, not.

In order to log your user in securely, you need to know they were logged into the other app -- the only way for that to happen, is for it to give something to the user to give to you, that says yeah, he is logged in.


答:
The shorter C-style names also convey that although this language is not C; the language has a C heritage and this printf is our take on our venerable ancestors printf function adapted for our language.

C is very much a foundation language and new languages can gain a lot by stating that they are "C-style".

Similarly other languages may purposefully embed the Unix way of doing some tasks and reinforce that by adopting Unix names for doing similar (or identical) things. If you are familiar with the Unix chmod command and implement chmod-like functionality in your language with maybe a similar API, then it might be better to call it chmod in your language rather than change_mode or whatever. It means that you can re-use your Unix experience

Some people believe that what you may do often in a language should have a shorter name.


问:
Why does Android's Bundle API accept ArrayLists rather than Lists
I'm new to Android and while going through a tutorial on saving Activity state to a Bundle, I noticed that instead of accepting the more generic List interface, Bundle's put methods are expecting ArrayLists.

Example:

```<code>Bundle.putCharSequenceArrayList(key, value)
Bundle.putIntegerArrayList(key, value)
Bundle.putParcelableArrayList(key, value)
Bundle.putStringArrayList(key, value)
</code>```

Most of us are familiar with item 52 of Effective Java suggesting that objects must be refered to by their interface, so I am wondering what was the reason behind this API decision.

Is ArrayList perhaps the preferred list implementation in Android?

答:
Just a guess: Maybe Bundele-content must be be serializable and not every Lists implementation is serializable.

From sdk-doc public Bundle.Bundle (ClassLoader)

```
  Constructs a new, empty Bundle that uses a specific
  ClassLoader for instantiating Parcelable and Serializable objects.
```

Body:
Just a guess: Maybe Bundele-content must be be serializable and not every Lists implementation is serializable.

From sdk-doc public Bundle.Bundle (ClassLoader)

  Constructs a new, empty Bundle that uses a specific
  ClassLoader for instantiating Parcelable and Serializable objects.


答:
Why do we continue to use the old Germanic "Albert" as a boys name and not the modern English translation "Shining Hero"?

Because a name is just a label. It's good to give new stuff a meaningful name, but, after long usage the name itself becomes the meaning.

printf means something very specific to generations of programmers -- a print function with a template that will use %2d to indicate where you want a two digit number printed etc.

On the other hand print_format would indicate a function that will somehow format and print some data and you will need to look up the docs to find out how to use it.


问:
What is the proper way to distinguish between keywords and identifiers?
I'm aware that most modern languages use reserved words to prevent things like keywords from being used as identifiers.

Reserved words aside, let's assume a language that allows keywords to be used as identifiers. (For example, in Ruby a keyword can be used as a method name). During compilation, how would you deal with this ambiguity?

The lexing phase doesn't seem like a good fit because it would have to consider the tokens around it. The parsing phase also doesn't seem like a good fit since ideally the parser would work with tokens that are unambiguous.

If I had to design it myself, I suppose I would have the lexer yield an ambiguous token, then have another level that considers the ambiguous token in the context of the tokens around it, (e.g. does the ambiguous token follow a def keyword? Then it must be an identifier.) Then, I would hand the unambiguous tokens to the parser.

In languages that allow keywords to be used as identifiers, what is the standard way for the compiler to tell them apart?

答:
If you notice in Ruby, you cannot call the method named like that directly, e.g. you cannot
do

```<code>begin()
</code>```

You can do

```<code>obj.begin()
</code>```

Because there you can have grammar like:

```<code>*Arguments* :
    "(" ")"

*MemberExpression* :
    *MemberExpression* "." *IdentifierName*

*CallExpression* :
    *MemberExpression* *Arguments*
</code>```

(Unrelated rules to the example left out for brevity)

to recognize it. It only requires separating the rule Identifier from IdentifierName:

```<code>*Identifier*:
    *IdentifierName* **but not reserved word**

*IdentifierName*:
    //Rules for identifier names here
</code>```

If you have a starter begin like in

```<code>begin()
</code>```

Then you already activated a rule like

```<code>*Block*:
    "begin" *indent* *statement* *outdent* "end"
</code>```

And Ruby doesn't try to figure out what you mean and it will just be a block.

But for method names where a receiver appears or some other prefix it is easy to allow keywords in the grammar and  e.g. Javascript does it doo.

Grammar examples taken from ecma-262

Body:
If you notice in Ruby, you cannot call the method named like that directly, e.g. you cannot
do

begin()

You can do

obj.begin()

Because there you can have grammar like:

*Arguments* :
    "(" ")"

*MemberExpression* :
    *MemberExpression* "." *IdentifierName*

*CallExpression* :
    *MemberExpression* *Arguments*

(Unrelated rules to the example left out for brevity)

to recognize it. It only requires separating the rule Identifier from IdentifierName:

*Identifier*:
    *IdentifierName* **but not reserved word**

*IdentifierName*:
    //Rules for identifier names here

If you have a starter begin like in

begin()

Then you already activated a rule like

*Block*:
    "begin" *indent* *statement* *outdent* "end"

And Ruby doesn't try to figure out what you mean and it will just be a block.

But for method names where a receiver appears or some other prefix it is easy to allow keywords in the grammar and  e.g. Javascript does it doo.

Grammar examples taken from ecma-262


问:
ternary operator usage within IF brackets
could you please help me understand this ternary operator

```<code>public static <E> void replace(List<E> list, E val, E newVal) {
    for (ListIterator<E> it = list.listIterator(); it.hasNext(); )
        if (val == null ? it.next() == null : val.equals(it.next()))
            it.set(newVal);
}
</code>```

i thought the part after ? is just a regular statement, so how is == being used here?

答:
It is a normal EXPRESSION, which in this case returns a boolean.  It is the equivalent of:

```<code>public static <E> void replace(List<E> list, E val, E newVal) {
    for (ListIterator<E> it = list.listIterator(); it.hasNext(); ) {
        bool cond = val == null ? it.next() == null : val.equals(it.next());
        if (cond) {
            it.set(newVal);
        }
     }
}
</code>```

A ternary expression returns a value.

Body:
It is a normal EXPRESSION, which in this case returns a boolean.  It is the equivalent of:

public static <E> void replace(List<E> list, E val, E newVal) {
    for (ListIterator<E> it = list.listIterator(); it.hasNext(); ) {
        bool cond = val == null ? it.next() == null : val.equals(it.next());
        if (cond) {
            it.set(newVal);
        }
     }
}

A ternary expression returns a value.


答:
It's very easy to see, once you start to pull out the expression into a separate variable:

```<code>public static <E> void replace(List<E> list, E val, E newVal) {
for (ListIterator<E> it = list.listIterator(); it.hasNext(); )
    T theVariable = val == null ? it.next() == null : val.equals(it.next());
    if (theVariable)
        it.set(newVal);
}
</code>```

I intentionally left the type as T. When you think about what type it has to be, the answer to your question appears: As the variable is used as the condition of an if-expression, it must be a boolean type, and hence, it is clear, what it.next() == null is doing here.

You just happened to run into the case where a ? b : c has three elements a,b,c which are all of type boolean.

Title: ternary operator usage within IF brackets

Body:
could you please help me understand this ternary operator

```<code>public static <E> void replace(List<E> list, E val, E newVal) {
    for (ListIterator<E> it = list.listIterator(); it.hasNext(); )
        if (val == null ? it.next() == null : val.equals(it.next()))
            it.set(newVal);
}
</code>```

i thought the part after ? is just a regular statement, so how is == being used here?

Body:
It's very easy to see, once you start to pull out the expression into a separate variable:

public static <E> void replace(List<E> list, E val, E newVal) {
for (ListIterator<E> it = list.listIterator(); it.hasNext(); )
    T theVariable = val == null ? it.next() == null : val.equals(it.next());
    if (theVariable)
        it.set(newVal);
}

I intentionally left the type as T. When you think about what type it has to be, the answer to your question appears: As the variable is used as the condition of an if-expression, it must be a boolean type, and hence, it is clear, what it.next() == null is doing here.

You just happened to run into the case where a ? b : c has three elements a,b,c which are all of type boolean.


问:
Design for using your own API
So I'm planning to use APIs for my host app. But the APIs are built such that it requires a sessionkey for every request.

So my question is, how would I dogfood my API? Cause, apparently I'm thinking in the line of creating a "special" key for my host app (cause it makes no sense to request for a key for my own use), but, anyone inspecting the headers of the request could find this key and literally use it and bypass requesting their own keys.

Maybe there's a best practice for dogfooding our own API without a special key or someway to differentiate whether the request is coming from the host app or the public.

I couldn't use IP to differentiate too, cause the public could be using the same server to call the APIs. That's just the way it is, and is a one of the constraints to keep in mind.

答:
You have some choice, none of them special.

session based auth system

auth with each request

For a replacement of username and password,

you can choose or combine some methods like:

auth with digital credential like SSH keys

one-time auth like RSA tokens, SMS, PHONE CALL or some bio-methods

Title: Design for using your own API


问:
Using naming conventions to make `import *` safer in Python
Consider the following code:

a.py

```<code>import os

def print_rand():
    print os.urandom()
</code>```

And another module:

b.py

```<code>from a import *
</code>```

In this code, I end up with an os variable getting imported from a. I could prevent this with a small change:

a.py

```<code>import os as _os

def print_rand():
    print _os.urandom()
</code>```

Since from a import * does not pick up on members beginning with an underscore, b wouldn't import the os module from a.

I've thought about doing this in some of my code. I never use import *, but logically, it makes some sense anyway. (Not to mention I don't work alone on my code.) os is a member that a uses internally; it's not there to be exposed to the outside world. (Yes, I'm aware that it can be accessed anyway, but I just mean in the sense that the underscore conventionally means "private".)

Is this something I should do? Would it be considered "Pythonic", or is it something I should particularly avoid doing? Does it even matter? (Should I have asked on StackOverflow? It seems too conceptual for there to me.)

答:
I've seen this done, although not often. I wouldn't do this myself, for several reasons:

In case of a module, it is not the module itself that is internal, it's the fact of its usage that is internal. The module can be accessed quite legitimately by importing it explicitly, especially the one from the standard library. So the leading underscore will only confuse someone who reads your code.

If a user of your package relies on something that is not explicitly mentioned in the documentation (and you probably won't advertise os module as a part of your module's public API), it is not really your problem. Usual assumption in this case is that if you want to use something from the standard library, you import it yourself.

PEP8 recommends using __all__ for modules that are imported with import *, which eliminates the problem.

The usage of import * is often frowned upon anyway. For example, pylint complains about it.

That said, these are still not 100% compelling reasons, and there may be cases where obscuring the imported module's name in such a way is justified.


问:
What is the (craziest, stupidest, silliest) thing a client/boss asked you to do?
See title, but I am asking from a technical perspective, not

Take my 40 year old virgin niece on a date or you're fired.

答:
"You know this enormous 20-year-old Cobol program that contains piles and piles of hard-coded business rules that more or less defines our company? Would you mind converting it to .NET?"

Yikes.

We go live in a few weeks.

Wish me luck..


问:
Will high reputation in Stack Overflow help to get a good job?
In a post, Joel Spolsky mentioned that 5 digit Stack Overflow reputation can help you to earn a job paying $100k+. How much of that is real?

Would anyone like to share their success in getting a high paid job by virtue of their reputations on Stack Exchange sites?

I read somewhere that, a person got an interview offer from Google because a recruiter found his Stack Overflow reputation to be impressive. Anyone else with similar stories?

答:
Having something to point at is certainly a good way to demonstrate a general competency in an area - that it is something you actually know about (and can articulate helpfully), rather than just some blank labels copied onto your CV - "XML, Ajax, JSON" isn't nearly as convincing as something someone can look at. It also opens up various potential discussion topics, etc., so having a findable (typically via google against your name) public persona is certainly never a bad thing. Unless the only thing on your public persona is garbage...

Speaking more personally, my presence on Stack Overflow very certainly helped me get my current job - I now work for... Stack Overflow! However, I have been approached a number of times by people seeing my posts; in relation to employment, consultancy, and tech-article opportunities. I was also contacted by a Google recruiter who (when introducing themselves) directly cited my Stack Overflow posts (by this time I was already working for Stack Overflow, so I thanked them for their consideration, but I didn't choose to interview).

Of course, getting a public persona out there can also be done in a range of other ways; blogging, hobby-projects, public-speaking (user-groups), etc. So how about another reason to use Stack Overflow:

I learn something every single day...

...either by spending a minute-or-two researching an answer, or just by reading the other replies to an interesting post. The questions can be equally interesting, especially when introducing unexpected behaviour*. And learning is never a bad thing.

Still not enough?

Then consider this. We have unicorns! That should be enough for anyone.

*=for example, just this morning I found out that Visual Studio with the debugging host-process enabled processes attributes on the entry-point (AKA Main()) differently to the core CLR execution.


问:
Does non-virtual-by-default lead us to composition-over-inheritance?
There are some design guidelines about testable code in “The Art of Unit Testing”. The first one is “Make methods virtual by default”. I’m curious to know your idea about non-virtual-by-default behavior in C#. I’ve read about Hejlsberg opinions but I think one the most important reasons could be that it may lead us to “composition over inheritance” principal.

Could “composition over inheritance” be one of those reasons which make non-virtual-by-default preferred over virtual-by-default?

UPDATE

Regarding this subject, please consider test-driven point of view; where we want to write testable code. While we are encouraged to make all members virtual by default (at the mentioned book), we can follow "composition over inheritance" and keep going non-virtual-by-default. Isn't it better?

答:
I think it could, yes. Virtual by default would make it a lot easier to override implementations in inherited classes.

Frankly, I think it's a weird rule. If you really need to override something, then make it virtual. Don't go making everything virtual just because some guideline tells you to.

It sounds like stuff you'd hear in college (overarching advice that could bite you in the backside when applied without second thought).


答:
I agree that @jmoreno (+1) is the only way it could work.

However if i where the author of the desktop-app that calls your website i would not reveal the desktop-user-password to any foreign link or to anybody else.

Maybe it is easier for your website to remember your customer through a cookie so every web-user has to only login once.

If desktop-app and your website both use openId (or oAuth) the user still has to agree that the openId-provider is allowed to be used by desktop-app and your website.

Title: Single sign on if you do not have control of one or more of the client/web apps?

Body:
I have a customer who has a client app and when they log in to their client app, they will see a link to my website.  When they click on the link, it should log in them in automatically to the website without asking for the credentials.  Is this only possible if the username/password are the same between the client app and the website?  Also, what if the username/password is not known for the client app?  How is this handled? I have heard of technologies such as openId, oAuth, etc, but these don't seem to fit my scenario where there is an existing client app that already has a membership base and it not needs access to my website.

I am not sure what approach to make take here?  If the above is confusing, I will give a scenario:

User A logs into there desktop application.

User A clicks a link to go to wwww.mysite.com.

User A is authenticated and authorized for www.mysite.com, so they do not need to provide credentials.


答:
Explicit virtual is form of Defensive programming. By enforcing what methods can be overriden, you ensure that person who will create a child class cannot create error by doing something that wasn't intended by parent's design.

I don't think it has anything to do with how people approach design of their code from composition vs inheritance point. But there are definitely people who will dismiss it on basis that defensive programming is not good thing.

Title: Does non-virtual-by-default lead us to composition-over-inheritance?

Body:
There are some design guidelines about testable code in “The Art of Unit Testing”. The first one is “Make methods virtual by default”. I’m curious to know your idea about non-virtual-by-default behavior in C#. I’ve read about Hejlsberg opinions but I think one the most important reasons could be that it may lead us to “composition over inheritance” principal.

Could “composition over inheritance” be one of those reasons which make non-virtual-by-default preferred over virtual-by-default?

UPDATE

Regarding this subject, please consider test-driven point of view; where we want to write testable code. While we are encouraged to make all members virtual by default (at the mentioned book), we can follow "composition over inheritance" and keep going non-virtual-by-default. Isn't it better?


答:
Git is also such tool and obviously also does dogfooding. But it does it to different extent in different environments. The public servers are only running release while developers usually work with either next (that's git project's name for "develop") or pu (even more develop than develop). Any developer that is blocked by some problem can go back to next or master or last release whenever they are blocked by something and the main repository is not affected, so problems can be cleaned by referring to it.

The branching model is similar to the above with slightly different names. master is what big releases are done from, maint is release branch for next point release, next is similar to develop with slight difference that features may be merged to master separately after being in next already instead of whole next being merged.

There is an extra branch, pu. This is created by merging all feature branches that are considered for integration together to next (the branch is discarded and recreated each time). IIRC it is only published if it passes the test suite. Last I looked Junio, the maintainer, was running the scripts to build it regularly by hand, but such scripts could be run by continuous integration nightly and I believe Gerrit even creates it automatically.

So that kind of is the answer. You dogfood the most development version you have in development environments, but use previous release for building releases.


问:
The best possible way to implement Business Rules in PHP
I'm planning to write an e-commerce app using PHP & MySQL with lots & lots of custom rules. Say for example, I want to have a rule like "Give Customer X, a 10% a discount  for Product Y if he bundles it with Product Z"

I've heard about Business rules engine(in Java and others). I intend to implement a flexible business rules functionality without hard-coding anything into PHP and with a good, solid architecture with the goal of maintainability and re-usability with the help of PHP OOPS.

Please advice me on the following aspects:

Does decision table fit my intended purpose?

How can I change rule/business logic of the PHP application without redeploying/re-writing?

答:
I used to work with magento, which was an e-commerce platform (in php-mysql) that was doing exactly that. There is too-much effort for doing the functionality you want from scratch, so integrating an off-the-shelf solution might be more appropriate.

From the answer above: "Forget business people updating them, they don't have the necessary skill." This is timeless advice. People have tried it in the past, it always failed...


答:
In .Net, each language has a different set of keywords. For example, this means that a library written in C# can use identifiers that are reserved in VB.NET. So, to use such library from VB.NET, you need some way to use keywords as identifiers.

Each language uses a different syntax to do that:

in C#, you prepend a @:

```<code>@keyword
</code>```

in VB.NET, you enclose it in brackets:

```<code>[keyword]
</code>```

in F#, you enclose it in double backticks:

```<code>``keyword``
</code>```

Title: What is the proper way to distinguish between keywords and identifiers?

Body:
I'm aware that most modern languages use reserved words to prevent things like keywords from being used as identifiers.

Reserved words aside, let's assume a language that allows keywords to be used as identifiers. (For example, in Ruby a keyword can be used as a method name). During compilation, how would you deal with this ambiguity?

The lexing phase doesn't seem like a good fit because it would have to consider the tokens around it. The parsing phase also doesn't seem like a good fit since ideally the parser would work with tokens that are unambiguous.

If I had to design it myself, I suppose I would have the lexer yield an ambiguous token, then have another level that considers the ambiguous token in the context of the tokens around it, (e.g. does the ambiguous token follow a def keyword? Then it must be an identifier.) Then, I would hand the unambiguous tokens to the parser.

In languages that allow keywords to be used as identifiers, what is the standard way for the compiler to tell them apart?

Body:
In .Net, each language has a different set of keywords. For example, this means that a library written in C# can use identifiers that are reserved in VB.NET. So, to use such library from VB.NET, you need some way to use keywords as identifiers.

Each language uses a different syntax to do that:

in C#, you prepend a @:

@keyword

in VB.NET, you enclose it in brackets:

[keyword]

in F#, you enclose it in double backticks:

``keyword``


问:
How to practice ATDD if design is not yet emerged from TDD?
Despite being very stakeholders friendly, ATDD aimed to provide a "stop" line when a feature has just been done. This avoids wasting time to add non-focused (and sometimes useless) code.

That's why some teams start by establishing a walking skeleton of the application, and directly specifying with an acceptance test the first required feature.

Let's suppose this first acceptance test (not representing a relevant first acceptance test, just being an example):

Given Michael has just been created in the application,
his status should be left to non-activated.

I want to write my acceptances tests focusing on business logic directly (use-cases), not dealing with GUI for business rules.

Thus my question would be...how to write it? since I don't even already know what is a "User", what is a status etc...
Indeed, shouldn't it be the role of TDD to emerge the design and therefore these components?

But if I firstly practice TDD in order to emerge them, the benefit of ATDD (as a stop line) would disappear.

I imagine that it would be more consistent to write some acceptance tests (before entering TDD cycle) when the project has well progressed, since all main components would already be designed.

To sum up, should I always write my acceptances test BEFORE my TDD cycle?

答:
In practice, I tend to leave the design a bit rough when first starting out with an acceptance test, just introducing simplistic versions of concepts to make progress. The trick is recognise when you have enough information about the implicit design to refactor.

Actually, I think you have a bigger problem with your first test. You're starting with the first step in the sequence, not the most important/interesting feature of the system. Michael doesn't really care about the user creation process, so you could start with hard-coded users and take it from there.


问:
Host an MVC 3 with Razor syntax app on old server
I just started a new job, I have to create a web app for them and host it on their intranet on an Windows 2003 R2 server with SQL server 2008.

As said in the question, I'll work on a MCV3 with Razor syntax application.

I know that it won't work easily or even not work at all.

On a recent server you have to install something more (I don't remember the name) for the Razor to be understood. What about on this old server? Will I get it to work or should I tell them to buy a more up to date server?

答:
MVC3 will work on IIS 6. You just have to install .NET 4 and ASP.NET MVC 3 from the following link: http://www.asp.net/mvc/mvc3

The Razor view engine already comes with ASP.NET MVC 3, so you don't have to install anything else.


问:
How do you compress ASCII strings into fewer bytes?
I'm working with an embedded device with a unique protocol that sends messages to other devices and I'm making an application that parses the sent packets. Each packet carries 8 bytes. The protocol is defined as where first byte is header and remaining 7 bytes is the data.

They are trying to pass a particular ID string but the ID string is 8 characters long (ASCII) so it won't fit in 7 bytes.

What my colleague told me is that they're going to turn the 8 ascii bytes of original string into integer (decimal) and send me 4 bytes of it. They told me I should be able to get the original string from the 4 bytes. I'm having a hard time wrapping my head around on this.

So if you have an ID string like "IO123456", that's 0x49 0x4f 0x31 0x32 0x33 0x34 0x35 0x36 in ASCII.. How on earth can you compress that in 4 bytes by turning it into an integer and I can get the original string from it? Am I missing something or is my colleague mistaken? I understand this is a really bizzare question but this seriously does not make any sense to me.

答:
From the context of the question posted here, it points to some industrial protocol called HART. This protocol has a unique way of wrapping the ASCII characters. It is called as Packed-ASCII. But still it doesn't pack the 8 characters to 4! According to Packed-ASCII, the 8 ASCII bytes are converted to 6. 4 to 3 and so on.

In this protocol, the length of the parameters in a certain request is always fixed. So the remaining characters needs to be padded up by Space characters. Still, this all stuff is HART-Specific. If you confirm that you are working on this, i will put the exact procedure of packing & unpacking.


答:
Thus my question would be...how to write it? since I don't even
  already know what is a "User", what is a status etc... Indeed,
  shouldn't it be the role of TDD to emerge the design and therefore
  these components?

Not sure what you mean by "don't know what is a User", but I'd argue this kind of big business concepts don't emerge out of thin air in code as a result of the TDD process, they should be known in advance, at least in broad outline.

Approaches like Domain Driven Design recommend having preliminary collaborative modelling sessions where domain expert and developer sit together, exploring domain concepts and starting to grow a ubiquitous language.

Early sketches of the domain model resulting from these conversations should provide a basic plan to get you started with acceptance tests. Expressing ATDD tests should feel easier and more natural since you just keep on using the same ubiquitous language as before to write down big domain concepts in code.

Title: How to practice ATDD if design is not yet emerged from TDD?

Body:
Despite being very stakeholders friendly, ATDD aimed to provide a "stop" line when a feature has just been done. This avoids wasting time to add non-focused (and sometimes useless) code.

That's why some teams start by establishing a walking skeleton of the application, and directly specifying with an acceptance test the first required feature.

Let's suppose this first acceptance test (not representing a relevant first acceptance test, just being an example):

Given Michael has just been created in the application,
his status should be left to non-activated.

I want to write my acceptances tests focusing on business logic directly (use-cases), not dealing with GUI for business rules.

Thus my question would be...how to write it? since I don't even already know what is a "User", what is a status etc...
Indeed, shouldn't it be the role of TDD to emerge the design and therefore these components?

But if I firstly practice TDD in order to emerge them, the benefit of ATDD (as a stop line) would disappear.

I imagine that it would be more consistent to write some acceptance tests (before entering TDD cycle) when the project has well progressed, since all main components would already be designed.

To sum up, should I always write my acceptances test BEFORE my TDD cycle?


答:
I originally commented on the previous answer but I wanted my list with a correct layout so :

Just use MS's Web Platform Installer to install the framework and MVC3, and yes, it'll be as simple as that.

I did that and had two little other things to do, maybe linked to my 64 bit server :

Run "aspet_regiis.exe -ir" to install ASP.Net

Install VC++ 2008 SP1 (don't know how but it fixed some DLLs I couldn't get to work) microsoft.com/en-us/download/details.aspx?id=2092

Title: Host an MVC 3 with Razor syntax app on old server

Body:
I just started a new job, I have to create a web app for them and host it on their intranet on an Windows 2003 R2 server with SQL server 2008.

As said in the question, I'll work on a MCV3 with Razor syntax application.

I know that it won't work easily or even not work at all.

On a recent server you have to install something more (I don't remember the name) for the Razor to be understood. What about on this old server? Will I get it to work or should I tell them to buy a more up to date server?