DNS and authoritative answers

Written on 13 November 2013, 05:37pm

Tagged with: , , ,

A simple trick about nslookup that I learned while reading the Smashing Magazine’s free preview of their Book #4

To start, the full syntax of nslookup is:
nslookup [-option] [hostname] [server]

When you run nslookup [hostname], it’s your local DNS server that answers the query. This answer is non-authoritative.
With an additional step, you can get the local name servers of the hostname: nslookup -type=ns [hostname]
Using one of these local DNS servers, you can query again: nslookup [hostname] [local_name_server]. This answer is authoritative.

$ nslookup www.smashingmagazine.com
Non-authoritative answer:
Name: www.smashingmagazine.com

$ nslookup -type=ns www.smashingmagazine.com
Authoritative answers can be found from:
origin = a.regfish-ns.net
mail addr = postmaster.regfish.com...

$ nslookup www.smashingmagazine.com a.regfish-ns.net
Server: a.regfish-ns.net
Name: www.smashingmagazine.com

To clean the DNS cache, use ipconfig /flushdns.

Paul Tero – How To Fix The Web: Obscure Back-End Techniques And Terminal Secrets
From the same author – Introduction to DNS: Explaining The Dreaded DNS Delay

Update 12/feb/2017:

Random things that keep me busy

Written on 2 November 2013, 11:52pm

Tagged with: , , , , , , ,

HTTP 2.0: Google vs Microsoft compete for IETF specifications

HTTP 1.1 is backing up the web as we know it, but it starts to show up its age.

Google already built SPDY – a protocol that proves to be twice as fast as HTTP. Remember the OSI Model layer stack? SPDY adds a session layer atop of SSL that allows for multiple concurrent, interleaved streams over a single TCP connection. The main features of SPDY are:
– Multiplexed streams
– Request prioritization
– HTTP header compression
– Server push
– Server hint
More details about SPDY: http://dev.chromium.org/spdy/spdy-whitepaper

Microsoft came later in the game with a kinky proposal: HTTP S&M, Speed and Mobility. The HTTP Speed+Mobility proposal starts from both the Google SPDY protocol and the work the industry has done around WebSockets. Microsoft seems to be less concerned with speed, and more concern with the mobile apps and devices, as well as backwards compliance. As far as the Web sockets are concerned, they are a HTML5 feature aimed to address the request/response architecture of the web. There is an persistent connection between the client and the server and both parties can start sending data at any time.

A good comparative analysis here: S&M vs. SPDY: Microsoft and Google battle over the future of HTTP 2.0

In one-year time, IETF should come up with a proposal for the HTTP 2.0. Note to self: check back next year 🙂

What really happens when you navigate to an URL

Speaking about HTTP: A nice refresher about how the current HTTP (1.1) works:
DNS caching, CDN, ETag headers, Content-Encoding gzip, long-polling and the rest…

Review your privacy and cookies policy

Speaking about cookies, from a technical point of view, the only things you need to remember are the cookie attributes: name, value, domain, path, expires, secure, httponly. Server sets them, browser saves them and sends along with the subsequent requests. Ah, and don’t forget about session vs persistent cookies (see the ‘expires’ attributes).

Then, in the recent context of privacy and data protection, as a site owner it’s a good a idea to have a cookie audit. Not necessarily to comply with the EU’s privacy directive (the Cookie law), but because it’s good for the site owners and their users to have clearer policies and information on privacy.

The people at econsultancy.com found 3 levels of approach:

Level 1 = a more prominent link to the privacy policy and improved information within the policy itself
Level 2 = user can selectively opt in/out of groups of cookies
Level 3 = active opt-in (the only one strictly compliant)

Next Captchas will be about recognizing objects in images

Speaking about privacy and data protection, it looks like the computers are catching up with humans. Using machine learning, a San Francisco-based company is working on a software with the goal of developing a sense of vision for the machines. By ‘sense of vision’ they mean:

– recognize letters wherever they appear,
– identify objects in photographs,
– and generally do all the stuff any kid with healthy vision can do

The first progress report says their software solves CAPTCHAs, on average 90% of the time.

Captcha’s original creator, Luis von Ahn, says: ‘An advance like this isn’t the end of CAPTCHA, although in time, CAPTCHA-breaking is likely to evolve to the point where companies will need to rely on another spambot gatekeeper. The next step is asking people to identify objects in photographs’. (http://www.popsci.com/article/technology/software-learns-crack-captchas)

Apparently, the only thing where humans are better than computers remains identifying objects in pictures. Oh, wait: Google+ can now identify random, untagged objects in your photos, so you can search for “cat” and find photos of your cat purely by object recognition alone

UML: Generalization vs clasification

An easy one for the finish: be careful when you use a ‘is a’ relationship!
– classification – is an instance of
– generalisation – is a subtype of
Generalisation is transitive, whereas classification not.
Example inspired from UML Distilled

PS: iPad Air is awesome 🙂
ipad Air

Web meets brain

Written on 4 March 2013, 03:29pm

Tagged with: , , , ,

In the recent period I read some materials regarding the human brain: how it works, what is it good at, its limitations and its bugs. I am listing here the links to the articles/books, along with a short description.

1. Brain Bugs

Brain Bugs: How the Brain’s Flaws Shape Our Lives, By Dean Buonomano (I also recommend the iTunes audiobook).

The human brain is more beautiful and complex than anything we could ever build but it’s far from perfect. Our memory is unreliable; we can’t multiply large sums in our heads; advertising manipulates our judgment; we tend to distrust people who are different from us; supernatural beliefs are hard to shake and we prefer instant gratification to long-term gain. Dean Buonomano illuminates the causes and consequences of these “bugs” in terms of the brain’s innermost workings and their evolutionary purposes.

2. Hacking the brain

Hacking the brain, Richard Shepherd, .Net magazine

“If you make chairs, you’ll want to understand how people sit. If you make user interfaces, then you should understand how people perceive and think.”
With a little borrowing from disciplines such as cognitive psychology and behavioural economics we become able to ‘hack the brain’.
The field of UX is both broad and deep; here are five techniques to get you started.

3. How does the brain keep track of time

How does the brain keep track of time – by Joshua Bixby in Web Performance Today

Luke Jones of the University of Manchester talks about the fact that we’re uncannily good at telling the difference between durations of sound, down to one-tenths of a second, yet we’re terrible at predicting how long it’s going to take us to do something, especially if it’s something you’ve done before. (Apparently, we always underestimate.)

4. Designing for emotion

Designing for emotion by Aaron Walter, A book apart
I read this book more than a year ago, here are my notes about it. The conclusion was:

When you start your next design project, keep this principle in mind: people will forgive shortcomings, follow your lead, and sing your praises if you reward them with positive emotion.

designing for emotion NET234.f_hacking brain bugs