// rewrite this function so it's portable and doesn't use uint128_t
uint64_t lemur64(void) {
static uint128_t s = 2131259787901769494;
return (s *= 15750249268501108917ull) >> 64;
}
In order to do that, you have to have a little computer scientist in you. Stuff like "asynchronous vs. concurrent vs. parallel programming" is the programming equivalent of a liberal arts degree. Who here will rise to meet my challenge? It's only doing a multiply and shift.Software developers aren't paid to write code. They are paid to deliver value.
Your code delivers no value whatsoever. Many masters and PhD thesis are boiled down to a shareable library or even function call. You might feel clever for coming up with it or by knowing some trivia behind it, but ChatGPT can easily spit it out negating all the value you believe you were able to create.
There is no value in something being hard. There is value in delivering value.
I'm fairly sure it's the people that pay our salaries and choose to keep us employed while we do whatever they need to, based on their perception of our output and how the needs of the customers/users are met.
Will ChatGPT and other solutions like that be helpful with the complex, low level stuff? Perhaps, sometimes - depending on how explicit you'll be with your prompts, but more knowledge about what and how to ask will be necessary and even then good results aren't guaranteed per se.
But will they help out a lot of developers with common, well known tasks and problems, for the majority of developers whose job consists of creating a few RESTful endpoints, maybe a database migration and hooking it up to React? I'm inclined to say yes a bit more confidently.
For starters, if you can't argue what is the value then none can fill in the void in your reasoning.
Secondly, software developers have as part of their job description the task of finding solutions to problems. If they find solutions to problems that don't involve or require whatever trick you have in mind, that tells you what is it's value.
Thirdly, did you ever saw any job advert explicitly requiring prior knowledge of any trick you have in mind? Or do you see ads for the ability to solve problems with a pre established software stack?
> who can't multiply and shift t
Tell me, how many open positions have you ever saw whose main ask was "can multiply and shift"? Zero.
> That would be like Google hiring engineers who only got good because they're good at using Google.
No, it would be like Google hiring people without any CS or IT degree who were good at software development but rejecting PhDs who had nothing to offer other than their little trivia on stuff no one cares about.
You know, reality.
The person paying for it with their own money.
We don’t do it because we’re paid for it[0]. If that’s your primary motivation maybe this is the wrong website.
[0] sure, [too] many people are in tech primarily to make money, but it’s a bit sad.
uint64_t lemur64(void) {
static uint64_t a = 2131259787901769494ull;
uint64_t b = 15750249268501108917ull;
uint64_t a_lo = a & 0x00000000ffffffffull;
uint64_t a_hi = a >> 32;
uint64_t b_lo = b & 0x00000000ffffffffull;
uint64_t b_hi = b >> 32;
uint64_t a_x_b_hi = a_hi * b_hi;
uint64_t a_x_b_mid = a_hi * b_lo;
uint64_t b_x_a_mid = b_hi * a_lo;
uint64_t a_x_b_lo = a_lo * b_lo;
uint64_t carry_bit = ((0x00000000ffffffffull & a_x_b_mid) +
(0x00000000ffffffffull & b_x_a_mid) + (a_x_b_lo >> 32)) >>
32;
uint64_t multhi =
a_x_b_hi + (a_x_b_mid >> 32) + (b_x_a_mid >> 32) + carry_bit;
return a = multhi;
}
This bears repeating.
It's important to learn how to deal with asynchronous and concurrent and parallel programming, but it's more important to have a firm grasp of message-passing and event-driven architectures.
Rote learning the computational complexity of obscure algorithms no one uses does not hold a candle to knowing how to write clean and testable code, and design a component to accommodate changes.
This computer science bullshit starts to feel a lot more like an exercise in ladder-pulling than actually prepare and assess an individual's ability to do meaningful work.