Content from 2010-05

Clojure/Slime on Arch (and maybe elsewhere)...

posted on 2010-05-22 13:00:56

This is just a quick configuration post.  On Archlinux, clojure, clojure-contrib and swank-clojure-git packages are already available from the AUR. I'm a big fan of Common Lisp and use it for most of my programming, so I wanted to be able to use any of the 3 common lisp implementations installed from distro packages along with SBCL git built with clbuild or clojure without much fuss. Though there are a fair number of articles on clojure/emacs/slime setup and still more a google search away, I found it a bit of a pain to get things going the way I wanted.

I can't vouch for whether or not this will work for non-Arch users but if you have clojure and swank-clojure installed then aside from changing paths or setting environment variables this ought to work for you. (Let me know if I'm wrong, of course.)

I've got my lisp implementations defined as follows:
(setq slime-lisp-implementations
'((ccl ("ccl64"))
(ecl ("ecl"))
(sbcl ("sbcl"))
(sbcl-git ("/home/redline/builds/clbuild-dev/clbuild" "lisp"))))
(setq slime-default-lisp 'sbcl-git))

If that looks completely alien to you or you don't already have some additional code in your .emacs for SLIME setup, you're in the wrong place. You probably just want an easy Emacs starter kit for clojure. Or, alternately, to look at my full .emacs file.

And the following big chunk to get swank-clojure and the rest set up:
(add-to-list 'load-path "/usr/share/emacs/site-lisp/clojure-mode")
(require 'clojure-mode)
(add-to-list 'load-path "/usr/share/emacs/site-lisp/swank-clojure")
(require 'swank-clojure)
(add-hook 'clojure-mode-hook
'(lambda ()
(define-key clojure-mode-map "\C-c\C-e" 'lisp-eval-last-sexp)
(define-key clojure-mode-map "\C-x\C-e" 'lisp-eval-last-sexp)))
(eval-after-load "slime"
`(progn
(require 'assoc)
(setq swank-clojure-classpath
(list "/usr/share/clojure/clojure.jar"
"/usr/share/clojure/clojure-contrib.jar"
"/usr/share/emacs/site-lisp/swank-clojure/src"))
(aput 'slime-lisp-implementations 'clojure
(list (swank-clojure-cmd) :init 'swank-clojure-init))))

At this point, you should be able to start Emacs and then do M- - M- x slime, followed by enter and either the word clojure or one of your lisp implementations. Alternately, you could just do M-x slime and get sbcl-git. See? Not so bad after all.

BATB 3

posted on 2010-05-21 13:57:52

Battle at the Berrics 3 is coming up. For those of you who don't know what that is, it's a game of Skate between some of the worlds best skateboarders. For those of you who don't know what Skate is, it's like Horse in Basketball except you spell Skate and battle over skateboarding tricks rather than shots from various parts of the court.

As I said, this is BATB 3. BATB 1 and 2 were both awesome and had some of the most ridiculous and consistent skating I've ever seen, particularly in the finals and semis. Consequentially, trying to predict who is going to win is totally ridiculous. Barring the possibility of injuries or other nonsense, the finals are just as likely to be decided by somebody having a really off day as anything else. I mean, take Mike Mo vs Torey Pudwill for example. Is *anyone* excited to call that? All the same, here is my preliminary bracket. I'll try to figure out the semi-finals and finals later. Also, if you feel like debating these picks feel free to let me know where I'm way off. Even though I'm not. I've seen the future people. This is it:

BATB3

Quad 1
Chris Cole vs. Joey Brezinski - Chris Cole
Danny Garcia vs. Johnny Layton - Danny Garcia
R2 - Chris Cole
Gilbert Crockett vs. Shane O'Neill - Shane O'Neill
Greg Lutzka vs. Eric Koston - Greg Lutzka
R2 - Shane O'Neill

Quad 2
Cesar Fernandez vs. Benny Fairfax - Benny Fairfax
Josiah Gatlyn vs. PJ Ladd - Josiah Gatlyn
R2 - Josiah Gatlyn
Cory Kennedy vs. Jimmy Cao - Cory Kennedy
Erik Ellington vs. Ryan Gallant - Ryan Gallant
R2 - Cory Kennedy

Quad 3
Peter Ramondetta vs. Mike Mo Capaldi - Mike Mo
Mark Appleyard vs. Brandon Biebel - Mark Appleyard
R2 - Mike Mo
Rick Howard vs. Marc Johnson - Marc Johnson
Torey Pudwill vs. Marty Murawski - Torey Pudwill
R2 - Torey Pudwill

Quad 4
Dennis Busenitz vs. Chico Brenes - Dennis Busenitz
Paul Rodriguez vs. Sean Malto - Paul Rodriguez
R2 - Paul Rodriguez
David Gonzales vs. Billy Marks - Billy Marks
Heath Kirchart vs. Steve Berra - Heath Kirchart
R2 - Billy Marks

Q1 - Chris Cole
Q2 - Cory Kennedy
Q3 - Torey Pudwill
Q4 - Billy Marks

Semi-Finals 1+2 - Cory Kennedy
Semi-Finals 3+4 - Billy Marks

Finals - Cory Kennedy
Runner-Up - Torey Pudwill

Paktahn 0.9 is out!

posted on 2010-05-18 18:16:40

Well, it's been a long spell since the last paktahn release. There are reasons for it but I'm just glad we got the release out.

The "big feature" of the release is AUR updates which I am happy to have implemented. I wouldn't have been able to get it done if versioning support hadn't been kicked off by Wei Hu (wh5a) a while back though. At any rate, AUR Updates are in as is support for the .tar.xz format which Arch has adopted for packages going forward.

Beyond that we have a new contributor to the project, Justin Caratzas, that I've enjoyed working with and hope to work with more in the future. Justin fixed a bug in how AUR packages were installed regarding whether or not they were installed as dependencies.

I should have more time to hack on paktahn this semester than last semester so hopefully there won't be a commit gap for 2 months like there was before. I'm already looking at features for 1.0 and my biggest priority is reworking the command-line option handling using astine's unix-options and then extending paktahn to support pacman's -Syu, -Sy and -Su. Then I wouldn't ever need to call down to "regular old" pacman. Other than that it might be nice to get support for Paktahn on CCL or ECL and a test suite written. CCL support is complete save catching Ctrl+C and offering restarts as appropriate. There isn't exactly a clear path to implementing said support...

Anyway, if you're a user and you find a bug or want a feature, head for the issues page and let us know about it!

A Year Ago Today

posted on 2010-05-18 13:00:04

A year ago today, my Dad, John M. Glenn Jr died of non-smokers lung cancer. Mom and I still miss him terribly but I think if he were here he'd be proud of how we've carried on and on how much we've accomplished and enjoyed in the intervening time. Wherever you are John Glenn, you are loved and remembered. We were lucky to know you.

A Summer Schedule and 10,000 Hours

posted on 2010-05-17 13:00:35

Today is the first day of my summer courses. I'll be taking Distributed Computing, Programming Language Concepts, Information Security Administration, Astronomy and the corresponding Astronomy lab and cramming all that into 8 weeks. Hooray. The Distributed Computing and PLC courses are online which helps ease my scheduling and transportation concerns somewhat...though by the end of summer there is a possibility I'll have a car again obviating my need to take public transit an hour and a half to get to campus. As it stands, classes are Monday through Thursday, start between 10 and Noon and end by 3pm everyday.

That ought to give me plenty of time to work on personal studies...but there's a problem with that. I haven't been good about making my personal CS studying structured since the great 2008 experiment/debacle. There are a lot of reasons for that experiment's failure. I lost steam studying only SICP in 2008 and not having any immediate idea how to write software that was useful to me or anybody else. Perhaps more significantly, I wound up with not only a full time job but also housewife duties in May 08 which practically ended the time and tight scheduling that had been crucial to my progress. I'm likely still going to have housewife duties but I think I can carve out enough time this summer to give things another go.

Why Bother?


Long before Outliers, many studies suggested that 10,000 hours of practice are required to achieve expertise. Peter Norvig has a post called "Teach Yourself Programming in Ten Years" that is often linked to in discussions of learning to program and it links to a few of these studies. ...but that link is, perhaps, a bit over cited and it's impact softened as a consequence. I prefer the comment by nostrademons on that post, reproduced here for posterity:
I don't think it works quite like that.

When I got my first programming job, straight out of high school, I finished tasks in 2 days that took the other programmers there 4 months. I figured that if I was that much faster than them, I ought to be able to become a world-class programmer in just a couple years (or more accurately, I thought I could become a world-class physicist in my 4 years of college and then a world-class programmer in the 2 years afterwards).

So I resolved to take all the shortcuts I could. I'd read all the classic books in the field and learn from those with more experience than me. I'd take internships with experienced, accomplished programmers and pick their brains for everything I could. I'd take on volunteer coding tasks so I could get some experience building things on my own. I'd cherry-pick all the tough courses at college so I got the best part of a CS degree without having to sit through stuff I already knew.

I did all that. I've read all the classic CS books - GoF patterns, Mythical Man Month, Extreme Programming stuff, Pragmatic Programmer, Knuth, SICP, TAPL, Dragon Book, On Lisp, etc. I've worked with programmers that wrote large chunks of curses, Rogue, vi, Jini, JavaSpaces, HotSpot, Gallery, Stratus, Equalogic, DEC compilers, Python, Google, and a bunch of other projects they don't brag about. I wrote Amherst's course-evaluation system, and rewrote the software for a 100k-user site, and wrote one of the front-page hits for [haskell tutorial]. I have that CS degree, and aced the algorithms class of which you speak, and took compiler design and OS and computer graphics too.

It's been 9.5 years since that first programming job, and it still feels like I have a really long way to go before I'm actually a world-class programmer.

The part I didn't realize, in my youthful arrogance, was that I was comparing myself to the wrong people. When Norvig tells you how to become a programmer in 10 years, he's assuming you're already taking all the shortcuts you can. It still takes 10 years. Most of the people you'll meet straight out of high school, or in most colleges, or in random companies, will never become programmers in the sense that Norvig's talking about. Eventually they'll give up trying, and start grumbling on Reddit about how the software industry is mostly boring cubicle farms where they push around Enterprise JavaBeans and never use the algorithms that they learned in college.

Let me just say, I *love* this comment. I've thought about printing it out, hanging it over my bed and reading it before I go to sleep every night just for the kick in the ass it gives me. I'm probably too relaxed to ever achieve the level of expertise nostrademons is talking about (and see the "experiment" link above if you don't believe me) but I want to keep learning. I think it is far too easy in this field to not follow both theory and practice, to either stop writing code or stop keeping up with the theory. I have a real passion and interest for programming and I plan to try to avoid that.

How To Do It


I'm not sure to what degree schoolwork, paid work or personal projects can contribute to the 10,000 hour figure. I feel like if it's not a concerted effort to get better in an area where you are weak or otherwise generate forward motion, if it's not dedicated practice rather than plodding repeated movements, it doesn't count. Many of us are adults though and if you want 8 hours of sleep 7 nights a week with social time, transit time, time to eat and time to relax then a week goes from 168 hours to 112 hours to 72 hours (after a 40 hour workweek) to less really quick.

Assuming you set aside an hour every work day (M-F) for dedicated personal studies, 52 weeks a year, it would take you about 40 years to achieve 10,000 hours. I have to assume Norvig or others would include school or a job assuming that it continued to push your limits. Otherwise, we're talking 20 hours a week (or 4 hours after work+school+etc every workday) to get there in 10 years. At any rate, I've said I'm in no rush and that I'm probably too relaxed to achieve the level of expertise discussed above. As a consequence, I'll only do 5 hours a week from 4-5pm Monday through Friday.

I'm not going to have quite as structured a study plan as I did in 2008 though I will be doing the exercises, there will be specific books I study from and hopefully I'll find time to blog about it and not just push to github. Monday-Tuesday will be Computer Systems: A Programmer's Perspective by Bryant and O'Hallaron, Wednesday-Thursday will be Algorithm Design by Kleinberg and Tardos and Friday will be Peter Norvig's Paradigms of Artificial Intelligence Programming in Common Lisp. Let's see how this goes...

What Kind of Day Has It Been

posted on 2010-05-13 21:40:12

It's been a hell of semester. And if you don't get the title reference, click here and then watch lots of Studio 60 and The West Wing.

This semester had everything. There was a cash shortfall due to my not requesting enough Financial Aid loans because I was unaware that online courses cost almost twice as much per credit hour since the state won't subsidize them. I had a busier than usual course load. I reluctantly chose to graduate in May '11 rather than December '10 rather than trying to shove 32 credits into Summer and Fall. There was an internship that I much enjoyed though it was marred by some communication difficulties of mine the first two months or so. There was even a professor who had some communication difficulties, particularly in the specifications of his course project. That was lots of fun.

My grandfather died of the same non-smoker's lung cancer Dad died of. The anniversary of Dad's death, by the way, is next Tuesday. Strangest of all, I came to the realization that I wasn't prepared for a life long relationship with Teresa and, as a consequence, broke up with her on Monday. That part was terrifying and actually about a 6 month process. It's all still quite hard to explain. I tried to do the best I could once I was sure of my decision (late March/early April) to not cause all that upheaval before finals and graduation. It seemed like the most responsible decision at the time.

At this point, I've moved back in with my mother to house sit while she spends a month in Europe. She leaves May 22nd so this conveniently coincides with the anniversary of Dad's death. My 5 summer courses start next Monday and are: Distributed Computing, Programming Language Concepts, Information Security Administration, Astronomy (because I'm feeling worn out and lazy) and the corresponding lab. June 19th Mom will return from Europe and I'll move back into the Aventine to a 2-bedroom with a former college roommate of mine, Ben Minor.

Despite all the chaos, I feel oddly good about where I am. I got 2 As and 2 Bs this semester which is fine I suppose... but I learned a lot and that's good. I tried to handle the situation with Teresa with as much grace and respect as I could muster. In general, I've been faced with adversity and tried to demonstrate character and integrity as best I can. I'm not sure what Dad would say if he was around to see it but I'm trying to pat myself on the back and call it a job well done.

I do feel that I'm in the right place and have made many of the correct decisions. I am where I want to be. Now, it's a matter of keeping on, trying to relax just a little this week (which is tricky since I'm woken by hammers at 7:30 as Mom's house is being renovated and the roof redone...did I mention we can't use the stairs or top floor today?) and getting organized for summer courses and beyond. If you're reading this, keep doing your best. I love ya.

Unless otherwise credited all material Creative Commons License by Brit Butler