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)

-3
votes
0answers
35 views

Which are the most used software metrics for analysing software quality from source code? [on hold]

I am looking for the most used metrics that analyse source code. I already know: code coverage cyclotomic complexity percentage of redundant code cohesion coupling depth of inheritance number of ...
51
votes
9answers
9k 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 ...
14
votes
15answers
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
95 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
66 views

Return values and exceptions [on hold]

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; ...
0
votes
0answers
13 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 ...
-1
votes
0answers
4 views

Remove Copyright Template Headers from Java Source in IntelliJ [migrated]

IntelliJ adds too many copy right headers I setup IntelliJ to include a licence into source code as a comment into the header. For some reason IntelliJ repeated the copy right statement for several ...
3
votes
1answer
251 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 ...
0
votes
0answers
28 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
977 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
32 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 ...
14
votes
2answers
9k 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.
2
votes
1answer
104 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
1answer
109 views

C# Running String As Code [closed]

I want to implement an interesting concept into my game in which clients can program certain parts of their AI. I will provide them an unchangeable namespace and class formatting and they will code ...
2
votes
2answers
130 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
198 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
48 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
155 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 ...
18
votes
16answers
2k views

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

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 ...
2
votes
1answer
99 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 ...
-4
votes
1answer
129 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
289 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 ...
-1
votes
2answers
145 views

Does code format affect performance?

I think I have came across a few times when I reformat some segment of code, it performed the way I wanted it to other than the other poorly formatted segment of code? Does code format affect ...
4
votes
4answers
283 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
112 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
742 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
84 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
333 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
75 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 ...
1
vote
0answers
50 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
640 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
943 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 ...
1
vote
2answers
61 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(); ...
5
votes
2answers
587 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
4k 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 ...
5
votes
2answers
2k 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 ...
5
votes
2answers
251 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
196 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 ...
196
votes
23answers
34k views

Should you keep a copy of all the code you write?

I know the company you work for owns the code and obviously you will get arrested if you try to sell it. But is it uncommon for developers to keep a personal copy of the code they wrote (for future ...
2
votes
2answers
1k 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 ...
0
votes
2answers
277 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
214 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++){ ...
2
votes
2answers
160 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
3answers
908 views

Should my source code be in UTF-8?

I feel that often you don't really choose what format your code is in. I mean most of my tools in the past have decided for me. Or I haven't really even thought about it. I was using TextPad on ...
8
votes
4answers
705 views

Is integer used too much as a data type?

Do most application developers use signed integers in places where they really mean to use unsigned integers? I do it all the time, so do my co-workers. I haven't seen a lot of other extensive ...
0
votes
1answer
98 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 ...
3
votes
2answers
1k views

Tried teaching myself to program before college, accidently overwhelmed myself, tips? [closed]

I'm sixteen, I'm overly interested in programming, and I'm currently taking IT classes during my mornings in high school. Last year, I tried teaching myself to code. It was quite exciting, but all I ...
1
vote
1answer
178 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 ...