Trevoke

 

Ruby has a neat feature called at_exit which takes a block and then executes the contents of this block when the program ends. There are a couple of VERY important details:

  1. It takes a block and converts it into a Proc object at the time of parsing. This means that the data has to be available in the binding, or you’ll run into errors. Example: instance variables need to be set before you can use them in that block. Better idea: don’t use instance variables in there at all.
  2. You can ‘chain’ at_exit calls, and they will be resolved in a First In, Last Out (FILO) order.

Once you know this, using at_exit and writing tests for it becomes a little easier:

class Piddler
   def initialize
     create_pid_file
   end

   private

   def create_pid_file
     pid_file = "/tmp/piddler/my_pid" #Simplified for example purposes
     File.new(pid_file, 'w')
     at_exit { FileUtils.rm_f pid_file }
   end
end

What you’ll notice is that the at_exit block is defined RIGHT AFTER I create what I will need to resolve/undo/finish – not separately, right inside the method.

 

def test_clears_pid_file_when_it_exits
   at_exit { assert_equal 0, Dir['/tmp/piddler/*].size}
   Piddler.new
end

The advantage of that is that I know exactly when it gets defined. For this example, it gets defined at the end of the ‘initialize > create_pid_file’ call. This means that any at_exit blocks defined BEFORE that will be resolved AFTER.

 

 

The Art of Agile Planning (#aoap on Twitter, and AOAP from now on) is a 2-day course. The focus is on understanding the higher-level constructs of Agile and how they imbricate. In the course, one learns how the ideal Agile team is composed (hint: it’s cross-functional and co-located) and what practices and techniques will be used to organize at all levels, from the developers’ standup to the customers’ research for the next best value-delivering feature, including how to properly create a feature that developers can work on and how to best break it down into stories (and then into tasks).

The Art of Agile Delivery (#aoad on Twitter, and AOAD from now on) is a 3-day course. The focus expands from AOAP, both into further details in the iteration (how do developers best produce quality code without defects) and into further details for customers (how do we figure out who we seek and who we need to interact with).

Both courses feature activities and mini-games to help accelerate and cement learning. Both courses, of course, feature James and Diana, whose presence is invaluable. It took me a day or two to get accustomed enough to start asking questions – don’t wait, you only have those few days, and they can both bring great insight into whatever questions or problems you may have. Their first answer may be a little idealistic or snarky (I heard a once or twice “don’t do that”), but after the chuckles die down, they go into further detail and, asking for clarifications where needed, they explain the ideal of the practice(s), skill(s) and/or technique(s) involved and how to try and rectify or adapt to a less-than-ideal situation. Among the small things that make this course great: there are slidebooks given, where the slide is on the left and there is room to take notes on the right, and there are ‘facilitational aids’ (as Diana Larsen put it, “because toys aren’t tax-deductible”) for those of us who need to fiddle with something to learn better.

It is my understanding that both courses can be taken separately. I would probably not recommend doing so, as AOAD truly does build on top of AOAP. I will, however, echo James Shore’s recommendation. Take care of yourself. Don’t leave after each day and drink/party/work. Get some air, see your family, sleep. Give your body and your mind a rest. This course is five days and very intensive.

I’ve tried my best to give you the essence without the substance. Any description of the substance would simply be sub-par and ruin the experience. This course has to be lived. Besides, the course evolves based on the feedback it receives, so hopefully when you take the course, it’ll be even better than when I took it!

AOAD and AOAP together show that Agile truly is an organizational-scale operation, and can only have limited success if not applied at the manager and customer level.

A last note – this course set can be taken with total strangers, but I took it as a training course with my entire company. They were people with whom I am used to working, people with whom I’ll be talking about this course for long after it is over, and it allowed some slightly different dynamics to permeate the courses – in my eyes, for the better, but I’m clearly biased.

 

If Revolutionary 0.4pre4 –
Use WINDOWS! Broken on Linux.
Follow this process: http://forum.xda-developers.com/showthread.php?t=1219246

revolution, for me, said “oh sure, I’ll install CWM for you” and rebooted to Fastboot USB but did NOT actually install it. So you manually push it, then you choose ‘bootloader’, then ‘recovery’ and THEN you are in CWM. And then Bob’s your uncle.

 

I have a Droid Incredible 2 – and I’m really enjoying it. I got an OTA update to 2.3 right about the time I was going to root it, so I thought, what the heck, I’ll get Gingerbread. It’s all I really wanted anyway.

Last week, at some point, the clock app disappeared. I noticed because the alarm stopped ringing. It didn’t really bother me, because sometimes I sleep through it — but then I checked and it’s … not there. I mean, in “Manage Apps” it’s there, with a size of 0, but it’s not the app drawer.

… There’s a bug that causes the clock app to randomly appear / disappear. And it’s been happening for about two months, based on the research I’ve been doing.
Someone on a forum said that if this happened on an iPhone, it’d be in all the newspapers. They’re right. iPhones are held to a different standard — and the standard should be the same. If Android wants to be taken seriously, then it’s time to get some real development going behind it.

And don’t give me that crap about a single platform versus many platforms (different phones, etc). You’re a distributor, you know your hardware. How come other ROMs are stable on YOUR hardware? Hmmmm ?

 

You can use xargs to grep the same word through different files. But how do you use xargs to grep different words through the same file?
Like this:

echo “your fancy word finder stuff here” | xargs -i bash -c ‘grep -n “{}” your/file/here’

Not something that’s useful every day, but when you want it, hot damn is it nice to have.

 

We’ve been using git at work for a greenfield project and, so far, this has worked for us. It could be a useful template to get another team started.
We have gotten rid of the name ‘master’, which is only a convention anyway, and instead are using a few permanent branches:

  • production (only stable code which gets deployed to production goes there. The only branch to be merged in, EVER, is ‘stable’)
  • stable (only stable code which goes to the staging environment goes there. The only branch to be merged in, EVER, is ‘integration’))
  • integration (code from other branches goes here – tests should, of course, pass before merging in.)

And then we have, of course, other branches for work in progress and other stuff. we’ve used these prefixes to help with the naming, and called this the ‘buffers’ convention (look at the first letters – BFRS):

  • bug_
  • feature_
  • refactor_
  • spike_
How have you organized your git repositories?
 

So, you can’t install gettext?
Here’s a hack to get you past it.
do your
$ emerge –oneshot gettext

When it’s all unpacked, Ctrl+z (this will pause the job), go to the work directory, something like this:
/Users/you/Gentoo/var/tmp/portage/sys-devel/gettext-0.18.1.1-r2/work/gettext-0.18.1.1

From there, go in here:
cd gettext-tools/gnulib-lib
and in here..

edit “stpncpy.c” with your favorite text editor, find
“# define __stpncpy stpncpy”
And add // at the beginning of the line, like so:
“//# define __stpncpy stpncpy”

Save and quit, then type “fg 1″ and return, this will resume the job.

This hack bypasses the stpncpy problem. Someone more serious than me needs to create a new ebuild for this though…

 

I flew overnight from Vancouver to be with you today. I landed in New York a few hours ago and caught a flight down here because I needed to tell you all in person that I think you’re awesome.
I was raised by a teacher. My mother is a professor of early childhood education. And from the time I went to kindergarten through my senior year in high school, I went to public schools. I wouldn’t trade that education and experience for anything.
I had incredible teachers. As I look at my life today, the things I value most about myself — my imagination, my love of acting, my passion for writing, my love of learning, my curiosity — all come from how I was parented and taught.
And none of these qualities that I’ve just mentioned — none of these qualities that I prize so deeply, that have brought me so much joy, that have brought me so much professional success — none of these qualities that make me who I am … can be tested.
I said before that I had incredible teachers. And that’s true. But it’s more than that. My teachers were EMPOWERED to teach me. Their time wasn’t taken up with a bunch of test prep — this silly drill and kill nonsense that any serious person knows doesn’t promote real learning. No, my teachers were free to approach me and every other kid in that classroom like an individual puzzle. They took so much care in figuring out who we were and how to best make the lessons resonate with each of us. They were empowered to unlock our potential. They were allowed to be teachers.
Now don’t get me wrong. I did have a brush with standardized tests at one point. I remember because my mom went to the principal’s office and said, ‘My kid ain’t taking that. It’s stupid, it won’t tell you anything and it’ll just make him nervous.’ That was in the ’70s when you could talk like that.
I shudder to think that these tests are being used today to control where funding goes.
I don’t know where I would be today if my teachers’ job security was based on how I performed on some standardized test. If their very survival as teachers was based on whether I actually fell in love with the process of learning but rather if I could fill in the right bubble on a test. If they had to spend most of their time desperately drilling us and less time encouraging creativity and original ideas; less time knowing who we were, seeing our strengths and helping us realize our talents.
I honestly don’t know where I’d be today if that was the type of education I had. I sure as hell wouldn’t be here. I do know that.
This has been a horrible decade for teachers. I can’t imagine how demoralized you must feel. But I came here today to deliver an important message to you: As I get older, I appreciate more and more the teachers that I had growing up. And I’m not alone. There are millions of people just like me.
So the next time you’re feeling down, or exhausted, or unappreciated, or at the end of your rope; the next time you turn on the TV and see yourself called “overpaid;” the next time you encounter some simple-minded, punitive policy that’s been driven into your life by some corporate reformer who has literally never taught anyone anything. … Please know that there are millions of us behind you. You have an army of regular people standing right behind you, and our appreciation for what you do is so deeply felt. We love you, we thank you and we will always have your back.

 

Une pierre
deux maisons
trois ruines
quatre fossoyeurs
un jardin
des fleurs

et un raton laveur

une douzaine d’huitres un citron un pain
un rayon de soleil
une lame de fond
six musiciens
une porte avec son paillasson
un monsieur décoré de la légion d’honneur

et un autre raton laveur

un sculpteur qui sculpte des Napoléon
la fleur qu’on appelle souci
deux amoureux sur un grand lit
un receveur des contributions
une chaise trois dindons
un ecclésiastique un furoncle
une guepe
un rein flottant
une écurie de courses
un fils indigne deux frères dominicains
trois sauterelles un strapontin
deux filles de joie un oncle Cyprien
une Mater dolorosa trois papas gateaux deux chèvres de
Monsieur Seguin
un talon Louis XV
un fauteuil Louis XVI
un buffet Henri II deux buffets Henri III trois buffets
Henri IV
un tiroir dépareillé
une pelote de ficelle trois épingles de sureté un monsieur
agé
une Victoire de Samothrace un comptable deux aides-
comptables un homme du monde deux chirurgiens
trois végétariens
un cannibale
une expédition coloniale un cheval entier une demi-pinte
de bon sang une mouche tsé-tsé
un homard à l’américaine un jardin à la francaise
deux pommes à l’anglaise
un face-à-main un valet de pied un orphelin un poumon
d’acier
un jour de gloire
une semaine de bonté
un mois de Marie
une année terrible
une minute de silence
une seconde d’inattention
et…

cinq ou six ratons laveurs

 

I just moved into a new apartment where the AT&T reception is, well, atrocious. Still, I like AT&T, so I’m dragging my feet to switch to Verizon (or something else).

Today, I spoke in live chat to some AT&T employee. I believe the name was Monica Garnett but I could be wrong — and it probably doesn’t matter. My issue was that I didn’t seem to have a mailbox for my phone number. She says my data plan is unsupported for smart phones.

… Wait, what? I’ve been using this data plan for over a year with this phone. Maybe I never got voicemail, but who cares! It WORKED. I had unlimited text and unlimited data. Now, yes, I know, this plan had been removed and AT&T wasn’t offering it anymore, but I am an existing customer, I get the perk of keeping that, right?

… No. I was told I could switch to their 200Mb/month or 2Gb/month plan, which I did, but what I wasn’t told is that THESE PLANS DO NOT INCLUDE MESSAGING.

Now, I want to fix this. I got screwed by a company, big whoop, whatever, I’ll just limit myself a little. THE WEBSITE DOES NOT GIVE ME REASONABLE OPTIONS. I can get unlimited text, or unlimited text with any mobile-to-mobile calling, or 1000 texts.

I could pay $15 for 200 megs and $10 for 1000 texts, and then I’d have $25 — which is, $5 less than unlimited data and unlimited texts. Huh. NO.

I could pay $25 for 2Gb and $10 for 1000 texts, or $20 for unlimited texts. So .. $35 or $45? NO.

Seriously? So I have to pay MORE now to have LESS than I used to have? Well, goodbye, AT&T. Guess who’s going to go say hi to another phone service provider tomorrow?

© 2011 Seven steps Suffusion theme by Sayontan Sinha