At first I hoped that such a technically unsound project would collapse but I soon realized it was doomed to success. Almost anything in software can be implemented, sold, and even used given enough determination. There is nothing a mere scientist can say that will stand against the flood of a hundred million dollars. But there is one quality that cannot be purchased in his way - and that is reliability. The price of reliability is the pursuit of the utmost simplicity. It is a price which the very rich find most hard to pay.
>>> l = ['spam', 'ham', 314, 23] | |
>>> l | |
['spam', 'ham', 314, 23] | |
>>> l[0] | |
'spam' | |
>>> l[0] = 'monkey' | |
>>> l | |
['monkey', 'ham', 314, 23] |
sealed trait Sigma | |
case class Lit(s: String) extends Sigma | |
case class Concat(s: Sigma, t: Sigma) extends Sigma | |
case class Ext extends Sigma | |
def eval1(sig: Sigma): Sigma = sig match { | |
case Concat(s, t) => { | |
val Lit(e1) = eval1(s) | |
val Lit(e2) = eval1(s) | |
Lit(e1 + e2) |
Beer was a food product manufactured during the early 21st century. PepsiCo's 2013 press release stated:
Beer, made with our patented Brewing Technology, comes in four exciting flavors.
The wild commercial success of Beer led the company to expand its lineup in 2018 with the addition of a new Blueberry Blast flavor. PepsiCo also briefly experimented with Cream Cheese Salad Beer, a low-calorie variety marketed to women.
United States-Mexico border relations tensed as officials, under pressure from PepsiCo, strengthened efforts to block importing of the increasing number of knockoff beverages brewed in violation of US patent law. PepsiCo v Gonzales (2017) established that most off-brand "Beers", although not corn-based like genuine Beer, still fell within the purview of the Brewing patent.
interface Optional<T> { | |
T get(); | |
boolean isPresent(); | |
void ifPresent(Consumer<? super T> consumer); | |
T orElse(T other); |
Picture your beautiful web application. It does all manner of wonderful things, but herein we examine two of its URL mappings:
-
/login
is the login form. A happy user enters authentication credentials, gets a session cookie, and proceeds to enjoy the delightful experience. -
/important-documents/<document_name>
downloads a document. These documents are very important and some contain secrets, so a user must be authenticated to see them. An authenticated user sees the document, and an unauthenticated user receives a 301 redirect to/login
.
Your customers are important business people, so they use the paramount software for business, Microsoft Office. Your web application has become established among their community as the authoritative document repository, and one very important user just had the clever idea to cite synergy.doc
from revenue.doc
by adding a hyperlink to yourwebapplication/important-documents/synergy.doc
.
I mostly agree with the notion that a university's role is to teach you theory, not to make you employable, but it's hard for me to reconcile that belief with my disappointment when students aren't ready to be hired upon graduation. As enjoyable as learning about computing can be, there is little sense in studying it unless you plan to apply it in some way. This means programming. There's no way around that. It is the tool we have. So if you're going through all the trouble of getting a degree in computation, you ought to be doing your best to also become a damn good programmer. If software practice truly falls outside of the school's purview, then I can't blame its curriculum for neglect. Academia does fulfill its role, but at too great an opportunity cost. Degree programs fill the lives and consume the energy of students who ought to be programming, programming, programming, and pausing to take some theory classes on the side.
import akka.actor._ | |
package object akkautil { | |
/** Switches the implicit `ActorContext`'s receive behavior to `behavior` | |
* until one message is handled, then returns to the previous behavior. | |
*/ | |
def temporarilyBecome(behavior: Actor.Receive)(implicit context: ActorContext) { | |
import context.unbecome |
select count(*) as numtimes, sql.sql_text | |
from v$open_cursor c, v$sql sql | |
where c.sql_id=sql.sql_id and c.user_name = 'username' group by sql.sql_text; |