Bitcoin Explained

Other bitcoin

My Mother-in-law heard about Bitcoin the traditional way, by consuming a sequence of flashing pictures. So she did the traditional thing and asked her technical Son-in-law for more information. I wrote a little response avoiding the technical nature of the phenomenon. But I feel that it deserves a bit more exploration for both my understanding and yours. Mostly for mine. Maybe yours.

Stop and Start All Camel Routes

Java camel, jmx

Here is a quick example of how you might stop all Camel routes regardless of the CamelContext. I assume that you have prior knowledge of how to connect via JMX, or you can see my last post on Purging ActiveMQ Queues via JMX.

Purge ActiveMQ Queues

Java activemq, jxm, karaf

Whether for testing or some edge case sometimes you just need to clear out messages that have been building up. Here is an example of how you can clean all of a brokers queues using facilities exposed by JMX in ActiveMQ.

Chapter 3 Boss

Haskell real-world-haskell, functional

Chapter 3 of Real World Haskell ends with an epic boss. Exercise question 12 states:

Using the code from the preceding three exercises, implement Graham’s scan algorithm for the convex hull of a set of 2D points. You can find good description of what a convex hull is, and how the Graham scan algorithm should work, on Wikipedia.

Yea I just said WTF out loud too.

Starting the Journey

Haskell real-world-haskell, functional, groovy

One of the greatest things that have come out of learning and working everyday in a Java like language that not just supports lambdas but makes them a way of life, is that before you know it you are getting really curious about this functional programming thing. At first my curiosity lead me to Scala, and why not, it’s been totally hyped, compiles to JVM bytecode, and has some awesome things going on. But, boy was I unprepared for all the concepts that Scala required me to understand just to read it’s standard libraries. I gave Scala the old college try but didn’t come away with much other than this burning question of “What the f* are Monads?”, and I decided I needed to learn functional concepts in a more clean room environment rather than one that merges them with the OO world.

Groovy's Inject

Java groovy, functional

When I started getting into functional programming I relaized that Groovy has some features which could be considered functional or higher-order functions. I commonly use methods like findAll (filter) and collect (map). As I was reading Beginning Scala by David Pollack I came across fold which I had never used before. Groovy calls this inject. inject allows us to walk though a data structure calling a function on each node, the result of that function is then passed to the same function being called on the next node.