Do not click here

Most of the sites use "click here for/to …" wording. That implies that:

  • The user is too stupid to see it is a link (alternatively the webmaster made it impossible to see it is a link)
  • The user has and uses a mouse
  • The document is not going to be printed (it will look stupid then)
  • The webmaster has no imagination
  • The webmaster does not care how the site will be indexed by search engines

See Web Content Accessibility Guidelines 1.0.

Editing YAML with VI

Put the following in your .vimrc file and you are set:

au BufNewFile,BufRead *.yaml,*.yml set et ts=2 sw=2

When you will be editing YAML files, you’ll automatically have the following behaviour:

  • et – expand tabs – puts spaces whenever you use tabs
  • ts=2 – tab stop – 2 spaces per tab
  • sw=2 – shift width – 2 spaces to move with < and > commands

YAML in VI

Debian kernel upgrade to 2.6.30

Debian testing just got kenrel 2.6.30. The previous version was 2.6.26.
I will summarize here the new features for the upgrade but only the ones I will find interesting.

2.6.30

  • POHMELFS – kernel client for the developed distributed parallel internet filesystem
  • DST – network block device storage
  • LZMA/BZIP2 kernel image compression. The kernel size is about 10 per cent smaller with bzip2 in comparison to gzip, and about 33 per cent smaller with lzma.
  • SR-IOV support – PCI virtualization helper
  • Networking: Allowing more than 64k connections and heavily optimize bind(0) time.
  • Virtualization: virtio_net: Allow setting the MAC address of the NIC
  • Many Bluetooth improvements

2.6.29

  • WiMAX (Intel Wireless WiMAX/Wi-Fi Link 5×50 USB/SDIO devices)
  • Filesystem freeze (LWN has very technical article about this)
  • Support for multiple instances of devpts
  • MD: Allow md devices to be created by name, make devices disappear when they are no longer needed
  • Xen: add xenfs to allow usermode and Xen interaction
  • USB: storage: recognizing and enabling Nokia 5200 cell phones
  • Bluetooth: Add suspend/resume support to btusb driver

2.6.28

  • Memory management Scalability improvements (technical details on LWN)
  • NFS: authenticated deep mounting
  • Port redirection support for TCP
  • gre: Add Transparent Ethernet Bridging
  • Support discard requests on SSD devices to improve wear-leveling
  • Add generic ATA/ATAPI disk driver

2.6.27

  • Multiqueue networking
  • ftrace, sysprof support – another tracing mechanism for kernel (not related to SystemTap)
  • Improved video camera support with the gspca driver. (List of devices is at LWN)
  • Add HTC Shift Touchscreen Driver
  • Bluetooth: Track status of Simple Pairing mode and remote Simple Pairing mode
  • HP iLO driver

The sources (full lists of changes):

  1. http://kernelnewbies.org/Linux_2_6_30
  2. http://kernelnewbies.org/Linux_2_6_29
  3. http://kernelnewbies.org/Linux_2_6_28
  4. http://kernelnewbies.org/Linux_2_6_27

Web programmers should know

Here is a checklist of knowledge and abilities which I consider a must for a good web programmer.

  • HTML, w3.org standards and validator
  • AJAX
  • SQL: multiple column indexes, transactions
  • The following programming languages exist: PHP, Python, Ruby.
  • Program in at least one of the languages above
  • Program in C at least a bit
  • What is JVM and bytecode
  • What is SQL injection and how to prevent it
  • How DNS works, at least in general – what server and clients do
  • How routing works, at least in general. Tunneling. NAT. BGP is a plus
  • HTTP and HTTPS
  • Load balancing and it’s session persistence problem and how it’s usually solved
  • HTTP proxy, what it solves and how it works
  • What’s FTP
  • What’s version control and what it solves
  • How SMTP works, at least in general. POP3 and IMAP a plus
  • What’s character encoding and why UTF-8 rules

If it’s someone expected to work with Linux the following applies:

I’ll be adding to the list as soon as I remember anything important enough.
Suggestions for additional points are welcome.

What’s wrong with the Internet – SMTP

SMTP is a text based protocol. I already mentioned that text protocols are evil. It was phrased more nicely in previous posts. Well it can no more be phrased nice. This is stupid! In SMTP it means that binary attachments are encoded using base64 which is part of MIME. Any binary attachment (image, presentation, document, …) you’ve ever sent takes more space in the email. That means it’s slower to send, slower to receive, and wastes more space on the server. The space some people still pay for. I have to remind the reader that such encoding requires additional CPU cycles to handle which in turn increases electricity bills’ totals.

And the additional bonus: ever heard “I have 10M email box but I can’t get an email with 8M attachment from my friend. What’s the problem?”. The correct answer would be the stupidity. Wasted tech support time. They have to explain that 8M attachment can not fit in 10M email box. Try sometime to explain this to someone. Have fun. Extra bonus: Someone pays for this tech support wasted time. Exercise for the reader: figure out who’s paying.

What’s wrong with the Internet – FTP

If I had the powers, I would make it unlawful to use FTP. One of the troublesome protocols. Let alone it’s text based, the semantics are totally screwed. Active and passive mode. Yeah, that totally solves all the problems, right. Especially the 2 sockets (network connections) for file transfer. Is it intentionally so f*cked up to make firewall software much harder to get right? In short, it’s broken. Don’t use it. Let it die slowly.

Use SFTP wherever you can. If you are a system administrator, make the world a favour: never enable FTP on your servers.

What’s wrong with the Internet – HTTP

Why in the world would one want to use text-based protocol? Really. WTF Dudes?
Yes, you can telnet a server on port 80 and debug… maybe. That’s about it.
Wikipedia says: “Binary protocols have the advantage of terseness, which translates into speed of transmission and interpretation”.
Lower costs would be caused by: less electricity used, cheaper hardware at the ends and along the way, less bandwidth.

I would also expect programs to be written in better ways just because of handling a binary protocol. A special library would always be used (I hope). There would probably be less stupid Perl scripts each implementing their own parsing of the query string, HTTP headers, and MIME POST body instead of using existing libraries. It would be much harder. There wouldn’t be less stupid people though… I mean that the same people that wrote those scripts would write some other stupid scripts.

HTTP does not support two-way communication in the way required for current internet applications. Wake up! Internet is mostly about applications these days and much less about documents.

Unfortunately I guess we are stuck because of the costs of upgrading to something better. I predict that we will continue to see increasing number of clever hacks to overcome the limitations of this pre-historic protocol.