Most Interesting Thing You've Coded, etc

  • (2 Pages)
  • +
  • 1
  • 2

17 Replies - 2280 Views - Last Post: 06 February 2014 - 07:39 AM

#16 Momerath  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1010
  • View blog
  • Posts: 2,444
  • Joined: 04-October 09

Re: Most Interesting Thing You've Coded, etc

Posted 30 January 2014 - 12:39 AM

I once wrote a program to display what the night sky would look like if you lived on a planet orbiting another star. It contained about 100,000 of the closest stars.

I've also written software to monitor the conditions in an environmental test chamber (temperature, pressure, humidity, etc.) and if they got outside specific ranges it would call people on the phone and tell them what was wrong. It built sentences from prerecorded words, as speech synthesis was a thing of the future :)
Was This Post Helpful? 0
  • +
  • -

#17 Lemur  Icon User is offline

  • Pragmatism over Dogma
  • member icon


Reputation: 1359
  • View blog
  • Posts: 3,424
  • Joined: 28-November 09

Re: Most Interesting Thing You've Coded, etc

Posted 02 February 2014 - 12:08 PM

https://github.com/baweaver/izzy

Izzy is getting a lot of attention lately, giving credence to the fact that it doesn't have to be big to be interesting. It lets you do this in Ruby (read the readme for the person class):

brandon = Person.new('brandon', 23, 'm')

brandon.all_of?  :older_than_18?, :male?, :me?, :geek? # => true
brandon.none_of? :younger_than_18?, :female?           # => true
brandon.any_of?  :male?, :female?, :geek?              # => true

brandon.matches_all?  name: /^br/, age: (20..30) # => true
brandon.matches_any?  name: /br$/, age: (20..30) # => true
brandon.matches_none? name: /br&/, age: (30..40) # => true

brandon.matches_all? name: String, age: Integer

longer_than_3 = -> n { n.length > 3 }
is_odd = -> a { a.odd? }

brandon.matches_all? name: longer_than_3, age: is_odd # => true

longer_than_5 = -> n { n.length > 5 }
greater_than_20 = -> a { a > 20 }

brandon.matches_all?(
  name: [/br/, /an/, longer_than_5],
  age: [(20..30), greater_than_20]
)



So interesting, I'd say so at least.
Was This Post Helpful? 0
  • +
  • -

#18 Nathan2222  Icon User is offline

  • D.I.C Head

Reputation: -11
  • View blog
  • Posts: 100
  • Joined: 01-January 14

Re: Most Interesting Thing You've Coded, etc

Posted 06 February 2014 - 07:39 AM

View PostMomerath, on 30 January 2014 - 07:39 AM, said:

I once wrote a program to display what the night sky would look like if you lived on a planet orbiting another star. It contained about 100,000 of the closest stars.

I've also written software to monitor the conditions in an environmental test chamber (temperature, pressure, humidity, etc.) and if they got outside specific ranges it would call people on the phone and tell them what was wrong. It built sentences from prerecorded words, as speech synthesis was a thing of the future :)/>

Kinda like the person of interest movie.
It sounds so awesome and complicated. How does it sense the temperature, pressure or humidity?
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2