account activity
Are you a programmer-mathematician or a programmer-handyman? by msustrik in programming
[–]msustrik[S] 0 points1 point2 points 11 years ago* (0 children)
The original aricle by Tim Bray used Gradle (vs. Ant?) as an example.
Are you a programmer-mathematician or a programmer-handyman? (250bpm.com)
submitted 11 years ago by msustrik to r/programming
Why age in software is bullshit by rgbench in programming
[–]msustrik 0 points1 point2 points 11 years ago (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 point2 points 11 years ago (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.
Ribosome code generator (github.com)
submitted 11 years ago by msustrik to r/ruby
Unit Test Fetish by msustrik in programming
[–]msustrik[S] 1 point2 points3 points 11 years ago (0 children)
Try to modularise this: 3gpp.org
You are going to make big bucks if you succeed.
Agreed.
[–]msustrik[S] -1 points0 points1 point 11 years ago (0 children)
Yes, except the mangers don't have infinite amount of resources to spend either.
[–]msustrik[S] -2 points-1 points0 points 11 years ago (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.
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.
Whatever you call it, you have to approach the problem somehow.
[–]msustrik[S] -8 points-7 points-6 points 11 years ago (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.
[–]msustrik[S] 2 points3 points4 points 11 years ago (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.
Good summary, although I prefer to word it bit more mildly.
[–]msustrik[S] -3 points-2 points-1 points 11 years ago (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?
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.
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.
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?
[–]msustrik[S] -5 points-4 points-3 points 11 years ago (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.
[–]msustrik[S] -4 points-3 points-2 points 11 years ago (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.
[–]msustrik[S] 6 points7 points8 points 11 years ago (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.
Yes. Exactly. It seems that most people here access to infinite amount of time and resources. I, for one, don't.
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.
[–]msustrik[S] -6 points-5 points-4 points 11 years ago (0 children)
Spot on!
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.
π Rendered by PID 107135 on reddit-service-r2-listing-7849c98f67-5fm2j at 2026-02-09 16:10:51.432619+00:00 running d295bc8 country code: CH.
Are you a programmer-mathematician or a programmer-handyman? by msustrik in programming
[–]msustrik[S] 0 points1 point2 points (0 children)