Emerald_Knight's recent activity

  1. Comment on Seeking suggestions for the name of this group in ~lgbt

    Emerald_Knight Link Parent
    Alright, against my better judgment, I'm going to bite: What happened here wasn't an assertion or an attempt to put words in your mouth. To be quite honest, I also interpreted your comments the...

    Alright, against my better judgment, I'm going to bite:

    What happened here wasn't an assertion or an attempt to put words in your mouth. To be quite honest, I also interpreted your comments the way Deimos did at first. It took a fair bit of effort to figure out what you intended to communicate. What actually happened here is that there was miscommunication caused by the English language being a clusterfuck. Nobody was trying to manipulate or abuse you, there was just a misunderstanding.

    Should Deimos have taken more time to carefully go over what you said to make sure he was understanding you correctly, by applying the Principle of Charity? Absolutely. Should you have perhaps been more calm in the way you responded, applied the Principle of Charity yourself to his intentions, and politely corrected Deimos' misunderstanding by telling him what you actually intended to communicate? This is also a resounding yes.

    From the other side of this:

    Are you right to be upset that he interpreted your comments in a less-than-charitable way? Yes, absolutely. Is he right to be upset that you jumped to "hostile defensiveness" when you interpreted his misunderstanding in a less-than-charitable way? Also yes.

    You're both right here, and you're also both wrong. These disagreements are going to happen every now and then. I just hope that this helps both you and @Deimos walk away from this with a better understanding of what happened, with or without reconciliation.

    4 votes
  2. Comment on GitHub shocks top developer: Access to 5 years' work inexplicably blocked in ~tech

    Emerald_Knight Link Parent
    The point of a 404 error page is two-fold: You don't want people being able to try different kinds URLs under a given organization's control to find which ones are valid and which ones aren't. If...

    The point of a 404 error page is two-fold:

    1. You don't want people being able to try different kinds URLs under a given organization's control to find which ones are valid and which ones aren't. If you didn't throw a generic 404 for both missing repos and missing permissions to view repos, a user (or many users, particularly bots) could determine what projects different enterprise organizations are currently developing, even if those projects are set to private visibility. This is very much a security issue that an enterprise organization would want to avoid.
    2. Spammers tend to traverse websites in an automated fashion via some web crawling behavior. Specifically, visit some main page, find relevant links (e.g. public project pages), visit those links, post spam content, then rinse and repeat. If you add a "you were banned" page, then the bot need only check on any given visit if that ban language exists and, if so, the bot can hand-off processing to a different bot in the network. To make efforts more difficult for bot spamming, it's better to throw up a generic 404 page so the bot won't know the difference. Granted, it would be possible for a second non-posting account to work in tandem to find non-404 pages and allow the posting account to submit spam messages to the ones found, but there are still possible mitigation strategies to combat this, e.g. noting which accounts visit the same sets of pages. The entire point isn't to become immune to spam, but to make spam increasingly more difficult and therefore not a worthwhile venture.

    Regarding some other points in the article itself:

    He complains about the lack of an email, but emails alert bots that they were blocked, allowing them to simply hand-off their work to other bots in the network, as described in the error page scenario above. He also complains about why they didn't "just block that one spammy message", but that is also known to fail horrendously by using different spam messages and variations of those spam messages to find holes in the detection algorithm(s) being used.

    Now, that being said, there certainly shouldn't have been an automated action applied in this scenario. Spam reports should be taken seriously, but for an older, more active account with no preexisting history of abuse, his account should've only been flagged for manual review, not automatically deactivated.

    There's a general philosophy one should follow when automating a task: always have a human validate the results of the automation. Inherently trusting computers to not screw things up is a massive mistake.

    1 vote
  3. Comment on A New Approach to Multiplication Opens the Door to Better Quantum Computers in ~science

    Emerald_Knight Link Parent
    Here is a quick StackOverflow answer on the subject :)

    Here is a quick StackOverflow answer on the subject :)

    2 votes
  4. Comment on Modern SQL Window Function Questions in ~comp

    Emerald_Knight Link Parent
    I'm not as familiar with SQL aggregation, but if it supports multiple stages of operations then I could see there being plenty of practical applications when applied to groups. An example would be...

    I'm not as familiar with SQL aggregation, but if it supports multiple stages of operations then I could see there being plenty of practical applications when applied to groups.

    An example would be first grouping rows by month, then subtracting the total of the previous month from the total of the current month in order to obtain a series of deltas. This data could be useful for telling you how much of some metric you've lost or gained over each month. A subsequent stage could then filter by negative deltas to show only losses. A practical concrete example might be telling you which quarters your sales dipped in, so you can examine the causes of profit loss.

    Use cases can be difficult to come up with, but generally if you need to compare X number of results relative to the current one, then preceding and following are likely the tools you'll want to use.

    1 vote
  5. Comment on I made a video to showcase / explain my free space pathfinding algorithm. in ~comp

    Emerald_Knight Link Parent
    My reply to this is a bit late. I apologize for that, as I've been a bit busy. I seem to have misunderstood the way your algorithm works, probably because of how late it was when I wrote the...

    My reply to this is a bit late. I apologize for that, as I've been a bit busy.

    I seem to have misunderstood the way your algorithm works, probably because of how late it was when I wrote the original comment. It sounds like instead you perform either boundary-based or edge-based traversing of your map, possibly in the form of a depth-first search. During this search, your boundary intersections effectively act as a sort of "pseudo-node", and it's along these pseudo-nodes that you perform the actual movement. The exiting of these boundaries is what allows you to calculate these intersections.

    Does that sound accurate? I don't actually have any code to look at, so I only have the high-level overview to work with. The actual underlying details I can only speculate at. I'd be interested in a more detailed explanation if I'm still off about the details! :)

    This is like saying everything is a 1 or a 0 but it's not particularly interesting. Here I'm talking about free space in the "mathematical" sense.

    I completely understand what you meant. That being said, the real world can only be expressed digitally to some defined resolution. For instance, the quantity of real numbers between 1 and 2 is infinite, yet digitally we can only express an infinitely small subset of the real numbers between 1 and 2. You can certainly redefine the resolution at any given point, and we can even make the assumption that we utilize your algorithm in a space with infinite resolution. But ultimately we have to define some resolution, which makes the space you're operating on a grid system.

    Because the space you're operating on is always a grid system, there are some important implications. For instance, imagine if you tried to apply these rectangular boundaries to a series of interconnected circular areas--there could be potentially infinitely many boundaries in order to obtain full map coverage, because a rectangle that doesn't spill out of a circle can never cover the entire area of the circle and vice versa. Because of this, the number of boundaries required could end up being proportional to the resolution of your space, depending on how that space is shaped. The fact that your boundaries work as well as they do could very well be because your maps are shaped as interconnected rectangles and don't contain any high-resolution curves. This is clearly a point that you're already aware of, since you've explicitly qualified your explanation with "I can have rectangle obstacles", but I just want to emphasize why it is that I'm focusing so much on the underlying notion of "free space" when contrasting mathematical free space and digital free space.

    This doesn't, in any way, detract from the idea of utilizing the algorithm in mathematical free space. In fact, it suggests that your algorithm could be incredibly effective for determining shortest paths within rectangular-shaped maps because of the usefulness of the clustering and event-driven processing. It's only a re-framing of the problem to allow us to point to similar problem spaces and to better consider the strengths and potential limitations of the algorithm.

    I feel like we're both on the same page, but what we're emphasizing is different. I apologize for being so unclear previously.

    2 votes
  6. Comment on I made a video to showcase / explain my free space pathfinding algorithm. in ~comp

    Emerald_Knight Link
    I could be off the mark, but this sounds to me like a version of hierarchical path finding. If we consider that even "free space", when represented digitally, has a finite amount of granularity,...

    I could be off the mark, but this sounds to me like a version of hierarchical path finding.

    If we consider that even "free space", when represented digitally, has a finite amount of granularity, then even a "free space" system is really just a grid system with sufficiently small unit size. So we're definitely still working with a grid here. The sheer quantity of grid nodes in such a system would be far too numerous to reasonably process, however, so in order to more efficiently process them it's better to group them into distinct clusters (in your case, the concept of "node boundaries"). The initial path is planned out for travel between clusters, then the final path is laid out by planning out the paths within the individual clusters. Fewer nodes to process from the very beginning, then each of the nodes involved in the final solution represent much smaller, easier to solve problems that can be handled very quickly.

    You appear to be subdividing the space into rectangular boundaries, plotting the top-level path between those boundaries, then plotting the path within the individual boundaries by considering details like boundary intersection and whether the start and end points are both contained within the same boundary space. This definitely seems to qualify as hierarchical path finding to me.

    I think one of the most important considerations for your approach, however, is that your maps are very grid-like. Not having tons of tiny, densely-packed, irregularly-placed obstacles, or many smooth-curve paths--more generally, regions that can't be easily subdivided into rectangular sub-regions--makes the boundary-intersection strategy effective. I'd be curious to see how your algorithm benchmarks when stress-tested.

    Cool to see that you independently developed your own hierarchical path finding strategy, in any case. Nice work!

    4 votes
  7. Comment on Tildes Docker Image in ~tildes

    Emerald_Knight Link Parent
    I can see how my phrasing could cause confusion. It's definitely ambiguous. Sorry about that!

    I can see how my phrasing could cause confusion. It's definitely ambiguous. Sorry about that!

    4 votes
  8. Comment on Codecademy vs The BBC Micro in ~comp

    Emerald_Knight Link Parent
    You're right. This is a pretty significant problem.

    You're right. This is a pretty significant problem.

  9. Comment on Tildes Docker Image in ~tildes

    Emerald_Knight Link Parent
    Please note the installation requirements for their Docker Desktop application. You're still installing a hypervisor, which indicates an underlying VM instance being utilized. They certainly...

    Please note the installation requirements for their Docker Desktop application. You're still installing a hypervisor, which indicates an underlying VM instance being utilized. They certainly abstract it away, which is great, but a spade is still a spade.

    5 votes
  10. Comment on Tildes Docker Image in ~tildes

    Emerald_Knight Link Parent
    To clarify, it's possible to run a compatible Linux VM and use containers within said VM. But at that point you're basically just doing what Vagrant does with extra steps. Docker is better for...

    To clarify, it's possible to run a compatible Linux VM and use containers within said VM. But at that point you're basically just doing what Vagrant does with extra steps. Docker is better for handling multiple microservices rather than a single service setup like Tildes. Both tools have their own problem spaces, and Docker just isn't in the Tildes problem space at this point in time.

    4 votes
  11. Comment on Tildes Docker Image in ~tildes

    Emerald_Knight Link
    Docker and Vagrant are incredibly different. Docker is basically a software package. It needs to be compatible with the underlying operating system. Vagrant is a virtual machine provisioner and is...

    Docker and Vagrant are incredibly different. Docker is basically a software package. It needs to be compatible with the underlying operating system. Vagrant is a virtual machine provisioner and is thus compatible with systems that Docker isn't.

    For example, you can run a Linux Docker image on top of a Linux distro with containerization available, but on distros without it or on other operating systems like Windows, you can't run it at all. A Vagrant configuration doesn't have this problem.

    4 votes
  12. Comment on Codecademy vs The BBC Micro in ~comp

    Emerald_Knight Link Parent
    My stance on platforms like codecademy is that they're not particularly good for learning about programming fundamentals, but they're great for learning about the basics of a specific programming...

    My stance on platforms like codecademy is that they're not particularly good for learning about programming fundamentals, but they're great for learning about the basics of a specific programming language. I wouldn't discount the value of the latter just because of the lack of the former, but I'll agree that it drives me nuts that they still sell themselves as the former.

    1 vote
  13. Comment on My country decided that animal sacrifice in the name of religion is constitutional. in ~talk

    Emerald_Knight Link Parent
    I just want to address a small point here: there's actually a very big disconnect between the physical reflex associated with pain and the actual cognitive processing of it. If you burn yourself,...

    if you bring an open flame toward them, they back away from it, just like I would.

    I just want to address a small point here: there's actually a very big disconnect between the physical reflex associated with pain and the actual cognitive processing of it. If you burn yourself, for example, you'll react physically before your brain has actually had time to elicit the sensation of pain. Thus, a reflex isn't necessarily indicative of pain sensation.

    With that out of the way, I'd like to point to good old Occam's razor: If an animal experiences damaging stimulus and then hesitates around or actively avoids that damaging stimulus in the future, then odds are far better than not that they're experiencing the actual sensation of pain. Avoidance is a learned behavior, and one that you don't learn from every reflexive twitch of your body--it's one you learn from the twitches that are accompanied by an incredibly intense and uncomfortable neurological sensation that you desperately want to never experience again (unless, you know, you're into that kind of thing).

    3 votes
  14. Comment on My country decided that animal sacrifice in the name of religion is constitutional. in ~talk

    Emerald_Knight Link Parent
    Extending from this, humans can cognitively reason about pain. Dogs and other animals can't. They don't know why they're in pain, just that they are. They end up being not only hurt, but confused...

    Extending from this, humans can cognitively reason about pain. Dogs and other animals can't. They don't know why they're in pain, just that they are. They end up being not only hurt, but confused and afraid, making their experience of pain arguably worse than our own. Animals are very much like perpetual children, and one wouldn't consider a child somehow lesser than an adult in terms of priority of protection--indeed, we typically prioritize children above ourselves.

    14 votes
  15. Comment on My country decided that animal sacrifice in the name of religion is constitutional. in ~talk

    Emerald_Knight Link
    Some of the points I want to make are touched on elsewhere, but I'll collect them here in a top-level comment: There is definitely a difference in ethics with regards to animals vs. humans. I...

    Some of the points I want to make are touched on elsewhere, but I'll collect them here in a top-level comment:

    There is definitely a difference in ethics with regards to animals vs. humans. I believe this difference to be small, however. Killing an animal for the sake of eating it is fine, but killing an animal for the sake of killing it is wrong. Killing an animal humanely, where it doesn't experience undue suffering, is fine, but causing pain and suffering is wrong. And even before the end of an animal's life, its treatment while it's still alive matters quite a bit--we shouldn't mistreat an animal just so we can keep it around to eat later, but should instead raise it under suitable living conditions.

    In the case of religious sacrifice, the questions to be asked are:

    1. Was the animal treated well in life?
    2. Was the animal killed humanely?
    3. Was the animal eaten afterward rather than being allowed to rot and go to waste?

    If the answer to those 3 questions are all "yes", then I see nothing wrong with allowing religious sacrifice of an animal. It's when any of those questions are answered "no" that I believe there to be an ethical problem.

    Also, I've noticed here and elsewhere that there is often the argument that animals don't feel pain the way that humans do. This argument is absurd. Even barring all evidence to the contrary, with animals exhibiting clear experiences of pain and suffering when injured, we can go the other route and ask this question: would it be okay to kill another human being just because they were born with a genetic defect that causes them not to feel any pain at all (a condition which very much does exist)? Obviously not. The ethics of killing transcend the concept of pain and depend primarily on the belief that deprivation of life is wrong.

    We shouldn't be relying on such myopic arguments. Ethics are not based purely on pragmatism, so let's not pretend that they are.

    8 votes
  16. Comment on Banning of users and the discussion of controversial subjects in ~tildes

  17. Comment on Banning of users and the discussion of controversial subjects in ~tildes

    Emerald_Knight Link Parent
    My understanding is that it was challenged via the Flag Protection Act, but ultimately upheld via United States v. Eichman. Multiple attempts have been made since then to allow the prohibition of...

    My understanding is that it was challenged via the Flag Protection Act, but ultimately upheld via United States v. Eichman. Multiple attempts have been made since then to allow the prohibition of flag desecration, but to my knowledge none have been passed.

    13 votes
  18. Comment on Banning of users and the discussion of controversial subjects in ~tildes

    Emerald_Knight Link Parent
    Uh... I could be wrong about this, but I'm pretty sure it's protected speech via Texas v. Johnson.

    Since the burning of the American flag is not considered to be free speech.

    Uh... I could be wrong about this, but I'm pretty sure it's protected speech via Texas v. Johnson.

    10 votes
  19. Comment on Conceptualizing Data: Simplifying the way we think about complex data structures. in ~comp

    Emerald_Knight Link Parent
    Thank you, I really appreciate that!

    Thank you, I really appreciate that!

    2 votes
  20. Comment on Conceptualizing Data: Simplifying the way we think about complex data structures. in ~comp

    Emerald_Knight Link Parent
    Regarding recommendations, this is tricky. Right now you're just starting out, so I wouldn't recommend concerning yourself too much with writing good code yet. Instead, continue working on nailing...

    Regarding recommendations, this is tricky.

    Right now you're just starting out, so I wouldn't recommend concerning yourself too much with writing good code yet. Instead, continue working on nailing down your problem solving process and your understanding of programming problems as a whole. For example, if you're the kind of person who currently solves problems by process of trial and error, e.g. copy-pasting from StackOverflow and making changes until things work, then you need to stop what you're doing right now and change the way you approach solving problems. These are the fundamentals from which everything else you do will build on, so it's important to build on those fundamentals as much as you can. Solve lots of problems and lots of different kinds of problems. Keep challenging yourself with harder and harder problems over time.

    Quite frankly, no programmer is going to write efficient, non-hacky code when they're just starting out. Learn to accept that right now. You're a novice. You're new to programming. Find me one novice who writes good code and I'll find you a thousand that don't. Writing good code isn't your goal right now. Learning to internalize basic programming constructs is. Writing shitty code is part of the process. It's a rite of passage. Embrace it.

    That being said, it doesn't hurt to start thinking about how to fix your code to make it better. My personal recommendation would be for you to revisit old projects after you've been away from them from several months and update them. It's hard to beat the experience of having to modify an existing project that doesn't adhere to good code practices. If you really want to study refactoring code in depth, though, you might look into getting your hands on the book Refactoring: Improving the Design of Existing Code, by Martin Fowler. It could prove to be a good source of reading material for you.


    Regarding what inspires me to write about these subjects in general, there are a few things that come to mind.

    First, I've had to maintain legacy code. As a result, I've encountered some absolutely horrible design anti-patterns. I've also written some pretty terrible code myself. In both cases, I've had to go in and make changes to the existing code, and it's a painful, frustrating experience every time. I often found myself having to stop myself from procrastinating because I just didn't want to have to touch those parts of the code base. This is what we call "technical debt", and it's measured specifically by the amount of time and effort it takes to make changes to code. I've become very accustomed with technical debt, so it's very often on my mind and being considered whenever I write code.

    Second, there are a lot of things I wish I'd known about prior to getting into professional work, things there were never taught during my CS studies. I like to take the opportunity to help other programmers--both new programmers and programmers who just haven't been fortunate enough to be exposed to these ideas--by sharing them whenever I think to do so.

    Third, I've just always enjoyed teaching others.

    Regarding what inspired me to write about this this subject in particular, however, one thing stands out. I had some code that I'd written last year for my current work. It worked perfectly fine for a while, but as time went on I realized that I kept copy-pasting the same exact code and kept adding more and more edge case checking. As my data structures became more complicated and needed to be extended, it also became more and more of a headache to make changes. It was awful. But then, I'd made a critical realization that I'd taken for granted for so long: everything I was doing could be done in the form of a recursive tree traversal, because these data structures were really just a bunch of nodes and leaves in a tree. That lead to a major overhaul of that particular part of the system and has made it trivial to further extend these structures. What was once a nightmare to maintain is now so ridiculously simple that I could get hit by a bus today and whatever programmer replaced me would have no trouble whatsoever making use of it.

    In short, though, it all boils down to this: I love programming and I love taking the opportunity to teach others about it :)

    5 votes