Go Back   Forums > Community Chatterbox > Tech Corner > Programming
Memberlist Forum Rules Search Today's Posts Mark Forums Read
Search Forums:
Click here to use Advanced Search

Reply
 
Thread Tools Display Modes
Old 27-05-2011, 08:17 PM   #1
Japo
Autonomous human
 
Japo's Avatar


 
Join Date: Mar 2006
Location: ,
Posts: 4,508
Default Beautiful code

The title is self-explaining, post here lines that you find elegant for whatever reason, be it that it shows the power of a language you like, that it shows how smart you are, or it's one of those obfuscated pieces of code without line breaks... Whatever.

Take a look at this C# for starters. Bear in mind that all this is 100 per cent strongly statically typed!

Code:
foreach(var result in new[] {
   new {
      fileName = fileName + ".1" + extension,
      data = Result1
   },
   new {
      fileName = fileName + ".2" + extension,
      data = Result2
} })
{ /* ... */ }
Beautiful!
__________________
Life starts every day anew. Prospects not so good...
Japo is offline                         Send a private message to Japo
Reply With Quote
Old 08-11-2011, 09:47 PM   #2
Japo
Autonomous human
 
Japo's Avatar


 
Join Date: Mar 2006
Location: ,
Posts: 4,508
Default

For those of you that don't know any CAS (Computer Algebra System), specially any capable of symbolic computations as well as numeric, here's a little Maxima:

http://dl.dropbox.com/u/15818997/Maxima.mht

That link is a MHTML file, any browser should be able to open it I think, except for Safari and Firefox needs some extension.

This is free software, amazing. Too bad I didn't know it before. I could port my Sun position calculator to this.
__________________
Life starts every day anew. Prospects not so good...
Japo is offline                         Send a private message to Japo
Reply With Quote
Old 09-11-2011, 03:49 AM   #3
arete
If All Else Fails, Play Dead
 
arete's Avatar


 
Join Date: May 2008
Location: Waterside, South Africa
Posts: 3,133
Default

When you can show me what the southern hemisphere's night sky will look like on any given night, please let me know
__________________

"You have heard that it was said, 'You shall love your neighbor and hate your enemy.' But I say to you, love your enemies, bless those who curse you, do good to those who hate you, and pray for those who spitefully use you and persecute you..."
arete is offline                         Send a private message to arete
Reply With Quote
Old 09-11-2011, 09:32 PM   #4
Japo
Autonomous human
 
Japo's Avatar


 
Join Date: Mar 2006
Location: ,
Posts: 4,508
Default

I could... I only need massive amounts of initial data regarding the position, movement and brightness of every star. :P
__________________
Life starts every day anew. Prospects not so good...
Japo is offline                         Send a private message to Japo
Reply With Quote
Old 10-11-2011, 03:26 AM   #5
arete
If All Else Fails, Play Dead
 
arete's Avatar


 
Join Date: May 2008
Location: Waterside, South Africa
Posts: 3,133
Default

Quote:
Originally Posted by Japo View Post
I could... I only need massive amounts of initial data regarding the position, movement and brightness of every star. :P
*image of ninety-year-old Japo screaming "At last!! At last every star visible to the naked eye has been plotted in! ... Now, I wish I hadn't forgotten why I was programming this thing in the first place..."*
__________________

"You have heard that it was said, 'You shall love your neighbor and hate your enemy.' But I say to you, love your enemies, bless those who curse you, do good to those who hate you, and pray for those who spitefully use you and persecute you..."
arete is offline                         Send a private message to arete
Reply With Quote
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
New BB Code tags! Dave Old News 14 17-02-2009 07:28 PM
Code Share Burger Meister Programming 5 10-02-2009 07:22 AM
Somebody Who Knows Php Code? andy_blah Blah, blah, blah... 14 11-06-2006 03:11 AM
Need The Code.... TalonStriker Troubleshooting 1 14-04-2006 07:21 PM

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump
 


The current time is 12:39 PM (GMT)

 
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.