28 5 / 2012
MacBook Air 13” + The new iPad, match made in heaven »
I carry Macbook Air 13” and the new iPad to work in a coffee shop / public library and i think it’s a match made in heaven. Here’s how:
If the place has both power and wifi, I’ll use the macbook all the time to do everything. There’s no use for the iPad but that’s fine!
If the place has only power but no wifi, I use the iPad’s personal hotspot. It has the 4G LTE, 20Mbps down and 10Mbps up. Awesome.
If the place has only wifi but no power, I use iPad to read emails, yammer, chat, RSS feeds, Twitter and stuff. The battery will last forever, Then when i’m on the mood to code, fire up the macbook to code for 4 hours till the battery dies.
Permalink 6 notes
18 5 / 2012
Straight Talk, the best way to save some bill with an iPhone (locked or unlocked) »
I bought an iPhone 4S using wife’s AT&T upgrade, but didn’t want to open another AT&T line to use with my new phone. Because the phone is not unlocked, there doesn’t seem to be many choice other than tethering with a hotspot like an iPad. That is actually not really true.
(Well, if we swap the phone and let her use the locked 4S with AT&T SIM and I use the now-unlocked iPhone 4, there are a bit more choices, if I’m ok with the 2G/EDGE speed)
Straight Talk has been known as an MVNO of AT&T and T-Mobile, and they recently started “Bring Your Own Phone” SIM plans, and because the SIM uses the AT&T network, it actually works with a locked iPhone.
It costs $45/month for unlimited data (although apparently throttled when you go beyond 5 or 10GB), talk and SMS. There’s some tax like $.75 for me but not like $10 in case with AT&T postpaid. It depends on which plan you choose with AT&T, but for me it’s way way cheaper, probably $15 to $20 per month.

Get the SIM card for $15, activate it online, then go to unlockit from your iPhone to change APN, and you’ll see this HOME carrier in the iPhone screen. MMS won’t work without a jailbreak but who uses MMS anyway.

It apparently works with AT&T’s HSPA+ “4G” network, but being in San Francisco SOMA area, the speed is kind of miserable. I think it’s AT&T to blame not Straight Talk though.

In comparison here’s what i get with T-Mobile’s 3G with Galaxy S I (which doesn’t even do the high speed HSPA+):

18 5 / 2012
On calling someone writing about perl events spammers »
blogs.perl.org, perl ironman, these are all aggregated by machines, not curated by humans. These may be great places to occasionally visit and discover some good writers you eventually subscribe to individually. However subscribing to an entire aggregated feed like these and expecting them to be 100% interesting content to everyone would not obviously work. Name calling someone that doesn’t interest you, working on a community event and working hard to spend their personal time to promote the events, or posting useful stuff in other language than yours spammers is even more offensive.
If you want a good read of perl blog posts and news entries curated by someone, I suggest to go subscribe to feeds and newsletters such as Perl Weekly, reddit/r/perl, perlbuzz or start your own.
02 5 / 2012
iPhone tethered with the new iPad: Bad Idea »
iPhone’s WiFi periodically sleeps and disconnects from WiFi when the screen is locked.
iPad’s hotspot SSID is not visible when its screen is locked.
The combination of this means your iPhone keeps dropping the connection when it’s in your pocket, and you have to turn on iPad’s screen to reinitiate the WiFi connection. Not a good idea.
Now I’m using iPhone tethered through T-Mobile Android phone, till I get the SIM card from Straight Talk. It should sound like the stupidest thing you can do with an iPhone, but because Android’s hotspot advertises its SSID all the time, the connection gets reinitiated immediately, and works much better.
Sad.

What’s even more sad, is that the bandwidth speed isn’t as bad as AT&T’s “4G”, even with T-Mobile’s 3G (of course much slower than the new iPad’s blazingly fast 4G LTE).
UPDATE: as mentioned in the post, there’s a hack/workaround to let iPhone not going to “deep sleep” and hence keep the wifi connection alive: playing music. I cached lots of music files via iTunes match and play all the music while on the move. It’s silly but it seems to work very well, and doesn’t drain battery as much.
Permalink 1 note
02 5 / 2012
Android to iPhone »
New phone.@ Apple Store instagr.am/p/KG1z7RA_0p/
— Tatsuhiko Miyagawa (@miyagawa) May 2, 2012

Wife has been an iPhone 4 user and her contract just got eligible for upgrade to 4S, and now that AT&T allows unlocking iPhones that got out of contract, thought it’s about time to get an iPhone for myself!
I just walked in to the Apple Store on Stockton, got a white 16GB iPhone 4S, and also replaced her iPhone 4 to the brand new one because the home button issue (thanks to Apple Care). All in $250 incl. taxes. Not so bad.
We activated the new 4S in store, and put back the new SIM to 4 so she can continue using it. My 4S is now activated but has no SIM, i’m using it with tethered to iPad’s Verizon LTE, but i just ordered Straight Talk SIM that should allow unlimited talk+text+data for $45 prepaid, even on AT&T locked phone. Updates on that later.
(Couple of Apple Store employees also have told me that AT&T would unlock your iPhone for international use if your account is clear for 60 days or more, like Verizon and Sprint, and that it’s a recent development. I still doubt that, but it sounds worth a try)
Coming from Android, this is my first iPhone (although I’ve used the original iPad and the new iPad, so iOS 5 and Retina display are not the first experience for me) and here’s my 12 hour impressions:
- Camera’s quality is stunning.
- Battery life is awesome. I will never complain about that coming from 6-hour ICS that always needs a micro USB cable in your pocket.
- Notification Center is a mess. Turning off Sound notifications for each app is a pain, and can’t dismiss each notification with swipe?
- The screen feels tiny. I know Retina Display is awesome, but its physical size is just too small. Note that I came from 4 inch Galaxy S, not like Galaxy Note or Nexus with the huge displays.
- Yet, with the small screen, the device feels heavy, and is actually heavier than my Galaxy S.
- I miss back buttons and Intent. And systeem dialer integration with Google Voice.
Overall I like it, but there are definitely things that worked better on Android, but there’s no perfect phone in the world. I’ll keep the Android phone around especially for international use and tethering. I hope Apple fixes tethering with iPad so that the same SIM card that can do tether fine with Android can do the same with the iPad.
03 4 / 2012
Perl QA Hackathon 2012 »
Over the weekend I travelled to Paris, France for the wonderful Perl QA Hackathon 2012.
Paris
This is my second trip to Paris - the last time was around 2007 when I stayed at echolet’s place for Act Hacking, sponsored by the YAPC::Asia funds.
Paris is a great place to visit. Beautiful city, Great food, Subway stations for every 1 minute walk.
The things that bugged me during this travel was the lack of decent 3G prepaid plans for travelers (I wasted 2 days looking for a mobile phone/carrier shop that sells a prepaid SIM card with data, no avail) and hay-fever-like allergy that causes me drowsy eyes and sneezing all the time. Next time, I’ll make sure to find the exact place that sells 3G SIM for travelers and with handful of Claritin capsules.
Hacking
CPAN testers for cpanminus
On day 1 and 2 I suffered from the hay fever described above, but had a good conversation with garu on his attempt to implement CPAN testers report on top of cpanm’s build.log output. xdg’s blog post mentions this in details.
—test-only for cpanminus
I also implemented —test-only option for cpanminus which ticket was originally created 2 years ago. I was just reminded of the issue by charsbar, and discussed it briefly on irc and gave it a quick run to implement it. This is one of the nicest things about Hackathon - lots of tuits given by just talking to fellow hackers.
Note that --test-only actually installs dependencies if they are not installed. If you want to test a distribution with a fresh non-core dependency versions, you should combine it with -L option.
TEST_REQUIRES for MakeMaker
One of thing that I always wanted to implement was to skip test requires dependencies when --notest is specified. It felt kind of odd to implement features to skip installing test modules at a “QA Hackathon”, but well, who cares :)
rjbs’s post explains this in details, but overall, my cpanminus code handles the logic to skip test dependencies when --notest is in effect already, but because majority of build tools, i.e. MakeMaker and Module::Install merge test requires into build requires, the code has never worked like I hoped, in real world distributions.
rjbs took my complaint over our walk back to the hotel on day 2 and he implemented the patch to accept TEST_REQUIRES, as well as preserving test requires in META.json when dumping them into MYMETA.json.
carton bundle
Masaki Nakagawa, while absent from the hackthon, has implemented a pull request for carton bundle command a few months ago, and now it got merged. Now you can run carton bundle command to fetch the tarballs from CPAN mirrors and have 02packages file locally, which you can use to replay in the remote machine without relying on external CPAN mirrors on the deployment time. It’s a huge win.
cpanfile
On Day 3 when I recovered from the jet lag and hay fever, I got the speed at full gear and started implementing cpanfile which I briefly presented at London Perl Workshop 2011.
tl;dr
cpanfile is to CPAN what gemfile is to Rubygems. It allows you to describe dependencies for your Perl applications in a DSL pretty close to (and somewhat compatible to) Module::Install or Module::Build::Functions DSL.
Listing dependencies
First, Perl distributions usually have Makefile.PL and Build.PL to describe dependencies and the way to build, test and install dependencies. There’s nothing wrong with these files for CPAN distributions. Meanwhile, when your perl application (even if it is not a CPAN distribution per se) needs a way to describe dependencies when you expect other developers to run it locally cloned from github, or PaaS (Heroku, dotCloud, Stackato) to satisfy its requirements before running on the platform.
Most PaaS providers described above support cpanm --installdeps . to install dependencies, which means you should put Makefile.PL or Build.PL in the repository to push out to these platforms, but to me it always has felt like a non-ideal situation for several reasons:
- What you’re writing is an app, not a CPAN distribution.
- Your application is not meant to be installed. Rather, meant to be run from the current directory
- Experienced developers usually use tools like dzil or Module::Install to list dependencies, and you don’t commit
inc/or generated files to git - which most PaaS uses to deploy files. Ugh.
Dzil has a releaser plugin to cope with this issue, and you can always write Makefile.PL with MakeMaker by hand, but there’s a gap to this problem.
Self-executing or Perl DSL
Second, these *.PL files are meant to be self-executed, i.e. you run it like a black box perl Makefile.PL; make; make install. In a recent batch of evolution in CPAN clients and ecosystem such as local::lib, I think it’s a better design for CPAN clients to figure out the way to extract dependencies and how to build & install the application. MYMETA spec and Leont’s CPAN static installer spec is a great way to achieve this, and you can consider cpanfile as an additional simplification to have a canonical syntax to represent the dependencies in a CPAN::Meta::Prereqs compatible format (in fact, CPAN::cpanfile module only has one method that generates the CPAN::Meta::Prereqs out of the cpanfile DSL).
cpanfile in cpanminus
I added a cpanfile support in cpanminus devel branch, which means you can just have cpanfile in your application root and expect cpanm --installdeps . to install dependencies, without having a Makefile.PL at all. It is a good start, and I’ll expect more support for cpanfile in the ecosystem such as Module::Install.
Actually, rjbs has just jumped on the wagon a few minutes before I left the venue and implemented cpanfile releaser plugin for dzil.
I hope I can get more done in a coming Carton hackthon in Tokyo next week. I just scheduled this hackathon to work with hackers like Masaki and Tokuhirom, and can also work on features to fill up my slides for OSDC.TW in the weekend right after that. CDD++ :)
Acknowledgements
I want to give huge thanks to elbeho, BooK and French Perl Mongers for organizing the hackathon, and awesome sponsors who made the hackathon possible.
I heard the QA hackathon will continue going on at London in 2013, and can’t wait to participate to hack more.
Check out my flickr set for more photos taken in Paris.
Permalink 1 note
03 4 / 2012
rjbs's rubric: how I spent my Perl QA Hackathon »
As we walked back to the hotel before dinner, I asked Miyagawa how his hackathon was going. He said he wanted to get better support for all of META.json’s prereq types (suggestions, test requirements, etc.) into cpanminus, but had been stymied by ExtUtils::MakeMaker’s lack of support for test requires. One big motivator for him was to speed up the —notest option by skipping test prereqs, but that wouldn’t work if EUMM had no mechanism for them.
…
I filed a pull request for adding TEST_REQUIRES with tests. It’s a bit of a mess, but that seems to be life with EUMM.
rjbs, like always, my hero!
17 3 / 2012
Today I was looking around a way to override/patch Net::HTTP requests to a Sinatra app in tests, and happily found that the sham_rack gem exactly does that.
ShamRack.at("rackup.xyz").rackup do
run MyApp.new
end
Put this snippet in your test_helper and all the calls to Net::HTTP inside your tests go through the Sinatra app. Neat.
I then wondered if someone has ported this to Perl, and voila: I did that almost an year ago.
my $psgi_app = sub { ... }; # any PSGI compat app
LWP::Protocol::PSGI->register($psgi_app);
and now all the LWP supporting libraries go to your app.
I really like moments like this.
Permalink 4 notes
17 3 / 2012
resque-top »
resque-top is my first Ruby gem released to the world of rubygems.
Like mytop and memcache-top, resque-top connects to the resque database and displays the information about queue and processing workers. Basically the same information available on the resque-web UI but on the command line.
Permalink 2 notes
29 1 / 2012
Exciting Times »
Here’s a quick (big) announcement: I’m parting ways with DotCloud and will join COOKPAD in February.
As for DotCloud, It’s been an interesting ride for me at 180 Sansome and I will definitely miss working with them, and wish the best luck at their challenge to be the best platform as a service. My last day at DotCloud is 1/31.
On February 1st, I will join COOKPAD, Inc. to work full-time as a senior developer. COOKPAD may not need any introduction for any Japanese audience, since it is everyone’s favorite recipe sharing website. Here’s a quick intro about the company in English.
As a weekend chef, I use the site a lot myself, and am thrilled to join the company to contribute to the growth. The company is Tokyo-based (with its lovely headquarters in Shirokanedai) but I will continue my life in San Francisco and will see my friends more often in my occasional visits to Tokyo.
I’m really excited to work with brilliant folks from COOKPAD, most notably the founder Aki Sano, and Daisuke Horie, who I enjoyed working with at Six Apart, along with very talented engineers in the team. (Oh, and I heard they’re hiring :D)
Exciting times!
Permalink 59 notes







