Monthly Archives: February 2009

import antigravity

Ne znam kako do sad ovo nisam primetio (u stvari znam, ali nije sad bitno :) ), ali python u verziji 3.0 je doneo novu skrivenu zezalicu (easter egg). Naime, kad neko pokuša da importuje modul antigravity desi je jedna čudna stvar. Python Vas odvede na sajt XKCD, na kome postoji jedan zanimljiv strip na račun python-a.

Inače, i u proteklim verzijama su postojale ovakve ugrađene zezalice. Jedna od mojih omiljenih je from __future__ import braces koja baca exception SytaxError sa porukom “not a chance”. Za one koji ne znaju, __future__ paket je namenjan za nove stvari koje će biti ugrađene u python u sledećim verzijama.

Zatim postoji i import this koji ispisuje The Zen Of Python (nekoliko korisnih saveta u vezi programiranja generalno). Interesantno je i videti kod modula this :)

Ima li ih još za koje ne znam? Uvek se obradujem kad naiđem na nešto ovakvo (mada ništa od ovoga nisam sam otkrio, to ne umanjuje moje zadovoljstvo :) )…

Programerski citati

Skupljao sam ih dosta dugo u jedan fajl. Ovo neki koji mi se najviše sviđaju…

  • Walking on water and developing software from a specification are easy if both are frozen.
  • Every language has an optimization operator. In C++ that operator is ‘//’.
  • Some people, when confronted with a problem, think “I know, I’ll use regular expressions.” Now they have two problems.
  • In order to understand recursion, one must first understand recursion.
  • The only “intuitive” interface is the nipple. After that it’s all learned.
  • The generation of random numbers is too important to be left to chance.
  • It works on my machin.
  • In theory, theory and practice are the same. In practice, they’re not.
  • Beware of programmers who carry screwdrivers.
  • Perl – The only language that looks the same before and after RSA encryption.
  • Nine people can’t make a baby in a month.
  • Software is like sex: It’s better when it’s free.
  • Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
  • C++ : Where friends have access to your private members.
  • Debuggers don’t remove bugs. They only show them in slow motion.
  • God could create the world in six days because he didn’t have to make it compatible with the previous version.
  • Programmer: an organism that turns coffee into software.
  • There are only two kinds of languages: the ones people complain about and the ones nobody uses.
  • Hofstadter’s Law: It always takes longer than you expect, even when you take into account Hofstadter’s Law
  • Java: Write Once, Debug Everywhere
  • My programs don’t have bugs, they just develop random features.
  • If Java had true garbage collection, most programs would delete themselves upon execution.

Za većinu ne znam ko je autor, tako da nisam hteo da stavim autora ni za one koje znam.

Ajde programeri, dajete vaše omiljene citate :)

Switch to our mobile site