The tag has no usage guidance.

learn more… | top users | synonyms

-2
votes
1answer
56 views

Do .pyc files in Python contain mnemonics

I'm interested for some time in CPython implementation of Python. I understand that .pyc files contain serialized bytecode, including opcodes. However do these files contain mnemonics? I think that ...
0
votes
0answers
24 views

Using list of actions in language implementation

I'm implementing a small programming language as a hobbyist. My first idea was to compile the language to some kind of a intermediate language and then interpret it. However wouldn't it be a good ...
1
vote
1answer
105 views

Should I use this very short Python Quicksort implementation?

def quicksort(N): if len(N) < 2: return N else: less = quicksort([number for number in N[1:] if number < N[0]]) more = quicksort([number for number in N[1:] if ...
0
votes
3answers
97 views

Compiling methods in interpreted programming language as standalone c++ app

I'm writing an interpreted implementation of a new programming language (just for fun). In this implementation language is first being compiled to an intermediate language, which is then interpreted ...
88
votes
13answers
12k views

How to warn other programmers of class implementation

I'm writing classes that "must be used in a specific way" (I guess all classes must...). For example, I create the fooManager class, which requires a call to, say, Initialize(string,string). And, to ...
5
votes
3answers
165 views

Can I implement a payment feature in my own software?

Note: I spent some time thinking about this question before choosing which StackExchance site to post it on. I have decided on this domain because of the description: "For professional programmers ...
2
votes
1answer
125 views

Lower class count vs explicitness

To help with an application that manipulates and works from an XML structure to produce other information, I've created a class structure that closely follows the XML structure. So, the XML is: <...
21
votes
5answers
2k views

Implementing an interface when you don't need one of the properties

Pretty straight-forward. I'm implementing an interface, but there's one property that is unnecessary for this class and, in fact, shouldn't be used. My initial idea was to just do something like: int ...
61
votes
5answers
13k views

Why are there so few C compilers?

C is one of the most widely-used languages in the world. It accounts for a huge proportion of existing code and continues to be used for a vast amount of new code. It's beloved by its users, it's so ...
40
votes
2answers
12k views

Which Common Lisp implementation to use? [closed]

There seems to be an immediate problem with starting to develop in Common Lisp: choosing an implementation. What should one take into account, and how much weight should it bear when considering a CL ...
0
votes
1answer
289 views

What data structure can I use to implement a double ended priority queue with log(n) insertion and find?

How can I implement a double ended priority queue with O(log(n)) complexity of insertion, find min and find max operations? I was thinking of using a red black tree, but it is a little bit ...
2
votes
2answers
142 views

Implementing a pay-per-user business model

Introduction I'm working on an application where organisations pay for each user they add to their 'environment'. Organisations have a credit/balance, and as long as the user is not removed, the ...
2
votes
1answer
1k views

Does Java's Object.wait() really achieve nanosecond accuracy?

I was checking out the Java 8 standard library source code just out of curiosity, and found this in java/lang/Object.java. There are three methods named wait: public final native void wait(long ...
11
votes
1answer
3k views

In general how do Event Handlers work?

This is a general topic, How do Event Handlers work? This means behind the scenes - what happens when they are created. I have a rough idea - but would like to have it confirmed.
37
votes
2answers
4k views

What is the proper way to do REST?

Everybody nowadays does SOA, even if some don't actually understand what is all about. So they do it wrong. Using that as an analogy I know what REST is (or at least I think I do) and want to do some ...
2
votes
1answer
114 views

Should I consider uncertain future requirement while development? [duplicate]

I have one text box across multiple pages which is used to enter multiple customerids (as comma separated) . But in current page due to some subsequent implementation difficulties we make it as ...
-1
votes
1answer
91 views

Are there any problems with implementing deleted usernames this way? [closed]

I have a requirement to implement usernames for an application for login purposes. The requirement specifies that the registry associated with the user/username in the database must not be deleted. ...
0
votes
3answers
4k views

What do design and implementation mean?

The words "design" and "implementation" have been used widely. But I am not sure that I understand them. What do design and implementation of a computer-related system (e.g. a computer system, an OS,...
1
vote
1answer
46 views

Expectations on input / output of array dimensions and approaches to implement support for variable dimensions input arrays

Preamble As we are vectorising our colour API, we are changing the accepted input types for most of our functions. We would be keen on keeping backward compatibility with the existing code. Let's ...
13
votes
3answers
788 views

What is the difference between ref and out in runtime?

C# provides the ref and the out keyword to make arguments to be passed by reference. The semantic of the two is very similar. The only difference is in the initialization of the flaged variable: ref ...
8
votes
2answers
629 views

How much logic can be put into a command? Or differently: What kind of logic is command pattern for?

I have been using the command pattern for quite some time but I'm never really sure how much logic I can actually put in the Execute method. My current implementation of the command pattern looks ...
-1
votes
1answer
102 views

What differences are between “play-by-play”, design and implementation of an OS? [closed]

From two books' review Daniel Bovet and Marco Cesati. Understanding the Linux Kernel (2nd Edition or newer): Note: this book has some tendency to function as a play-by-play of what happens ...
1
vote
1answer
533 views

Handling Slow External API's in Web Application

So I have got an application that during various steps during a user's process will transmit and receive data from external API's. Currently the way this is handled is fairly rudimentary. There ...
1
vote
2answers
2k views

Application of Implementing 3 Stacks in single array

Well, there is lot of discussion about implementing 3 (or 2 stacks) in a single array. But whats the real need or application for implementing stacks like that? Can't we allot memory as 3 separate ...
1
vote
1answer
173 views

Is it OK for an interface to only communicate half of how something should work?

I have a service where certain other services can report their status to. By status I don't mean whether they are running or not, but whether they have received data. The point is that other services ...
45
votes
6answers
14k views

Why was C# made with “new” and “virtual+override” keywords unlike Java?

In Java there are no virtual, new, override keywords for method definition. So the working of a method is easy to understand. Cause if DerivedClass extends BaseClass and has a method with same name ...
13
votes
4answers
2k views

Is it permissible to use explicit interface implementation to hide members in C#?

I understand how to work with interfaces and explicit interface implementation in C#, but I was wondering if it's considered bad form to hide away certain members that would not be used frequently. ...
1
vote
0answers
216 views

Is one of these the more “Angular” way of communicating with a directive?

I am working on a project where I would like to encapsulate a directive library and distribute it to other developers to use. I would like to keep the changes to the model within this encapsulated ...
6
votes
4answers
3k views

Ways to organize interface and implementation in C++

I've seen that there are several different paradigms in C++ concerning what goes into the header file and what to the cpp file. AFAIK, most people, especially those from a C background, do: foo.h ...
3
votes
2answers
169 views

Design for an interface implementation that provides additional functionality

There is a design problem that I came upon while implementing an interface: Let's say there is a Device interface that promises to provide functionalities PerformA() and GetB(). This interface will ...
20
votes
3answers
7k views

What's is the point of PImpl pattern while we can use interface for the same purpose in C++?

I see a lot of source code which using PImpl idiom in C++. I assume Its purpose is to hide the private data/type/implementation, so it can remove dependence, and then reduce compile time and header ...
4
votes
2answers
1k views

How can “hash functions” be used to implement hash maps at all?

My understandment is that hash maps allow us to link, say, a string, to certain memory location. But if every string were to be linked to a unique place in memory it would need a huge block of empty ...
0
votes
1answer
71 views

Would it make sense to add parameters of an inferred type to inheritance?

I'll write this in PHP (where this thought originated), but this is generic to any object-orientated language. Basically, this is an addition to abstract classes that defines the implementation of its ...
2
votes
1answer
169 views

Using partially implemented interfaces

Consider the following hierarchy in C++ notation: class A { public: virtual void doStuff()=0; virtual void doOtherStuff()=0; }; class B:public A { public: ...
-1
votes
1answer
268 views

What is meant by a step-by-step refactoring plan describing implementation of design [closed]

What is meant by a step-by-step refactoring plan describing how to implement a certain design? As little as I know about refactoring it regards improving a (UML) design model and has nothing to do ...
4
votes
2answers
2k views

How to represent a geometric line programmatically?

I have been trying to design a library to do some simple geometric computations in an Euclidean space regardless of its dimension. While it is easy to represent points, vectors, hyperspheres and ...
3
votes
6answers
432 views

Which is the most practical way to add functionality to this piece of code?

I'm writing an open source library which handles hexagonal grids. It mainly revolves around the HexagonalGrid and the Hexagon class. There is a HexagonalGridBuilder class which builds the grid which ...
0
votes
2answers
846 views

Languages implemented in Python?

AFAIK, Scala and Clojure are implemented in Java and Java is implemented in C. I suppose that many or most languages are implemented in C, for instance Perl, Python and SQL. I don't know much about ...
44
votes
3answers
37k views

Why is Python written in C and not in C++? [closed]

In Python's tutorial one can read that Python's original implementation is in C; On the other hand, the Python implementation, written in C, (...) I'm very curious why was Python written in C ...
8
votes
10answers
2k views

A better way of doing Regex? [duplicate]

I really dislike regular expressions, each time I come back to it I seem to have to relearn it. It's also incredibly hard to maintain, modify and at a glance understand what it is doing. Has anyone ...
2
votes
1answer
394 views

Practical reference for learning about graph reduction

Are there any practical references (with actual examples) for getting started implementing a small, lazy functional programming language with graph reduction? A reference that included the lexing and ...
0
votes
1answer
519 views

Good practices when writing a parser for a standard file format (such as ePub)

I am considering writing an Android reader software that can read ePubs and display them. I checked the ePub standard documents. However, these contain a lot of information. So I am wondering what ...
4
votes
1answer
1k views

combining ruby and C++

I've been discussing a conceptual project with a friend of mine and the the most effective way we've seen of doing it is writing the engine in C++ while the logic would be done in Ruby. However, we ...
5
votes
1answer
522 views

wizard-like data collection implementation help (next, next, finish)

I'm beginning to build an interface for our field techs to close out work orders and we have many different required paper forms for different customers. I had hoped to build a system where i can set ...
4
votes
5answers
958 views

Thoughts on web development architecture through integrating C++ in the future to a web application

I'm looking to build a website (it's actually going to be a commercial startup) I saw this question and it really shed some light on a few things that I was hoping to understand (kudos to the op). ...
5
votes
2answers
524 views

how can you avoid version nightmare?

I am in charge of the deployment or implementation work.Due to my company's immaturity product,there is a version upgrade serveral days. Each time there is a upgrade version,I had to notify the ...
4
votes
3answers
7k views

Why does Java's String class not implement a more efficient indexOf()?

Following the below question on Stack Overflow http://stackoverflow.com/questions/5564610/fast-alernative-for-stringindexofstring-str I got to wondering why it is that java (6 at least) not use a ...
2
votes
5answers
4k views

Conways Game of Life C#

Not sure if this is the correct place for this question or SO - mods please move if necessary. I am going to have a go at creating GoL over the weekend as a little test project : http://en.wikipedia....
2
votes
2answers
203 views

Question about a voting system implementation

I am implementing a voting system and need some input from fellow programmers. Do you see anything that could go wrong by having users input a valid email and perhaps have a captcha to stop automated ...
3
votes
1answer
145 views

Legal aspects of Java specification implementations in other programming languages

I am planning to implement an official Java specification in a different programming language. Would this be a copyright violation? Hypothetical examples: a JMX "wrapper" library for C++ which can ...