?

Log in

No account? Create an account
   Journal    Friends    Archive    Profile    Memories
 

Smart naming - morfizm


Feb. 29th, 2012 06:15 pm Smart naming

When you're making a new programming language, be sure to do thoughtful API naming, so that doing trivial things is fun. If you like some words, make sure people will have to type them often. Like, for example, converting a date from a string to a timestamp:

import datetime
import time
>>> int(time.mktime(datetime.datetime.strptime('20120228-180823', "%Y%m%d-%H%M%S").timetuple()))
1330481303

3 comments - Leave a commentPrevious Entry Share Next Entry

Comments:

From:andreyvo
Date:March 1st, 2012 09:42 am (UTC)
(Link)
Русский в гостиннице из номера 222 звонит на ресепшн, заказывает чаю:
- Ту ти ту рум тутуту.
From:miris_rants
Date:March 1st, 2012 04:06 pm (UTC)
(Link)
LOL!
From:morfizm
Date:March 1st, 2012 06:28 pm (UTC)
(Link)
Я слышал более короткую версию: в номер 22, ту ти ту-ту :)