When I designed Oplop's UI, I knew I needed some way to delineate what step was the active step (which are individually contained within section tags). I went with a class called open since jQuery has its toggleClass() function which makes it like flipping a bit. Plus I could style the steps in CSS with a default for all steps and then specialization with the section.open selector for that one step that was currently open. This allowed me to have the UI-specific stuff in regards to what was (not) the currently open step be declared in a CSS file.
But there was a shortcoming with how I did it. Having only two selectors gave me only binary control over the UI in terms of steps. What I really needed was three possible states; not yet opened/upcoming, open, and opened previously/closed. I could have used some JavaScript to easily tweak the CSS as I moved about, but it was so nice to have the UI stuff in a declarative format in the CSS file and not interwoven in my JS code that I didn't want to. This was made especially obvious to me thanks to the Restart button which would need to unroll any changes made by the user; the less I had to keep track of the better as that lessened the chance I missed something.
And then some people complained
Read full entry at origin
Видео с выступления на pycamp в Киеве. Начало немного смазано. Выступление было расчитано на аудиторию с начальным уровнем знаний, поэтому возможно кому-то покажется повторением материала.
Another WSGI web server benchmark was published. It’s a decent benchmark, despite some criticisms. But it benchmarks what everyone benchmarks: serving up a trivial app really really quickly. This is not very useful to me. Also, performance is not to me the most important differentiation of servers.
In Silver Lining we’re using [...]
Read full entry at origin
One of the posts I’ve been meaning to do is this one – a more extended version outlining what I spoke about in my five minute lightning talk I did at PyCon 2010 (more general thoughts on the conference later). Of course, meaning to post it – and actually getting a chance to are two [...]
Read full entry at origin
Several of the reports of the recently-concluded NoSQL Live event mentioned that I took a contrarian position on the "NoSQL in the Cloud" panel, arguing that traditional, bare metal servers usually make more sense. Here's why.
There are two reasons to use cloud infrastructure (and by cloud I mean here "commodity VMs such as those provided by Rackspace Cloud Servers or Amazon EC2):
- You only need a fraction of the capacity of a single machine
- Your demand is highly elastic; you want to be able to quickly spin up many new instances, then drop them when you are done
Most people looking at NoSQL solutions are doing it because their data is larger than a traditional solution can handle, or will be, so (1) is not a very strong motivation. But what about (2)? At first glance, cloud is a great fit for adding capacity to a database cluster painlessly. But there's an important difference between load like web traffic that bounces up and down frequently, and databases: with few exceptions, databases only get larger with time. You won't have 20 TB of data this week, and 2 next
Read full entry at origin
Описанный в прошлом посте сервис Дислокации использовал с самого
начала Яндекс.Карты как движок карт. Причин на то было несколько - я думал, что
они будут распознавать адреса лучше, чем гуглевские; у них значительно лучше
документация, чем у Мапии; нет вопросов с получением ключика к АПИ, в
отличии от Визикома.
В результате я написал вс? с их использованием, и в основном был доволен - в
документации описано вс? подробно, с кучей примеров. Вс? работало, я был
доволен. :)
Но мне предложили перейти на карты от гугля - у них значительно больше охват по
территориям (геокодер знает о мо?м родном Кривом Роге, в отличии от яндексового
:), плюс они лучше распознают адреса (которые встречаются, как оказалось, в
довольно стр?мном виде). Почему сервис не переш?л - я в принципе вс? сделал и
оно заработало - это отдельный вопрос: гугль ограничивает количество запросов к
геокодеру в 15000 в день (это мало, текст со страницы адресов отделений ВТБ24
- 1500 строк) плюс ограничивает частоту запросов - 5 запросов в секунду уже
перебор, два - обычно вс? ок, но бывают траблы. Это по-моему неприемлемо, ждать
пару минут, пока оно раздуплится. :)
Read full entry at origin
В жизни частенько приходится сталкиваться с тем, чтоб найти какое-то учреждение
- например, ближайшее отделение банка. И обычно этот процесс связан с просмотром
списка из кучи адресов и попыткой выудить глазами знакомые улицы - потому что
проверить все эти адреса по карте не представляется возможным вообще.
Иногда у меня в голове появлялась мысль, что было бы хорошо это как-то
поправить. :) И вот последний раз, как мне пришлось срочно искать отделение
своего банка, я вернулся к ноуту и за пару часов набросал страничку, где можно
ввести десяток адресов и получить картинку их размещения на карте - и увидеть
визуально, куда податься. Встречайте - locations.in.ua.
Что кл?во - оно совсем не требует работы мозга (или рук). Просто вставляете в
поле ввода кусок текста, в котором встречаются строки с адресами, сервис немного
зачищает их и пытается найти на карте. Те, что получилось найти, показывает на
карте и помечает зел?ным маркером; те, что не получилось - помечает красным
маркером. Вс? просто. :)
Read full entry at origin
Lately I’ve been writing code using WebOb and just a few other small libraries. It’s not entirely obvious what this looks like, so I thought I’d give a simple example.
I make each application a class. Instances of the class are "configured applications". So it looks a little like this (for an application [...]
Read full entry at origin
Since I’ve been thinking about deployment I’ve been thinking a lot more about what "configuration management" means, how it should work, what it should do.
I guess my quick summary of configuration management is that it is setting up a server correctly. "Correct" is an ambiguous term, but given that there are so many to [...]
Read full entry at origin
As of last week, I am now an employee of Mozilla! Thanks to everyone who helped me out during my job search.
I’ll be working both with the Mozilla Web Development (webdev) team, and Mozilla Labs.
The first thing I’ll be working on is deployment. In part because I’ve been thinking about deployment lately, in [...]
Read full entry at origin