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)

-5
votes
1answer
76 views

Dangerous Dave game parameters live access [closed]

I have searched online for Dangerous Dave source code however I wasn't able to find any. So I wanted to know, is there any way I can access the score and other game parameters while playing the game. ...
3
votes
1answer
147 views

Architecture: API with slightly different behavior depending on the logged-in user roles

How should I structure a piece of code that executes an operation, but may have slightly different behavior depending on, let's say, user roles? Example: My app has a 'manager' and a 'employee' ...
0
votes
2answers
163 views

How to analyze a code of a web application which is running? [closed]

Joshua Bloch said in an interview that the best way to know and understand code written by others is to read it, mentally or through a debugger. Well, my question is this: is it possible, through a ...
3
votes
1answer
98 views

Do I update the copyright header when i modify the source?

Suppose I were to modify a said piece of code and put it back on github, would I have to update the license header. This is the code(Licensed under the Apache License, Version 2.0): ...
0
votes
2answers
101 views

What are good ways to measure project size? How do I compare the size of my project to other projects? [closed]

Background I am currently working for a quite large (relative to what I have done before) hobby project. I would like to compare the size of this project to other open-sourced projects but I cannot ...
1
vote
3answers
118 views

What does it mean to build from source?

I'm trying to install numpy using this. This link opens with these instructions: These instructions describe how to build NumPy and SciPy libraries from source. If you just want to use NumPy ...
2
votes
3answers
208 views

What is the most readable way of passing arguments to the function? [closed]

I'm using JavaScript but the question can be generalized to all the languages. In a nutshell - I'm checking if a browser connecting to my site is a microwave and cater for that accordingly. What ...
-2
votes
4answers
115 views

Best possible way to comment? [closed]

My question is simple, how should I comment during development so that it can be beneficial in the following cases: Understandable for my seniors while code reviewing. Should be able to search my ...
1
vote
4answers
117 views

How to keep documentation up to date and accessible [duplicate]

The problem: Documentation is in code in the form of docs, its in wiki websites, its written down on notes, in diagrams and issue management systems. When documentation is so spread out, how does ...
0
votes
1answer
42 views

Snippets (based on MIT licence) from snippets services

I have question about MIT licence code sources Can I publish code snippets [MIT licence] from site like bootsnipp to my blog? Do I have to include source link to site where I have found that snippet ...
0
votes
2answers
112 views

Process of handing over source code to a customer [closed]

Should I just copy the project files to him? Should I sit and explain the code to him ? If so, up to which level of details? Or do I just tell him where everything is within the solution and not how ...
2
votes
2answers
99 views

Delivering source code - refactor for clean up? [closed]

I'm in the middle of developing an asp.net webforms application to a customer, i've been using DataAccess and BusinessLogic layers in a folder structure within my application, in which my DataAccess ...
39
votes
13answers
6k views

How safe is it to compile a piece of source code from a random stranger? [closed]

Suppose I'm reviewing code that job applicants send to prove their skills. Clearly I don't want to run executables they send. Not so clearly I'd rather not run the result of compilation of their code ...
0
votes
1answer
62 views

Licensing - Restrictive Open Source License OR Custom License [closed]

I have some source code I want to release but I'm unsure of the best license to put on it. From my research such licenses as MIT and GNU are horrible as they offer little to no protection towards ...
1
vote
1answer
82 views

Should my program be flawless at release [duplicate]

I'm building a big, very complex piece of open-source software, and it's killing me trying to make what I have as "clean" as it needs to be. What I want to know is: If there is an undetected flaw in ...
0
votes
1answer
55 views

Upgrading inherited 3rd party code with changes [closed]

I inherited a php project of 3rd party code with a good deal of company-specific customization lumped on top of it. Now I've got to upgrade it and the person who owned the project is the one I've ...
2
votes
1answer
520 views

Licensing code submitted after job interview [duplicate]

I applied for a job in a small company (~25 employees) on December and after a month the CEO of the company wrote to me that he is interested to interview me. During the interview I got a bad ...
54
votes
9answers
10k views

Bad sign if nobody can comprehend one's code? [duplicate]

If a coder writes code that nobody other than he can understand, and code reviews always end with the reviewer scratching his head or holding their head in their hands, is this a clear sign that the ...
0
votes
1answer
82 views

Return values and exceptions [closed]

I wrote simple function that returns a string depending on which condition is TRUE. Here is my code: private String getMyString() { if(!mStrigMember.isEmpty()) { return mStrigMember; ...
8
votes
3answers
1k views

Is reading javadoc preferable to reading source code to familiarise yourself with a library?

I just came across the following in a lab manual at university: You do need to study the interfaces of the classes by generating the javadoc for them so you know what operations are provided (feel ...
0
votes
1answer
55 views

Where should I put (wrapper) scripts in my source tree? [closed]

I have this software package which installs itself to /usr/local/mypackge, with a bunch of subdirs. In bin/ I have linked code, as ELF executables, in /share/doc I have documents, etc. Now suppose ...
2
votes
1answer
285 views

How can I encrypt or remove readability of source code before publishing it?

I am working on a collaborative project, for which I have to submit source code, which will be used/embedded in the main repository for re-compilation. Is there any way, I can encrypt the source code ...
58
votes
6answers
6k views

Why aren't there code overviews for open-source projects? [closed]

There are very complex open source projects out there, and to some of them I think I could make some contributions, and I wish I could, but the barrier to entry is too high for a single reason: for ...
-4
votes
1answer
262 views

Is it bad to feel guilty using lots of libraries? [duplicate]

So I'm an android programmer,have been programming for about 3 years,but it wasn't until 5 months ago that I started really taking it seriously. Recently I got my first internship,and I'm happy with ...
3
votes
1answer
409 views

How to Safely Sell Source Code? [closed]

I'm a seller with a prospective buyer for some of my source code. I'd like to structure the transaction so as to protect each of our interests, but there's one aspect that I haven't been able to ...
2
votes
1answer
135 views

Do you maintain your own utilitiy library [duplicate]

So, i've started working as a freelancer and therefore find myself copy/pasting util methods from one class to another. Not good to say the least. I do this on my mobile frontend dev and backend ...
4
votes
4answers
687 views

Do I have to make source code open, if I use GPLv2 licensed software to derive data

I'm working on a calendar project, on my own. In this project I've to use Swiss Ephemeris. It is licensed under GPLv2 and commercial. With commercial version of license, developers entitled to ...
12
votes
8answers
2k views

When does one hard-code actual data values into the code as opposed to using a DB?

A long-standing question for me has been: when do I store data (actual values) in a database table, and when do I store them right in the code? The untold consensus has typically been as such(*): If ...
5
votes
2answers
366 views

GPL- How much source must be released?

Suppose I have a GPL v2-licensed library that is of interest to a closed-source project (e.g. Wolfram Alpha). If some of my code were used in Wolfram Alpha, or a product that interfaces with Wolfram ...
2
votes
0answers
64 views

Setting permissions issue for admins and lower users in project

I am working in a jsp project an got stuck in a big problem. My project consist of accounts table for super admin, reseller, admin and users for executives and manager mapped in the account ...
7
votes
2answers
3k 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 ...
19
votes
14answers
5k 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
213 views

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

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 ...
1
vote
2answers
353 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
334 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++){ ...
6
votes
2answers
442 views

Sharing source code of my online game? [closed]

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 ...
0
votes
1answer
247 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 ...
0
votes
2answers
160 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
194 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 ...
5
votes
3answers
4k 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, ...
2
votes
3answers
599 views

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

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
143 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 ...
4
votes
4answers
438 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 ...
0
votes
1answer
117 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 ...
37
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 ...
5
votes
2answers
3k views

Where should I start reading AngularJS's source code? [closed]

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 ...
3
votes
4answers
430 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 ...
4
votes
1answer
526 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 ...
0
votes
1answer
432 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 ...
4
votes
1answer
241 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 ...