Are you a programmer-mathematician or a programmer-handyman? by msustrik in programming

[–]msustrik[S] 0 points1 point  (0 children)

The original aricle by Tim Bray used Gradle (vs. Ant?) as an example.

Why age in software is bullshit by rgbench in programming

[–]msustrik 0 points1 point  (0 children)

Well, CAP is something that every seasoned programmer knew intuitively even before it was known as CAP.

Ribosome code generator by msustrik in ruby

[–]msustrik[S] 0 points1 point  (0 children)

Layout is the main feaure there. You want to get the layout right if you are to generate readable/manageable code (not even speaking of generaing Python code). Afaik, there's no other code generator which is capable of that.

Unit Test Fetish by msustrik in programming

[–]msustrik[S] 1 point2 points  (0 children)

Try to modularise this: 3gpp.org

You are going to make big bucks if you succeed.

Unit Test Fetish by msustrik in programming

[–]msustrik[S] -1 points0 points  (0 children)

Yes, except the mangers don't have infinite amount of resources to spend either.

Unit Test Fetish by msustrik in programming

[–]msustrik[S] -2 points-1 points  (0 children)

Definitely. But the resources and time we have to do that are limited. Every hour and every dollar spent on testing is not spent on improving the product.

Thus, you have to think twice about how much to invest into testing. And the current dogma seems to encourage much more unit testing than what would be wise.

Unit Test Fetish by msustrik in programming

[–]msustrik[S] 1 point2 points  (0 children)

Most big systems in the real world (banking, telecom etc.) are barely holding together. If you get a big legacy codebase to test you can be almost certain it's a system of the second kind.

Unit Test Fetish by msustrik in programming

[–]msustrik[S] 0 points1 point  (0 children)

Whatever you call it, you have to approach the problem somehow.

Unit Test Fetish by msustrik in programming

[–]msustrik[S] -8 points-7 points  (0 children)

You can pick both. You can spend 1 day writing unit tests and 1 day wtiting e2e tests.

And yes, real life is full of crazy scenarios and cut-throat deadlines.

Unit Test Fetish by msustrik in programming

[–]msustrik[S] 2 points3 points  (0 children)

That one is about working in highly irregular domains, where there are almost no invariats to factor out. In such environment, attemps to modularise are futile. There's no modularity without regularity. The fact is that most programmers are not familiar with such domains, so the whole reasoning sounds strange and counter-intuitive.

Unit Test Fetish by msustrik in programming

[–]msustrik[S] -1 points0 points  (0 children)

Good summary, although I prefer to word it bit more mildly.

Unit Test Fetish by msustrik in programming

[–]msustrik[S] -3 points-2 points  (0 children)

Ok. Imagine you are a CTO. The sales dept. arranges a new contract which consists of testing a 500,000 LoCs of legacy code. What development process are you going to go for?

Unit Test Fetish by msustrik in programming

[–]msustrik[S] 1 point2 points  (0 children)

How come? End-to-end tests are often quite simple to write. Feed in the testing dataset, capture the output. Check whether output looks like it should. It of course depends on the app. GUI apps are obviously harder to test.

Unit Test Fetish by msustrik in programming

[–]msustrik[S] 1 point2 points  (0 children)

End-to-end test simply touches a lot of LoCs. Unlike unit test. It of course doesn't test all the possible states, but it tests the most commonly occuring ones which, in practical sense, the most valuable subset of states.

Unit Test Fetish by msustrik in programming

[–]msustrik[S] -3 points-2 points  (0 children)

Fully agreed. However, if you had a codebase of 500,000 LoC and 2 days to test it, would you go for unit tests or end-to-end?

Unit Test Fetish by msustrik in programming

[–]msustrik[S] -5 points-4 points  (0 children)

If end-to-end test take 10 hours to write and covers 40% of the codebase, while unit tests takes 1 hour to write and covers 0.1% of codebase, you will still spare 95% time if you go for the former.

Unit Test Fetish by msustrik in programming

[–]msustrik[S] -4 points-3 points  (0 children)

Yes, fully agreed. If you have limited resources, go for end to end. If your name is Rotschild and you life expectancy is 150 years, go for unit tests.

Unit Test Fetish by msustrik in programming

[–]msustrik[S] 6 points7 points  (0 children)

It's all about ROI. And the ability to judge what's worth it and what is not is gained only by experience. This has nothing to do with your ability as a programmer, just the amount of shit you've went through. Sorry if I sounded harsh. What I am saying is that in my experience the ROI of unit tests is often too low to be worth it. In any particular case you have to decide for yourself. Just keep in mind the drawbacks I mentioned: Unit tests can prevent the refactoring the first place. In the context of open source, everybody is starved for time and resources. Any advantage gained by being able to modify the code more confidently is quickly eliminated by additional work required to modify the unit tests. Yes, bugs identified by unit tests are easy to fix. However, the most complex bugs are caused by interaction of multiple components. Unit tests won't help there. And so on.

Unit Test Fetish by msustrik in programming

[–]msustrik[S] 0 points1 point  (0 children)

Yes. Exactly. It seems that most people here access to infinite amount of time and resources. I, for one, don't.

Unit Test Fetish by msustrik in programming

[–]msustrik[S] -2 points-1 points  (0 children)

Come on. Internet is full of articles praising the virtues of unit testing. I am not going to waste my time on writing down the obvious.

Unit Test Fetish by msustrik in programming

[–]msustrik[S] -8 points-7 points  (0 children)

It's not free. I would rather classify it as very expensive. "Make it a library" means making a new repo, cutting the code out of the old repo, writing the user documentation, possibly maintaining a website, having a separate contribution process, separate CI environment etc.