All Questions
76 questions
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 ...
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 ...
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 ...
-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'...
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
...
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 ...
37
votes
9
answers
9k
views
Is the algorithm more important than the programming language?
During the current (2013) Google Code Jam contest, there was a problem that took C++ and Java people 200+ lines of code as compared to Python people that solved the same problem only using 40 lines of ...
31
votes
6
answers
28k
views
Programming language usage at Google [closed]
I have heard Google uses Python, Java and C++. But what I don't know is how is each of those programming language is used. I mean what is Python, Java and C++ is used for at Google. Why would they ...
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 ...
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 ...
22
votes
6
answers
10k
views
Best practices in comment writing and documentation
Commenting nowadays is easier than ever. In Java, there are some nice techniques for linking comments to classes, and Java IDEs are good at making comment shells for you. Languages like Clojure even ...
19
votes
5
answers
37k
views
Why is Python slower than Java but faster than PHP [closed]
I have many times seen various benchmarks that show how a bunch of languages perform on a given task.
These benchmarks always reveal that Python is slower than Java, and faster than PHP, and I wonder ...
19
votes
10
answers
11k
views
Why are inheritance and polymorphism so widely used?
The more I learn about different programming paradigms, such as functional programming, the more I begin to question the wisdom of OOP concepts like inheritance and polymorphism. I first learned ...
38
votes
5
answers
5k
views
Java dev learning Python: what concepts do I need to wrap my head around?
Background: I've run through a few tutorials and written some small projects. All is going well enough using Google and StackOverflow.
Several times in the last few days I've found myself wondering "...