Questions tagged [software-design]

Software design is the activity of deciding what properties, elements, responsibilities, interfaces, relationships and interactions are required in order to create an effective piece of software.

According to Wikipedia, software design is:

Software design is the process by which an agent creates a specification of a software artifact, intended to accomplish goals, using a set of primitive components and subject to constraints. Software design may refer to either "all the activities involved in conceptualizing, framing, implementing, commissioning, and ultimately modifying complex systems" or "the activity following requirements specification and before programming, as ... [in] a stylized software engineering process."

1966 questions
10
votes
4 answers

What happens when you initialize instance variables outside of __init__

In python when you initialize an instance variable (e.g. self.my_var) you should do it in your class __init__ function, so that the memory is properly reserved for this variable per instance (<--my mistake, see bellow). When you want to define class…
LetsPlayYahtzee
  • 7,161
  • 12
  • 41
  • 65
10
votes
5 answers

Untying Knuth's knots: how to restructure spaghetti code?

This question was inspired by How to transform a flow chart into an implementation? which asks about ways of algorithmically eliminating the goto statement from code. The answer to the general problem is described in this scientific paper. I have…
Matsmath
  • 1,164
  • 2
  • 21
  • 40
10
votes
1 answer

CoreBluetooth: How to design code for many characteristics (30 - 40)?

I searched around a bit and just found this as a possible duplicate question: Multiple CBPeripheral's for same device My problem is: I have multiple services which all together have about 30-40 characteristics (Yes, I need all of them...). As…
orschaef
  • 1,287
  • 10
  • 27
10
votes
3 answers

Why are stored procedures still not supported in Rails (3+)?

I am familiar with the long standing love-hate relationship between Ruby on Rails, DB(MS)-drivers and Stored Procedures and I have been developing Rails applications since version 2.3.2. However, every once in a while a situation arises where a SP…
10
votes
5 answers

Data structure for selecting groups of machines

I have this old batch system. The scheduler stores all computational nodes in one big array. Now that's OK for the most part, because most queries can be solved by filtering for nodes that satisfy the query. The problem I have now is that apart from…
Šimon Tóth
  • 35,456
  • 20
  • 106
  • 151
9
votes
3 answers

Why prefer template method over dependency injection?

I've been reading Design Patterns, by Gamma et al. I have a question concerning the Template Method as compared to Dependency Injection. With Template Method, you "template" classes with policies that provide alternatives for needed actions or…
Robinson
  • 9,666
  • 16
  • 71
  • 115
9
votes
1 answer

Well designed / high-quality open source software

Asked on Programmers: Well designed / high-quality open source software I'm taking a software design class where I should choose an open source software to analyze from the Software Design point of view. It has to be a big project: not less then…
Andrea Zilio
  • 4,444
  • 3
  • 29
  • 34
9
votes
3 answers

Software-design & architecture: How to sync data from a directory-tree with a database

I´m twisting my head now for a while and don´t get to a final solution. So I hope I might find some exchange or help on how to solve this issue here on an architectural level. I´m currently facing the following scenario: I want to write a…
9
votes
1 answer

Should I use elastic search for logging without logstash

I'm planning on using Elasticsearch to log all my application activities (like an audit log). Considering how I have direct control over the application, should I directly push the data into Elasticsearch using their REST APIs or should I somehow…
Thihara
  • 7,031
  • 2
  • 29
  • 56
9
votes
6 answers

UML replacement for context diagram

According to UML context diagram context diagram doesn't exists. So my question is which one of UML diagrams is good to show something like this and how to paint this?
user3565261
  • 344
  • 1
  • 6
  • 19
9
votes
9 answers

What is test-driven development (TDD)? Is an initial design required?

I am very new to test-driven development (TDD), not yet started using it. But I know that we have to write tests first and then the actual code to pass the test and refactor it till the design is good. My concern over TDD is where it fits in our…
Nirajan Singh
  • 2,865
  • 3
  • 25
  • 24
9
votes
9 answers

Minimal API v. Convenience

I am trying to design the interface that will be used internally for my application. Following Google's example, I strive to reduce public API clutter. However, there are some convenience methods that are defined in terms of the minimal methods.…
Nick Heiner
  • 119,074
  • 188
  • 476
  • 699
9
votes
15 answers

Predictive vs Reactive software design

I know that for me I first got started following the waterfall method of project management and along with that I went with the predictive approach to software design. In this I mean we had huge packets of documentation, UML, database schemas, data…
Andrew Siemer
  • 10,166
  • 3
  • 41
  • 61
8
votes
1 answer

Extract and Clean HTML Fragment using HTML Parser (org.htmlparser)

I'm looking for an efficient approach to extracting a fragment of HTML from a web page and performing some specific operations on that HTML fragment. The operations required are: Remove all tags that have a class of "hidden" Remove all script…
Kieran Hall
  • 2,637
  • 2
  • 24
  • 27
8
votes
4 answers

What does client-optimized mean?

Can someone explain what does this phrase mean in this sentence? Dart is a client-optimized programming language for apps on multiple platforms.
Navid Shad
  • 738
  • 7
  • 15