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
leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

omeg posted:

He's right if you're really worried about performance. Less pointers in your data structures = better data locality = better cache performance and simpler serialization. But if you're not writing something performance-critical you don't need to worry about that.
If you're not writing something performance-critical should you be using C++? I thought that was the only reason anyone still bothered with it (outside legacy).

Adbot
ADBOT LOVES YOU

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

an insufferable third party posted:

How am I supposed to know if my API works if you haven't given me a working consumer of it?

Today is going to be fun. :downsgun:

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Suspicious Dish posted:

If a third-party is asking about your API, I think it's more than acceptable to ask for an example of a consumer for documentation and evaluation purposes.

A third party is /providing/ an API, and doesn't know if it works because I haven't provided them a working client application.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.
A contractor is supposed to push something up for my team to review. I'm sure there's a horror in it, but I can't tell you what it is because he can't figure out how to push changes with mercurial.

How do these people get past interviews? What is this guy working on? :iiam:

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.
if (!(foo > 0)) {
..
}

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Volmarias posted:

If that's the worst you're finding, you're in a pretty good place all things considered.

Volmarias posted:

If that's the worst you're finding, you're in a pretty good place all things considered.

The function was called something like 'setBar' and it sets the value of baz if foo is <=0.

It has nothing to do with bar, though bar is an actual thing.

Names are slightly more appropriate than that, but not really because the name of the function still has nothing to do with what it does.

Thanks outsourced developers doing things in my codebase.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

PleasingFungus posted:

Except, as people discussed, that returns a different value if foo is NaN.

Yes, in this case changing it to that would have it produce the correct value if foo is NaN.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.
Working on a client application against a server being developed by the guys paying us to write the client. I'm 6 hours into waiting on a deployment that they didn't notify or schedule with us.

Naturally, they have failed to deploy all of their environments at the same time.

Is this the megathread for software deployment procedure horrors? How do you even deal with this, house an SLA in the contract?

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

pseudorandom name posted:

Clearly you don't understand what it is to be a founder.

Founder of a thing that provides zero value. Does that mean, "I couldn't get a job at AAPL because they don't understand great ideas and people that is why I've made this revolutionary groundbreaking JavaScript framework for cloud fog usability for the modern web on tablets and mobile devices."

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.
Recent suggestions are the horror. Why would you write FooByAlgo1(Bar baz) when you could write Bar.Foo(Functor Algo1) and then just write your generic algorithm as a generic algorithm.

Similarly functions of the form aFromB(B b) could all be overloads of aFrom(..) so then I don't have to read your dumb code to even figure out all of the overloads and the juniors don't think it's a good idea to copy paste your terrible code into their terrible code.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Blotto Skorzany posted:

Well for one thing, because function pointers and function objects are not functors

Category theory may or may not disagree with you, but the superiority of mathematics to the pursuits or peasants is well documented elsewhere.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Blotto Skorzany posted:

Oh no, the cancer has spread to signal processing textbooks! :ohdear:



This entry is correct and accurate.

Unless you're trolling, in which case I'll use the kernel method of eating popcorn.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Blue Footed Booby posted:

It's incredibly frustrating when sites won't let you specify a custom security question, and then only provide poo poo like "what is your mother's maiden name" that's trivial to find out for anyone whose extended family is on Facebook.

I legit made that argument once and one of the security guys (first generation immigrant from Uganda) challenged me to find his mother's maiden name.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.
:smith: Why isn't all of our data in 3NF?
:downs: Who cares about database normalization? We control the data, we can do whatever we want with it.
:smithicide:

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Subjunctive posted:

Performance? Denormalization can be cool and good.

I don't want to dump the schema/data here, but performance is presently an issue. As is figuring out where the hell anything is. Performance is mostly an issue because it's impossible to reason about the data rationally, so everything is done with between 3-4 and 3-4N more subqueries than necessary.

Good effort though. :unsmith:

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

YeOldeButchere posted:

Scanning an entire table will tend to do bad things to DB performance, yeah.


Indices make queries faster therefore more indices will make things go even faster. If things are still slow, then that means you need to start adding composite indices. All of them, ideally. This is where he failed.

It's amazing the number of people who somehow believe something along those lines.

Maybe I should bring up the genius at an old job who decided to implement an RDBMS on top of a NOSQL DB because NOSQL is better. Every query was an index, so he limited the maximum number of different queries for performance reasons.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Munkeymon posted:

What if I consider excluding people who care deeply enough about whether forms will accept their technically-RFC-compliant :fishmech: addresses that they'll give up and not use my service rather than excluding the comment or whatever from their email a net gain?

I'm totally ok with that as long as you aren't a utility provider. I had a /real/ fun time recovering my password when the electric company's sign up email validation presumably used the correct email validation regex and their recovery page did not.

I may have asked their support to leave detailed messages about how to fix their poo poo and why they should use an RFC compliant regex for their engineering staff.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Soricidus posted:

I seriously am using θ to represent an angle in some visualisation code. Why not?

Because it's difficult for humans to type if they need to edit the code at some point. You might as well use a poo emoji.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

feedmegin posted:

Unless the human in question is Greek, of course. People do still speak/type in the language!

And if they're doing it on their time or working on a project where Greek is the lingua Franca, then great.

I would never pass code through review that used non-standard characters. Standard here meaning within the language and reasonably expected natural keybindings for everyone on the project.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Subjunctive posted:

I think it doesn't hold up, or there would be an else after every branched return. Nobody has that as their house style. If people don't know that return is the end of the function, I don't think there's much to do other than practice reading code?

Return is an end to a function. One of potentially many.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Bognar posted:

I always thought naming a child after yourself was a bad idea, simply in the case of having multiple children. It's like you love your first child so much that you gave them your own name, but then the second child comes along and they get... uh, well... some other name I guess, who cares you're child number 2.

You could just give your 2+ child your name as well. Or you could give them all a UUID. I'm sure doing that wouldn't break any systems they'll need to put their names in.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Blinkz0rz posted:

esquire is for lawyers :eng101:

Its use is not protected and it traditionally was meant as a title for the educated or otherwise influential people who did not hold a proper title. :eng101:

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.
Can someone explain the "logic" behind an API creator asking an API consumer for a working implementation of something consuming their nonexistent API to validate that it works? Shockingly this isn't the first person to do this.

(So glad I'm out of this place next week :unsmigghh:)

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

HardDisk posted:

To me sounds like the API creator has no idea what they're supposed to be doing.

That's my guess but the baffling thing is that in every case it's happened (multiple people, multiple orgs) there's a fully documented spec with example I/O.

Hoping :yotj: has better people.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Suspicious Dish posted:

Maybe I'm misreading this, but perhaps it's to provide example use cases that they should design their API to accommodate? API design is hard and it doesn't seem like thaaaat much of a horror to demand examples of how a consumer expects to use it.

Example use cases are in the API doc though. It's not like the thing isn't specified. They just literally don't know how to test their own code.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Plorkyeran posted:

I do fundamentally like the idea of bug tracking being intimately tied to the source repo, and I really wish there were good tools for it. Fossil does it well, but it IMO isn't a very good at the whole source code management side of things.

I love fossil. It only occasionally destroys all history of my projects including the working copy.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.
foo.split(""[0]);

Where do people come up with these crazy ideas?

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.
Using a regex is still bad because you need to at minimum perform a bunch of writes and likely an allocation. You have a fixed number of valid characters to test against, so you can just skip everything that isn't valid in constant time per character and run through with a forward and backward iterator in O(N) where N is the length of the input. Testing against both the character's upper/lower also takes constant time per test. As you need to at minimum read the whole string to check the characters, you're already at the best asymptotic time with reasonable use of memory and you can get on with your day and doing something relevant.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Amberskin posted:

Heh, are you and me coworkers perhaps?

I've seen things you would not believe. For instance, developers willingly disabling the compiler's overflow detection just because catching it as an exception is hard. Or something like that.

Overflow detection disabled => truncation.

In a bank.

Regarding to money amounts

:psyboom:

I'd ask you to name and shame, but I suspect the answer is "literally all of them." Not that it matters because the value of my account (or basically anyone else's) won't get there anyway.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

TooMuchAbstraction posted:

There's a perfectly valid reason to insert random {} in your code: it creates scope blocks, so you can e.g. declare a variable that's local to that scope and invalid outside of it. It's not (usually) a common thing to do, though, since usually you'd just make a new function to contain your scope instead.

Why would I create a new function and pass/copy a bunch of state when I could just use RAII and have a scoped lock to get to shared data from where I actually want it?

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Klades posted:

I'm just trying to think of what has to go wrong for you to have a spot in your code where a variable could be a boolean or it could be a string representation of a boolean value.


Well they're talking about JavaScript for one thing.

You're talking about JavaScript, so everything already went wrong.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.
:barf:

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

VikingofRock posted:

Also I think foo() in your example returns a const char[] instead of a std::string. Not sure if that's better or not; probably depends on the scenario.

const char*

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

boo_radley posted:

I'd rather use midi to manage my infrastructure than JavaScript.

I legitimately don't know the use case for node or understand why anyone would want it or decide it was a good idea to create.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Hammerite posted:

I'm 30, glad we agree this is bad of Javascript though

They were only 9 years off..

The solution to the problem is to not use JavaScript. It's the solution to all problems with JavaScript.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

ToxicSlurpee posted:

Good luck with that. How much stuff out there is legacy stuff heavy on ancient Javascript that nobody wants to pay to replace?

I mean worst case I can go write mumps for a medical device company. At least it isn't JavaScript..

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Internet Janitor posted:

Just to clarify here are you advocating the use of a bespoke language which compiles into JavaScript or are you advocating the abolishment of web browsers?

While I would prefer the latter (at least for interactive applications), I will accept the former.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Dirty Frank posted:

Are you looking for a dom? ASL?

I thought people looking for the dom wrote JavaScript. :v:

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

VikingofRock posted:

What about for special casing to avoid dividing by zero?

Don't you end up missing dividing by -0 then?

Adbot
ADBOT LOVES YOU

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Internet Janitor posted:

For that matter, enumerations. A distressing number of languages allow enumerations to decompose into integers and of those quite a few also allow integers to suffice as the enumeration value. The point of an enumeration is to restrict and make explicit a limited set of values which are acceptable inputs to something. If you allow coercions you completely defeat the point.

Explicit conversions make it easy to serialize enums, and are totally sensible. Implicit conversion is potentially bad though.

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