Joris Timmermans

Jun 15, 2023 13:37
A thought to consider when you first start writing (unit) tests: the developers' initial intuition might be that they are writing tests to show that their code works. It's much more effective though to write tests that are trying to prove the code *doesn't* work - and then fix the code.
Like @JoSSte just said - adding a test case to document a real incident (i.e. a test that fails because of a bug you're about to fix). Or before you write any code, a test case for a corner case that you suspect won't be treated correctly by the initial implementation.
 
May 23, 2013 13:09
@Onno I do that in comments - the regulars around here are ruthless about low-quality answers. Gnat walks around with a giant club hitting people that haven't put the proper time in.
May 23, 2013 13:08
To be fair, here on P.SE the standard has become quite high over the past few years. If you could answer the question in less than 5 minutes work, it's probably not a good question (or a very good answer). If you've been out of the loop and missed the transition then it may surprise you.
May 23, 2013 13:06
@Onno Clean-up program? Constantly ;-)
May 23, 2013 13:03
A good question with good answers should never be dead on Stackexchange :)
May 23, 2013 13:02
I actually regularly edit old answers of mine if they get upvoted, I re-read them, and think that I can do better or have learned something else in the mean time.
May 23, 2013 13:02
You're still around to improve the question, and now the site is better for it.
May 23, 2013 13:01
@Onno Well, the questions and answers stay around, even if they are old. So if one of us comes across a question or an answer, even an old one, that doesn't really reach the level of quality that the site expects, it gets edited or commented.
May 17, 2013 15:14
@JimmyHoffa No indeed, you don't need low level to get C++ performance, you can easily make your program that slow in a high-level language too!
May 17, 2013 15:09
@JimmyHoffa Real low-level C++ developers read SSE intrinsics as if they are Esperanto.
May 17, 2013 15:07
Wanted to post some of that black-box code, but it filled a page of chat, bad idea ;-)
May 17, 2013 15:01
@JimmyHoffa I live by the mantra "throw more hardware at it" too, but in my case "it" means "management".
May 17, 2013 09:02
@Joel You could do an awful lot of things, but it has to be worth the effort. Somewhere there's a cutoff point where your time could be spent more valuably than trying to reorganize the code to the point where you don't need that comment you could have written in 5 minutes.
May 17, 2013 08:46
:9470059 It's hard to come up with a really good concrete example, but one I instantly thought of is saving a file somewhere. That's simple, right? Except if the current user doesn't have write rights in the location you've picked. Except if the disk is full. Except if the location is a network location that becomes unavailable halfway through. Etc. etc.
May 17, 2013 08:37
Continuing the thought from my previous comment - you might end up in the situation where your test code is so convoluted that it needs comments ;-)
May 17, 2013 08:35
@YannisRizos Code is a four-letter word.
2
May 17, 2013 08:34
@Joel Breaking changes in the types of solutions I'm thinking of will not be easy to catch by unit tests. They should be caught by tests, perhaps even integration and system tests - but those tests might well be just as hard to write as the solution, if not harder. So in the end you may be spending hours and hours coding up a framework to express something that you could have spent 10 minutes on by writing a decent comment.
May 17, 2013 07:58
@Joel In the real world there are many problems that cannot be solved with a solution that is "obvious" and/or "simple to understand". You better comment those solutions before the new guy that's just read those two articles replaces the solution that has been carefully written and optimized over many hours of work with a solution that is simple, elegant, and wrong ;-)
May 16, 2013 11:53
@JimmyHoffa Seriously, I use a calligraphy fountain pen quite a lot. It makes for great-looking writing.
May 16, 2013 11:45
I use regular pencils because you can sharpen them to a lethal weapon in a pinch.
May 16, 2013 11:41
@JimmyHoffa I've actually had to fight for whiteboards because putting them up would "damage the walls"...
May 16, 2013 10:09
Though I did just edit the question to remove some of the more emotionally charged wording.
May 16, 2013 10:06
@gnat As long as this particular question and answers remain spam free, I'd leave it be.
May 15, 2013 15:55
@gnat It's always difficult being wrong. And I don't mean you, I mean me - I knew that question was offtopic, but fun got the better of me for a bit.
May 15, 2013 15:42
@gnat I downvoted every single thing in that question and my own snarky comment after reading your link to the meta post.
May 15, 2013 15:30
(Maybe I should have put a smiley in that last message...)
May 15, 2013 15:30
My research shows there are actually 5 types of questions on P.SE: exact duplicate, off topic, not constructive, not a real question and too localized.
May 15, 2013 15:26
"I posted a question on P.SE and all I got was this lousy close vote"
May 15, 2013 15:23
@thorstenmüller [CLOSED] Not a real programmer?
May 15, 2013 15:21
@thorstenmüller We should make Programmers.SE [CLOSED] T-shirts and wear 'em proudly.
May 15, 2013 13:11
@GlenH7 Development: the act of turning caffeine into code.
May 14, 2013 15:17
@JimmyHoffa Maximum possible distance depends on your graph coloring complexity - and that gets hard fast. It's easier/quicker to pick a distance that's "different enough" and keep the algorithm simple until you NEED it to be more complex.
May 14, 2013 14:52
@thorstenmüller Having actually done this a long time in the past - the color distance in the "Hue" component of HSV and HSL is much more useful than poking around in RGB hoping for a good perceptual color distance. I added that bit to my answer, since I didn't originally motivate why I'd pick one of those color spaces over RGB.
May 13, 2013 14:23
@thorstenmüller To be fair, I think any user that would participate enough to trigger the comment conversation transition would probably also gather enough rep for chat quickly enough.
May 13, 2013 14:20
@thorstenmüller can't you take comment conversations into chat even with low rep users?
May 10, 2013 15:27
We could call it the "shotgun approach"
May 10, 2013 15:25
@MichaelT For power users of SE that could be useful to set potential migration paths for "off topic" close votes. There are times when question-askers are unsure - they have to pick one, they can indicate the others that might fit.
May 10, 2013 15:21
@MichaelT I thought about the response I would write to it, and it would not be programmer-specific, so I think a migration would be better.
May 10, 2013 15:21
@MichaelT Flagged it for migration.
May 10, 2013 15:19
@MichaelT Yeah I'm trying to think of a way to edit the question so it's not off-topic, because I LIKE the question, it's just doesn't match the FAQ.
May 10, 2013 15:17
6
Q: How should I behave as a developer in a project that's headed for failure?

Louis RhysI am a developer in a 5-member team and I believe our project is headed for disaster. I'll describe why in the bottom, but my question is how should I behave? The deadline is in 1.5 months and I feel no matter we work this project will fail anyway. I think the most efficient way is to just termin...

May 7, 2013 14:00
@Rachel I still struggle when reading that question to tell myself that the 'why' does not apply to 'why make lo-fi prototypes', but to 'why use the method or tool you are suggesting in your answer'.
May 7, 2013 12:48
I must be the only person in the world (read that in your best Top Gear Jeremy Clarkson voice) that prefers the new VS2012 GUI to the old one then ;-)
May 7, 2013 09:44
@MichaelT Emacs is awesome. All it's missing is a good text editor.
May 6, 2013 15:29
I've been a project manager and a functional manager. Just let me code and leave me alone! ;-)
May 6, 2013 15:27
@GlenH7 That or "mutually assured destruction"
May 6, 2013 15:26
@JimmyHoffa How do you think I ended up with "mad" in my handle?
May 6, 2013 14:50
@GlenH7 Dammit! Maxed out my reviews today. THE FLOODGATES, THEY HAVE OPENED? Anyone else noticing that the drive for quality here in the past months is starting to pay off?
Apr 26, 2013 12:37
@thorstenmüller Oh but I'm psychic. And sometimes you don't need the question to know the value of the answer (which is obviously 42).
Apr 26, 2013 12:34
@thorstenmüller It IS a test question - I just did an action on it and I passed ;-)