Web Developer by day, and aspiring Swift developer at night.

  • 4 Posts
  • 214 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle
  • dohpaz42@lemmy.worldtoProgramming@programming.devBaby unit tests
    link
    fedilink
    English
    arrow-up
    26
    arrow-down
    8
    ·
    edit-2
    5 days ago

    Instead of just doing what I want to do, I’m stuck either doing plumbing work to hold my values and pass them around, or I’m casting things back and forth where I know things are correct but the compiler doesn’t.

    I hate this attitude.

    Instead of doing what you want to do? Dude, unless you’re a hobbyist, you’re being paid to do what your company wants you to do; i.e., it’s not about what you want.

    Stuck doing plumbing work? Yeah, nobody likes plumbing, but we all know it’s necessary. When you’ve got your proverbial shit backing up onto your floor because you cheaped out on plumbing, cry to me then.

    If you’re casting things back and forth, you’re doing it wrong. Spend a day or two and build yourself a solid, consistent foundation, plan ahead, and you won’t be casting things back and forth.

    And no, you obviously don’t know better than your compiler, you arrogant sack of sh…

    Anyway, get over yourself already and just do your damn job better.




  • I read a post earlier tonight from tumbler that made me uncomfortably aware that I am naive when it comes to dog whistles and other subtleties people use to spread their hate. It laid out examples of things people are saying, and explained why they’re bad.

    I know I would find it helpful and educational to know where you’re coming from, and to see the examples you’re speaking about.



  • Sometimes it takes a little unintentional embarrassment to drive a point home. It’ll make them think twice next time.

    What I mean by that is that as long as you’re not intentionally or maliciously trying to embarrass them, then you shouldn’t feel bad. You cannot always control how somebody receives information; nor should you. The best you can do is to be clear and polite in your communication. If someone’s feelings get hurt, that’s on them to reconcile, not you.

    This is genuinely like parenting a child: they need to develop their critical thinking skills, and to gain their own confidence. So they must be left to make their own mistakes to learn from. Your job is to give show them the tools to use, give advice when necessary, and be there to catch them when they fall; because they will fall.

    Doing this will help bolster their self-confidence and make them better mid-/senior-developers later in their career. Coddling them and constantly holding their hand will make them reliant on other people and prevent them from learning anything.

    Edit: also remember KISS. 😊



  • Up until recently, I hadn’t gone out dating in over 15 years. I feel like the thing I struggle with the most is finding people who would be interested in me in a romantic/sexual way. I’m not a social butterfly by any measure, but I am able to put myself out there. I’m also not the type of guy that exudes charisma. I also have a semi-permanent resting bitch face/scowl. And at 6’3” and 260lbs, I feel that intimidate people. If I were with a group of people that I felt comfortable with, I know things would be a lot different. I also tend to overshare. 😉






  • Not entirely true. There are bits in binary files that cannot be rendered correctly by text editors. In fact, if a text editor cannot read a bit, it might omit it or substitute it with a generic placeholder. Instead, what you would do is encode the file into a text format and the transmit it to somebody, who would then decode the text back into its original file format.

    This is how email attachments and uploading/downloading files from the web work. Usually that text format is called base64. In email attachments, they go one step further and typically limit the encoded data to fixed length lines called chunks.

    But yeah, sending raw binary data as text requires special formatting first. Opening it up in a text editor and copying and pasting is not enough.


  • This is not unique to just audio files. What you’re seeing is a readable representation of binary (or raw) data. This will happen if you open an image, zip, or other non-text files.

    Fun Fact: Microsoft Office’s .docx file is actually a zip file containing mostly plain text files in the XML format (XML is a markup language similar to HTML, and is used for describing data). You could theoretically unarchive a .docx file and modify the texts files by hand, and then rearchive the files back to .docx. Just be sure to back the file up before doing so. 😉

    Data essentially are 1’s and 0’s (zeros) that are arranged in such a way that a program can interpret the data to be used by the program.

    You’ve already seen the format that audio files get saved in. They are meant for music players, and as long as the codecs (a way to encode and decode data into a specific format for storage and playback) are supported, your music player will have no problem reading the contents of the file. Text editors will do their best to display plain text, and because text has a limited range of characters it can render, a lot of the data of raw files cannot be displayed. This is why if you opened an audio file in a text editor, and edited it, the file would be ruined. Same for images, zips, and exes.

    If you want to see your binary data as text, you should use a hex editor. A hex editor will render each bit of data in hexadecimal format (0 through 16, where 11 - 16 are shown as the letters A - F). Hex editors also then attempt to show the raw data as text too, so you get to see the data in a safe way. They also allow you to change the values of the data, but unless you know what you’re doing, you risk damaging the file and making it unreadable by its application.