PPRuNe Forums - View Single Post - How hard is computer programming / how do I go about it?
Old 25th October 2013 | 17:33
  #7 (permalink)  
Mac the Knife

Plastic PPRuNer
25 Anniversary
 
Joined: Sep 2000
Posts: 1,902
Likes: 0
From: Rochechouart, France
Write a program to get a date (and parse it correctly) in a lower level language (no get_date modules/libraries).

Do it in COBOL, GW-Basic, FORTH, FORTRAN, C (not++), PROLOG, Ada, Lisp, Smalltalk, DBase, and Haskell.

Make it intelligent - sensible responses to unexpected input

"January has only 31 days - what planet are you from?"
"2014 isn't a leap year so it can't be 29th February!"
"Are you sure you want to set the date for this event 4234 years into the future?"
"That was the day before yesterday!"
"1342? Now we're back in the Middle Ages! [BTW, Louis I was crowned King of Hungary on July 16th]"

That is the real future - even the basic get module is harder than you would think to write from complete scratch.

Not that hard to write a quick-and-dirty but making it elegant and economical is a real challenge.

Mac



PS: This will drive you insane because the intelligence, knowledge and humour built into the program is infinite - but it's fun to make a start!

See you in 4 years.

Mac the Knife is offline  
Reply