This tag is for questions that aren't specific to a programming language or environment.

learn more… | top users | synonyms

-5
votes
0answers
66 views

Names of Programming Languages Across Cultures [on hold]

I was trying to explain to my French host mother the other day that I am writing an application in C# as a personal project this summer. Without really thinking about it, I immediately translated it ...
0
votes
1answer
219 views

Do programmers have a mother tongue/first [programming] language? [closed]

When talking about real [spoken/written] languages everyone has a first language the one that was learnt first and well. They studied this language every well, know the grammar very well can express ...
1
vote
1answer
50 views

Assert Message in Unit Tests

I've just begun reading "The Art Of Unit Testing" by Roy Osherove, and while I'm mostly finding the material very helpful, he makes a statement about not using messages in your Assert statements. ...
13
votes
3answers
339 views

Should I include myself as an author after modifying 3rd-party code?

It's common practice to make some tweaks or fixes in 3rd-party code (be it a simple gist or an entire submodule). But it's also common that many of them use they own license information. After making ...
-4
votes
2answers
220 views

How to really understand programming? [duplicate]

I have started to learn to program. I am interested in it and dont mind how long it takes to learn. But I am using books to start out and I find that there are some things I get and some things I have ...
21
votes
9answers
2k views

Able to read Code but struggling majorly to write it [closed]

I had my first programming exam recently...and well I pretty much flopped it. Did not do great at all. I have only myself to blame as outside of college time, I pretty much did nothing. Now I have ...
3
votes
3answers
138 views

How to explain the difference between a variable and a key in a key-value pair?

Variables and the keys in key-value pairs are both identifiers for values, so, on a conceptual level, these seem very similar ideas. How would you explain the difference between these two concepts? ...
19
votes
2answers
1k views

What is the advantage of wrapping exceptions [duplicate]

It's very common in .NET for an exception to be wrapped in several layers of "outer exceptions" which give marginally more contextual data. For example, in EF if your update fails, you get exceptions ...
9
votes
3answers
667 views

Are these programming “classics” still relevant today and should I read them? [closed]

I have come across numerous older posts that highly recommend the following language agnostic programming books: Code Complete by Steve McConnel The Pragmatic Programmer - Andrew Hunt and Dave ...
18
votes
9answers
2k views

What is the benefit of having the assignment operator return a value?

I'm developing a language which I intend to replace both Javascript and PHP. (I can't see any problem with this. It's not like either of these languages have a large install base.) One of the things ...
0
votes
2answers
110 views

How to describe an n-dimensional cube? [closed]

I want to describe an n-dimensional cube (a 2-dimensional cube is a square, a 3-dimensional cube is a cube, etc). I'm pretty sure I need an array, but how do I organise it in the best possible way? ...
4
votes
4answers
232 views

Returning null or a empty value/throw exception? [duplicate]

Various programming books suggest that methods should not return null values (Clean Code for example). Instead of returning null default values (0 or empty string or empty object) should be returned ...
2
votes
2answers
97 views

Form cancellation. Where should any data rollback occur?

You have a form that has an object injected into it. The user interacts with the form and updates the injected object via the UI. If the user then 'Cancels' the form, whose responsibility is it to ...
5
votes
4answers
217 views

Finding most Important Node(s) in a Directed Graph

I have a large (≈ 20 million nodes) directed Graph with in-edges & out-edges. I want to figure out which parts of of the graph deserve the most attention. Often most of the graph is boring, or at ...
3
votes
4answers
224 views

How to handle affinities?

Assume we have an abstract class having several concrete classes which interfaces publish an information under several equivalent forms, with the difference that each class has a preferred form which ...
0
votes
2answers
81 views

Placing arguments on their own lines [closed]

This question applies to both parameters and arguments, since I've seen this style used in both. I usually write parameters like this someFunction(arg0, arg1, arg2) but I've recently noticed that ...
14
votes
2answers
613 views

Which is better: a bunch of getters or 1 method with a selection string parameter?

Our knowledge domain involves people walking over a pressure-recording plate with their bare feet. We do image recognition which results in objects of the 'Foot' class, if a human foot is recognized ...
1
vote
1answer
206 views

Will we go back(?) to fixed-point arithmetic in the near future? [closed]

As far as I recall, this has been the ongoing trend of the past, I'm just a student, so I might be wrong: Long ago: Integer numbers and calculations. Very precise, however cannot present a big ...
2
votes
1answer
115 views

Draw graph of a function whose characteristics are unknown [closed]

Suppose I have a function. I have code that, given an x value, produces a y value. I can assume that the function is somewhat mathematically sane, not something crazy like an ...
5
votes
3answers
1k views

Should I refactor a F class from code climate? [closed]

According to code climate (static quality analysis), a class is F, aka the worst mark you could be granted. I did submit a pull request to rearrange it here Which has been refused because the new ...
0
votes
1answer
105 views

Is there any use for layout managers beyond Java? [closed]

I am a beginning programmer and I was recently working on some primitive GUI apps in Java. That's where I encountered different layout managers. I browsed the web and it says that for advanced GUI ...
-1
votes
2answers
109 views

What are some examples of inverted classical inheritance? [closed]

Are there any examples of inheritance in languages where classes call their subclasses' methods rather than their super classes' methods? It should not behave like traditional inheritance like the ...
1
vote
3answers
218 views

is using a PUT with side affects acceptable (REST)

I want to create an undo history whenever the user updates a form. Because it's an update, I want to use a PUT request. However, I read that PUT needs to have no side effects. Is it acceptable to ...
5
votes
1answer
353 views

How can I implement a modular “save” function for a game?

I have to implement a method to save my game in such a way that I can change the storage medium with the change of only a single variable. Ideally I'd use an interface to designate the required ...
10
votes
1answer
351 views

How is machine learning incorporated into search engine design?

I am currently building a small in-house search engine based on Apache Lucene. Its purpose is simple - based on some keywords, it will suggest some articles written internally within our company. I am ...
7
votes
2answers
183 views

Definition of a type

Conceptually, I used to think of types as sets. However, I think I've seen people wishing to distinguish types A, B even if they represent identical collections of values. So I figured a better ...
4
votes
2answers
300 views

How to implement loose coupling?

I want to implement loose coupling in a project. I know two examples of successful loose coupling designs: On a Unix workstation, shell scripts realise a loose coupling between basic utilities. The ...
-1
votes
1answer
87 views

Term to describe keyword followed by statement block [closed]

Is there a general term to describe a keyword followed by a statement block? E.G. if() {statement block} while() {statement block} try{statement block} finally{statement block} Or even something ...
28
votes
5answers
947 views

Updating password hashing without forcing a new password for existing users

You maintain an existing application with an established user base. Over time it is decided that the current password hashing technique is outdated and needs to be upgraded. Furthermore, for UX ...
8
votes
4answers
721 views

How do we keep dependent data structures up to date?

Suppose you have a parse tree, an abstract syntax tree, and a control flow graph, each one logically derived from the one before. In principle it is easy to construct each graph given the parse tree, ...
1
vote
2answers
217 views

How to handle editing a large file for a non-technical user

I have a client who is given a tab delimited .txt file containing hundreds of thousands of rows. I have a user story as follows: As a user I want to take the text file and add a new value at the ...
14
votes
3answers
370 views

Does usage of advanced language features decrease maintainability? [duplicate]

On a code review, I've stumbled on an interesting idea, which I can't properly judge alone. Is it OK to improve readability of code by means of not widely known language syntax? When the original ...
5
votes
2answers
211 views

Exposing domain models over API

I'm building a simple RESTful API for a web-based application I'm working on, and I'm wondering about the best way to go about exposing my domain models. Let's say I have a User class and I want to ...
13
votes
1answer
813 views

How do I test a file reader?

I am working on a project with a few file formats. Some formats are specified by .xsds, others by documentation on their respective websites, and some are custom in-house formats that have no ...
1
vote
2answers
144 views

Will a binary include methods that are not called in the source code?

[Potentially misleading title, but I'm not sure how best to word it.] Theoretical question on compilers and language design. Say I'm re-implementing a method in a code base. Instead of removing or ...
3
votes
3answers
422 views

Good Procedure or Function Design

This is in reference to the question posted here. As I would judge it, the question there should be closed simply because it seems to ask why the Borland developers made one thing a function and ...
8
votes
2answers
660 views

What is an example of a continuation not implemented as a procedure?

An interesting discussion about the distinction between callbacks and continuations over on SO has prompted this question. By definition, a continuation is an abstract representation of the logic ...
4
votes
3answers
425 views

Where can I find an authoritative comparison of computer languages? [closed]

I've reached a point in my career where I want to consider myself less "an {x} engineer" where {x} is a specific programming language, and I want to be more of a language-agnostic software engineer. ...
2
votes
2answers
265 views

What are appropriate metaphors for the pieces of a word processor? [on hold]

A word processor is a complicated creature of many layers and pieces, but it represents a relatively simple concept: a piece of paper with writing on it. This leads to the problem of having many ...
5
votes
4answers
420 views

How can I stop myself overwriting member variables with 'new' ones?

The bulk of my programming experience has been with C++ and (shudder) FORTRAN (I'm a scientist not a programmer as such, but I do my best). I've recently started using python extensively and find it ...
2
votes
3answers
201 views

What is the job of a language virtual machine, and creating one [closed]

Recently I have become incredibly interested in language development. The past few weeks I have written many language front ends (lexer, parser) including a calculator language/expression parser and ...
3
votes
2answers
462 views

Confusion with Factory pattern regarding Liskov's Substitution Principle, code maintainability and Unit Testing?

I have a confusion regarding Factory Pattern there are basically two ways You can implement that. Approach 1: public interface IProductFactory { IProduct GetProductA(); IProduct ...
2
votes
3answers
301 views

Why is float the default in the majority of languages?

In programming languages, for represent numbers you have (mainly) two types: Int(s) and floats. The us of Int is very easy. However floats cause a lot of unexpected surprises: ...
2
votes
1answer
155 views

Strategy for normalising and interpreting location data

I'm a bit stuck with a problem involving the normalisation of location input data from the user (which comes from a third party). Aim To logically breakdown and interpret the user location input ...
0
votes
2answers
566 views

Why don't we have a non-turing complete general purpose language yet? [duplicate]

Non-turing complete languages can solve every practical problem that a turing-complete language can. Also, they are much more analyzable than turing complete languages. The compiler can comprehend the ...
2
votes
0answers
119 views

Are there non-turing complete dynamic languages which can be used to create useful programs? [duplicate]

While it takes a turing complete language to create any imaginable program, is it possible to compute most "useful" programs with a non-turing complete dynamically typed language? For example, is ...
9
votes
3answers
364 views

I have to compromise: DRY, or Command-Query-Separation?

I was recently refactoring a method that was both a command and a query method. After separating it into a one command method and one query method, I found that there are now multiple places in the ...
5
votes
3answers
317 views

Where to load and store settings from a file?

I think this question should apply to most programs that load settings from a file. My question is from a programming point of view, and it is really how to deal with the loading of settings from a ...
1
vote
2answers
234 views

is there a programming language designed to express data combinations? [closed]

Very often, when using the command line or just programming, you want to express some kind of combination that you end up using a for - which is often verbose. for (int i = 0; i<10; ++i) ...
1
vote
2answers
84 views

Creating documents from snippets

From time to time I create whole documents (e.g. XML or proprietary) programmatically. If it easy enough, I just write something like stringbuilder.append("<blah>"); ...