Design in programming is the act of making particular choices about how best to structure a program, to achieve goals of reliability, maintainability, correctness or ease of use.

learn more… | top users | synonyms

1
vote
0answers
17 views

Skeleton SASS Feedback and Review

recently I have been developing a SASSified version of Dave Gamache's Skeleton CSS front-end framework. I have publicly posted the code on github which can be found here as well as a live demo. What ...
5
votes
3answers
137 views

Which of these two java class designs is better and why?

Example 1: public interface Adder { public int getSum(); } public class AdderImpl implements Adder { private int v1; private int v2; public AdderImpl(final int v1, final int v2) { ...
1
vote
0answers
23 views

Design issue with decoder class

I'm designing a C++ Decoder class for decoding a format, and would like some feedback on my design choice: I want the user to be able to provide input to the decoder by either supplying an array, a ...
1
vote
0answers
39 views

How to create a simple stateless cache class in PHP

i need to create a cache class to avoid making the same calculations more than needed. My idea was something really basic like class transient_cache { static private $cache = array(); static ...
6
votes
2answers
93 views

python: design of a simple game

I am trying to code Battleship. It should be a text one-player game against computer where computer and human player take turns in shooting at opponent's ships. I decided to start implementation with ...
1
vote
1answer
22 views

Designing a RESTful API for a 3D Printer

I'm implementing a REST API to manage a 3D printer, it will add a layer to the system so instead of sending GCode commands (the language the controller understands) directly to the controller (an ...
1
vote
2answers
33 views

A Generic NHibernate wrapper with transactionality

My team and I wrote the following Nhibernate wrapper which gives generic retrieval and save/update functions and a possibility to send a function as a paramater which may contain several save/update ...
6
votes
2answers
112 views

Generic wrapper for equality and hash implementation: Is there a way I can make it more efficient?

I was writing an answer in another thread and came across this challenge. I'm trying to have a generic class so that I can delegate the routine (and tiring) Equals and GetHashCode implementation to it ...
-1
votes
0answers
51 views

Handling external services [closed]

Our application relies on third party services. I can search for photos from Google. I can search for Videos from Youtube. I can search for Users from Facebook / Youtube etc. Our current solution is ...
1
vote
1answer
62 views

How to simplify code for display member functions?

For my display functions in my Blackjack game, I want to control each player's stats output based on whether a turn is in progress or has ended. Normally, you could only see one card that your ...
2
votes
1answer
126 views

Is this implementation of Kruskal's algorithm maintainable and efficient?

Update I've posted some updated code and included the definition of Vertex and Edge to try to answer as many questions as I could. To summarize what's changed: I've followed the advice here to ...
0
votes
3answers
81 views

I need help improving this design for easy unit testing - C#

I am very new to unit testing, I only read a few chapters from 'Art of Unit Testing' and know how to write basic unit tests. I have a deadline for a project so I plan to read 'Professional Test Driven ...
2
votes
1answer
83 views

Improve Program Design

I am new to C++ and looking to expand my knowledge. Below is a simple program that I made. I would like to know how it could be improved, in any way. The introduction of new ways to do things is what ...
1
vote
0answers
34 views

How do I structure my entities for easier persistence?

I am learning ORM using Hibernate by creating a movie rental application. Currently, I have the following three entities for persistence: User Movie Rental (composite element for many-to-many ...
3
votes
1answer
82 views

asp.net (vb.net): handling of open database connection and calling shared function from web api

I'm working on an ASP.NET project using VB.NET that uses Dapper and the code as implemented so far runs fine with just me testing. In the example below, Dapper calls a stored proc. But my I am ...

1 2 3 4 5 9
15 30 50 per page