Source code is any collection of computer instructions (possibly with comments) written using some human-readable computer language, usually as text.
-2
votes
1answer
73 views
Is it a good practice to separate one function into one file ? [closed]
For example, lodash library here separate each function into each file ?
Since this is a popular library and this library organize their files into this way. there must be based on some good practice ...
5
votes
0answers
177 views
Software licensing - Pre 1970's [migrated]
From reference, page 4, The official ubuntu book, Eighth edition,
As computer’s became cheaper and more numerous in the late 1970’s, producer’s of software began to see value in the software itself....
81
votes
6answers
14k views
Why are some C programs written in one huge source file?
For example, the SysInternals tool "FileMon" from the past has a kernel-mode driver whose source code is entirely in one 4,000-line file. The same for the first ever ping program ever written (~2,000 ...
-4
votes
1answer
126 views
Is it true that Linux and Mac OS programs' source are interchangeable? [closed]
Is it true that most of the times source code for Linux programs can be compiled into Mac OS programs and vice versa?
6
votes
1answer
86 views
What is the difference between predicate and branch
I am confused about the difference between the branch and the predicate in a code. Can someone explain the difference with an example?
-2
votes
1answer
255 views
Why does Java source code contain so many single-letter variables? [closed]
I have been reading the source code of some Java library classes, specifically CompletableFuture. I noticed that the authors are making extensive use of cryptic (single-letter) variables in the code, ...
-1
votes
1answer
82 views
Is the following method to compare source codes or work effort reliable? [duplicate]
I want a feasible way to compare my project with my friend's project. I first thought it was enough to compare based on the number of code lines. But for some reason, people kept saying "LOC is not a ...
10
votes
5answers
918 views
Terminology - is source code a program? [closed]
I'm a beginner in programming and I don't have a good grasp on terminology. I'd like to know if source code written in a compiled language like C or C++ is considered a program? If not, can anyone ...
1
vote
1answer
70 views
How to find out the source code of the earliest release/version?
Reading source code of the early release/version is very helpful for beginner to digest complex project. There is less line of code and learner can see the progression of the project.
However, ...
3
votes
1answer
120 views
What data structures are used to represent source code by programs that do source-to-source transformations?
For programs that read in source code, transform that source code, and then write back out the transformed source code so that it can be read and edited by humans, what sorts of data structures are ...
-1
votes
1answer
91 views
How to understand an OS's source? [closed]
I usually understand code by fiddling around, or by inserting printfs here and there, but this time around, that isn't possible, since the end product is an OS, so any suggestions on how to tackle ...
-1
votes
1answer
67 views
Maintain two different versions of similar code [duplicate]
I'm working on a special project where I need to create a new application with a similar but restricted functionality of an original application (basically a type of free application with limited ...
3
votes
3answers
302 views
How to estimate SLOC for project that has no source code yet?
Recently, I've been getting familiar with COCOMO II model to calculate the effort (person-months) and duration (calendar time in months) required to develop a mobile application. To calculate the ...
2
votes
0answers
133 views
Documenting and handing over Source Code
I have recently left my previous student job as a part time developer for at small ERP management firm.
During my time at the firm i have developed several modules for integration with the ERP ...
7
votes
2answers
437 views
Manging in-house NuGet packages with source code access
We have a lot of in-house libraries that we would like to share between projects inside the company. These are some of the requirements:
library sources are stored in repositories separated from end-...
-1
votes
1answer
84 views
Shorthand notation for XSLT?
There are a few languages, that developed shorthand notations, notably e.g. ECMAScript can be generated from coffeescript:
CoffeeScript is a little language that compiles into JavaScript. ...
1
vote
1answer
61 views
What is the purpose of keeping “open” a merged MR in Gitlab?
In gitlab, there is Merge Requests (MR) like in github there is Pull Requests (PR).
If the MR is rejected, sure, we close it.
But what if the MR is merged ? In that case the button to close the MR ...
10
votes
2answers
394 views
Apollo-11: Using inclusion instead of a linker
Recently digitized and turned into a repo, the original Apollo 11 guidance computer source code has been made available for viewing on Github.
In MAIN.agc, the repo author comments that they
...
-2
votes
2answers
131 views
Translation of a project from one language to another
If I wanted to turn a Java game into Lua, how could I do it? I'm thinking that you could have a program read the assembly language behind two programming languages, find the patterns, attach them to ...
1
vote
3answers
207 views
What's code that's not a part of API called? [closed]
In a library with many code, some of them being the API which user would use to interact with the library, what should I call the rest of the code which is not part of the API directly?
In other ...
4
votes
1answer
119 views
Should the ability to locate where code is being used be a consideration?
I was modifying a class whose job is to load other classes from the same directory. Basically, everytime a new class is added you need to add a new CommandClass; statement to this class for it to be ...
0
votes
2answers
106 views
Modernize a compiler, late switch of generation-paradigm
Have been hired to modernize an old binary compiler that has been forgotten since a few years by people who have died already.
The compiler has
a parser,
an objectmodel and
a generator of ...
4
votes
2answers
406 views
Should I have a 'dev' branch separate from a 'production' branch?
I recently set up my staging and production server environments on Heroku and everything is working great. Through Heroku, you can deploy from a Git branch - e.g. master or my-feature. This got me ...
1
vote
1answer
112 views
Sharing code with API vendor for review without giving them access to the server or repo
A private company allowed me to use their API to make REST API calls (using Basic Authentication) in my application's server side. They also asked to see my implementation before I can go live.
From ...
0
votes
2answers
107 views
Can I release software under the GPL if it must be built with a proprietary compiler?
The compiler doesn't leave its own code in the software or link proprietary libraries with it, the source code is exactly the same one I used throughout the development process, everyone is free to ...
-1
votes
2answers
162 views
Are there coding standards for whether procedural programs should have source code listed top-down or bottom-up? [closed]
Let's say I have a basic procedural program which is well structured into decomposed functions. For example, a main() function which calls functions a and b, which in turn each call functions c and d, ...
0
votes
0answers
43 views
How to study a big project source code? [duplicate]
I am newly hired in a company department which uses Meteor and React in building projects. As expected, I am required to study the source code regardless of the project size and progress. This ...
2
votes
2answers
168 views
Distributing GPL-ed software with lost source code
Thought experiment.
Tom is a software developer. He releases his relatively simple software under GPL. Jerry forks his source code and creates a world savior software with months or years of hard ...
-4
votes
2answers
170 views
How to find all occurrences of a variable within a source code?
The title is pretty self-explanatory. I have a minified JavaScript code (100k+ lines) and would like to find all occurrences of a particular variable so I could rename it to better understand code. Is ...
90
votes
9answers
14k views
Why did BASIC use line numbers?
Why did old BASICs (and maybe other languages) use line numbers as part of the source code?
I mean, what problems did it (try to) solve?
3
votes
1answer
164 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' roles....
3
votes
1answer
127 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): https://github....
0
votes
2answers
318 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
710 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
234 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
131 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
533 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
81 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
452 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
104 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 (...
-1
votes
1answer
110 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 ...
5
votes
3answers
251 views
How to display/clarify the licence for code in a blog
Let's say I have a blog available under one of the Creative Commons licences.
Such type of licence would be displayed at the bottom of each page with a link
to the actual licence, etc..
However, ...
1
vote
1answer
90 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
58 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 ...
3
votes
1answer
695 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
100 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
72 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 I'...