It is an all-too-familiar scene: a beautiful autumn day dawns outdoors and a group of pale coders are hard at work inside a downtown bar in Denver, Colorado, which has been transformed into the home base of a hackathon.

This is not an anachronism, but rather an obvious feature of what event organisers MassRoots have called the first-ever Marijuana Technology Startup Weekend.

While code and cannabis might seem incompatible, for the 150 attendees at the sold-out event, the concept makes perfect sense.

Combine the frenzied start-up scene with the so-called Green Rush in Colorado and Washington - the two US states where marijuana has been legalised - and suddenly, the idea does not seem as half-baked.

Image copyrightMassrootsImage caption
Isaac Dietrich founded MassRoots and was one of the organisers of the event

That's because for industry participants desperate for legitimacy - and investor dollars - a thriving start-up culture seems like one way to take the newly-legal cannabis industry from the underground to the mainstream, from flip phones to smartphones.

"One of the stereotypes that we're trying to dispel is the fact that we smoke weed almost every day," Isaac Dietrich, founder of MassRoots, a social network for marijuana users, told the BBC.

"But that doesn't mean that we're not productive - it doesn't mean that we don't do hard work.

"In fact we find most of our inspiration through smoking. So that's kind of one of the things that this event shows to the rest of the world."

Booming industry

Mr Dietrich says that when he first came up with the idea for a hackathon in June, he thought about 50 people would attend.

I think this is my generation's dot comAmanda Ostrovitz, CannaRegs

But within days the event was sold out - and by Friday, it had ballooned into a 150 person extravaganza, complete with the requisite social media hashtag (#MJStartup14) and, of course, free-flowing investor money.

Since many traditional venture capital firms are barred from investing in the marijuana industry due to clauses that prohibit pouring money into businesses that are deemed illegal by the federal government, other, smaller outfits have stepped in to take their place.

"Right now there's so much risk which leads to so much reward - it's a booming industry, it's only going to continue to grow," says Ashton Jones, a director at Massachusetts-based Dutchess Capital and one of the 12 investors who were attending the start-up weekend.

Why hack hemp?

Image caption
Mr Starbuck (r) and his team spent the weekend working on creating a smartphone app for GrowBuddy

You've got ideas, money and free-flowing snacks - but the most crucial element at a hackathon is, of course, the hackers.

But with so much money pouring into tech start-ups, it seems like most developers at the first Marijuana Tech Startup Weekend could be making much more money elsewhere.

So why hack hemp?

Daniel Starbuck is the lead developer at GrowBuddy, a website - and, at the end of the weekend, a phone app - that helps growers monitor their cannabis crops to increase yield. He says he got into the industry purely by chance after some friends of his began growing medical marijuana.

"I went into their grow house and saw that they had all these journals and notepads and everything and it was just a mess," remembers Mr Starbuck. So he offered to make them some software to better track everything - and has stayed in the industry ever since.

But, he cautions, finding developers like him is no easy feat - which is why so many would-be cannabis tech firms were eager to attend the weekend.

"A lot of tech talent is being taken by the other tech companies out there," says Mr Starbuck, adding he too was looking to hire this weekend.

"Finding someone that's passionate about marijuana, [who] can take what we're doing and come up with more ideas too - it's tough."

Mr Jones says his fund has invested tens of millions of dollars in nearly a dozen marijuana companies so far, from MassRoots to "a THC-infused personal lubricant company".

Dot com boom

That easy access to investors was part of what drew several would-be "cannapreneurs" to the event. Several participants chose to pitch ideas on Friday night in the hope of luring one of the 53 developers in attendance to work on their project.

The ideas ranged from a bio-technology firm that aimed to help increase cannabis crop yield to a Mooc - a massive open online course - to train workers who wanted to get jobs in the cannabis industry.

Image caption
The hackathon participants were free to sample cannabis from local dispensaries

Then the teams spent 48 hours trying to create a "minimum viable product" - essentially, a beta version of the app or website they are eventually hoping to build up as a business.

Amanda Ostrovitz, a lawyer and a former bank examiner with the Federal Reserve, was the eventual winner of the $2,500 cash prize for CannaRegs, a regulatory service and a reference library for attorneys, consultants, compliance professionals and individual licensees.

"Anyone who can see what's happening in Colorado knows that this is just the infancy [for the marijuana industry] - we're in the first out of the first inning," she says.

"I think this is my generation's dot com."

Follow the trail

But Silicon Alley is still miles away from the scene at the Watering Hole this past weekend.

For one - there was the smoking area on an outside deck, where participants jostled for a taste of some of the product from a local dispensary. Chemdawg, Dopium, and Gumbo were just a few of the strains on offer - and some would-be business pitches suffered as a result of their liberal testing.

MJ Startup Weekend Winners

Image copyrightMassrootsImage caption
Amanda Ostrovitz won the compeition with her idea for a legal website called CannaRegs

First place: CannaRegs, which "keeps dispensaries, investors and ancillary businesses informed of changes to marijuana laws and regulations"

Second place: CraftedHere, which "provides an online directory of cannabis-friendly bars, clubs and dispensaries for tourists and marijuana enthusiasts"

And while the typical hacker jokes were on offer - "I'm interested in the business opportunities in the data - don't try that pick up line at bars, girls don't really understand that" - there were also warnings specific to the group in the room.

"I'm going to make no assumptions about what state of mind everyone's in, but if you're unable to find your seat, check for a trail of snack wrappers, it will probably lead you there," joked Stewart Fortier, the master of ceremonies for the evening.

Image caption
Cannasseur's Ryan Griego has been in the industry since 2009, when he invented a weed trimming device

But in the end, stoners - and those who cater to their desires - need technology just like everyone else. And the 150 people in the room were keenly aware of the money potentially involved in that.

"Up until now it's been very Stone Age - some stuff guys [are] growing in basements," says Ryan Griego, the founder of event sponsor Cannasseur, a series of southern Colorado dispensaries.

Mr Griego says he went into the cannabis industry after graduating from university in 2009 - at the peak of the US recession.

For him, this is an industry in which he hopes to spend the rest of his working days - and that future is inherently wrapped up in start-up success.

"Technology is going to play a huge role [in] where this industry moves in the future."