Anna Filina

jQuery Performance Pitfalls

Auteur: 
Anna

Introduction

At FooLab, we have been using jQuery because it’s easy to learn, there is a big community with a lot of examples and advice and also because it’s easier to find developers familiar with it. It’s not a bad framework, but it’s very easy to abuse when you do not know how it works and what it implies.

Profiling JS Applications

Auteur: 
Anna

Introduction

Some of the web apps that we build at FooLab rely heavily on Javascript. But when your CPU usage is through the roof, where do you start looking?

Methodology

Many developers start straight with a hypothesis and then try various corrections until something happens. This is a waste of time; no amount of experience changes that. Here’s I do it:

1. Ask a question

“Why is my machine using so much CPU?”

Symfony Form: Extract Values

Auteur: 
Anna

I had to look deep into Symfony 1.4 code this morning as I was trying to get a field’s value. Form values come from different sources: default values, record values (when editing, for example), original POST values and clean POST values. So when is each available and how do we get it?

Get the values by type

Default values are what you will be presented with when you display an empty form.

Get all values using $form->getDefaults() or a single value using $form->getDefault($name).

Their Programming Language Sucks!

Auteur: 
Anna

Or at least this is what I hear often all around me. Many want to think that their language is better than all others, and go to great lengths to discredit them. Just like at sport events, people would paint their faces in their team’s colors and yell insults at the opponents.

On Food Additives and Cancer

Auteur: 
Anna

Disclaimer: Brand names are used for comparison only. It is not my intention to attack a product’s or a company’s reputation. Equivalent products may contain the same ingredients.

Do you enjoy soft drinks? Do you drink the diet version for less sugar? Many of these drinks contain cancerogenic additives, especially the sugar-free versions. Read until the end for a not-so-drastic solution.

Updating RubyGem on OSX

Auteur: 
Anna

No gem would install on my machine because my RubyGem was outdated and rubyforge.org kept returning 302 (redirect) status code. After trying every recipe to update RubyGem on Mac OSX that I had the patience for, I came up with my own solution.

Failed attempts
sudo ruby ~/Downloads/rubygems-1.8.6/setup.rb
sudo gem update --system
sudo gem install rubygems-update --source http://production.s3.rubygems.org/
update_rubygems
Successful attempt
sudo gem update --system --source http://production.s3.rubygems.org/yaml

It’s hot. What are you doing about it?

Auteur: 
Anna

In the last few weeks I heard a lot of people complaining that it’s hot. Not just in Montreal, but around the world. It’s so hot that the air smells differently. Let me share with you some tricks that I picked up in places where the thermometer shows over 40°C (100°F).

Public Call for Papers: What Does That Mean?

Auteur: 
Anna

Some of you may have already heard that the ConFoo call for papers is already open. The great thing about it this year, is that it’s public. This means that anyone can vote on the proposals. Besides being fun for the speakers and attendees, it opens up a whole lot of possibilities.

SoundMixer + ByteArray

Auteur: 
Anna

{EAV_BLOG_VER:ef10600706258406}

As I was writing a prototype for a voice-driven user interface, I ran into a wall. I was convinced that I could analyze a sound’s frequency spectrum with ActionScript 3. It turn out that the awesome SoundMixer.computeSpectrum(), which implements the Fast-Fourier Transformation, can only sample currently played sounds. It cannot be supplied a ByteArray, such as microphone data.

Sync git fork with maintainer

Auteur: 
Anna

I forked the joind.in project on GitHub, committed a few patches and sent pull requests. It was fun until I asked myself “how do I keep my fork synced with the maintainer’s repo?” I found the info (with minor bug) on Google Groups by Matt Todd. It deserved its own post post.

Create and checkout “upstream/master” branch (or whatever you want to call it):

git checkout -b upstream/master

Link branch to maintainer’s repo:

git remote add upstream git://github.com/upstream_maintainer/master.git

Pull maintainer’s repo: