Questions tagged [source-code]

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

Filter by
Sorted by
Tagged with
-1
votes
1answer
92 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
1k 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
77 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
181 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
120 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 ...
0
votes
1answer
720 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
4k 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 ...
3
votes
2answers
580 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 ...
20
votes
3answers
3k views

Managing 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
234 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
437 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 ...
9
votes
2answers
420 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
1k 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
440 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
148 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
112 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 ...
5
votes
2answers
3k 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
136 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
252 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 ...
2
votes
2answers
812 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, ...
2
votes
2answers
244 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 ...
-2
votes
2answers
197 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 ...
96
votes
9answers
17k 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
182 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....
4
votes
1answer
263 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
1k 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 ...
3
votes
3answers
7k 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 ...
1
vote
3answers
263 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 ...
-1
votes
4answers
147 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
2k 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
348 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
3k 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
433 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 ...
41
votes
13answers
8k 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
287 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 ...
9
votes
3answers
939 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
103 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
62 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
1k 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 ...
52
votes
9answers
11k 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
118 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
91 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'...
1
vote
1answer
5k 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 ...
60
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 ...
0
votes
1answer
745 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 ...
2
votes
1answer
182 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 .net....
9
votes
4answers
6k 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 ...
17
votes
8answers
8k 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 ...
4
votes
2answers
419 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 ...