Software design is a process of problem solving and planning for a software solution.

learn more… | top users | synonyms

1
vote
4answers
119 views

Feedback on logic implementation of PyQt4 based Image gallery using QTableView

I have made an application to display images in the form of gallery, from terminal if you are standing at the same location then it will open those images in the gallery if it does not have it will ...
1
vote
0answers
154 views

Modelview programming in PyQt4

In my first attempt, I have tried to load images from disk and load it to a QTableView using QAbstractTableModel. I'd like a general code review of this code. import sys import os from PyQt4 import ...
1
vote
1answer
62 views

Feedback on logic implementation and testing

This is my forked branch attempting to make the code better, This is an application for having a slide show of photographs in current directory or supplied as argument. Use keyboard controls[left to ...
1
vote
0answers
45 views

Sample design Oauth2.0 flow

I have the following code that I hope developers will use. [LKOauth showLogin: self data: data success: ^(NSString * code) { NSLog(@"%@", code); } ...
0
votes
1answer
43 views

Complex structure vs object

This is not, strictly speaking, code review, but I think my question can be asked here. This is a request to find out what seems to be the cleanest. This project is a blog engine that uses the file ...
0
votes
0answers
52 views

Design object Perl

It is a small backend blog engine that uses the file system as a storage. But I have some ideas to improve things a bit, I'll add support for git and another thing. But I'd like to have an opinion in ...
3
votes
2answers
241 views

Review of object-oriented skills with War game

Here are my code samples: https://github.com/arthaeus/war This particular sample is the card game 'War'. The interviewer off-handedly asked me: "what if I wanted to play War with an Uno deck of ...
0
votes
0answers
67 views

How to design a robust class for Packet Capturing tool

I need to design a class for packet capture tool. Class should provide service to start and stop a dumpcap packet capture. Class should be capable of accepting all sorts of inputs which includes ...
2
votes
2answers
81 views

Deep iterations with side effects

Suppose I need to process a list of list of list of many objects, where the data usually comes from third party APIs. For the sake of an example, lets assume we have many users, and for each user we ...
1
vote
2answers
64 views

Please tell me if it is a good controller or not. Would really appreciate

<?php session_start(); include_once("model/Model.php"); class Controller { public $model; public function __construct() { $this->model = new Model(); } public ...
2
votes
1answer
379 views

Setting variable if it doesn't exist in Dictionary

I was wondering if this was good design from client side calls. In the event that the key doesn't exist, go ahead and add it. public static void SetVariable(string name, object value) { if ...
3
votes
2answers
139 views

Design Pattern Question/Violating OCP

Is there a design pattern I can use for a situation like below. This is an example I made up to try and explain the situation I'm dealing with currently. I keep having to add new DeviceScript ...
1
vote
1answer
245 views

Python script to update a cPanel zone record with my public IP

This is my first attempt at using Python to send http requests. I want to keep a zone record on cPanel pointed at my home network's public IP. I'm just looking for some general feedback/suggestions. ...
6
votes
1answer
256 views

Doubts about the quality of an API designed for use with minimal effort

This is going to be long, and I do hope it is going to make some kind of sense; I apologize if it doesn't. I'll try to provide exactly the amount of context that is necessary to understand the ...
3
votes
1answer
71 views

Design review for single master-multiple slaves component

EDIT: I conclude I've failed to describe the problem. Intro: Master-Slave Architecture Master-Slave is a common hardware setting, in which multiple peripheral, passive components, are wired to a ...
2
votes
1answer
81 views

Content Management System Design Pattern Opinion

I am building game platform content management system where i have the following classes: Game, GameReview, Video and so on... Every Game object has list with GameReview objects and every GameReview ...
2
votes
1answer
184 views

Have I implemented the command pattern correctly?

This is my command interface public interface IConverter { void convert(); } This is my Receiver class public class Ogg extends Audio{ private File src; private File trgt; ...
1
vote
0answers
37 views

DOMDocument field class Python

What do you think of this class? Is this simple to understand how it works and what it does? Do you think it is good piece of code? class Field(object): """Class which contains logic of ...
2
votes
2answers
133 views

how to write generic extensions for standard collection types in java?

I am a Java beginner and I am looking for an idiomatic way of writing a function that involves generics. I wrote this helper class (below) that pushes items into a sorted generic collection and I ...
2
votes
2answers
159 views

Python class review - wiki api getter

First, I know there are other Python wiki API classes out there. I'm writing this one because I don't need all the bells and whistles, no edits, no talks, etc. I just need to be able to search for ...
7
votes
1answer
127 views

Returning a list of objects

Please review the following code. Methods getFirsts and getSeconds, both of which are private, return a list of objects which implement CommonInterface. Is this a good or bad design? @Override public ...
2
votes
1answer
315 views

Arduino based SNES controller wireless transmitter/reciever, code questions

I am building a transmitter and reciever pair for two SNES controllers, as I don't like using long extension cords to get the controllers to reach the couch. I'm using atmega328p's for the avr's, ...
2
votes
2answers
208 views

What are the bad habits etc. in this code?

I know this code is pretty awful, but, by any chance, could someone point out all the flaws you can find and tell me them? I think it will help me become a better coder. # Alien Assualt # A bullet ...
2
votes
1answer
85 views

Which is better for package design? Easy to navigate or module independence?

I have class object ServerUser. The ServerUser be considered as shared part and it has two sub-class SshUser and FtpUser. The SshUser only provide support for SSH package and FtpUser for FTP package ...
3
votes
0answers
1k views

Review of Fluent LinkedIn REST API client interface design

There is a handful of LinkedIn clients written in C# on the NuGet package library, but afaict most only do authentication via LinkedIn. I found a couple which offer a linkedin rest api interface. Of ...
2
votes
2answers
160 views

best way to use singleton [closed]

I know 3 ways for using singleton in our code and I want to know which one is the best way and you prefer more. The first is to have a Singleton class and every classes that want to be singleton ...
1
vote
1answer
187 views

Could this php error/exception handling be better?

I'm VERY new to error/exception handling, previously just echoing everything to screen, and am trying to really clean up my code. My goal was to log everything but only show the user a friendly ...
0
votes
1answer
114 views

Package Manager in Python

I've written a package manager for OS X in order to improve my Python skills. This is the second programming project I've ever worked on, so I do not expect it to be great, or anything, but I would ...
3
votes
2answers
682 views

Business Layer - UI communication

Taking the following cases in consideration. Witch one would you prefer and why? Suggestions appreciated. Using Delegates private void cmdDelete_enterClick(object sender, EventArgs e) { ...
4
votes
1answer
396 views

Is this a good design for a Factory Pattern?

I'm creating a system to generate math problems. As you know in mathematics, there are milles of kinds of problems: Binary problems, fractions, decimals, comparating two numbers, etc. I'm creating an ...
1
vote
2answers
209 views

Ruby - class definition for connecting to external API

I've defined a Client class to connect to an external API. The Client class will return XML responses for various resources. Here's what it looks like now: require 'nokogiri' class Client ...
1
vote
1answer
392 views

How to Organize my Solution in Visual Studio 2010, for a Asp.NET project using Ado.Net Entity Data Model [closed]

For ASP.NET projects. I am starting developing with Visual Studio 2010, and will work with Ado.Net Entity Data Model and Linq. I'm used to develop using Visual Studio 2005, and SubSonic as my ORM. ...
1
vote
0answers
1k views

PHP Aspect Oriented Design: Part 2

This is a continuation of this post: Review on design pattern What was taken away from that post, and other aspect oriented design is it is hard to debug. To counter that, I implemented the ability ...
3
votes
2answers
332 views

How to add a new feature to this factory model? [closed]

The factory should only have the responsibility of creating instances and knowing what types of instances to create, without having the added overhead of knowing about configurations. With that in ...
5
votes
3answers
1k views

Review on design pattern

I wrote a framework and I want to hear the thoughts of other on the design patterns it uses. Every method contains three design patterns - adapters(strategy), intercepting filters, and observers. A ...
1
vote
1answer
174 views

Designing a Service/Business Logic Layer that returns useful/ consistent messages

This is a question regarding design of a service or business logic layer that returns or exposes messages meaningful to the user. i.e. RegisterUser method that takes a user, what should it return? ...
1
vote
1answer
165 views

How to add a random feature for a factory design

I'm creating a factory design for math problems. The purpose of the factory is: The problems must be generated with a certain difficulty (or level). To do this, I've got an abstract method called ...
3
votes
1answer
120 views

How to model this design: BinaryProblem

I'm creating a model for Math Problems. This contains always two properties, and has a CorrectResult method which returns the addition of the two numbers. The propeties data types can be decimal, int, ...
5
votes
1answer
850 views

How to improve my factory design?

I'm creating a factory design for math problems. The purpose of the factory is: When the factory initializes, creates in a list some problems (20 initially) If the program wants more than 20, the ...
1
vote
0answers
206 views

Looking for design and best practices tips in the area of Python and Web Applications

This is a small web application that I have created using the Flask framework. I am looking for best practices feedback, as well as design pointers. I am not confident that my design choices have ...
3
votes
2answers
5k views

Is this implementation of an Asynchronous TCP/UDP Server correct

I am trying to implement a TCP/UDP server so all I have to do is something like this: var server = new Server(Type.UDP, "127.0.0.1", 8888); server.OnDataRecieved += Datahandler; server.Start(); I ...
7
votes
2answers
325 views

Creating simpler fluent interface

I have the following: public interface IBehaviour { event EventHandler Completed; void Execute(); } public interface IBehaviourA : IBehaviour { // Some specific stuff here object A { ...
1
vote
2answers
138 views

I'm after a collection of opinions regarding cohesion and coupling with my application to improve OO programming

Control Class - Populates test data and calls main menu import java.util.HashSet; import java.util.Set; public class Control { public void run() { // Populate Test Data Student jane = new ...
2
votes
0answers
55 views

Word problem solver in applescript — a mess

I'm having a difficult time creating functions. I can't really encapsulate code because it's used all over the place, and needs to be refactored. However, this is a complete rewrite from my old ...
4
votes
1answer
106 views

How can I Improve this module?

This module makes a double linked list and initialize each member, I couldn't do it with a loop so I gave up and made each node individually, here is the long output, how can I improve it, or can ...
0
votes
1answer
114 views

What if any design issues are there in this method of loading configuration data from YAML in Ruby?

I am actually pretty excited about this approach, but for sanity's sake I wanted to hear some thoughts on others on my strategy here. My basic goal is to parse a YAML file and recursively create ...
2
votes
2answers
131 views

How can I improve this code to display contact numbers?

I am making an Address Book like application . I have a contactType enum. public enum ContactType { //just a cut down version MOBILE,PHONE,FAX,EMAIL; } Then I have a Contact class public ...
2
votes
0answers
546 views

MVC folder structure

I currently have a folder structure on my MVC .NET website that I am completely at a loss as to whether it is acceptable or not. Here is an outline of the structure [Areas] [Area1] ...
1
vote
1answer
913 views

Advice on approach to organizing my business logic & data access?

I've been researching various patterns for structuring my business logic & data access, particular in the context of C# and the Entity Framework. I've come up with a basic idea of how I think I'd ...
5
votes
3answers
376 views

What do you think about this smelly test?

I caught a whiff of a smell emanating from one of my tests, in a scenario akin to the following: [TestFixture] public void CarPresenterTests{ [Test] public void ...