Memory, files, network connections, I/O devices and other objects that have to be acquired and then released within a program. Please do not use this tag to ask questions about educational resources such as tutorials, books, websites or classes. Those are off-topic on Programmers.

learn more… | top users | synonyms

52
votes
16answers
7k views

Is it a waste of time to free resources before I exit a process? [duplicate]

Let's consider a fictional program that builds a linked list in the heap, and at the end of the program there is a loop that frees all the nodes, and then exits. For this case let's say the linked ...
37
votes
2answers
4k views

What is the proper way to do REST?

Everybody nowadays does SOA, even if some don't actually understand what is all about. So they do it wrong. Using that as an analogy I know what REST is (or at least I think I do) and want to do some ...
34
votes
8answers
3k views

Is memory management in programming becoming an irrelevant concern?

Background I revisited an old (but great) site I had not been to for ages - the Alioth Language Shootout (http://benchmarksgame.alioth.debian.org/). I started out programming in C/C++ several years ...
31
votes
14answers
3k views

What is the most inspiring speech from a developer you ever watched? [closed]

Please put a direct link to it. Required: Still available online (please put a direct link to it) Must be a speech from a current or former developer Speaker's popularity doesn't matter Target ...
26
votes
12answers
5k views

Where can I get free public raw data? [closed]

In web development, a mashup is a web page or application that uses and combines data, presentation or functionality from two or more sources to create new services. There are many sources for ...
23
votes
5answers
4k views

Why can't Java/C# implement RAII?

Question: Why can't Java/C# implement RAII? Clarification: I am aware the garbage collector is not deterministic. So with the current language features it is not possible for an object's Dispose() ...
20
votes
7answers
1k views

Where can I get feedback and support from other programmers in real time? [closed]

I used to work in an office surrounded by a large team of programmers where we all used the same languages and had different expertises. Now that I am on my own forming a startup at home, my ...
20
votes
3answers
7k views

What modern alternatives to Numerical Recipes exist? [closed]

In the past, the Numerical Recipes book was considered the gold standard reference for numerical algorithms. The earliest Fortran Edition was followed by editions in C and C++ and others, bringing it ...
18
votes
1answer
1k views

Are there any A.I. resources that explain the concepts and present source code?

Are there any A.I. resources that explain the concepts and present source code, similarly to AI Horizon? I've read books and research papers but they generally present a conceptual approach, without ...
17
votes
4answers
3k views

Why are string resources generally kept external to the code and not inside the code?

Generally, on many platforms, I'm writing my string resources to a .resx or .xml file, and then I'm getting them using some platform-dependent approach. That is, on iOS, I'm getting them via NSBundle....
17
votes
4answers
3k views

How to Determine # of Programmers needed for a project

How do you know how many programmers a particular project needs to be successful? The company I work for fulfills orders for client companies. We have written an in-house warehouse management ...
14
votes
2answers
1k views

What parts of Code Complete haven't stood the test of time? [closed]

I was looking at Code Complete on the shelf, thinking, "Outside of the Mythical Man Month, this may be one of the few mass market Software Engineering books to stand the test of time." For this ...
12
votes
5answers
2k views

How to migrate my thinking from C++ to C#

I am an experienced C++ developer, I know the language in great details and have used some of its specific features intensively. Also, I know principles of OOD and design patterns. I am now learning C#...
10
votes
9answers
5k views

Resources for functional programming beginner [duplicate]

Possible Duplicate: How to grasp functional programming concepts? I'm looking for some resources on functional programming subject. It seems to be a paradigm which is gaining visibility and I ...
10
votes
1answer
2k views

How to convince boss to buy Visual Studio 2012 Professional [closed]

The main advantage is the use of ReSharper and other add-ons but we need to make a convincing argument for the purchase of Visual Studio 2012 Professional. We are currently using Visual Studio 2012 ...
9
votes
3answers
2k views

Choosing a JavaScript Asynch-Loader [closed]

I’ve been looking at various asynchronous resource-loaders and I’m not sure which one to use yet. Where I work we have disparate group-efforts whose class-modules may use different versions of jQuery (...
9
votes
2answers
266 views

Beginning Design as a Programmer [duplicate]

I'm just starting to get in to web development. I'm learning Rails at the moment. I have lots of experience with various programming languages. I've been searching for books to help me get started; I ...
8
votes
4answers
2k views

Will the Database connection be closed if we yield the datareader row and not read all the records?

While understanding how yield keyword works, I came across link1 and link2 on StackOverflow which advocates the use of yield return while iterating over the DataReader and it suits my need as well. ...
8
votes
3answers
4k views

NoSql databases - Decent tutorial/book that covers the concepts [closed]

Am looking for a good resource on learning the concepts behind NoSql databases. Most things I find are related to a specific technology (MongoDb, CouchDB etc) but I'm after all the concepts behind ...
8
votes
3answers
3k views

Building a string translation database for multiple (in-house) projects

At our company we have an existing translation ms-sql table wich stores strings like this: Id | Key | Language | Value 1 | hello-world | nl-BE | Hallo Wereld 2 | hello-world | en-GB |...
7
votes
3answers
2k views

Is there an issue with closing our database connections in the “Finally” block of a Try statement?

I'm doing some refactoring for our application, and trying to reduce the number of issues reported in our ISO Scan (a static code analysis tool based on HP Fortify). Right now, what I'm trying to ...
7
votes
2answers
7k views

What's the difference between an Asset and a Resource?

I've used several IDEs and created several default projects. Upon creation, I'll find folder structures created for me. Sometimes I'll see a Resources folder, sometimes an Assets folder, and sometimes ...
7
votes
3answers
404 views

Is there a 'design pattern' type listing of common algorithms? [closed]

Is there a 'design pattern' styled listing of common/popular algorithms anywhere? Specifically, something that has a similar format along the lines of: Algorithm Name: e.g., Quick Sort, Bubble Sort, ...
6
votes
6answers
13k views

What are the alternatives to resx file

I am developing a Windows application and I want to store all the text for labels, radio buttons, buttons, check boxes and column headers of grids at one place. I have tried using a class file, an xml ...
6
votes
2answers
707 views

Should Java 8 Stream instances always be close()'d?

Quoth the Javadoc: Streams have a BaseStream.close() method and implement AutoCloseable, but nearly all stream instances do not actually need to be closed after use. Generally, only streams whose ...
6
votes
3answers
1k views

How should I unit test a bitmap modifying method?

My Sprite class has a method: private void updateWithBitmap(Bitmap b, int x, int y) This will 'lay on top' the bitmap that's passed in, the top left corner of the passed in bitmap being at the x,y ...
5
votes
2answers
2k views

To include a resource ID in the payload or to derive from URI

Designing an API, we've come up against the question of whether a PUT payload should contain the ID of the resource being updated. This is what we currently have: PUT /users/123 Payload: {name: "...
4
votes
8answers
1k views

Creating an in-house single source software development team

Our company wants to create a single department for all software development efforts (rather than having software development managed by each business unit). Business units would then "outsource" ...
4
votes
5answers
733 views

How do you manage the testing of your Android software on physical devices?

I'm in charge of managing mobile application development at my company, and I am currently building a mobile device "library" for testing. Essentially, we want to have a representative device in-house ...
4
votes
3answers
387 views

How do you find out what resources are unmanaged?

Looking through the .NET documentation, specifically the WebRequest class, I don't see any information indicating that I should wrap an instantiation of it in a using statement. Even the provided ...
4
votes
2answers
1k views

What's a good way to store/load a word list with thousands of entries?

I'm working on a project that requires a simple dictionary for checking spelling; it will be large, but will lack definitions. The solution we're currently working on has the base word list in a text ...
4
votes
8answers
590 views

Doing 'more' with C on Windows than very simple programs?

I'm currently learning C via 'C Primer Plus' as recommended by a lot of people here and I'm finding it very interesting - the in-depth explanations of how and why we do certain things in C are great ...
4
votes
2answers
760 views

Java Transaction Service without the application server

Is it possible to have a Java standalone application (no application server attached) that exposes some operations that a client can call and be the one to manage the transactions? I was thinking ...
4
votes
1answer
158 views

Is it better not to .close() inside API method body when passed a Reader or InputStream?

There are plenty of similar questions that have been answered. Example here. However, they all have both the Reader and the InputStream within the same scope or method body, and so suggest to close ...
4
votes
2answers
3k views

Are there any algorithms for resource scheduling of courses-teachers-classes?

I'm developing an application to help school principals in dedicating teachers to classes and courses over the hours of a week (scheduling). The scenario is roughly something like this: User enters ...
3
votes
7answers
226 views

What if any languages treat undisposed resources as an error? [closed]

I've seen lots of code like the following example. It's in Python, but the same mistake is made in all languages with managed resources: f = open('foo.txt', 'rb') for line in f: print line That's ...
3
votes
2answers
125 views

How do I model a sortable resource in sql database? [closed]

I encounter this issue when I create REST API. I cannot tell the exact scenario, but let's say it is for a website that has category and product resources. Each category has many products and both ...
3
votes
2answers
145 views

Where can I find high-quality resources for programmers who are not-English speakers? [closed]

I've recently reviewed a resume for a very promising student who is not a native English speaker (I believe his native language is Bengali). His academic record has some gaps, too - he could use a ...
3
votes
1answer
529 views

Is it a good idea to put all assembly: WebResource in the same cs file?

I have a .NET library, with some WebControls. These webControls have Embed Resources. And we declare them like it, in all webcontrols for each cs file: Something like this: [assembly: ...
3
votes
1answer
5k views

What would be the best way to learn about compilers, and executable formats? [duplicate]

I want to write my own compiler for my own language. Yes, it's going to be hard, and it will take long, but I think it will be worth it. I have looked into OSDev.org, and read about executable ...
3
votes
3answers
415 views

Where can I locate business data to use in my application?

This question talks about any and all free public raw data which appeared to have valuable pieces but nothing that really provides what I am looking for. Instead of using a socially defined listing ...
3
votes
1answer
101 views

How to deal with relative paths in out of source build?

An out of source build is a build which can be in any directory other than the source directory I have a project which contains relative paths to some resource files, needed at runtime, which are ...
3
votes
0answers
142 views

Is there a language for defining restful web services? [closed]

I'm implementing a restful service automation tool for client applications. Basically, the tool takes a config file that defines restful resources, and creates some DTOs and resource classes for ...
2
votes
2answers
171 views

Does RESTful response always return a 404 and empty content when an array is expected but the result is empty?

I worked with Ruby on Rails and RESTful api before and now with Django Rest framework. For this question let's say we only consider the case of JSON but not XML. It seems that when we expect an ...
2
votes
1answer
601 views

Checking out systems programming, what should I learn, using what resources? [duplicate]

I have done some hobby application development, but now I'm interested in checking out systems programming (mainly operating systems, Linux kernel etc.). I know low-level languages like C, and I know ...
2
votes
1answer
2k views

What is the accepted practice for string resource management in java?

In Android, final strings are stored in a strings.xml file, which makes it easy to update text, reuse strings and to translate an app to a different locale -- because everything is in one place. ...
2
votes
2answers
530 views

What benefits does embedding resources into the source/binary provide?

I have 300-500 images and other files that my program uses. I realize I have two options: Save them in a binary format such as BMP which is loaded dynamically. Save them in a C source file such as ...
2
votes
1answer
110 views

iOS Resources/Luminaries? [closed]

In the .NET world, I was able to find several industry figures or luminaries' blogs to read or to follow on twitter to learn about features and trends. Moving into the iOS realm, I'm kind of ...
1
vote
1answer
2k views

What is the limit on REST API resource levels

When designing a REST API, how deep should the resources levels go? For example; If I have the following database tables: Companies: ID, Name Employees: ID, Name, CompanyID Tasks: ID, Name, ...
1
vote
4answers
270 views

Resource/Thread Allocation and Deadlock

Here is the question I'm having trouble with: Give the resource graph and determine whether a deadlock state results. Assume that when a thread requests an available or unallocated resource, the ...