• Activity
  • Votes
  • Comments
  • New
  • All activity
    1. What are the main considerations/downsides to make before adding an index to a column

      I was asked this question in an interview and I said the downsides would be extra disk space used to store it and more disk writes from the database to maintain the index on updates. I asked a...

      I was asked this question in an interview and I said the downsides would be extra disk space used to store it and more disk writes from the database to maintain the index on updates. I asked a friend and he said the downsides are space used in memory to store the index as well as the fact that an index could take days to build on a large dataset.

      What does everyone here think about this question?

      8 votes
    2. 100s of tabs: what is there?

      Those of you who keep hundreds of tabs open: I'm curious how and why you use them. I'd hoard tabs in the past, but in a sad incident a browser (Firefox) restart caused the loss of all my 10s of...

      Those of you who keep hundreds of tabs open: I'm curious how and why you use them. I'd hoard tabs in the past, but in a sad incident a browser (Firefox) restart caused the loss of all my 10s of open tabs that was accumulated over weeks long research about a topic, I decided to never trust tabs again. Now I'm making use of my bookmars toolbar, Org mode and Instapaper for most of the stuff having many tabs open was the method before. So, for me, tabs were for keeping stuff handy during research, read-it-later lists, and temporary bookmarks. What are the use cases for you?

      19 votes
    3. Seeking recommendations for infosec podcasts

      I have been listening to "Darknet Diaries" and it's a great podcast, but I am looking for more. Maybe more technical. Does anyone have any good recommendations? Thanks! Edit: if you are like me,...

      I have been listening to "Darknet Diaries" and it's a great podcast, but I am looking for more. Maybe more technical.

      Does anyone have any good recommendations? Thanks!

      Edit: if you are like me, and learning about this stuff, here is an interesting and hilarious episode of mini-stories from Darknet Diaries: https://darknetdiaries.com/episode/22/

      8 votes
    4. Programming Challenge: Text compression

      In an effort to make these weekly, I present a new programming challenge. The challenge this week is to compress some text using a prefix code. Prefix codes associate each letter with a given bit...

      In an effort to make these weekly, I present a new programming challenge.

      The challenge this week is to compress some text using a prefix code. Prefix codes associate each letter with a given bit string, such that no encoded bitstring is the prefix of any other. These bit strings are then concatenated into one long integer which is separated into bytes for ease of reading. These bytes can be represented as hex values as well. The provided prefix encoding is as follows:

      char value char value
      ' ' 11 'e' 101
      't' 1001 'o' 10001
      'n' 10000 'a' 011
      's' 0101 'i' 01001
      'r' 01000 'h' 0011
      'd' 00101 'l' 001001
      '~' 001000 'u' 00011
      'c' 000101 'f' 000100
      'm' 000011 'p' 0000101
      'g' 0000100 'w' 0000011
      'b' 0000010 'y' 0000001
      'v' 00000001 'j' 000000001
      'k' 0000000001 'x' 00000000001
      'q' 000000000001 'z' 000000000000

      Challenge

      Your program should accept a lowercase string (including the ~ character), and should output the formatted compressed bit string in binary and hex. Your final byte should be 0 padded so that it has 8 bits as required. For your convenience, here is the above table in a text file for easy read-in.

      Example

      Here is an example:

      $> tildes ~comp
      10010100 10010010 01011010 10111001 00000010 11000100 00110000 10100000
      94 92 5A B9 02 C4 30 A0
      

      Bonuses

      1. Print the data compression ratio for a given compression, assuming the original input was encoded in 8 bit ASCII (one byte per character).
        2. Output the ASCII string corresponding to the encoded byte string in addition to the above outputs.
      2. @onyxleopard points out that many bytes won't actually be valid ASCII. Instead, do as they suggested and treat each byte as an ordinal value and print it as if encoded as UTF-8.
      3. An input prefixed by 'D' should be interpreted as an already compressed string using this encoding, and should be decompressed (by inverting the above procedure).

      Previous Challenges (I am aware of prior existing ones, but it is hard to collect them as they were irregular. Thus I list last week's challenge as 'Week 1')
      Week 1

      13 votes
    5. Programming Challenge: Dice Roller

      Its been a while since we did one of these, which is a shame. Create a program that takes is an input of the type: "d6 + 3" or "2d20 - 5", and return a valid roll. The result should display both...

      Its been a while since we did one of these, which is a shame.

      Create a program that takes is an input of the type: "d6 + 3" or "2d20 - 5", and return a valid roll.
      The result should display both the actual rolls as well as the final result. The program should accept any valid roll of the type 'xdx'
      Bonuses:

      • Multiplication "d6 * 3"
      • Division "d12 / 6"
      • Polish notation "4d6 * (5d4 - 3)"

      As a side note, it would be really cool if weekly programming challenges became a thing

      33 votes
    6. What OS do you use and what are your favourite programs?

      I saw back in January that a lot of you were on Linux, I guess I should've expected that considering it's ~comp but I'm curious how the trend is going. But to spice things up a little bit more,...

      I saw back in January that a lot of you were on Linux, I guess I should've expected that considering it's ~comp but I'm curious how the trend is going. But to spice things up a little bit more, tell us about you favourite programs, any hidden gems?

      I personally run a fairly standard Fedora 30 install running gnome and some flatpaks. I'd say my favourite programs are

      Gnome Builder :

      Well, I've been trying to fight the electron uprising while still using a modern and open source IDE and well, I think it works great and looks pretty good too.

      Dino.im (Using the Flatpak PR) :

      It's light, supports XMPP and looks relatively modern, what more could you ask?

      Firefox gnome theme :

      It's not really a program and just really a skin for Firefox but I really like it. It integrates pretty neatly with the rest of the desktop. Can't wait for the Gnome 3.32 changes to come in though since it kinda clashes with the new theme.

      26 votes
    7. I challenge you to use Epiphany for a week!

      When Edge died, I got worried about loosing competition to the Blink engine and as such, I went exploring other alternatives to realize.. there's not a whole lot, there's blink, gecko and webkit....

      When Edge died, I got worried about loosing competition to the Blink engine and as such, I went exploring other alternatives to realize.. there's not a whole lot, there's blink, gecko and webkit.

      So with that, I decided to try epiphany - Gnome's web browser. It uses Webkit which is what Blink was forked from so it's not terribly different in theory but the years apart has made that more apparent. It's fairly elegant in my opinion and it lacks some features, sure.


      Anyways, to get to what I wanted to do this week, well, I'd like to challenge you all to use it for a week, mostly for bug hunting purposes and possibly to throw ideas at the project. Worth mentioning, I'm not affiliated with the project, just a user.

      So to make sure we're all on the same page, we'll use the development Epiphany flatpak, this way we can be sure that the problem is in the current codebase. So, to install it :

      Let's install the gnome-nightly repos as per instructions here :

      flatpak remote-add --if-not-exists gnome-nightly https://sdk.gnome.org/gnome-nightly.flatpakrepo
      flatpak remote-add --if-not-exists gnome-apps-nightly --from https://sdk.gnome.org/gnome-apps-nightly.flatpakrepo
      

      Then, let's install the development version by doing so :

      flatpak install org.gnome.Epiphany.Devel
      

      Then just launch it and have fun with it!


      if you run into any bugs, look at the contribution guide here and report the bugs in the repo after checking that the bug is not already present of course!

      12 votes