• Activity
  • Votes
  • Comments
  • New
  • All activity
    1. Alternatives to Markdown for writing short documentation/TODOs?

      Hi guys, I often find myself writing small text files for projects, like a bit of documentation or TODOs. I have a proper system in place for larger projects, but would love to be able to scribble...

      Hi guys,

      I often find myself writing small text files for projects, like a bit of documentation or TODOs. I have a proper system in place for larger projects, but would love to be able to scribble down things for larger ones.

      As big of a fan of Markdown as I am, I find that it's often inappropriate for these kinds of tasks. For example, I find myself mimicking a task list with multiple-paragraph list items.

      What do you guys use? Do you know of any Markdown alternatives that give you a bit more control over the layout?

      Thanks!

      14 votes
    2. Need help dispelling myths about how hackers access websites

      I hope I’m posting this in the correct place. I’ve been having a disagreement with someone over the abilities of hackers. I kinda hope Deimorz pops in because he wrote automod. I said that the...

      I hope I’m posting this in the correct place. I’ve been having a disagreement with someone over the abilities of hackers. I kinda hope Deimorz pops in because he wrote automod.

      I said that the only way for someone to gain access to a subreddit to make changes is if they steal a moderator’s account password or they are added to the mod team. The person I’m having a disagreement with believes that adding text to the wiki for users to view (like the extensive wiki r/skincareaddiction has) would make it easier for hackers to insert malicious code in order to gain access to the sub. This person also mentioned being able to change the subreddit through browser tools. She insists the sidebar and wiki are potential access points for scripting attacks. Automod just so happens to be enabled which is why I mentioned Deimorz.

      I’m not an IT professional. My brothers currently are which helped me learn most of what I know. I’ve supplemented that over the years with whatever info I came across online. What she’s saying sounds like crazy town to me. But since I’m not a hacker, is there a way to use the sidebar or wiki area to hack into a subreddit?

      Thanks in advance to anyone who pities me by providing a detailed answer to this thinly veiled request to help me win an internet argument 🙇🏾‍♀️.

      10 votes
    3. Sysadmin Appreciation Day

      Barely half an hour ago, I wrote a comment linking to this entertaining piece and re-discovered this little snippet: Most people don’t even know what sysadmins do, but trust me, if they all took a...

      Barely half an hour ago, I wrote a comment linking to this entertaining piece and re-discovered this little snippet:

      Most people don’t even know what sysadmins do, but trust me, if they all took a lunch break at the same time they wouldn’t make it to the deli before you ran out of bullets protecting your canned goods from roving bands of mutants.

      Having not had a dedicated sysadmin to help me with the myriad of headaches I've had to deal with over the last few months, this has only proven to me to be a truer statement than I had ever realized. Then, out of curiosity, I decided to look into when sysadmin appreciation day was. It turns out that, quite serendipitously, it happens to be today.

      So, with that in mind, I thought I would take a moment to remind you all to remind your sysadmins just how much you appreciate them keeping the roving bands of mutants at bay with all that they do. And to those of you who are yourselves sysadmins, keep being awesome :)

      29 votes
    4. For any given product, why is the iOS client often the best client?

      Background: I was deciding what to do since we use Atlassian’s Stride and it will be sunsetted. For us, the options are Teams or Slack. I’m going to give Teams a try since we already pay for it....

      Background:
      I was deciding what to do since we use Atlassian’s Stride and it will be sunsetted. For us, the options are Teams or Slack. I’m going to give Teams a try since we already pay for it. Someone I know also happens to be a PM there. I texted him “wow, Teams iOS has a 4.7 rating in the App Store!” He said, yes, it’s probably our best client. It made me realize that this is very often the case. The iOS client is often the best client for many services.

      Questions:
      Do you all find this to be true as well?

      If so, why do you think this is? iOS itself? iOS app guidelines? iOS devs are more product minded? Android device fragmentation?

      Any and all thoughts appreciated.

      note: I am mobile OS agnostic, I use them all (both) regularly.

      12 votes
    5. Programming Challenge: creative FizzBuzz

      Pretty standard: Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which...

      Pretty standard:

      Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.

      The twist: come up with the most creative or unusual way to solve this in your language of choice.

      39 votes
    6. Programming Challenge: Freestyle textual analysis.

      I just realized that I completely glossed over this week's programming challenge. For this week, let's do something more flexible: write a program that accepts a file as input--either through a...

      I just realized that I completely glossed over this week's programming challenge. For this week, let's do something more flexible: write a program that accepts a file as input--either through a file name/path or through standard input--and perform any form of analysis you want on its contents. That's it!

      For instance, you could count the occurrences of each word and find the most common ones, or you could determine the average sentence length, or the average unique words per sentence. You could even perform an analysis on changes in words and sentence structure over time (could be useful for e.g. poetry where metre may play an important role). You can stick with simple numbers or dive right into the grittiest forms of textual analysis currently available. You could output raw text or even a graphical representation. You could even do a bit of everything!

      How simple or complex your solution ends up being is completely up to you, but I encourage you to challenge yourself by e.g. learning a new language or about different textual analysis techniques, or by focusing on code quality rather than complexity, or even by taking a completely different approach to the problem than you ordinarily would. There are a lot of learning opportunities available here.

      11 votes
    7. Thoughts on a ~comp survey of some sort?

      After seeing the "what OS do you use?" thread earlier, I was wondering what everyone here on ~comp would think of a sort of group demographics survey. I think that it would be super interesting to...

      After seeing the "what OS do you use?" thread earlier, I was wondering what everyone here on ~comp would think of a sort of group demographics survey. I think that it would be super interesting to see the data on things like preferred OS, main programming language, preferred text editor/IDE, device OEM, etc.

      14 votes
    8. Programming Challenge - Let's build some AI!

      Hi everyone! In this challenge, we will build simple genetic algorithm. The goal is to create genetic algorithm that will learn and output predefined text ("Hello World!"). The goal can be...

      Hi everyone! In this challenge, we will build simple genetic algorithm.

      The goal is to create genetic algorithm that will learn and output predefined text ("Hello World!").

      The goal can be achieved with any language and you'll need just simple loops, collection and knowledge how to create and use objects, even beginners can try to complete this challenge.

      How?

      I'll try to explain it as best as I can. Genetic algorithms are approximation algorithms - they often do not find the best solution, but they can find very good solutions, fast. It's used when traditional algorithms are either way too slow, or they even don't exist. It's used to, for example, design antennas, or wind turbines. We will use it to write "Hello World".

      First of all, we define our Entity. It is solution to given problem, it can be list of integers that describe antenna shape, decision tree, or string ("Hello World"). Each entity contains the solution (string solution) and fitness function. Fitness function says, how good our entity is. Our fitness function will return, how similar is entity solution text to "Hello World" string.

      But how will the program work? First of all, we will create list of entities List<Entity>. We will make, for example, 1000 entities (randomly generated). Their Entity.solution will be randomized string of length 11 (because "Hello World" is 11 characters long).

      Once we have these entities, we will repeat following steps, until the best entity has fitness == 1.0, or 100% similarity to target string.

      First of all, we compute fitness function of all entities. Then, we will create empty list of entities of length 1000. Now, we will 1000-times pick two entities (probably weighted based on their fitness) and combine their strings. We will use the string to create new entity and we will add the new entity to the new list of entities.

      Now, we delete old entities and replace them with entities we just made.

      The last step is mutation - because what if no entity has the "W" character? We will never get our "Hello World". So we will go through every entity and change 5% (or whatever number you want) of characters in their solution to random characters.

      We let it run for a while - and it is done!

      So to sum up what we did:

      entities <- 1000 random entities
      while entities.best.fitness < 1:
        for every entity: compute fitness
        newEntities <- empty list
        1000-times:
          choose two entities from "entities", based on their fitness
          combine solutions of these entities and make newEntity
          newEntities.add(newEntity)
        for every entity: mutate // Randomly change parts of their strings
      
      print(entities.best.solution) // Hello World!
      

      Now go and create the best, fastest, and most pointless, genetic algorithm we've ever seen!

      23 votes
    9. File sharing over a network

      Me and my friend arrive at an arbitrary place, we have access to a network from there. Now, we want to share a file and the network connection is all we have. The challenge: make the file go from...

      Me and my friend arrive at an arbitrary place, we have access to a network from there. Now, we want to share a file and the network connection is all we have. The challenge: make the file go from my device to my friends device in a pure p2p setting. If you know, for sure, that incoming connections are allowed this is very simple but here i want to explore which solutions exist that do not assume this.

      Assumptions:

      • Same network altough possibly different access points (one might be wired and the other wireless)
      • We have no prior knowledge about the network, incoming traffic might be blocked (outgoing isn't for sure)
      • No extra machines can aid in the transaction (no hole punching etc)
      • Should work reliably for any kind of device that you have free -- as in freedom -- control over. that is PCs, android phones/tablets and macs. most of Apple's other hardware can be excluded because they don't allow for anything anyway.
      • hard mode: We are both digitally illiterate

      Goal:

      • Send a file, p2p, from one party to another.

      Me (MSc cs) and my friend (PhD cs) tried to do this last week. And it appears to be among the hardest problems in CS. I would like to discuss this and hear which solutions you might have for this problem.

      Edits:

      1. this is not an assignment
      2. Added some specifics to the assumption set
      3. we're looking for practical solutions here.
      4. more specs
      10 votes
    10. Have any of you set up GPU passthrough for a virtual machine?

      Right now I dual boot windows 10 and fedora, windows for gaming, fedora for everything else. I'm considering running linux as my only native operating system, and running windows in a virtual...

      Right now I dual boot windows 10 and fedora, windows for gaming, fedora for everything else. I'm considering running linux as my only native operating system, and running windows in a virtual machine for gaming. This will be more convenient than restarting my pc every time I want to play a game, and I'll feel better about having windows sandboxed in a VM than running natively on my computer.

      To get gaming performance out of a virtual machine, I'm planning to have two gpus. One for linux to use, and one reserved exclusively for the virtual machine.

      Have any of you set up a computer like this before? What was your experience like? How was the performance?

      16 votes
    11. Programming Challenge: Construct and traverse a binary tree.

      It's that time of week again! For this week's programming challenge, I thought I would focus on data structures. Goal: Construct a binary tree data structure. It may handle any data type you...

      It's that time of week again! For this week's programming challenge, I thought I would focus on data structures.

      Goal: Construct a binary tree data structure. It may handle any data type you choose, but you must handle sorting correctly. You must also provide a print function that prints each value in the tree on a new line, and the values must be printed in strictly increasing order.

      If you're unfamiliar with this data structure, it's a structure that starts with a single "root" node, and this root can have a left child, right child, both, or neither. Each of these child nodes is exactly the same as the root node, except the root has no parent. This branching structure is why it's called a tree. Furthermore, left descendants always have values smaller than the parent, and right descendants always have larger values.

      12 votes
    12. Full blown SSH servers within Docker containers?

      Trying to get a sense on how the networking would go down? If I had one public IP address and say 4 Docker containers on the host, how would the SSH connections work? Would I have to reserve ports...

      Trying to get a sense on how the networking would go down?

      If I had one public IP address and say 4 Docker containers on the host, how would the SSH connections work? Would I have to reserve ports for each container?

      7 votes