News for hackers. Stuff that matters.
Re:How clever a programmer are you? by m_eiman on Friday January 28, 2011 @09:53AM (#2151988)
The program is simple, for (;;) ;, but you need to run it on enough machines to heat the house enough…
Re:How clever a programmer are you? by dalore on Friday January 28, 2011 @10:22AM (#2152108)
Here is my program in pseudo code.

Make a posting on craigslist for someone to come shovel the snow

Wait for contact from posting

Pick the first reasonable guy

Wait for him to do the work

Pay the guy

Re:How clever a programmer are you? by thenduks on Friday January 28, 2011 @10:51AM (#2152227)
That's a pretty good one. Here's another:

Purchase home in warmer climate and sell current home.

Arrange move of belongings and family members. Leave the shovel.

Perform the actual move via plane/car/other appropriate method of transport.

Re:How clever a programmer are you? by xd on Friday January 28, 2011 @10:55AM (#2152246)
Here's an even better one. Position a butterfly in the palm of your hand and agitate just enough so as it flaps its wings in just the right way as to cause air currents that propagates into low air pressure which in turn cause the winds to change from northerly to southerly .. wait a few days and the snow should have melted.
Re:How clever a programmer are you? by zacharypinter on Friday January 28, 2011 @11:06AM (#2152311)
M-x butterfly makes the process a bit easier.
Re:How clever a programmer are you? by xd on Friday January 28, 2011 @11:39AM (#2152444)
:D

The story was humour based .. you reckon the downvoters missed that bit?

Re:How clever a programmer are you? by chc on Friday January 28, 2011 @01:49PM (#2152994)
No, I think they got it. As a rule, pointless jokes that don't add to the conversation don't tend to fly on Hacker News. It's not that jokes are entirely forbidden, just that they have to be insightful or very clever or they will be downvoted to hell. It's part of the site's culture of guarding the signal-to-noise ratio. For the same reason, content-light comments like "Awesome!" or "^ This" will also get blasted with downvotes.

Why yours in particular was considered slightly worse than its parent, I'm not positive, but I suspect it's just because everyone's heard butterfly jokes like that before.

Re:How clever a programmer are you? by jerf on Friday January 28, 2011 @11:16AM (#2152353)
Be careful. I know some people who followed this plan and ended up getting hit by three hurricanes the next year. There are still some intermittent bugs in this code.
Re:How clever a programmer are you? by edw519 on Friday January 28, 2011 @09:43AM (#2151944)
Why is it that so many expect clever software to overcome poor architecture?

Get a steeper roof.

Re:How clever a programmer are you? by makmanalp on Friday January 28, 2011 @10:57AM (#2152261)
Apparently a lot of people do!

http://en.wikipedia.org/wiki/Roof#Drainage

The high steeply-pitched roofs of Germany and Holland are typical in regions of snowfall. In parts of North America such as Buffalo, USA or Montreal, Canada, there is a required minimum slope of 6 inches in 12 inches, a pitch of 30 degrees.

Re:How clever a programmer are you? by epochwolf on Friday January 28, 2011 @10:45AM (#2152209)
This makes me think of the university buildings in Wisconsin with flat roofs that need snow removal periodically to prevent structural collapse. I still can't believe they spend millions on buildings and can't be bothered to find an architect who knows what snow is.
Re:How clever a programmer are you? by kd0amg on Friday January 28, 2011 @11:18AM (#2152364)
Not sure how far you can practically get with that -- I've seen some rather steep roofs have a lot of snow build up. It's generally accepted around here that roofs have to be shoveled (or otherwise cleared off).
Re:How clever a programmer are you? by mikeymoCT on Friday January 28, 2011 @11:47AM (#2152488)
Yes....my next home will be a chalet.
Re:How clever a programmer are you? by bitanarch on Friday January 28, 2011 @10:34AM (#2152158)
One word: bazooka.

Removes the roof as well, so you'd automatically solve all future snow-on-your-roof problems in one go!

I call it an O(0) algorithm.

(for those without a sense of humor, of course I'm joking)

Re:How clever a programmer are you? by chrisfarms on Friday January 28, 2011 @10:36AM (#2152168)
Small army of these:

http://goo.gl/qQYLv

plus a implementation of:

http://en.wikipedia.org/wiki/Flood_fill

Re:How clever a programmer are you? by wccrawford on Friday January 28, 2011 @09:38AM (#2151917)
The 'feeble humor' tag is appropriate.
Re:How clever a programmer are you? by sdfsdfsdf432 on Friday January 28, 2011 @09:54AM (#2151993)
Appropriate, but highly inefficient.
Re:How clever a programmer are you? by markessien on Friday January 28, 2011 @10:41AM (#2152184)
Make a grid of ropes running horizontally and vertically across the roof. They form a mesh across the roof, and split the snow into smaller sub-units. Loop the ropes around pulleys on each side and stack some weight to keep them taut. After a snow storm, use the pulleys to slice upwards with the ropes through the snow (using edge pulleys), splitting them into square chunks. The ropes that were on the roof have to unwind to form a linked network, so they can push against the snow. Starting from the chunks nearest the edge of the roof, move them downwards off the roof, and iterate upwards. Reverse and do the same for the other side.
Re:How clever a programmer are you? by nickolai on Friday January 28, 2011 @10:54AM (#2152243)
Ropes, pulleys and frost are a good recipe for frustration. You'd need these ropes to be some sort of non-freezing rubber tubes you could run some hot water through to unfreeze the whole thing before starting the operation above. Or you could just move to florida.
Re:How clever a programmer are you? by markessien on Friday January 28, 2011 @10:56AM (#2152255)
How about using twisted-pair or some other networking cable? They are rubber coated usually.
Re:How clever a programmer are you? by buro9 on Friday January 28, 2011 @09:56AM (#2152002)
Install underfloor heating in the attic and then melt the snow off the roof.

It's easier to melt it than move it, and melting it will probably move it at the same time (it will slide off the roof pretty quickly if the bottom layer is liquid).

If you want to include a programming aspect, build a basic depth monitor (light beam detector a certain height above the roof) to trigger turning on the under-roof heating to start the melting. This would spare you the electric bill for light snow flurries that you wouldn't bother to shift.

Re:How clever a programmer are you? by ctdonath on Friday January 28, 2011 @11:17AM (#2152355)
By having the constraint "no cloud" you've eliminated an easy solution: just change variable Temperature to something over 32, and call the Precipitate() function again. Changing Temperature alone will work without the cloud, but will obviously take longer.

Changing the date to something in range Summer will also work.

Reduce the value of Latitude, but you may have to port your system to different hardware.

Easy.

Re:How clever a programmer are you? by mfukar on Friday January 28, 2011 @09:58AM (#2152011)
Clearly, had you adopted UDD [1] you wouldn't have been in this whole mess to begin with.

[1] Umbrella Driven Development

Re:How clever a programmer are you? by verdant on Friday January 28, 2011 @09:48AM (#2151965)
Clearly you should upgrade your hardware and just use a brute force method.
Re:How clever a programmer are you? by exit on Friday January 28, 2011 @10:27AM (#2152129)
cover your roof with an inflatable tarp before winter.
Re:How clever a programmer are you? by nagnatron on Friday January 28, 2011 @12:45PM (#2152715)
The gold is in the comments
Re:How clever a programmer are you? by NinjaCoder on Friday January 28, 2011 @11:18AM (#2152361)
easy for the right person who knows what they are doing
Re:How clever a programmer are you? by NinjaCoder on Friday January 28, 2011 @11:19AM (#2152368)
and ohh there will be more to follow for the right candidate
Re:How clever a programmer are you? by d3x on Friday January 28, 2011 @11:06AM (#2152309)
I would put a clear sheet on roof when snow was forecasted.

Put heat packs in grid format along the sheet.

Attach sring to the break point of heat packs

Once snow is on roof pull strings to activate the heat packs

Once enough snow has melted pull off the clear sheet.

Re:How clever a programmer are you? by jerf on Friday January 28, 2011 @11:21AM (#2152376)
Ah, but you must remember, mass is conserved. Your water does not disappear into the air... well, a little bit of it does but not enough to matter... it remains where it melted and starts acting like a liquid. So what does it do? It runs down things. Until it drops back below freezing. Which it will. Your gutters rapidly fill with ice, and the water is now all over the siding (which really doesn't like ice that well), all over your sidewalk, all over your car... it's much less of a solution than you might like.

I live with a moderately steep driveway facing onto a moderately steep and short road, with me having to go uphill to get out of it (dead end otherwise), and I have to admit I've entertained the idea of melting my driveway off in a similar manner, but only because I'm a bit darkly amused by icing the entire rest of the road so nobody below me can get out, even with four wheel drive. I suspect local law enforcement would find a reason to fine me, though, and they'd be very right.