• Activity
  • Votes
  • Comments
  • New
  • All activity
    1. Breaking all the rules

      In most of my programming, I try and remain professional, and do things in a readable, maintainable way, that doesn't involve pushing the language to breaking point. But, occasionally, I give...

      In most of my programming, I try and remain professional, and do things in a readable, maintainable way, that doesn't involve pushing the language to breaking point.

      But, occasionally, I give myself free reign. What if you didn't care about the programmer who came after you? What if you didn't care about what a programmer should do in a certain circumstance?

      For myself, over the years I've written and rewritten a C library, I like to call CNoEvil. Here's a little taste of what you could do:

      #define EVIL_IO
      #define EVIL_COROUTINE
      #include "evil.h"
      
      proc(example, int)
        static int i = 0;
        coroutine();
        While 1 then
          co_return(++i);
        end
        co_end();
        return i;
      end
      
      Main then
        displayln(example());
        displayln(example());
      end
      

      (And yes, that compiles. Without warnings. Even with -Wpedantic.)

      So... Here's the challenge:

      Ignoring the rules, and best practices... How can you take your favourite programming language... And make it completely unrecogniseable?

      (Might be best to choose a language with macros, like Nim, Rust, any of the Lisps. Though, you can still do some impressively awful things in Java or Python, thanks to overloading inbuilt classes.)

      Challenge Ideas:

      • Make Python look like C
      • Make Java look like Python
      • Make anything look like BrainFuck

      I don’t know how to really explain my fascination with programming, but I’ll try. To somebody who does it, it’s the most interesting thing in the world. It’s a game much more involved than chess, a game where you can make up your own rules and where the end result is whatever you can make of it. - Linus Torvalds

      21 votes
    2. XML Data Munging Problem

      Here’s a problem I had to solve at work this week that I enjoyed solving. I think it’s a good programming challenge that will test if you really grok XML. Your input is some XML such as this:...

      Here’s a problem I had to solve at work this week that I enjoyed solving. I think it’s a good programming challenge that will test if you really grok XML.

      Your input is some XML such as this:

      <DOC>
      <TEXT PARTNO="000">
      <TAG ID="3">This</TAG> is <TAG ID="0">some *JUNK* data</TAG> .
      </TEXT>
      <TEXT PARTNO="001">
      *FOO* Sometimes <TAG ID="1">tags in <TAG ID="0">the data</TAG> are nested</TAG> .
      </TEXT>
      <TEXT PARTNO="002">
      In addition to <TAG ID="1">nested tags</TAG> , sometimes there is also <TAG ID="2">junk</TAG> we need to ignore .
      </TEXT>
      <TEXT PARTNO="003">*BAR*-1
      <TAG ID="2">Junk</TAG> is marked by uppercase characters between asterisks and can also optionally be followed by a dash and then one or more digits . *JUNK*-123
      </TEXT>
      <TEXT PARTNO="004">
      Note that <TAG ID="4">*this*</TAG> is just emphasized . It's not <TAG ID="2">junk</TAG> !
      </TEXT>
      </DOC>
      

      The above XML has so-called in-line textual annotations because the XML <TAG> elements are embedded within the document text itself.

      Your goal is to convert the in-line XML annotations to so-called stand-off annotations where the text is separated from the annotations and the annotations refer to the text via slicing into the text as a character array with starting and ending character offsets. While in-line annotations are more human-readable, stand-off annotations are equally machine-readable, and stand-off annotations can be modified without changing the document content itself (the text is immutable).

      The challenge, then, is to convert to a stand-off JSON format that includes the plain-text of the document and the XML tag annotations grouped by their tag element IDs. In order to preserve the annotation information from the original XML, you must keep track of each <TAG>’s starting and ending character offset within the plain-text of the document. The plain-text is defined as the character data in the XML document ignoring any junk. We’ll define junk as one or more uppercase ASCII characters [A-Z]+ between two *, and optionally a trailing dash - followed by any number of digits [0-9]+.

      Here is the desired JSON output for the above example to test your solution:

      {
        "data": "\nThis is some data .\n\n\nSometimes tags in the data are nested .\n\n\nIn addition to nested tags , sometimes there is also junk we need to ignore .\n\nJunk is marked by uppercase characters between asterisks and can also optionally be followed by a dash and then one or more digits . \n\nNote that *this* is just emphasized . It's not junk !\n\n",
        "entities": [
          {
            "id": 0,
            "mentions": [
              {
                "start": 9,
                "end": 18,
                "id": 0,
                "text": "some data"
              },
              {
                "start": 41,
                "end": 49,
                "id": 0,
                "text": "the data"
              }
            ]
          },
          {
            "id": 1,
            "mentions": [
              {
                "start": 33,
                "end": 60,
                "id": 1,
                "text": "tags in the data are nested"
              },
              {
                "start": 80,
                "end": 91,
                "id": 1,
                "text": "nested tags"
              }
            ]
          },
          {
            "id": 2,
            "mentions": [
              {
                "start": 118,
                "end": 122,
                "id": 2,
                "text": "junk"
              },
              {
                "start": 144,
                "end": 148,
                "id": 2,
                "text": "Junk"
              },
              {
                "start": 326,
                "end": 330,
                "id": 2,
                "text": "junk"
              }
            ]
          },
          {
            "id": 3,
            "mentions": [
              {
                "start": 1,
                "end": 5,
                "id": 3,
                "text": "This"
              }
            ]
          },
          {
            "id": 4,
            "mentions": [
              {
                "start": 289,
                "end": 295,
                "id": 4,
                "text": "*this*"
              }
            ]
          }
        ]
      }
      

      Python 3 solution here.

      If you need a hint, see if you can find an event-based XML parser (or if you’re feeling really motivated, write your own).

      4 votes
    3. What are some of your favorite tools that have given individual games a new life?

      I grew up playing DOOM, but if I were to boot up the original game I would find it frustrating to play by modern standards (e.g. mouse movement?!). Thankfully, there are a ton of source ports that...

      I grew up playing DOOM, but if I were to boot up the original game I would find it frustrating to play by modern standards (e.g. mouse movement?!). Thankfully, there are a ton of source ports that modernize the engine and make the game more accessible to current gaming sensibilities (e.g. WASD-movement). They're basically community remasters of the game.

      It got me wondering about what other games have strongly benefited from tools that exist outside of the game itself.

      Examples of what I mean:

      1. Source ports (e.g. DOOM)
      2. Community bugfixes (e.g. Vampire: The Masquerade - Bloodlines)
      3. Restored/extended content (e.g. Star Wars: Knights of the Old Republic II)
      4. Significant mods (e.g. Frostfall for Skyrim)
      5. Rulesets/challenges (e.g. Nuzlocke Challenge for Pokémon)
      6. Anything else that doesn't fit the above categories
      15 votes
    4. Programming Challenge: Polygon analysis.

      It's time for another programming challenge! Given a list of coordinate pairs on a 2D plane that describe the vertices of a polygon, determine whether the polygon is concave or convex. Since a...

      It's time for another programming challenge!

      Given a list of coordinate pairs on a 2D plane that describe the vertices of a polygon, determine whether the polygon is concave or convex.

      Since a polygon could potentially be any shape if we don't specify which vertices connect to which, we'll assume that the coordinates are given in strict order such that adjacent coordinates in the list are connected. Specifically, if we call the list V[1, n] and say that V[i] <-> V[j] means "vertex i and vertex j are connected", then for each arbitrary V[i] we have V[i-1] <-> V[i] <-> V[i+1]. Moreover, since V[1] and V[n] are at the ends of the list, V[1] <-> V[n] holds (i.e. the list "wraps around").

      Finally, for simplicity we can assume that all coordinates are unique, that all polygon descriptions generate valid polygons with 3 or more non-overlapping sides, and that, yes, we're working with coordinates that exist in the set of real numbers only. Don't over-complicate it :)

      For those who want an even greater challenge, extend this out to work with 3D space!

      8 votes
    5. Programming Challenge: Counting isolated regions.

      Another week, another challenge! This time, assume you're given a grid where each . represents an empty space and each # represents a "wall". We'll call any contiguous space of .s a "region". You...

      Another week, another challenge!

      This time, assume you're given a grid where each . represents an empty space and each # represents a "wall". We'll call any contiguous space of .s a "region". You can also think of a grid with no walls the "base" region. The walls may subdivide the base region into any number of isolated sub-regions of any shape or size.

      Write a program that will, given a grid description, compute the total number of isolated regions.

      For example, the following grid has 5 isolated regions:

      ....#....#
      ....#.###.
      ....#.#.#.
      #...#..#..
      .#..#...#.
      
      16 votes
    6. Fucked Up - Dose Your Dreams (2018)

      Apple Music BandCamp Spotify Canadian hardcore punk outfit Fucked Up is back with their first new full length since 2014. The group has been known for their art rock output as of late, concept EPs...

      Apple Music
      BandCamp
      Spotify

      Canadian hardcore punk outfit Fucked Up is back with their first new full length since 2014. The group has been known for their art rock output as of late, concept EPs they put out years following the Chinese Zodiac. The band is known for disliking each other, sometimes to the point of physical altercations. It is likely a side effect from both the front man and one of the guitarists being songwriters and lyricists, resulting in butting heads. But the result is hard to argue with, Fucked Up has been adored by critics since they came on the scene.

      This album sees one of those two songwriters, lead vocalist Damian Abraham, take a back seat. His vocals don't even appear in ever song on this album. Instead, the whole group does leads at various points throughout the record. It's much more experimental and broad in its genre, employing a lot of pop influences. This results in an album that some how continues the art rock sound they had been cultivating and challenging the listener, while at the same time being very poppy. With a mammoth 18 tracks, the album gives the band plenty of room to explore this new space they find themselves in.

      Like the past couple Fucked Up albums, it's also concept. It has a story and follows a main character in rock opera-like fashion. Their anti-capitalist message comes through in the magical reality of the story of a factory worker that is shown the drudgery of modern life by a sorceress.

      It's ambitious, fun and at the end of day, still very much punk. Super enjoyable, in my opinion. A good introduction to the band if you've never heard them, though you may find their past work a little more one dimensional.

      4 votes
    7. Queer representation in middle grade and young adult books

      I'm a teacher, and two years ago I had a student come out to me as trans. He recommended the book The Other Boy by M.G. Hennessey to me, saying that it was the first book he'd read that was about...

      I'm a teacher, and two years ago I had a student come out to me as trans. He recommended the book The Other Boy by M.G. Hennessey to me, saying that it was the first book he'd read that was about someone like himself. The same goes for another student with John Green & David Levithan's Will Grayson, Will Grayson. Another student this year shared a similar sentiment about Ivy Aberdeen's Letter to the World by Ashley Herring Blake.

      I don't know how well-known this is outside of educators, but there has been a recent explosion of books for middle grade and young adult audiences that have openly queer characters and themes. When I was growing up we pretty much had only Annie on My Mind, and even then there was a good chance it wasn't stocked in the library. Now there are hundreds of books published each year and available in school libraries across the country.

      This is great for two reasons:

      1. I've had many students who have been able to read about characters that they can directly identify with.

      2. I've had many students who do not identify as queer (to the best of my knowledge) read and empathize with these characters.

      I can't say whether it's because of the books or if the books are simply an indicator of changing social norms, but I've watched acceptance of queer individuals of all types increase over my years in the profession.

      Last week was Banned Books Week, and our librarian gave a small presentation to the students about why books get challenged or banned and gave some prominent examples. When she brought up Drama by Raina Telgemeier and mentioned that one of the reasons it was challenged was for "including LGBT characters," my class's response was audible shock. Ten years ago, the response would have been laughter or derision.

      Students self-select books from the library for free reading, and I'm always checking in with them to see what they've picked. Right now, I have a student reading Alex Gino's George, one reading the aforementioned The Other Boy, and another reading The 57 Bus by Dashka Slater. I have no idea how these students identify, but honestly, it doesn't matter. The fact that they were able to check those books out and read them is pretty powerful to me. The fact that they chose them on their own is also pretty awesome. Nobody is making students read books about queer characters. They're choosing to!

      In fact, one of my favorite things to hear from students about books like those is that they were "boring." Why? Well, because that's pretty much the default adolescent response to any book these days (let's be honest: it's hard for reading to compete with Fortnite), but mostly because it means the student is reading the story free from any prejudice. The book is not seen as inflammatory or controversial or even brave. It's just a story about any regular person--the kind that many kids often find, in this day and age, boring.

      And, for someone who's spent a lot of his life having his identity made by others to be A Significant Issue, it turns out boring is a pretty cool thing to be.

      22 votes
    8. Programming Challenge: Compute the shortest path to visit all target spots on a grid.

      Let's do something a little more challenging this time. Given an MxN grid of arbitrary size, and given a random starting place on that grid and a list of points to visit, find the shortest path...

      Let's do something a little more challenging this time.

      Given an MxN grid of arbitrary size, and given a random starting place on that grid and a list of points to visit, find the shortest path such that you visit all of them. Path lengths will be computed using taxicab distances rather than strict coordinate distance calculations.

      There are no restrictions on expected input this time. Output should be the total distance traveled between points.


      Example

      Assume that we use the character # to denote a spot on the grid, the character @ to denote your starting point, and the character * to denote a place on the grid that you're required to visit. One such grid may look something like this:

      ######
      ######
      **####
      #*####
      #*#*##
      #@####
      ######
      

      In this case, let's say that the bottom-left point on the grid is point (0, 0) and we're starting on point (1, 1). One valid solution would be to move to point (3, 2), then (1, 2), then (1, 3), then (1, 4), and finally (0, 4). The shortest path available is thus 8. Note that it's not enough just to visit the next nearest point on the grid!

      15 votes
    9. Syntax highlighting for the coders, invites for everyone

      Another open-source contribution has now been implemented - @Soptik wrote the code to add support for syntax highlighting, which should be great for topics like the programming challenges in...

      Another open-source contribution has now been implemented - @Soptik wrote the code to add support for syntax highlighting, which should be great for topics like the programming challenges in ~comp.

      I'll update the formatting documentation to include info about it shortly, but it's straightforward to use. You have to use a "fenced code block", which usually means that you put 3 backticks above and below the code, and include the name of the language after the 3 backticks above it. So for example, markdown like this:

      ```python
      def word_count(string: str) -> int:
          """Count the number of words in the string."""
          return len(WORD_REGEX.findall(string))
      ```
      

      will render as:

      def word_count(string: str) -> int:
          """Count the number of words in the string."""
          return len(WORD_REGEX.findall(string))
      

      This is being done by the "Pygments" library, which supports a lot of languages: http://pygments.org/docs/lexers/

      And completely unrelated to that, it's been a while since I gave everyone some invite codes, so I've topped everyone back up to 5 (and as always, feel free to let me know if you need more). You can access them on this page: https://tildes.net/invite

      That's all for now, thanks everyone (and @Soptik in particular). There should also be more changes coming before too long, I've been working on some major updates to the comment-tagging system and hopefully should be able to implement those soon.

      78 votes
    10. Programming Mini-Challenge: KnightBot

      Another programming mini-challenge for you. It's been a month since the first one and that seemed to be rather successful. (I appreciate that there are other challenges on here but trying to sync...

      Another programming mini-challenge for you. It's been a month since the first one and that seemed to be rather successful. (I appreciate that there are other challenges on here but trying to sync with them seems tricky!)

      A reminder:
      I'm certain that many of you might find these pretty straight forward, but I still think there's merit in sharing different approaches to simple problems, including weird-and-wonderful ones.


      KnightBot


      Info

      You will be writing a small part of a Chess program, specifically focusing on the Knight, on an 8 x 8 board.


      Input

      The top-left square of the board will have index 0, and the bottom-right square will have index 63.

      • The first input is the starting square of the knight.
      • The second input is the requested finishing square of the knight.
      • The third input is the number of maximum moves allowed.

      Output

      The expected outcome is either True or False, determined by whether or not the Knight can reach the requested finishing square within the number of allowed moves when stating on the starting square.

      e.g. The expected output for the input 16, 21, 4 is True since the Knight can move 16->33->27->21, which is 3 moves.
      

      Extensions

      Some additional ideas for extending this challenge...

      1. Instead of an 8x8, what if the board was nxn?
      2. Instead of "within x moves", what if it was "with exactly x moves?"
      3. Instead of a traditional Knight's move (2 long, 1 short), what if it was n long and m short?
      4. What if the board was infinite?
      5. What if the board looped back around when crossing the edges? (e.g. the square to the right of 7 is 0)
      17 votes
    11. Nintendo Direct 9.13.2018 - Recap

      Host: Shinya Takahashi 3DS Announcements: Kirby's Extra Epic Yarn - Available 2019 The 2010 Wii game comes to Nintendo 3DS. Includes all stages from the Wii version plus additional abilities, new...

      Host: Shinya Takahashi

      3DS Announcements:

      • Kirby's Extra Epic Yarn - Available 2019
        The 2010 Wii game comes to Nintendo 3DS. Includes all stages from the Wii version plus additional abilities, new Devilish Mode (a time attack mode), and new minigames

      • Mario and Luigi: Bowser's Inside Story + Bowser Jr.'s Journey - Available January 11, 2019
        Added Bowser Jr. story

      • Luigi's Mansion - Available October 12
        The original Luigi's Mansion is coming to the Nintendo 3DS with a new 2 player co-op mode. If both players ows the game one will play as a green blob version of Luigi. If only one own the game the second player will be able to use Download Play and challenge bosses.
        4 Amiibo are compatible with the game.

      • Yo-Kai Watch Blasters - Available now
        Free content coming later on Spetember 27. Adds Moon Rabbit Crew to the title screen, with bonuses for linking save datas, new missions, new areas, new Yo-Kai to befriend, and new boss.

      Switch Announcements

      • Luigi's Mansion 3 (working title) - 2019
        A new game in the Luigi's Mansion series

      • Splatoon 2 update, Ver.4

      • Mega Man 11 - Available October 2
        8 bosses.
        New double gear system, you can slow down time or powerup your attacks.
        The two Mega Men Amiibos are compatible.

      • Mario Tennis Aces update - Available September 19
        New characters: Birdo (all around), Shy Guy (Technical), Koopa Paratroopa (Technical) and Petey Piranha(Powerful). Can be acquired by playing online
        New updates coming until next June
        New mode: online only Co-op Challenge, available for limited periods of time. Will unlock in-game rewards such as new outfits, different color schemes and more.

      • Capcom Beat'em Up Bundle - Available September 18
        Includes Final Fight, The King of Dragons, Captain Commando, Knight of the Round, Warriors of Fate and two first-time console releases: Armored Warriors and Battle Circuit.
        4 player local and online co-op
        Pre-order available now

      • New Super Mario Bros. U Deluxe - Available January 11, 2019
        New characters: other than Mario, Luigi and Toad now you can play as Nabbit and Toadette.
        Nabbit doesn't take damage from enemies
        If Toadette powers up with a super crown she transforms into Peachette who can double jump, float slowly during free falls and get a boost back up when she falls into a pit.
        Includes New Super Luigi U. 164 courses between both games
        Single player Joy-Con, up to 4 player co-op.

      • Katamai Damacy Reroll - Available Winter 2018
        Gyro controls, Hd Rubles, Joy-Con controller sharing

      • Pokèmon Go Let's Go Pikachu and Let's Go Eevee - Available November 16
        Secret tecniques replace HM moves. Only your Pikachu and your Eevee can use them. They can also learn certain powerful moves. Only them.
        In handheld mode you can use touch screen to pet your Pokèmon and change its hairstyle depending on how you've petted it.
        2 new bundle that will include a Nintendo Switch system with specially designed dock, Pikachu and Eevee style Joy-Cons, one digital copy of the game and the Pokèball Plus accessory.

      • Diablo 3: Eternal Collection - Available November 2
        All Dlcs are included. Up to 3 players local and online co-op.
        Nintendo Switch exclusive: Ganondorf's armor.
        All Amiibos figures are compatible

      • Super Mario Party - Available October 5
        New 4 player co-op mode River Survival
        You can connect two Nintendo Switch in the Toads Rec Room mode.
        Characters' specific dice block with alternate numbering.
        80 minigames.
        Single player modes: Challenge Road (play thtough a series of minigames and complete specific tasks)
        Online Mariothon minigame mode (challenge other players around the world with 80 minigames to choose from)

      • Town (Working Title) - Availabe 2019
        Game Freak presents a brand new RPG set in one single village. Looks like story will be a major part in this incoming game

      • Citis Skylines Nintendo Switch Edition - Available today
        Includes two DLCs: After Dark and Snowfall

      • Daemon Ex Machina - Available 2019*
        Mech Game.
        You can change weapons on the fly and you'll keep them for the whole game if you manage to return them to your base. Long range and melee weapons.
        You can exit your mech to explore the field on foot. You can make enhancements to you human character and your mecha abilities will be augmented as well
        Up to 4 player online co-op

      • Yoshi's Crafter World - Available Spring 2019
        New Yoshi game.
        Local Joy-Con Co-op

      • Asmodee Digital tabletop games
        NOT A BUNDLE
        Full adaptation of best-selling tabletop games made by Asmodee Digital. They are the following:

      • Carcassonne - Available December 2018
        3D maps, solo mode, 4 player local multiplayer mode. Game's famous expansions available as paid DLC

      • The Lord of the Rings: Living Card Game - Available April 2019
        Play alone or alongside a second player.
        Story driven quests

      • Pandemic - Available March 2019*
        solo mode, 4 player local multiplayer mode
        Individually priced DLCs based on popular expansions.
        More is on the way: Catan and Munchkin

      • Sid Meier's Civilization VI - Available November 16
        4 player local multiplayer

      • Starlink: Battle for Atlas - Available October 16
        Exclusive missions for the Nintendo Switch with Star Fox, Peppy, Falco and Slippy from the Star Fox universe.

      • The World Ends with You Final Remix - Available October 12
        Square Enix RPG

      • Xenoblade Chronicles 2: Torna - The Golden Country - Available September 21
        Go back in time with this Xenoblade Chronicles 2 DLC
        Owner of the Season Pass can already download this new content

      • Warframe - Available November 20*
        Free to play co-op space ninja shooter game. Needs connections all time to play.

      • Just Dance 2019 - Available October 23*

      • Fifa 19 - Available September 28
        Available for pre-purchase tomorrow (9.14.2018)

      • Team Sonic Racing - Available this winter

      • NBA 2K19 - Available now

      • NBA 2K Playground 2 - Available this fall
        NBA arcade game

      • LEGO DC Super-Villains - Available october 16*

      • Final Fantasy Crystal Chronicle Remaster Edition - Available 2019
        GCo-op action RPG, with new online multiplayer mode.
        New areas added in dungeons.

      • Final Fantasy XV Poket Edition HD - Available today

      • Worlds of Final Fantsy Maxima - Available November 6
        New feature added: Avatar Change. It allows yo to transform into legendary characters from across the series storied history.

      • Chocobo's Mystery Dungeon Every Buddy! - Available this winter
        2007's Final Fantasy Fable Chocoboc Dungeon returns
        You can now befriend all the monsters
        Joy-Con local co-op multiplayer

      • Final Fantasy XII The Zodiac Age - Available 2019
        Comes to a Nintendo system for the first time
        New Speed Mode

      • Final Fantasy VII, Final Fantasy IX and Final Fantasy X and X-2 HD Remaster - Coming to Nintendo Switch in 2019 separately

      • Super Smash Bros Ultimate - Available November 2
        Isabelle (Animal Crossing) joins the fight!
        Hardware Bundle that includes a Nintendo Switch system with specially designed dock, a pair of Joy-Cons with the Smash Bros Symbol on them and a digital copy of the game.

      • Animal Crossing - Nintendo Switch - 2019
        A new game in the Animal Crossing series

      • GameCube controller adapter and GameCube controller Super Smash Bros. Ultimate Edition - Available November 2 while supplies last

      Nintendo Switch Online membership

      Begins on September 18 with the following prices:
      1 month 3.99 USD;
      3 months 7.99USD;
      12 months 19.99 USD;
      12 month Family Membership up to 7 people 34.99USD.
      Includes 5 features:

      • Online play, a variety of games is supported
      • 20 Nintendo Entertainment System (NES) games. You can find the complete list here. New title coming up. Includes local and online co-op.
      • Save Data Cloud
      • Smartphone App. Incluses: voice chat in certain games, additional infos in certain games (e.g. Splatoon 2)
      • Special Offers. No details, more to announce in the future.

      NES controllers for Switch - Available for pre-purchase starting September 18 on Nintendo.com
      59.99USD
      Nintendo Switch Online membership and Nintendo Account are required for the purchase.
      Left and right wireless controllers that you can use to play NES games with on the Switch. Recharge the same way as normal Joy-Cons.
      Contrllers do not include Joy-Con functionality.
      Orders are expeced to ship starting this December.

      17 votes
    12. [writing challenge]: say nothing.

      hey everyone! i was sitting down to write some today, and i kept coming up with lines and lyrics that were great, but for absolute vapid-type songs (gucci gang type stuff hahaha). i thought it...

      hey everyone!

      i was sitting down to write some today, and i kept coming up with lines and lyrics that were great, but for absolute vapid-type songs (gucci gang type stuff hahaha).

      i thought it would make for a fun challenge. whether you want to write a short story, a poem, maybe a little stageplay script - what's the largest amount of words you can use to express absolutely nothing?

      whether it be something like the lyrics for lil pump's "D Rose" or something like the internet-famous article "The Rumor Come Out: Does Bruno Mars is Gay?"

      how long of a piece of writing can you make, whilst saying absolutely nothing?

      6 votes
    13. Programming Challenge: Reverse Polish Notation Calculator

      It's been nearly a week, so it's time for another programming challenge! This time, let's create a calculator that accepts reverse Polish notation (RPN), also known as postfix notation. For a bit...

      It's been nearly a week, so it's time for another programming challenge!

      This time, let's create a calculator that accepts reverse Polish notation (RPN), also known as postfix notation.

      For a bit of background, RPN is where you take your two operands in an expression and place the operator after them. For example, the expression 3 + 5 would be written as 3 5 +. A more complicated expression like (5 - 3) x 8 would be written as 5 3 - 8 x, or 8 5 3 - x.

      All your program has to do is accept a valid RPN string and apply the operations in the correct order to produce the expected result.

      18 votes
    14. Programming Challenge: Merge an arbitrary number of arrays in sorted order.

      It looks like it's been over a week and a half since our last coding challenge, so let's get one going. This challenge is a relatively simple one, but it's complex enough that you can take a...

      It looks like it's been over a week and a half since our last coding challenge, so let's get one going. This challenge is a relatively simple one, but it's complex enough that you can take a variety of different approaches to it.

      As the title suggests, write a program that accepts an arbitrary number of arrays, in whatever form or manner you see fit (if you want to e.g. parse a potentially massive CSV file, then go nuts!), and returns a single array containing all of the elements of the other arrays in sorted order. That's it!

      Bonus points for creative, efficient, or generalized solutions!

      24 votes
    15. Genderqueer/gender bender/genderfuck fashion

      I was wondering if there were any fellow Waves that enjoyed dressing in a way that might confuse others on your gender, and if anybody had tips for others on how to blend masculine and feminine...

      I was wondering if there were any fellow Waves that enjoyed dressing in a way that might confuse others on your gender, and if anybody had tips for others on how to blend masculine and feminine styles/presentation.

      Definitions and sources on Genderfuck:

      Genderfuck
      Some nonbinary people may choose or need to present a 'clashing' combination of gender cues that are incongruous, challenging or shocking to those who expect others to fit the gender binary. For example, combining a beard with makeup and a padded bra. This practice of transgressively breaking the rules of gender presentation is known as genderfuck, genderfucking or sometimes genderpunk.
      https://nonbinary.miraheze.org/wiki/Nonbinary#Genderfuck

      Gender bender (also known as genderf*ck) is an informal term used to refer to a person who actively transgresses, or "bends," expected gender roles and presentation. This is usually achieved by combining masculine and feminine attributes in unexpected ways.
      http://gender.wikia.com/wiki/Gender_Bender

      19 votes
    16. Programming Challenge: Make a game in 1 hour!

      Background There's been some talk on ~ before, and it seems like there are quite a few people who are either interested in, learning, or working in game development, so I thought this could be a...

      Background

      There's been some talk on ~ before, and it seems like there are quite a few people who are either interested in, learning, or working in game development, so I thought this could be a fun programming challenge.

      This one is fairly open-ended: make a game in 1 hour. Any game, any engine, don't worry about art or sound or anything.

      Doing is the best way to learn. Most people's first project is something overly ambitious, and when they find that it's more difficult than they thought, they can get discouraged, or even give up entirely. This is why the 1 hour limit is important: it forces you to finish something, even if it's small. When you're done, you can come out of it saying you made a game, and you learned from it.

      Chances are the game might not be fun, look bad, be buggy, etc. But don't worry about that, everyone's game will have problems, and if you do create something really fun or innovative, congratulations, you have a prototype that you can expand on later!

      "Rules"

      Like I said before, these "rules" are pretty simple: make a game in (approximately) 1 hour. You can use any tools you want. If you use external assets (art, sound), it's probably best you use something you have the rights to (see resources). If you're completely new to game development/programming, your goal could even be to finish a tutorial.

      If you're the kind of person who tends to get carried away with these things, you might want to post a comment saying you're starting, then another one once you've finished your game.

      Please share your finished game, I'm sure everyone would love to try them! If your game is web-based, it can be hosted for free on Github Pages or Itch.io. If downloadable, it can be hosted for free on Google Drive, Mega, Dropbox, Itch.io, etc.

      Resources

      Engines

      If you're a beginner, a good engine to start with is LÖVE. It's very simple, and uses Lua, which is very easy to learn.

      If you're familiar with another language, you could use a library to make it in that language. Some examples:

      C++: SFML, SDL, Allegro

      Javascript: kontra, Phaser, pixi.js

      Python: pygame

      Rust: Piston, ggez, Amethyst

      If you want something more complex, consider Godot, Unity, or Unreal.

      You can also try something visual like Construct, Clickteam Fusion, or GDevelop

      Art

      For such a short time constraint, I'd suggest you use your own "programmer art": just use some basic shapes. Your primary focus should be gameplay.

      If you think you have time to find something, try looking on OpenGameArt.

      Sound

      You can make simple sound effects very quickly with sfxr (or in this case, a web port of sfxr called jsfxr).

      27 votes
    17. 100‐Word Writing Challenge № 2: “I can see [them], but [they] cannot see me.”

      We now have the opportunity to continue our 100-word writing prompt fun :) @Kat, the initiator of this writing club, nominated me as her successor as this round's topic keeper (or if we allow some...

      We now have the opportunity to continue our 100-word writing prompt fun :)

      @Kat, the initiator of this writing club, nominated me as her successor as this round's topic keeper (or if we allow some fantasy, the "queen of stories", as in the Decameron). I'm very happy, honoured, nervous ... and so eager to read your contributions!

      As a reminder of the rules, let us make the written piece exactly 100 words. Next weekend, I'll pass the garland to one of the writers, and they'll become the monarch of stories, bring to us a new topic.

      This week's prompt is in the title:

      I can see [them], but [they] cannot see me.

      Here the pronoun they, in the brackets, is a generic one. It can be anyone, anything, or ... let us know :)

      11 votes
    18. Programming Mini-Challenge: TicTacToeBot

      I've seen the programming challenges on ~comp as well as quite a few users who are interested in getting started with programming. I thought it would be interesting to post some 'mini-challenges'...

      I've seen the programming challenges on ~comp as well as quite a few users who are interested in getting started with programming. I thought it would be interesting to post some 'mini-challenges' that all could have a go at. I'm certain that many of you might find these pretty straight forward, but I still think there's merit in sharing different approaches to simple problems, including weird-and-wonderful ones.

      This is my first post and I'm a maths-guy who dabbles in programming, so I'm not promising anything mind-blowing. If these gain any sort of traction I'll post some more.

      Starting of with...


      TicTacToeBot


      Info

      You will be writing code for a programme that will check to see if a player has won a game of tic-tac-toe.


      Input

      The input will be 9 characters that denote the situation of each square on the grid.

      • 'X' represents the X-player has moved on that square.
      • 'O' represents the O-player has moved on that square.
      • '#' represents that this square is empty.

      Example:

      |O| |X|
      |X|X|O|    The input for this grid will be O#XXXOO##
      |O| | |
      

      Output

      The expected output is the character representing the winning player, or "#" if the game is not won.

      (e.g. The expected output for the example above is '#' since no player has won)


      29 votes
    19. Moderators of Reddit, tell us about your experiences in fostering quality discussion and content (or failures to do so)

      Since the moderator community here is quite large, I figure we would have quite alot of interesting perspectives over here in Tildes. Feel free to chip in even if you're not a moderator, or god...

      Since the moderator community here is quite large, I figure we would have quite alot of interesting perspectives over here in Tildes. Feel free to chip in even if you're not a moderator, or god forbid, moderate such subs as T_D. Having a range of perspectives is, as always, the most valuable aspect of any discussion.

      Here are some baseline questions to get you started:-

      • Did your subreddit take strict measures to maintain quality ala r/AskHistorians, or was it a karmic free-for-all like r/aww?

      • Do you think the model was an appropriate fit for your sub? Was it successful?

      • What were the challenges faced in trying to maintain a certain quality standard (or not maintaining one at all)?

      • Will any of the lessons learnt on Reddit be applicable here in Tildes?

      29 votes
    20. A general introduction to Tildes

      Lots of new folks seem to be coming in these past days, so I wanted to make a post that compiles some useful things to know, commonly asked questions, and a general idea of tildes history (short...

      Lots of new folks seem to be coming in these past days, so I wanted to make a post that compiles some useful things to know, commonly asked questions, and a general idea of tildes history (short though it may be). Please keep in mind that tildes is still in Alpha, and many features that are usually present such as repost detection haven't been implemented yet.

      Settings

      First of all, check out the settings page if you haven't yet. It's located in your user profile, on the right sidebar. There are different themes available, the account default is the 'white' theme, which you can change. I recommend setting up account recovery in case you forget your password, and toggle marking new comments to highlight new comments in a thread. There are more features available but you should go look in the settings yourself.

      Posting

      You can post a topic by navigating to a group and clicking on the button in the right sidebar. Tildes uses markdown, if you are not familiar with it check the text formatting doc page. Please tag your post so it is easier for other people to find, and check out the topic tagging guidelines. Some posts have a topic log in the sidebar that shows what changes were done to the post since it was posted. You can see an example here. Some people have the ability to add tags to posts, edit titles, and move posts to different groups. They were given the ability by Deimos, see this post.

      Topic Tags

      You can find all posts with the same tag by clicking on a tag on a post, which will take you to an url like https://tildes.net/?tag=ask, where ask is the tag you clicked on. Replace ask with whatever tag you want to search for. You can also filter tags within a group like this: https://tildes.net/~tildes?tag=discussion, and it will only show you posts within that group. Clicking on a tag while you are in a group achieves the same effect.

      You can also filter out posts with specific tags by going to your settings and defining topic tag filters.

      Comment Tags

      Comment tags are a feature that was present in the early days of tildes, but was removed because of abuse. There were five tags you can tag on someone else's comment: joke, noise, offtopic, troll, flame. The tags have no effect on sorting or other systematic features; they were only used to inform the user on the nature of a comment. The tags would show up along with the number of people who applied them, like this: [Troll] x3, [Noise] x5

      People used these tags as a downvote against comments they disliked, and because the tags appeared at the top of a comment in bright colors, they often would bias the user before they read the comment. The abuse culminated in the first person banned on the website, and the comment tags were disabled for tweaking.

      As of September 07, 2018, the comment tags have been re-enabled and are experimented with. Any account over a week old will have access to this ability. The tagging button is located on the centre bottom of a comment. You cannot tag your own comment. Here are the comment tagging guidelines from the docs.

      Currently, the tags are: exemplary, joke, offtopic, noise, malice. The exemplary tag can only be applied once every 8 hours, and requires you to write an anonymous message to the author thanking them for their comment. Similarly, applying the malice tag requires a message explaining why the comment is malicious. The tags have different effects on the comments, which you can read about here, and here.

      Search

      The search function is fairly primitive right now. It only includes the title and text of posts and their topic tags.

      Default sorting

      The current default sorting is activity, last 3 days in the main page, activity, all time in individual groups. Activity sort bumps a post up whenever someone replies to it. 'Last 3 days' mean that only posts posted in the past 3 days will be shown. You can change your default sort by choosing a different sort method and/or time period, and clicking the 'set as default' button that will appear on the right.

      Bookmarks

      You can bookmark posts and comments. The "bookmark" button is on the bottom of posts and comments. Your bookmarked posts can be viewed through the bookmark page in your user profile sidebar. Note: to unbookmark a post, you have to refresh first.

      Extensions

      @Emerald_Knight has compiled a list of user created extensions and CSS themes here: https://gitlab.com/Emerald_Knight/awesome-tildes

      In particular, I found the browser extension Tildes Extended by @crius and @Bauke very useful. It has nifty features like jumping to new comments, markdown preview and user tagging.

      Tildes Development

      Tildes is open source and if you want to contribute to tildes development, this is what you should read: https://gitlab.com/tildes/tildes/blob/master/CONTRIBUTING.md

      For those who can't code, you might still be interested in the issue boards on Gitlab. It contains known issues, features being worked on, and plans for the future. If you have a feature in mind that you want to suggest, try looking there first to see if others have thought of it already, or are working on it.


      Tildes' Design and Mechanics

      In other words, how is it going to be different from reddit? Below are some summaries of future mechanics and inspiration for tildes' design. Note: most of the mechanics have not been implemented and are subject to change and debate.

      1. Tildes will not have conventional moderators. Instead, the moderation duties will be spread to thousands of users by the trust system. [Trust people, but punish abusers]. More info on how it works and why it is designed that way:

      2. Instead of subreddits, there are groups, a homage to Usenet. Groups will be organized hierarchically, the first and only subgroup right now is ~tildes.official. Groups will never be created by a single user, instead, they will be created based on group interest [citation needed]. For example, if a major portion of ~games consists of DnD posts and they are drowning out all the other topics, a ~games.dnd subgroup would be created - either by petition, algorithm, or both[citation needed] - to contain the posts, and those who don't like DnD can unsubscribe from ~games.dnd. There is currently no way to filter out a subgroup from the main group.

      3. Tildes is very privacy oriented. See: Haunted by data


      Tildes History/Commonly answered questions

      I recommend you check out this past introduction post by @Amarok before anything else, it's a bit outdated but contains many interesting discussions and notable events that have happened on tildes. @Bauke also tracks noteworthy events each month on his website https://til.bauke.xyz/. Also see the FAQ in the docs. Other than that, the best way for you to get an idea of how tildes changed over time is to go to ~tildes.official and look at all the past daily discussions.

      Below are some scattered links that I found interesting, informative, or important:


      If anyone thinks of a link that should be included here, post a comment with the link and I'll edit it in.

      Markdown source for this post: https://pastebin.com/Kbbh7pYU (outdated, and probably will not be updated unless someone explicitly asks for it)

      To the rest: have fun!

      57 votes
    21. What little-known online co-op games do you enjoy and why?

      I'm a huge fan of co-op games and have played over 100 by now, sometimes I stumble on a little co-op game I had never heard of and give it a go, I'm curious to hear about them. I'm going to throw...

      I'm a huge fan of co-op games and have played over 100 by now, sometimes I stumble on a little co-op game I had never heard of and give it a go, I'm curious to hear about them.

      I'm going to throw in Clandestine, which is an asymmetric infiltration game where one player is a field operative in a 3rd person stealth shooter, and the other player is a hacker that has to control a little avatar on the network, manage CCTV cameras so the field operative isn't spotted, crack door key codes, direct the field operative to mission objectives, disable guards by overloading power and water utilities, and even call in for body cleanup and ammo/health drops.

      I love the asymmetric cooperative nature of the game and Hacktag appears to be similar, though I've never tried it. I'm played through the whole campaign as a field operative and now I'm going through as the hacker and finding myself enjoying a whole new way to play the game, which has been challenging.

      20 votes
    22. Programming Challenge: Two Wizards algorithm challenge

      I'm running out of ideas, if you have any, please make your own programming challenge. This challenge is about designing algorithm to solve this problem. Let's have game field of size x, y (like...

      I'm running out of ideas, if you have any, please make your own programming challenge.


      This challenge is about designing algorithm to solve this problem.

      Let's have game field of size x, y (like in chess). There are two wizards, that are standing at [ 0, 0 ] and are teleporting themselves using spells. The goal is to not be the one who teleports them outside of the map. Each spell teleports wizard by at least +1 tile. Given map size and collection of spells, who wins (they do not make any mistakes)?

      Here are few examples:


      Example 1

      x:4,y:5

      Spells: { 0, 2 }

      Output: false

      Description: Wizard A starts, teleporting both of them to 0, 2. Wizard B teleports them to 0, 4. Wizard A has to teleport them to 0,6, which overflows from the map, so he loses the game. Because starting wizard (wizard A) loses, output is false.

      Example 2

      x:4,y:4

      Spells: { 1,1 }

      Output: true

      Example 3

      x:4,y:5

      Spells: { 1,1 },{ 3,2 },{ 1,4 },{ 0,2 },{ 6,5 },{ 3,1 }

      Output: true

      Example 4

      x:400,y:400

      Spells: {9,2},{15,1},{1,4},{7,20},{3,100},{6,4},{9,0},{7,0},{8,3},{8,44}

      Ouput: true


      Good luck! I'll comment here my solution in about a day.

      Note: This challenge comes from fiks, programming competition by Czech college ČVUT (CTU).

      15 votes
    23. Learning to pentest

      Hi, I need your help to learn pentesting. I'm programming for several years. I'm really good in C# and can write moderately complex apps in Dart, Python and JavaScript. I'm in highschool and work...

      Hi, I need your help to learn pentesting.

      I'm programming for several years. I'm really good in C# and can write moderately complex apps in Dart, Python and JavaScript. I'm in highschool and work for software development company as backend developer. But general programming starts to feel so boring...

      I've started to watch LiveOverflow on youtube (no link, there is no wifi here and I don't want youtube to drain my data) and it was so interesting - so I tried it. I've tried few CTFs, read many writeups, and now I've discovered CTF hack the box.

      When I know what to do, I have no problem googling and researching and later applying my knowledge. But I often discover, that I just don't know what I don't know.

      There is one CTF challenge that I haven't completed yet. It's 20 line html page, no javascript, nothing suspicous. No cookies. It has just form with password input, which sends post request to server. Here's the problem - how do I get the flag (the password)? I can bruteforce it, but it clearly isn't the correct way. I know that the php runs on apache, debian. I've tried getting some files, I've tried going up (../), sql injection, nothing works.

      And here's the general problem - what am I missing? What to learn? What should I google? I don't want ideas what I'm missing on this one example - Instead I need some sources where I learn generally about vulnerabilities I can exploit. Some blog, some website, something like this.

      Could someone here recommend me some sources where I learn about this? How did you start and what things do you generally check when you face something you have to break into?

      Thank you

      16 votes
    24. Gardeners in da house?

      I've enjoyed the challenges of gardening in zone 5 -6 and zone 10 - 11, and am wondering about others' experience. Climate change, with migrating pests/diseases and more erratic weather, are...

      I've enjoyed the challenges of gardening in zone 5 -6 and zone 10 - 11, and am wondering about others' experience.

      Climate change, with migrating pests/diseases and more erratic weather, are definitely noticeable trends.

      While it's interesting to grow ornamentals and food crops that wouldn't ordinarily be available, it's also disturbing to find falling yields and utter collapses of formerly successful "easy" plants like basil and temperate climate tomato varieties.

      There are limits on how much can be accomplished with purely "organic" controls - I've had to experiment with soil ecology (MycoStop for fungal infections, etc.). Allergenic plants are an increasing problem. There are brand new animal pests where I live as well - iguanas, pythons, and other hot-climate reptiles.

      I'm curious about others' gardening results, and suggestions for improving adaptability.

      12 votes
    25. Weekly Programming Challenge - making our own data format

      Hi everyone! There was no coding challenge last week, so I decided to make one this week. If someone wants to make his own challenge, wait few days and post it. I'm running out of ideas and I'd...

      Hi everyone! There was no coding challenge last week, so I decided to make one this week. If someone wants to make his own challenge, wait few days and post it. I'm running out of ideas and I'd like to keep these challenges running on Tildes.


      Everyone here knows data formats - I'm talking about XML or JSON. The task is to make your own format. The format can be as compact as possible, as human-readable as possible, or something that's really unique. Bonus points for writing encoder/decoder for your data format!

      How do you handle long texts? Various unicode characters? Complex objects? Cyclic references? It's up to you if you make it fast and simple, or really complex.

      I'm looking forward to your data formats. I'm sure they will beat at least csv. Good luck!

      8 votes
    26. Players of Instruments, what are you having fun with lately?

      Anything you guys have been having great fun/difficulty with lately? Any riffs/songs you're making? I've been trying to improve on Bass guitar and I learned that RHCP's Torture Me has a really fun...

      Anything you guys have been having great fun/difficulty with lately? Any riffs/songs you're making? I've been trying to improve on Bass guitar and I learned that RHCP's Torture Me has a really fun bass line. That whole 1-2-2-1 structure is challenging but satisfying as hell to pull off

      6 votes
    27. 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
    28. About the "ten thousand hours of practice to become an expert" rule

      Expertise researcher Anders Ericsson on why the popular "ten thousand hours of practice to become an expert" rule mischaracterizes his research: No, the ten-thousand-hour rule isn't really a rule...

      Expertise researcher Anders Ericsson on why the popular "ten thousand hours of practice to become an expert" rule mischaracterizes his research:

      No, the ten-thousand-hour rule isn't really a rule

      Ralf Krampe, Clemens Tesch-Römer, and I published the results from our study of the Berlin violin students in 1993. These findings would go on to become a major part of the scientific literature on expert performers, and over the years a great many other researchers have referred to them. But it was actually not until 2008, with the publication of Malcolm Gladwell’s Outliers, that our results attracted much attention from outside the scientific community. In his discussion of what it takes to become a top performer in a given field, Gladwell offered a catchy phrase: “the ten-thousand-hour rule.” According to this rule, it takes ten thousand hours of practice to become a master in most fields. We had indeed mentioned this figure in our report as the average number of hours that the best violinists had spent on solitary practice by the time they were twenty. Gladwell himself estimated that the Beatles had put in about ten thousand hours of practice while playing in Hamburg in the early 1960s and that Bill Gates put in roughly ten thousand hours of programming to develop his skills to a degree that allowed him to found and develop Microsoft. In general, Gladwell suggested, the same thing is true in essentially every field of human endeavor— people don’t become expert at something until they’ve put in about ten thousand hours of practice.

      The rule is irresistibly appealing. It’s easy to remember, for one thing. It would’ve been far less effective if those violinists had put in, say, eleven thousand hours of practice by the time they were twenty. And it satisfies the human desire to discover a simple cause-and-effect relationship: just put in ten thousand hours of practice at anything, and you will become a master.

      Unfortunately, this rule— which is the only thing that many people today know about the effects of practice— is wrong in several ways. (It is also correct in one important way, which I will get to shortly.) First, there is nothing special or magical about ten thousand hours. Gladwell could just as easily have mentioned the average amount of time the best violin students had practiced by the time they were eighteen— approximately seventy-four hundred hours— but he chose to refer to the total practice time they had accumulated by the time they were twenty, because it was a nice round number. And, either way, at eighteen or twenty, these students were nowhere near masters of the violin. They were very good, promising students who were likely headed to the top of their field, but they still had a long way to go when I studied them. Pianists who win international piano competitions tend to do so when they’re around thirty years old, and thus they’ve probably put in about twenty thousand to twenty-five thousand hours of practice by then; ten thousand hours is only halfway down that path.

      And the number varies from field to field. Steve Faloon became the very best person in the world at memorizing strings of digits after only about two hundred hours of practice. I don’t know exactly how many hours of practice the best digit memorizers put in today before they get to the top, but it is likely well under ten thousand.

      Second, the number of ten thousand hours at age twenty for the best violinists was only an average. Half of the ten violinists in that group hadn’t actually accumulated ten thousand hours at that age. Gladwell misunderstood this fact and incorrectly claimed that all the violinists in that group had accumulated over ten thousand hours.

      Third, Gladwell didn’t distinguish between the deliberate practice that the musicians in our study did and any sort of activity that might be labeled “practice.” For example, one of his key examples of the ten-thousand-hour rule was the Beatles’ exhausting schedule of performances in Hamburg between 1960 and 1964. According to Gladwell, they played some twelve hundred times, each performance lasting as much as eight hours, which would have summed up to nearly ten thousand hours. Tune In, an exhaustive 2013 biography of the Beatles by Mark Lewisohn, calls this estimate into question and, after an extensive analysis, suggests that a more accurate total number is about eleven hundred hours of playing. So the Beatles became worldwide successes with far less than ten thousand hours of practice. More importantly, however, performing isn’t the same thing as practice. Yes, the Beatles almost certainly improved as a band after their many hours of playing in Hamburg, particularly because they tended to play the same songs night after night, which gave them the opportunity to get feedback— both from the crowd and themselves— on their performance and find ways to improve it. But an hour of playing in front of a crowd, where the focus is on delivering the best possible performance at the time, is not the same as an hour of focused, goal-driven practice that is designed to address certain weaknesses and make certain improvements— the sort of practice that was the key factor in explaining the abilities of the Berlin student violinists.

      A closely related issue is that, as Lewisohn argues, the success of the Beatles was not due to how well they performed other people’s music but rather to their songwriting and creation of their own new music. Thus, if we are to explain the Beatles’ success in terms of practice, we need to identify the activities that allowed John Lennon and Paul McCartney— the group’s two primary songwriters— to develop and improve their skill at writing songs. All of the hours that the Beatles spent playing concerts in Hamburg would have done little, if anything, to help Lennon and McCartney become better songwriters, so we need to look elsewhere to explain the Beatles’ success.

      This distinction between deliberate practice aimed at a particular goal and generic practice is crucial because not every type of practice leads to the improved ability that we saw in the music students or the ballet dancers. Generally speaking, deliberate practice and related types of practice that are designed to achieve a certain goal consist of individualized training activities— usually done alone— that are devised specifically to improve particular aspects of performance.

      The final problem with the ten-thousand-hour rule is that, although Gladwell himself didn’t say this, many people have interpreted it as a promise that almost anyone can become an expert in a given field by putting in ten thousand hours of practice. But nothing in my study implied this. To show a result like this, I would have needed to put a collection of randomly chosen people through ten thousand hours of deliberate practice on the violin and then see how they turned out. All that our study had shown was that among the students who had become good enough to be admitted to the Berlin music academy, the best students had put in, on average, significantly more hours of solitary practice than the better students, and the better and best students had put in more solitary practice than the music-education students.

      The question of whether anyone can become an expert performer in a given field by taking part in enough designed practice is still open, and I will offer some thoughts on this issue in the next chapter. But there was nothing in the original study to suggest that it was so.

      Gladwell did get one thing right, and it is worth repeating because it’s crucial: becoming accomplished in any field in which there is a well-established history of people working to become experts requires a tremendous amount of effort exerted over many years. It may not require exactly ten thousand hours, but it will take a lot.

      We have seen this in chess and the violin, but research has shown something similar in field after field. Authors and poets have usually been writing for more than a decade before they produce their best work, and it is generally a decade or more between a scientist’s first publication and his or her most important publication— and this is in addition to the years of study before that first published research. A study of musical composers by the psychologist John R. Hayes found that it takes an average of twenty years from the time a person starts studying music until he or she composes a truly excellent piece of music, and it is generally never less than ten years. Gladwell’s ten-thousand-hour rule captures this fundamental truth— that in many areas of human endeavor it takes many, many years of practice to become one of the best in the world— in a forceful, memorable way, and that’s a good thing.

      On the other hand, emphasizing what it takes to become one of the best in the world in such competitive fields as music, chess, or academic research leads us to overlook what I believe to be the more important lesson from our study of the violin students. When we say that it takes ten thousand— or however many— hours to become really good at something, we put the focus on the daunting nature of the task. While some may take this as a challenge— as if to say, “All I have to do is spend ten thousand hours working on this, and I’ll be one of the best in the world!”— many will see it as a stop sign: “Why should I even try if it’s going to take me ten thousand hours to get really good?” As Dogbert observed in one Dilbert comic strip, “I would think a willingness to practice the same thing for ten thousand hours is a mental disorder.”

      But I see the core message as something else altogether: In pretty much any area of human endeavor, people have a tremendous capacity to improve their performance, as long as they train in the right way. If you practice something for a few hundred hours, you will almost certainly see great improvement— think of what two hundred hours of practice brought Steve Faloon— but you have only scratched the surface. You can keep going and going and going, getting better and better and better. How much you improve is up to you.

      This puts the ten-thousand-hour rule in a completely different light: The reason that you must put in ten thousand or more hours of practice to become one of the world’s best violinists or chess players or golfers is that the people you are being compared to or competing with have themselves put in ten thousand or more hours of practice. There is no point at which performance maxes out and additional practice does not lead to further improvement. So, yes, if you wish to become one of the best in the world in one of these highly competitive fields, you will need to put in thousands and thousands of hours of hard, focused work just to have a chance of equaling all of those others who have chosen to put in the same sort of work.

      One way to think about this is simply as a reflection of the fact that, to date, we have found no limitations to the improvements that can be made with particular types of practice. As training techniques are improved and new heights of achievement are discovered, people in every area of human endeavor are constantly finding ways to get better, to raise the bar on what was thought to be possible, and there is no sign that this will stop. The horizons of human potential are expanding with each new generation.

      -- Ericsson, Anders; Pool, Robert. Peak: Secrets from the New Science of Expertise (p. 109-114). Houghton Mifflin Harcourt. Kindle Edition.

      22 votes
    29. A layperson's introduction to spintronics

      Introduction and motivation In an effort to get more content on Tildes, I want to try and give an introduction on several 'hot topics' in semiconductor physics at a level understandable to...

      Introduction and motivation

      In an effort to get more content on Tildes, I want to try and give an introduction on several 'hot topics' in semiconductor physics at a level understandable to laypeople (high school level physics background). Making physics accessible to laypeople is a much discussed topic at universities. It can be very hard to translate the professional terms into a language understandable by people outside the field. So I will take this opportunity to challenge myself to (hopefully) create an understandable introduction to interesting topics in modern physics. To this end, I will take liberties in explaining things, and not always go for full scientific accuracy, while hopefully still getting the core concepts across. If a more in-depth explanation is wanted, please ask in the comments and I will do my best to answer.

      Today's topic

      I will start this series with an introduction to spintronics and spin transistors.

      What is spintronics?

      Spintronics is named in analogy to electronics. In electronics, the flow of current (consisting of electrons) is studied. Each electron has an electric charge, and by pulling at this charge we can move electrons through wires, transistors, creating modern electronics. Spintronics also studies the flow of electrons, but it uses another property of the electrons, spin, to create new kinds of transistors.

      What are transistors?

      Transistors are small electronic devices that act as an on-off switch for current. We can flip this on-off switch by sending a signal to the transistor, so that the current will flow. Transistors are the basis for all computers and as such are used very widely in modern life.

      What is spin?

      Spin arises from quantum mechanics. However, for the purpose of explaining spin transistors we can think of an electron's spin as a bar magnet. Each electron can be thought of as a bar magnet that will align itself to a nearby magnetic field. Think of it as a compass (the electron) aligning itself to a fridge magnet when it's held near the compass.

      What are spin transistors and how do they work?

      Spin transistors are a type of transistor whose on-off switch is created by magnets. We take two bar magnets, whose north poles are pointed in the same way, and put them next to each other, leaving a small gap between them. This gap is filled with a material through which the electrons can move. Now we connect wires to the big bar magnets and let current (electrons!) flow through both magnets, via the gap. When the electrons go through the first magnet, their internal magnets will align themselves to the big bar magnet. However, once they are in the gap the electrons' internal magnets will start rotating and no longer point in the same direction as the big bar magnets. So that when the electrons arrive at the second magnet, they will be repelled just like when you try to push the north poles of two magnets together. This means the current will not flow, and the device is off! So, how do we get it to turn on?

      By exposing the gap to an electric field, we can control the amount of rotation the electrons experience (this is called the Rashba effect). If we change the strength of this electric field so that the electrons will make exactly one full rotation while crossing the gap, then by the time they reach the second big bar magnet they will once again be pointing in the right direction. Now the electrons are able to move through the second big bar magnet, and out its other end. So by turning this electric field on, the spin transistor will let current flow, and if we turn the electric field off, no current will flow. We have created an on-off switch using magnets and spin!

      That's cool, but why go through the effort of doing this when we have perfectly fine electronics already?

      The process of switching between the on and off states of these spin transistors is a lot more energy efficient than with regular transistors. These types of transistors leak a lot less too. Normal transistors will leak, meaning that a small amount of current will go through even when the transistor is off. With spin transistors, this leak is a lot smaller. This once again improves the energy efficiency of these devices. So in short, spin transistors will make your computer more energy efficient. This type of transistor can also be made smaller than normal transistors, which leads to more powerful computers.

      Feedback and interest

      As I mentioned, I wrote this post as a challenge to myself to explain modern physics to laypeople. Please let me know where I succeeded and where I failed. Also let me know if you like this type of content and if I should continue posting other similar topics in the same format.

      37 votes
    30. 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
    31. 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
    32. Review of some Vahdam’s Masala Chai teas

      Masala chai (commonly and somewhat falsley abbreviated to just “chai”) literally means “spice mix tea” – and this is what this review is about. I got myself a selection of Vahdam’s masala chais...

      Masala chai (commonly and somewhat falsley abbreviated to just “chai”) literally means “spice mix tea” – and this is what this review is about. I got myself a selection of Vahdam’s masala chais and kept notes of each one I tried. Some came in the Chai Tea Sampler and others I either already bought before or were a free sample that came with some other order.

      Classical CTC BOP

      CTC BOP is usually cheaper than more delicately processed whole leaves. Although the common perception is that it is of lower quality than e.g. FTGFOP or even just FOP or OP for that matter, the fact is that they simply a different method with a different outcome. You can get away with breaking cheaper leaves, though, than whole.

      Also bare in mind that while BOP is the most common broken leaf grade, there are several more.

      It makes for a stronger brew and a more robust flavour– ideal for breakfast teas. The down-side is that it can coat your tongue. But if you want to recycle it, the second steep will be much lighter.

      Original Chai Spiced Black Tea Masala Chai

      The quintessential masala chai – the strength of the CTC BOP, paired with the classic mix of spices. A great daily driver and a true classic, but for my personal taste a tiny bit too light on the spice.

      Ingredients: CTC BOP black tea, cardamom, clove, cinnamon, black pepper

      Double Spice Masala Chai Spiced Black Tea

      Same as India’s Original Masala Chai above, but with a bigger amount of spice. Of the two I definitely prefer this one.

      Ingredients: CTC BOP black tea, cardamom, clove, cinnamon, black pepper

      Fennel Spice Masala Chai Spiced Black Tea

      Due to the fennel, the overall taste reminds me a lot of Slovenian cinnamon-honey cookies[^medenjaki], which we traditionally bake for Christmas. The odd bit is the cookies do not include the fennel at all, but most of the other spices in a classic masala chai (minus pepper). I suppose the fennel sways it a bit to the sweet honey-like side.

      In short, I really liked the fennel variation – could become firm winter favourite of mine.

      Ingredients: CTC BOP black tea, fennel, cardamom, clove, cinnamon, black pepper

      [^medenjaki]: The Slovenian name is “medenjaki” and the closest thing the English cuisine has to offer is probably gingerbread.

      Saffron Premium Masala Chai Spiced Black Tea

      When I saw the package I thought that saffron was more of a marketing gimmick and I would only find a strand or two in the whole 10g package. But no! The saffron’s pungence punches you in the face – in a good way. It felt somewhat weird to put sugar and milk into it, so strong is the aroma.

      Personally, I really like it and it does present an interesting savoury twist. It is a taste that some might love and others might hate though.

      Ingredients: CTC BOP black tea, cardamom, cinnamon, clove, saffron, almonds

      Earl Grey Masala Chai Spiced Black Tea

      I am (almost) always game for a nice spin on an Earl Grey. In this case, the standard masala complements the bergamot surprisingly well and in a way where none of the two particularly stand out too much.

      The combination works so well that it would feel wrong to call it a spiced-up Earl Grey or a earl-grey’d masala chai. It is a pleasantly lightly spiced, somewhat citrusy and fresh blend that goes well with or without milk.

      Ingredients: CTC BOP black tea, bergamot, cardamom, cinnamon, clove, black pepper

      Cardamom Chai Masala Chai Spiced Black Tea

      Now, this one is interesting because it only has two ingredients – black tea and cardamom. While not as complex in aroma as most others, it is interesting how much freshness and sweetness a quality cardamom pod can carry.

      I found it equally enjoyable with milk and sugar or without any of the two.

      Ingredients: CTC BOP Assam black tea, cardamom

      Sweet Cinnamon Massala Chai Black Tea

      Similar to their Cardamom Chai, it is a masala chai with very few ingredients. The cinnamon and cardamom get allong very well and while it lacks the complexity of a full masala/spice mix, it is a very enjoyable blend.

      Recommended especially if you like your masala chai not too spicy, but sweet.

      Ingredients: CTC BOP Assam black tea, cardamom, cinnamon

      Ortodox black

      What is described with “orthodox” usually means a whole leaf grade, starting with OP. These are much weaker than CTC, but therefore bring out the more delicate flavours. It is a bigger challenge therefore to make sure spices do not push the flavour of the tea too much into the back-seat.

      Because the leaves are whole, as a rule you can get more steeps out of them than of broken leaves.

      Assam Spice Masala Chai Spiced Black Tea

      The more refined spin on the classic masala chai – with whole leaves of a quality Assam, it brings a smoothness and mellowness that the CTC cannot achieve. Because of that the spices are a bit more pronounced, which in my opinion is not bad at all. The quality of the leaf also results in a much better second steep compared to the CTC.

      Most definitely a favourite for me.

      Ingredients: FTGFOP1 Assam black tea, cardamom, cinnamon, clove, black pepper

      Tulsi Basil Organic Masala Chai Spiced Black Tea

      I have not had the pleasure of trying tulsi[^basil] and regarding masala chais, this is a very peculiar blend. The taste of the Assam is quite well hidden behind the huge bunch of herbs. In fact, for some reason it reminds me more of the Slovenian Mountain Tea than of of a masala chai.

      In the end, the combination is quite pleasant and uplifting.

      What I found fascinating is that it tastes very similar both with milk and sugar, and without any of the two.

      Ingredients: organic Assam black tea, tulsi basil, cinnamon, ginger, clove, cardamom, black pepper, long pepper, bay leaves, nutmeg

      [^basil]: For more about tulsi – or holy basil, as they call it in some places – see its Wikipedia entry.

      Darjeeling Spice Masala Chai Spiced Black Tea

      As expected, the Darjeeling version is much lighter and works well also without milk, or even sugar. Still, a tiny cloud of milk does give it that extra smoothness and mellowness. It is not over-spiced, and the balance is quite well. The taste of cloves (and perhaps pepper) are just slightly more pronounced, but as a change that is quite fun. It goes very well with the muscatel of the Darjeeling.

      Ingredients: SFTGFOP1 Darjeeling black tea, cardamom, cinnamon, clove, black pepper

      Oolong

      Maharani Chai Spiced Oolong Tea

      Despite the fancy abbreviation, IMHO the oolong tea itself in this blend is not one you would pay high prices as a stand-alone tea. Still, I found the combination interesting. If nothing else, it is interesting to have a masala chai that can be drank just as well without milk and sugar as with them.

      Personally, I found the spice a bit to strong in this blend for the subtle tea it was combined with. I actually found the second steep much more enjoyable.

      Ingredients: SFTGFOP1 Oolong tea, cardamom, cinnamon, clove, black pepper

      Green

      Kashmiri Kahwa Masala Chai Spiced Green Tea

      A very enjoyable and refreshing blend, which I enjoyed without milk or sugar. The saffron is not as heavy as in the Saffron Premium Masala Chai, but goes really well with the almonds and the rest of the spices.

      When I first heard of Kashmiri Kahwa, I saw a recipe that included rose buds, so in the future I might try adding a few.

      Ingredients: FTGFOP1 green tea, cardamom, cinnamon, saffron, almonds

      Green Tea Chai

      As is to be expected, the green variety of the Darjeeling masala chai is even lighter than its black Darjeeling counterpart. The spice is well-balanced, with cinnamon and cloves perhaps being just a bit more accentuated. This effect is increased when adding milk.

      It goes pretty well without milk or sugar and can be steeped multiple times. Adding either or both works fine as well though.

      Quite an enjoyable tea, but personally, in this direction, I prefer either the Kashmiri Kahwa or the “normal” Darjeeling Spice masala chais.

      Ingredients: FTGFOP1 darjeeling green tea, cardamom, cinnamon, clove, black pepper


      Glossary:

      • BOP]: Broken Orange Pekoe
      • FOP: Flowery Orange Pekoe
      • OP: Orange Pekoe
      • CTC: Crush, Tear, Curl
      • FTGFOP: Finest Tippy Golder Flowery Orange Pekoe
      • FTGFOP1: Finest Tippy Golder Flowery Orange Pekoe (1st grade)
      • SFTGFOP1: Superior Finest Tippy Golder Flowery Orange Pekoe (1st grade)
      10 votes