Se você veio de linguagens como JavaScript ou PHP, você pode ter um hábito de concatenar strings da seguinte forma:
nome = “matheus”
print(“olá “+nome+”, seja bem-vindo”)
Apesar de ser simples, o problema dessa abordagem está na forma como o Python lida com as strings. Por baixo dos panos, strings são objetos imutáveis, ou seja, são constantes que não podem ter o seu valor alterado. Quando uma string é modificada o interpretador não modifica o valor da string, e sim cria uma nova já com as alterações.
No CPython (interpretador mais utilizado) uma string é apenas um objeto na memória…
This was originally posted on my blog drpexe.com. I moved it here because I didn’t want to spend money and time maintaining a VM with only a single WordPress blog installed. Written in July 23, 2011.
I wrote this post because it’s really hard to find detailed material about A* using navigation meshes (or navmesh). Additionally, most tutorials present either the grid-based algorithm or some vague reference to navmesh. My goal is to provide some clean, ready-to-use information which game programmers can use to enhance their pathfinding algorithms.
To understand the concept it’s mandatory that you feel comfortable with a…
Until last year I had this idea that security is not a priority when developing software (website and apps included). I mean, I’m just a small developer and probably not a lot of people will ever use what I’m creating, so why bother with security?
After reading about the subject I could understand all the risks I was taking. My goal with this post is to show some facts and motivate you to change your mentality towards security.
Note: I’m using the name hacker loosely on this post. Every time you read hacker, I really meant black hat hacker.
Much…
A developer hungry for new ideas