Problem / Language

閲覧: 0 回
最初の未読メッセージにスキップ

caike

未読、
2011/03/18 15:21:502011/03/18
To: orland...@googlegroups.com
Hey,

Does anyone have any suggestions for either our language of choice or problem for tomorrow's session ?
If not, I'll try and come up with something tonight so don't spend too much time tomorrow.

--
Regards,
- Caike

Eric Lavigne

未読、
2011/03/18 20:58:092011/03/18
To: orland...@googlegroups.com
> Hey,
> Does anyone have any suggestions for either our language of choice or
> problem for tomorrow's session ?

Language: Clojure

Problem: Determine the optimal division of a list of trucks into
convoys so that they can cross a bridge in as little time as possible.

Some trucks need to cross a bridge. The order of the trucks is given.
Each truck has a weight and a speed. Several trucks can form a convoy
and cross the bridge at the same time if (1) those trucks are already
next to each other and (2) the total weight of the convoy is less than
what the bridge can bear. A convoy can cross a bridge in the same
amount of time as its slowest member would cross alone.

Example:
bridge_capacity: 100
trucks: [{weight: 40, crossing_time: 30}, {weight: 30,
crossing_time: 50}, {weight: 40, crossing_time: 20}]

In this example, we can divide up the trucks in four possible ways:
1) All at once - in which case the bridge collapses because 40+30+40 > 100
2) One at a time - in which case it takes 30+50+20=100 time to cross
3) Combine the first two - in which case it takes 50+20=70 time to cross
4) Combine the last two - in which case it takes 30+50=80 time to cross

The correct answer here is to combine the first two trucks for the
optimal time of 70.

This problem is easy to get started, with calculations about whether a
certain convoy is too heavy, or how long that convoy will take to
cross, but becomes more interesting as we find ways to decide how the
trucks should be divided into convoys. Once we have code that solves
the problem, we can also consider improvements for dealing with larger
number of trucks with reasonable calculation times.

caike

未読、
2011/03/18 21:08:302011/03/18
To: orland...@googlegroups.com、Eric Lavigne
Hey, Eric.
Great idea for language and for the problem!

We can definitely use this for the 26th. In case you haven't read the other thread, we had to cancel tomorrow's meeting and push it for the following saturday.

Do you think you could setup the environment for our next Dojo in Clojure ?
What testing framework do you suggest ?
--
Regards,
- Caike

Eric Lavigne

未読、
2011/03/18 21:42:182011/03/18
To: caike、orland...@googlegroups.com
Yes, I will take care of setting up the environment.

I usually use the test framework that is built in to Clojure, but I
really enjoyed having tests run automatically with Jasmine at the
Coding Dojo. Lazytest also does that, and I would like to give it a
try. It turns out that the same person created both the standard
Clojure test framework, which I usually use, as well as Lazytest. The
following article from last summer explains his reasoning for starting
over with a new test framework.

http://stuartsierra.com/2010/07/05/lazytest-status-report

See you next week.

Eric Lavigne

未読、
2011/03/23 20:19:312011/03/23
To: caike、orland...@googlegroups.com
Change of plans. I won't be at the next Coding Dojo, so someone else
will need to set up the environment.

I just received a job offer, and will be starting my first full-time
Lisp job in just a couple of weeks (MCNA Dental, Ft Lauderdale). I
will be very busy with moving preparations and studying their
technology stack, so I won't have time for Coding Dojo anymore.

For anyone who is curious about Clojure, I highly recommend this website:

http://learn-clojure.com/

Jack Pines

未読、
2011/03/23 21:30:552011/03/23
To: orland...@googlegroups.com
Good luck on your new endeavor, Eric. My wife, who calls SQL
"squirrel", thinks it's funny that you'll be working in Lisp for a
dental group. :-)

--
Jack Pines
407-595-5648
Blog: http://bidevadventures.blogspot.com<http://bidevadventures.blogspot.com>

Twitter: http://twitter.com/#!/BIDevAdventures<http://twitter.com/#!/BIDevAdventures>

LinkedIn: http://www.linkedin.com/pub/jack-pines/2/62/727<http://www.linkedin.com/pub/jack-pines/2/62/727>

Resume: http://goo.gl/XTpzK <http://goo.gl/XTpzK>

Eric Lavigne

未読、
2011/03/23 21:41:122011/03/23
To: orland...@googlegroups.com
That is funny - I hadn't thought of it that way :-)

caike

未読、
2011/03/24 9:33:242011/03/24
To: orland...@googlegroups.com、David Rogers
Happy to hear about your new job, Eric!

So, Mr David Rogers (a.k.a. General Consensus), do you want to lead us into Python land this Saturday ? :)
--
Regards,
- Caike

David Rogers

未読、
2011/03/24 12:01:082011/03/24
To: caike、orland...@googlegroups.com
Sorry, guys, but I've been tapped to help in an emergency move in Winter Springs this Saturday, so I won't be able to come. If we're done with the move before you're done with the dojo, though, I'll try to catch up. 

On an unrelated note, who wants to help present on the dojo at Barcamp next weekend?

-- 
David Rogers
Sent with Sparrow

caike

未読、
2011/03/24 13:55:262011/03/24
To: orland...@googlegroups.com
Cool, Dave. Hit me up when you're done, maybe you can meet us for lunch.

So my guess is either JavaScript or........    thoughts ?


--
Regards,
- Caike

全員に返信
投稿者に返信
転送
新着メール 0 件