Source code is any collection of computer instructions (possibly with comments) written using some human-readable computer language, usually as text.

learn more… | top users | synonyms (1)

-1
votes
0answers
41 views

What techniques are used in larger programming groups to limit access to portions of code? [duplicate]

I've never worked in anything larger than a startup and so code access was never a problem, but as our organization begins to grow and we need to offload portions of our (non-obfuscated PHP) code ...
1
vote
2answers
56 views

Alias variable vs multiple use of getter

Would you rather: $this->getDoctrine()->getManager()->persist($currency); $this->getDoctrine()->getManager()->persist($user); $this->getDoctrine()->getManager()->flush(); ...
3
votes
2answers
163 views

How to do documentation for code and why is software (often) poorly documented?

There are some good examples of well-documented code out there, such as java api. But, a lot of code in public projects such as git and internal projects of companies is poorly documented and not very ...
16
votes
14answers
3k views

How many mistakes does a good software developer make? [closed]

I am currently in a situation where a lot of people criticized me for making bugs (on my first local try - the first time I run the code for the first locally done test - , not on a committed repo ...
3
votes
2answers
178 views

Is it customary for software companies to forbid code authors from taking credit for their work? do code authors have a say?

The company I work for has decided that the source code for a set of tools they make available to customers is also going to be made available to those customers. Since I am the author of that source ...
0
votes
2answers
220 views

Mechanics of reasoning during programming interviews [closed]

This is not the usual "I don't want to write code during an interview", in this question the assumption is that I need to write code during an interview (think about the level of rewriting the ...
1
vote
1answer
177 views

How does an optimizing compiler react to a program with nested loops?

Say you have a bunch of nested loops. public void testMethod() { for(int i = 0; i<1203; i++){ //some computation for(int k=2; k<123; k++){ ...
3
votes
2answers
129 views

Checking program robustness using static code analysis

(Building on this question) If you have a static code analyser such as Checkstyle, is it possible to to relate any of the stuff that it checks for to actual robustness? Some of the things that ...
5
votes
2answers
225 views

Sharing source code of my online game?

So one of my long-standing projects is an online fan-game that's been running for a good four years now, and is at least somewhat well-known among the related community. To give you an idea, Alexa ...
-3
votes
2answers
118 views

Legal situation regarding source code [closed]

hope you can help We have had a developer working on a project of ours for a long time now; Originally he estimated it as a 12 week build, we are now at 1 year, and many things are making us feel ...
0
votes
1answer
68 views

Strategy for maintaining offline repository safely using git [closed]

I use git for versioning. Just yesterday I was working on refactoring my Python code base. After adding a test I found that I had introduced a bug in one of project euler solutions. So I checked out a ...
1
vote
1answer
75 views

How to secure a Django application's source code? [duplicate]

I have developed a Django application for a company. Now I am about to ship it to my customer. After reading through online articles and books, I understood that securing the source code of any web ...
0
votes
2answers
127 views

How to choose between different open-source libraries? [closed]

Recently, I found multiple GitHub repositories that would allow me to perform the same task. (In my case, assess the readability of text strings.) It made me wonder, what are the best practices for ...
0
votes
1answer
127 views

Familiarize with unknown source code [duplicate]

I have to continue feature development, issue fixing of a halfway completed code base. There is a no documentation, all developers had left the company. The technology stack is somewhat familiar to ...
4
votes
3answers
729 views

Java's Boolean class - why not an enum?

It seems to me that the Boolean class is an ideal candidate to be implemented as an enum. Looking at the source code, most of the class is static methods which could be moved unchanged to an enum, ...
1
vote
3answers
323 views

PHP Code base design: Single “queries.php” file, or spread queries across different php files/classes?

When I create PHP projects, is it better to put all database (e.g. MySql) queries in a single file (i.e. "queries.php")? Or is it better to place the respective queries in any "model" classes (i.e. ...
1
vote
1answer
133 views

Most of programmer work deals with mapping? [closed]

During all my work I've been working with ORM, WS, integration services, viewmodel and so on. The common stuff in all these kind of work is that I had to make mappings and not always the available ...
3
votes
4answers
308 views

How do I handle merging code that hasn't been merged in ~3 years in an agile manner? [closed]

Our team has recently adopted agile practices and most of the team is new to agile. In our product, we use some code developed by another team and only they maintain that code. For the last 4-5 ...
14
votes
3answers
602 views

How to locate source code that implemented a certain feature?

I was wondering what are some techniques to locate which code implemented a specific feature, on a desktop application. I am a junior developer, with only professional programming experience lying ...
3
votes
1answer
76 views

Where to keep track of batch editing scripts?

It is sometime useful to write a script to perform a batch editing on several files in a source tree. Such a script is usually very specific and used only once. Such scripts can be used to rework ...
0
votes
1answer
58 views

How do I properly add a reference from my Github project to someone elses in VS2013 on Windows 8?

I need to reference the latest version of Bouncy Castle in a project I intend to publish to Github. In my first posting of the code to Github, someone complained that I downloaded the entire Bouncy ...
38
votes
16answers
6k views

Good idea to put bug numbers in a comment in the beginning of the source file? [closed]

Is it a good practice to put bug numbers in the file itself inside a header comment? The comments would look something like this: MODIFIED (MM/DD/YY) abc 01/21/14 - Bug 17452317 - npe in drill ...
2
votes
2answers
487 views

Where should I start reading AngularJS's source code?

After reading this article I realized that I really didn't read any "serious" source code during my 3-years as a professional developer. Recently I started a new web-project which makes heavy use of ...
2
votes
2answers
198 views

Is virtual machine image a good protection for source code?

We have developed an application that is sold as an online service. After some time we realized that some of customers would need/prefer/require to have it installed locally on their intranet. However ...
0
votes
1answer
70 views

Classes and library archive [duplicate]

We are a group of 5 developers(scientists end engineers) that write code in C++. What we would like to do is to make all the code available to all the developers easily. The first step in this process ...
0
votes
0answers
47 views

How to understand codebase of complex opensource application [duplicate]

I'm trying to develop a new feature for open source application. But the existing application uses different APIs like Qt and KDE3. And more over the existing files are also very complexand depend on ...
3
votes
4answers
300 views

Win loss code that does not make 1-0 record better than someone like 20-3

ok, am just looking for a win loss code example. This can be for any language, just wanting the outline. Fairly new to programming, so dummy it up for me :) I can do (win-loss/total of win loss). ...
4
votes
5answers
444 views

What can go wrong with composing a method name out of a string?

I have a piece of code that composes method name to call from a string parameter. I don't feel it's a good thing to do but I'm not sure what can go wrong with this. Here is a simplified snippet of ...
3
votes
4answers
264 views

Source code vs source files? [closed]

I'm in a situation with my company where this may be an important distinction. Is there any distinction between "source code" and "source files" in a technical context? Is there any distinction ...
1
vote
1answer
82 views

File with Apache 2.0 and my modifications

I read the original text of Apache License, Version 2.0 and the explanation in plain English. OK, I copy a class distributed by The Best Company in the World, their license, and modify the code a ...
1
vote
1answer
203 views

How to present code in academic work?

Actually, I'm writing my undergrad thesis, that consists in analysing the BitTorrent algorithm and see its application on Transmission client as an example of implementation. Reading through its ...
3
votes
1answer
129 views

Code structure for multiple applications with a common core

I want to create two applications that will have a lot of common functionality. Basically, one system is a more advanced version of the other system. Let's call them Simple and Advanced. The Advanced ...
0
votes
1answer
229 views

How small is the footprint of a small C compiler?

This week I could optimize using a reduced C library that allowed a drastic shrinkage in code size - from about 60 K to about 6 K and then we could load the code in the 8 K on-chip memory of an FPGA ...
-3
votes
2answers
245 views

Old BASIC programming [closed]

I am trying to make sense of the depicted BASIC (old school) “spaghetti” code, but I’m lacking the knowledge. The result should reveal a set of coordinates to be used for my next task. Is there ...
5
votes
5answers
252 views

Hyperlinked, externalized source code documentation

Why do we still embed natural language descriptions of source code (i.e., the reason why a line of code was written) within the source code, rather than as a separate document? Given the expansive ...
0
votes
1answer
124 views

“Open source” proprietary software licenses? [closed]

I am writing some software that (for once - usually I open source stuff on sourceforge/github/etc.) I plan on selling. To each source file, I want to attach a proprietary software license that doesn't ...
2
votes
1answer
215 views

Multi-Thread Return Single SQL Result

I am having some difficulty with MySQL and returning a unique row to a thread. I want it so the thread will search for a row from the table where the bit (see below) is false and only one row is ...
28
votes
8answers
3k views

What is beautiful code? [closed]

I often read that developers must write beautiful code, but for a beginner as I am it remains obscure of what is beautiful code and how do you recognize it? The corollary question is: How to write ...
3
votes
4answers
246 views

Source code “prints” at release

Is there a best practice for how to document the source code you're releasing? Currently, we have a table of the versions of the software, what SVN tag it's labeled as, what SVN rev that tag was ...
-1
votes
1answer
292 views

Run jQuery search on a URL's content

I'd like to create a program/application to iterate through all of a Tumblr user's posts and copy the content from each. In essence it'd be like Tumblripper, but download the text and video URLs in ...
71
votes
5answers
5k views

How do you put a price on your source code?

I was asked to sell the source code (along with existing users) of small utility app I created years ago. I've investigated how to put a price on the source code but so far haven't come up with a good ...
3
votes
2answers
1k views

Why do we not prefix Enums, Abstract classes and Structs?

The C# community has so ubiquitously used the "I" prefix to denote an interface that even the most inexperienced programmers know to use it. Why is it then that we do not prefix enums, abstract ...
8
votes
4answers
415 views

Should we be looking out for lying code?

This is referring to a discussion in an answer and the comments of this question: What's with the aversion to documentation in the industry?. The answer claimed that "code can't lie" and thus ...
10
votes
2answers
348 views

Big project layout : adding new feature on multiple sub-projects

I want to know how to manage a big project with many components with version control management system. In my current project there are 4 major parts. Web Server Admin console Platform. The web ...
2
votes
2answers
261 views

In general, is it ethical to make a copy of work source code and take it home as reference? [duplicate]

Is it ethical to make a copy of my work's source code, for the sole purpose of my own reference? By reference, I mean as reference where I can refer to it about how I (and my teammates) implemented ...
2
votes
3answers
164 views

Equating multiple new variables with an old one

Sometimes I run into a situation where I need to equate two new variables with an old one. Which of the following (if any) is a good practice (w.r.t. code readability or any other factor), under what ...
2
votes
1answer
72 views

How to view my commits on SourceForge

I want to link to a source forge project for a job application but I can't seem to find where a user's commits are listed. If I go to https://sourceforge.net/u/USER_NAME/profile/ All I see is ...
1
vote
0answers
88 views

Is there a unified source code documentation generator? [duplicate]

I'm currently working on a client's project that involves programming in multiple languages. It has gotten to the point where the amount of source code for each language has grown to such a large ...
2
votes
1answer
184 views

What level of queries should I expect from an interviewer regarding my official software tasks? [closed]

Assumption: Post that I am applying for: Software developer Experience in years: 5 Background: I have been working with a robotics company and I am not a robotics person. I haven't handled a ...
19
votes
9answers
1k views

What exactly makes code “clean”? [duplicate]

I am an intern at a small software company, doing typical grunt work. Many tasks that the actual developers are doing are above my head however I finally got to see some real "action" and write some ...