LombaXMonday N° 4 – links and resources from the IT World

What is this? Every day I read a lot of articles about computer programming and languages, infrastructures, new technologies, quick tips, trends, architectures and so on. I read them immediately or put in my “read later” list. All my readings helped me to grow and learn new things…so why don’t share them with my readers? For this reason, I decided to publish and share, every monday, a list of the links I came accross during the past days.

Cars and satellite insurance, how to do it (wrong) – link

Andrea Scarpino tell us how he discovered a big security issue in the API provided by his insurance company. With a little bit of reverse engineering on the satellite device provided by the company, he was able to retrieve all the personal informations of all the insurance customers.

Interactice shell scripts with expect command – link

Everyone have tried, at least once, to automate a task writing a simple bash script.
However, how to handle a prompt (for example a password prompt?).

`expect` is a simple program that, with an easy-to-learn syntax permits you to write scripts that expect for a specific prompt before sending something back

MySQL multiple keys and indexes, did you know? by Enomis-

Let’s assume that we have this simple table with an huge quantity of data:

last_name CHAR(30) NOT NULL,
first_name CHAR(30) NOT NULL,
INDEX name (last_name,first_name)

as you can see, we have an index on last_name, first_name

Now, try to query it:

select * from test where first_name=’Fabio’ and last_name=’Lombardo’; // time: 0.5sec

select * from test where last_name=’Lombardo’ and first_name=’Fabio’; // time: 0.01sec

Why this difference?
In MySQL, multiple indexes must be queried in the exact order they have been declared.

More informations:

Multiple-Column Indexes
Avoiding Full Table Scans
Index Hints

That’s all for today’s LombaXMonday, if you liked it, have any question or want to let me know that this article sucks, don’t hesitate to add a comment 🙂

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *