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.
 
  • Post
  • Reply
Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.
Thanks! I'm using c++14 and a new version of cmake so I guess I was asking for trouble a bit :) it's nice to have a free CI environment in the first place.

Adbot
ADBOT LOVES YOU

lord of the files
Sep 4, 2012

https://twitter.com/c0smicr4y/status/640714284553469952/photo/1

lord of the files fucked around with this message at 21:32 on Sep 24, 2015

Athas
Aug 6, 2007

fuck that joker

Honestly, the thing that strikes me most here is how the Win32 API/style is always so full of aesthetic microaggressions. Why is it so ugly?

Linear Zoetrope
Nov 28, 2011

A hero must cook
Coding horrors: full of aesthetic microaggressions

qntm
Jun 17, 2009

Ithaqua posted:

Back to the original "horror": I don't know why it's a horror that every story is 3 points. That can happen.

I guess it can be quite demoralising to spend all that developer time to arrive right back at the default of "all our stories are equally weighted".

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

Athas posted:

Honestly, the thing that strikes me most here is how the Win32 API/style is always so full of aesthetic microaggressions. Why is it so ugly?
It's over 20 years old.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

qntm posted:

I guess it can be quite demoralising to spend all that developer time to arrive right back at the default of "all our stories are equally weighted".

But it's not for weighting, it's for effort estimation. Prioritization is the job of the product owner. Story points lets the product owner know what things they can fit in a sprint and how soon they can expect those things to be delivered. If they have 10 user stories, each estimated at 3 points, and the team's velocity is only 20, then the product owner can choose which 6 stories they want completed first.

If you've never worked on an Agile team that was doing it well and had buy-in from upper management on down, it sounds like insane voodoo magic. But it actually works.

ExcessBLarg!
Sep 1, 2001

HardDisk posted:

That is supposed to be kernel-level, code, right? Are gotos really still a thing in that "level" of code?
Yes, the "goto found" and other goto idioms (cleanup, done, retry) are used quite frequently in the Linux kernel.

HardDisk posted:

I guess my question is then why isn't it a function or a method or something?
You could split the "found case" code (everything after the found: label) into a separate function, and call "return allocproc_unused(p);" in place of "goto found;" inside the loop. It would be a bit strange, though, as the ptable.lock has to be held for the function call but released within it, and you generally try to avoid doing weird things with locks like that.

Athas posted:

Actually, it can be written even nicer:
The one thing I don't like about that approach is that it repeats (slightly modified) the loop termination condition. So, if the loop termination condition were ever changed, it would have to be updated in both places or bad things could happen. In this particular instance I'd probably introduce a "found_proc" boolean, set inside the loop if, and check it after releasing the ptable.lock.

If there wasn't a ptable.lock , I'd probably just go with "goto found". It's also not uncommon to have to release a lock in two places with structured (if/else) branches either. Really, the function as written is not inconsistent with "good style" kernel code, aside from the braces thing.

comedyblissoption
Mar 15, 2006

it's kind of wierd how some experienced developers will be very adamant about proper indentation and always putting braces around conditional and looping blocks but as soon as you suggest maybe we should have significant whitespace and enforce indentation it is an abomination upon the lord

rarbatrol
Apr 17, 2011

Hurt//maim//kill.
On the story points topic: Where I work, there's a company-wide goal to lower the average story point size to 3 or smaller. Every now and then I see a powerpoint slide with the wildly varying (surprise surprise) weekly averages.

No Safe Word
Feb 26, 2005

rarbatrol posted:

On the story points topic: Where I work, there's a company-wide goal to lower the average story point size to 3 or smaller. Every now and then I see a powerpoint slide with the wildly varying (surprise surprise) weekly averages.

Techncially you can scale story points however you want, you just have to re-calculate your velocity (and also not rely on previous point estimates for relative estimation unless they're also scaled). So just immediately meet the goal by rescaling the 13-pointers to 3-pointers and so forth, then divide your velocity by 5 :v:

rarbatrol
Apr 17, 2011

Hurt//maim//kill.

No Safe Word posted:

Techncially you can scale story points however you want, you just have to re-calculate your velocity (and also not rely on previous point estimates for relative estimation unless they're also scaled). So just immediately meet the goal by rescaling the 13-pointers to 3-pointers and so forth, then divide your velocity by 5 :v:

Yuuuup.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

No Safe Word posted:

Techncially you can scale story points however you want, you just have to re-calculate your velocity (and also not rely on previous point estimates for relative estimation unless they're also scaled). So just immediately meet the goal by rescaling the 13-pointers to 3-pointers and so forth, then divide your velocity by 5 :v:

Although making user stories actually smaller so they're easier to estimate and have lower risk is a good thing, too.

I would blow Dane Cook
Dec 26, 2008
We also have a burn down chart that seems to keep burning up and stand up meetings that go on for too long. I wonder if there's enough material for a bad Agile thread.

NihilCredo
Jun 6, 2011

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

Jumpingmanjim posted:

We also have a burn down chart that seems to keep burning up and stand up meetings that go on for too long. I wonder if there's enough material for a bad Agile thread.

It could probably double as the Agile General thread anyway.

Pavlov
Oct 21, 2012

I've long been fascinated with how the alt-right develops elaborate and obscure dog whistles to try to communicate their meaning without having to say it out loud
Stepan Andreyevich Bandera being the most prominent example of that

comedyblissoption posted:

it's kind of wierd how some experienced developers will be very adamant about proper indentation and always putting braces around conditional and looping blocks but as soon as you suggest maybe we should have significant whitespace and enforce indentation it is an abomination upon the lord

I like the idea in principle but in practice python's whitespace has been a pain in my rear end in more than one occasion. Also I like curly braces so I can hover over one and jump to the other in large blocks.

yippee cahier
Mar 28, 2005

Jumpingmanjim posted:

We also have a burn down chart that seems to keep burning up and stand up meetings that go on for too long. I wonder if there's enough material for a bad Agile thread.

Hey Geoff, didn't know you were on the forums.

Athas
Aug 6, 2007

fuck that joker

SupSuper posted:

It's over 20 years old.

So is POSIX, and it's much more pleasing to the eye.

Even GTK+-programming, which is also an object-oriented library written in C, isn't as ugly.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Athas posted:

So is POSIX, and it's much more pleasing to the eye.

lmao

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
please defend the countless non-reentrant, non-threadsafe global-heavy POSIX APIs like readdir and getpwnam, along with the lovely longjmp variants of getcontext/setcontext, and then once you're done, tell me how signals make any sense, and why FD_CLOEXEC is not default for almost everything

pseudorandom name
May 6, 2007

Don't forget that any API taking PIDs is inherently racy and the fundamental unit of timekeeping is shorter than a human lifespan.

Athas
Aug 6, 2007

fuck that joker

Suspicious Dish posted:

please defend the countless non-reentrant, non-threadsafe global-heavy POSIX APIs like readdir and getpwnam, along with the lovely longjmp variants of getcontext/setcontext, and then once you're done, tell me how signals make any sense, and why FD_CLOEXEC is not default for almost everything

I have been talking only about aesthetics, not about overall design quality. I know plenty places where POSIX sucks, but at least it looks pretty-ish while doing so (i.e. no common use of types with names like _WCHAR or whatever the gently caress).

Fullets
Feb 5, 2009

Athas posted:

I have been talking only about aesthetics, not about overall design quality. I know plenty places where POSIX sucks, but at least it looks pretty-ish while doing so (i.e. no common use of types with names like _WCHAR or whatever the gently caress).

The heroic backtracking from Managed C++ to C++/CLI showed there is some amount of underscores that is too much even for Microsoft.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

pseudorandom name posted:

Don't forget that any API taking PIDs is inherently racy and the fundamental unit of timekeeping is shorter than a human lifespan.

That reminds me. I have a Linux patch to expose a process handle as an fd I need to finish off. Closes all the races with existing APIs.

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

Fullets posted:

The heroic backtracking from Managed C++ to C++/CLI showed there is some amount of underscores that is too much even for Microsoft.
I remember using Managed C++ when it just got released (.NET 1.1 era I think). Single-stepping through your code took approx. 3 seconds per line because of all the context switching going on. Apparently they didn't expect people to mind.

Edison was a dick
Apr 3, 2010

direct current :roboluv: only

Suspicious Dish posted:

That reminds me. I have a Linux patch to expose a process handle as an fd I need to finish off. Closes all the races with existing APIs.

Unless you're Josh Triplett or Thiago Macieira you may have to work fast to beat them to it.

Though the reason it's not already in is that they wanted to do it by another clone() syscall, and it's taken a while since the various implementations read the tls field directly out of the syscall arguments, rather than it being passed down through the call stack as a function parameter.

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

Athas posted:

So is POSIX, and it's much more pleasing to the eye.
C was designed for POSIX though.

Really though the real reason is that Win32 never drops anything, so everything is built on layers and layers of age-old standards and defines to maintain all kinds of compatibility mappings that are probably mostly obsolete now (eg. 16 vs 32-bit and ANSI vs Unicode) so all you see are macros.

There was a big push to clean things up in the Vista era but we all saw how adoption went. :v:

Carbon dioxide
Oct 9, 2012

I'm learning how to code.

Someone just told me about while ( i --> 0 ) :stonk:

feedmegin
Jul 30, 2008

SupSuper posted:

C was designed for POSIX though.

You mean POSIX (and Unix before it) was designed for/written in C...

Also it managed to avoid the whole wchar thing by basically punting on internationalisation support entirely, which I'm not sure I'd call a win. It worked out in the end because everyone is moving to UTF-8 these days instead of wide characters (and moving outside the basic multilingual plane has kind of hosed NT on the theoretical benefits of using 16-bit wide characters), but back when NT came out doing portable non-English-language software on Unix was a right nightmare. Even today things like locale names aren't standardised across Unices - is EUCJP ja_JP.eucJP or ja_JP.eucjp or ja_JP.IBM-eucJP? Who knows!

feedmegin fucked around with this message at 11:52 on Sep 25, 2015

karms
Jan 22, 2006

by Nyc_Tattoo
Yam Slacker

Carbon dioxide posted:

I'm learning how to code.

Someone just told me about while ( i --> 0 ) :stonk:

Too bad the --> operator doesn't work anywhere else.

I would blow Dane Cook
Dec 26, 2008

Carbon dioxide posted:

I'm learning how to code.

Someone just told me about while ( i --> 0 ) :stonk:

What does it do?

1337JiveTurkey
Feb 17, 2005

Jumpingmanjim posted:

What does it do?

It's a postdecrement operator followed by a greater than comparator without a space in between. i-- > 0 is how you'd normally write it.

ToxicFrog
Apr 26, 2008


Jumpingmanjim posted:

What does it do?

At a guess, it parses to: while ( (i--) > 0 ), which is to say, each time it evaluates, it checks if i > 0 and then decrements i.

qntm
Jun 17, 2009

Pavlov posted:

I like the idea in principle but in practice python's whitespace has been a pain in my rear end in more than one occasion. Also I like curly braces so I can hover over one and jump to the other in large blocks.

My only issue with Python's whitespace is not being able to hit Ctrl+B (or whatever) to jump from the beginning of a block (i.e. the opening brace) to the end of it. Not a big deal in the scheme of things, to be honest.

Carbon dioxide
Oct 9, 2012

1337JiveTurkey posted:

It's a postdecrement operator followed by a greater than comparator without a space in between. i-- > 0 is how you'd normally write it.

No, normally you'd use a for loop, which were invented for exactly this purpose.

1337JiveTurkey
Feb 17, 2005

Carbon dioxide posted:

No, normally you'd use a for loop, which were invented for exactly this purpose.

Not if you're going to write the lower bound as 0-- 0

fritz
Jul 26, 2003

Carbon dioxide posted:

No, normally you'd use a for loop, which were invented for exactly this purpose.

What if you're going to have to modify i in the loop body?

Tank Boy Ken
Aug 24, 2012
J4G for life
Fallen Rib

fritz posted:

What if you're going to have to modify i in the loop body?

code:
for(i  = 10; i > 0; i--)
{
	do_mean_things_to_i(i);
}

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Edison was a dick posted:

Unless you're Josh Triplett or Thiago Macieira you may have to work fast to beat them to it.

Though the reason it's not already in is that they wanted to do it by another clone() syscall, and it's taken a while since the various implementations read the tls field directly out of the syscall arguments, rather than it being passed down through the call stack as a function parameter.

I'd be happy if they beat me to it.

Adbot
ADBOT LOVES YOU

Presto
Nov 22, 2002

Keep calm and Harry on.

Ithaqua posted:

Back to the original "horror": I don't know why it's a horror that every story is 3 points. That can happen.
It means the developers are sick of each other and sick of agile and sick of arguing, so everybody goes, "It's a 3 I guess. Whatever. Can we get out of this meeting now?"

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply