RonSijm

joined 1 year ago
[–] [email protected] 22 points 7 months ago (1 children)

Rebasing is for noobs.

git reset head~42
git push -f
[–] [email protected] 50 points 7 months ago (4 children)

"OS support: The latest one” is not that bad of an requirement...

If they complain like "why doesn't this work on Windows Vista, on IE8" - you can just point to the specs and say you only support the latest OS.

So basically you only support the latest Nightly Build of Ubuntu, since that's the current latest OS

[–] [email protected] 8 points 7 months ago

On the other hand, when my IDE doesn't tell me:

Build Server: "BUILD FAILED! SonarQube says that Roslyn says that you're not using one of your variables!"

Yea okay calm down, and why are you snitching now, Roslyn? Should have told me directly 🙃

[–] [email protected] 4 points 7 months ago

You'd probably use a different approach for that. Like you'd make your program dynamically load all the .dlls in a "plugins" folder -

Then you'd provide some plugin interface for the users to create plugins, for example:

public interface IImageEditorPlugin
{
    public void BeforeImageEdit(int[,] imageData);
    public void AfterImageEdit(int[,] imageData);
}

And then you can load plugin classes from all the dlls with dependency injection, and execute them though something like this:

public class ImageEditor(IEnumerable plugins)
{
    public void EditImage(int[,] imageData)
    {
        foreach (var imageEditorPlugin in plugins)
        {
            imageEditorPlugin.BeforeImageEdit(imageData);
            // Do internal image edit function
            imageEditorPlugin.AfterImageEdit(imageData);
        }
    }
}

This is a very simple example obviously, normally you'd send more meta-data to the plugins, or have multiple different interfaces depending on the kinda plugin it is, or have some methods to ask plugins when they're suitable to be used. But this way a user can provide compiled versions of their plugins (in the same language as the core application) - instead of having to provide something like lua scripts

[–] [email protected] 16 points 7 months ago* (last edited 7 months ago) (9 children)

Extension functions are not the same at all. Extension functions are syntactic sugar. For example if you have an extension function like

public static class ObjectExtension
{
    public static void DoSomething(this object input) { }
}

You can call that function on an object by doing object.DoSomething() - Yes. But underneath it's the same as doing ObjectExtension.DoSomething(object)

That function does not actually become part of the object, and you can't use it to override existing functions

A closer example of how to do something similar in a memory safe language would be - in C# - using something like Castle DynamicProxy - where through a lot of black magic - you can create a DynamicProxy and fool the CLR into thinking it's talking to an object, while it's actually talking to a DynamicProxy instead. And so then you can actually intercept invocations to existing methods and overrule them

Generally overruling existing functions at runtime is not that easy

[–] [email protected] 125 points 8 months ago (5 children)

StackOverflow: Question closed as duplicate. Someone else already asked whether or not something is a nut.

[–] [email protected] 1 points 8 months ago* (last edited 8 months ago)

Hahaha that’s what frontend devs think

Hahah, well as a primarily backend developer, that's what I think as well.

“Just make this button work”

If that button doesn't work, that sounds like a frontend problem to me.. ;)

But yea, as you mentioned, it probably comes down to experience. As the meme from this post depicts. When I dabble in frontend and make a WinForm for my devtool, people just look at me and are like "Uhhh, can you make it better?"

No sir, clearly I can not. And I have no idea what you mean with "better".

[–] [email protected] 5 points 8 months ago (2 children)

Yea, fair enough. My point was mostly: backend requirements are usually at least objective. "Json xml comes in", "CSV goes out by email", "The request must be processed under 100 ms", "API should not return 400 on feetpics" - these are still mostly objective requirements.

Frontend requirements can be very subjective "The user should have a great user experience with the frontend"

[–] [email protected] 111 points 8 months ago (26 children)

Backend Requirements: "When x,y goes in, I want x+y to come out!" - Okay

Frontend Requirements: "Well it needs to be more user-friendly, and have this rockstar wow effect" - Yea wtf are you even talking about? You want me to add random glitter explosions, because I found a script for that, that's pretty 'wow effect' right?

[–] [email protected] 4 points 8 months ago

What if you do it ironically? Like calling yourself a Code Ninja Jedi 10x Rockstar 🚀?

[–] [email protected] -4 points 9 months ago (4 children)

Ok, sure. So in a tech race, if energy is a bottleneck - and we'd be pouring $7tn into tech here - don't you think some of the improvements would be to Power usage effectiveness (PUE) - or a better Compute per Power Ratio?

[–] [email protected] 1 points 9 months ago

What benefits to “AI supremacy” are there?

I wasn't saying there was any, I was saying there are benefits to the race towards it.

In the sense of - If you could pick any subject that world governments would be in a war about - "the first to the moon", "the first nuclear" or "first hydrogen bomb", or "the best tank" - or "the fastest stealth air-bomber"

I think if you picked a "tech war" (AI in this case) - Practically a race of who could build the lowest nm fabs, fastest hardware, and best algorithms - at least you end up with innovations that are useful

view more: ‹ prev next ›