Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

redleader posted:

i felt bad for the guy who had to go and write integration tests for that

i heard that he needed to use an awful lot of Thread.Sleeps

awww yeah, asynchronous operations that take wildly variable time to complete depending on machine load are extremely my poo poo.

we have tests that fail during the day and usually do not during nightly builds

Adbot
ADBOT LOVES YOU

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
*asynchronous objects that are treated as synchronous by using sleeping/timeouts

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD

redleader posted:

i felt bad for the guy who had to go and write integration tests for that

i heard that he needed to use an awful lot of Thread.Sleeps

we have unit (integration) test methods that have

code:
sut.DoThing();

if (Debugger.IsAttached)
{
	Thread.Sleep(1000000000);
}
else
{
	Thread.Sleep(15 * 1000);
}

Assert.IsTrue(CheckResult());
so that you can debug them without the test runner finishing

~Coxy fucked around with this message at 13:23 on Aug 24, 2016

Luigi Thirty
Apr 30, 2006

Emergency confection port.

hobbesmaster posted:

normally I would agree with all this but luigi30 is creating basic libraries for ancient architectures for fun

in which case: do some stuff with the cstring functions since you're doing it for the hell of it. then look at what you'd need to do for a proper Unicode library like Qt's qstring and run screaming back to your dos renderer

hey I added a speed control for the player to it so technically you can fly around objects in space

there's just no other game parts to it or anything atm

qntm
Jun 17, 2009

Wheany posted:

we have tests that fail during the day and usually do not during nightly builds

we had a test once which only failed on Sundays

quiggy
Aug 7, 2010

[in Russian] Oof.


MononcQc
May 29, 2007

For async tests, the thing I tend to do is wrap some operations in a general function:

code:
wait_for(F, MaxTime) ->
    case F() of
        {ok, Res} ->
            Res;
        {error, _} when MaxTime > 0 ->
            timer:sleep(50), % milliseconds
            wait_for(F, MaxTime-50);
        {error, _} ->
            throw(timeout)
    end.
So if the long-standing thing is calling an API, just wrap it in a function and go for it:

code:
...
Args = my_api:async_call(),
X = wait_for(fun() -> my_api:poll_for_results(Args) end, timer:seconds(15)),
some_other_op(X),
...
It's generally really lovely to just sleep a long unknown period of time because tests take way too long when things go right, and the occasional slow bit is there too. I haven't found a nicer pattern than 'repeated short polls that shortcircuit early, with tolerance with the occasional long run that fails when the wait is unacceptable'

raminasi
Jan 25, 2005

a last drink with no ice

qntm posted:

we had a test once which only failed on Sundays

appropriate imo, shouldn't be running tests on the day of the lord

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
oh man, php bit my rear end hard today, maybe static typing would've saved me

but I'll blame the exception/error/whatever not being properly raised when I ran the drat thing

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer
jesus christ, our test engineer is terrible. his unit tests fail intermittently in the isolation development environment i'm using. at first i thought id just hosed up some code, so i dug into the tests to see where i was loving up.

turns out im fine, and his tests are just heavily dependent on event/job queues firing off stuff in the correct order which is unlikely in an isolation environment since they run on fairly low power virtual servers and the queues get throttled down pretty hard.

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Wheany posted:

awww yeah, asynchronous operations that take wildly variable time to complete depending on machine load are extremely my poo poo.

we have tests that fail during the day and usually do not during nightly builds

i'm dealing with this on a library that communicates with a 3rd-party api over raw tcp. we have to buffer the output stream and parse it for well-formed xml until it stops throwing exceptions. sometimes a 30-second timeout isn't long enough

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

mods

mods!!!

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

MALE SHOEGAZE posted:

mods

mods!!!

wait, wait, wait.... i always pronounce it like "cares". people have been saying it like "ch-are"?

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

LeftistMuslimObama posted:

wait, wait, wait.... i always pronounce it like "cares". people have been saying it like "ch-are"?

yours is correct i think but i say chars like 'car'

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
if gif is really 'gif' then it's a free for all imo

gonadic io
Feb 16, 2011

>>=

LeftistMuslimObama posted:

wait, wait, wait.... i always pronounce it like "cares". people have been saying it like "ch-are"?

Everybody I've ever heard says it like ch-are, but then those people (and myself) are all British so take it with a pinch of salt

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer
ya, it's just that char is clearly short for character which is clearly pronounced "care-ick-tur". unless you got some kind a crazy fake tv british accent or some poo poo.

Dj Meow Mix
Jan 27, 2009

corgicorgicorgicorgi
rockin everywhere


MALE SHOEGAZE posted:

if gif is really 'gif' then it's a free for all imo

hell yeah, time to spell out char every single time just like i do for gif

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

i pronounce it ch-ar because if you're manually handling individual chars you'll probably get burned

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Dj Meow Mix posted:

hell yeah, time to spell out char every single time just like i do for gif

oh hey you're alive!

how's it going? ?

Dj Meow Mix
Jan 27, 2009

corgicorgicorgicorgi
rockin everywhere


MALE SHOEGAZE posted:

oh hey you're alive!

how's it going? ?

i'm ok! i took a break from sa because of work stuff but i think ive got my poo poo together now. we should do dinner again sometime

gonadic io
Feb 16, 2011

>>=

NihilCredo posted:

i pronounce it ch-ar because if you're manually handling individual chars you'll probably get burned

Unlike gif/jif, char is an existing word with an existing pronunciation

HoboMan
Nov 4, 2010

I've heard "care", "car", and "char", but most people say "char" in my experience. (also people saying "care" weirds me out)

hobbesmaster
Jan 28, 2008

NihilCredo posted:

i pronounce it ch-ar because if you're manually handling individual chars you'll probably get burned

tef
May 30, 2004

-> some l-system crap ->
i pronounce it "grapheme cluster"

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Dj Meow Mix posted:

i'm ok! i took a break from sa because of work stuff but i think ive got my poo poo together now. we should do dinner again sometime

yeah i live in raleigh now so we could finally check out sushi burger or whatever!

VikingofRock
Aug 24, 2008




I prefer to pronounce it like 'car' because that's the easiest/quickest to say IMO, and everyone knows what I'm talking about anyways so who cares how I pronounce it.

raminasi
Jan 25, 2005

a last drink with no ice
i say 'car' but just now realized that that's weird

VikingofRock
Aug 24, 2008




Wheany posted:


Soricidus posted:

Terrible programmers: my god it's full of charsÒopv¨Æ®}ùÇVÆs£·O"\Oz¯¿kêHÉ~êçW$Rß»mÖÞ¯b
bash$

CPColin
Sep 9, 2003

Big ol' smile.

VikingofRock posted:

who chars how I pronounce it.

I was helping somebody with her "C and Unix" class project and kept wondering why the directory she was in was called "myLib." Apparently her professor pronounced "lib" like the first syllable of "library" like a weirdo.

I wonder if he also said "etsy" when referring to /etc

Dj Meow Mix
Jan 27, 2009

corgicorgicorgicorgi
rockin everywhere


MALE SHOEGAZE posted:

yeah i live in raleigh now so we could finally check out sushi burger or whatever!

yeah, check your pm and we can figure somethin out

raminasi posted:

i say 'car' but just now realized that that's weird

tbh i think thats the most common way ive heard

Mao Zedong Thot
Oct 16, 2008


CPColin posted:

I wonder if he also said "etsy" when referring to /etc

uhhh............

Mao Zedong Thot
Oct 16, 2008


the worst is 'cuttle' for 'ctl'

just saying loving control

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Needs beeps for effect

CPColin
Sep 9, 2003

Big ol' smile.

so loving future posted:

uhhh............

The correct pronunciation of /etc is "eck cetera."

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
i always said "eee tee cee" but everyone here says "etsy" so i assume that is correct

jesus WEP
Oct 17, 2004


i say "sequel"

qntm
Jun 17, 2009

CPColin posted:

I wonder if he also said "etsy" when referring to /etc

wait

that's where etsy gets its name from?

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

tef posted:

i pronounce it "grapheme cluster"

Adbot
ADBOT LOVES YOU

quiggy
Aug 7, 2010

[in Russian] Oof.


"char" is pronounced "car"
"/etc" is pronounced "etsy"
"/bin" is pronounced "bine"

hope that helps

  • Locked thread