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
21
votes
10answers
7k views

What are the benefits of multifile programming? [closed]

I have been told by another fellow C programmer to write large applications in several different .c and .h files, and then compile them together. They say it will run faster. Does a multifile ...
1
vote
2answers
443 views

Database migrations and Code deployment

Should Database migrations be in included in the same deployment project as the code? If they are not included in the same deployment, the Database deployment package and the Code deployment package ...
-3
votes
1answer
58 views

Protecting research source from spyware/data mining

My question is simple: What steps should you take to protect research from the vast amount of spyware or insecure applications on a given device? Background: I do research into developing new models ...
0
votes
2answers
154 views

Effective method of estimation when dealing with large code bases

Got a largish legacy Java code base at my hands: ~100k LoC ~1100 classes monolithic and cohesive (no "modules" or so) many OOP abstraction layers almost no comments, etc. The task is to produce time ...
1
vote
2answers
156 views

Should i accept that a client adds changes to sourcecode on an ongoing development?

I'm currently in a situation (i'm a technical lead) where the client has modified on his own the source code, and i'm being told to accept the changes and keep working on that version. Technically he ...
27
votes
9answers
8k views

What are your thoughts on Periods/Full Stops in code comments? [closed]

I saw this asked in the SO Tavern, so I'm posting the question here. I thought it an interesting question. (Of course it doesn't belong on SO, but I think it's OK here.) Do you add periods (or, as ...
-2
votes
1answer
179 views

What is the meaning of 'code vetting' in Software Engineering? [closed]

I saw the term code vetting for the first time in a gerrit review page. What does it mean? The line I came across: "No XYZ check was done. However, if this project is intended to be shipped in ...
0
votes
1answer
704 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 ...
1
vote
1answer
428 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 ...
-1
votes
1answer
76 views

Should one create code review for an incomplete unfinished change? [duplicate]

Had this happened: A developer make a new feature, but not working, since last year, total code change is 100+files and 10k lines. Until recently, with help of another developer, get it to work. ...
2
votes
2answers
116 views

Summing cyclomatic complexity of function or files

Is the sum of the cyclomatic complexity of all section in a file the total cyclomatic complexity for this file? If it is, is the sum of a set of related files the total cyclomatic complexity for this ...
0
votes
1answer
157 views

What is an interim version in Source Control?

I've been working on an open source project recently and have been checking out Core Infrastructure's best practices checklist. One of the items pertaining the "Change Control" checklist is as ...
0
votes
2answers
129 views

Can a service provider proof it is running a particular open source product? [closed]

Part of our project includes an open source GO server that we have open sourced for transparency. How can we prove that we havent made any alterations to the code before we deployed it?
-3
votes
1answer
125 views

Is throwing exceptions in Debug mode a bad idea? [closed]

I am working in an iOS project which have two schemes enabled from configurations, Release Debug As you know Debug scheme is used for developers while developing features and testing etc. However, ...
3
votes
2answers
557 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 ...
0
votes
3answers
324 views

Protect Part of the Code

My company works with different developers from different studios, always sharing the code to everyone aboard. At the moment, we need to protect a part of the code, not from theft but from some ...
1
vote
0answers
81 views

Can one copy their own code from a different company? [duplicate]

Lets say someone has written code for multiple companies that have then copyrighted you work. Another company gives them a similar project to one they have worked on previously. Would it be legal for ...
-1
votes
2answers
115 views

Are executable requirements the most advanced form of declarative code?

The more declarative code is, the less explicit technical details it contains and the closer it gets to requirements expressed in domain language. In the extreme case, there is no more difference ...
-3
votes
3answers
354 views

Ken thompson's compiler hack [duplicate]

I have gone through ken thompson's compiler hack paper, can't we just go through the complier's source code and check for any backdoor, what was the article's point? https://www.archive.ece.cmu.edu/~...
-1
votes
1answer
138 views

static, dynamic analysis - what mistakes were made in the code?

A software company develops software packages for commercial animal farming. A special function in C calculates the daily amount of feed for different kind of animals dependent on their bodyweight....
1
vote
2answers
203 views

How to find already existing code | How to arrange code in a way it can be found again [closed]

I'm refactoring the framework of our company, trying to fix the issues we had in the past. We're a team of 6 developers, and we have various needs and issues in regards to tidying up our framework. ...
0
votes
2answers
195 views

How can I figure out where the code starts for a complex software project? [duplicate]

Say I want to (try to) read through and understand a fairly complex piece of code (for example the free software Coreboot firmware code, which can be found here). How can I figure out where the code ...
-1
votes
2answers
183 views

What to name a class that acts as a container for a collection but isn't a collection itself? [closed]

I have an object that acts as nothing more complicated than a data store for a collection of items. I do this because it lets me bind the data to a single object, which I can store in the Unity (game ...
0
votes
1answer
112 views

Is there a way to use and ignore blocks of code, caused by events during runtime?

I'm working in C++14 and trying to figure out a way to put two classes (with the same name) inside the same header file. In this scenario one class would always be ignored as a result of something ...
13
votes
7answers
2k views

Development Approach: User Interface In or Domain Model Out?

While I've never delivered anything using Smalltalk, my brief time playing with it has definitely left its mark. The only way to describe the experience is MVC the way it was meant to be. ...
0
votes
2answers
79 views

SVN / Git How to administer branches

I'm the technical lead for a small company (6 developers). We currently use SVN and we're slowly porting over to Git, after everyone gets their training. Currently our clients are the ones who "pull ...
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
vote
2answers
195 views

Unit testing similar wrappers - or single unit test is enough?

I'm working on a service which has a lots of dependencies. The way how I call them is I'm wrapping each service client around an Adapter. Like this (I'm using Java): public abstract class AdapterBase&...
9
votes
6answers
2k views

Did Dijkstra intend for code modularization, when he wrote about separation of concerns?

First, I read an excerpt Edsger W. Dijkstra's 1974 paper "On the role of scientific thought": Let me try to explain to you, what to my taste is characteristic for all intelligent thinking. It is, ...
-3
votes
1answer
103 views

I want to sell web app and share source code but not to be redistributed. How do I do that?

I want to sell web app to be hosted internally and share source code with that specific client but not to be redistributed(commercially or non-commercially) to outside the office. They can edit and ...
6
votes
2answers
3k views

Monorepo vs multi repo for large project with multiple partial deliveries

I am looking into options for smoothing out our deliver and release pipeline, and would appreciate some advice on the best way to structure the source code. This is a pretty large project, which ...
3
votes
1answer
506 views

How to deal with large source codes?

Maybe this answer already exists here, but I do not know if there is any technical term for that. I'm starting to develop in C ++ and as the program grows in size, it gets harder to move through the ...
3
votes
0answers
152 views

Best practices for understanding/resurrecting old technical code?

Recently, I've been in a few situations where I needed to quickly come up to speed on old code and fix it sufficiently for people to be able to use it again. The code I've worked on tends to have the ...
211
votes
10answers
26k views

Why do we need so many classes in design patterns?

I am junior developer among seniors and am struggling a lot with understanding their thinking, reasoning. I am reading Domain-Driven Design (DDD) and can't understand why we need to create so many ...
11
votes
5answers
9k 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
1answer
83 views

Which data structure should I use for implementing a code indexer

I need to write a basic code indexer, which needs to be fast. Should I use an embedded SQLite database for this or should rather rely on a custom data structure, or even flat files as used by ctags? ...
149
votes
13answers
25k views

Should I refactor the code that is marked as “don't change”?

I am dealing with a pretty big codebase and I was given a few months to refactor existing code. The refactor process is needed because soon we will need to add many new features to our product and as ...
-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 ...
1
vote
2answers
263 views

Overhead of using big singleton with all files includes

I have several subsystem managers for various uses, for example: AudioManager CollisionManager InputManager etc. At first I wanted them to be all singletons, however now want to make the ...
20
votes
9answers
2k views

What exactly makes code “clean”? [duplicate]

I am an intern at a small software company, doing typical grunt work. Many tasks that the actual developers are doing are above my head however I finally got to see some real "action" and write some ...
1
vote
2answers
267 views

Solution to growing code footprint

I have this conondrum I have to deal with. We have this already pretty big application which main purpose can be classified into 2 main functions: Core data (deals with a pretty complex data ...
1
vote
0answers
91 views

Allow Third Party Access to Source Code without right to redistribute or sell [closed]

I am in a situation where a client is asking that I develop a custom software product for them. They've asked that I subcontract under another party that they have worked with before. In reading the ...
5
votes
2answers
2k views

Source control system for binary files [closed]

At work we have a legacy system written in Visual FoxPRO. Everything in foxpro is a table, even forms, so basically if you open a form file with a text editor you don't learn much. Does anyone know ...
1
vote
3answers
236 views

Difference between 'system code' and 'application code'

I'm reading Code Complete (2nd Edition) and in Chapter 21 the author mentions the terms system code and application code in the context of formal inspections, saying that system code has to be handled ...
0
votes
2answers
131 views

Should I use unknown code from a third party? [closed]

I am looking to build and host a website for a client. Their existing site has a facility that allows customers to make donations and they want the new site to have it too. My manager has told them ...
2
votes
2answers
882 views

Multi-Thread Return Single SQL Result

I am having some difficulty with MySQL and returning a unique row to a thread. I want it so the thread will search for a row from the table where the bit (see below) is false and only one row is ...
2
votes
3answers
374 views

Is there a way to have four possible outcomes without repeating the two conditions? [duplicate]

In a generic sense, my question goes something like this: if (p) { if (q) { a(); } else { b(); } } else { if (q) { c(); } else { d(); } } ...
0
votes
1answer
178 views

Source Control - ASP.NET WebForms - Inexperienced team

I am currently working at a company that has a small(2) development team for our ASP.NET WebForms project. This was something we picked up from a previous team. The current team is made up of recent ...
5
votes
5answers
494 views

Check if variable is not null before setting to null

One of our team likes to write code like this (C#): if (_someVar != null) { _someVar = null; } Rather than simply: _someVar = null; I've never used the former as I always assumed it was ...
4
votes
1answer
153 views

GitHub - Should I unassign an issue once closed?

Whenever I am using issue tracking on GitHub with my team, should we unassign people from the issue once we close it? I don't know which way should be done, and if there is any advantage to ...