PDA

View Full Version : When geeks have children ......



renzokuken
September 19th, 2009, 06:53 PM
When geeks have children ...... they do this

http://www.youtube.com/watch?v=bYcF_xX2DE8

brilliant

scragar
September 19th, 2009, 06:57 PM
What a grossly inefficient solution. Any simple motor could produce a cleaner rocking motion without the horrible jerk that the CD tray produces and without the horrible wait, and as for
while [ 1 = 1] All I can say is I'm ashamed.

querent
September 19th, 2009, 07:00 PM
Hey! be nice. Maybe they didn't have any motors on hand.

I'm sure there are better ways, but it works.

Hosmion
September 19th, 2009, 07:02 PM
Can you seriously program it to open and close like that?

PurposeOfReason
September 19th, 2009, 07:03 PM
Can you seriously program it to open and close like that?
Yup, but I would just use
while true

It's hardly geeky, it's a bash script with four lines.

JordyD
September 19th, 2009, 07:04 PM
Can you seriously program it to open and close like that?

Yeah, why not? He actually shows you the code for it in the beginning of the video.

Tipped OuT
September 19th, 2009, 07:11 PM
Geeks have babies? Well this is news to me. :lolflag:

scragar
September 19th, 2009, 07:20 PM
Yup, but I would just use
while true

It's hardly geeky, it's a bash script with four lines.


while true; do
eject -T /dev/cdrom
donePlease, the code is so much easier and shorter than what he wrote, I don't understand that large thing when this version works perfectly.

hoppipolla
September 19th, 2009, 07:28 PM
Haha that's great! Quite possibly the most random thing I've seen all day, but great! lol :)

lisati
September 19th, 2009, 07:33 PM
What a grossly inefficient solution. Any simple motor could produce a cleaner rocking motion without the horrible jerk that the CD tray produces and without the horrible wait, and as for
while [ 1 = 1] All I can say is I'm ashamed.

How sloppy! Using goto would be more elegant than while 1=1

PurposeOfReason
September 19th, 2009, 08:12 PM
while true; do
eject -T /dev/cdrom
donePlease, the code is so much easier and shorter than what he wrote, I don't understand that large thing when this version works perfectly.
I wasn't sure if there was a switch to eject and close the tray and was too lazy to look it up. You should sent that to him fr the lols.

hoppipolla
September 19th, 2009, 08:51 PM
I don't think the exact code is the point here though.. lol

It's just funny ^_^

MikeTheC
September 19th, 2009, 09:19 PM
When geeks have children ......
It's through artificial insemination?

scragar
September 20th, 2009, 01:34 AM
How sloppy! Using goto would be more elegant than while 1=1

... :frown:

Please tell you you aren't trying to promote a goto.

ctrlmd
September 20th, 2009, 01:47 AM
lol its funny video
creative idea

MikeTheC
September 20th, 2009, 01:55 AM
... :frown:

Please tell you you aren't trying to promote a goto.

Why? What's wrong with GOTO? I used to use it all the time back in high school when I futzed around in GW-BASIC.

scragar
September 20th, 2009, 01:56 AM
Why? What's wrong with GOTO? I used to use it all the time back in high school when I futzed around in GW-BASIC.

/me doesn't want to hear it.

PurposeOfReason
September 20th, 2009, 02:02 AM
Why? What's wrong with GOTO? I used to use it all the time back in high school when I futzed around in GW-BASIC.
Because if that one line gets moved then everything is messed up. Goto and any command the references a line is horrible practice.

MikeTheC
September 20th, 2009, 02:08 AM
Because if that one line gets moved then everything is messed up. Goto and any command the references a line is horrible practice.

Hmm... Well, I'm not quite sure what other options one would have in GW-BASIC, although I will also readily admit I have never, ever been even remotely close to a knowledgeable person (let alone a power user) of GW-BASIC.

Apart from line numbers, how do more commonly-used programming languages differ? And, for that matter, just strictly on the basis of curiosity, what other options besides GOTO does one have in modern languages?

scragar
September 20th, 2009, 02:32 AM
functions and loops.

MikeTheC
September 20th, 2009, 02:46 AM
functions and loops.

Which means what, exactly?

Namtabmai
September 20th, 2009, 02:54 AM
GOTO is seen as bad as it generally lead to Spaghetti code (http://en.wikipedia.org/wiki/Spaghetti_code).

On small programs it may seem fine, but once it gets bigger have to track where all the code jump are and go to can lead to code that is very difficult to manage.

Ideally you should be breaking you code down in to manageable chunks/functional and calling them where needed, and of course for/while loops where appropriate.

I've been programming for about 10 years now and I've yet to encounter a problem where I'd use GOTO. That said Donald Knuth (http://en.wikipedia.org/wiki/Donald_Knuth) is a man I respect and he states that GOTO can be more efficient in some circumstances.

Muppeteer
September 20th, 2009, 03:29 AM
Jeez, it's getting all geeky in here...Just laugh and forget all the technical crap :popcorn: