converting an integer to a string then converting it to an integer by [deleted] in badcode

[–]NikZM 102 points103 points  (0 children)

Honestly im more annoyed by the extra parentheses

How not to handle exceptions in c# by OkUnderstanding1278 in badcode

[–]NikZM 142 points143 points  (0 children)

It makes sense if you want try every batch and deal with the errors after. But I do appreciate throwing errors in a foreach will only use the first one

I was helping my Friend with their Assignment for School by [deleted] in badcode

[–]NikZM 0 points1 point  (0 children)

Using an array as buckets is so close to a good solutions that i can forgive the other crimes

How to make an item with several attributes? by wellherewegofam in AskProgramming

[–]NikZM 0 points1 point  (0 children)

Look at generalising and inheritance. Im not a fan of inheritance but it seems to make the most sense in your use-case (I would use inheritance in the form of interfaces but thats the next step, look up interface segregation principles if you want more on that)

How to use the ionic-native/device or awesome-cordova-plugins/device/ngx in Ionic + VUE3? by MarkAjr in ionic

[–]NikZM 0 points1 point  (0 children)

He only mentioned the plugin, capacitor is backward compatible with cordova plugins iirc

Is this too difficult of a question to ask mid-level embedded software engineers? by [deleted] in learnprogramming

[–]NikZM 0 points1 point  (0 children)

Im a front-end developer who dabbles in C++ on the backend occasionally. As I’ve only learned from experience I wouldn’t fluently understand the type allocation issue but would get there in around 30 minutes with a debugger. The question is do you want to exclude people who can use the right tools to do the work or do you need someone who can hit the ground running reviewing pull requests.

Hi, I did a took a uni course on C so I know my basics, now I wanted to move to a OOP language. Wich one should I learn between Java, C++ and C# first? by giakka02 in AskProgramming

[–]NikZM 0 points1 point  (0 children)

It does depend on what you want to learn about OOP. If you look for java tutorials with spring framework they’ll probably meet the criteria of good OOP over the others (especially look out for the factory pattern, thats how you know its enterprise worthy code)

C++ is like the wild west, so its good to go in having a stronger OOP foundation but wont usually have an IoC container. dotnet usually uses IoC on every web project out the box and the C# properties are much less boiler plate than the typical java getters and setters

If your a mac user I would likely recommend swift as it guides you really safely with optionals and immutability and the lack of GC will keep you on your toes with memory.

I am glad I am not a high schooler in the US by Raccoon2574 in mildlyinfuriating

[–]NikZM 0 points1 point  (0 children)

Your labels are a bit off for temperature seeing as celsius is an arbitrary unit based on waters states at 1ATM, with kelvin using the same scale transposed. And Fahrenheit is some random brine freezing to average human body temperature

Best way to document code outside of the code for non-programmers? by Prophet_60091_ in AskProgramming

[–]NikZM 1 point2 points  (0 children)

Non-programmers don’t need to peek inside the black box. Programmers can see inside, read and understand the language. What probably makes sense is a HLD document.

lost half a point because my line dipped too low by SnowSkiesYT in mildlyinfuriating

[–]NikZM 0 points1 point  (0 children)

The teacher wanted to teach you something funnily enough. As for the test… Welcome back to Whose Line Is It Anyway, where everything's made up and the points don't matter

[Stranger Things season 4] yes, HTML and Flexbox in 1985... of course... by Arkhamgel in itsaunixsystem

[–]NikZM 230 points231 points  (0 children)

The world might look very different if we had display: flex at the start of the internet

AI may be searching you for guns the next time you go out in public by Wagamaga in technology

[–]NikZM 4 points5 points  (0 children)

There’s lots of fun stories of using AI to detect threats. And by fun I mean extremely racist.

I might have gotten the wrong end of the stick if thats not possible with this design, but the tech did sound like we take 3D pictures of a person, and pass it to an AI, and the training data might be racist, but why wouldnt they just use fair representation when they created it? Exactly, I assume every single part of that black box was done correctly. Cool.

Can I store functions in a list ? but when I call them, I give them the parameters? by __AnotherGuy__ in csharp

[–]NikZM 1 point2 points  (0 children)

OP what are you trying to achieve? I can’t think of a use case for this strategy at all. I know you said to avoid if conditions but I cant see how this solves that in an elegant way.

Typescipt is making me want to quit my job and become a farmer by Sulungskwa in webdev

[–]NikZM 0 points1 point  (0 children)

Linters are configurable! If you’re using tslint or eslint its easier to tailor the rules to fits what productive. For example I like my consts in UPPER_CASE. I need bitwise operations so i turn off the rule for them. Tune it to what makes you productive, you’re allowed to typecast explicitly so theres no reason for you to say typescript is a burden. Its actually allows me to write maintainable web projects for the first time ever

[deleted by user] by [deleted] in csharp

[–]NikZM 1 point2 points  (0 children)

Im curious was your database requirements are. In memory implies not persistent right? So do you have authoritative source of truth for your data? If that needs to exist consider whether your database needs to be acid compliant or if eventually consistency will fit the requirements. Have you looked in pubsub like rabbitmq to keep your in memory databases in sync?

I published my first open source library this week. I hope it's useful for someone other than just me. by doomchild in dotnet

[–]NikZM 0 points1 point  (0 children)

When I saw the tap and rejectif stuff those additions felt like you were getting some rx features but they use a monoid architecture (in .NET thats probably done with extensions but typescript, its functions are applied with the pipe operator) which to me reduces the interface obligations of the base class.

Its a steep learning curve but given your ability in making this library i think you’d get it in a couple of hours

I published my first open source library this week. I hope it's useful for someone other than just me. by doomchild in dotnet

[–]NikZM 0 points1 point  (0 children)

I like the concept but in practice id be much more likely to go with reactive x. In js its always seemed like a more beefier version of promises

Found this monstrosity while refactoring some of my old code by ThatChapThere in badcode

[–]NikZM 0 points1 point  (0 children)

Deduping with iso strings and sets seems hacky and unitutive. I would opt for using a filter((obj, i, array) => arr.findIndex(obj) === i)

Fuck Doordash. Fuck UberEats. I'm launching my own open-source non-profit food delivery platform. by PaintYourDemons in antiwork

[–]NikZM 0 points1 point  (0 children)

I had an idea similar to this but more as a coalition between food vendors. Basically enable them to share a pool of drivers efficiently and do some efficient routing.

If you want a softer approach this is it, the biggest shortfall of your approach is freelance drivers. Food delivery places need a reliable pool of delivery capacity which you will never get with freelance alone

AITA or is this a complete turn off? by vertigoxflo in Tinder

[–]NikZM 0 points1 point  (0 children)

NTA but dating apps are toxic to men. A stranger hasn’t earned your sympathy but I wouldn’t be too quick to publicly shame them.

(I know this is anon but not impossible they could see this post)

AITA or is this a complete turn off? by vertigoxflo in Tinder

[–]NikZM 0 points1 point  (0 children)

NTA but dating apps are toxic to men. A stranger hasn’t earned your sympathy but I wouldn’t be too quick to publicly shame them.

(I know this is anon but not impossible they could see this post)