Maybe they'd been studying The Art of Computer Programming, in which a byte is 6 bits (when it's a binary byte, as opposed to a decimal byte!) and got it slightly wring.
token_woman
@token_woman
Best posts made by token_woman
-
RE: Overheard at Work
-
RE: Don't test, it gets in the way of code coverage
@Justice said:
So they start with unjustified, pointless dogma and then foolishly circumvent it by
selling indulgencesleaving out assertions.This sounds like somebody tried to enforce a test-driven process on a cowboy culture, and the barbarians played along but really just kept doing things their own way.
Obviously given what I said about TDD I personally disagree with the remark about pointless dogma.
But I have no issue with anyone choosing not to go the test-driven way.
What bugs the bejeezus out of me is that they spend time writing all this "coverage" and not spend the extra few minutes to make it actually do something. Might as well ya, know, Since it's THERE...??
(edited to hand-code line breaks in)
-
RE: Don't test, it gets in the way of code coverage
@blakeyrat said:
Shocking news: horses led to water can not be forced to drink!
Sure, but if you don't want to drink, why go to the water?
If you don't want to really do unit tests why start a company working exclusively on a platform that forces you to write them?
And why TF would you employ someone with "Looking to work in a test driven environment" at the top of their resume - wouldn't "They will discover the sham and leave" suggest itself at some point in the hiring procedure?
-
Don't test, it gets in the way of code coverage
I've just started with a company that develops bespoke apps on the salesforce platform.
I never expected it would be my vocation in life, to put it mildly, but one thing did attract me to it. I'm into test driven development and in salesforce test coverage is enforced - it's a managed platform, and you are prevented from pushing any code to production that has less than 75% coverage. Great, I thought, no more having to persuade colleagues of the value of testing, etc. .....
Then, the other day, my boss asked me to look at an app he'd written. It had nearly 75% coverage and he wanted me to add a couple more tests. Well I started looking through the existing tests to see how he wanted them done......
They had no assertions in them. They couldn't fail. They "covered" the code, by simply running the code, whether it worked or not.
I assumed the boss was the usual non-coding coder you get for an MD in these little companies and whispered to the guy next to me that I had come across this abomination and asked him how I should tactfully correct it.
"Oh no," he said, "It's supposed to be like that. We all do it like that here."
"Well", I said, "I'll let it go in his code I suppose, but when write tests myself I think I would rather put the assertions in."
"I wouldn't do that," he said. "You need to spend your time efficiently getting the code coverage up. Don't waste time on assertions. Do you realise assertions add nothing to the coverage figure?"
Latest posts made by token_woman
-
RE: Representative line(s)
@Someone You Know said:
Why did all of you take these pictures facing the wrong way?
We are clearly facing the right way, what's wrong with you? Feel left out? -
RE: Representative line(s)
@dhromed said:
Mine too, but an old one. I've given up playing blurnsball now - i was really shit at it. Whole new swathe to cut with computing.@Scarlet Manuka said:
My avatar is certainly a genuine photograph of me.
So is mine.
-
RE: I hate place-holder code
@morbiuswilters said:
I'm a man, so I never read the book
@morbiuswilters said:It's a decent movie but far too prolix.
Outta here, Wintergreen. No-one who doesn't read says "prolix". -
RE: Potential WTF?
@TGV said:
Well, obviously. But I'm wondering what Hatshepsut has seen, if he's being sarcastic rather than pointlessly haikuic.Coding is a bit lousy. Instead of breaking out of the loop, you could return true or false. And of course, you could use ArrayList and then contains:
if (TRUE_VALUES.contains(tempValue)) return true;
if (FALSE_VALUES.contains(tempValue)) return false;
throw new IllegalArgumentException("value must be one of the accepted values");
-
RE: Senior developer
@dtech said:
I think it's more like this:
Poetry in pseudocode. So much painful experience distilled into those few lines.
<font face="Lucida Console" size="2">
Line1 = file[0].split(212);
Line2 = file[1].split(211); // Next line might only have 211 spaces before filename
</font> -
RE: Representative line(s)
@morbiuswilters said:
@swiers said:
I have found it useful when using web forms that have varying numbers of rows depending on how many of something there are. For example you might present someone with a feedback form with space for one comment for each product they bought. You don't know in advance how many comments there will be so you do something like "input name = comments[]" and it just adds it to an array (not sure of exact syntax but you get the idea).(Honestly, I just learned that bit about param arrays myself, and it my not have been valid in older PHP versions.)
It's been in PHP for a very long time. It is a bit obscure, though. I really never found cases where it was useful, but YMMV.
-
RE: Representative line(s)
@swiers said:
eval( "$foo_fat_id = $foo_fat_id;" );
My php is rusty so just checking I've got this right. It sets the variable $foo_fat_id to the current value of $foo_fat_id ? -
RE: Fight the Powah
@morbiuswilters said:
@PedanticCurmudgeon said:
@token_woman said:
D'oh!!! Just got it. "Integer theInt". Yeah that would be peeler-worthy indeed in a language that had two different types, int and Integer.
What language is it? Ada's case-insenstive and has an int-like type called integer.
However, the language I work in (but not for much longer, Hurrah!) is not actually Java but a subset (an idiotic subset) which has no Integer class and its int-like type is called "integer".
That sounds so far-fetched I don't actually expect anyone to believe it, but it's true. So ... well .... ner.
Edit: oh, and it's case-insensitive so "integer" / "Integer" OK. No, I don't expect you to believe that either.It seems like she's saying it's a subset of Java, so likely some awful, proprietary language that gets run through a preprocessor and turned into Java.
Wish it was Ada - at least that has a kind of old-school patriotic chic. Sadly though, morbius is spot on.
-
RE: Clerks (administration workers) and documents
I taught an admin worker how to cut and paste. I had found her reading data from one spreadsheet and typing it into another. This was in the public sector so we're talking taxpayers' money here. What really makes me shudder is the thought that she might have sat through my showing her, thought "hmm, looks kinda high-falutin'" and gone back to her original method.