Thread regarding SAS Institute layoffs

Learn asymptotic runtime with me

Why are so many SAS developers struggling with asymptotic runtime? Time to fix this gaping hole in your knowledge before you deploy yet another catastrophic O(n²) disaster to prod. Listen closely and I'll break it down into tiny, digestible pieces so you can finally comprehend this.

Asymptotic runtime is a mathematical framework used to describe how an algorithm's execution time changes as the input size (which we call n) grows toward infinity.

Note that I said infinity, not "ten items from your local test database."

We don't count actual seconds or milliseconds. Why? Because your slow, outdated laptop will run code differently than a high performance server. Measuring seconds is for amateurs. Professionals look at the growth rate of operations. We look at how the algorithm scales when the data gets massive.

There are three symbols you need to know.

Big O (O): This is the upper bound. It's the absolute worst case scenario. It guarantees that your code will never, ever perform worse than this curve. Since your code likely runs terribly, you'll spend most of your time dealing with this one.

Big Omega (Ω): This is the lower bound. It represents the best case scenario. It's the absolute minimum number of operations required.

Big Theta (Θ): This is the tight bound. We only use this when the best case and worst case growth rates are exactly the same. It means the runtime is perfectly sandwiched between two constant factors.

When analyzing runtime, we completely ignore constants and lower order terms. Why? Because when n is one billion, adding 5 or multiplying by 2 does not matter. Only the highest power of n matters.

Here's the hierarchy of efficiency, ordered from best to worst. Try to memorize it so you can stop writing terrible code:

O(1) - constant time, the gold standard. The input could be five items or five billion items; the algorithm takes the exact same number of steps. An example is looking up an element in an array by its index. It's instant. It's flawless. It's everything your code isn't.

O(log n) - logarithmic time, highly efficient. Every time the algorithm takes a step, it cuts the remaining problem size in half. Think of binary search. Even if you search through a billion sorted items, it takes a maximum of around 30 steps.

O(n) - linear time, acceptable, but uninspired. The time grows in direct proportion to the input size. If you double the data, you double the time. This is what happens when you use a simple loop to scan through an unsorted list from start to finish.

O(n log n) - linearithmic time, the standard for any decent sorting algorithm, like merge sort or quick sort, the absolute best we can do for comparison based sorting.

O(n²) - quadratic time, this is where we enter the danger zone. If you double the input size, the execution time quadruples. You usually achieve this embarrassment by nesting a loop inside another loop because you didn't know how to utilize a hash map.

O(2^n) - exponential time, complete and utter failure. The operations double with every single item you add. If n hits 50, your program will literally outlive the universe.

If you only ever write code that processes a list of ten users, you can ignore all of this and keep writing your sloppy nested loops.But the moment your data scales to millions of users, an O(n²) algorithm will lock up the CPU, crash the server, and force your manager to ask why you didn't learn this in school. Asymptotic runtime allows you to predict these catastrophic bottlenecks before they happen, independent of hardware.

Next I probably need to show you how to analyze a nested loop or how to identify a constant-time operation...


by
| 940 views | | 12 replies (last ) | Reply
Post ID: @OP+1kw84bs8y

12 replies (most recent on top)

“HR makes the decisions… They have historically laid off employees that were experts in their work, leaving teams that had no idea how to continue…”

This happened to my team. We experienced 100% turnover — everyone except the manager.

We replaced three Principal Developers with three Juniors — because that was HR policy. You can guess how that turned out.

HR can’t tell the difference between competence and incompetence. That is not their job.

Their job is to cut costs, and that is what they’re doing.

by
| | Reply
Post ID: @kt+1kw84bs8y

why are you ranting about this here? it makes no sense on a layoff board. zip it.

by
| | Reply
Post ID: @kq+1kw84bs8y

Imagine being so awesome that you can write a novel on asymptotic runtime complexity and yet so backwards and technology challenged that you don’t understand that you can get your “message” across in a much more efficient way by simply saying “see https://www.youtube.com/watch?v=u8AprTUkJjM“.

Your delivery mechanism needs a shot ton of performance work. It just doesn’t scale well.

Ironic?

by
| | Reply
Post ID: @kf+1kw84bs8y

Ok buddy, you must have a friend in HR or something. You think you're safe but HR makes the decisions and doesn't seem to care whether the people they let go know what they're doing or not. They have historically laid off employees that were experts in their work, leaving teams that had no idea how to continue it because --surprise-- no real collaboration is happening. But I guess it's okay because even NASA has done the same thing and they're smart, right? Just work on a project for decades that nobody else understands. $$$

by
| | Reply
Post ID: @k3+1kw84bs8y

@hp I’m not @a9 but I think he responded the way he did because of the condescending nature of the poster. Y’all make a lot of assumptions about what people do and don’t know.

This isn’t for the forum for a CS lecture given that audience isn’t even all R&D. And even if it was all R&D the condescending nature in a general vague direction isn’t warranted.

Now if you that person wants to put their money where their mouth is and have a code-off then we’ll see whats what. Otherwise just another condescending anonymous poster who can “teach” a CS class.

by
| | Reply
Post ID: @hx+1kw84bs8y

@a9

braggart? This is taught in intro to programming at any decent university.... it's disappointing that rather than taking the opportunity learn the basics of computer science, you react with hostility.

Little wonder our products are becoming increasingly uncompetitive.

PS: optimal runtime has LITERALLY been one of our key selling points since inception.

by
| | Reply
Post ID: @hp+1kw84bs8y

It is a good job; correct and complete.

I’m wondering how many SAS devs could write such a thing. @OP must be in the top 10%.

by
| | Reply
Post ID: @e5+1kw84bs8y

Good job @OP

Whenever I need technical information this board is always my first stop. /s

by
| | Reply
Post ID: @dr+1kw84bs8y

More importantly, are you down with PvNP?

by
| | Reply
Post ID: @cb+1kw84bs8y

@OP This is a well-written public service. Thank you.

Some developers at SAS do not know this information. But the AIs do.

And developers who cannot code as well as AIs? Those people need to find a different line of work, ASAP.

by
| | Reply
Post ID: @aa+1kw84bs8y

Oh look, another know-it-all dork, spouting AI-addled braggart-B.S.

  • yawn*

Listen, this is a LAYOFF board, not your own Mr. Mic, where you get to unload all of your obsolete-as-a-service SAStrations.

P.S. No one cares.

by
| | Reply
Post ID: @a9+1kw84bs8y

@OP My code runs fine. Flip off. I bet VT has some teaching positions open for you.

by
| | Reply
Post ID: @a2+1kw84bs8y

Post a reply

: