Programmers Weekly Newsletter
Programmers Weekly Newsletter

Top new questions this week:

What is the name of the following (anti) pattern? What are its advantages and disadvantages?

Over the last few months, I stumbled a few times over the following technique / pattern. However, I can't seem to find a specific name, nor am I a 100% sure about all its advantages and disadvantages. …

java interfaces anti-patterns technique  
asked by Jérôme 21 votes
answered by Doc Brown 14 votes

Why doesn't Java 8 include immutable collections?

The Java team has done a ton of great work removing barriers to functional programming in Java 8. In particular, the changes to the java.util Collections do a great job of chaining transformations …

java history immutability collections  
asked by GlenPeterson 15 votes
answered by jozefg 25 votes

Why most "well-known" imperative/OO languages allow unchecked access to types that can represent a 'nothing' value?

I have been reading about the (un)convenience of having null instead of (for example) Maybe. After reading this article, I am convinced that it would be much better to use Maybe (or something …

programming-languages object-oriented language-design null imperative-languages  
asked by aochagavia 15 votes
answered by Euphoric 8 votes

Algorithm for fast tag search

The problem is the following. There's a set of simple entities E, each one having a set of tags T attached. Each entity might have an arbitrary number of tags. Total number of entities is near 100 …

algorithms optimization  
asked by Andy 12 votes
answered by amon 3 votes

Why not annotate function parameters?

To make this question answerable, let's assume that the cost of ambiguity in the mind of a programmer is much more expensive then a few extra keystrokes. Given that, why would I allow my teammates to …

f# parameters  
asked by JDB 11 votes
answered by Jon Purdy 9 votes

How to structure tests where one test is another test's setup?

I'm integration testing a system, by using only the public APIs. I have a test that looks something like this: def testAllTheThings(): email = create_random_email() password = …

testing  
asked by Roger Lipscombe 7 votes
answered by gnat 3 votes

Entity Framework Entities - Some Data From Web Service - Best Architecture?

We are currently using Entity Framework as an ORM across a few web applications, and until now, it has suited us well as all our data is stored in a single database. We are using the repository …

web-services asp.net-mvc entity-framework entity  
asked by stevehayter 7 votes
answered by Bobson 1 vote

Greatest hits from previous weeks:

Why use a database instead of just saving your data to disk?

Instead of a database I just serialize my data to JSON, saving and loading it to disk when necessary. All the data management is made on the program itself, which is faster AND easier than using SQL …

database sql mysql nosql  
asked by Dokkat 103 votes
answered by Robert Harvey 181 votes

When to favor ASP.NET WebForms over MVC

I know that Microsoft has said ASP.NET MVC is not a replacement for WebForms. And some developers say WebForms is faster to develop on than MVC. But I believe speed of coding comes down to …

asp.net asp.net-mvc webforms  
asked by P.Brian.Mackey 71 votes
answered by Tyanna 41 votes

Can you answer these?

Is it possible to protect json api scraping using random tokens?

I have built a restful json api for an online store using Laravel. I now wish to create an AngularJS app to run the front-end web application. Product prices for my store need to update every second, …

security json  
asked by Gravy 3 votes

Are there any implementations of deterministic regular expressions?

The question itself is already in the title, so here I will just provide additional details. I call a regular expression "deterministic", if, after converting the regular expression into a …

regular-expressions  
asked by Eduardo León 3 votes

Is there already a commonly known name for the 'ensure pattern'?

I use a pattern that I call "ensure" extensively in my repository layer. In short, it does the following when I call an Ensure(...) method: It uses the arguments in the method to attempt to …

design-patterns  
asked by Carnotaurus 3 votes
Subscribe to more Stack Exchange newsletters


Unsubscribe from this newsletter or change your email preferences by visiting your subscriptions page on stackexchange.com.

Questions? Comments? Let us know on our feedback site. If you no longer want to receive mail from Stack Exchange, unsubscribe from all stackexchange.com emails.

Stack Exchange, Inc. 110 William St, 28th Floor, NY NY 10038 <3