| //from https://github.com/ppurang/spray-example | |
| //below retreive(id) always returns Option[Order] | |
| trait CoffeePaymentService extends HttpService with LiftJsonSupport { | |
| self: PersistenceCoffee => | |
| override implicit def liftJsonFormats: Formats = Order.format | |
| val paymentRoute = | |
| pathPrefix("payment"/"order") { |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <title>livescript</title> | |
| </head> | |
| <body> | |
| <h1> | |
| Livescript - check the browser's console | |
| </h1> | |
| <h2> |
| // Run this with scala <filename> | |
| /** | |
| * A Two-phase commit Monad | |
| */ | |
| trait Transaction[+T] { | |
| def map[U](fn: T => U): Transaction[U] = flatMap { t => Constant(fn(t)) } | |
| def flatMap[U](fn: T => Transaction[U]): Transaction[U] = | |
| FlatMapped(this, fn) |
| //caution this is a very bad idea for a function even in javascript! | |
| function getFileExtension(i) { | |
| // i will be a string, but it may not have a file extension. | |
| // return the file extension (with no period) if it has one, otherwise false | |
| var x; | |
| if(i.lastIndexOf(".") > -1) | |
| x = i.substring(i.lastIndexOf(".")+1, i.length); |
| import akka.actor.Actor.Receive | |
| import akka.actor.ActorContext | |
| import akka.actor.ActorLogging | |
| import akka.actor.Actor | |
| import akka.event.LoggingAdapter | |
| object MyLoggingReceive { | |
| def apply(log: LoggingAdapter)(r: Receive)(implicit context: ActorContext): Receive = r match { | |
| case _: MyLoggingReceive ⇒ r |
| /* | |
| * Copyright (c) 2012, Lawrence Livermore National Security, LLC. Produced at | |
| * the Lawrence Livermore National Laboratory. Written by Keith Stevens, | |
| * kstevens@cs.ucla.edu OCEC-10-073 All rights reserved. | |
| * | |
| * This file is part of the S-Space package and is covered under the terms and | |
| * conditions therein. | |
| * | |
| * The S-Space package is free software: you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License version 2 as published |
| // the following results in | |
| // superduperproject : master : 0.1.0 : MD??> | |
| // where M => Modified, D => Deleted, ?? => not tracked | |
| // and might include (not tested :)) | |
| // !, R, C, U for details check https://www.kernel.org/pub/software/scm/git/docs/git-status.html#_short_format | |
| // if you see superduperproject : master : 0.1.0 : -?-> ... well then oops and happy debugging and do tell... | |
| shellPrompt in ThisBuild := ShellPrompt.buildShellPrompt("0.1.0") |
| // see also http://piyush.purang.net/blog/Reading_Type_Signatures_5e999531-595f-4348-b44c-e239be962885 | |
| import java.io.File | |
| // following is the goal | |
| type CountCharsInAFile = String => Int | |
| type PathToFile = String => File | |
| def pathToFile : PathToFile = new File(_) | |
| type FileToLines = File => List[String] |
#CallForSpeakers pitch for #LandingFestival Berlin 2018
How often do you hear the term MVP (minimum viable product) bandied around in startup land? It’s often a necessary evil. Technical debt, or the implied cost of the additional work caused by choosing an easy option now, rather than opting for a better solution which may take more time, is commonplace in almost every engineering team and its products. As engineers, we need to aggressively manage our technical debt, but also open our eyes to the opportunity it can provide. It’s akin to financial leverage, and has future value.
I'll debunk the myths around technical debt, share how to aggressively manage it, and how to leverage it for the good of the product, the team, the company and the end user.