Live data from Hacker News

What is the coolest thing you can do in ten lines of code?

stackoverflow.com

1–10 of 40 posts

Re: What is the coolest thing you can do in ten lines of code?

#3
I don't about you guys but when I did

0) Open notepad 1) Write My name is Ely 2) CTRL + S as index.htm 3) FTP to server 4) Then went to site.com/

That's when I knew I was going to be an amateur programmer for life. Yeah, yeah I know, it's HTML. But that gave me the courage to later jump into server-side languages.

Re: What is the coolest thing you can do in ten lines of code?

#4

I don't about you guys but when I did 0) Open notepad 1) Write My name is Ely 2) CTRL + S as index.htm 3) FTP to server 4) Then went to site.com/ That's when I knew I was going to be an amateur programmer for life. Yeah, yeah I know, it's HTML. But that gave me the courage to later jump into server-side languages.

If we could teach this simple process in school, we would inspire tons of people to program little things for themselves. That would be awesome.

Re: What is the coolest thing you can do in ten lines of code?

#7
post #2

I'd have said that for impressing people with small pieces of code something like SecondLife scripting would be ideal. You can manipulate objects in a 3d environment using simple code. Who doesn't enjoy programming a gun?

Also COM scripting on Windows (and presumably Applescript on the Mac).

Sure there's a lot of special keyword magic involved, but nothing will get people more excited about programming than seeing how they can easily automate their routine tasks to make their life easier - that's what programming is supposed to be about anyway.

Re: What is the coolest thing you can do in ten lines of code?

#8
Is 30 close enough to 10?

I got a job with 30 lines of code appended to my resume, with a screenshot of the resultant output.

Perhaps the first two pages had something to do with it but I was told that the third page was what stood out.

This was a sysadmin position, the code includes bash, sed, awk, grep, tcpdump, netcat and gnuplot.

Hint to anyone who tries this sort of resume stunt: You WILL be asked what the code does.

Just the code: http://bbookkss.com/CharlesPerkinsCV3of3Pages.pdf

Re: What is the coolest thing you can do in ten lines of code?

#9
post #2

I'd have said that for impressing people with small pieces of code something like SecondLife scripting would be ideal. You can manipulate objects in a 3d environment using simple code. Who doesn't enjoy programming a gun?

Also COM scripting on Windows (and presumably Applescript on the Mac). Sure there's a lot of special keyword magic involved, but nothing will get people more excited about programming than seeing how they can easily automate their routine tasks to make their life easier - that's what programming is supposed to be about anyway.

You could probably stuff Node into this category too, if your target is the type to be impressed with writing their own basic web server in 10 lines of code.
Post reply on HN