Quantcast
Channel: User Filip Milovanović - Software Engineering Stack Exchange
Browsing all 163 articles
Browse latest View live

Comment by Filip Milovanović on By creating an architecture, it is better to...

I'd lean on the side of many classes with narrow, well defined responsibilities, with equally narrow interfaces (by which I just mean the set of public members). This doesn't mean that a class cannot...

View Article


Comment by Filip Milovanović on Push and Pull Communication in object...

'what does it mean when he says "we may have to change the object that is passed over here"' - you often wouldn't pass a bunch of parameters, but a single object with all required data, and if a new...

View Article


Comment by Filip Milovanović on What to do when test data takes up most of...

Wait, wait, wait. Let's back up. What was the goal when you introduced the golden tests (characterization tests) in the first place? What were you trying to do? The idea with these was to use them when...

View Article

Comment by Filip Milovanović on When and how endianness naming was defined?

Look at an ordinary decimal number, like 1234. There, in terms of what contributes to the value, '1' is the most significant digit (because it represents thousands, and if you changed it, it would...

View Article

Comment by Filip Milovanović on Is there a standardized way to distinguish...

You could alternatively indicate the kind of currency with a small inline icon in the interface

View Article


Comment by Filip Milovanović on Clean Arch: Where to put HTTP request inputs...

"Any indirection will only make reading the code harder" - I disagree :) Why not write the entire program in main then? A huge amount of developer time is wasted in the name of such "readability". Once...

View Article

Comment by Filip Milovanović on Methods to increase the amount of data sent...

"The problem is I have to convert the string into binary which is about 7600 bits raw" - sorry, I'm a bit tired so I may be missing something, but what do you mean by this? How did you go from 850 bits...

View Article

Comment by Filip Milovanović on How do I use camelCase correctly for three or...

It's "amountOfColors". startWithALowercaseLetterAndThenCapitalizeEachWord. PascalCaseIsTheSameExceptYouAlsoCapitalizeTheFirstLetter. some_people_use_snake_case. css-guys-love-kebab-case.

View Article


Comment by Filip Milovanović on Representing vectors as arrays of points vs....

If you are going to use a preexisting linear algebra library (for matrix multiplication) so that you can transform your vectors, and if you are going to do this a lot in a tight loop (e.g., if you're...

View Article


Comment by Filip Milovanović on Enumeration in every entity?

Eric Evans' definition only focuses on the difference between entities and value objects. It doesn't imply anything else. Entities are something that conceptually has some sort of a persistent ID (that...

View Article

Comment by Filip Milovanović on What exactly is the single responsibility...

I think that your choice of wording ("team/person") is causing some confusion for the readers/answerers, as they seem to be interpreting "team" as "developer team" - but the blog doesn't actually...

View Article

Answer by Filip Milovanović for What's a good workflow for including...

My team writes a lot of Python code in PyCharm to do quick simulations and calculations for our mechanical engineering work.Since it looks like the kind of code that you write (quick simulations and...

View Article

Answer by Filip Milovanović for If I have a ThingFactory which creates...

The term "Factory" encompasses a number of roughly related but different creational patterns (both formally described and informal), so it's important to clarify what you mean when you say you have "a...

View Article


Answer by Filip Milovanović for Decoupling command and receiver in command...

I presume from your description that all of the commands in the list refer to the same object (car). E.g., it's a small script for a car.You don't actually need to create the commands right then when...

View Article

Answer by Filip Milovanović for What should I write before the tests in Clean...

You can have your presenter built bit-by-bit as you're adding tests.But more importantly, in principle, you don't need to write any of these extraneous implementations beforehand, and you don't need to...

View Article


Answer by Filip Milovanović for Calling helper functions in a Python...

You didn't provide a lot of detail, but this usually happens because you're trying to do too much in one class.Now, if you don't want to clutter your class with helper functions, you could, as others...

View Article

Answer by Filip Milovanović for Where should interfaces be used?

I don't think there's really a simple answer that can do a substantially better job than the statements of the principles and practices that you've already encountered.I know you're aware of this on...

View Article


Image may be NSFW.
Clik here to view.

Answer by Filip Milovanović for Can the presenter talk to to the controller?

So, there are a couple of things to understand about this image - the primary purpose of this diagram is to depict how to organize dependencies between components that are in different layers. So, the...

View Article

Answer by Filip Milovanović for UnsupportedOperationException vs Interface...

"However, since not every card is going to have the correspondingabilities, I realised I would have to throw something along the linesof UnsupportedOperationException"You're thinking about it in the...

View Article

Answer by Filip Milovanović for Are repositories async?

Today, you'd typically make it async. There was a time when mainstream languages and their standard libraries didn't have async/await or things like promises and futures, so you had to do things with...

View Article
Browsing all 163 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>