General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Ton Bong
Modern Software Engineering
comments
Comments by "Ton Bong" (@tongobong1) on "Modern Software Engineering" channel.
Previous
1
Next
...
All
Today IT labour shortage is just a myth. In reality there is a large surplus and this is why there is a long hiring process. There was a shortage more than a year ago.
160
@luke5100 developer shortage is just a myth from the past.
17
Exactly. Currently there is a huge surplus of developers looking for a job. In good times there usually is a shortage. Good times ended a year ago.
15
The demand is way down and the supply of developers looking for a job is way up.
9
Martin Fowler if you are reading this please STOP THE LONDON STYLE UNIT TEST MADNESS. These tests are terrible for projects and they are costing Europe billions! Save the Europe from London style unit tests by promoting classical unit tests!
6
@ContinuousDelivery I am a senior developer and after applying for more than 100 contracting jobs in Germany and Austria I got ZERO interviews mostly because my German is basic. I usually work as a contractor in those countries and language wasn't an issue until the bad times came for IT industry. Today it is very hard to get a job even for experienced developers.
6
I would love to see a video about when to delete unit tests that are no longer needed because we have more useful unit tests that test more code.
5
Just stay away from mocking as much as possible!
5
@GdeVseSvobodnyeNiki same with me 15 years ago in Slovenia. Austrian client was paying my company 9k per moth for me and I got just 1.6k gross salary per month. I wanted just 50 € more to stay and my boss refused so I gladly left the company hearing how angry was the customer on my boss for letting me go off the project. Many eastern European companies are extremely greedy. This is why I prefer to work as contractor in Germany and Austria.
5
The problem with TDD is this: 'To a man with a hammer, everything looks like a nail'. TDD is a great tool if you know when to use it and also when you should NOT use it.
4
Gregor said: "Any line of code that is not deployed is cost" so what about the code of unit tests then? I think many unit tests are useful but there are also unit tests that are not worth the cost of having them and we should delete them right? Especially we should delete many London style unit tests because those hard to understand unit tests are terrible for projects right?
4
I see you are on the right path to understand unit tests. One of two main goals of unit tests is to create documentation in code. Good documentation is easy to understand. Mocks are making unit tests hard to understand on top of coupling with implementation code and giving us false negatives when we keep the functionality and change the internal implementation. Usually mocking makes sense only when calling outside the process like calls to database, filesystem or remote resources but never use mocking libraries to write those mocks. The other way to test those calls is by using integration tests. Unit in "classical" style is unit of functionality. Unit can be small (single method call) or large (many objects collaborating to provide functionality) but it is always ONE functionality. If you want to test more than one functionality in one test then create an integration test.
4
@Tony-dp1rl Great question. It is interesting that even Martin Fowler admitted in this video that he is not doing TDD as much as he "should". I wish David would ask him why not. There are many good reasons why we don't use TDD and I wish we would discus them more.
4
Writing tests is EASY once you STOP COMPLICATING about writing tests. Just write some simple straightforward tests and you are good to go and forget about writing tests for every edge condition that can occur.
4
Yes but it is very common in iterative development that we don't understand the feature at first. This is why we implement something we think customer wants and get the feedback from him ASAP so we can improve and show him again and again.... until he is satisfied with the result.
4
@brookestephen Today it is hard to get an IT job there even if your German is great. In good times it was easy even if you didn't know a single word in German. Wait for good times and go there. I propose Vienna because it is such an interesting city. I stayed for more than a year there and I would love to get another job there.
4
@beowulf_of_wall_st yes it is common for a company to lose competent people because it is not firing the incompetent.
3
I wouldn't underestimate Elon Musk after we can see his work at Tesla and SpaceX. I believe Elon saw that the whole working culture at Twitter is bad - lazy and the best way to change it is to fire most of them and then hire new engineers that will improve the working culture.
3
I totally agree with Dave Farley that "quality in modern systems is our ability to change them". On the other hand London style unit tests use many mocks implemented by hacky mock libraries that are hard to understand and they easily break when changing the internal implementation despite the functionality remains the same. London style unit tests make the system much harder to change yet Dave still thinks London style unit tests are useful. What do you think?
3
Most experienced developers with 20+ years of programming experience that I know don't know how to write a good unit test. All those that write London style unit tests don't know how to write a good unit test.
3
You don't understand the agile process. Agile means that you don't know exactly what a customer wants so you create a small upgrade and show it to customer and he will give you more input so you can change it until the customer is satisfied with the result. Only then you can create a test that will preserve the functionality after many small changes of the code in the future cycles. The main benefit of writing tests is to protect the current functionality from future upgrades.
3
Yes I think interviews should be more like conversations between two engineers about common problems we face and not so much about answering questions about some details that we can find the correct answer on google in 5 minutes.
3
@mamneo2 great! Can you please tell me where is such shortage of IT workers? I will try to find a job there maybe even your company can hire me.
3
The best thing to do with London style unit test is to delete them. It is better to have no unit tests than to have bad unit test that London style promotes.
3
@PavelHenkin but you can develop outside-in/top-down with classical unit tests too and the end result are easy to understand tests without mocks and easy to change implementation of existing functionality without breaking the unit test. Unit tests should only fail when functionality changes and not when internal implementation changes while functionality stays the same.
3
Great explanation why we should use the TDD. TDD is really a great tool. Now it would be great to hear when we should NOT use the TDD. You should ask Martin Fowler why he is not using TDD every time he is writing code.
2
Yes those class tests are "London" style unit tests where you should mock every call outside the class under test. They are just terrible. You should use the classical style unit tests instead.
2
Usually you write full test before the first line of production code and you don't change the test only production code when you write more full tests.
2
I am a bit disappointed at you Dave that after all this time you still didn't find out that London style unit tests are just terrible for projects. Unit as you said is not a class and it is also not a piece or pieces of code. Unit is a unit of functionality and it can be implemented by many objects of different classes or just by a single function. London style is a great example of how NOT to do unit tests. Tests know way too much about internal implementation of a public interface that users can see. You mentioned the injected objects but what about objects that are internally created by a class whose functionality we want to test? Should we mock all those internal objects and should unit tests know about them? Of course not. The question you should ask is what is the purpose of unit tests. 1.Unit tests are protecting the implemented functionality from bugs that can appear after we change the code - extend it or refactor/redesign it. The last thing we want is to get false failures of unit tests because we changed the internal implementation while the final functionality works as before - as expected. 2. The other purpose of unit tests is to get the documentation in code from which we can learn how to use the classes. It is much harder to understand unit tests that have mocks and even worse those that use mock libraries than just plain straightforward unit tests. So London style unit tests fail at achieving both goals. I can tell you that the best programmers at the top software companies like Google and Facebook don't write London style unit test - only "classical" unit test with very few mocks - less than 5% of unit tests have test doubles. Finally if there is piece of software that is hard to test with classical unit tests like web app that is using database then this is a sign of a bad design. We should separate business logic from database access right? We don't need mocks to test business logic that is properly separated from database or filesystem...
2
@MrAntice the truth is quite different. It is a dirty business where most companies that offer programming are trying to earn as much as possible by selling cheap inexperienced developers as expensive highly experienced.
2
I believe we should increase the flexibility and complexity of design/architecture only when we really need it and never upfront.
2
SOLID is important if job interviewer is a highly experienced software developer. If manager is doing the job interview then looking confident is more important than what you say. LOL!
2
@aakarshan4644 the important part is also understanding the wars between different opinions about unit testing and styles, using TDD or not, agile vs waterfall... and stay away from that topics because you never know what are interviewer's preferences. Once a manager on a job interview asked me if I am one of those that like to write unit tests - he clearly hated unit tests. Since technical lead was also present and he clearly liked unit tests I answered very diplomatically that unit tests are sometimes useful but this was not good enough answer for manager that clearly wanted to hear that I don't like unit tests... LOL Beside can you imagine that there are many experienced developers in Europe that are still writing London style unit tests? That they still didn't realized how terrible is to mock out everything that is not a part of the class under test?
2
Yes there are several rugs that we should pull from programmers. One rug is trying to use TDD everywhere. The other is mocking everything outside the class under unit test and another rug is using mock libraries... I believe good unit tests are the next step in making system that are easy to change. Unfortunately right now 90% of programmers don't know how to write a good suite of good unit tests.
2
Exactly. Once I worked in a company that paid me a low rate from the start with a promise that after 6 months they will pay me competitive rate if I will fulfill their expectations in the first 6 months. After 6 months they were satisfied with me so they hired me for indefinitely and they raised my salary just for about 4% so it was still far from what I could get elsewhere. This made me "drunk" so I didn't want to work hard anymore and eventually I left the company on bad terms. LOL!
2
If I were Pope I would make Giordano Bruno a saint.
2
@NicodemusT sometimes you need a mock to create a test but you should consider changing the design so you don't need the mock to test the functionality. Example: instead of loading data from injected object you could load data and send it as a parameter to method that you want to test.
2
@dflor003 mocks are terrible and you shouldn't use them to mock services.
2
@rmworkemail6507 We write requirements when doing agile. They are just a bit different than in waterfall process. They are not set in stone from the start - just for the next sprint and then we can change them...
2
@powerswitchfailure Dave is doing London-style and I try to convince him against this nonsense. I am baffled how many otherwise experienced programmers just don't get how terrible is London-style.
2
@rhornjr Yes I am suspicious to those who know exact definitions. I want them to explain the principles by their own words and I also like to ask them about disadvantages. Usually when they know disadvantages they have a lot of experience. So what are disadvantages of doing TDD? LOL!
2
@bobbycrosby9765 Mocking sometimes is not London. London is mocking everything.
2
@pauligrossinoz OMG you did a huge mistake with that senior dev. He was afraid of you because you were too good so he didn't want to be your boss because you might take his position someday. The truth about interviews is that knowledge is just part of equation. I had some very strange interviews in my life. Once a senior developer at interview was excited to give me the job when I said unit testing is useful while I made the manager angry because he thought unit tests are waste of time. The most important is to find out who is the boss in the interview and make him happy because he will decide who will get the job.
2
@harryd5571 depends on money. If they pay well then I can work with that too. I work as a contractor and all I care is my hourly rate that is much much higher than the rate of full time employees. I don't mind programming silly things on bad projects if they pay me well for that.
2
@barneylaurance1865 so Dave can ask Martin Fowler why he didn't use TDD everywhere when he was still working as a programmer.
2
TDD is also overrated because in reality there are many cases where it is not useful and yet TDD gurus want you to use TDD everywhere. They are so silly.
2
@milandalosur1850 good point but it depends on location. In my country Slovenia the pay is not much better than the pay of a waiter. In Germany and Austria they still pay better but since now it is hard to get a job there wages are slowly going down. My hourly rate is 30% lower than it was before the IT "recession" and I still cannot get a job.
2
The shortage of jobs and higher supply of developers looking for a job is caused by many factors. #1 higher interest rates, #2 lower growth of economy, #3 energy crisis because of war between Russia and Ukraine, #4 many developers from Russia and Ukraine are looking for a job in USA and EU
2
You can test IO with integration tests and keep it separated from business logic that you can test with unit tests without the need to mock anything - if you have a good design.
2
Yes the strict TDD sometimes feels so silly... You should skip the silly parts and write a test for the basic functionality that makes sense first. When you implement the functionality so the test passes then you should write tests for edge cases and fix the implementation so they all pass.
2
Previous
1
Next
...
All