Tag Archives: programming

Uncategorized

TestAPI!

Developers should know from experience that in projects of any substantial size (pretty much anything big enough to deliver to a customer or client), there will be a need for little utility programs or libraries and classes to handle routine tasks.  When those moments occur, typically what’s called for is something simple and easy to get up and running, because it’s not very much value-add to whatever it is you’re building.

Take parsing command line arguments for example.  It adds very little of value to the end product, but it’s the kind of thing that winds up being necessary.  It’s a cost of doing business with the computer.  A developer has to decide how to handle addressing the need: start from scratch and handle command line arguments manually — writing JIT code that will very likely become hard to update later on, buy a vendor product?

Most developers are inclined to do the former.  I know I am – developing is what we do!  What’s one more minor thing to build in order to address needs?  The problem with this approach is more systemic than just the downside up ending up with old, crufty code that wasn’t designed well enough to be maintainable later on.  Every developer winds up with their own hand-rolled mini-library for handling the mundane – sometimes more than one!  That represents a lot of duplicated effort and inferior quality.

Of course, what I’ve just done is summarize a large portion of the motivation for open-source software .  More specifically though, I recently discovered TestApi.  It’s just quietly hanging out there on codeplex (written by Microsoft devs on the clock), but it addresses a handful of these mundane infrastructure things that gets in the way of us building software with real value.

I just wish I had known about it a long time ago.

Uncategorized

Project Management Tools Review

Introduction (or, what is it all about?)

I’ve been trying to figure out a good solution for the project management needs I’m facing.  There are literally hundreds of tools intended to help developers make better software, and dozens of methods and philosophies (where only a few really prevail in the mainstream).  My team leans agile, but we need some better tools to manage ourselves.  I’ve been re-reading a lot of stuff on agile methodology and spending some time thinking through the current state of our discipline (as it applies to our team in particular).

Questions I’ve been pondering are:

  • What are we doing now?  I mean everything, not just what works or what doesn’t.  What is the total sum of how we practice software development?
  • What things should we stop doing?
  • What things should we start doing?

One of the things I came across in my reading is The Future of Agile Software Development.  Dubakov makes some interesting points and I’m not sure I necessarily agree with all of it (there is some good back-and-forth in the comments section), but I think his thinking about the focus points of good software development are reflective of the collective wisdom that inform the current state of the art in software development: do right things, do them right, and do them  fast.  I think this is the goal of modern Agile methodologies, and I’m a bit more optimistic than Dubakov that they can help us get there.  However, his outlook is a good reminder that part of the Agile philosophy is to have the self-awareness to back off and refocus on the core goals (do right things right and fast).

Software Development Focal Point (original content at targetprocess.com)

 

As I think about that focal point, I also reconsider the various stakeholders and their perspectives.

Developers as craftsmen

We take satisfaction in our work for its own sake because that’s how we’re wired.  We’re makers.  What really makes for a good weekend is to know that the last 5 days were spent making something, and that it was good.  We are made in the image of God by God, who delights in his own handiwork.  He graciously gave us the same attribute, and it manifests itself in a spectacular kaleidoscope of human talents and creative works.  His desire is that we delight in him while experiencing joy in our derivative creations.  This delight is made possible by Jesus Christ, who in his death absorbed the wrath of God over the corruption of the world (and proved it in his resurrection), and by faith we are enabled to delight in him in this way, to his own glory.  By his grace, those who don’t believe these things still take pleasure in their work, even if there’s no particular spiritual meaning  in it for them.  That’s why Monday is my favorite day of the week, not the reverse: I come to work with anticipation of the joy to be had in doing good work.

As developers, we want to make perfect software.  We want it to be bug-free.  We want the code to be elegant, flexible, loosely coupled, well-documented, clever, consistent.  We want it to be optimally efficient in time and memory (“performant” is not a word, and even if it were, it’s a horrible, imprecise word).

We also want to work in smoothly operating teams.  We don’t want there to be discord over minor issues.  We want to be managed well (and my definition of “good management” whether by a team lead like myself or by a project manager or whomever is “makes our jobs easier”).  We want to have a sense of purpose, and we want to feel organized.  We want to receive confirmation when our work is good, and when it’s not, we want to know how, why, and the best way to fix it.  We want to be continuously growing in our skills, both in depth and breadth.

Clients

For the purpose of this thought process, I consider “client” to mean “the one paying to have the project done”.  The one who has been persuaded of the strategic value — great or small — of the project.  They are running a business.  Perhaps a large business, or even multiple businesses.  If the company is large enough, it may be multiple businesses under a single corporate umbrella.  Whatever the particular structure of the “business”, someone decided that the project was worth doing.  But why?

They think that ultimately, the sum total value of the project (it’s activities, processes, and deliverables) are worth more to the business than if the project was not executed.  Much of the time, this is a simple calculation: how much money do they have to spend, what’s the business need, and what are the various options for satisfying it?  We would do well to always be mindful that our project wasn’t the only option.

Business owners

I think of clients and “business owners” separately, although in some cases they may be the exact same individual or individuals.  Either way, there is overlap in these two perspectives.  The business owner is something of a corollary to the developers.  They want the project to succeed, but they want it to succeed on their terms.  Business owners are the most impacted by the problem at hand, and have the clearest ideas about what the solution should look like.  They aren’t (usually) particularly technical, and a lot of the time don’t really have any sense of the possibilities, but they know what they want their daily work to look like and produce.  The point of the project is to make manifest the most important demands of that vision within the resource constraints of the client.  That is value.

Software firm management

Lastly, there is the management of the firm responsible for executing the project.  Their goal is mirror to the goal of the client: provide a solution to the problem at an even lower cost than demanded by the clients resource constraints.  Much of the responsibility for planning a successful project falls here.  Up front, the management has to decide whether a potential project is worth doing.  There are all kinds of considerations that go into that.  Part of it is evaluating the client to understand if he has the resources to commit, if he can describe his problem well, or if he even understands his own problem.  Management has to keep a close eye on the cost of the value provided to the client, and forecast somehow whether or not enough value can be provided at a low enough cost to both keep the client happy and make a profit.

What do we need from our tools?

This leaves us with some complex needs and desires.  The stakeholders have competing visions.  Sometimes we even have directly competing visions.  Developers, if asked when something will be done, would often prefer to retort, “when it’s done.”  Obviously, this won’t do.  But we still need to get it done and do our best to satisfy all four of the visions simultaneously.

The tools have a tall order to fill, to be sure.  In order to even begin to understand what we need from the tools, we’ve got to regurgitate these visions into some concrete features (hey….kinda sounds like what we do for a living!).  Let’s just break it down vision-by-vision (and some features will be common to more than one vision).

At a high level, the developer vision is best supported by an agile methodology (no surprise there, because the agile philosophy was formed by developers).  It isn’t perfect, but it’s the best we’ve come up with so far.  So what does that mean for our tool(s)?

  • We need the tool to help us capture the needs of the business owner.  Right?  We want to do the right things.  The business owner is the one that has to tell us what those things are.  The predominant agile methodologies refer to these as “user stories”, or perhaps “features”.
  • We need the tool to help us know what we’re working on right now.  Agile development is iterative.  The short work cycles that actually produce value are called iterations, sprints, or what have you, but we have to be able to break the work into manageable chunks, and put a date on it.
    • Part of the what is knowing which user stories we’re working on right now.
    • Another part of the what is understanding what each user story entails; understanding to some degree the complexity involved.
  • We need to know when we’re supposed to finish what we’re currently doing.  Developers make choices moment-by-moment about what to do or not do, and we need to have a finish line so we can make choices that are in the best interests of the project.  This allows us to make predictions — however imprecise or inaccurate — about what can be done in the given time (otherwise known as “estimates”).
  • We need the abstract artifacts of the project, like user stories, estimates, and deadlines to be linked with the actual work product (i.e., code) so that everyone has accurate insight into the state of the project at any point in time.  This linking needs to be as automated as possible, because the more friction there is in putting data into the tool, the less good data you’re going to get.  You can take that to the bank: if developers get frustrated with the tedium of the tools, you’re going to find that we will consciously or unconsciously avoid working with the tools.  That is bad for everyone.  The lower friction there is (and automation means essentially zero friction), the better.
    • Code really should be linked through the SCM tool, so when changes are committed, developers can enter in annotations that link the code with the project management artifacts as a part of their normal workflow.
    • I’ll get to “release management” in the next bullet, but it’s worth mentioning that unit testing is really important, and the tools should support them in whatever ways possible.  Test results should automatically result in bug reports to the tool, for example.  Test results should be reportable in the tool as a way to demonstrate progress or problem areas.

The client perspective has exactly one question that must be answered: “Am I getting enough for what I’m paying?”  For the client, the whole enchilada is the value proposition.  The tool must expose the value of the project.  To that end:

  • The tool has to allow the client to see what’s been done, and how much time and money was spent to achieve it.
    • The tool has to facilitate the collection of metrics that matter (lines of code are not one of them!).  Hours are a critical metric, but you’ve got to also be able to slice up hours into buckets of time the correspond to the bits of work that were done (completed, or partially completed user stories).
    • The tool has to give you a way to record the complexity of a user story.  This can be a non-hours measurement; in fact, it’s probably best if it’s not.
  • The tool has to give the client some insight (or help us to give the client the required insight) into what’s left, and how much time and money it will take to achieve it.
    • This needs to be done, to the extent possible, using measures that the client will understand.  Hours of labor and a billing rate are a universal metric for every client.  The tool needs to help us help the client make informed decisions about what things will cost in these terms so that various scenarios can be considered.  The best way to do this is to succeed at #1 just above.  A correct interpretation of  past data is the best insight into future value propositions.

Ever project has overruns, mistakes, and failures along the way.  Some worse than others, but no project goes perfectly according to plan (if it did, you wouldn’t be in software, you’d be in manufacturing).  When those things occur, the second bullet above becomes incredibly important.  It’s all that matters to the client.

The business owner needs the tool to help them articulate their vision for the solution.

  • BOs need the tool to help them capture user stories.
  • BOs need user stories to be coherent, and to have context that helps both us and them understand their interrelated-ness
  • BOs (and clients) need the tool to help them priorities the stories so that correct decisions can be made jointly with the client about what features or stories will provide the most value to the business.  This is satisfied by good sprint planning features.  There has to be an easy way to understand quickly what parts of the BOs vision are done, can be done, can be tested, should be done, etc.  This is similar to the second client bullet, but with a different emphasis.  This is also thought of as backlog management.  A sort of story card board is what most agilists would call for here.
  • BOs need a way to report variances from their own understanding of their vision (e.g., bugs), and those variances have to be worked with in a similar way to the rest of the work items.  Their fixes have to be adjudicated according to business value, evaluated for complexity, planned for along with other development work.

The management needs the tool for essentially the same reasons as the client, but perhaps with some additional reporting not visible to the client.

  • What’s the cost basis of the project?
  • Similarly, what’s the expected duration and margin?
  • Who are the best performers?

So there’s the rub(ric).  The bullets above may not seem as concrete as you might like them to be, but I want to leave room for interpretation and vision from the toolmakers (also note that this isn’t really a review of SCM tools or testing tools).  The tools I plan to review:

As I review each tool, I’ll post a link and a date here on this page.  Tools not shown here either I didn’t know about or could easily eliminate from consideration because of bad reviews or obvious lack of important features.

Uncategorized

PowerShell+SharePoint Quickie: Export List Data

I’m packaging up some work I did for a client in a set of SharePoint features, and some of the features include list instances. In this case, I needed to package up a list instance into feature xml so it could be deployed from the administrative web interface, but I didn’t have the list data in that format. I didn’t want to enter the data by hand, and there wasn’t an easy, readily-available tool to help extract the data in the format I needed. Enter PowerShell:

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$site = New-Object Microsoft.SharePoint.SPSite("http://mysharepointsite")
$site.RootWeb.Lists["MyList"].Items |% { "`n  {0}`n  {1}`n", $_["ID"],$_["Title"] }

This spits out XML formatted for use in a <ListInstance> element.

Uncategorized

Re: Do I Need To Learn Microsoft Technologies

A long time ago, in a galaxy far, far away (Stackoverflow.com, November 2008), a university junior posted this question:

Most jobs speak of C#, Visual C++, .NET, Java, etc etc Where as I am mainly using Java, C++, Perl, Python and programming to the standard Unix standards, would I be better off ditching Linux and spending my last year of University brushing up on Windows based technologies, languages and API’s, would this increase my chance of getting into the industry?

A fellow named Andy Lester responded with this:

I suspect that your “most jobs” observation is from looking in the wrong places.

Whether or not “most jobs” are using MS technologies, would you WANT to work with MS technologies? If you went and boned up on your .NET and Visual C++ and had to use Windows all day, would that be the kind of job you wanted? If not, then it doesn’t matter if that’s what “most jobs” call for, because those aren’t the jobs for you.

There are not hundreds of jobs out there available for you that are a good match for you, and for which you are a good match. Don’t worry about the broad playing field of the job market, but instead focus on the jobs that DO interest you.

I responded:

I think this is stupendously bad advice. Of course you should bone up on Microsoft technologies. The chances of you making it through a 40-year career in technology without having to work with MS stuff is slim to none. Of course, the real answer is…focus on what you’re learning in school first.

Now recently, I was busy doing something else and I had long forgotten all about this exchange, and Andy has replied back:

Ben’s right, you’re likely to have to use Microsoft technologies, if that’s how you want your career to take you. What I think we’re seeing here is the difference in viewpoints between someone like Ben who seems to think primarily in terms of maximum salary and maximum employability, and someone who thinks about the importance of loving what it is that you do for a job.

He then spends the rest of his post regurgitating his original point: focus on the jobs that interest you.

Firstly, to Andy: I don’t think your point is a bad one, but I still think it was a bad answer to a 21-year-old kid trying to figure out how to make himself marketable.  Of course you should be brilliant at the things that interest you – but it’s also wise to be familiar with tools and techniques that don’t, because they may very well allow you to sustain a situation in which you are allowed to do things that interest you.

My college situation was very similar to the OP’s: I went to a good computer science school, but all the tools totally revolved around Java, C, and Unix.  I never learned any of the Win32 API, and only after my Junior year did I really get a chance to learn anything about Microsoft developer technologies.  That was a huge deal.  It helped broaden my horizons a bit, even if my first job out of school turned out to be a realtime embedded systems job.  But you know what?  After a few years I decided that I wasn’t terribly interested in what I was doing at that job any more, so because I was familiar with tools that I didn’t typically use, I had the flexibility to quit that job and find another one pretty quickly.

Another reason why it would have been smart for the OP to bone up a bit on .NET development or the Windows APIs is simply that he may not really know what he is interested in.  If all you’ve ever done is Java on Linux, how could you?  It could also be that what he’s really interested in is distributed algorithms (or any technology-agnostic application domain), in which case the particular platform or toolchain involved is immaterial.  If that were the case, then it’s a no-brainer: get familiar with new stuff before you graduate, and you’ll be more attractive to potential employers.

So, simply put: my point wasn’t that you shouldn’t pursue the things that interest you, but that it’s wise (particularly for a new grad) to round out your skill set to increase the odds that you’ll get to do the things that interest you.

Just ask a Lisp programmer.

Uncategorized

Sololance

I’ve got a full-time job with benefits, and it’s a blessing to me and my family because it allows me to provide for them in full. We want for nothing, really.

However, I do someday want to start my own business. I have some ideas, but it will take time and even if I bootstrap and patiently build something worthwhile, it will still take money. I’ve been looking for small but worth-it side jobs to do to generate a little cash for a new business (e.g., purchase a license for basic developer tools, pay for basic hosting, etc). I’ve registered at a few of these “freelancer” work websites, thinking that if I fish around, I shouldn’t have much trouble picking up a job a month and netting an extra $100 or so to put away for a startup. Seems like a reasonable way to start bootstrapping something, no?

You know the sites: sologig.com, elance.com, guru.com, and most recently, werkadoo.com.

I’m entirely frustrated. Werkadoo looked promising, but since it launched it looks like a huge flop – I can only ever find one job listing, and it’s a very generic “send us your resume and we’ll be in touch” kind of listing. Not only that, but a full membership on Werkadoo costs $20/month. Sorry. Cash flow is the whole reason to do it in the first place, and when I really only envison doing 1 job per month, a cost of $20/month just to be there is not doable. Sologig.com? Just a feeding ground for employment companies and recruiters – which I’m entirely uninterested in. Sologig is a waste of time.

Don’t even get me started on rent-a-coder and get-a-freelancer and the like. Most of the projects are junk, and the employers that post non-junk projects are swarmed by bidders who can’t communicate, have no idea how to bid a project, or both.

Elance.com and guru.com are probably the best remaining options. Both have free membership options, but they limit your ability to bid and communicate with clients. They aren’t as bad as the other sites, but they still have their share of junk projects (you know the kind: “I need a complete clone of eBay for $500″). Those two sites don’t seem too bad, but bidding on a free membership plan is difficult because you’re not allowed to ask questions, and the projects posted are rarely detailed enough to elicit a complete bid. I’m basically structurally unable to compete because I’m not a paid member, but it’s not economical for me to shell out for a paid membership.

The other problem I have is that most of the software development projects are web applications. I’m not incapable of doing those projects (web applications are what I do for a living now), but the ideal project is one for which I can draw on my experience, and most of my experience is in distributed systems, clusters, backend server applications, systems programming, and embedded systems. Those projects are few and far between (and only on guru.com, as far as I can tell).

*Sigh*. Does anyone else have this problem? I want to find small, discrete chunks of work to do to make a little extra cash on the side, and in principle, the freelancing sites seem like a good avenue for finding such work, but in practice, they aren’t working well.

What is a freelancer with minimal availability to do?

Uncategorized

Client Perspectives

I’ve been trying to write a web application in my free time. It’s been going on at varying degrees of intensity for months now, and I’ve got virtually nothing to show for it. Part of that is due to a lack of time to devote to it; at best, I can add 2 hours to the top of my day by getting up early.

But the point of the post is really the other compounding factors that the various technologies impose on me, and how that relates to the client perspective in typical contracted software work.

My day job involves almost exclusively Microsoft technology; .NET in particular. We use Sharepoint to build client intranet applications, do custom C# development, etc.

In my hobby projects, I tend to play on a Linux platform with Lisp or C++ (although I certainly am no stranger to the Windows platform or other languages). The webapp I’m working on has been based on Weblocks, a continuations-based web framework for Common Lisp. I have an idea of what I want it to be and do, but Weblocks isn’t well documented and I’m not very experienced with it yet, so I come to it asking this question:

what can I do?

The framework is also pretty liberal, so even once I know what it provides, I still have the same question because the possibilities are limitless. In a way, this expanse is paralyzing: I have to spend a lot of cognitive energy figuring out among the zillion design choices at each step, in addition to learning a technology I’m inexperienced with. Consequently, it takes a really long time to get something working. However, once it starts to roll, it can roll fast because once I’ve made my design decisions and worked out my requirements (informal as they may be), I understand where I’m going and generally how to get there.

I have another hobby project, a Git client for Windows built in WPF and C#. With that project, I ask a different question:

How do I do that?

This is because of the nature of the platform. True of closed, proprietary platforms in general, but in particular of comprehensive frameworks like .NET, most of the design decisions have already been made. I don’t have to choose among the zillion ways to render a components in HTML/CSS/Javascript and process user activity – there’s already a mechanism just for that in ASP.NET called “web parts”. I don’t have to make a hundred design decisions about the desktop GUI framework to use and how to use it or roll my own or extend one, etc, because the Visual Studio and Blend designers support WPF. With this platform stack, the tradeoffs are reversed: I can get rolling on a project almost immediately, but at some point, things get really hard because of the box you find yourself in down the road (and at least part of the box is hidden from you because of the proprietary nature of the stack – the Sharepoint object model is a perfect example because it sucks). I once worked on a system that had it’s own threadpool because the .NET threadpool didn’t perform well enough, for example. That was not a quick project.

What struck me about this contrast was that I found myself empathizing with the position of a client.

As in the first case, the possibilities are endless – unmanageable – at first, and I didn’t know what I wanted, and nobody was there to tell me – but later on, the freedom in those design choices was favorable.

In the other case, I had some very concrete ideas about what I wanted because the technology limited my choices, but those limitations created pain points later on because they became very confining.

Conclusion? I don’t know, really. Each position has it’s advantages and drawbacks. I tend toward the former as a craftsman, but toward the latter as a consultant for a variety of reasons, including market inertia.

Uncategorized

Continuations

By training and experience, I’m largely an object-oriented programmer. I was a freshman comp. sci. student when the Java wave hit my university, so that’s what I was fed. I didn’t learn anything else but Java until the summer after my sophomore year; then, I was involved in a summer research program for which I used C++. Between then and the end of my undergraduate tenure, I had picked up more C++ and learned C (I should add here that my department was and is a very good c.s. department – they just didn’t use functional languages as teaching tools).

Where did that leave me? I knew how to write nice object hierarchies, tight structural/procedural code. However, Boost wasn’t a big deal yet, and I had only barely dabbled in anything else, so I was missing a huge piece of the puzzle: functional programming. I used lisp for a couple of programming assignments in graduate school because I wanted to learn the language – and I did learn the basics, but what I didn’t learn was important functional concepts.

Now, as a working professional programmer, I’m still trying to learn functional concepts. Some are pretty easy: immutability and recursive computation. These are very basic – even recursive functions were taught in Java programming classes.

But the most interesting element of functional programming is higher order functions, which are the basis for some very powerful forms of abstraction. This is what I was really missing in my repertoire.

So now, the point: I’ve been trying to learn a web framework called Weblocks. It’s freaking cool – but it makes heavy use of continuations for control flow (one of its major features). I had never learned about continuations before, so this was (and still is, to some degree) making it hard to learn the framework. So I was reading about continuations online (here ,here, and here) and came across a reference to Paul Graham’s book, On Lisp. I have a copy that I printed for myself, so I looked up the chapter on Continuations to gain some insight, and found the best explanation I’ve seen so far:

A continuation is a function representing the future of a computation. Whenever an expression is evaluated, something is waiting for the value it will return. For example, in

(/ (- x 1) 2)

when (- x 1) is evaluated, the outer / expression is waiting for the value, and something else is waiting for its value, and so on and so on, all the way back to the toplevel…

We can think of the continuation at any given time as a function of one argument. If the previous expression were typed into the toplevel, then when the subexpression (- x 1) was evaluated, the continuation would be:

(lambda (val) (/ val 2))

That is, the remainder of the computation could be duplicated by calling this function on the return value.

I found the little example shown here to be the best way try to explain continuations. Trying to understand the applications of continuations is a beast, and without this basic understanding it’s very easy to get lost.

Now…back to Weblocks…

Uncategorized

Visual Studio is a Pretender!

Can I just rant at you for a minute, gentle reader?

The editor in Visual Studio is from the stone ages. Really – it’s retarded (I don’t mean that in a derogatory sense – it really is retarded).

Sure, it does syntax highlighting, but really….so do the little code-paste tools like pastebin, and those little tools highlight for dozens of languages, so color me unimpressed.

Intellisense? Yup – very nifty, very advanced – oh, wait! Lisp environments have been doing “intellisense” for years decades.

What else….let’s see….feature or failure?

Visual Studio characteristic Feature/Failure Notes
consistency of indentation FAIL ever tried to use another editor to open files authored in Visual Studio?
efficient keyboard shortcuts FAIL the most often used shortcuts (navigation in text, for example) require me to move my hand off the home row
automatic indentation FAIL Are you kidding? Only if you happen to be typing in a magical combination of keystrokes that Microsoft decided was the one true way to type will auto-indentation be convenient.

These are just some very basic, fundamental things, and this list could go on – indeed, I might come back and add to it as I become more proficient with Visual Studio. As an experienced Emacs user, it’s quite painful. I tried to use the Emacs keyboard mode, but it was even more maddening than the other modes – they get the keystrokes wrong, and even when they get them right, they don’t work correctly! C-k is supposed to kill a line, but you have to type ‘k’ twice for the kill to happen, and if you try to yank it back in using C-y, you get the killed line twice! M-q doesn’t work, you don’t get registers, typing on top of a highlighted region doesn’t replace, it appends, and ‘C-x b’ doesn’t switch tabs in the editor.

For all the wonders of a modern IDE, can we just please, please have an editor that’s advanced past 1985?

Uncategorized

Dedicated window-buffer mapping with Emacs

I use CScope to navigate source code from within Emacs. It’s very, very useful and integrates will into Emacs. However, I’ve been wanting a way to control how cscope updates the buffer/window mappings as it locates search results for you. Sometimes, I like that CScope updates the buffer where I initiated the search to reflect the results, and it’s easy to get back to the point of origin using the C-c s u command.

However, sometimes I want CScope to leave my origin buffer alone and show the result location in another window so I can see both at the same time. It’s bothersome to have to arrange the buffers manually after performing a search, so I asked on stackoverflow.com, and voila! I got a good answer – create a simple keybinding to a function for dedicating a window/buffer mapping:

;; keybindings
(global-set-key [pause] 'toggle-window-dedicated)

;; buffer dedication (mostly for cscope
(defun toggle-window-dedicated ()
  "Toggle whether the current active window is dedicated"
  (interactive)
  (message
   (if (let (window (get-buffer-window (current-buffer)))
	 (set-window-dedicated-p window
				 (not (window-dedicated-p window))))
     "Window '%s' is dedicated"
     "Window '%s' is normal")
   (current-buffer)))

Now, using this, I can just hit the pause button on my keyboard when I want to pin down my main source buffer.

Uncategorized

Lisp: no easy download

Over at LispCast, eric’s got a new post up called No easy download. In it he talks about the difficulty of being new to Lisp, wanting to learn, and not knowing where to start.

He’s right. It’s way too hard – and I’d argue it’s one of the primary factors that hampers Lisp adoption. As one of his commenters points out

Perl, Python, and Ruby have the advantage that they are the only or at least canonical implementation of that particular language. Therefore, you go to perl.com or python.org and there it is.

When I run lisp, I don’t type ‘lisp.’ My implementation isn’t at lisp.org or anything like that because there are a bunch of implementations, none of them strictly canonical. If you’d gone to sbcl.org or cons.org (CMUCL) for instance, you would have found an accessible download link, although not really a mascot.

The comment is correct that there isn’t a canonical implementation of Lisp. But why should it matter? There can be a canonical place to go to for Lisp resources. There’s common-lisp.net, which isn’t bad, but as eric points out, it doesn’t lend itself to the “getting started” meme as well as python.org and ruby.org do. What about lisp.com? Well, it redirects to yeah.com, which has nothing to do with Lisp that I can tell. I can’t be sure though, because my employer blocks it:

\"Lisp.com redirected to yeah.com\"

Alright then, what about lisp.org?

Ok, it’s there and it’s Lisp-related, but it’s mostly about some group called the Association of Lisp Users. What about Lisp? Where can I download it?

Directory index of http://lisp.org

I can learn about the history of this group, read about their board, their members, their meetings, and their sponsors. A little further down, I can read about past conferences. Further down, I can read about Lisp resources.

If the ruby.org page had been this way, there might not have ever been a Ruby on Rails, and there’d be no Basecamp or Twitter (ok, there would be, but they’d be made from PHP).

Now, to be fair, the ALU has a CL Gardeners project that is aimed specifically at dealing with this issue, and the ALU Wiki is actually pretty good – but the wiki should be the index of lisp.org, and that page should have a link to the alu.org homepage.

Of course, eric’s post spurred some discussion over at News.YC, in which I participated. Said radu_floricica:

Arguing between 3 or 4 clicks doesn’t change anything. There are a lot of problems with beginners and lisp, but they’re far from how to get to the first implementation. As a newbee myself, googling for lisp environments was damn easy and instructive: i knew within 20 minutes that I should use linux, and if i really wanted windows (as I did at first) there was only one choice. When I finally had access to a decent linux it took me maybe another 20 to confirm that sbcl is the one I wanted. All that gave me lots of background information on the side.

Now the first brush with asdf on the other hand was a nightmare. I still don’t understand why I have to become an expert in pgp (definitely not just a beginner) just to use asdf-install.

I think the main problem for beginners is the effort it takes to install a reasonable environment. I tried two versions for a web application server: ucw and weblocks. Weblocks meant installing more then 10 different packages and source code is pretty much standard documentation – but it’s ok because it’s understandable and officially beta anyways. UCW is the standard – after a year and a half I still couldn’t produce an installation running on a port different then 8080 (I use 8080 for tomcat for all my machines).

All this effort is way disproportionate to the effects. Installing emacs and slime is may not be a breeze, but once you discover that googling “emacs configuration” brings up a bonanza it’s worth it. (Also that .emacs in windows is _emacs… that’s half a day I’ll never have back). But so much effort just to get a server running… if you want to help beginners write a better ucw tutorial, don’t just rearrange the links on the frontpage of lisp sites.

And my response:

Arguing between 3 or 4 clicks doesn’t change anything.

You’re wrong. And besides, the argument isn’t between 3 or 4 clicks. It should be no more than 2, and preferably one.

There are a lot of problems with beginners and lisp, but
they’re far from how to get to the first implementation.
As a newbee myself, googling for lisp environments was
damn easy and instructive: i knew within 20 minutes that
I should use linux, and if i really wanted windows (as I
did at first) there was only one choice.

You’re still wrong. Not every newbie even knows what to google for, and even if they did, it shouldn’t take them 20 minutes of web searching to figure out what they should download. And even that didn’t lead you to the right place – there is more than one option for Windows (cusp, allegro, lispworks, and clisp for starters – that’s not even counting scheme stuff), Linux isn’t the only way, and SBCL isn’t the only thing going on Linux. But a newbie either

a) has no way to figure all that out in a reasonably short amount of time b) isn’t going to try

And beyond that, you’re still missing the point: he shouldn’t have to.

Once you’re concerned with learning emacs and slime and customizing your environment and installing weblocks and getting asdf and asdf-install to work, you’re already committed. Difficulty doesn’t matter nearly as much by that point. Being able to easily download and dick around in the REPL is the number one hurdle that keeps people from trying Lisp.

The rest of the post I agree with, and I don’t argue that there are hurdles beyond the first one that are bigger and harder to conquer, but that’s irrelevant if newbies aren’t willing to jump the first one.