答:
I would  have your users page as a sub section. Ie http://domain.com/users/username

There is no way we or even you could guess what pages you might want to create in future

Title: List of reserved words a username can't be?

Body:
Possible Duplicate:

  Is there a list of common usernames to reserve in a new system?

I'm working on a site where users will have a custom URL e.g.: http://domain.com/username

I want to avoid the situation where a user registers and creates a username that I later need, e.g. if I want a page at domain.com/about and someone's already named themselves 'about'.

Does anyone have a list of generic words that could be added to a blacklist for this?


问:
How do you work with Asynchronous functions, recursively?
I am currently working on FLEX and have to call a web services. once I have the result, I have to call the web service again, with the previous result as the input.

A compounding problem, is that the service might return multiple results, and I have to call the service again with each of the results as the input. Lastly, i need the results to be in a hierarchical array collection, with each result as the child of the input to the web service.

If it were a synchronous function, it would have been very easy, but I have spent half a day trying to come up with something elegant for the web service.

I ended up with having two arrays, one for the input, and one for the results. Every time I had one or more result, I would put it in the Input array and the results. I would then remove the first item from the input array and call the web service with it, and so on, till I finished all the inputs. Once I had all the results, I made a recursive function that would create the hierarchical tree, that I needed.

This seems like a very hacky, WTF Solution. Is there any elegant and better solution? I am all ears.

答:
I also have a series of web based services which need to be called in order.  I solved the issue with AJAX.  The key is having a callback mechanism to perform the recursion, forcing synchronization.

Something like this (jQuery)

```<code>function Recurse(params)
{
$.get(url,
            {params},
            function (data) {Recurse(data)}//callback does recursive call, also passes in variable data received from the web service
            ,'html');
}
</code>```

You should check the API in question to see if it is a tree data structure like the DOM. Usually recursion is a good approach to iterate trees.  If it's just a flat, linear API then a Queue/Stack can be used to push/pop your way through the API recursively.

Here's how to recursively iterate the DOM.  Code for another Tree based API structure will be similar (javascript)

```<code>function walk(node, func) {
   //walk the height of the tree
   func(node);//do something to the node
   node = node.firstChild;
   while(node) {
      //walk siblings
      walk(node, func);
      node = node.nextSibling;
   }
}
</code>```

ContentLicense: CC BY-SA 3.0

Body:
I also have a series of web based services which need to be called in order.  I solved the issue with AJAX.  The key is having a callback mechanism to perform the recursion, forcing synchronization.

Something like this (jQuery)

function Recurse(params)
{
$.get(url,
            {params},
            function (data) {Recurse(data)}//callback does recursive call, also passes in variable data received from the web service
            ,'html');
}

You should check the API in question to see if it is a tree data structure like the DOM. Usually recursion is a good approach to iterate trees.  If it's just a flat, linear API then a Queue/Stack can be used to push/pop your way through the API recursively.

Here's how to recursively iterate the DOM.  Code for another Tree based API structure will be similar (javascript)

function walk(node, func) {
   //walk the height of the tree
   func(node);//do something to the node
   node = node.firstChild;
   while(node) {
      //walk siblings
      walk(node, func);
      node = node.nextSibling;
   }
}


问:
List of reserved words a username can't be?

Possible Duplicate:

  Is there a list of common usernames to reserve in a new system?

I'm working on a site where users will have a custom URL e.g.: http://domain.com/username

I want to avoid the situation where a user registers and creates a username that I later need, e.g. if I want a page at domain.com/about and someone's already named themselves 'about'.

Does anyone have a list of generic words that could be added to a blacklist for this?

答:
You can always encode any http reserved characters in the username.

You should do this anyway in case someone decides to register the user name /../../etc/passwd


问:
Is it a good idea to use something like the Twitter Bootstrap in production?
I'm interning at a new startup, and I've been tasked with designing the front-end of the site.
I really, really want to use the new Twitter Bootstrap (http://twitter.github.com/bootstrap/). It's all CSS, looks amazing, works great, and lets me get to designing and not worrying about the little stuff.

However, is this a good idea if it's a demo of a webapp that we're building that could become production code? Will it look silly and amateur if I use this instead of coding it all myself? Is the bootstrap too Twitter-ish for a real company's brand?

答:
I'm also interning at a startup and my boss/CIO suggested we use it for the application I've been working on. As a newer programmer (with a few years of experience with just HTML/CSS from my high school days), I was able to focus on the application development and design, without being caught up in the front-end styling details for quick demos to my boss. It's still important to have sufficient CSS skills to ensure that you can do further styling or adjustment to the CSS or LESS files, or just know what's going on behind the scenes.

The great thing I've enjoyed so far has been the implementation of the js files is that I've been able to get nice modal functionality very quickly and easily using bootstrap-modal.js, which would've taken away from a lot of the more important issues if I had written it myself.

So far, it's been a great help, but like any development tool, it's good to know what it's doing or find out what it's doing to stay sharp and be able to fix things when they go wrong.


问:
Why do we need to write a header file?
Before you whip out your snarky comments, I know -- this is a nooby question. This is my first time using a C based language.

I'm an undergrad student learning Objective C for a computer science course on mobile development. I know that, in an academic setting, a lot of real-world considerations aren't necessary since you're building smaller projects, work in smaller teams, etc.

But our professor demands -- and XCode supports -- .h header files for every .m implementation file. To me, it kind of seems like busy work. I have to make sure I copy every method signature and instance variable over to the other file. If I change one file, I have to make sure it's consistent with the other file. It seems like just a bunch of small annoyances like that.

But I know there has to be some real-world use for header files. A great answer would address both:

What is a header file useful for that an implementation file isn't suited for? What is its purpose?

Why do we as programmers have to manually write our header files? It seems like they could easily be generated automatically.

Thanks in advance!

答:
In short;

The header file defines the API for a module.  It's a contract listing which methods a third party can call.  The module can be considered a black box to third parties.

The implementation implements the module.  It is the inside of the black box.  As a developer of a module you have to write this, but as a user of a third party module you shouldn't need to know anything about the implementation.  The header should contain all the information you need.

Some parts of a header file could be auto generated - the method declarations.  This would require you to annotate the implementation as there are likely to be private methods in the implementation which don't form part of the API and don't belong in the header.

Header files sometimes have other information in them; type definitions, constant definitions etc.  These belong in the header file, and not in the implementation.

Title: Why do we need to write a header file?


答:
Header files are mainly used to declare and include the signatures (i.e. function name, return value and arguments) of your functions in other files. The compiler needs to know these signatures when compiling and linking your files together.

Read this article for more information.

Title: Why do we need to write a header file?

Body:
Before you whip out your snarky comments, I know -- this is a nooby question. This is my first time using a C based language.

I'm an undergrad student learning Objective C for a computer science course on mobile development. I know that, in an academic setting, a lot of real-world considerations aren't necessary since you're building smaller projects, work in smaller teams, etc.

But our professor demands -- and XCode supports -- .h header files for every .m implementation file. To me, it kind of seems like busy work. I have to make sure I copy every method signature and instance variable over to the other file. If I change one file, I have to make sure it's consistent with the other file. It seems like just a bunch of small annoyances like that.

But I know there has to be some real-world use for header files. A great answer would address both:

What is a header file useful for that an implementation file isn't suited for? What is its purpose?

Why do we as programmers have to manually write our header files? It seems like they could easily be generated automatically.

Thanks in advance!


答:
The main reason for a header is to be able to #include it in some other file, so you can use the functions in one file from that other file. The header includes (only) enough to be able to use the functions, not the functions themselves, so (we hope) compiling it is considerably faster.

Maintaining the two separately most results from nobody ever having written an editor that automates the process very well. There's not really a lot of reason they couldn't do so, and a few have even tried to -- but the editors that have done so have never done very well in the market, and the more mainstream editors haven't adopted it.

Title: Why do we need to write a header file?


答:
Maybe you could implement some sort of "auto-loading tree".

Start with the first node. This node fetches data from server. For each item found  in the response, it creates a child node that will load the appropriate data. And so on...

One thing you need to know is "When is it complete ?"

This can be handled with events. Each node send an event up when all its children are complete. Recursively this will end up telling the root that all is children are complete. The root node will fire the "I'm complete" event to tell whoever wants to know it, that the tree is complete.

However, I'm wondering : why don't you create a service on the server that returns the whole tree ?

Title: How do you work with Asynchronous functions, recursively?

Body:
I am currently working on FLEX and have to call a web services. once I have the result, I have to call the web service again, with the previous result as the input.

A compounding problem, is that the service might return multiple results, and I have to call the service again with each of the results as the input. Lastly, i need the results to be in a hierarchical array collection, with each result as the child of the input to the web service.

If it were a synchronous function, it would have been very easy, but I have spent half a day trying to come up with something elegant for the web service.

I ended up with having two arrays, one for the input, and one for the results. Every time I had one or more result, I would put it in the Input array and the results. I would then remove the first item from the input array and call the web service with it, and so on, till I finished all the inputs. Once I had all the results, I made a recursive function that would create the hierarchical tree, that I needed.

This seems like a very hacky, WTF Solution. Is there any elegant and better solution? I am all ears.


问:
Why is Scheme my first language in university?
I hear about C, C++, Java every day whenever people starting talking about computer science, but in my first computer science class we are asked to write in Scheme (DrRacket).

Why is that?

What differences will this make to my future understanding of programming?

UPDATE: I have finished my first term, but not completely done with Scheme. In my second term (which is now) we got in to C programming. It was frustrated to learn pointers at first, but now I feel much better.

There's not much more to say than that. I'm trying to teach myself Java (or C++?) for the OOP part which I'm missing. So far, I still like functional programming best. Lambda is just fascinating. :)

答: Actually, as Lisp (Scheme being a dialect) is the Grande Dame of functional languages (think of F#, Groovy, Clojure, Haskell etc), then this training does not leave you at any sort of commercial disadvantage either, as this is the hottest topic on the development block right now.</p>


答:
Including a header allows your code to call functions or methods which are written elsewhere and which may or may not be a part of your software project/build, but which can be found by the 'linker' when you are building the software.

For instance, when you call a function in the standard C library then you don't want to have to put all the innards of that function inside your project - you simply expect your program to be able to call it.

But your compiler needs to be told that the function exists somewhere even if it cannot see the code and the header does that. When the compiler is finished, the linker is called and it looks to 'link' those bits of your code that are left dangling, such as library calls.

Title: Why do we need to write a header file?


答:
There's some great answers on this StackOverflow question:

https://stackoverflow.com/questions/5316876/is-there-a-list-of-common-usernames-to-reserve-in-a-new-system

Here's the best list I've found:

http://blog.postbit.com/reserved-username-list.html


问:
Why are assumptions important when defining a puzzle?
in this question OP has presented a site where some puzzle are available. He described the problem about solving them. I was curious is that really so problematic. The first one was really easy, so I tried next one this time from the end that should be the hardest one (puzzle).

And here I have some problem with understating it or probably I am messing something.

Let focus on the example:

Data:

```<code>M1      C1      C2      277317
M2      C2      C1      26247
M3      C1      C3      478726
M4      C3      C1      930382
M5      C2      C3      370287
M6      C3      C2      112344
</code>```

Result:

```<code>617317
2 3 6
</code>```

My problem is that relying on the assumption that

any one compound can be used in a chemical reaction to create any
  other compound

The solution could be

```<code>508878
2 6 5
</code>```

Why ? In the content of the task, we do not have sad anything about that we have to start with compound one then from this get two then from two, three etc.

So the result should be to have all cheapest compounds, basing on the assumption we dont need to care how it was created. So this reduce our problem to structure like this.

```<code>M1      C2      277317
M2      C1      26247
M3      C3      478726
M4      C1      930382
M5      C3      370287
M6      C2      112344
</code>```

And from this list we should pick the lowest cost for each compound.

So how did the achieve that solution, 2 3 6 ?

By me they have used to complex logic for that, their basic assumption was that

C1 -> C2 is the same as C2 -> C1 so they have used a rank (hash code)

```<code>17 * 37 * 1 * 2 == 17 * 37 * 2 * 1
</code>```

(for this post i have used easier representation using the bit shift and bit-wise or that is
more less the same)

```<code>M1    001 | 010 = 011  277317
M2    010 | 001 = 011  26247
M3    001 | 100 = 101  478726
M4    100 | 001 = 101  930382
M5    010 | 100 = 110  370287
M6    100 | 010 = 110  112344
</code>```

After such operation the set of solution is reduced to this form

```<code>M1    3  277317
M2    3  26247
M3    5  478726
M4    5  930382
M5    6  370287
M6    6  112344
</code>```

So now I don't have the information about compounds, but only a rank that provide the solution.

We had three compounds on start we have three ranks so is seams to be correct, and the result is
the same that in the example (cost 508878 machines 2 6 5).

My observation is that the content of the puzzle is very funny but have a lot of holes in the limitation about the method that should be applied to achieve the result.

So concluding, what i am messing ?

答:
If you assume that you only can change C1 once, C2 once and C3 once. Then you only have 2 possibilities:

```<code>1577986
1 4 5
</code>```

or

```<code>617317
2 3 6
</code>```

Where the second is the cheaper one, and the solution

Body:
If you assume that you only can change C1 once, C2 once and C3 once. Then you only have 2 possibilities:

1577986
1 4 5

or

617317
2 3 6

Where the second is the cheaper one, and the solution


问:
Using SQLDataSource / DataBound Controls in ASP.NET - Bad Practice?
When programming in ASP.NET, you can get very quick, effective functionality out of using DataBound controls (GridView, FormView, etc) with an SQLDataSource control on the page (In my opinion, anyway - I could be alone on that one).  For instance, I often use these types of controls to create basic search functionality - like looking at Order History in a Shopping Cart application.

However, this answer on SO got me thinking: Is the use of the SQLDataSource control considered bad practice?  I've not been able to find any resources online that substantiate this claim, so I thought I'd ask here.

The question on SO is regards calculating the grand total of a column in a GridView.  The downsides of the SQLDataSource pointed out by the answerer (in their comment) include:

ASPX is presentation, not business logic.

This practice causes you to repeat SQL on every page that needs it.

When you make a change to a DB you have to change SQL in aspx.

Because it makes simple tasks like displaying grand total hard.

Solution provided calculates grand total it in DataBound event.  What if you don't use control with DataBound event?

Because it's not testable.

I'm somewhat new to ASP.NET development (coming from a Java / C# background), and I just wanted to make sure I'm not heading down the wrong path here (with using the SQLDataSource control).

答: If you're just learning, sure use SqlDataSource.  The main drawback is the fact it doesn't let you encapsulate anything; your logic is directly on the page and directly tied to the control(s).  Even databinding directly is a bad practice nowadays (the DataSource property should call a service or repository or gateway or something external to the UI that returns a collection), but it's fine for a newbie who's learning the ropes.  Just understand the limitations and remember that you probably won't use that way of doing things for any major project.


答:
There are a couple of considerations. First of all, the technology allows for this so why not use it? Well there may be many reasons but one I can think of is from the system architecture and security perspective. Is your webserver allowed to have a direct connection to your (back end?) database? If so it is perfectly ok to use databound controls, if not You'll have to create an intermediate transport mechanism (ans hence the SqlDataSource is out of scope).

Triggering business rules might be an other. Still many databases are used to enforce business rules, if so it's all good. If you have to trigger diffrent code to enforce your business rules things might get complicated and using SqlDataSource could be considered bad practice.

The testing argument, I don't really see that as problematic, one might have to write a different view to be able to assert the outcome but that is not neccesarily problematic.

However writing SQL code and business logic in aspx pages is a problem and should be isolated in a reusable library.

Title: Using SQLDataSource / DataBound Controls in ASP.NET - Bad Practice?

Body:
When programming in ASP.NET, you can get very quick, effective functionality out of using DataBound controls (GridView, FormView, etc) with an SQLDataSource control on the page (In my opinion, anyway - I could be alone on that one).  For instance, I often use these types of controls to create basic search functionality - like looking at Order History in a Shopping Cart application.

However, this answer on SO got me thinking: Is the use of the SQLDataSource control considered bad practice?  I've not been able to find any resources online that substantiate this claim, so I thought I'd ask here.

The question on SO is regards calculating the grand total of a column in a GridView.  The downsides of the SQLDataSource pointed out by the answerer (in their comment) include:

ASPX is presentation, not business logic.

This practice causes you to repeat SQL on every page that needs it.

When you make a change to a DB you have to change SQL in aspx.

Because it makes simple tasks like displaying grand total hard.

Solution provided calculates grand total it in DataBound event.  What if you don't use control with DataBound event?

Because it's not testable.

I'm somewhat new to ASP.NET development (coming from a Java / C# background), and I just wanted to make sure I'm not heading down the wrong path here (with using the SQLDataSource control).


问:
Deploy multiple emails to email providers, but without showing favouritism
We are currently developing a new email deployment system.  We have the system currently configured so that it reads a record from the database and loads the email content and deploys it to the target.  Now we want to move this over to multiple threads.  That is easily done, except we then hit the email providers returning SMTP codes referring to "Too many connections", or "Deferred connection".  The solution to this is to have a thread open up a connection to the email provider and deploy n emails and then disconnect.  We have currently configured the application so that it will support these session based email deployments.

The problem is this, the database table has multiple email addresses in and they aren't grouped by email provider because that will show favouritism.  We need to be able to retrieve a set number of, i.e. Hotmail, emails (@hotmail.com, @hotmail.co.uk, @live.co.uk) so that we are reducing the number of connections to Hotmail and reducing the risks of getting the "Too many connections" error.  We are at the point now where we have gone round and round in circles trying to get a solution, so I thought I'd throw it out there and see if anyone has any ideas?

EDIT

I would like to stress that this application is not used for spamming purposes.

答: Divide and conquer is certainly the way to go. Setup an array of queues where each queue is serviced by one smtp connection to a single provider. Load the list of addresses for that provider into the specific queue and let it sned the messages one by one. If for a certain provider/queue the number of addresses is below a certain treshold you can merge them and have  an extra connection (to the additional provider) service that  specific queue.</p>


问:
When do you drop old technologies from your resume?
I have been reviewing several resumes we have for a new position.  I noticed that a few of them had many old programming language versions and old applications on their resume (e.g. SQL 4.2, VB5, Lotus 123, Novell).  This left their list of computer experience very long.  Do you keep it fresh?  Do you show your depth of experience even though you will never use that techology again?

When should you drop old technology on your resume?  By keeping old technology on your resume does that do any harm in getting hired?

答:
I drop old technologies from the "technologies" section of my resume when I am no longer interested in working with them, or when they aren't being used anymore. I don't think long lists of technologies do anyone any favors.

I think technical depth is best illustrated through your work experience, where you can mention older technologies if you like.


答: I would remove them from the resume if they are not relevant to the job you're applying for, or if they take up room and don't add anything.</p>

Title: When do you drop old technologies from your resume?

Body:
I have been reviewing several resumes we have for a new position.  I noticed that a few of them had many old programming language versions and old applications on their resume (e.g. SQL 4.2, VB5, Lotus 123, Novell).  This left their list of computer experience very long.  Do you keep it fresh?  Do you show your depth of experience even though you will never use that techology again?

When should you drop old technology on your resume?  By keeping old technology on your resume does that do any harm in getting hired?


答:
I have a few rules for when I make cuts and edits to my resume:

The resume is one page long.

The resume contains relevant technologies to the position applied.

The resume contains relevant job history to the position applied.

While it may seem nice to have everything from technology and job history, resumes should be easy to read and skim for whoever is reading it. And it needs to contain vocabulary relevant to the position. Thus is needs to be concise and relevant.

So yes, for example, I dropped an old technology such as QBasic because it's not something I would do anymore, and because it's basically replaced with VB.net, which is more relevant today.

The only situation where cuts and edits may not be possible, is if the candidate has little experience and job history. The candidate would need everything to help make the resume one page long.


答:
I would list anything I have a significant skill in. Showing breadth of knoledge is good and it only takes up one line.

Obviously ommit anything you dont have significant skill in (ie I debugged some VB a few years ago)


问:
C++ and the use of old Visual Studio versions
Based on the behavior of some of our customers, I have come to wonder if many c++ development shops decided to just stop at vs2005. Is this just a quirk of the dozen or so large organizations that we deliver DLL+IMPLIB to, or is there a general groundswell of disinterest in the industry at large in upgrading?

Note that there's no MFC at work here, just a Windows compile of C++ code that is also delivered on linux and whatnot. And the question is, "Is it my imagination, or is it that big companies that build things like search engines in C++ have just stopped upgrading?"

NOTE

None of the answers so far appear to report actual personal experience with making a decision to upgrade or not, but rather either offer general principles or report very vague hearsay.

答:
You say Visual Studio, but I think you're really talking about compiler versions, so I'm answering in terms of compilers.

I used to work at a company that provided both installable software, and a large set of APIs for customers to build their own plugins and software against ours.

When I first joined, the company officially supported these C++ compiler lines:

GCC 3.4.6 (Red Hat Enterprise 4)

GCC 4.1.2 (Fedora Core 7 and Red Hat Enterprise 5)

Visual C++ 2003/7.1

Visual C++ 2005/8.0

I joined in August 2008, so Visual C++ 2008 had been out for roughly 8-9 months. There was really no active interest in adding/moving to new versions.

We phased out VC++ 2003 support because Microsoft long didn't support it, and customers had already transitioned to VC++ 2005

As for how we added new C++ compiler support:

The main drivers weren't things like regression testing, or 'what if our code doesn't compile' - a significant portion of the code was written pre-standard C++98, and modern code like I wrote had to compile against the lowest common denominator supported compiler.

The main driver was our customers and their demands.

Beginning in early 2009, some of our customers (I'm talking large defense contractors and such) expressed interest in moving to Visual C++ 2008, and wondering when we'd support that, because they had to build their plugins/extension/software against a compatible version of the libraries. I think they just got a decision passed down from on high, and saw that Microsoft was phasing out support for Visual Studio 2005, so they needed to move up and up.

That sparked the beginning of us building our software against Visual C++ 2008, and that's when these concerns came up:

regression testing - make sure that people who used VC++2008 coded so that it worked against older compilers

porting every single dependency to VC++2008 - our software varied from foundational toolkits to network analyzers to full-blown visualization simulation software, so there have to be good financial reasons to spend the money and time to port several dozen dependent libraries and in-house applications to a new compiler

QAing (we had two QA people and most devs did their own, this is an expensive process)

Build our software against VC++2008 - not quite so painless

Similar things happened when customers wanted to take advantage of high memory systems and asked us when we'd support 64-bit systems - cue the onslaught of similar tasks as above for building 64-bit VC++2008 software, and 64-bit Red Hat 5 software.

I was involved with a lot of those ports and modifying code to work - Visual C++ 2005 64-bit support, SunStudio 11 support (gave me HUGE nightmares), SunStudio 12 support (also gave me huge nightmares).

Which brings up another point - moving up compilers is not an easy task if your customers demand some oft-ignored compilers - I spent a lot of time rewriting parts of Boost, Qt, and a bunch of other open-source libraries specifically to get software working on some compilers. That followed changes I had to make in a bunch of my company's source code, and you're talking about understanding 5 different code bases and the subtle differences between compilers. Compiler bugs bit me a few times, and I'm sure I could have made a name for myself in the Solaris community with all the modifications I made to make some large open-source projects work on Sun's or IBM's compilers.

When I left the company (late last year), customers were beginning to demand Visual Studio 2010 support because it meant Visual Studio 2008 would soon be phased out. I think the company is beginning to phase out VS2005 support, and GCC 3.4.6 support, because support from Microsoft/Red Hat for those versions of their software/OSes will end.

So no, the code we wrote didn't take advantage of any awesome C++ features, we weren't using std::shared_ptr or std::unordered_map or any C++11 features. We'd use boost to give us that support, but had to guarantee our code could compile against our officially supported compilers. Most importantly, we had to support what a large portion of our customers desired.


答:
If you're learning with DrRacket, I'll bet you're also using the How to Design Programs curriculum.

Here's what one of the (admittedly biased) authors of HtDP has to say about the how teaching Scheme has prepared undergraduates at Northeastern University for the cooperative education program ("co-op": students alternate semesters of academic study with semesters of full-time employment).

Prior to my arrival, Northeastern had been using a standard curriculum
  for two decades: three terms of the currently fashionable language
  (Pascal, C++, Java), using a set of extremely graphics-rich exercises
  intertwined with lessons on practical applications. The curriculum was
  widely published in SIGCSE and related communities, but it didn’t
  work. At the height of the web bubble, only around one third of the
  students got programming co-ops; most others ended up as “techies” as
  they called themselves: moving computers, running scripts, setting up
  routers and networks, etc. And all of this education cost $150,000
  tuition.

After a year at Northeastern, our dean asked me to take over the first
  course. The first instance was a success—contrary to predictions from
  some local faculty. Even though it had been considered a trial, we
  switched to the TeachScheme! curriculum permanently; the dean
  suggested that I design a bridge course to connect the HtDP course to
  the rest of the curriculum; this started my collaboration on HtDC with
  Viera Proulx.  See the postscript below. Within a couple of years, I
  started hearing from our co-op faculty that the share of programming
  positions was going up. By 2007—the last time I was involved with the
  course—I was told that the ratio of programming on the first co-op
  went up to two thirds and higher. In the meantime, all TeachScheme!
  courses have been taught by numerous faculty members with rather
  different teaching styles and personalities than my own. The ratio of
  programming co-op has risen to three quarters and more, and all the
  downstream faculty are happy about the students’ programming skills.

Edit: for those very interested in the rational behind the curriculum, here's the main architect's explanation - http://www.youtube.com/watch?v=m3be1PHW5X0

Title: Why is Scheme my first language in university?

Body:
I hear about C, C++, Java every day whenever people starting talking about computer science, but in my first computer science class we are asked to write in Scheme (DrRacket).

Why is that?

What differences will this make to my future understanding of programming?

UPDATE: I have finished my first term, but not completely done with Scheme. In my second term (which is now) we got in to C programming. It was frustrated to learn pointers at first, but now I feel much better.

There's not much more to say than that. I'm trying to teach myself Java (or C++?) for the OOP part which I'm missing. So far, I still like functional programming best. Lambda is just fascinating. :)


问:
When and how much should we validate input when working with (C)AP storage?
Herein, we consider a server-client architecture. Suppose we keep the details flexible, but there's more than one layer of servers supporting our hypothetical service. The general question is "When and how much do I validate client data?".

From other questions and answers I've read, the answer may be summarized as one of the following strategies (or a combination thereof).

Validate all data as soon as it arrives from the client. Other servers trust each other.

Validate all data on every server in the system. (this is not heavily favored)

Validate all data rigorously when it reaches the database, and optionally elsewhere as required by the application.

At all levels, validate exactly as much data as that particular server needs to do its job.

Number 3 seems particularly popular.

In the answers I've seen, however, there seems to be an implicit assumption of the classical RDBMS ("OldSql") centralized data storage. These are the MySQLs and Postgres's of the world. Taking cues from the CAP theorem, let's call these CP databases, as they tend to provide tools for consistency at the expense of some class of availability: usually, only a delegated master can write to a particular partition.

Recent alternatives to the classical RDBMS (specifically Voldemort, Riak, and Cassandra, which are modeled after the Dynamo storage system) are better classified as AP databases. These tools allow natural inconsistencies to appear upon data retrieval (e.g. multiple data values with vector clocks) in exchange for "always writeable" availability. Given that these data stores have rather unique properties, I pose the question:

Does the client data validation story change when we use AP datastores? How much of my client data should I validate before and after insertion to an AP database?

答:
This issue revolves around being able to trust a calling layer. Each intra layer communication can be seen as a client-server system. At one point you will end up having the bottom layer to make a decission wheter or not the incoming data is valid. So therefore the paradigm stands, don't trust anything the client tells you!

The validation that you execute though varies per layer of the application, specifically per layer responsibility. If you talk about a persistence layer, it should at minimum check wheter it's able to properly store and retrieve the data handed down from the client. If something invalid is found, only the caller should be informed. The caller itself is then responsible for further notification. That also means you do not check business rules because in essence that is not the persistence layers responsibility.


答:
Our upgrade from VS6 to VS2008 required one developer working for several weeks to upgrade our codebase before the rest of us could even start the process of upgrading both the software and the coding practices.  Then there was testing, and after over a year, we still occasionally hit an obscure bug caused by it.

Our project and make files cannot be upgraded to 2010 (they barely made it to 2008), so that is only used for work on our newest products. Our upgrade will be complete only once all our customers finish migrating, and we don't even have those products ready for beta releases yet. By then, 2010 will be the old obsolete system.

Title: C++ and the use of old Visual Studio versions

Body:
Based on the behavior of some of our customers, I have come to wonder if many c++ development shops decided to just stop at vs2005. Is this just a quirk of the dozen or so large organizations that we deliver DLL+IMPLIB to, or is there a general groundswell of disinterest in the industry at large in upgrading?

Note that there's no MFC at work here, just a Windows compile of C++ code that is also delivered on linux and whatnot. And the question is, "Is it my imagination, or is it that big companies that build things like search engines in C++ have just stopped upgrading?"

NOTE

None of the answers so far appear to report actual personal experience with making a decision to upgrade or not, but rather either offer general principles or report very vague hearsay.


答:
Whenever your writing a resume there is one question you should be asking yourself.

Does this really, truly add value to my resume?

If it does not add value to your resume then it is adding clutter. A resume should be quick and concise. If you feel the technology helps demonstrate depth or breadth of experience keep it.

Always ask yourself, if you're reviewing a stack of 200 resumes for that position do you really want to see the technology(ies) on there? If you don't care, your potential employer won't care.

It may not necessarily harm your resume but it could potentially obfuscate what is truly important or the added length (in some situations) could send it straight to the shredder.


答:
I believe this is what you missed:

Facebook's lab must acquire enough machinery to ensure it can create all the necessary compounds no matter what compounds are available on the market

In other words, you must have enough machines so you will be able to go from X -> Y for any compounds X and Y. In your solution, 2 6 5, if you are given C1 you can't create C2 or C3.

Title: Why are assumptions important when defining a puzzle?

Body:
in this question OP has presented a site where some puzzle are available. He described the problem about solving them. I was curious is that really so problematic. The first one was really easy, so I tried next one this time from the end that should be the hardest one (puzzle).

And here I have some problem with understating it or probably I am messing something.

Let focus on the example:

Data:

```<code>M1      C1      C2      277317
M2      C2      C1      26247
M3      C1      C3      478726
M4      C3      C1      930382
M5      C2      C3      370287
M6      C3      C2      112344
</code>```

Result:

```<code>617317
2 3 6
</code>```

My problem is that relying on the assumption that

any one compound can be used in a chemical reaction to create any
  other compound

The solution could be

```<code>508878
2 6 5
</code>```

Why ? In the content of the task, we do not have sad anything about that we have to start with compound one then from this get two then from two, three etc.

So the result should be to have all cheapest compounds, basing on the assumption we dont need to care how it was created. So this reduce our problem to structure like this.

```<code>M1      C2      277317
M2      C1      26247
M3      C3      478726
M4      C1      930382
M5      C3      370287
M6      C2      112344
</code>```

And from this list we should pick the lowest cost for each compound.

So how did the achieve that solution, 2 3 6 ?

By me they have used to complex logic for that, their basic assumption was that

C1 -> C2 is the same as C2 -> C1 so they have used a rank (hash code)

```<code>17 * 37 * 1 * 2 == 17 * 37 * 2 * 1
</code>```

(for this post i have used easier representation using the bit shift and bit-wise or that is
more less the same)

```<code>M1    001 | 010 = 011  277317
M2    010 | 001 = 011  26247
M3    001 | 100 = 101  478726
M4    100 | 001 = 101  930382
M5    010 | 100 = 110  370287
M6    100 | 010 = 110  112344
</code>```

After such operation the set of solution is reduced to this form

```<code>M1    3  277317
M2    3  26247
M3    5  478726
M4    5  930382
M5    6  370287
M6    6  112344
</code>```

So now I don't have the information about compounds, but only a rank that provide the solution.

We had three compounds on start we have three ranks so is seams to be correct, and the result is
the same that in the example (cost 508878 machines 2 6 5).

My observation is that the content of the puzzle is very funny but have a lot of holes in the limitation about the method that should be applied to achieve the result.

So concluding, what i am messing ?


答:
In pseudo-code:</p>

```<code>dictionary = Dictionary<Host, Queue<EmailMessage>>;
for each email message in original list:
   dictionary[host].Enqueue(message);

for (i in 1..number of threads):
    in a new thread:
        while (!queue.Empty):
            (host, messages) = dictionary.ReturnAndRemoveARandomItemAtomically();
            send the first X emails in messages to host
            if the message list isn't empty:
                dictionary[host] = messages
</code>```

Title: Deploy multiple emails to email providers, but without showing favouritism

Body:
We are currently developing a new email deployment system.  We have the system currently configured so that it reads a record from the database and loads the email content and deploys it to the target.  Now we want to move this over to multiple threads.  That is easily done, except we then hit the email providers returning SMTP codes referring to "Too many connections", or "Deferred connection".  The solution to this is to have a thread open up a connection to the email provider and deploy n emails and then disconnect.  We have currently configured the application so that it will support these session based email deployments.

The problem is this, the database table has multiple email addresses in and they aren't grouped by email provider because that will show favouritism.  We need to be able to retrieve a set number of, i.e. Hotmail, emails (@hotmail.com, @hotmail.co.uk, @live.co.uk) so that we are reducing the number of connections to Hotmail and reducing the risks of getting the "Too many connections" error.  We are at the point now where we have gone round and round in circles trying to get a solution, so I thought I'd throw it out there and see if anyone has any ideas?

EDIT

I would like to stress that this application is not used for spamming purposes.

Body:
In pseudo-code:

dictionary = Dictionary<Host, Queue<EmailMessage>>;
for each email message in original list:
   dictionary[host].Enqueue(message);

for (i in 1..number of threads):
    in a new thread:
        while (!queue.Empty):
            (host, messages) = dictionary.ReturnAndRemoveARandomItemAtomically();
            send the first X emails in messages to host
            if the message list isn't empty:
                dictionary[host] = messages


答: Unless you're pressed for space or simply want nothing to do with the technology in question, there's no particular reason to remove them.  If you send in a resume and it just so happens they're trying to replace an old app written in Clipper with something new, having Clipper on your resume isnt going to hurt.</p>


答:
I just ask myself the question: Do I want to do this in my next job?

If no then I just remove the line.
Extreme I know.


答:
If your goal is just to land a job, any job, then put everything you know on your resume.

If your goal is to land a job that you'll enjoy, leave out the stuff that gives you migraine headaches or that you otherwise think could be a liability in how you position yourself.

Don't leave skills out just because they relate to older technology.


问:
Is it more secure to hash a password multiple times?
I've read a few times that when storing passwords, it's good practice to 'double hash' the strings (eg. with md5 then sha1, both with salts, obviously).

I guess the first question is, "is this actually correct?" If not, then please, dismiss the rest of this question :)

The reason I ask is that on the face of it, I would say that this makes sense. However, when I think about it, every time a hash is rehashed (possibly with something added to it) all I can see is that there is a reduction in the upper bound on the final 'uniqueness'... that bound being related to the initial input.

Let me put it another way: we have x number of strings that, when hashed, are reduced to y possible strings. That is to say, there are collisions in the first set. Now coming from the second set to the third, is it not possible for the same thing to occur (ie. collisions in the set of all possible 'y' strings that result in the same hash in the third set)?

In my head, all I see is a 'funnel' for each hash function call, 'funneling' an infinite set of possibilities into a finite set and so on, but obviously each call is working on the finite set before it, giving us a set no larger than the input.

Maybe an example will explain my ramblings?
Take 'hash_function_a' that will give 'a' and 'b' the hash '1', and will give 'c' and 'd' the hash '2'. Using this function to store passwords, even if the password is 'a', I could use the password 'b'.

Take 'hash_function_b' that will give '1' and '2' the hash '3'. If I were to use it as a 'secondary hash' after 'hash_function_a' then even if the password is 'a' I could use 'b', 'c' or 'd'.

On top of all of that, I get that salts should be used, but they don't really change the fact that each time we are mapping 'x' inputs to 'less than x' outputs. I don't think.

Can someone please explain to me what it is that I am missing here?

Thanks!

EDIT: for what it's worth, I don't do this myself, I use bcrypt. And I'm not really concerned about whether or not it's useful for 'using up cycles' for a 'hacker'. I genuinely am just wondering whether or not the process reduces 'security' from a hash collision stand point.

答:
In general, you don't need to use more than one hashing algorithm.

What you need to do is:

Use salt: salt isn't used just to make your password more secure, it's used to aboid rainbow table attack. That way, someone will have a harder work trying to precompute the hash for passwords you store in your system.

Use multiple interations: instead of doing just SHA(password + salt), do SHA(SHA(SHA(SHA(SHA(...SHA( password + salt )))))) . Or, to represent in other way:

```<code>hash = sha(password + salt)
for i=1 , i=5000, i++ {
    hash = sha(hash + salt);
}
</code>```

And, finally, choose a good hashing function. SHA, MD5, etc, are not good because they are too fast. Since you want to use hash for protection, you'd better use slower hashes. Take a look at Bcrypt, PBKDF2 or Scrypt, for example.

edit: after observations, let's try to see some points (sorry, long explanation to get to the end, because it might help others searching for similar answers):

If your system is secure, like no one will ever ever get access to the stored password, you wouldn't need hash. The password would be secret, no one would get it.

But no one can assure that the database with the passwords will be stolen. Steal the database, got all the passwords. Ok, your system and your company will suffer all the consequences of it. So, we could try to avoid this password leaking.

NOTICE  that we are not worried about online attacks in this point. For one online attack, the best solution is to slow down after bad passwords, lock the account after some tries, etc. And for that it doesn't matter which way you encrypt, hash, store, etc, your password. Online attack is a matter of slowing down the password inputs.

So, back to the don't let them take my plain passwords problem. The answer is simple: don't store them as plain text. Ok, got it.

How to avoid that?

Encrypt the password (?). But, as you know, if you encrypt it, you can decrypt it back, if you have the proper key. And you'll end up with the problem of "where to hide" the key. Hum, no good, since they got you database, they can get your key. Ok, let's not use it.

So, another approach: let's transform the password in something else that can't be reversed and store it. And to verify if the supplied password is correct, we do the same process again and check if the two tranformed values match. If they match = the good password was supplied.

Ok, so far so good. Let's use some MD5 hash in the password. But... if someone has our stored hashed value of password, he can have a lot of computer power to calculate the MD5 hash of every possible password (brute force), so he can find the original password. Or, even worst, he can store all the MD5 from all characteres combinations, and easily find the password. So, do a lot of iteractions, the HASH(HASH(HASH())) thing, to make it harder, because it'll take more time.

But even that can be circunvented, the rainbow table was created exactly to speed up against this kind of protection.

So, let's use some salt over it. This way, at each interaction, the salt is used again. One trying to attack your passwords will have to generate the rainbow table considering that the salt is added each time. And when he generates that rainbow table, since it was generated with one salt, he'll have to calculate again with the other salt, so he will have to spend some time for each password (=each salt). Salt won't add "more complexity" to the password, it'll just make the attacker loose time generating the rainbow table, if you use one salt for each password, the table from one salt is useless to another password.

And using more than one hash will have helped here? No. The person generating a specific rainbow attack will be able to generate it using one or more hashes, anyway.

And using more than one hash can lead you to one problem: it's as secure as the weakest hash you use. If someone find collisions in one hash algorithm, it's that hash that will be exploited, at any point of the the iteration process, to break the password. So, you don't gain anything by using more hashes algorithms, it's better to choose just one good algo. and use it. And if yuo ever hear that it has been broken, think how you'll change it in your application.

And why use bcrypt or something like that (you say you use it): because the attacker will have to spend more time generating the tables. That's why using MD5 + wait (3 seconds) doesn't help: the attack will be offline, anyway, so the attacker can generate the tables without the (3 seconds delay).

Body:
In general, you don't need to use more than one hashing algorithm.

What you need to do is:

Use salt: salt isn't used just to make your password more secure, it's used to aboid rainbow table attack. That way, someone will have a harder work trying to precompute the hash for passwords you store in your system.

Use multiple interations: instead of doing just SHA(password + salt), do SHA(SHA(SHA(SHA(SHA(...SHA( password + salt )))))) . Or, to represent in other way:

hash = sha(password + salt)
for i=1 , i=5000, i++ {
    hash = sha(hash + salt);
}

And, finally, choose a good hashing function. SHA, MD5, etc, are not good because they are too fast. Since you want to use hash for protection, you'd better use slower hashes. Take a look at Bcrypt, PBKDF2 or Scrypt, for example.

edit: after observations, let's try to see some points (sorry, long explanation to get to the end, because it might help others searching for similar answers):

If your system is secure, like no one will ever ever get access to the stored password, you wouldn't need hash. The password would be secret, no one would get it.

But no one can assure that the database with the passwords will be stolen. Steal the database, got all the passwords. Ok, your system and your company will suffer all the consequences of it. So, we could try to avoid this password leaking.

NOTICE  that we are not worried about online attacks in this point. For one online attack, the best solution is to slow down after bad passwords, lock the account after some tries, etc. And for that it doesn't matter which way you encrypt, hash, store, etc, your password. Online attack is a matter of slowing down the password inputs.

So, back to the don't let them take my plain passwords problem. The answer is simple: don't store them as plain text. Ok, got it.

How to avoid that?

Encrypt the password (?). But, as you know, if you encrypt it, you can decrypt it back, if you have the proper key. And you'll end up with the problem of "where to hide" the key. Hum, no good, since they got you database, they can get your key. Ok, let's not use it.

So, another approach: let's transform the password in something else that can't be reversed and store it. And to verify if the supplied password is correct, we do the same process again and check if the two tranformed values match. If they match = the good password was supplied.

Ok, so far so good. Let's use some MD5 hash in the password. But... if someone has our stored hashed value of password, he can have a lot of computer power to calculate the MD5 hash of every possible password (brute force), so he can find the original password. Or, even worst, he can store all the MD5 from all characteres combinations, and easily find the password. So, do a lot of iteractions, the HASH(HASH(HASH())) thing, to make it harder, because it'll take more time.

But even that can be circunvented, the rainbow table was created exactly to speed up against this kind of protection.

So, let's use some salt over it. This way, at each interaction, the salt is used again. One trying to attack your passwords will have to generate the rainbow table considering that the salt is added each time. And when he generates that rainbow table, since it was generated with one salt, he'll have to calculate again with the other salt, so he will have to spend some time for each password (=each salt). Salt won't add "more complexity" to the password, it'll just make the attacker loose time generating the rainbow table, if you use one salt for each password, the table from one salt is useless to another password.

And using more than one hash will have helped here? No. The person generating a specific rainbow attack will be able to generate it using one or more hashes, anyway.

And using more than one hash can lead you to one problem: it's as secure as the weakest hash you use. If someone find collisions in one hash algorithm, it's that hash that will be exploited, at any point of the the iteration process, to break the password. So, you don't gain anything by using more hashes algorithms, it's better to choose just one good algo. and use it. And if yuo ever hear that it has been broken, think how you'll change it in your application.

And why use bcrypt or something like that (you say you use it): because the attacker will have to spend more time generating the tables. That's why using MD5 + wait (3 seconds) doesn't help: the attack will be offline, anyway, so the attacker can generate the tables without the (3 seconds delay).


答:
Some of the more impressive CVs I've read mention hardly any specific technologies, unless they're an integral part of explaining the work done on a particular project. </p>

<p>I personally drop the older ones as soon as they're embarrassing to me. </p>

Body:
Some of the more impressive CVs I've read mention hardly any specific technologies, unless they're an integral part of explaining the work done on a particular project.

I personally drop the older ones as soon as they're embarrassing to me.


答:
This is more suited on security.stackexchange but...

The problem with

```<code>hash1(hash2(hash3(...hashn(pass+salt)+salt)+salt)...)+salt)
</code>```

is that this is only as strong as the weakest hash function in the chain. For example if hashn (the innermost hash) gives a collision, the entire hash chain will give a collision (irrespective of what other hashes are in the chain).

A stronger chain would be

```<code>hash1(hash2(hash3(...hashn(pass + salt) + pass + salt) + pass + salt)...) + pass + salt)
</code>```

Here we avoid the early collision problem and we essentially generate a salt that depends on the password for the final hash.

And if one step in the chain collides it doesn't matter because in the next step the password is used again and should give a different result for different passwords.

Title: Is it more secure to hash a password multiple times?

Body:
I've read a few times that when storing passwords, it's good practice to 'double hash' the strings (eg. with md5 then sha1, both with salts, obviously).

I guess the first question is, "is this actually correct?" If not, then please, dismiss the rest of this question :)

The reason I ask is that on the face of it, I would say that this makes sense. However, when I think about it, every time a hash is rehashed (possibly with something added to it) all I can see is that there is a reduction in the upper bound on the final 'uniqueness'... that bound being related to the initial input.

Let me put it another way: we have x number of strings that, when hashed, are reduced to y possible strings. That is to say, there are collisions in the first set. Now coming from the second set to the third, is it not possible for the same thing to occur (ie. collisions in the set of all possible 'y' strings that result in the same hash in the third set)?

In my head, all I see is a 'funnel' for each hash function call, 'funneling' an infinite set of possibilities into a finite set and so on, but obviously each call is working on the finite set before it, giving us a set no larger than the input.

Maybe an example will explain my ramblings?
Take 'hash_function_a' that will give 'a' and 'b' the hash '1', and will give 'c' and 'd' the hash '2'. Using this function to store passwords, even if the password is 'a', I could use the password 'b'.

Take 'hash_function_b' that will give '1' and '2' the hash '3'. If I were to use it as a 'secondary hash' after 'hash_function_a' then even if the password is 'a' I could use 'b', 'c' or 'd'.

On top of all of that, I get that salts should be used, but they don't really change the fact that each time we are mapping 'x' inputs to 'less than x' outputs. I don't think.

Can someone please explain to me what it is that I am missing here?

Thanks!

EDIT: for what it's worth, I don't do this myself, I use bcrypt. And I'm not really concerned about whether or not it's useful for 'using up cycles' for a 'hacker'. I genuinely am just wondering whether or not the process reduces 'security' from a hash collision stand point.

Body:
This is more suited on security.stackexchange but...

The problem with

hash1(hash2(hash3(...hashn(pass+salt)+salt)+salt)...)+salt)

is that this is only as strong as the weakest hash function in the chain. For example if hashn (the innermost hash) gives a collision, the entire hash chain will give a collision (irrespective of what other hashes are in the chain).

A stronger chain would be

hash1(hash2(hash3(...hashn(pass + salt) + pass + salt) + pass + salt)...) + pass + salt)

Here we avoid the early collision problem and we essentially generate a salt that depends on the password for the final hash.

And if one step in the chain collides it doesn't matter because in the next step the password is used again and should give a different result for different passwords.


答:
In the table that contains the messages that are queued, I'd also include a parsed out provider name (ie, 'hotmail.com', 'yahoo.com') and a flag indicating if the email address is from a 'bulk' provider (the exact meaning of which depends on whatever limits your'e seeing now - if there's a lot of email addresses from a specific provider, mark it as bulk).  Have one or more processes/threades work against non-bulk provider emails, and one or more others dedicated to a single bulk provider each.

If you want to pull them back in random order, when you queue the message add a random number.  Sort by that first when you pull out addresses for a particular provider.  This way they go out in a different order each time.


答: My understanding is that using multiple hashing algorithms is to defeat rainbow tables. Using a good salt works too, but I guess it's a second level of protection.</p>


问:
Do object-oriented programming languages exist that are not class-based?
Are there any object-oriented programming languages that are not based on the class paradigm?</p>

答: Languages like JavaScript are based on prototypes, where behavior is reused by cloning existing objects. The Wikipedia article that I linked to indicates that Lua, ActionScript, and a number of other languages follow this paradigm.</p>


问:
Stuff every programmer needs while working
I've been tasked with creating a fun and relaxing environment, one thing I know that I want is ergonomic mice and keyboards, others have suggested exercise balls and bands.

What is it that every programmer needs while working? What might not be necessary but would be nice to have anyway?

Note: this question was asked previously, but has been recommended to be posted here. See this link for the previous responses: https://stackoverflow.com/questions/3911911/stuff-every-programmer-needs-while-working-closed

答:
This may sound ridiculous, but a music room for musically-inclined developers stocked with relatively inexpensive instruments and modest amplifiers.

While working remotely at home, there's nothing better at keeping my brain actively thinking about solutions than practicing my guitar.

ContentLicense: CC BY-SA 2.5


答: The most popular object-oriented programming language in the world doesn't have classes, it's called Javascript and is prototype based : http://en.wikipedia.org/wiki/Prototype-based_programming</p>

Title: Do object-oriented programming languages exist that are not class-based?

Body: Are there any object-oriented programming languages that are not based on the class paradigm?</p>


答:
Object-orientation is an umbrella term for several important concepts that are only partly contingent upon each other. For instance, inheritance can be declared on a case-by-case basis between instances rather than between classes, or the entire class can be represented by a concrete  prototype object, as Thomas wrote. It's just more usual to separate structure description from instance creation. Similarly, late binding means that objects with nominally the same method don't necessarily do the same thing when it is invoked, and that the decision is made at runtime. That is likewise possible with the prototype-based approach. And encapsulation is essentially completely independent of whether your objects are instances of declared classes or not.

That said, most OO languages are firmly in the class-based camp. But even then there are idioms that blur the line: the domain-driven design often leads to systems in which the identity of particular objects is much more important than the static class diagram, and decorators allow objects of the same class or interface to have very different behavior.


答:
As far as I know, Self is the original language that invented the "class-free" paradigm based on prototypes. It already existed (in an experimental stage) in the 1980s and pushes Smalltalk's elegant usage of the prototype pattern to the extreme, such that classes are completely eliminated.

It influenced all the other "class-free" OO languages I know of:

most prominently Javascript,

the classical programming language and environment Squeak (which is built on top of Smalltalk)

the multi-paradigm script language Lua.


答:
This isn't more secure. However, you have a protocol of identification based on hash multiple times with the same function.

This goes that way. The stored value is hash^n(pass) in computer A. A ask B to authentify and gives B the integer n. B does the calculation hash^(n-1)(pass) and send it back to A.

A check that hash(hash^(n-1)(pass)) == hash^n(pass) . If it is true, then the authentification is done. But then, A store hash^(n-1)(pass) and next authentification, will give B n-1 instead of n.

This ensure that the password is never exchanged in clear, that A never knows what the password is, and that authentification is protected by replay. However, this has the drawback to require password with a finite lifetime. When n reach the value 2, a new password must be choosen after authentification.

Another use of multiple hash is the tool HMAC, to ensure authentification and integrity of a request. For more about HMAC see http://en.wikipedia.org/wiki/HMAC .

Most usage of multiple hash in the real world are overkill. In your case, it seems to be. Note that if you use several hash functions, they will not all have the same entropy, thus this reduce the strengh of the hash. For exemple, md5 has less entropy than sha1, so using sha1 on an md5 will not improve the strength of the hash. The strengh will generally be equal to the strength of the weaker hash function.


问:
Is there a list of common usernames to reserve in a new system?
I need to reserve usernames in my new website.

These generally fall into three categories

1) usernames no-one should have (eg: admin, user, service, help, root, etc)

2) names of super famous people or companies we may want to reserve in the event that they show up

3) other names specified by us directly.

It would be really helpful if some list of usernames for the first 2 categories existed somewhere and I could just use them.

Does anyone know of such a list?

答:
A good way to find those standard usernames is by using word-lists designed for brute-force attacks. They may contain too many simple names but a simple search using your favorite search engine for a combination of "brute-force", "dictionary" and "wordlist" may bring up what you need. E.g. :

There are many of those lists, but no standard list.

This link from the Internet Archive contains a gzip compressed text file of word-lists from 2013.

OwnerDisplayName: mattx

OwnerDisplayName: sanosdole


答:
Yes I have this list with  more than 300 reserved usernames.
I had to create the list because I am the webmaster of http://postbit.com/ (where users can choose any username as a subdomain  (yourname.postbit.com) to create blog and photo albums. We created a list of reserved usernames and subdomains that can not be registered by others.

Here is our complete list of reserved names:
http://blog.postbit.com/reserved-username-list.html

Before we had that list, one of the first users registered his username as "www", so he took our main domain and we had to remove his login and create this blacklist.

In the list there are default domain names (such as www, ftp, poop, smtp, ns..), some default unix usernames (root, webmaster, mysql, http, pop, postfix) and reserved words for internal use (devel, tests, scripts, support, search) and also reserved usernames for future use (mobile, downloads, music, games) and more.

Title: Is there a list of common usernames to reserve in a new system?

Body:
I need to reserve usernames in my new website.

These generally fall into three categories

1) usernames no-one should have (eg: admin, user, service, help, root, etc)

2) names of super famous people or companies we may want to reserve in the event that they show up

3) other names specified by us directly.

It would be really helpful if some list of usernames for the first 2 categories existed somewhere and I could just use them.

Does anyone know of such a list?

OwnerDisplayName: Rodrigo Siqueira


答:
Using different hashing algorithms is a bad idea - it will reduce entropy rather than increase it.

However, assuming you have a cryptographically strong hashing algorithm and a good salt, applying the same hash function several times makes the hashing process more computationally expensive. The benefit of this is that when other means of cracking the password hash fail (guessing, dictionary attacks, rainbow tables, etc.), and the attacker is forced into brute-force techniques, it takes them longer to try each password, simply because they have to apply the same hash function more often. So if one round of hashing would require one month of brute-forcing, applying it twelve times would increase the estimated time to a year.

Recent hashing algorithms like bcrypt build on this idea; they contain a parameter to control the computational complexity of the hash, so that you can scale it as hardware speeds progress: when hardware becomes faster by a factor of two, you increase the complexity to compensate, so the time required to brute-force your hashes remains roughly constant.


问:
How to test the tests?
We test our code to make it more correct (actually, less likely to be incorrect). However, the tests are also code -- they can also contain errors. And if your tests are buggy, they hardly make your code better.

I can think of three possible types of errors in tests:

Logical errors, when the programmer misunderstood the task at hand, and the tests do what he thought they should do, which is wrong;

Errors in the underlying testing framework (eg. a leaky mocking abstraction);

Bugs in the tests: the test is doing slightly different than what the programmer thinks it is.

Type (1) errors seem to be impossible to prevent (unless the programmer just... gets smarter). However, (2) and (3) may be tractable. How do you deal with these types of errors? Do you have any special strategies to avoid them? For example, do you write some special "empty" tests, that only check the test author's presuppositions? Also, how do you approach debugging a broken test case?

答:
One tactic is to write the test before the code it tests, and ensure the test fails first for the right reason.  If you use TDD you should get at least this level of testing of tests.

A more exhaustive way to test the quality of a test suite is to use mutation testing.

Title: How to test the tests?


问:
Is AOP widely used in the enterprise sector
I'm curious to here the opinions of people working in large enterprise organisation whether AOP is widely (or even modestly) used when they are developing? Is AOP something which is inherent in the design. Because from everything I managed to find on the Internet (including by reading the AspectJ in Action, 2nd ed. book) I was left with the impression that AOP is something which is more of a "niche" type of technology. My main point is whether there is a point in investing effort and time in learning to an acceptable level - e.g. the join-point mechanism, advices etc.

Furthermore, do you design with AOP in mind or you use it to amend shortcomings in an existing design?

答:
In my experience, it's not very widely used. The most I've ever seen is using Spring to handle some dependency injection, and even that was not very heavily used.

I imagine I'd see more of it if it were available as a core feature of whatever language was being used (we don't just use Java), rather than 3rd party tools and libraries (if there are languages that have AOP as core features, I'm not aware of them, but I'm interested to hear about them!).


答: If you're hoping to end up being vary large and want to reserve celebrity names (which, I personally think is reasonable from a future marketing standpoint) I would consider grabbing the top few hundred twitter handles from http://twitaholic.com/ </p>


问:
Are there best practices for checking for errors in business logic for DB refreshes?
I'm working for a company with very large databases which all refresh overnight, ready for users to interrogate in the morning.  These over night loads essentially truncate all the tables, and reload again using pretty complicated business logic.

This is all fine and good, but occasionally, rather than going through the proper routes, a quick fix is needed in the business logic, and changes will be made on the "Live" server to the business logic without too much testing.

This has, as I'm sure you can imagine, resulted in subtle but significant mistakes being made.  I basically want to now independently write logic (in T-SQL probably) which will try to spot any abnormal changes, so at least I'm ahead of the game, and can report them sooner.

My question is, fairly obviously, does anyone have any advice on this?  Is there any theory or general good practice which I could incorporate to hopefully limit the impact of future "quick and dirty" changes to business logic?

Just so you know, we do use source control, and use Live, UAT, and Dev server environments, its just that sometimes, changes need to made immediately, rather than going through the stricter channels.

答:
The use of transactions should pay off here. If any issues arise, don't commit the changes being made, simply roll it back to either the beginning or at a another point in time (break it up into multiple transactions with tables for each step). If you use additional tables for each step in your process, you can go through the data changes made at each point and pinpoint where the error occurred.

Based on the feedback you had given me for my original answer. We know a few things about you environment:

(1) It's a corporate environment where there is little communication between teams. This is evidenced by the fact it appears to be difficult for you to obtain log files from the DBA team.

(2) It's a behemoth of a system.

Before you can fix a problem, you need to understand it. In your case, getting the log files and keeping a diary/journal of the errors and types of errors you are getting will give you a better idea of what's happening. Are you getting data entry errors?  Is there data missing? Is referential integrity being violated anywhere? If you can theme the errors, you will have a better understanding of what is going wrong. If getting the logs is as troublesome as you say, speak to your manager about the problem and ask him if he can obtain the logs for you. In a corporate environment, people tend to be very territorial about their work and don't answer to everybody as they are probably under a lot of stress with minimum bandwidth to deal with other issues. If the request comes from someone higher up, you may get a more positive response.

Once you have got the log files and managed to theme the problems, you should have a second discussion with your manager. Give him feedback on what you have found and suggest two or three solutions to resolving this. Outline the short term and long term benefits of each, providing a rough estimate of how long you believe it would take to implement. The key here is communication. Your replies to my initial answer indicate there is a complete lack of it, so you need to make a strong effort to promote it. Having your manager supporting you will give you an additional medium to communicate with the DBA team as he can speak to their manager if they become unresponsive.

If all this fails and you are unhappy with the situation, my only other advice is that you look for another place to work. I've found this situation happens in many companies and to different degrees, and it can boil down to a case of how much you can tolerate.  After it happened to me a few times, I came to the conclusion that it simply was not my company and the issues that came up were down to management. If it made life difficult for me, I'd simply move on to other things. Life is too short.

Obviously, you can make use of the standard log files that come with your DBMS on-top of this, but if your company operates under a "hurry up mantra" with regards to getting stuff out the door and it's causing a lot of delays, you should make an effort to discuss these problems with management. Show them what their ignorance of testing is costing them.


问:
How much design to do first?
I have never worked with a professional software development team. As such, analyzing and thinking about each and every aspect of my software does not come naturally to me.

Whenever I strike an idea that excites me I just start a new project in my IDE (after finishing the previous one) and I start designing the interface—which means to me as placing menubars, buttons and other components at their appropriate places—and start coding for them. Recently I started a chess game in Java and I followed that pattern: first programmed the black-white grid, then registered a mouse listener etc. without thinking about warriors/objects of chess game.

One thing that annoys me is that I have never been able to completely use object-oriented features of object-oriented programming, though I understand it. I have the habit of taking on things when it comes. This could be the reason of the poor design I end up with.

I complete all the projects that I start, but since they are personal projects I have never felt the need to refactor the code. But I know that if I am asked to modify any function of my program I could be in a mess because they are not properly designed (though they work as asked).

What is the correct/better way to start to design software that is somewhat complicated like a chess game?

答:
"What is the correct/better way to start to design software that is somewhat complicated like a chess game"

I think you want to avoid complexity and strive for simplicity when designing software artifacts. One book I can highly recommend to you on the subject is Eric Evan's Domain Driven Design, which outlines various strategies for designing software with a strong bias on having a discrete domain layer in place for your software projects.

"I know that if I am asked to modify any function of my program I could be in a mess because they are not properly designed (though they work as asked)."

It's easy to be wise with hindsight and point out the failings of an application once it's in a state of readiness, but you need to recognize that the whole process of good software development is a ongoing process and new strategies/technologies come out nearly every year. I may not be interpreting what your saying here, but it sounds like you lack confidence a little. Do people give you feedback on your code? One way to start the ball rolling is to do code reviews or even some pair programming. Eventually, you'll build up your confidence and be able to tackle a software project without too much worry. Typically, I never think of a software project as "finished" as such. It can always be improved and tidied up in different ways. Be a critic of your work, when you've written a class/method think about how it could be improved, imagine that code was submitted to you by another developer for review. What advice would you give him/her to improve it?

With regards to reading, I'd certainly read Domain Driven Design and I'd have a look at Code Complete. You should also have The Pragmatic Programmer somewhere near the top of your reading list. You can do all the reading in the world, but to get confidence and improve, you need to actively develop software projects, being a critic of your own work and also getting feedback from other developers.

Title: How much design to do first?


答:
Fortress is an object-oriented language based on traits instead of classes. The difference is mainly in implementation composition. An object's behavior (method definitions) is still determined by the declarations at a specific point in the program text. So in that sense it's similar to class-based systems.

There are object calculi (by Cardelli, I think), that are purely object-based. Every method is an instance member. You form new objects by taking the contents of an existing object and adding, removing, or replacing some of its members. It's slightly different from prototypes, since the new object has no link to the old object, just some of its contents.

IIRC, it's possible to program in a similar way using Python and other hashtable-oriented languages: you can add a function as an instance member and then call it as a method.


答:
In my experience, it's widely touted and talked about - either to show technical supremacy or value of trainings given. But when it comes to code on ground zero almost no one uses it! It's kinda hard and the nomenclature is quite unintuitive - advice, join-points, point-cuts etc.,

I've known more than a handful of seasoned people who still get confused with the terminologies!

The question is more of is AOP 'worth it'? It well may be if a lot of things in your application can be put into 'aspects' so to speak. So the return on investment of AOP could be justifiable.

For your project you should (strongly suggested) question its worth. Would a simpler technique be beneficial or is AOP simply being used to jump onto the buzzword bandwagon? That'll help you decide for yourself, irrespective of whether other companies are using it!

Title: Is AOP widely used in the enterprise sector

Body:
I'm curious to here the opinions of people working in large enterprise organisation whether AOP is widely (or even modestly) used when they are developing? Is AOP something which is inherent in the design. Because from everything I managed to find on the Internet (including by reading the AspectJ in Action, 2nd ed. book) I was left with the impression that AOP is something which is more of a "niche" type of technology. My main point is whether there is a point in investing effort and time in learning to an acceptable level - e.g. the join-point mechanism, advices etc.

Furthermore, do you design with AOP in mind or you use it to amend shortcomings in an existing design?


答: When that technology experience is not geared for the job description. Remember, Resumes are to be customized for the specific position you're aiming at. </p>


答:
A big part of design is functionality. Don't fragment it and constrain it into arts only. So as you build the architecture, intertwine with it and visualize a design that unifies not only makes it prettier but also evermore so functional.

Examples of this are: Leonardo Da Vinci's work, Apple Design etc.

Also wikipedia has a good entry about "Form over Function" : http://en.wikipedia.org/wiki/Form_follows_function

I adopt a similar view although function is rigid enough where you can customize and beautify the product without necessarily hindering it. Our human sensibilities are still there no matter how much time we try to be functional and objective.

A good example too is the iMac with it's handle on top. Nobody moved their iMac around, but it allowed a subconscious message that emanated, "Human Control/Handling" over a machine. Small touch but it did move a lot of sales!

Title: How much design to do first?

Body:
I have never worked with a professional software development team. As such, analyzing and thinking about each and every aspect of my software does not come naturally to me.

Whenever I strike an idea that excites me I just start a new project in my IDE (after finishing the previous one) and I start designing the interface—which means to me as placing menubars, buttons and other components at their appropriate places—and start coding for them. Recently I started a chess game in Java and I followed that pattern: first programmed the black-white grid, then registered a mouse listener etc. without thinking about warriors/objects of chess game.

One thing that annoys me is that I have never been able to completely use object-oriented features of object-oriented programming, though I understand it. I have the habit of taking on things when it comes. This could be the reason of the poor design I end up with.

I complete all the projects that I start, but since they are personal projects I have never felt the need to refactor the code. But I know that if I am asked to modify any function of my program I could be in a mess because they are not properly designed (though they work as asked).

What is the correct/better way to start to design software that is somewhat complicated like a chess game?


答:
Ada, as of its 1995 revision, Ada is object-oriented, but unlike a lot of other OO languages it doesn't combine object-oriented types and modules into a single construct called a "class".  Rather than declaring a type as "class Foo", and putting all the associated method declarations inside the class declaration, you declare a package and declare the type (as a record) and other things inside the package.  It's not "class-free" in the way that some of the other mentioned languages are, it's just a slightly different way of organizing things.

Ada 95's object-oriented features were added onto the existing 1983 version of the language; it extended the existing record and package constructs to support inheritance et al.


答:
I maintain both a curriculum vitæ and a résumé.

In the curriculum vitæ I put everything I worked on and with, including technologies I used 15 years ago, along with all publications and personal projects. I have no obvious reason to remove any experience from the curriculum vitæ. It is several pages long.

On the résumé however, I only put the most recent and/or relevant technologies; most of the time my résumé is adapted to the position I am applying for. In most situations my résumé fits on a single page. Cherry-picking technologies, skills and emphasised past positions allows me to use a different résumé for a management position or a technical position.


答: I'm going to go the opposite and say that I've seen heavy usage in the Investment Banking and finance space.  The cross-cutting concerns of Security and Transactions suit AOP and are widely used by the clients I work with.</p>


答:
The simplest approach is to drop technologies off the resume when you are not expecting the reader to be interested in them.

Another way to look at this is "maybe I should drop it off, if I cannot say anything meaningful about the tech because it has been so long."

Less is more...Ludwig Mies van der Rohe


问:
What is the purpose of arrays in C, when pointers could have done the job?
Arrays and pointers are not the same thing in C, although they are related and can be used similarly. So far we all agree.

However, I don't see why arrays were included in C, when pointers could have done their job perfectly.

I am not saying to remove the array notation (e.g, a[5] or int a[4] = {0,1,2,3};), which is quite useful and convenient. But you could have that same notation working on top of pointers (as is the case), as a cosmetic measure. So the array notation is not a reason to have arrays, just the notation!

The only difference I see is that arrays are constant pointers, and the size of memory they point to can't be changed. But this can be achieved with pointers as well, exactly by making them constant (the memory wouldn't be of fixed size, but I am not sure if this is an issue).

So why not have only pointers and let the programmer decide how the pointer should behave (i.e., constant, not constant, fixed size, variable size, etc)?

答:
Array notation is convenient, easier to read, and less prone to errors.  It provides a formalism over pointers.  It might be syntactic sugar, but we all need a little sweetness once in awhile, don't we?

As with all abstractions, you give up a little flexibility for the convenience that the abstraction provides.


答:
Why would I want to not be able to use arrays for value types?

int a[4] = {0,1,2,3};

Title: What is the purpose of arrays in C, when pointers could have done the job?

Body:
Arrays and pointers are not the same thing in C, although they are related and can be used similarly. So far we all agree.

However, I don't see why arrays were included in C, when pointers could have done their job perfectly.

I am not saying to remove the array notation (e.g, a[5] or int a[4] = {0,1,2,3};), which is quite useful and convenient. But you could have that same notation working on top of pointers (as is the case), as a cosmetic measure. So the array notation is not a reason to have arrays, just the notation!

The only difference I see is that arrays are constant pointers, and the size of memory they point to can't be changed. But this can be achieved with pointers as well, exactly by making them constant (the memory wouldn't be of fixed size, but I am not sure if this is an issue).

So why not have only pointers and let the programmer decide how the pointer should behave (i.e., constant, not constant, fixed size, variable size, etc)?


答: Erlang. And yes, Erlang is an object-oriented language, as it fulfills all three points of the definition of OO.


问:
What are other technologies that are capable of creating Websites with Animation, Load Detailed Images & Cross Browser
I am a Junior Web Programmer who is tasked with redesigning our website. Right now the website is made in ActionScript using the FLEX API(so its Flash based).

I am looking for advice on what technologies I can use to create interactive websites.

The website requirements I have been given are:

- must work & look the same on iOS browsers

- should include animation, element movement & show detailed graphics

- look exactly the same across browsers

What technologies are available to me to create a website with these features?

I know of so far:

- Flash based websites can achieve this (ActionScript)

- JQuery can create rich dialogs (not sure if it does graphic animation or has cross browser compatibility, does it?)

- Can I use .NET for this? Would that mean I write the website in ASP .NET?
- Raphael.js - can rotate & animate images, is it cross browser?

- Any others that you know of? What other technologies are out there that I dont know of?

答:
All options you have(plus HTML5 canvas & CSS3) are almost capable of doing what you are tasked for, but...

IMHO, at first sight, the best technology suited for your need is Flash. You'll use only one language and IDE for doing everything, and the result will be the same everywhere.

But if you feel confident, you can archieve a good result using html related technologies, but you need to have a good experience with HTML tags, Css, Javascript and webstandards to create a full cross browser website.


问:
How do Programmers in the East see programmers in the West?
The other half of this question: How do programmers in the West see programmers in the East?

I think it's just as interesting and important to see how programmers in the east view programmers in the west.

The eastern part of the world (India/China/Philippines ) is often seen as mainly providing outsourcing services to the western world (USA and Europe).

Do you have the experience of working as part of an offshore team? If yes, how was it?

Do you hold any generalized ideas or opinions about the programmers from the West (e.g. Are they cooperative, do they deliver on time or do they do quality work?)

答:
The East follows the West :

standards

attitude

everything

Almost every book I read about IT is written by someone from the West.

I was happy when I first encountered Apache Jakarta / Struts. I thought it was asian made.


答:
The best combination of technologies that meet your criteria is HTML5 + css + javascript. You can (and should) enhance your toolset with a css framework and a javascript layout / ui library (there are many to choose from, I'd go with jQuery UI). HTML5 + javascript nowadays can do wonderful graphics related stuff, even 3D.

One great thing about going the HTML5 way to remake a Flash/Flex site is that the knowledge and experience you will get is on the core technologies that make up (and will continue to make up) most of the web, not of a propriety tool that might or might not be here tomorrow.

Apple has already shown it's tendency to move away from flash and others (will) follow, and since iOS is your core target os you should really listen to Apple. A lot of low to middle end android phones don't support flash, as it cripples their cpus. Of course Adobe could fix all of flash problems and make it fun to use and develop in again, but that hasn't happened yet.

So definitely go with HTML5.

PS. There is a Flash alternative in the dotnet family, Silverlight, I'm only noting it here because you asked. There are reports that it will be supported in iOS in the near future, but noone knows how well that will go (and even if it actually happens). Silverlight has all the problems that Flash has, as it clones Flash's philosophy. Avoid it if possible.

Title: What are other technologies that are capable of creating Websites with Animation, Load Detailed Images & Cross Browser

Body:
I am a Junior Web Programmer who is tasked with redesigning our website. Right now the website is made in ActionScript using the FLEX API(so its Flash based).

I am looking for advice on what technologies I can use to create interactive websites.

The website requirements I have been given are:

- must work & look the same on iOS browsers

- should include animation, element movement & show detailed graphics

- look exactly the same across browsers

What technologies are available to me to create a website with these features?

I know of so far:

- Flash based websites can achieve this (ActionScript)

- JQuery can create rich dialogs (not sure if it does graphic animation or has cross browser compatibility, does it?)

- Can I use .NET for this? Would that mean I write the website in ASP .NET?
- Raphael.js - can rotate & animate images, is it cross browser?

- Any others that you know of? What other technologies are out there that I dont know of?


答:
Arrays are contiguous memory created on the stack. You can't guarantee contiguous stack memory without this syntactic sugar, and even if you could, you'd have to allocate a separate pointer in order to be able to do the pointer arithmetic (unless you wanted to do *(&foo + x), which I'm not sure but it might violate l-value semantics, but is at least quite awkward, and would scream out for some kind of syntactic sugar). Design-wise, it also is a form of encapsulation, since you can refer to the collection with a single identifier (which would otherwise require a separate pointer). And even if you could allocate them contiguously and allocated a separate pointer to reference them, you'd have either
int fooForSomething, fooForSomethingElse...
which forces a fair amount of creativity as your collection grows, so you might think to simplify with
int foo1, foo2 ...,
which looks just like an array but is harder to maintain.


问:
If a language changes quickly, is this considered a good thing?
I have seen some languages that change quickly (I mean they are improved every year for example) and some others that are improved slowly.

My question, if a language changes quickly is this a good thing or a bad thing for the programmer? Do programmers like to learn new thing in the language or do they prefer to stick with what they already know?

答: I want regular improvements, but I don't want it to break a 500 kloc codebase & trigger a massive "upgrade project" just to make the code work the way it does with the previous version.</p>


答:
if a language changes quickly is this a good thing or a bad thing for the programmer?

Good

The changes might add some nice syntatic sugar making future code easier to write with fewer bugs

The changes may standardize a common idiom/design pattern that programmers have had to implement themselves or rely on 3rd parties for.

The changes may make it easier to integrate with technologies the language is typically used with

The changes may help prevent common mistakes

The changes may deprecate or eliminate dangerous programming practices

The changes may have useful additions to the language's standard library for stuff I used to have to implement myself or rely on 3rd parties for.

Bad

The language has added complexity -- new features may not always play well with the legacy features (ie C++'s relationship to C)

Legacy code may be out of date and may no longer work in the new version of the language without updates (Python 2.x -> 3.x)

Compilers and other tools for the language need to be updated. Now potentially multiple versions exist.

3rd party libraries may not support the newer version of the language

Despite the existence of a standard, it may take time to find a standard/normal way to implement new features and define some of the more obscure cases of their behavior

Do programmers like to learn new thing in the language or do they prefer to stick with what they already know?

Many programmers enjoy satisfying their curiosity by playing with the new features. However this does not mean that the new features are always appropriate in production code. This is a case-by-case decision that has to weigh the benefits of the new features vs the cost of upgrading in one's specific situation.

I might have fun or enjoy learning about new features, but at the end of the day what I really care about is delivering a useful product to someone. I have to chose the toolset that's going to be modern enough to have reasonable support and stability but not so ancient that I can't be reasonably productive.

Title: If a language changes quickly, is this considered a good thing?

Body:
I have seen some languages that change quickly (I mean they are improved every year for example) and some others that are improved slowly.

My question, if a language changes quickly is this a good thing or a bad thing for the programmer? Do programmers like to learn new thing in the language or do they prefer to stick with what they already know?


答: How would you handle platforms, like the 8031 without external memory, that don't support malloc or alloca? Perhaps you're forgetting that C isn't just for big iron but is also for elevator controllers and toasters.