-1
votes
1answer
25 views

How do GUIs work at the root level? [on hold]

So far, all I know is java code, and I don't mean importing javafx. I want to understand everything from the root up. Is a lot of the java gui applications used from another language (like C)? Or ...
29
votes
7answers
15k views

Why avoid Java Inheritance “Extends”

Jame Gosling said “You should avoid implementation inheritance whenever possible.” and instead, use interface inheritance. But why? How can we avoid inheriting the structure of an object using ...
10
votes
3answers
1k views

How to TDD that the correct results are returned

I'm starting a new project, and trying very very hard to use TDD to drive the design. I've been pushing for years, and finally got approval to spend the extra time on this project to use it while I ...
9
votes
5answers
814 views

How to maintain programs without source code

In our company we have a small program (.exe 500Kb size) that does mathematical calculation and in the end it spits out the result on a Excel spreadsheet that we use to continue our workflow. I want ...
0
votes
1answer
25 views

Why and when would you use a .NET framework data type?

I've seen an increasing trend of people submitting code to SO that includes the use of .NET Framework data types. I understand that the .NET Framework has its own data types (like Int16, Int32, ...
0
votes
0answers
14 views

Viability of custom framework to serve RESTful API

Context For my end-of-year project at school I had to create a framework to serve a RESTful JSON API. I wasn't authorized to use a project like Ruby on Rails for instance, Sinatra is allowed since it ...
166
votes
19answers
7k views

How are globals any different from a database?

I just ran across this old question asking what's so evil about global state, and the top-voted, accepted answer asserts that you can't trust any code that works with global variables, because some ...
0
votes
0answers
14 views

Updating all records in MySQL table while still available to the user

I have this 'table A'. It contains two columns; email and email_alias. A sample is below: ===================================== = email | email_alias = ...
3
votes
3answers
31 views

How to treat validation of references between aggregates?

I'm struggling a bit with referencing between aggregates. Let's assume the aggregate Car has a reference to the aggregate Driver. This reference will be modelled by having Car.driverId. Now my ...
-3
votes
2answers
55 views

Java Ellipses Signature for Multiple Parmeters

Firstly, I am studying function with new type of signature and body, and in this code, I want to know, what type of object is values? It doesn't appear to be an array of strings based on my ...
1
vote
2answers
74 views

Why is it bad to use inline styling in HTML for generic styles?

Given <div> <textarea></textarea> </div> Why is this <div> <textarea class="width90"></textarea> </div> .width90{ width:90%; } any ...
0
votes
2answers
160 views

How to implement backtracking to check if all fields have been traversed

I have been learning algorithms and trying to solve problems and now I have the following problem: In a 4x4 matrix, and it contains fields with height. There is a start field with given height also ...
-1
votes
0answers
10 views

tidyParseBuffer strip the <style> tag in the body

When i use "tidyParseBuffer" function to parse a html, it remove the "style" tag in the body, usually the "style" tag should be in the head, but i need the contents in the body, what should i do to ...
0
votes
3answers
148 views

A very basic question about whether I should check for null and throw NPE? [duplicate]

Consider the below method- public void operationOnList(List<String> list) { list.add(1); } It is obvious that if l is null this method will throw a NullPointerException. My question is ...
1
vote
0answers
8 views

Linking service and factory functions to controller $scopes in Angular

I'm trying to keep my controllers as thin as possible, so I keep my domain logic in services and factories. When I need to call a function in response to a user action like a click I assign the ...
2
votes
3answers
98 views

Should I only declare the variable as integer if I can perform calculations on it?

Been thinking this for a while now, for example I have a UX that let's the user choose what IP to connect. I have numericUpDown1, numericUpDown2, numericUpDown3, numericUpDown4 to limit the user to ...
3
votes
1answer
61 views

Layered architectures and modular software

I have built a server-side Java application of about 10k lines of code and on a code review a colleague made me notice that when developing a new business feature , I have to touch several files. My ...
0
votes
1answer
21 views

Using “Id” as Primary Key in green field Dapper Contrib MVC 5 site

I am creating a new site and will base it on ASP.NET MVC 5 & Dapper Contrib. I want to go all in with all these technologies - and get all the time saving / convention over configuration / terse ...
1
vote
1answer
104 views

What is the correct reusable architecture using Entity Framework for common database tables and services?

Context I have a line of business application "MyApp" in C# using EF. Layers are separated as MyResusableLib.DataAccess // Class Lib: EF based utils, extension methods, MyApp.DataAccess // Class ...
13
votes
3answers
4k views

Is inline SQL still classed as bad practice now that we have Micro ORMs?

This is a bit of an open ended question but I wanted some opinions, as I grew up in a world where inline SQL scripts were the norm, then we were all made very aware of SQL injection based issues, and ...
2
votes
5answers
102 views

Conditionally initializing a string list

I am writing a program that needs to be able to process data from a number of different sources. The sources output data in a variety of formats. So, depending on which source is being used, I need to ...
15
votes
5answers
6k views

Proper workaround for multiple inheritence in Java (Android)

I have a conceptual problem with a proper implementation of code which seems require multiple inheritance, that would not be a problem in many OO languages, but as the project is for Android, there ...
27
votes
14answers
17k views

Is it possible to reach absolute zero bug state for large scale software?

I am talking about 20-30+ millions lines of code, software at the scale and complexity of Autodesk Maya for example. If you freeze the development as long as it needs to be, can you actually fix all ...
8
votes
3answers
139 views

In REST parlance what is the difference between a resource and a representation?

My understanding of REST that is enables modelling service operations as representation of state and transition from one state to another making use of HTTP. I have always understood resources as ...
-2
votes
0answers
27 views

understand and use Event , personal event example [on hold]

i m in front of first uses of personal event. I present some of my doubts and my problems.. I write a small class CountDown, is use a timer to create a countdown and raise an event when time target ...
0
votes
1answer
56 views

What are the consequences of eliminating the ORM/ODM in a NoSQL based system?

In Martin Fowler's article OrmHate, he state the following: If you have an application problem that maps well to a NoSQL data model - such as aggregates or graphs - then you can avoid the ...
0
votes
1answer
84 views

Are there any alternatives to dependency injection for stateless classes?

I am working on an application whereby I have designed classes to fit into several groups: Immutable: initialised through constructors, uses copy-and-swap idiom (inc. move), can deep copy (i.e. ...
1
vote
1answer
55 views

How broad is the definition of “dependency injection”?

What is the "essence" of dependency injection? Is it the idea of dynamically swapping out/in core logical/structural aspects of a program at runtime? Traditionally, this is done in code via some DI ...
1
vote
1answer
39 views

GPL: What do I have to provide?

Hello I know this is a common question, but I am not sure how my case fits in. I am building a site with a GNU licensed program called OpenCart. Now I am not "distributing" anything.. but people ...
1
vote
1answer
64 views

Is a PropertyChanged event handler bad if it is used for updating the database?

I have a class with several fields. public bool Active { get; set; } public List<Group> Groups { get; set; } public string FirstName { ...
0
votes
0answers
60 views

JSON API or Plain JSON

There is a debate in my company on whether we should use the JSON API specification or stick to plain JSON for developing APIs that will be consumed by mobile apps, mainly iOS and Android. One ...
2
votes
1answer
82 views

Create different classes for staffers and users?

I am building a program for a law firm. When a staffer is active (i.e. still works at the firm) he has a password to login the program; When a staffer is inactive (i.e. no longer works at the firm) ...
1
vote
1answer
61 views

when writing platform specific code, is using separate .cpp always preferred instead of using #ifdef?

I have some platform specific code, such as a string needs different values at different platforms like it: test.cpp #if(PLATFORM==ANDROID) string url="android"; #elif(PLATFORM==IOS) string ...
-4
votes
0answers
27 views

Mysql connection is failed to login [on hold]

I have installed mysql workbench 6.3 CE and created database and one table and try to get data from window form application. Following is code for connectivity: String Conn = "Data Source = ...
-3
votes
0answers
32 views

How to automate to download document from a list of particular websites depending upon sone keywords

My requirement is to write an web application which can be scheduled every morning to download documents e.g. doc, pdf etc from a list of particular websites which will be provided to the software. I ...
0
votes
0answers
21 views

How to calculate new property for old records efficiently?

Let's say we have classes something like this: public class Item1{ public Guid Id {get; set;} public string Name {get; set;} public decimal Price {get; set;} public int Quantity {get; ...
118
votes
12answers
18k views

Why does Uncle Bob suggest that coding standards shouldn't be written down if you can avoid it?

While I was reading this question, the top voted answer quoted Uncle Bob on coding standards, but I was confused by this tip: Don't write them down if you can avoid it. Rather, let the code be ...
3
votes
1answer
88 views

Idiomatic internal architecture of Go microservices

For learning purposes, i'm trying to implement a small project using (buzzword warning!) microservices. There are plenty of resources online talking about the 'macro' microservice world -integration, ...
0
votes
0answers
16 views

Modern way to have equivalent of .net tableadapter in-memory table sync'd to db

I'm rewriting a 2005 era asp.net app that uses tableadapters, and relies on the in-memory datatables to have fast and frequent redisplay access to a table that is written to by several users, sort of ...
1
vote
0answers
19 views

Preparing multiple serial ports with multiple TCP in my project that I can enable or disable if I want

I have intermediate level of understanding on how TCP and serial works, I've also been able to develop system that uses 1 TCP client and 1 Serial 2 Serials 1 TCP Server 1 TCP client My problem is ...
0
votes
1answer
110 views

NoSQL in Java Enterprise Application

I'm planning a large scale enterprise application that requires reliability and standardization comfort that Java EE provides. At the same time, I'm wondering if I go for Java EE, will I be able to ...
-2
votes
0answers
61 views

How can I prepare myself for programming in PhD research? [on hold]

My background is in Computer Science but I'm not practising programming since a long time so I only remember how to decalre a variable and assign it a value (in Java). In 6 months time I'm going to ...
30
votes
7answers
5k views

Software License which discriminates on 'ethical' grounds

I've spent some time reading the common copyleft and permissive software licenses. Is there a license which allows the creator of an application or algorithm to broadly specify who may use/distribute ...
4
votes
1answer
198 views

Migrating a Grails application to Scala Play/Spray

We have a moderately sized Grails web application using GORM/Hibernate over PostgreSQL and GSPs serving HTML, and also a few REST APIs. We are standardising on Scala, and would like to migrate this ...
2
votes
1answer
99 views

What type of buffer should I implement for a one-way streaming audio device?

I'm working on a project where audio data is streamed to a device. The audio data is encoded via opus and streamed at 20 ms payloads at a time. The streaming is done via TCP to avoid packet loss ...
-1
votes
1answer
48 views

Cyclomatic complexity - what exactly does the word “cyclomatic” mean?

I understand what cyclomatic complexity is, but I was trying to find the origin/meaning behind the word "cyclomatic" and could not find anything that wasn't about cyclomatic complexity. Does this ...
4
votes
3answers
532 views

Database design, how to handle freelancers

The context I'm modeling a database for a small ERP system. However I've recently hit a difficult spot that I'm having a hard time wrapping my head around. The logic of it involves a few special ...
7
votes
2answers
632 views

Types in Lisp and Scheme

I see now that Racket has types. At first glance it seems to be almost identical to Haskell typing. But is Lisp's CLOS covering some of the space Haskell types cover? Creating a very strict Haskell ...
0
votes
2answers
50 views

Literals versus instantiating by name lists and dicts in Python?

In Python, what is the difference in these declarations… my_list = [] my_list = list() …and in these? my_dict = {} my_dict = dict() Are they interpreted the same, and why would you use one over ...
11
votes
5answers
2k views

Are dynamic languages at disadvantage for agile development?

From what I've read agile development often involves refactoring or reverse engineering code into diagrams. Of course there is much more than that, but if we consider the practices that rely on these ...

15 30 50 per page