Home

Advertisement

Customize
  Journal   Friends   Calendar   User Info   Memories
 

Improved Means for Achieving Deteriorated Ends

9th December, 2009. 10:33 pm. Unwind-Protect

The semester is finally drawing to a close. I had my last class sessions today. Exams are on Monday and Wednesday followed by a much needed break. It's been a long 3-semester year with more twists and turns than I could've guessed. No matter what happens, the break will be here soon.

I have a variety of projects to work on over the break. I have one code base to get familiar with and another to get features and bug fixes written for. I also need to finally get around to writing the successor post to On Minimalism. Between the writings of Brian Hurt, Paul Snively and Roly Perera I'm getting a better idea what my thoughts and issues are and can hopefully come up with something good to say. I alsomight push out another "redlinux" release for the hell of it and have various other pet projects.

Now, for the recreational stuff. I'm going through another exploratory phase in my music listening and need to filter through some of the stuff I've pulled down from the vastness of the net.I just finished the first fiction reading I've done since...oh...Summer 2007? It felt good to read for pleasure again. I read Vernor Vinge's A Fire Upon the Deep and was thoroughly impressed. I'm looking forward to reading A Deepness in the Sky over the break. Maybe Rainbow's End or Greg Egan's Diaspora if I'm feeling up to it. I can say that recharging my batteries will be my priority for whatever remains of December after finals. That and figuring out where I am in life and sensible goals for the next year. Of course, spending some time with Mom will figure prominently as well.

Make Notes

29th November, 2009. 7:04 pm. Another Home Stretch

I'm way behind on my blogging schedule. It's been over two weeks since the last one.

It's hard to believe 2009 is almost over. It's been an overwhelming year with a fair amount of negatives (dad's death, girlfriend's dad's death) but also a lot of positives (back in school with good grades, a nice apartment, fun programming projects, an internship for 2010 and a deepening relationship with the lovely Teresa Finn).

This semester has been much harder on me compared to the last two for reasons I won't elaborate on here. My last two big papers are due by tomorrow and Dec 4th, respectively. Then I'll be pretty free until exams on the 14th and 16th. I'm almost there but the end seems wildly far away. In part because I'm having trouble focusing on doing what I need to do today. I'm preoccupied with all kinds of concerns about graduating on time, finances, finding a job, where I'll be moving and other things that just flat out don't matter right now.

Though there are personal projects I'd love to work on, I may be a vegetable most of this holiday season.

Back to paper writing...

Make Notes

14th November, 2009. 7:09 pm. On Minimalism

Introduction


Today, I want to talk about something I've been meaning to get around to for a while. Specifically, I want to mention some realizations I've had about restrictions-as-strengths as it relates to programming languages. This blog post was so long in coming in part because I had conflated that issue with a desire to also discuss the source of brittleness (or non-modularity) in programs and how this all tied back to the foundations of programming and CS. Obviously, that's too much for one post. There are three questions here and each is important to me. Later, I'll blog about the other issues and hopefully write a summary to tie it all together.

Background


Programming is really hard. We've known this for a while. As Hal Abelson said, "Anything with Science in the name, isn't." Software engineering is no better off. Certainly no one would argue that we know how to build software as well as structural engineers know how to build bridges. Difficulty in software doesn't stem from a single source but as programmers we need to localize it as much as possible. One way we do this historically has been through tools: Our programming languages with their compilers, profilers and debuggers, our operating systems, and other bodies of code to reuse (libraries).

The Meat


Software has many demands placed upon it. First and foremost it needs to be functional by which I mean correct and relatively stable. Beyond that it needs to be reasonably fast and there are often other concerns from user friendliness to security. All of these concerns introduce complexity to our software, that complexity needs to be managed and I think a central question in managing that complexity is how to partition and quarantine it. I did a rather poor and embarrassing job of at least raising that question a while back. I was lucky enough to find an outstanding attempt at an answer on Daniel Lyons' blog. It was completely coincidental though, he hadn't read my article.

Daniel framed this problem as one of seeking minimalism. I see the same answer from a slightly different angle. To me, there seems to be a pattern of trying to handle complexity by restricting the actions of the programmer. For example, in Peter Seibel's Coders at Work there are numerous mentions of how different subsets of C++ are chosen by different teams of programmers to reduce the complexity of overlapping or interrelated features. People will entirely abandon templates or operator overloading. Douglas Crockford mentions making sure to never use the continue statement in his code. These are examples of programmers simplifying their own mental model to make problem solving more tractable.

Languages do this too of course, the most prominent examples from my very limited experience being Haskell forcing you to think in terms of its type system or Factor forcing you to think in terms of its stack. Adapting to the constraints may be awkward or difficult at first but they do provide real benefits. The Glasgow Haskell Compiler is capable of remarkable optimizations because it can assume that you've adhered to the restrictions of immutability and laziness. Judicious use of the type system can eliminate entire classes of possible bugs and restricting the use of mutable state simplifies parallel programming and concurrency. Through use of the stack, Factor strongly encourages thinking about the dataflow of your program. I've heard this sort of thing expressed before as a language being opinionated about how to solve a problem and there are plenty of diatribes on the failure of one paradigm (opinion) or another, especially OO since it's been dominant for so long. But let's not confuse this issue as being about particular paradigms or programming languages.

There are languages on the other end of the scale. I tend to think of Common Lisp as the primary one. (Disclaimer: I've written far more code in CL than anything else. My coding experience in every other language is positively trivial by comparison.) Common Lisp has been described by many others as being agnostic or happy to let you express a problem any way you can think how. Then again, Common Lisp requires you to think in Abstract Syntax Trees. It's the rift between opinionated and unopinionated languages that I'm curious about. Of course, Haskell and Lisp are (generally speaking) solving different problems as lispm (Rainer Joswig) notes on hackernews.

Vladimir Sedach suggests that the rift is about metaprogramming. More specifically, he states that Lisp and Smalltalk are self-describing computational systems. Lisp is written in Lisp. Smalltalk is written in Smalltalk. It's that old metacircularity/homoiconicity chestnut. Furthermore, he mentions that Haskell can't be self-describing because it's built on two computational systems. The type system is one and the language built atop it is another. Besides as Vladimir says, "If type systems could be expressed in a metacircular way by the systems they were trying to type, they wouldn't be able to express anything about types (restrictions on computational power) of that system." Factor's FAQ even mentions that they avoided purity and static types to enable the benefits of metaprogramming and interactive development. Personally, I know what I miss most in Haskell is an environment like SLIME. Interactive development of that style has an entirely different feel to me.

These observations about types and metaprogramming were a revelation to me and clearly, it's a limitation on the expressive power of something like Haskell. The question seems to remain open however as to whether or not such restrictions are enough of a strength to offset their cost. It seems to me that it must be situational but I'm interested in a more in-depth examination of the problem. Unfortunately, I can't offer such an examination myself today. Googling around a bit I found a discussion has started on hackernews about lisp while I wrote this. In the discussionjerf writes largely about this issue. Jerf suggests that the other end of the restricted/unrestricted scale is Java which sounds about right to me. He also suggests that the problem with maximum empowerment languages is that they don't scale to large team sizes and (correspondingly) large programs.

Of course, there are counterexamples like ITA Software but macros were thoroughly debated even among friends at ILC 09 as harmful or helpful to team programming. Vladimir Sedach again has a good grasp on their utility. In my opinion, neither Factor nor Lisp has resolved this question yet but more companies are getting involved with metaprogramming whether it be in Ruby or something else. I hope methods of containing the destabilizing facets of metaprogramming will emerge. Where Common Lisp is concerned, I think Fare's XCVB is an interesting opportunity in this direction and I'm watching it intently.

The Takeaway


Enabling single programmer productivity is important but so is enabling teams. Java as an extreme example of restriction has caused at least as many problems as it has solved. Languages with powerful metaprogramming features often need to be restrained in some fashion when used by large teams. There must be a middle ground somewhere. I say this because eventually our systems (codebases) become huge and unwieldy and we need our languages to support the difficult task of controlling that complexity and of keeping them modular and malleable. That problem of verbosity and inflexibility is precisely what metaprogramming tries to solve. I'll write about the problems in achieving modularity more in my next post.

Make Notes

10th November, 2009. 9:55 am. Way Behind

So, I'm coming up on the two week mark since my last blog post. Sorry about that. A big reason why is that I have been working on a post that might actually have some substance to it. It's still about programming and CS but it might actually have something interesting to think about. Sadly, it's not done yet. In lieu of that, I'll post some quick bits of news.

  • I've still been hacking on paktahn like a fiend whenever I can.

  • I've started playing Final Fantasy XII again. I love that game series. Also, it's soundtracks.

  • I finally caved and got a twitter account. I'm kind of embarassed but I was following a bunch of people by checking their twitter page a few times a day. It'll save time on that, at least.

  • It's rather hard to sum up all the music I'm into but my top 15 artists on Last.fm is a really good starting point. If there are any you haven't heard of, they're worth at least giving a shot.

  • I cannot wait to be done with school. Optimistically I can fanagle my way into getting credit for a literature course from my Oglethorpe days. If I do that and never get a D or F in any courses, I can graduate by December 2010. That's 5-6 courses a semester, 3 semesters a year. Otherwise, it's May 2011 for me. Blerg.

  • On Dad: I think I only really started missing him recently. I think in Summer I didn't even have time to process his death (or just didn't know what to think), August-September I was depressed and now I just miss him sometimes. It's not terrible but there's definitely a time or two a week where I'm all, "Man! I wish Dad was hear to {talk to, hang out with, listen to music with, play guitar with, play video games with, watch movies with, be a family with, etc, etc, etc}".


I was going to add a number of different "newsy" things here such as: the recent successes about PATRIOT act and State Secrets reform, the enjoyable experience of working with the ECL compiler developers, some thoughts on my first Factor program (which still needs some touch up work) and various other things but I'll leave that til another day because sadly, I have a test tomorrow to study for. More coming your way soon, folks.

Make Notes

28th October, 2009. 7:55 pm. Miracle Day

Ever since I blogged about good things happening to me last week, I've been slipping into depression. And the descent became rapid. The last three days were the worst of it. I had almost completely lost my ability to function. Just getting on the bus and making it to class, that was pretty good. That was an accomplishment. There were a variety of reasons for this but certainly one of the most prominent was how overwhelmed I felt by my Algorithms class. The first test had decimated most of the class (a handful of people got better than a 60) and the second one was today. Thankfully, it was a much gentler test than the first.

It's the teacher's first semester at my school and if my sources are accurate one of the reasons the second test was so much easier is that he has received enough complaints to be on some sort of probation. Whether or not that's warranted or not I can't say. What I can say is that I came into this semester drained. Partly due to prior semesters and a bit of academic exhaustion, partly due to Dad's recent death. I was hoping my courses would re-energize me this Fall. I found that all my courses drained me. It was terrible. Thankfully, I started working on some Open Source Software and that has been a real boon to me. Being able to share my enjoyment of programming and feel productive with somebody else helped give me a boost that I really needed. It kept me afloat. That said, if I had bombed the test today I don't know if I would've been able to handle it well.

I was concerned that if I bombed the test (which seemed probable) I would be so defeated that I'd have a hard time picking myself up and making a good effort on my other courses. Bombing the second test would have meant near certain failure in the class and I wasn't in a good position to take that blow. Thankfully, I'm still in college and I caught a break. A lot of people complained and the second test was a good bit easier. Whether that's fair or not is out of my hands. In the real world, I won't get many breaks or second chances. I'll just be required to meet the bar. Period. And sooner or later I'll miss it. I will fail. At which point, I'll just have to pick myself up. But not today. Today I'm going to keep trying to float and start working on finding my optimism.

Here's a pros and cons analysis and some oddly well timed material I stumbled on today.

Cons:
He's easing up on us. We already weren't understanding the material well. Now he's easing up on us.

Pros:
I am not going to fail the damn class.
I can study CLRS and Kleinberg-Tardos and Levitin (all Algorithms books) at home to my heart's content, this semester and/or after. I've always vastly preferred self-study and learning by experimentation anyway. :)

Tasty links that might also cheer you up:
High Anxiety - Raganwald's new github-thing
Optimism - Also Raganwald's new github-thing

A song I've been enjoying:
Two Door Cinema Club - Something Good Can Work
Found at skreemr.com



Read 1 Note -Make Notes

22nd October, 2009. 2:53 pm. Git For Dummies...

A friend asked me for a simple tutorial. So here one is. Also, just because I can:

My workflow roughly looks like:

Start or clone git repository: [git clone $URL] OR [mkdir project; cd project; git init]
Make some changes: HACK HACK HACK, ensure the files are tracked: [git add $FILES]
Review my changes: [git status], [git diff]
Uh oh, a choice!: if (I like these changes)
then [git commit] // ideally, your $EDITOR environment variable is set to the editor you like.
else [git checkout -- $FILES] // yes, the dashes should literally be there. this reverts the files to the last commit's state.
Repeat.


I didn't cover pushing and pulling (collaborating) or branching above (working on separate features simultaneously).
Let's do that now:

Get a list of branches and show the current branch: [git branch]
Start a new branch to work on: [git branch $NAME]
Switch to a different branch: [git checkout $NAME]
Delete a branch you don't want anymore or are finished with: [git branch -d $NAME]
Merge changes from one branch into another branch: [git merge $SENDER $RECIPIENT] // Branch recipient gets senders changes.
List tracked repos (online, github, etc): [git remote]
Track a friends repo (or one online, github, etc): [git remote add $URL]
Send your changes to a repo you have write access to: [git push $REMOTE $NAME] /* remote can be a url or one of your remotes.
name is a branch on your machine. note that master is a branch. */
Retrieve and merge in a friends changes: [git pull $REMOTE $NAME]

There are a bunch of blog tutorials. The best way to find them is to go to programming.reddit.com and search for "git tutorial" or "git intro".

Other than that, there are two free git books I know of:
Pro Git - http://progit.org/book/
The Git Community Book - http://book.git-scm.com/


Make Notes

22nd October, 2009. 10:54 am. The Good Things

This is a test of something a little different. This will be a personal post detailing some good things that happened to me yesterday. Ya know, because that perspective is good.

Good Things that happened to me today:
My algorithms test got pushed to next Wednesday. Two days is time for me to learn more.
I setup plans to see Where the Wild Things Are with Max (possibly others...) this weekend.
I got to listen to a lot of good music: Bill Evans Trio, Bibio, Four Tet, Memory Tapes, Deerhunter, Two Door Cinema Club, French Kicks...
I wrote a simple wrapper macro on with-interrupts for ECL<->SBCL portability.
I just enjoyed seeing people: Alisa, Bansri, Christian, Elisha, Kelly, Trevis, Professor Snook, Professor Brown, pretty much everybody.
Don Gerz made a funny post on my wall.
I enjoyed reading some news on reddit and hackernews. I also enjoyed Chris Cole week at the berrics.
My financial aid finally came in. I need to check up on that Friday.
I got warned about a quiz on Friday. Always better to know in advance.
A bug I found in ECL got confirmed by Juan Jose Garcia-Ripoll. Might not get fixed right away but hey, that's something.
I defeated some (but not all) of my Algorithms homework. It's progress.
I felt attractive.
Teresa felt like making a grocery run. There was Sorbet for dessert.
Teresa.


Read 1 Note -Make Notes

19th October, 2009. 6:04 pm. Since Last Time

Well, it seems a lot has happened since last time. An additional lisp library for concurrency called Calispel has been released and is up on Cliki. Unfortunately, it depends on cl-jpl-utils which in turn depends on cl-rsm-queue, neither of which are on Cliki. Such is life. There are good things though, a release candidate for CCL 1.4 has been put out. I've also started a branch porting Paktahn to Embedded Common Lisp. It didn't wind up being as tricky as I thought. Hopefully, I'll have something I can merge to master in a week or two. Of course, I wouldn't have gotten anywhere without Leslie. Geez, that guy is patient. Anyway, what about non-lisp news? The ACM Reflections conference is over and hopefully videos will be posted soon. Additionally, there's been some discussion about whether or not it's time for Factor 1.0. There's still really great work being done on the language implementation. I would like a proper book for it and binaries to be available in my linux distro but I can wait.

There's also been a good discussion on what math programmers need to know on reddit recently. The outstanding comments (IMO) are here, here, here and here. Similarly, there was a good thread a few weeks back titled "What do you wish you knew when you started programming?". A few of my favorite comments are here, here, here and here. More importantly, there was a very enjoyable article and followup about Office Politics as interpreted by Hugh MacLeod and The Office. As some folks in the hackernews thread mention, the model isn't universally applicable. Yep, that's right. It's a model. Go figure.

Well, it's been a very hard week. Mostly because I just hate my Algorithms class. I don't hate algortihms just the way it's being presented and taught. I'm pretty sure I can overcome the obstacles involved, I'm just much less motivated to do so than I would like. The last two semesters I really had a fire under my butt about school for some reason. Maybe not but when I had to rise to the challenge, it was relatively easy to do so and I was kind of proud of that since it was a divergence from my past. This semester the fight just isn't in me and I have next to no pride in what I'm doing in school. I'm sort of coasting and I'm finding it hard to break out of that. Of course, I'm learning the material and I'm doing extracurricular things to improve my knowledge, joy and understanding because I care about programming. Whether that's stupid or not is another question but also kind of irrelevant, I didn't choose to be fascinated by this stuff. I just can't help it. So I'm not doing what I love, I'm doing what I can't help but do. It's gonna be a long road.

I've still been getting a few things done. I've written a few quick hackish, sbcl-dependent scripts. Maybe I'll post some of the code for them soon. I started working on Redlinux again. The last release I made was back in May and a lot has changed since then, more about my approach than about Redlinux. I'm hoping to make a new release by the end of November. So far the big change is my build process. As in, now there actually is one. It should be trivial to rebuild from scratch in the future. See what a non-distribution it is? The upcoming release should have a nice proper script for creating a new user and doing a little initial setup. Above and beyond that, I'm hoping to work on the documentation some. If anything, the real problem is it may not fit on a single CD with all the programming software I've bundled in.

A while back I wrote a post on getting an undergraduate CS education for under $1,000. It was mostly focused on which books and resources were ideal for self-study. I reworked said list and posted it on Amazon over the weekend. A lot of my decisions about what's worthwhile for self-study has changed (since I've actually read more). My motivation stems largely from the fact that I prefer self-study to school. Finally, there are two slightly older articles of mine that linked to a bunch of really interesting articles that are still among my favorite blog posts I've stumbled upon since trolling the internet for programming stuff. I'm hoping to do a real writeup on a number of these articles and add in a few of my own ideas in the near future. And since I'm calling it "the near future" you know advance I'll never get around to it. Well, hopefully not. :)

That's all for now. Back to homework guys.


Make Notes

13th October, 2009. 6:33 pm. Just a Feeling

Last time I blogged, I was midway through midterms and just starting to work on some lisp projects. It's hard to imagine that was only a week ago. Since then, midterms are over, I've realized my only difficult class is Algorithm Analysis (the nature of whose difficulty I've blogged about before) and become an official Open Source contributor. Admittedly, it's on a small scale but when I was just getting interested in open source a few years ago I never would've figured this would happen so soon. It's been a great learning experience so far and incredibly fun. I still need to get started working on adding libvorbisfile bindings to Andy Hefner's Mixalot but today I'm going to try to dump some links out of my browser, get some thoughts down and do some Algo homework.

I mentioned recently that I've been wanting to write a lisp post but been unsure what to focus on. I've wanted to respond to posts made by others in various places over the last few months asking about the liveliness or validity of lisp as well as whether the language is still changing or whether the departures of prominent Common Lisp users matters (search for the second occurrence of "norvig"). Experienced lispers might just ignore that question at this point, I don't know. It does come up far too often. For my part though I want to try and address this because I know the more attention I've paid to the lisp community, the more I've seen how active, alive and, most importantly, friendly it is. It's been a little surprising in some ways compared to the false preconceptions one can get from blog and reddit chatter. Now, it may be undermanned. There's certainly more work to go around than people to do it but that's true of many places. Anyway, I simply have to get some of this out of my system. Here are a few thoughts...and links.

First of all, just this morning I poked around for libraries on concurrency and parallelism and found the following: erlisp, erlang-in-lisp (which may become active again, who knows), cl-future, csp, pcall, eager-future, cl-muproc, cl-stm, chanl, patron, philip-jose, cl-mpi, cl-cluster and, of course, the distributed schemes Termite and Gerbil. Poking around for GUI libraries I quickly found: cl-gtk2, ltk, mcclim, commonqt, celtk, cells-gtk3, cl-smoke, cello, wxCL, cells-gtk, lisp-tk, clg, and cl-ncurses. Even cl-ncurses has seen some recent activity! :)

Now I grant some of these libraries are unmaintained and others are code stubs that never quite got off the ground. But 6 of the concurrency libs were started this year and of those 6, 3 have seen code updates in the past 3 weeks. Of the GUI libs, the CommonQT and CL-GTK2 bindings have both seen commits in the last month. Sadly, the libraries are spread out all over everywhere from Cliki to Github to random repositories dotting the cyber landscape. There are many reasons the library situation isn't perfect but it isn't dead either. Just look at all the projects and work-in-progress-projects in clbuild! Moreover, there are discussions about what Lisp needs to move forward. Some of them involve CLtL3, a new standardization effort, and others involve infrastructure improvements, a central package respository for example. The talk is out there. Books are still being written, people are still working on the implementations and making releases, low level experiments are still being done even though the lisp machines are gone...well, mostly.

But mostly I just wanted to put this all out there for now. To celebrate the tremendous, if seemingly fractured, development and FUN people are having with this language. Because that's what I'm having. Fun. You want in on it? Then get ready to get your hands dirty.


Make Notes

6th October, 2009. 10:25 am. Keep It Together

So, the last time I really posted a personal update I didn't have many good things to say. I was a bit depressed. But I seem to have climbed out of that hole. Midterms are mostly over and I have a much better feel for my classes with them behind me. The only one I haven't taken is the American Government midterm which I'll take tomorrow at 3pm. A decent amount of stress is off now that they're out of the way. I'm still a bit overextended. I'm pulled in many directions by a desire to do many things but I might as well be honest. I like it that way.

Particularly, I'm trying to contribute to two different pieces of Open Source Software. One is Mixalot, a suite of Common Lisp libraries for interfacing with Linux's ALSA sound sytem and playback of MP3 files. The other is Paktahn, a package management wrapper for Arch Linux which is meant to replace Yaourt. Paktahn is also written in Common Lisp. Notice a trend? I want to use Mixalot to work with Ogg Vorbis (*.ogg) files which it doesn't support. I told Andy Hefner I'd like to try and contribute some libvorbisfile bindings which would let Mixalot work with that file format. Unfortunately, that involves interfacing with C code which I don't know much about. It's definitely an order of magnitude harder than most things I've worked on before. Plus I've had exams...so I haven't gotten much done on that front yet. Leslie Polzer is writing Paktahn and he pointed me in the direction of a fairly straightforward, well-defined problem that needed solving. I got around to working on that and have made pretty good progress. With a little more work it may even make it upstream for the next release. That's wicked fun!

I've wanted to write a blog post on Lisp for a little while but couldn't narrow down what about Lisp to focus on. Lately I had been looking at mailing lists, documentation and source code repos for a lot of Common Lisp libraries. Perhaps what shocked me most was the realization that Lisp has plenty of work to go around for silly noobs like myself. There are all sorts of trivial little tasks all over the place that maintainers are too busy solving real problems to fix. And that's awesome! I can be very helpful probably to a wide number of different projects. Now, I don't know a lot and I don't have time to "help" near as much as I'd like...but I can still learn something and be of use. And I'm pretty happy about that. So Common Lisp: Have fun on the fringe, benefit from learning a non-standard language with some awesome features, be useful and get mentored by some smart folks. What's not to love? I'll try to post something more thoughtful about this later. But for now, all I have to say is that this is a really good thing and I can't wait to see where it takes me.

For now though, it's back to studying.


Make Notes

Back A Page