Announcement

Collapse
No announcement yet.

Write Some ****ing Code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Write Some ****ing Code

    I program in Scala at my job; Scala is sort of a functional programming language, and FP languages attract some awful people - in my case I have three co-workers who care much more about programming theory than about writing code. Apparently my boss has finally had enough of this ****.

    Three Co-Workers: [2-hour long Skype discussion on the theory of monads (for the love of god, do not read that article)]
    loinboss: This is the only monad tutorial you'll ever need: Write Some ****ing Code

    *****

    That blog post:

    Monads are like a dildo factory, staffed by midgets

    At their most basic, monads are a monoid in the category of endofunctors. But that's an explanation that only appears to mathematicians. They are also a design pattern, but that's an explanation that only appeals to computer geeks.

    You've read many monad tutorials. For instance, monads are like monsters. No wait, monads are like space suits, and functions of type a -> M b are like space brothels where you take off your suit, get space herpes and then put your suit back on. But this post is the ultimate in monad tutorials - this is the one that will finally cause them to make sense in your mind.

    So consider a program being used to run a dildo factory. The most basic underlying type is the Dildo:
    Code:
    data Dildo = NormalDildo | Rabbit | StrapOn | ...
    We also have a data type representing the box:
    Code:
    data Box a = Box a
    Now consider one of the midgets, who's job it is to do work to a dildo and put it into a box. In the abstract, the type signature of the midget is Dildo -> Box Dildo. But sometimes the midgets need to take a dildo out of the box, do some work on it, and put it back into the box. Monads to the rescue.

    Stop reading ****ing monad tutorials and write some code

    You didn't learn python via abstract tutorial, comparing lists to Smaug and dicts to Bilbo. You learned it by writing some ****ing code. You won't learn Haskell or Scala any other way. This is true even if you are a hotshot hipster brogrammer who knows PhP, Ruby and node.js.

    STFU and code. There is no other way to learn to code.

    Note: If you found this blog post via google while looking for something completely different, maybe this is what you are looking for.
    <p style="font-size:1024px">HTML is disabled in signatures </p>

  • #2
    I have no idea WTF you're talking about for the most part, but IIRC "Monad" is the Neoplatonist/Gnostic name for God. Is the point supposed to be that "monad" is some sort of programming term for something that causes abstruse philosophical wanking about ultimately unprovable points?
    1011 1100
    Pyrebound--a free online serial fantasy novel

    Comment


    • #3
      I thought all Theology was like that.

      Comment


      • #4
        wat
        "Flutie was better than Kelly, Elway, Esiason and Cunningham." - Ben Kenobi
        "I have nothing against Wilson, but he's nowhere near the same calibre of QB as Flutie. Flutie threw for 5k+ yards in the CFL." -Ben Kenobi

        Comment


        • #5
          Fun fact: Monads was the name of the first punk band I was in.
          Apolyton's Grim Reaper 2008, 2010 & 2011
          RIP lest we forget... SG (2) and LaFayette -- Civ2 Succession Games Brothers-in-Arms

          Comment


          • #6
            I can't comment on the technical stuff. But this seems like highly inappropriate content for a boss to be sharing. My first call would be to HR.
            To us, it is the BEAST.

            Comment


            • #7
              Perhaps loin works for a sex toy manufacturer?
              Click here if you're having trouble sleeping.
              "We confess our little faults to persuade people that we have no large ones." - François de La Rochefoucauld

              Comment


              • #8
                I'm guessing that the corporate culture there is such that the employer need not give much of a damn about that sort of detail. After all, they hired Loinburger. Either that or he's sufficiently skilled that, if he got fired for this, he'd be able to find another job in six hours, so why not.
                1011 1100
                Pyrebound--a free online serial fantasy novel

                Comment


                • #9
                  If the blog made references to the insertion of dildos into various orifices or something along those lines then one of my co-workers might have cause to complain to HR, but I doubt that anything short of a bible publishing company would fire you merely for referencing the existence of dildos.
                  <p style="font-size:1024px">HTML is disabled in signatures </p>

                  Comment


                  • #10
                    Originally posted by Lorizael View Post
                    Perhaps loin works for a sex toy manufacturer?
                    I could tell you, but that wouldn't be any fun.
                    No, I did not steal that from somebody on Something Awful.

                    Comment


                    • #11
                      Let me just remind you all that, if you need an opportunity to code, we have one.
                      1011 1100
                      Pyrebound--a free online serial fantasy novel

                      Comment


                      • #12
                        agreed that functional programming attracts weirdos
                        12-17-10 Mohamed Bouazizi NEVER FORGET
                        Stadtluft Macht Frei
                        Killing it is the new killing it
                        Ultima Ratio Regum

                        Comment


                        • #13
                          If there is no sound in space, how come you can hear the lasers?
                          ){ :|:& };:

                          Comment


                          • #14
                            There is something of an ML mafia going on at Carnegie Mellon. One professor in particular, a Mr. Robert Harper, is particularly inflammatory and idiotic about this topic. He somehow managed to convince the CS undergraduate department to ditch OOP as a curriculum requirement for graduation (it is now an elective) and replace it with an FP class in SML. They were going to use F#, a language actually used by (a few) real people, but apparently this was not acceptable to the ML mob boss because, I am not making this up, F# is missing the most useful part of functional programming--functors. Yes, functors. That's the most useful part, according to Bob Harper, and if your language is missing them, it is deficient. They peddle functional programming like it's the messiah of the computer science religion, despite the fact that a simple algorithm like breadth-first search is unbelievably difficult to code without imperative programming. That's actually one of the labs in the second FP class--I compared it to a BFS implementation I wrote in Python back in high school. Literally 10 lines versus 100. But at least there aren't any hidden side effects!

                            Sometimes I half expect to find all of the 15-150 and 15-210 (functional programming classes) TAs standing around a pentagram labelled REFERENTIAL TRANSPARENCY, chanting "FUNCTIONS ARE VALUES" while drinking strychnine-laced kool aid.

                            They all seem more interested in talking about how their deep understanding of type theory makes their code so much more elegant than actually writing their supposedly elegant code. I'll eat my socks if any of them has ever seen an SML program with more than 3,000 lines of code. No one ****ing uses this ****. Scala would be worthless if it didn't run on the JVM and couldn't call libraries from Java. Same with F#, but replace the JVM with .NET.

                            Epic troll opportunity though: Tell them about how JavaScript is your favorite functional programming language. Justify this by explaining how it is ubiquitous and has lots of well-supported libraries. 100% guaranteed to get them to completely flip a ****.
                            If there is no sound in space, how come you can hear the lasers?
                            ){ :|:& };:

                            Comment


                            • #15
                              The seminal article on this particular phenomenon:

                              Functional programming techniques are held back by those who practice them being not nice to other people … continue reading
                              If there is no sound in space, how come you can hear the lasers?
                              ){ :|:& };:

                              Comment

                              Working...
                              X