magic_lobster_party

@[email protected]

This profile is from a federated server and may be incomplete. View on remote instance

magic_lobster_party ,

It’s not that funny.

Docker is like a virtual machine, but you only run one specific program in it. About exactly what the meme describes.

magic_lobster_party ,

I think this is a bit disingenuous. There’s no customer interaction in these panels.

So waterfall would be:

Customer says they want to go to Mars.

You spend years building a rocket capable of going to Mars, draining all the company budget in the process.

Customer then clarifies they actually meant they wanted to go to Mars, Pennsylvania, USA - not the planet!

magic_lobster_party ,

The author is also hyping up waterfall too much. Agile was created because waterfall has its shortcomings (e.g. the team realizes too late that what they’re building isn’t what the customer wants).

But I also think it also represents how poorly implemented these ideas are. People say they do agile/kanban/scrum, but in reality they do some freak version of these.

magic_lobster_party ,

It’s barely waterfall planning either. Often there’s no planning, at least no coordinated one.

Currently at my current workplace we lack coordinated planning between teams. It seems like everybody is working in their own directions and it can take months until we get feedback from other teams. Mostly a product management problem.

magic_lobster_party ,

NASA also successfully flew a helicopter on Mars first try.

magic_lobster_party ,

That’s fair enough. The common misconception is that waterfall is great for space missions, when in reality NASA is doing agile.

I agree that not everybody is NASA, so what works for them doesn’t necessarily work for everyone.

magic_lobster_party ,

Where are you getting that from? YouTube premium is ad free (so far).

magic_lobster_party ,

I don’t think it’s an unpopular opinion, but I’m not sure how YouTube can deal with it best. There’s sponsor block, but it’s relying on crowdsourced data.

magic_lobster_party ,

It’s a poorly worded article. YouTube premium “limits ads” as in being completely ad free (besides in-video sponsorships). YouTube hasn’t gone down that route yet.

magic_lobster_party ,

Not true 128 bit. It has 128 bit SIMD capabilities, but that’s about it. Probably mostly because of marketing reasons to show how much better it is than N64 (which also is “64 bit” for marketing reasons).

In that case, we’re having 512 bit computers now: https://en.wikipedia.org/wiki/AVX-512

magic_lobster_party ,

More complexity with barely any (practical) benefits for consumers.

magic_lobster_party ,

Probably not in consumer grade products in any foreseeable future.

magic_lobster_party ,

Only thing I can find is that it has 128-bit graphics-oriented floating-point unit delivering 1.4 GFLOPS.

Probably only for marketing reasons. Everyone was desperate not to be worse than N64.

magic_lobster_party ,

You have two lists of size n. You want to find the permutations of these two lists that minimizes a certain distance function between them.

magic_lobster_party ,

By “certain distance function”, I mean a specific function that forces the problem to be O(n!^2).

But fear not! I have an idea of such function.

So the idea of such function is the hamming distance of a hash (like sha256). The hash is computed iterably by h[n] = hash(concat(h[n - 1], l[n])).

This ensures:

  • We can save partial results of the hashing, so we don’t need to iterate through the entire lists for each permutation. Otherwise we would get another factor n in time complexity.
  • The cost of computing the hamming distance is O(1).
  • Order matters. We can’t cheat and come up with a way to exclude some permutations.

No idea of the practical use of such algorithm. Probably completely useless.

magic_lobster_party ,

Good effort of actually implementing it. I was pretty confident my solution is correct, but I’m not as confident anymore. I will think about it for a bit more.

magic_lobster_party ,

Time complexity is mostly useful in theoretical computer science. In practice it’s rare you need to accurately estimate time complexity. If it’s fast, then it’s fast. If it’s slow, then you should try to make it faster. Often it’s not about optimizing the time complexity to make the code faster.

All you really need to know is:

  • Array lookup: O(1)
  • Single for loop: O(n)
  • Double nested for loop: O(n^2)
  • Triple nested for loop: O(n^3)
  • Sorting: O(n log n)

There are exceptions, so don’t always follow these rules blindly.

It’s hard to just “accidentally” write code that’s O(n!), so don’t worry about it too much.

magic_lobster_party , (edited )

So in your code you do the following for each permutation:

for (int i = 0; i<n;i++) {

You’re iterating through the entire list for each permutation, which yields an O(n x n!) time complexity. My idea was an attempt to avoid that extra factor n.

I’m not sure how std implements permutations, but the way I want them is:

1 2 3 4 5

1 2 3 5 4

1 2 4 3 5

1 2 4 5 3

1 2 5 3 4

1 2 5 4 3

1 3 2 4 5

etc.

Note that the last 2 numbers change every iteration, third last number change every 2 iterations, fourth last iteration change every 2 x 3 iterations. The first number in this example change every 2 x 3 x 4 iterations.

This gives us an idea how often we need to calculate how often each hash need to be updated. We don’t need to calculate the hash for 1 2 3 between the first and second iteration for example.

The first hash will be updated 5 times. Second hash 5 x 4 times. Third 5 x 4 x 3 times. Fourth 5 x 4 x 3 x 2 times. Fifth 5 x 4 x 3 x 2 x 1 times.

So the time complexity should be the number of times we need to calculate the hash function, which is O(n + n (n - 1) + n (n - 1) (n - 2) + … + n!) = O(n!) times.

EDIT: on a second afterthought, I’m not sure this is a legal simplification. It might be the case that it’s actually O(n x n!), as there are n growing number of terms. But in that case shouldn’t all permutation algorithms be O(n x n!)?

EDIT 2: found this link https://stackoverflow.com/a/39126141

The time complexity can be simplified as O(2.71828 x n!), which makes it O(n!), so it’s a legal simplification! (Although I thought wrong, but I arrived to the correct conclusion)

END EDIT.

We do the same for the second list (for each permission), which makes it O(n!^2).

Finally we do the hamming distance, but this is done between constant length hashes, so it’s going to be constant time O(1) in this context.

Maybe I can try my own implementation once I have access to a proper computer.

magic_lobster_party ,

My implementation: https://pastebin.com/3PskMZqz

Results at bottom of file.

I’m taking into account that when I update a hash, all the hashes to the right of it should also be updated.

Number of hashes is about 2.71828 x n! as predicted. The time seems to be proportional to n! as well (n = 12 is about 12 times slower than n = 11, which in turn is about 11 times slower than n = 10).

Interestingly this program turned out to be a fun and inefficient way of calculating the digits of e.

magic_lobster_party ,

It has been a pleasure having this internet argument with you. I learned a bit, and you learned a bit. It’s a win win :)

magic_lobster_party ,

It’s not from a high bar, so not improbable AI will do a better job than Embracer already do.

magic_lobster_party ,

I’m mostly joking about that Embracer is more effective at shutting down studios and cancelling games rather than making them.

magic_lobster_party ,

Governments are incentivized to match people to combat declining birth rates. Lower birth rates means fewer productive people to support an aging population. It’s also loss in taxes.

magic_lobster_party ,

Which ones then?

Collect taxes.

magic_lobster_party ,

This has the same vibes as old people complaining about things kids do. “Why don’t they listen to the radio and play with sticks in the woods like I did? Kids these days are just listening to rock music and reading comic books.”

Social media is here to stay and putting warning labels on it won’t do a damnest. Kids will still use it because the option would be not to be included in their friend groups.

magic_lobster_party ,

Apple knows how to market their stuff. They’ve built a strong reputation among their customers.

magic_lobster_party ,

todos

I found a simple trick against this: just remove them. Accept it ain’t gonna happen man.

magic_lobster_party ,

It’s mostly a joke, but often when I find todos they’re so old they’re no longer relevant.

Of course you shouldn’t blindly remove todos.

magic_lobster_party ,

I'd rather have no comments than wrong comments.

I’ve seen cases of outdated comments in the same line of code it’s describing. People suck at maintaining comments.

magic_lobster_party ,

Do comment the why

In this day and age of source control I don’t think this is fully necessary. If you want to know the why, you can look into the commit history and see which ticket is connected to it. There you might even see the discussions around the ticket as well. But this requires good source control discipline.

It has helped me many times.

magic_lobster_party ,

It's like if you were bilingual, you don't write every sentence in both languages, because that is twice as much text to maintain (and read).

This is a very good analogy. And just like with natural languages, you might have an easier time expressing an idea in one language but not the other. Comments should provide information that you find difficult to express with code.

magic_lobster_party ,

You can also do that if you think it’s useful.

Going back to the original ticket can offer far more info than what any “why” comment can give. You can see how old it is, if there are any connected tickets, who were involved with it, step by step instructions how to reproduce the bug, etc.

magic_lobster_party ,

That skull crushing weapon is so satisfying to watch.

Judging from the trailer it looks like we will see more open arenas. Good to see they won’t try to make a repeat of Eternal and instead try new ideas. Looking forward to see how it plays out.

magic_lobster_party ,

Technically the shield is a chainsaw

magic_lobster_party ,

There’s the stone imps who can only be damaged with the full auto mod (or super weapons).

magic_lobster_party ,

Why spend 15 minutes to get the answer when it can be explained in a few paragraphs?

magic_lobster_party ,

When the internet is riddled with clickbait and sensational headlines, we’re getting quite protective of where we want to put our attention.

magic_lobster_party ,

There’s nothing wrong with wanting a short TL;DW summary. I’ve already seen the video a while ago, but I don’t remember all the exact details.

magic_lobster_party ,

A more proper title would be “study finds 268% higher failure rates for poorly planned software projects”.

“Agile” as a word is mostly an excuse of poor planners for their poor planning skills.

magic_lobster_party , (edited )

It’s a bit hit and miss. Some parts are glorious. Other parts are just frustrating.

There’s too many parts that are “Oh you failed this jump? Now you need to start all over again”. I’m thinking especially on that Yoshi mission in Ricco Harbor.

Or that lilly pad bonus level on that island that you must bring Yoshi to, but Yoshi can’t swim so you need to ride those slow ass boats. Ensure you don’t miss any jump, because then you need to start all over again.

The visuals are incredible for its time. The water is one of the most beautiful on that generation.

It’s a game that could’ve benefited from being easier, or at least be more forgiving. I just want to soak in all the visuals.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • kbinchat
  • All magazines