Tagged Questions
-1
votes
0answers
91 views
Developing an online IDE [closed]
Firstly, I am doing this for a large project, and it is 100% necessary for it. I am an experienced programmer with strong knowledge of Python, C, Ruby, Javascript, JQuery, HTML/CSS (but I have no ...
4
votes
2answers
160 views
Designing a function with many optional components
I'm trying to figure out a good practice for designing a function with (many) optional components.
For a specific example, say I am interested in designing a feature extractor function that takes as ...
4
votes
2answers
245 views
What is the preferred way of communicating between applications on the same system?
I'm designing a system that is built on several small applications written in python, some of these will be services and others will be programs that only run during special situations. What I need to ...
4
votes
2answers
170 views
Ensuring conceptual integrity in Python project with multiple programmers
One objection that I have often heard raised against Python that it is difficult to synchronize a team of many programmers on large Python project. Note: that synchronization is possible in such a ...
0
votes
1answer
152 views
Scientific software design [closed]
I asked this question over at stackoverflow and it was suggested a tighter form be posted here.
Many early career numerical researchers face the prospect of having to create performance critical ...
3
votes
4answers
229 views
Representing complex object dependencies
I have several classes with a reasonably complex (but acyclic) dependency graph. All the dependencies are of the form: class X instance contains an attribute of class Y. All such attributes are set ...
3
votes
1answer
187 views
Is this an acceptable approach to undo/redo in Python?
I'm making an application (wxPython) to process some data from Excel documents. I want the user to be able to undo and redo actions, even gigantic actions like processing the contents of 10 000 cells ...
5
votes
1answer
529 views
python factory function best practices
Suppose I have a file foo.py containing a class Foo:
class Foo(object):
def __init__(self, data):
...
Now I want to add a function that creates a Foo object in a certain way from raw ...
2
votes
2answers
101 views
Removing an element not currently in a list: ValueError?
This is something that's bothered me for a while, and I can't figure out why anyone would ever want the language to act like this:
In [1]: foo = [1, 2, 3]
In [2]: foo.remove(2) ; foo # okay
Out[2]: ...
2
votes
2answers
297 views
Caching factory design
I have a factory class XFactory that creates objects of class X. Instances of X are very large, so the main purpose of the factory is to cache them, as transparently to the client code as possible. ...
1
vote
1answer
291 views
Python simulation-scripts architecture
Situation:
I've some scripts that simulate user-activity on desktop. Therefore I've defined a few cases (workflows) and implemented them in Python. I've also written some classes for interacting with ...
8
votes
1answer
638 views
How to refactor a Python “god class”?
Problem
I’m working on a Python project whose main class is a bit “God Object”. There are so friggin’ many attributes and methods!
I want to refactor the class.
So Far…
For the first step, I ...
3
votes
4answers
945 views
What is the simplest human readable configuration file format?
Current configuration file is as follows:
mainwindow.title = 'test'
mainwindow.position.x = 100
mainwindow.position.y = 200
mainwindow.button.label = 'apply'
mainwindow.button.size.x = 100
...
3
votes
5answers
372 views
Designing for an algorithm that reports progress
I have an iterative algorithm and I want to print the progress. However, I may also want it not to print any information, or to print it in a different way, or do other logic. In an object oriented ...