Time to post some interesting stuff I’ve found in Internet last week. Today we going to talk about CSS font stacks, Ruby structs,
extract_options! method came from Active Support, bash scripting, software version control visualization.
Guide to CSS Font Stacks: Techniques and Resources
CSS Font stacks are one of those things that elude a lot of designers. Many stick to the basic stacks Dreamweaver auto-recommends or go even more basic by just specifying a single web-safe font.
But doing either of those things means you’re missing out on some great typography options. Font stacks can make it possible to show at least some of your visitors your site’s typography exactly the way you intend without showing everyone else a default font. Read on for more information on using and creating effective font stacks with CSS.
When I started posting links, I decided not to mention articles posted by Smashing Magazine, thoughtbot and other sites which everyone reads. But this is totally awesome: a complete guide on font faces, list of font tools and articles about typography. I promise, I will not publish links from Smashing Magazine ever again.
Structs inside out
Today we’re back to normal blog mode, where each article stands for itself. Muppet Labs are closed and we will be continuing our journey across the Ruby universe starting with an indepth look at Ruby’s
Structclass — Ruby’s Swiss army knife for structured data.
Structcan be used without any additional
requirestatement — it’s just there. This means it comes with zero additional overhead during initial interpreter startup — one of the many advantage of using
Struct. But first let’s look at the basics.
Struct class usage examples.
Inside Ruby on Rails: extract_options! from Arrays
How many times did you see a method call like the following one in your Rails application:
my_method :arg1, :foo => true?
What makes my_method quite special is the ability to pass an arbitrary number of parameters (:arg1, :arg2…) followed by a list of keyword/value options.
This is made possible by a really helpful method provided by ActiveSupport called
extract_options!. What this core extension does is to extract the options from the given set of arguments. When no options are available, the method returns a blank Hash.
Nice Ruby on Rails method I didn’t know.
Advanced Bash-Scripting Guide
The shell is a command interpreter. More than just the insulating layer between the operating system kernel and the user, it’s also a fairly powerful programming language. A shell program, called a script, is an easy-to-use tool for building applications by “gluing together” system calls, tools, utilities, and compiled binaries. Virtually the entire repertoire of UNIX commands, utilities, and tools is available for invocation by a shell script. If that were not enough, internal shell commands, such as testing and loop constructs, lend additional power and flexibility to scripts. Shell scripts are especially well suited for administrative system tasks and other routine repetitive tasks not requiring the bells and whistles of a full-blown tightly structured programming language.
Old good guide for the bash scripting. Must read for any developer.
gource — software version control visualization
Gource is a software version control visualization tool for Git and CVS.
Software projects are displayed by Gource as an animated tree with the root directory of the project at its centre. Directories appear as branches with files as leaves. Developers can be seen working on the tree at the times they contributed to the project.
This freaking awesome tool produces animated visualization of source code history based on Git or CVS reporsitory. Also take a look at the code_swarm project, which does very similar things.
PS. Did you notice a new threaded comments structure in this blog? Also I have rewritten theme layout a little, so there is HTML5 here now.
ЗЗЫ. Журналисты WebStream.com.ua взяли у меня интервью. Читаем здесь.
Не открывается страница с интервью :((
Да, у них сайт притормаживает.