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
3answers
3k 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, ...
0
votes
2answers
129 views

How to change the same code stored in several places after I improve one of them?

I have some codes written in Matlab. I use the code in different folders which contains different data. Because I want to change some parameters for each different data, I keep the codes in the folder ...
4
votes
2answers
2k views

Seeking Delphi (Pascal) code beautifier [closed]

Preferably a tool which will run from inside of the Delphi IDE (I use Delphi 7), but I can accept a standalone program. Should have the ability to define rules (X space indent, no tabs, one statement ...
39
votes
13answers
5k 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
39 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 ...
22
votes
12answers
2k views

Should developers be forced to check-in before leaving work each day, even if the code does not compile? [closed]

During a previous consulting position, the developers where told to check-in code on a nightly basis, regardless if it complied or was complete. Managers were afraid of losing any code and said now we ...
0
votes
2answers
347 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 ...
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 ...
2
votes
4answers
1k views

What are standard directory layouts for source code, other libraries, build scripts, etc.? [closed]

I'm in the process of proposing a new standard directory layout that will be used across all the projects in our organization. Projects can have compiled source code, setup scripts, build scripts, ...
3
votes
5answers
727 views

What is the value for a web developer to be familiar with the source code of a web browser?

Are there any specific reasons for a developer that deals with web applications (let's say writing html and js) to download a browser's source code (like Chromium) and learn how the engine works ...
4
votes
1answer
413 views

Code licensing / software licensing [closed]

I’ve been working on something outside of my day job and they have asked me if they can use it. It is a closed source project, but I don’t mind giving them the source code; but I definitely want to ...
0
votes
0answers
98 views

Managing code responsability separation on large mobile app

I work for a large corporation with some different business units. Each of this business unities has their own group of developers. We have to build a mobile app that have features from each of this ...
59
votes
14answers
9k views

How to prevent code from leaking outside work? [duplicate]

Possible Duplicate: How to manage a Closed Source High-Risk Project? I'm working on an institution that has a really strong sense of "possession" - each line of software we write should be ...
1
vote
2answers
191 views

In need of a divide and conquer approach for re-writing small open-source utilities [duplicate]

Preamble (Skip if you don't like to read) I've been learning C/C++ in school for a year now and all the assignments in the book, after reading through the chapters, were not too difficult to ...
6
votes
2answers
369 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
344 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 ...
1
vote
1answer
381 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 ...
23
votes
9answers
2k views

How should I go about learning a very large and complex application? [duplicate]

Being a young and fairly inexperienced developer recently employed by a "real" software company I'd like some opinions and pointers on how to do the following: Approaches on how to get familiar with ...
20
votes
16answers
2k views

How do you go about understanding others' code? [duplicate]

What do you do to understand some code that you didn't write? Or code that you wrote long time ago and don't remember what it does anymore. Do you have some technique that you go about? Do you ...
4
votes
2answers
155 views

How long do I have to provide the source code for a LGPL-library?

In case I would dynamically link to a LGPL-licensed library (in this case Qt) in a commercial application: Which way do I have to provide the library's source code? Is a link to the project homepage ...
0
votes
1answer
76 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
52 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 ...
1
vote
2answers
140 views

What about source code homogeneity?

As time passes I think that one valuable aspect of maintenable and escalable software is to be homogeneous. The same problem should be solved I in the same way everywhere in the application. If there ...
14
votes
14answers
2k views

how to find out if spelling mistakes in source code are a serious issue or not?

I find very troubling amount of spelling mistakes I see everyday in our codebase, from which I will reproduce a very short but representative example: ArgumnetCount Timeount Gor message from queue ...
0
votes
1answer
119 views

What is the name/origin for this C code indentation style?

Look at the following code. Specifically, at the formatting of the variable declarations. I haven't encountered this indentation style in the past, but lately I stumbled upon two different code ...
0
votes
1answer
74 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; ...
1
vote
0answers
26 views

Managing interdependent project reference in solution file

Context for question I am working on a legacy product. That has multiple projects - Class libraries, websites, windows services, web services etc.. I have a single solution file that contains all ...
3
votes
1answer
288 views

How would one go about creating a “Licence Key” for a distributable source-available Software project?

This is something I have wondered, it has been a while since I have seen anything you can download which has to connect to license server in order to monetize a piece of software (and the last time I ...
1
vote
0answers
52 views

Structuring a multi-language project?

Let's say I'm working on a project which involves writing code for multiple devices, each in its own language (in particular, Arduino and Python). I want to contain the entire project in a single ...
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
38 views

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

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 ...
15
votes
2answers
11k views

What is programming like in the Japanese language? [closed]

Is the code written in Japanese? Are filenames in English? What about like a C preprocessor? Is that still in English? Are comments in Japanese? Examples would be nice too.
4
votes
1answer
268 views

Is a license header in source-files required?

Reading through the Apache Software License 2.0 appendix I am left unclear what exactly I have to do now: APPENDIX: How to apply the Apache License to your work To apply the Apache License to ...
2
votes
2answers
160 views

Do we really need auto-vectorization?

I am trying to understand automatic parallelization and a special case of that is auto vectorization. As I understand it auto-vectorization is more or less: The compiler takes parts of the code which ...
2
votes
1answer
230 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 ...
0
votes
3answers
59 views

Standard practice to publish and source-control a single file?

I often want to publish some useful standalone script - e.g., a matlab script which converts flac files into wav files. If it were a big project I would immediately place it in Github, however it ...
57
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 ...
1
vote
2answers
353 views

PHP Source Code Encryption Concept

Scenario: I'm looking to protect my software that is written in PHP. The nature of PHP is that it is delivered as plain text and therefore cannot be protected by itself. I don't want to install libs ...
-4
votes
1answer
174 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
354 views

How to Safely Sell Source Code?

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 ...
4
votes
4answers
423 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 ...
2
votes
1answer
121 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 ...
12
votes
8answers
954 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: ...
0
votes
1answer
116 views

Freelancer websites and share source code with staff [closed]

How safe is sending project files via popular freelance websites? For example their staff/admins has unlimited access to tons of very valuable sources, what's the sense then to upload there something ...
5
votes
2answers
347 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 ...
0
votes
0answers
122 views

Pitfalls of combining dependant traits and exceptions in same file as interface in php

What are the potential pitfalls of combining related class like objects (interfaces, traits, custom exceptions) in the same source file? For code reuse and only loading what I need I always separate ...
24
votes
16answers
2k views

Do you think code is self documenting? [closed]

This is a question that was put to me many years ago as a gradute in a job interview and it's nagged at my brain now and again and I've never really found a good answer that satisfied me. The ...
2
votes
0answers
58 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 ...
1
vote
4answers
693 views

Is having some logic in source code in order to perform some tests a good practice?

The question is not about changing the method/function visibility or extract local variable into instance variable in order to perform unit tests. There are cases where we could include some logic ...
6
votes
1answer
1k views

Does custom created code for a client imply copyright ownership?

I know of a potential customer that has been paying for website development work on an hourly basis for several years by several independent contractors, but has never signed an agreement as to terms ...