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
redleader
Aug 18, 2005

Engage according to operational parameters

go play outside Skyler posted:

look at me! i'm doing something ridiculously stupid in a dynamically typed programming language and expecting the results to have any meaning at all!

seriously though if you're doing this in JS you deserve any shitstorm that comes your way.

i don't see why it's unreasonable to expect object identities to matter when using objects as keys

Adbot
ADBOT LOVES YOU

redleader
Aug 18, 2005

Engage according to operational parameters

Blinkz0rz posted:

js's objects are keyed off strings and always have been. if you try to use an object as a key js just does obj.toString() which comes out as "[object Object]". why is that weird or unexpected behavior?

terrible programmer confession, but i actually didn't know that js turned everything into strings when using the values as keys

redleader
Aug 18, 2005

Engage according to operational parameters

Blinkz0rz posted:

tbf that's mainly because of browser wars

i unno, i don't think we can blame the bower/gulp/grunt/webpack/etc/whatever situation on ie6

redleader
Aug 18, 2005

Engage according to operational parameters

go play outside Skyler posted:

what's wrong with bower/grunt? have you heard of gnu automake? autoconf? how about nuget packages?

to me these tools are just a sign of the js language finally becoming something serious instead of just a bunch of script kiddies copying/pasting a "NO RIGHT CLICK" one-liner

it's not the tools, it's the sheer and absurd amount of tool churn

redleader
Aug 18, 2005

Engage according to operational parameters
days, actual days of developer time wasted over a bug. probably 4 or 5 poor, wretched souls throwing away hours of their lives on this thing

all ultimately due to some fucklord who buried an empty catch block in a rarely used overload of a method. this code is about 10 years old and the only reason i don't suspect active malicious intent is because i've seen what else this person has done

redleader
Aug 18, 2005

Engage according to operational parameters

Powerful Two-Hander posted:

did it at least have \\TODO: should probably do something with this error?

edit: i once stumbled across a genuine stack overflow because some doofus had put a logger call into the catch block that got hit if the logger failed

nope. it was (whitespace and all):
C# code:

string result = "";
try {
    result = Lomarf();
} catch {
} finally {
    // dispose of something
}
return result;

like they were ashamed of that catch, as they loving well should be

the kicker is that it's an overload to a frequently used method (which actually propagates exceptions). everywhere this stupid overload is called is surrounded by try...catch {log()} which make it look like it does the right thing. of course, nothing was in the logs, so a bunch of people went barking up the wrong tree for quite a while. this has been masking the root cause of a baffling bug for about a year

redleader
Aug 18, 2005

Engage according to operational parameters
the cool thing about IDisposable is seeing people copy and paste the same lovely, unnecessary boilerplate. nothin like seeing a call to GC.SuppressFinalize in a class with an empty finalizer (or even better: no finalizer!)

the c# team are definitely aware of IDisposable's shortcomings - there's a proposal out for destructible types with deterministic destruction. this would also introduce the notion of explicit ownership into c#, as only one thing can hold on to a reference to a destructible type. there'd be a move keyword to allow transferring ownership around

redleader
Aug 18, 2005

Engage according to operational parameters

Bloody posted:

linq is banned at epic, because of course it is

goddrat son

are generics banned? they should be, as they cause unnecessary increases in code size, and decrease performance due to jit compilation and more pressure on cpu caches and whatnot

redleader
Aug 18, 2005

Engage according to operational parameters

jony neuemonic posted:

yeah, i keep vs code around because it's a fine enough way to edit sql or config files and because i occasionally have to touch classic asp (i know) and there's an alright plugin for it.

ssms or bust imo

redleader
Aug 18, 2005

Engage according to operational parameters

go play outside Skyler posted:

1. no matter what bullshit microsoft says, it's not that open and the really cool stuff like wpf will never be ported
...
3. i've seen a lot of non-free libraries with absolutely 0 alternative. never bumped into that with node

he's right about these

redleader
Aug 18, 2005

Engage according to operational parameters

Pie Colony posted:

it's ridiculous that these are the things that your certification tests. i cannot imagine a programmer that knows the JS type coercion minutiae and then chooses to write code utilizing it. but then again i don't really work with many JS programmers

only people who completely bomb the type coercion part of the certification should be allowed to pass, as they'll be the ones who avoid js type fuckery at all costs. anyone who does well will only try to use their knowledge to (perhaps inadvertently) write completely opaque and awful code that relies on deep knowledge of js' obscure coercion edge cases

redleader
Aug 18, 2005

Engage according to operational parameters
lol if you don't regularly dump multi-thousand line changes that touch all over the codebase directly to trunk

redleader
Aug 18, 2005

Engage according to operational parameters
we don't do
- branches
- feature flags
- automated testing
- a hell of a lot of manual testing
- dev/uat/staging environments (usually)

we're still in business because most developments don't touch anywhere near the same code, because we actually do code review, and because our competitors are somehow worse

redleader
Aug 18, 2005

Engage according to operational parameters
vue is just a 2016 knockout knockoff

redleader
Aug 18, 2005

Engage according to operational parameters

nern posted:

FS, the programming language at the core of meditech's more current software. the language consists of lists and two letter functions, basically. like @Wb - write body of window. there are tons of functions. and the documentation is terrible. and they often don't make sense intuitively and you can't name your code members (methods, basically) they are numbered 0 and up, so if you were to add one in the rest get renumbered and all your references are hosed.

never thought i'd say this, but i think i'd rather use mumps

redleader
Aug 18, 2005

Engage according to operational parameters
what i'm getting from this thread is that the medical software industry is hella exploitative of people trying to break into dev roles

redleader
Aug 18, 2005

Engage according to operational parameters

Plorkyeran posted:

you can't meaningfully implement a b+ tree in a language that doesn't give you any control over memory layout. you can write all of the algorithms and such, but if the end result doesn't have your leaves in contiguous blocks of memory it's all sort of pointless

i'm sure some fucker can and has done something like this with typed arrays

redleader
Aug 18, 2005

Engage according to operational parameters

jony neuemonic posted:

imo typescript syntax has some advantages over c#, especially the type declarations. "foo: string" beats "string foo" any day and the latter only exists to not scare the java programmers.

but what about tabs/spaces?!?

redleader
Aug 18, 2005

Engage according to operational parameters
and then host that container in the cloud!

redleader
Aug 18, 2005

Engage according to operational parameters

raminasi posted:

unless i'm misreading (and i very well may be) y'all are getting confused by the totally reasonable intuition that remove_if actually removes things from the container

it does not

ok what

redleader
Aug 18, 2005

Engage according to operational parameters
so it prints 2 4 6 8 and absolutely fuckin destroys the original array? neato

i'm terrified by what it could/would do to a more elaborate data structure

i'm sure there's a really good and graybeardy reason for this, but holy poo poo give me a well-behaved, intuitive, modern lang any day

redleader
Aug 18, 2005

Engage according to operational parameters
on the topic of modern langs, here's a summary of the new features in c# 7

tuples will be nice to have. everything else strikes me as being pretty niche or situational from initial impressions

redleader
Aug 18, 2005

Engage according to operational parameters

Flat Daddy posted:

with react and redux, a spa ends up being easier to write than hacked together jquery poo poo. and you can render every route on the server-side so you dont even lose anything.

don't you need to use nodejs for server side rendering though? seems to me like a bit of a dealbreaker, although i guess it's not an issue if you're already into huffing js farts

redleader
Aug 18, 2005

Engage according to operational parameters
yeah, the problem with sprocs is that they make it so easy to use vendor-specific features

we're stuck with mssql forever since we have an assload of procs that depend heavily on tsql syntax and features. it doesn't help that our business logic lives almost entirely in the db

redleader
Aug 18, 2005

Engage according to operational parameters

leper khan posted:

it's not really a debatable topic; the spec says something or it doesn't. C++ does not allow it.

i'm not sure what 'shall not be used' means in the context of the c++ spec, but implementation-defined is not undefined so it might be cool sometimes?

redleader
Aug 18, 2005

Engage according to operational parameters
whoops i just wasted minutes of my life on this planet trying to find what the c++ spec means by "ill-formed" for some reason

redleader
Aug 18, 2005

Engage according to operational parameters

toiletbrush posted:

I used to write an extension method on IEnumerable to add an '.each(...)' method but whenever I did I had a spidey sense tingle that it was a bad thing to do - partially because if it didn't already exist it was probably for a good reason, and also because the fact it didn't return anything meant it had to be causing side effects (not that calling that out is a bad thing). Then a developer joined the team who was much better than me and said 'dont do that' and sort of confirmed my spidey sense.

I'm not totally convinced though so I still do it in Swift :hehe:

c# hero eric lippert has written about why there isn't an IEnumerable.ForEach() method in the standard library - as you say, it basically boils down to "side effects"

redleader
Aug 18, 2005

Engage according to operational parameters
there must be at least some situations where a compiler could detect an ill-formed program and bail out - perhaps e.g. if someone tries to call main()?

redleader
Aug 18, 2005

Engage according to operational parameters
hackbunny have you ever worked for microsoft, and if not why not? i'm pretty sure you know more about low level windows than most people who actively work on windows. i mean, your breadth and depth of knowledge on win32 is frankly amazing

redleader
Aug 18, 2005

Engage according to operational parameters
the cloud keeps getting more ridiculous

redleader
Aug 18, 2005

Engage according to operational parameters
recursion? uh, this is the terrible programmer thread

redleader
Aug 18, 2005

Engage according to operational parameters

Xarn posted:

Thats what I am doing, but first I gotta unravel this mess.

--- edit ---
There are also 5 more similar collections in that class and that is after I split the original monster class into 3 logical units that aren't overly interconnected. :v:

how long until you get pulled up for spending time refactoring instead of hacking new features x, y and z in?

redleader
Aug 18, 2005

Engage according to operational parameters
c++'s const correctness stuff seems pretty cool on the surface

redleader
Aug 18, 2005

Engage according to operational parameters
i used recursion once, to merge two xml documents. the code was, needless to say, very bad. took me a while to get it right too

i am a v. terrible programmer

redleader
Aug 18, 2005

Engage according to operational parameters
i should probably learn some of those basic cs algorithms lol

redleader
Aug 18, 2005

Engage according to operational parameters
it kinda seems that "basic cs knowledge" would be something of a prerequisite for any interesting/challenging/novel work

but then i remember where i live and the dearth of any jobs like that and go back to my usual state of ennui

redleader
Aug 18, 2005

Engage according to operational parameters
here's a whole lotta words by a proper sql server graybeard on options for implementing dynamic searches

redleader
Aug 18, 2005

Engage according to operational parameters
i know that vue.js (think knockout, but in 2016!) supports react-style server-side rendering. there's a third-party thing that allows server-side rendering in asp.net iirc

redleader
Aug 18, 2005

Engage according to operational parameters
trigger warning: front-end javascript frameworks

Adbot
ADBOT LOVES YOU

redleader
Aug 18, 2005

Engage according to operational parameters

Flat Daddy posted:

I couldn't put my finger on it but I just realized what's so bad about this codebase I inherited.

they didn't know how to do callback passing style in js, so every async function has a side effect to modify a $scope var

then as a dug around I realized that even worse, none of the non-async functions they wrote even return values. again, all of them have a side effect modifying some variable. the only places 'return' is used are where they copy and pasted code from SO on how to use 3rd party libraries

:eyepop:

  • Locked thread