Showing posts with label Clojure. Show all posts
Showing posts with label Clojure. Show all posts

Friday, November 29, 2013

Clojure HackerWear



Hackers need HackerWear. TheHackerCIO (pictured above) has got to be close to the first person wearing one of these. As soon as the announcement came down, I placed my order. It came today. Long live Clojure!

You can get yours here.

I Remain,

TheHackerCIO

Wednesday, November 20, 2013

geeky Cucumber



Our GeekyBookClub is the best! Last night was a perfect illustration. TheHackerCIO came in totally unprepared. Unread Chapters. No time to read them. Too much client Hacking this week. Plus the Bus. Dev for the coming year!

Some would be intimidated by going to a book club, especially where the reputation of the club members is so high. I've heard that this is a "Guru's group."

TheHackerCIO is intrepid. Guru's don't intimidate.  Plus, we completely lack Prima-Donnas in the group anyway!

So, we had a wonderful time. Earl, as always, had performed the reading with his usual highlighting of every relevant passage and lots of sticky tabs along the edge to locate them the faster. Thank Deity for the "Earls" of the world.

The way we structure our club, members "bid" the page number of their next comment or question. The lowest bid wins. It makes everything flow along smoothly. We also allow backtracking to pages covered in prior meetings.  Which means that next week, when I get caught up on the reading, I'll be able to revisit everything that I just got a nice conversational and high-level introduction to at last nights Meetup.

In Chapter 5 we noted with interest the principle that:

 DAMP (Descriptive and Meaningful Statements)  
trumps DRY (Don't Repeat Yourself), 
when writing examples, because readability is paramount.

Someone remarked about the "bug magnet" -- that they had heard of a chick-magnet, but not a bug magnet. There was a general consensus that chick-magnets were preferable.

One member is moving away from a proprietary CMS to Magnolia, which came top of list, for:

  •  working easily, 
  • runs locally, 
  • doesn’t have to be deployed on a dev environment.
Which puts it onto the radar for consideration, at least by me.

Our local Groovy bigot held forth about the wonders of that JVM language, in support of closures. He expressed his wonder and indignation at Java's implementation of lambda expressions versus the superior work in Groovy. TheHackerCIO needs to get more into Groovy to follow this, but for those geeks interested and not in-the-know, here is the difference between a Lambda and a Closure:

A Closure has access to the static variables.

That is to say:

1. a Closure:
x=5
y=7
Z = {a, b : (a+x * y +z)}

2. A Lambda is the same as above, but without access to the static x, y which are now out of scope.

Then they discussed "Gstring", which is apparently another Groovy idiom, and not a racy nightclub exhibit. It's some kind of a templating expression language that will fit into a string to replace items.

I asked for the best book/resource to learn Groovy, and was recommended this:



The Definitive Guide to Grails 2, by Greame Roche, which apparently covers Groovy in an appendix which should be read first. Going by what the reviewers say, anyway. 

Then we started discussing Clojure (yes, Clojure the functional language, not to be confused with closures, the functional programming idiom that, when called returns another function)

We talked a bit about how Clojure is so hard to follow/read, at least for us, mere mortals. I remarked about how nice it would be to work with the smart people who DO work in it, for instance the people at Factual. And we got this capper:

"Clojure is ok when the system is small enough to be retained entirely in the head. When it outgrows that, or a mere moral must deal with it, it collapses." A whole lot of wisdom is contained in that epigram.

And for that Wisdom I am Grateful to the GeekBookClub Members &

I Remain,

TheHackerCIO



Tuesday, November 12, 2013

Reactive Programming

It's been recommended that I take a look at a Coursera course on Functional Reactive Programming. I wish I had time to add something more into the mix, because the reactive programming seems to mesh well with Functional programming.

To handle this class, I'd need an extra thirty hours a week in my schedule. I'd need to fulfill the prerequisite by learning Scala, as a functional programming language, rather than the Clojure I've been working on. So, it's not likely to happen.

But the idea of reactive programming is fairly simple to get an intuition of. It's the model used by spreadsheets. When a cell changes, all the calculations are updated.

This fits in well with the Functional Programming paradigm, where functions are composed to effect solutions rather than step-by-step imperative algorithm development. It's definitely worth a closer look.

To learn more about reactive programming, read the Reactive Manifesto.

I Remain,

TheHackerCIO

Friday, October 25, 2013

4 Things 4 Your "To Do" Lisp




  1.  For those who have never played with a functional programming environment, an easy way to do so is to use this web-site. It's been around forever; I used it over a decade ago! But it's a very easy online tutorial for the Lisp functional language. It has the additional virtue of learning what you know and what you don't. 
  2. After you've played with this a bit, you'll be in good shape to start learning Clojure. That way, you can get access to the whole ecosystem of Java, while still retaining the best of what Lisp has to offer. Go here for practice.
  3. Use this web site, to learn more about Clojure. 
  4. Break your head against Monads. Google "Monad Tutorial" & work your way through them, in the vain attempt to find one that really explains clearly and simply what they are & why they are so useful & how you're going to get 10x the productivity by using them. When you find one, please let me know. 
If you find me ambiguous about Clojure, it's because I kind of like it, but I find it a steep learning curve. And I haven't been able to get to the power level of that curve yet.  Your mileage may vary. 

Still, it's excellent to break out of your paradigm and explore another language. "A new language a year" is one of the tips I've seen for staying "Technically Fit." So, playing a bit in the functional realms is definitely a plus for getting you out of the Object Oriented world. 

I Remain

TheHackerCIO








As

Sunday, September 22, 2013

Why Losing Your House and Lisp-JVM Are Unrelated

Web sites are a great way to learn new languages. They offer a prebuilt compiler with a web input interface, so there's nothing to install to start learning. Plus, some sites offer Programming Koans, not to be confused with Hacker Koans. A programming Koan is a problem designed to test your ability to code and help teach you a particular language feature.

Yesterday, I mentioned how TheHackerCIO is learning Clojure, a functional language on the JVM. In fact, Clojure is a Lisp for the JVM. Again, the motivating reasons for this will have to await a future post. But the online Koans are a wonderful way to learn Clojure. They also will introduce the reader to a wonderful type of learning site.

So direct your browser to the 4Clojure site -- a site derived from Clojure-Koans -- as you continue to read my blog. Scroll down on the home page, to the section titled:

So wait, I can't buy cheap real estate here?

So now you will understand the cryptic title of this blog post! The 4clojure site says:

 "At this time, 4clojure.com does not provide information regarding the sale of foreclosed homes, and has no plans of doing so in the future."

which explains Why Losing Your House and Lisp-JVM Are Unrelated!
On the site, which you should set up a free account and start playing with, you will find:
  1.  a problem, stated in text, 
  2. a test suite of 2 -4 tests, and 
  3. a section for code entry.
when you enter the section of code, and click the "Run" button, the test suite will be used to test your answer code, and will graphically indicate pass or fail (green vs. red). When you correctly answer a Koan, your status will be updated, so you can track your progress by the number of problems you have correctly answered. You can also see top answerers, so there is a social component to it. 

Enjoy learning about Koans! And Clojure!

I Remain,

TheHackerCIO