Skip to main content

All Questions

Tagged with
2 votes
1 answer
1k views

In Python when is absolutely preferable to use a class instead of a module?

Python is the language I use most in this period. My background in Java Before start learning Python I have programmed in Java language. In Java all code is written inside the methods of a class and ...
6 votes
2 answers
649 views

When the stack frames become computationally expensive

I've been experimenting with different data structures and algorithms in Python, Java and C to see in what circumstances function/method inlining could bring meaningful gains in terms of the execution ...
-3 votes
1 answer
147 views

Learn a framework on a project, or mix languages between backend services [closed]

I am designing my next project, which will do various domain-specific tasks, but all that will be controlled and used via a generic crud web app. I have been professionally using Java with Spring for ...
3 votes
2 answers
377 views

Best approach to microservice shared databse architecture

I have two microservices, one Flask (python) and one Spring (java), they currently share a database. The Flask microservice handles processing json files (~40mb) for each user (could be 100's or 1000'...
21 votes
4 answers
4k views

How do non-RAII languages free resources during stack unwinding?

C++ features deterministic order of calling destructors up the call stack until the exception is handled somewhere. To my knowledge, neither Java nor (object oriented) Python provide this. In those ...
27 votes
7 answers
15k views

Python productivity VS Java Productivity

Over on SO I came across a question regarding which platform, Java or Python is best for developing on Google AppEngine. Many people were boasting of the increased productivity gained from using ...
5 votes
2 answers
3k views

How to create contracts in python

I am currently learning Python (from Java) and have a question on contracts. Example: an application defines an interface that all plugins must implement and then the main application can call it. ...
0 votes
4 answers
5k views

Where to use C++ today? [duplicate]

Possible Duplicate: Is there any reason to use C++ instead of C, Perl, Python, etc.? When to use C over C++, and C++ over C? I am going to enter university next fall in computer sciences, but have ...
28 votes
9 answers
15k views

Why there is no power operator in Java / C++?

While there is such operator - ** in Python, I was wondering why Java and C++ don't have one too. It is easy to make one for classes you define in C++ with operator overloading (and I believe such ...
-2 votes
1 answer
124 views

What should I use to graphically represent an object's position on a fixed path using python(preferred)?

Consider 2 roads merging into one(This map is supposed to remain fixed). The program will not generate this map. The program will read this map and plot positions on it on its own. The python program ...
-2 votes
1 answer
104 views

How Uber processes orders?

Lets say you created an order. Since Uber is a very dynamic system, one should constantly check if there are available drivers for you. If orders are saved as a some collection (e.g. in MySQL table ...
27 votes
6 answers
27k views

How to solve the problem of nested comments

It appears in not just one language that comments can't be nested. Do you have a good solution for this problem? One workaround in C/C++ and Java is to only use the single-line comment but it becomes ...
-2 votes
1 answer
988 views

How to make code runnable on open source code editors like Ace Editor?

For my computer science uni project I'm required to build a web application with an integrated code editor. I believe I can just integrate open source editors like Ace Editor. However, I feel ...
3 votes
2 answers
769 views

What is the best way for transferring large datasets between an old java app and a python app on the network?

I am working on a machine learning project at the moment which requires me to transfer the data from an old Java app(which is also the custodian of the data in current paradigm) to a python service ...
17 votes
6 answers
9k views

How to implement float hashing with approximate equality

Let's say we have the following Python class (the problem exists in Java just the same with equals and hashCode) class Temperature: def __init__(self, degrees): self.degrees = degrees ...

15 30 50 per page
1
2 3 4 5 6