programming

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

tranzystorek_io, in AoC Input fetch tool (Rust)
@tranzystorek_io@beehaw.org avatar

Nicely done! I have a CLI tool that does sth similar (input download, answer submissions): github.com/tranzystorekk/arrive

HarkMahlberg, in Big O notation is about what matters when the numbers get big.
@HarkMahlberg@kbin.social avatar

Aren't the most commonly accepted sorting algorithms O(nlog(n))? Quicksort? Mergesort? Those are considered bad?

cawifre,

I mean, it is entirely reasonable that “bad” is the best performance you can hope for while sorting an entire set of generally comparable items.

If you can abuse special knowledge about the data being sorted then you can get better performance with things like radix sort, but in general it just takes a lot of work to compare them all even if you are clever to avoid wasted effort.

Kajo,

Yeah, you’re right, it doesn’t make sense to say that O(f(n)) is good or bad for any algorithm. It must be compared to the complexity of other algorithms which solve the same problem in the same conditions.

duncesplayed,

I mean…yeah. Just because something is provably the best possible thing, doesn’t mean it’s good. Sorting should be avoided if at all possible. (And in many cases, such as with numbers, you can do better than comparison-based sorts)

ericjmorey,
@ericjmorey@programming.dev avatar

The labels are from the perspective of viewing the space of all possible functions of element set size to operations, so they don’t apply to any particular problem an algorithm is attempting to solve (that space is often smaller).

wifienyabledcat, in Big O notation is about what matters when the numbers get big.
@wifienyabledcat@beehaw.org avatar

god i wish i had this image when i was learning algorithms. i always just guessed for some of the exam questions 🙃

luciole, in Big O notation is about what matters when the numbers get big.
@luciole@beehaw.org avatar

There’s some simple rules of thumb that can be inferred from Big O notation. For example, I try to be careful with what I do in nested loops whose number of repetitions will grow with application usage. I might be stepping into O(n^2) territory, this is not the place for database queries.

douglasg14b,

TFW you’re storing 2D and 3D data structures and you read this 😂

luciole,
@luciole@beehaw.org avatar

I don’t see the contradiction. If you’re doing CRUD operations on 10,000 points, I’m sure you’re doing what’s possible to send it to storage in one fell swoop. You most probably get out of those loops any operation that doesn’t need to be repeated as well.

off_brand_, in Big O notation is about what matters when the numbers get big.

Yup, it’s why O(N+10) and even O(2N) are effectively the same as O(N) on your CS homework. Speaking too generally, once you’re dithering over the efficiency of an algorithm processing a 100-item dataset you’ve probably gone too far in weeds. And optimizations can often lead to messy code for not a lot of return.

That’s mostly angled at new grads (or maybe just at me when I first started). You’ve probably got bigger problems to solve than shaving a few ms from the total runtime of your process.

reboot6675,

Just a little nitpicking, O(N+10) and O(2N) are not “effectively” the same as O(N). They are truly the same.

scrubbles, in Big O notation is about what matters when the numbers get big.
@scrubbles@poptalk.scrubbles.tech avatar

This is why I only use bogo sort

ericjmorey,
@ericjmorey@programming.dev avatar

With a small enough data set, bogo sort will perform just as well as an O(1) algorithm for sorting for both ascending and descending order!

mryessir,

O(n)

scrubbles,
@scrubbles@poptalk.scrubbles.tech avatar

That’s using your noodle!

ericjmorey,
@ericjmorey@programming.dev avatar

Use it or lose it, right?

chunkystyles, in Big O notation is about what matters when the numbers get big.

I’ve been wrong about the performance of algorithms on tiny data sets before. It’s always best to test your assumptions.

bl4kers, in "Bot resistant" voting systems?
@bl4kers@beehaw.org avatar

Is there a rating/voting system that exists that is resitant to internet vote tampering?

No, there is not. If there was, it would be well-known and widely used.

Even the U.S. government abandoned e-voting attempts due to strong opposition from cyber security experts. I learned about this on the Reveal podcast

ericjmorey, in I was contacted by a recruiter, but I can't find anything on the company.
@ericjmorey@programming.dev avatar

I’d probably accept the job and get paid to practice in the field while focusing on finding a more permanent position. Nothing is more attractive to employers than someone working in the field they want to hire in.

Decide,

If it’s actual work that suits my experience and not some pitch to buy their product, then it’d be a nice foot in the door. We’ll see how this goes.

ericjmorey, in I was contacted by a recruiter, but I can't find anything on the company.
@ericjmorey@programming.dev avatar

Try crossposting to programming.dev/c/ask_experienced_devs to expand your questions’ reach.

Decide,

Thank you! I knew there was something, but I wasn’t sure what.

EstrangedMoistness,

You can write !ask_experienced_devs which is the Lemmy way of linking to a community

ericjmorey,
@ericjmorey@programming.dev avatar

Not exactly. If no one on your instance has subscribed to the community, Lemmy fails to forward you to the community and returns 404. So the Lemmy way of making sure others can get to the community is to provide the URL. Lemmy has a lot of poor design in this way. It will be replaced with something better next year. Also, as a beehaw user you should be familiar broken ! links to communities that are not federated.

EstrangedMoistness,

Oh, that’s correct! Thanks for taking the time to write this clarification. And I’m not sure I’ve seen broken links via beehaw. I’d have to check again which instances are defederated. I’m using Liftoff and pretty sure it asks me from which instance I want to navigate to a community.

kewko, in I was contacted by a recruiter, but I can't find anything on the company.

Sure sounds a bit dodge, but not having an online footprint is a good strategy for some companies.

This comment has been marked as spam

kewko,

youtu.be/XpkNGMSWbYk brings to memory. Not sure why (yes I’m commenting on my comment for dramatic effect)

Decide,

Thanks for sharing this. I really need to listen to that podcast more.

kewko,

It really is a good one, entertaining and educational

starbreaker, in I was contacted by a recruiter, but I can't find anything on the company.
@starbreaker@kbin.social avatar

deleted_by_author

  • Loading...
  • Decide,

    Exactly the same company. The fact that all of their glassdoor reviews are from India made me rethink if I should follow through. We’ll see how it goes, but making a blacklist sounds pretty dope, so that’s a nice new goal.

    off_brand_, in "Bot resistant" voting systems?

    The problem breaks down into a few broad sub problems, as I see it.

    1. Confirming the reviewer or voter is who they say they are (to prevent one entity from making multiple reviews).
    2. Confirming the reviewer or voter is a valid stakeholder. This is domain-specific, but can be such metrics as “citizen of country”, or “verified purchaser”.
    3. Confirming the intent of the reviewer. This meaning people who were paid off (buyers who are offered a gift card for a positive review, which happens plenty on Amazon), or discounting review bombs when a game “goes woke”.

    1 and 2 have solutions. Steam cares about whether you’re a verified purchaser, and the barrier to entry of “1 purchase of a game per vote” is certainly enough to make things harder to bot. Amazon might be able to do the same, but so much of the transaction happens outside their purview that a foolproof system would be hard. Not that it’s in their interest to do so, though.

    For places like Reddit or Lemmy, verifying one human per up vote is going to be impossible. New accounts are cheap and easy as a core function of the product. bot detection is only going to get harder, too.

    If you used some centralized certificate system (like SSL certs), you could maybe get as granular as one vote per machine, but not without massive privacy invasions. The government does this for voting kinda, but we make a point to keep those private identifiers the government gives private.

    azdle, in "Bot resistant" voting systems?
    @azdle@news.idlestate.org avatar

    As far as I’m aware something like that isn’t really possible.

    • it would prevent one person from making multiple fake accounts

    How do you define ‘a person’ and how do you ensure that they only have one account? Short of government control of accounts, I don’t think you can really guarantee this and even then there’s still fraud that gets past the current government systems.

    Then, how do you verify that the review is coming from the person that the account is for?

    IMO, we’d all be better off going back to smaller scale social interactions, think ‘social media towns’ you trust a smaller number of people and over time develop trust in some. Then you can scale this out to more people than you can directly know with some sort of web-of-trust model. You know you trust Alice, and you know Alice trusts Bob, so therefore you can trust Bob, but not necessarily quite as much as you trust Alice. Then you have this web of trust relationships that decay a bit with each hop away from you.

    It’s a rather thorny problem to solve especially since for that to work optimally you’d want to know how much Alice trusts bob, but that amounts to everyone documenting how much they trust each of their friends, which seems socially… well… difficult.

    Though the rest is actually easy™:

    • reviews wouldn’t be suppressed or promoted by paid algorithms
    • the algorithm WOULD help connect people to items they are interested in. But maybe the workings of it would be open source, so it can be audited for bad acting.

    You do what the fediverse does, you have all the information available to everyone, then you run your own ‘algorithm’ that you wrote/audited/trust. The hard part is getting others to give away access to all ‘their’ data.

    scrubbles, in "Bot resistant" voting systems?
    @scrubbles@poptalk.scrubbles.tech avatar

    Not exactly what you’re looking for, but check out FakeSpot. They have quite a bit to determine the authenticity of reviews

    anzo,

    Again, this is not what you asked but I prefer looking at reviews by YouTubers that I know (e.g. Linus Tech Tips). Maybe a ranking system among those in the review biz would not be so prone to bots.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • [email protected]
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • Socialism
  • KbinCafe
  • TheResearchGuardian
  • oklahoma
  • feritale
  • SuperSentai
  • KamenRider
  • All magazines