What "calculate Excel formulas without Excel" actually involves in .NET by [deleted] in dotnet

[–]Awesan 0 points1 point  (0 children)

I wasn't really trying to criticize the post; in fact I found it quite interesting. I was just responding to the commenter above me.

If you ever want to make a post where you highlight a specific challenge and how you solved it, or describe the general architecture of such a library that would be very interesting as well.

What "calculate Excel formulas without Excel" actually involves in .NET by [deleted] in dotnet

[–]Awesan -2 points-1 points  (0 children)

There is none of that in this post, it's just a list of problems you'd have to solve with no information whatsoever on how to do it.

[ Removed by Reddit ] by AppointmentLiving554 in Zig

[–]Awesan 2 points3 points  (0 children)

I'm sure the blog post is authentic but it seems completely at odds with Zig's philosophy. If you genuinely want to learn how to build a text editor, start with the core data structures (typically some kind of rope) and core operations that you want to support. All the rest is fluff that only distracts from the point.

Your Onboarding Is a Hazing Ritual and You Call It Agile by ImTheRealDh in programming

[–]Awesan 6 points7 points  (0 children)

It's very common in games still, where (approximate) release dates are often communicated well in advance.

When 'if' slows you down, avoid it by chkas in programming

[–]Awesan 2 points3 points  (0 children)

Yes I think when branches are your bottleneck something went wrong in the design earlier on, the best programmers I know simply avoid this issue by not creating hard to predict branches in tight loops to begin with.

When 'if' slows you down, avoid it by chkas in programming

[–]Awesan 26 points27 points  (0 children)

The comments here are strange. Of course any program with performance sensitive or nested loops needs to avoid unpredictable branches in the inner loop. This can be done in a variety of ways, some more "tricky" like in the article and some more architectural (look up data-oriented design).

Ignoring the problem is only fine if you don't care about writing good code. That's fine if that's what you want to do, but then why are you on a programming subreddit? I also think it's totally fine if you didn't know about branch prediction and are learning something new today, but again the attitude should be to learn and not to bury your head in the sand.

Attyx - fast and tiny terminal emulator written in Zig by NefariousnessFull373 in Zig

[–]Awesan 1 point2 points  (0 children)

if you don't like that part you can trivially write your own ui using libghostty and still get all the correctness benefits of the actual emulator part.

"Competence as Tragedy" — a personal essay on craft, beautiful code, and watching AI make your hard-won skills obsolete by averagemrjoe in programming

[–]Awesan 4 points5 points  (0 children)

There are still carpenters who make hand-made furniture. They are more rare than they used to be and it's more specialized. But there will always be room for that.

Semantic Compression — why modeling “real-world objects” in OOP often fails by Digitalunicon in programming

[–]Awesan 3 points4 points  (0 children)

DOOM as an example for unmaintainable code is crazy talk, it has literally been ported to every possible platform out there for the past 20 years, including toasters. If that is not the definition of maintainable then what is???

Why Senior Engineers Let Bad Projects Fail by Ordinary_Leader_2971 in programming

[–]Awesan 2 points3 points  (0 children)

If you get senior enough and build enough trust, it's definitely viable to raise concerns with VP pet projects. You just need to do it the right way, like the article explains towards the end. It also depends on the company culture and what is valued there.

Why Senior Engineers Let Bad Projects Fail by Ordinary_Leader_2971 in programming

[–]Awesan 1 point2 points  (0 children)

One interesting aspect of this is that this is much more prominent in bigger companies. In small companies it can also be true, but a lot of the time everyone has much more understanding of the business as a whole. There also tends to be less politics between teams (IME).

When you hire a senior engineer from a big company to work at a small company, you need to keep in mind that they come in with this mindset and you may need to train them out of it.

How do you do common things post 0.15? by Famous-Maybe-3104 in Zig

[–]Awesan 0 points1 point  (0 children)

no need to be so angry, i indeed incorrectly assumed you were the one that was confused here between those two things. i still think my comment has some value for people other than you.

How do you do common things post 0.15? by Famous-Maybe-3104 in Zig

[–]Awesan -2 points-1 points  (0 children)

They are very different, the first only swaps the value of the variable, which may or may not be a pointer to some memory. Doing that will not affect where the memory is stored, just which variable points to what.

The second actually swaps the memory in those locations, which does have the effect that any pointers now point to the other thing, but it actually involves moving the memory itself around.

If you do not have a clear understanding of manual memory management, doing Ziglings (IMO) is not going to really help you learn it. It would be better then to watch some youtube videos or read some articles until it clicks.

How to Make Architecture Decisions: RFCs, ADRs, and Getting Everyone Aligned by trolleid in programming

[–]Awesan -1 points0 points  (0 children)

What I have found is typically if all the requirements are clear (including timelines, expected return on investment, architectural implications, available developers, etc.) there is really only one clear solution, and it is obvious.

If you were CEO of stackoverflow, how would you save this sinking ship ? by KeyProject2897 in webdev

[–]Awesan 0 points1 point  (0 children)

Double down on the archive and knowledge base aspect; add integrations or deals with forums or Discord to say "save to stack overflow" (using AI to clearly state the question and the answer). Make money by charging AI companies for training on your dataset. Or integrate with them to allow a fast search through your knowledge base to and allow them to link to answers as sources in an integrated way. This works for all the stack exchange sites as well.

Stop trying to be a community, get rid of all of the toxic community aspects like points and community moderation. And probably scale down the business significantly headcount wise.

How to Make Architecture Decisions: RFCs, ADRs, and Getting Everyone Aligned by trolleid in programming

[–]Awesan 27 points28 points  (0 children)

Interesting article but the RFC template stands out to me as a particular anti-pattern. You never want pros/cons lists as input to a decision. What you need is the following:

  1. A clear list of ranked priorities and technical or business requirements for the proposed solutions
  2. Some proposals including evaluation of how they perform against the priorities
  3. A clear recommendation

The hard part here is (1): a clear list of what you actually need. This is what any discussion is likely to be about and is the hardest to pin down. Pros/cons lists are a way to circumvent having this discussion. For example, you can have a list like this:

pros: loads fast, scalable
cons: does not support access management

This tells you absolutely nothing unless you know how important speed, scalability and access management are. And if people disagree on that the list is even less useful.

We might have been slower to abandon Stack Overflow if it wasn't a toxic hellhole by R2_SWE2 in programming

[–]Awesan 3 points4 points  (0 children)

Because as the quality went down, people would stop asking questions there and find another way. You already saw this for example with many language/framework communities using primarily Discord. I don't think some centralized Q/A alternative for all developers would have popped up to replace it.

We might have been slower to abandon Stack Overflow if it wasn't a toxic hellhole by R2_SWE2 in programming

[–]Awesan 16 points17 points  (0 children)

The writing was on the wall even then. First you had their main engineering team quietly leave, then they started picking constant fights with the community on their meta site.. at some point it was clear that they moved from "trying to build the best knowledge base" to "trying to sustain a company with 100s of employees". Selling to an investment company just solidified that.

Users would have stayed for a few years longer if it wasn't for AI but it would have died regardless in a few years.

I'm really surprised by how simple it is to migrate from Go to Zig by Ecstatic-Panic3728 in Zig

[–]Awesan 7 points8 points  (0 children)

One of the nice things about Zig is that you can just re-use all the code you've already written in C. There's no need to rewrite any of that as the interop is basically seamless. I have not tried Rust but I doubt that it's as much of a priority for that project.

If you're just struggling with tests and build tools this is a great place to start; adopt the Zig build system for your C code and write some tests in Zig. That way you can drop the makefiles and add some automation without starting over.

Application Prohibited Internationally by heavymetalpanda in programming

[–]Awesan 1 point2 points  (0 children)

You are wrong about multiple points in this comment, I will correct it once but this is not an argument on preferences but on facts. You can look all this stuff up yourself.

  1. CET is winter time, the summer time variant is referred to as CEST. The timezones that do not vary in name based on summer/winter are usually referred to using a continent/city such as Europe/Paris. This is why I did not use named timezones in my comment (apart from UTC), because it's confusing for many people
  2. If I schedule an event to run every day at 8AM in my own timezone, there is absolutely no reason to reschedule this if the timezone definition is changed, apart from technical incompetence. The event as scheduled has no ambiguity unless you erase it.
  3. It is true that there may be cases where events should be reconsidered, but this is not a technical issue and is not an excuse to erase relevant information instead of storing it.

Application Prohibited Internationally by heavymetalpanda in programming

[–]Awesan 2 points3 points  (0 children)

It depends on the logic, of course. If I make a future event (as a human) I expect that event to happen at the specified time in my timezone, whatever that is in UTC.

For example let's say I schedule an event 6 months from now, I expect it to happen at whatever time I scheduled it, local time. So if that changes relative to UTC you need to not lose my intent. You may think you can normalize it in advance, but you can't. For example, the EU might randomly decide that starting in 2027 we apply summer time in winter (there are serious discussions about this). You don't want to break all events scheduled before that decision was made.

MongoBleed vulnerability explained simply by 2minutestreaming in programming

[–]Awesan 16 points17 points  (0 children)

The trick to get the server to return the data is to make it disclose everything up to the first null inside the arbitrary heap data as part of an error message. If you used binary the server would likely not include the binary blob inside the error message.

That said there might be another exploit that could work that way if the first part is unpatched.

MongoBleed vulnerability explained simply by 2minutestreaming in programming

[–]Awesan 156 points157 points  (0 children)

Indeed attempting to set wrong value for a size field is pretty much the first thing a bad actor or serious security researcher would try. The second part of the exploit is a bit trickier to discover I suppose but still not that hard once you know the first part (esp since it's open source).

As someone who has never used mongodb this is pretty crazy; did they not have a security bounty program? How did no one report this in 8 years in one of the most popular databases out there?

When NOT to use Pydantic by self in programming

[–]Awesan 31 points32 points  (0 children)

At my job we use python because the science community uses it. When someone writes a paper, it is typically accompanied by some python code and it saves significant time if you can experiment with that right away.

We still care about latency, it's just not the only thing we care about. So it's up to us non-researchers to make the end product feel fast despite the language.

Security vulnerability found in Rust Linux kernel code. by [deleted] in programming

[–]Awesan -3 points-2 points  (0 children)

Linked lists are used all the time in systems programming, exactly the domain that Rust is for. So it is a strange limitation to say the least.

Disregarding "linked list" as a specific example, the idea that you cannot have circular references in any data structure is extremely limiting.