• 0 Posts
  • 659 Comments
Joined 3 years ago
cake
Cake day: June 10th, 2023

help-circle

  • Even though programming is also known as hacking, I’m going to assume you’re using hacker to mean red teaming in general, i.e. offensive cyber security, as that’s what most people have in mind when they think of “hackers”.

    We’re about to enter a golden age for that profession, the reason is LLMs, AI, vibe-coding, etc. See, a long time ago things were very insecure, no one was worried about security as it was all just so new, that was the era when you could sniff on network traffic very easily, crack your neighbor password in a few minutes or login to most things using admin/admin. Over time people started to realize that security mattered, that there were enough malicious people out there that you had to at least make some effort to secure things. This brought us to today, where things are fairly secure, your router has a preconfigured long random password and uses at least WPA for security, most companies no longer store passwords in their databases so it diminishes the risk of leaks, etc, etc. A lot of thought is put into security by serious companies, but there were some cracks starting to show because small devs wouldn’t take security as seriously, be it for lack of resources or care, so while large stuff would be safe, smaller apps and sites are still very vulnerable, and people being people they use the same password for both and don’t enable 2fa, so once you grab credentials somewhere you can try the in other places.

    What changed now? Well, recently people started to vibe-code, i.e. give prompts to an LLM to generate some code. The problem with that is that in the database of things an LLM is trained in it might have lots of bad examples, be it because the code was insecure, or because it was exactly an example of insecure code. Asking the LLM to make it secure is not going to work, as it lacks the comprehension to understand what security is. It’s possible to make things better in an iterative process where you feed the output code to itself and ask it to check for security vulnerabilities, but it might introduce new ones while fixing the existing ones, because the majority of examples online are incomplete as they’re meant to be small examples of small parts of a system to showcase how to do that in a secure manner (but they leave other parts insecure as that’s not the purpose of the example). For example, a login example code might use a simple text comparison for the password field, because it’s trying to show you the structure of the API, not the content, and assumes you will know now to do that, but an LLM doesn’t know that.

    And with many people vibe-coding apps and sites it’ll become more and more easy to find those serious security holes in the wild.

    And how to learn it? Well, the short version is doing. You don’t need to buy expensive books, or anything of the sort, just start reading online, and poke around stuff. I used to play around with https://www.hackthebox.com/ and found that very interesting way to learn, however you might need to read on some stuff first before you’re capable of logging in there (although I just gave it a quick look and I think they removed the most interesting part about it which was you had to hack the website to create an account).


  • You’re probably fine.

    The reason you didn’t wanted magnets near technology before is because we relied on magnetic fields for stuff, so magnets distorted those uses. Nowadays we usually don’t have any magnetic parts on a phone, so unless you have a super strong magnet extremely close to the electronics you should be fine.

    Specifically CRT monitors were tiny particle accelerators that shot electrons to a coat of phosphorescent material, they used magnets to redirect the electrons to hit the correct pixels at the right time. So putting a magnet nearby would pull the beam in a different direction distorting the image and shifting it’s colors (because the electrons were now hitting different color pixels). It was not irreversible, usually removing the magnet is all you had to do, but sometimes you might have magnetized something and the beam would remain crooked for a while.

    The other thing that would be affected by magnets were hard disks, your PC might still have one so you might not want to put magnets near it, but our phone doesn’t. HDs stored information using magnetic fields into a disk, similar to a DVD except using a tiny needle that would magnetize the disk in one direction to write a 1 and on the opposite to write a 0. Taking a magnet near that would essentially erase all of the data in that disk. Modern storage use very different methods for storing data that don’t depend on magnetism, so you’re fine.





  • I don’t think there are more languages being created now than before. There are tons of languages that have been created over the years, but you get the survivors bias effect where the ones that are actually useful in some context start being used in that context, and the ones that are less useful stop being used.

    When you were learning python was already established, but I remember having long discussions trying to convince people to use it instead of Java because it was a much higher level with much better in many aspects at some cost performance, and if you’re not willing to pay that cost you should revert to C++ which is much better than Java anyways.

    And that’s sort of what’s happening here. C++ is good for things that need to be fast, but it requires careful consideration to avoid several issues, if you don’t need the speed, python gives you a much better experience in several aspects. For other specific things there are specific languages that fit better, if you’re developing for web JS is already in most browsers so that’s an easy choice, and if you want to make a game maybe you learn C# to use in Unity. But for general stuff C++ and Python have been the de facto standards as they cover most use cases very comfortably, so there hasn’t been any real competition for them.

    Enter Rust, Go, Zig, etc. Even if something is a standard it doesn’t mean it’s the best thing, Assembly, Cobol, Fortran, C have all been standards, but C++ can do 99% of what those other languages did and makes things easier, so slowly it became the default language. Of those “new” languages the only one I know enough is Rust, so let’s talk about what Rust brings to the table that’s not available on C++ or python, and why people are so excited for it.

    Rust is fast, we’re talking C level fast, this means that Rust beats almost every other language (including C++). Rust is safe, it’s purposefully designed not to allow you to miss use it accidentally, this includes memory safety which is the most talked about, but it’s a whole thing in Rust, with enums you need to match all cases, result types that includes error responses, and optional objects that force you to acknowledge the None. Rust has a great package support, better than python because it’s standardized. Besides all that Rust is able to be used almost everywhere, whereas C/C++ does work in many places, but libraries for it don’t.

    So, why new languages? Because there are things to improve.


  • I have at no point compared black people to dogs, or even mentioned anything related to race beyond a comparison of statistical facts to showcase how ridiculous the argument is. You’re creating a Straw man to attack and deflecting my question, so we’ll keep going in circles forever, because answering a straight yes or no would compromise you.

    Read everything that I posted so far and you will realize the entire time what I’m saying is “a small subgroup causing the most fatalities, therefore subgroup aggressive” is a bad argument. That is the whole of what I’m saying, and you haven’t replied whether you think that is a good or a bad argument. The reason why you haven’t done so is simple:

    • If you say it’s a bad argument you’re agreeing with me, therefore no reply is needed.

    • If you say it’s a good argument then you’re agreeing with any racist asshole who uses the same argument applied to people, and you should take a long hard look at yourself to see whether that’s the kind of peraon you want to be. And honestly, I don’t want to keep talking to anyone who thinks like this as they have been so brainwashed they won’t get convinced by a random person online.

    In reality I’m fairly confident you want the argument to apply to dogs but not to people, and that’s just not how logic works. Facts are facts, you can’t disagree with them, the conclusion from those facts is logic, and that can be flawed (as is for the case of the proof of aggressive behavior). So when confronted with the fact that you’re defending a logic argument that can be made about people, instead of thinking “huh, I guess it’s a bad argument” you go “I’m not racist, you’re racist”, that is called deflection. So you attack a Straw man argument that I’m comparing people to dogs so that you don’t have to admit that your prejudice against pitbulls made you agree with an undefendable racist argument. Still the conclusion is the same, there’s no reason to reply to someone who’s being fallacious at best and making bad faith arguments at worst. If you honestly expect any answer from me your reply should clearly state whether you consider the “X is a small subgroup yet causes the majority of fatalities, therefore X is dangerous” a good argument.



  • Water analogy still applies for that. If the pipes are already full of water if you inject water on one end it almost immediately comes out of the other, even if the water is only being injected at a slow speed. It’s not immediate because the moment you inject water the water in the pipes first compress and that compression travel like a wave much faster than the water.

    The moment the water analogy falls apart is when you depend on magnetism, because electrons moving cause a magnetic field around, but water moving doesn’t generate any field around it, so it can’t imitate an electromagnet or a transformer.





  • Others have already answered, but one thing I think helps a lot in understanding electricity is to think of it as water. Water running through a hose behaves exactly the same as electricity running through a wire.

    The amount of water running through the hose is similar to the amount of electrons running through the wire. We call this current, and measure it in Amperes. Whenever you read amperes think about the flow of material through the medium. Can this value be negative? Sure, it means the current is flowing in the opposite direction.

    If one end of the hose is higher than the other the water will flow from the taller part to the lowest one. Measuring how tall one part of the system is compared to another tells you a what potential difference there is there. We call this Voltage and measure it in Volts. Whenever you read volts think about the potential of movement, if there is a 5 Volt difference between two points in your circuit, connecting a wire between those points will produce a flow, just like how if one reservoir is higher than another connecting a hose between them will move water around. Can this value be negative? Sure, it means the other side has more potential energy.

    If the inside of the hose has a rougher surface water will have more difficulty flowing through there than if it’s smooth. We call this resistance and measure it in Ohms. Whenever you read ohms think about how difficult it is for the current to flow through. Conversely Mhos (OHM spelled backwards) is how easily current flows through the material. Can either of these values be negative? Not usually, but things can behave as if they had a negative resistance, e.g. an amplifier, which in our water analogy is a device that uses a small water flow to control the doors for a larger door, if you have 1 drop per second it let’s put 1L per second on the other side, so it can be seen as something that increased the water flow, therefore negative resistance.

    Now you want to move a wheel with your water, for the water this wheel is seen like a hose that’s harder to move through, so it offers some resistance. If you don’t have enough water flowing it won’t budge. You can move the wheel ba raising the other side of the hose, this increasing the speed the water flows and giving it more energy, or you can do the same by putting more water in the hose thus increasing the current. Therefore we need a unit to measure how easily the water at a given point can move a wheel. We call this Potence and measure it in Watts or VA (Volt-Ampere). Whenever you see Watt think about the amount of energy the el electricity has at that point.

    Lamps have a measure in Watts, because they’re like a wheel that the water will move, and they’re letting you know how much water energy you need to throw at it for it to move, you can use high amperage low voltage, or high voltage low amperage to get to this result. Because both the Voltage on your house, and the resistance of the lamp are fixed values, you can calculate the resulting amperage and wattage.

    I think I went a bit off topic, but I hope this helps clarify some of those concepts.


  • Nibodhika@lemmy.worldtoNo Stupid Questions@lemmy.world*Permanently Deleted*
    link
    fedilink
    arrow-up
    23
    arrow-down
    2
    ·
    edit-2
    14 days ago

    According to a quick check on Wikipedia Switzerland has 27.6 firearms per 100 people, so in average you can expect 1 in 4 people to be armed. While the USA has 1.205 weapons per person, so you can expect in average that 1 in 5 people has an extra weapon besides the one 100% of the population does.

    I think the 436% increase in weapon per capita might contribute to an increase with gun violence, but that’s just my guess.



  • Came to say exactly this. Lost my dad at 18 and I’m 37 now, you just learn to live with it. Time makes it easier because it distances you and gives you lots of other experiences without them, but even decades later you might catch yourself thinking about them.

    I always remember a quote by (GNU) Terry Pratchett:

    No one is actually dead until the ripples they cause in the world die away

    And you yourself are a ripple, your father is alive within you, remember him and carry him with you.