Tuesday, December 23, 2008

SIP Providers P2P Try-out Fails

Some SIP providers and server developers thinks that it is possible to guess if a user can send/receive RTP traffic direct in his IP if the SIP Signaling network is public IP.
WRONG!

The correct way to do this is using a connectivity check algorithm (STUN, ECHO, etc...) based on the UDP Channel that you may use to send/receive the streaming.

SIP Providers, stop doing guesses about User Agents NAT description based on the signaling channel.
This kills the interoperability of your SIP Services.

Saturday, December 20, 2008

Pretty Little Random World

Did you ever wonder why everything is random in our reality?
People Tastes, DNA, plants size and forms, animals behavior, human habits, weather, quantic atomic behavior, Friends Humor, etc...
Everything in nature is random this is an old fact.

But, why? What is the cause and goal of this?

To give a try I will start explaining the paradox of the random concept:
"Random is everything that causes a reaction that cannot be predicted before the respective action."
So to affirm that an action produces a random reaction, you MUST know that you cannot predict the reaction. But can you prove that you cannot predict the reaction?

"If everything is random, how can you predict that a reaction is random, if the reaction is random?"
Conceptually a random reaction can repeat forever(infinity times) given an unique action, and still be considered random.

So in fact, what is "Random"?

To explain the Random, you always need to rely on the infinity concept. Which brings even more doubts as infinity still something not clear for human minds.
In an orthodox proposition:
"Random is a reaction that given infinity tries, can generates different results."

Conclusion:
It is not possible to prove that a reaction is random if you cannot counter prove against the infinity. Which means that every affirmative that a reaction is random it simply another random guess.

This conclusion also explains why all human attempts of generating artificial "pure random" failed.

raXacuca Project is LIVE



raXacuca Project has the objective of to prove people that Google cannot answer all questions.
With logical trivia and Math Puzzles raXacuca proves that logical thinking is necessary and mandatory.

All users compete simultaneously answering unique questions that they cannot find the answers simply typing the problem in a search engine like Google.com.

It still alpha version, but I hope it can motivate people to start thinking again.

Try it out: http://www.raxacuca.com

* Only Portuguese Version for now.

Python Encoding

Python uses UTF-8 for encoding python files. But for some reason Google App Engine does not.

You MUST include this right in the very first line of your .py file:

#
# -*- coding: utf-8 -*-


Remember the it MUST be in the very first line of the text so the encoding comment: # -*- coding: utf-8 -*-
Will be positioned exactly in the 2nd line with is mandatory according to Python specification.

Hope it helps.

Sunday, December 14, 2008

Python Time Comparison Tricks

Cool operator overflow feature in Python brings a lot of abstraction.
When comparing Date and Time this brings an easy way to do it.


# Imports
import os
import datetime
from datetime import timedelta

# Get current time value:
current=datetime.datetime.now()

# Advancing Time (examples hours, minutes, days, seconds):
# Advancing 1 hour and 30 seconds
adv=current + timedelta(hours=1, seconds=30)

# Getting Delta Time
diff = adv - current
# Comparing
if diff > timedelta(hours=1):
bigger=true
else:
bigger=False


Very easy!

Tuesday, December 9, 2008

UnMount Python

After years of personal resistance finally I did it.
I took one of my nights to learn Python.
The main reason was:
  • Check how Google App Engine is being able to support so much Transactions.
Other reasons:
  • Check if it really throws Identation Error?
  • Will I take 50% of my time doing Identation?
  • Does it really count my Whitespaces?
  • WHY!?!?
The conclusion was that Python it is very easy and full of well implemented frameworks with a quite good performance.
What really called my attention was the high-level data structures with a simple but effective approach to object-oriented programming.
It totally worth it. Specially for replacing the my old fashioned Perl Scripts.

* About the WEIRD whitespace stuff: I would say it sucks. But maybe it is my brain that is not yet prepared to process code snippets without my old friends "{}"

Hello World Code Example:
print "Be careful not to fall off!"