-
Coursera's Learning how to Learn course is starting again. https://www.coursera.org/learn/learning-how-to-learn If you prefer the written version, take a look at Barbara Oakley book https://www.amazon.com/Mind-Numbers-Science-Flunked-Algebra-ebook/dp/B00G3L19ZU
-
Take a look at how we think with Kahneman's Thinking Fast and Slow http://www.amazon.com/Thinking-Fast-Slow-Daniel-Kahneman/dp/0374533555
-
Uncle Bob inspires you to keep learning as a professional. http://www.amazon.com/Clean-Coder-Conduct-Professional-Programmers/dp/0137081073
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package futures | |
import scala.concurrent.Future | |
object Snippet { | |
type A = String | |
type B = Int | |
def first(x: String): Future[Option[A]] = ??? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> ruby statics.rb | |
4 | |
statics.rb:12:in `<main>': undefined method `non_static' for Foo:Module (NoMethodError) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val options = (for { | |
a <- 1 to 36 | |
b <- 1 to 36 | |
c <- 1 to 36 | |
if a*b*c == 36 | |
} yield Vector(a, b, c).sorted).distinct | |
val groups = options.groupBy(_.sum) | |
val ambiguousOptions = groups.values.find(_.size > 1).get |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'optparse' | |
SPELLINGS = Hash.new { |hash, key| key } | |
SPELLINGS['n'] = 'an' | |
SPELLINGS['z'] = 'zet' | |
command = :none | |
parser = OptionParser.new do |opts| | |
opts.banner = "Usage: spell_tutor.rb [--spelling|--dictation]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.concurrent.ExecutionContext | |
import scala.concurrent.duration._ | |
import scala.util.Random | |
import fs2._ | |
package object demo { | |
implicit val strategy = Strategy.fromExecutionContext(ExecutionContext.global) | |
implicit val scheduler = Scheduler.fromFixedDaemonPool(2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.nio.file.Paths | |
import scala.concurrent.Future | |
import scala.util.control.NoStackTrace | |
import fs2._ | |
import scalaz._ | |
import Scalaz._ | |
import com.jobandtalent.commons.streams.{FileStreams, StreamCombinators} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
org.apache.kafka.common.KafkaException: Failed to construct kafka consumer | |
at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:702) | |
at org.apache.kafka.clients.consumer.KafkaConsumer.<init>(KafkaConsumer.java:557) | |
at cakesolutions.kafka.KafkaConsumer$.apply(KafkaConsumer.scala:128) | |
at com.jobandtalent.kafka.client.KafkaTopic.com$jobandtalent$kafka$client$KafkaTopic$$buildConsumer$1(KafkaTopic.scala:38) | |
at com.jobandtalent.kafka.client.KafkaTopic$$anonfun$initialize$1$1.apply(KafkaTopic.scala:31) | |
at com.jobandtalent.kafka.client.KafkaTopic$$anonfun$initialize$1$1.apply(KafkaTopic.scala:30) | |
at fs2.Task$$anonfun$delay$1.apply(Task.scala:187) | |
at fs2.Task$$anonfun$delay$1.apply(Task.scala:187) | |
at fs2.Task$$anonfun$suspend$1$$anonfun$2.apply(Task.scala:195) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package experiments | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import scala.concurrent.{Await, Future} | |
import scalaz._ | |
import Scalaz._ | |
import scala.concurrent.duration.Duration | |
import natural.TypeSafeMap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE FlexibleInstances, OverlappingInstances #-} | |
import Data.List | |
toJson1 :: [String] -> String | |
toJson1 elems = toArray $ map quote elems | |
where quote elem = '"' : elem ++ "\"" | |
toArray elems = '[' : concat (intersperse ", " elems) ++ "]" | |
sample1 = toJson1 ["a", "b", "c"] |