22
votes
7answers
2k views

What's the best way to avoid catastrophe caused by negligence? [duplicate]

I have been a programmer for almost 1 year. As an ADHD adult, naturally I don't have the same strength of attention on ordinary stuffs as my colleagues do. And I find the catastrophe made by me are ...
3
votes
1answer
50 views

Should I rename package after Android app name change?

I have an Android app. I have changed the app's name from appname1 to appname2. I would like to know if I should also change my package name from com.myname.appname1 to com.myname.appname2 to reflect ...
1
vote
1answer
38 views

Is there a way to document required properties in traits (PHP)?

I'm fairly new to using traits in PHP and am wondering if there is a way to ensure that a class including a trait has particular properties. I know that you can use something like the following to ...
-2
votes
0answers
31 views

Best way to implement in app purchases [on hold]

Whats the best way implement in app purchases? It's not just any kind of in app purchases. For that I can follow this tutorial. I'm trying to make something like what uber has. Someone posts ...
-3
votes
0answers
15 views

PHP Ajax error, get 404 when type first char [on hold]

I see error in my console it says: showHint is not defined, while I defined it already, also this live search doesnt return anything when I type it. It assume should work like this. gethint.php ...
1
vote
1answer
165 views

Using “Return” over “Break” or a combination

When using the Switch statement, is using return instead of break or a combination of the two considered bad form? while (true) { var operation = Randomness.Next(0, 3); switch (operation) ...
0
votes
2answers
62 views

Empty except block vs. huge except block

Which of these is easier to read? An empty except block: try: foo = do_foo() except FooError: pass # see below else: return do_bar(foo) # Recover from the FooError (long, complicated) ...
0
votes
1answer
49 views

Software previously licensed under GPL now APL2, can I use it in a commercial application?

A software I would like to use in a commercial project switched from GPL to APL2. The news cites: Please note that the new code that is currently developed as part of the 2.0 code base is licensed ...
-1
votes
0answers
21 views

How should I order software contributors in a citation? [on hold]

I've been involved in a couple of software projects (academic and industrial), and occasionally there's a need to cite the software (e.g. in a scientific publication). It might come up in a job ...
4
votes
1answer
176 views

Derive from a base class but not include a condition in the base class's method

The current code looks like this: public class Details { Public void Populate() { WriteChapterDetails(); } public void WriteChapterDetails() { if ( ...
5
votes
2answers
395 views

When to fix something that is “wrong” but works fine

Short version: I wrote some code that is not done "the right way" because, when I wrote it, I didn't know how to do it. Now that I know how to do it "the right way", how do I decide how to fix it? ...
-1
votes
0answers
37 views

Best Local PHP database for beginners [on hold]

What is the best local PHP database that beginners can use, I don't have internet at home and I would like to learn how to use PHP and run a database locally, Is there any application that has the ...
0
votes
1answer
14 views

Image uploads - preoptimize with CDN or host on same machine?

I'm working on a personal blog that will be used for reviewing various goods/services and as a dev journal. I'm writing this in Angularjs and Nodejs as a learning experience, but I plan on using it ...
-7
votes
0answers
29 views

how to resolve unwanted image tag [on hold]

can somebody please help me how can i remove this link to get featured when ever some body shares the web link on fb then this smiley image get featured what can i do to remove this image to get ...
1
vote
1answer
108 views

Does snapshot change tracking break DDD principles?

I'm building a website with MVC 5 and Entity Framework 6, implementing the Unit of Work & Repository patterns, and - for flexibility and performance - would like to utilize Entity Framework's ...
0
votes
0answers
44 views

Use of this pattern in C [on hold]

I was reviewing a C codebase and encountered this programming pattern frequently but am not sure of the utility: int afun(float a, int b) { int avar; float bvar; { /* why is this block needed? ...
0
votes
2answers
61 views

How to store users' info in network app?

I'm currently working on a school project that aims at creating a P2P chat client for users on the same network. For now, it will only be used by users on the same LAN network. But hopefully,I will to ...
4
votes
2answers
208 views

Is it a good practice to burn business logic into Enums?

Let's have a simplified business logic like this: public enum BusinessLogic { STAGE_ONE(true, false, false), STAGE_TWO(true, true, false), STAGE_THREE(false, false, true); private final ...
1
vote
1answer
41 views

Trying to Move Logic to DB - Reservation System

So I'm planning a basic resource reservation system. Basically I'm going to have a room (resource) that has X number of open spots per 30 minute increment. When someone reserves a resource I would ...
0
votes
1answer
81 views

Abstracted better? Data driven string creation

I am trying to post this question neutral of programming language so it helps the widest audience. But for those who must know, I am using Objective-C and iOS frameworks. The background: I have a ...
1
vote
0answers
28 views

How to normalize a table that contains a CK not included in the PK? [migrated]

I have the following table. The PK is model_ID. Assuming that the modelName field is unique(that is, no two brands can have an identical modelName), there is a transitive dependency between modelName ...
-3
votes
0answers
20 views

Listing all possible binary search trees [on hold]

I'm stuck trying to write a program that lists all possible binary search trees that has n values from 1 to n. I tried to solve it by recursively listing all subtrees, but have trouble implementing ...
0
votes
3answers
103 views

Should abstract classes be used to prevent instantiation

Is preventing the instantiation of a class a valid reason to make it abstract? For example, if I have a class called Gauge which has subclasses HeadingIndicator and AirSpeedIndicator, is it a good ...
-3
votes
0answers
38 views

How to evaluate Flow Chart process [on hold]

I am looking into one problem. Please refer following : Problem : I am new for this. Please let me know to crack these kind of charts. Thanks in advance.
-1
votes
0answers
25 views

Best practices for conditional content restriction [on hold]

Best practices for conditional content restriction I've spent a while coming up empty after several search attempts for best practices regarding, something I can only describe as conditional content ...
0
votes
1answer
17 views

Merging user activities into one stream with a common representation

My social network website currently has forum threads and posts gallery pictures albums on the users' profiles group discussions classifieds I would like to create one "stream" of activity. It ...
0
votes
1answer
101 views

Algorithm for merging multiple rows of data

I need an algorithm to merge multiple rows for data, where one column is the index column and if one or more rows have the same index value merge the column values into a single row, and lastly sort ...
108
votes
15answers
9k views

Leaving intentional bugs in code for testers to find

We don't do this at our firm, but one of my friends says that his project manager asked every dev to add intentional bugs just before the product goes to QA. This is how it works: Just before the ...
-6
votes
0answers
45 views

How to compute days between two date choosers [on hold]

How to compute days between two date choosers and show it inside the textfield; is this correct and what is the code should i input inside the settext Date date1 = this.dcStart.getDate(); Date date2 ...
0
votes
1answer
59 views

What is the correct answer of given problem?

Consider a system having m resources of same type and 3 process A,B and C have peak demands of 3,4 and 6 respectiveley. What should be the value of m such that the deadlock will not occur ? My ...
0
votes
1answer
25 views

Bundling style and script files in asp MVC layout page

How to bundle style and script files using layout in asp MVC? Here is an example. Layout1 uses style and script file for header and footer functionality. Sections are declared. View1 uses Layout1 . ...
-2
votes
1answer
19 views

SystemUnderTest versus other nomenclatures [on hold]

this is a minor issue but we are a worldwide company trying to unify some criteria and we are using systemUnderTest to name the variables used in our unit tests while others are using other ...
1
vote
1answer
95 views

How to politely decline a pull request?

There was a pull request made on one my repos adding explanations on the README file. Unfortunately, it's hardly understandable and I doubt will be helpful. What ways can I do to politely decline ...
2
votes
1answer
83 views

Creating variables in methods/functions

In how far do we create variables in our methods or functions? Do we only create one when we're using the result of the variable more then one time like this? function someFunction(SomeClass ...
7
votes
2answers
265 views

Should I keep email addresses as plaintext in database?

It's clear to everyone (I hope) that storing passwords without at least salting/hashing them is a terrible idea. What about emails? Let's say you keep the subscription email address, if you encrypt ...
0
votes
1answer
52 views

Application with really dynamic data structure

Well, I'm on the verge of this project that really puzzled me. The situation is, in our office, we have a department that collect data about the corporate performance indicators from all across the ...
1
vote
4answers
202 views

When is it not acceptable to model physical world objects with classes?

Does Object Oriented Programming Really Model The Real World? [closed] also "Firstly, A represents an object in the physical world, which is a strong argument for not splitting the class up." ...
-4
votes
0answers
40 views

High quality Bachelor's programs in Computer Science from Europe Universities [on hold]

I'm interested in enrolling in a Bachelor of Computer Science from a European institution (US also however money is a factor). I am a EU and Australian citizen. Could anyone suggest places to look or ...
0
votes
1answer
33 views

TLS alternatives that do not require a central authority?

I am creating a peer to peer program that runs on client computers connecting to other clients. I will be using Boost.Asio. The only options that I am aware of for securing these connections is using ...
0
votes
1answer
40 views

Implementing an interface already implemented by a parent class?

If a class extends a parent which defines an interface, should that class also explicitly implement the interface? As an example, is it better to include or remove the portion in square brackets ...
-2
votes
0answers
17 views

Is it adoptable in OLAP/OLTP to use in-memory storage such as redis? [on hold]

To design data warehouse solution it seems relational db And stored procedure are popular in this domain, how about redis like db? What's the drawback to use them here?
3
votes
1answer
51 views

How specify acceptance criteria for randomness?

How would I express a Behavior Driven Development (BDD) acceptance criteria/story/scenario that indicates items should be random to some degree on a Home screen of an app like Instagram? Here's what ...
4
votes
3answers
325 views

Why do python generators and functions share the “def” keyword?

Consider the following: def some_function(): return 1 def some_generator(): yield 1 In the code above, some_function is a function, while some_generator is a generator. They look quite ...
-1
votes
0answers
32 views

Font creation library? [on hold]

I need to create a font, and I need several... hundred... thousand characters. Maybe millions. I cannot draw them manually over the course of this century. However, I am able to draw all of them ...
0
votes
1answer
29 views

Best strategy for converting change in longitude and latitude to north, south, east, west in degrees

This is not a class assignment but a conceptual question I'm struggling with for a personal project. I need to convert a large paired group of long and lat coordinate values that show a ...
-4
votes
1answer
76 views

In my code everything works fine, when i debug i always get a 0 for smallest. why? [on hold]

NOTE I JUST STARTED LEARNING C++. THIS IS SCHOOL WORK AND WOULD APPRECIATE IT IF SOMEONE TAUGHT ME INSTEAD OF GIVING THE ANSWER. int a = 0; int b = 0; int c = 0; int sum = 0; int average = 0; int ...
2
votes
2answers
61 views

are multithreading, multiprocessing, multitasking implemented at instruction set or OS?

On a computer with a single cpu core, must a multithreading program be implemented based on an OS? Can it be implemented in the instruction set and run without an OS? Can multiple programs run in ...
-2
votes
0answers
44 views

how to identify http requests made with a java app

I am an avid Go player and play on the Kiseido Go Server. The only client I know is the one app CGoban which operates in desktop Java (https://www.gokgs.com/download.jsp), or if you wish as a Java ...
-3
votes
0answers
30 views

Making Looney Tunes Dash styled game. Starting advices? [on hold]

I'm new on this website. I have experience in iOS apps, but never got into game development. So, I'm new in this field. I was interested to know how they make a 3D character running game style like ...
1
vote
2answers
37 views

HTTP status code for mobile clients

There was a debate with one of the platform engineers (as a mobile dev), about the codes being returned. The scenario is: when trying to create a resource the server is returning a 201 with the ...

15 30 50 per page