New answers tagged

0

I think that the pure-documentation strategy that you have outlined here is solid. (Presumably, other people will [also ...] be responsible for "taking a legacy application beyond what it was designed for.") I think that your plan reasonably "covers all of the bases." Now, as you proceed with your work, first present your plan to the ...


1

First you don't need to write such library because most probably it already exists. What you need is some embeded RabitMQ implementation so that you can potentialy perform a more (integrated) end to end type of test. Just googling I found one such https://github.com/AlejandroRivera/embedded-rabbitmq With regards of point number 2 this is entirly separate ...


1

Prefer Both. Why? Because neither is guaranteed to work. You want to have a webhook setup because it minimises the time to notification, and reduces network load. Don't pester someone, let them tell you when its ready. Except sometimes the someone forgets to get back to you. So you do want to pester them periodically. Which is why you also want polling. ...


0

The chain of responsibility when executed does not know which element in the chain will do the processing. It is aways executed from the start. In your particular case you know where in the chain you stand when previous element , or next element is selected. In my opinion what you need is structure that has qualities of: Double link list - in Java that will ...


0

Consider Simon Brown's C4 model. In summary (from Wikipedia), Context diagrams (level 1): they show the system in scope and its relationship with users and other systems; Container diagrams (level 2): they decompose a system into interrelated containers. A container represents an application or a data store; Component diagrams (level 3): they ...


10

I saw the same problems when trying to do TDD. I think the solution is as simple as doing TDD when it makes sense and not dogmatically all the time. When the requirements are clear, or when fixing a bug, it makes sense to write a test first. You will know when you're done, you can reproduce the problem, etc. But when you design something that you'll likely ...


22

How do you do design change in TDD when you have such huge amounts of test that may be dependent on the existing implementation? First, the best approach may be to avoid running into this situation at first hand, and refactor earlier. Often people forget that refactoring should be done rigorously in each TDD cycle, and design flaws should be removed as soon ...


7

Fix the tests so they only test whether the requirements are fulfilled, not implementation details. If the status values are part of the specification (as is often the case with network protocols) then perhaps using them in the implementation is a good idea, but if not, it looks like you don't have TDD but DDT, design driven tests, which puts the cart in ...


1

why not directly interact with the database table and directly read, write, update values directly on the table rather than the object? Because in any real-world scenario (or even a moderately sized browser game), you're going to be dealing with many data operations, and you're going to be dealing with a database that's only available over the network. Note:...


0

After better introspection this was easily solved with Strategy pattern. IFilterGui { makeFilter(someParams) : IFilteringStrategy Filter { constructor(filterStrategy : IFilteringStrategy) filter(node) { this.filterStrategy.filter(node) } } Concrete example: TimeFilterGUI implements IFilterGUI { setStartTime() setEndTime() ...


1

Once upon a time, I was troubleshooting production outages caused by our application server running out of memory. It was occasional, then daily, then a few times a day. Eventually, we were bailing buckets of water to keep the proverbial bathtub from overflowing. Heap dumps and thread dumps showed the problem clearly as a particular list occupying several ...


0

If you want to address bigger-picture concerns, like: No one is just reasoning that if we, in the first place, did not have 50 methods in the same class, the positioning of the methods would possibly not matter that much. Then why not add a comment in the peer review along the lines of: It seems we're trying to do a lot of different things in this class. ...


0

It sounds more to me that you want to do things your way, rather than try to strike a balance between what the team is currently doing (which apparently works for them, or they wouldn't be doing it) and what you believe is the ideal. That's a dangerous approach to take if you're new to an organization - you might be right, but trying to impose your will as a ...


1

You wrote Like rather than updating the object, why not directly interact with the database table and directly read, write, update values directly on the table which gives me the impression what is missing here is "the bigger picture". Indeed, for very small programs, just using bare SQL operations on database tables can be perfectly sufficient ...


0

First of all, IMHO, anaemic domain model and layered app structure, where you have db layer, then service layer and presenter is not really OOP-design, even though many call it OOP. Such kind of structure forces us to use more procedural style rather than OOP. It works fine if it's a small project, but becomes a mess the more we grow our code base. But that'...


0

The reason for having different DTOs in layers, such as persistence entities, domain models, view models, ... is the decouple the code by making sure each layer works with its own data structure that's built to the purpose that it (internally) needs it to be. By having these inherit from one another, you are inherently defeating that purpose. Don't do it. ...


2

Sorry if this is a bit blunt but I think you are looking in the wrong direction. With this list of expensive features, if you want to develop them from scratch, and for a single college, you're probably either out of deadline or budget or both, no matter technology choice. If you imagine every single college repeating the development, do you imagine at the ...


1

Build multiple websites instead of one monolith which do the unrelated things you mentioned, which all authenticate users using "single sign on". You'll have to decide the responsibility for each website. You can even plug in 3rd party services instead of building these websites yourself in certain cases. You'll get improved feedback loop and ...


2

Event-driven architecture (EDA) is an architectural pattern that promotes the production, detection, consumption of, and reaction to events. They are usually broadcasted through notification messages. This explains why EDAs often leverage the messaging integration style which relies on some sort of Message Broker to implement a topology known as Hub-and-...


2

To add another reason, many application servers are not as good as web servers at serving static files (frontend JS, CSS). At least some of them (I know of Flask and node) explicitly stated in their deployment documentation that you should use a separate dedicated web server software (commonly nginx, or Apache) to serve those in a production environment.


2

The main benefit is that your application servers don't have to think about stuff like: Load balancing. Request / Traffic Routing. Hacking - understand things like Denial of Service attack Upgrades - lets say you want to incrementaly upgrade your application. Logging and filtering of traffic. Specialized HTTP servers for Ajax, Websocket(Async Http server) ...


2

Many answers here already, and many good points about how reviews are conducted. One thing that's missed by them all (correct me if I'm wrong) is the ownership of the coding standards being applied. It seems you're new to a team with an existing culture that has an established coding standard. However, you joining makes it a new team. That ought to trigger ...


2

These are two different things: DB data is passive: it just stays there available for any processing that could use or misuse it. Objects are active: it’s not data but behaviours, consistency and privacy. Data as well, but it should in principle be encapsulated. Both can be related. Like food that is dehydrated for longer preservation, you can store the ...


2

I would suggest that database tables are optimized for persistence and retrieval; your data exists entirely in the form of tables of fields and rows. Modeling your data using classes allows your program to be more expressive. For example, part of your village class could be a reference to a live user object, with it's own properties. Admittedly, this ...


10

Making code reviews optional cannot be justified. The desire to make reviews optional stems from your frustration with the current code review process. And I cannot blame you. When doing a code review I look for 3 things (in this order): Obvious bugs — if I can't find a defect at first glance, I move on. Proper architecture and design — I probably spend ...


10

First of all, I agree with Philip Kendall that none of the changes that you say you want to make are actually desirable. While bypassing the review process by making it optional might increase productivity in the short term, in the long run it's going to result in more bugs, messy and inconsistent code and other kinds of technical debt — precisely what code ...


10

It's worth reminding code reviews have fantastic outcomes when they are done correctly. I remind myself being mostly rubber-stamping reviews until I found code that could make our production crash, or was simply not conform to expected result. Catching it in the review saved us precious time. I understand that the way you implemented them raises several ...


4

the team does not focus on what is important(patterns, interfaces, encapsulation, layering, method signature) but on small details. Actually, the small things are important, too. A small styling or coding issue can turn into a big issue when it's repeated 100's of times by the same person in the same codebase. The point of pointing those out in code ...


0

I don’t know how to argue for weaker code reviews, but I know to argue that code reviews aren’t being done properly. Code reviews serve multiple purposes, skipping them simply because of time is silly. Don’t argue for that. Code reviews are conversations, every comment should be responded to, otherwise you aren’t really having a conversation. There can be ...


6

One principle should be: The reviewer doesn't have stronger rights than the author. If you and I wrote code for the same problem, it would be different. Some differences due to coincidence, some due to the way I do things which is different to the way you do things. If I wrote the code and you reviewed it and everything had to be done the way the reviewer ...


1

What has worked for me in the past has been to argue about relative merits. This article for example spells out many of the arguments of why code reviews are less useful than other mechanisms to improve product quality, improve code quality, transfer information, or improve the coding ability of engineers (mostly that code reviews are manual processes, done ...


175

How can I justify and defend the thesis that: The merge button should be enabled by default The code review should be a recommendation , but not mandatory The code author should have the right to merge the code within 6 hours lets say of the pull request creation no matter if there is aproval or not. I don't think you should try and justify any of those, ...


2

I always find that setting the tone has an important place. Put the software product above all things else and think about the end-user. I'm not agreeing with the things you said as I don't believe everything you said gives you the right to merge without getting proper buy-in from the team but the question should be put on who is the stake holder and are ...


1

I'm less concerned about the review & checkin/merge process and more about the amount of nit-picky issues. Ideally, we write capabilities that when used are dead simple — that there's as little room for error as possible in consumption of our abstractions.  We would like to design our abstractions so that the consuming clients (often ourselves) fall into ...


15

You bring up some real problems that need fixing. But your proposed solutions are unlikely to make things better. No-one is just reasoning that if we in first place did not had 50 methods in same class possibly it would not have mattered that much the positioning of the methods. In my experience the best way to get people to see "the better way" ...


8

You might have better luck arguing that developers should have the right to simply ignore certain comments, such as methods are not in the preferred order, you spelled 'Exception' wrong in a comment, etc... It's important that everyone involved knows & understands what types of comments are ignorable. The other developers might stop nit-picking so much ...


35

How do the company's stakeholders feel about the productivity of their developers? My previous boss told me a story once about this kind of zealotry. The developer team was using that zealotry as an excuse to drag their feet. As a result, it took months to implement the simplest of changes. He said that fixing the problem would have required firing half ...


2

No. Here's a simple example: consider a Turing machine which computes the series of prime numbers. For any arbitrarily large limit you choose for your Tuskiomi Machine, there is a finite series of prime numbers one larger that it cannot compute but a Turing Machine can. So, you say "Then I just add more resources to my Tuskiomi Machine so that it can ...


1

You can use Docker EE for Windows Server, you can even use both Windows and Linux images on Windows Server 2019 by enabling some features. However there are some issues regarding networking as Windows has its own way to handle network. You won't be able to create bridges easily to connect 2 containers between them. And you'll have some issues when restarting ...


2

Microsoft seems to be committed to container support but you would be a little bit on the fringe. Here's their official documentation for Docker support. One thing that might help you as well is to understand that the term 'Docker' has come to be used with respect to a whole ecosystem and not everyone really means 'Docker' (the build tool, the runtimes, the ...


5

The main point of a micro service is that it is independently deployable and scalable. If more than one micro service uses the same database then they are no longer independently deployable and scalable. Furthermore, if one database goes down, multiple services become unavailable, breaking yet another advantage of micro service architecture: resilience. In ...


2

The root of your problems seems to lie in the authentication part, where you don't distinguish between different guests in the same room. The hotel mush have a record how many guests are staying in each room, even if they don't have all their names. This means the staff can actually register each guest with your system, using the room number, the name the ...


0

I mix programming languages, using the ideal one on each part of the infrastructure. For anything that requires scale, performance and concurrency I use go. Only in that particular part. I glue the rest with the simplest programming language that will work in that context. It usually is Bash for back-end, javascript for front-end, and Kotlin or Java for apps....


-1

My golden rule of programming has always been to segregate and split as much as possible, so components are as decoupled as possible and easy to change.


0

Think of any part as an independent software that could connect to any other. The point is the API to be as generic and decoupled from a particular implementation as possible, so making changes in any part is made easier. For that you will want the API not to define policy, just mechanisms. And let the policy be defined by the component closest to what the ...


2

Define-by-run is just a neat application of symbolic programming. Python does not support symbolic programming the way that Lisp, Mathematica, or R do. But Python can emulate it with operator overloading. The idea is that an expression x + y will not compute the addition of two variables, but produce an object that represents the addition of two variables. ...


3

There are four obvious grounds for assessing a language feature: aesthetics, implementation cost, benefit, and interaction with other language features. I'll skip aesthetics because it's subjective, and implementation cost because I'm not really qualified. Maybe someone can find a link to the Eric Lippert blog that was mentioned in comments. Interaction with ...


3

A do...while is only different from a while... in one respect - in a do...while the body is executed at least once, whereas in a while...do it may not be executed at all. Your do + while statement can easily be achieved within the existing C syntax as follows: do { body1; if ( !conditions ) break; body2; } while true; The C language is already ...


1

This is a reasonable construct. My preference with looping is either: when we know the count, counted loop, e.g. on count of N: for (int i = 0; i < N; i++ ) ... -or- when we don't know the count, then "infinite loop": for (;;) { // or while (1) { // unconditional stuff that occurs (before) each iteration if ( ...


Top 50 recent answers are included