Build For The Small Guy

When you’re building a software app, you should build for the largest user-base possible, rather than the richest user-base possible. 

I’d rather have $10/mo from 10,000 customers than $10,000 from 10 customers. It’s $100,000 per month either way, but if I lose one customer under the first model then it hurts far less than the second model.

Besides, if you build an app that enables to small guys to compete with the big guys, then the big guys will come knocking.

[From my blog.]

Better interviews and better hiring

So the tech interview is starting to change. I am very glad to see the end of the "puzzle palace" interview. Had a number of those and never did very well at them.

To quote the meat of the article:

Comparing Apples and Oranges - rubygems vs cpan part 3

In part 2 of this series I looked at the "shop window" for rubygems and cpan, and you could see a massive difference in focus both in terms of what was highlighted on the main page and the kind of documentation provided when you looked further (TL;DR is rubygems is frictionless and encouraging with few warnings or rules mentioned up front, while cpan involves poking around fusty old usenet style FAQs full of warnings, expectations and saying to wait for a week or so before you can upload).

So assuming, you've read the documentation (and in the case of uploading to CPAN got yourself a PAUSEID, which according to feedback on part 2 should take 24-56 hours rather weeks), you're ready to build a distribution and upload it.

Ruby and Perl are probably closer in this aspect than many others :
  • They both provide tools to create a new distribution
  • They both provide the command line tools to update and upload a new version of a distribution

ruby vs perl / github cannot use utf8

My little ruby derived vm cannot parse unicode codepoints >0xffff yet.
perl can of course.

user sromanov found this little limitation and wanted to file a bugreport about it.
Since my vm is hosted on github and github is written in ruby and ruby has the same problem as my app, it turned out as catch-22.

See http://www.fileformat.info/info/unicode/utf8.htm

With 3byte sequences you can represent max 0xFFFF
with 4byte sequences max 0x10FFFF.

11110xxx 10xxxxxx 10xxxxxx 10xxxxxx (3+6+6+6)=21 10FFFF hex (1,114,111)

In my case \x{2603} was representable, but \x{1f42b} not.
perl could of course parse and print \x{1f42b} properly.

A few years back I made a video game called the Lacuna Expanse....



A few years back I made a video game called the Lacuna Expanse. Last year I open sourced the code for it. A few people in the community have really dove in and kept it going. They’re doing an amazing job. This is a map one of them made of the entire expanse. Each dot on there is a star system, so you can see just how massive it is. The various colors represent the alliances that control various star systems.

[From my blog.]

Announcing Pinto-0.087

announcement.pngA new version of Pinto has been released. Pinto is an application for managing Perl modules. It solves "the CPAN problem" by creating custom repositories of Perl modules that can be used with the standard Perl tool chain. When you build your application from your Pinto repository, you get exactly the right versions of the modules you want, every time.

This release contains a few small enhancements and bug fixes, but no major changes. It is compatible with any repository you created since version 0.066. The most notable addition is Pinto::Manual::Thanks which lists all the names of everyone who contributed to the crowdfunding campaign for Pinto. The pinto command also has a related Easter egg -- see if you can find it ;-)

The features promised for the crowdfunding campaign are currently under development. I should have an update on that early next month.

Announcement designed by Olivier Guin from The Noun Project

Being nice to colleagues with git pre-commit hooks

For my current contract I'm doing a huge amount of testing on a system that is very fun to hack on. I've also been given a lot of rope leeway in how I test. Thus, I use Test::Most quite heavily, but I've a tiny problem:

use Test::Most 'die';

That should halt the test file at first failure, a feature I use quite a bit when developing to ensure that test failures don't scroll past when I'm actively hacking on code. However, when I added subtests to Test::Builder a few years ago, I made sure that a fatal failure in a subtest would cause the subtest to fail, but not the entire test program. Well, darn. That means use Test::Most 'die' doesn't quite do what I want it to do in this case.

Being pragmatic, I did the simplest thing which can possibly work. I used the testing equivalent of weapons of mass destruction:

MVC - A Personal History

I shared this story with a potential employer a couple weeks ago, who apparently was unimpressed. Notwithstanding, it's all true. Literary criticism might be the next best step.

In 2001, Arthur Andersen Business Consulting went out of business. And I lost the best job I ever had. Clearly Enron was a significant factor, but importantly, AABC ran out of money to fund their war with Andersen Consulting/Accenture. Almost immediately, I was contacted by a friend/colleague, Jeff: He was launching a startup and needed an IT Director. Essentially, my job was to develop the technology his company would resell.

First inchstone.

I have started hacking on my GSoC project to create a JavaScript backend for NQP (a Perl 6 dialect), which will be grown into a full one for Rakudo in the future.
Today I have unbitrotted the existing code at https://github.com/pmurias/rakudo-js by handling QAST::Var's with decl set to "static" (variables that don't change at runtime) the same as ones with "var" (normal ones). As such I have completed the first of 15 inchstones ;)

Unicode is 20++ years old and still a problem

Just did a quick hack to read out product data from an old shop site and import it into a new one:

- wget -r
- File::Find
- Mojo::Dom for parsing
- Text::CSV::Slurp for the result

After 11 minutes running for 14 K pages I experienced the bad surprise:

One file had non-ASCII characters in its name and File::Find does not use char-mode. I forgot about this. Text::CSV::Slurp crashed.

Why the hell are there so many CPAN modules still ignoring Unicode?

Marpa v. Parse::RecDescent: a rematch

[ This is cross-posted from the Ocean of Awareness blog. ]

The application

In a recent post, I looked at an unusual language which serializes arrays and strings, using a mixture of counts and parentheses. Here is an example:

A2(A2(S3(Hey)S13(Hello, World!))S5(Ciao!))

The language is of special interest for comparison against recursive descent because, while simple, it requires procedural parsing -- a purely declarative BNF approach will not work. So it's a chance to find out if Marpa can play the game that is recursive descent's specialty.

The previous post focused on how to use Marpa to mix procedural and declarative parsing together smoothly, from a coding point of view. It only hinted at another aspect: speed. Over the last year, Marpa has greatly improved its speed for this kind of application. The latest release of Marpa::R2 now clocks in almost 100 times faster than Parse::RecDescent for long inputs.

The benchmark

Post Every Day

A couple years ago I ran a conference called YAPC, and I challenged myself to write a blog post every single day for a year about that conference. It annoyed a few people, but it taught me a valuable lesson about marketing…that daily touch point is important. If you run a blog, a Facebook page, or a Twitter account, you should attempt to post something to it every day. It makes it more interesting for the people that follow you. It keeps them coming back. And if you’re super busy like me, feel free to queue up some posts so that you don’t have to actually be there every day. 

[From my blog.]

Perl 5 Porters Weekly: June 10-16, 2013

Welcome to Perl 5 Porters Weekly, a summary of the email traffic of the perl5-porters email list.

Topics this week include:

  • [PATCH] use dots - allow '.' instead of '->' everywhere and concat with '~'
  • NWCLARK TPF grant April report
  • I made t/podcheck.t less sensitive and fixed various pod issues
  • perl needs safer implicit close
  • An observation: Short- vs. long-term benefits
  • [PATCH] Add an API to attach a signature string to a CV
  • Perl experiments

SelfLoader and things I've learned writing/using a debugger

A decade in CPAN toolchain

Dave Cross:

I’m not going to object to Module::Build leaving the core. I’m sure there are good reasons, I just wish I knew what they are. I am, however, slightly disappointed to find that Schwern was wrong ten years ago and that ExtUtils::MakeMaker wasn’t doomed.

Schwern wasn’t wrong and MakeMaker remains doomed all these years later. It’s still around only because there hasn’t been anything to take its place. Module::Build looked like it was going to be that usurper – but didn’t work out.

LacunaWax

image

Jonathan Barton made this super cool new client for the Lacuna Expanse, that allows you to automate a lot of functions in the game, to make massive empire management easier. 

Don't copy "use autodie" in every module

You pay a constant price in your app's starting performance for each time you use autodie;.

Here's a quick benchmark:

$ time perl -E 'say "package X$_; use autodie qw(:all);" for 1..100;' | perl

real	0m1.482s
user	0m1.431s
sys	0m0.047s

Compare with Moose:

$ time perl -E 'say "package X$_; use Moose;" for 1..100;' | perl

real	0m0.343s
user	0m0.328s
sys	0m0.016s

It doesn't get much better without qw(:all):

$ time perl -E 'say "package X$_; use autodie;" for 1..100;' | perl

real	0m1.212s
user	0m1.169s
sys	0m0.047s

But it gets significantly better if you import only a small number of functions:

$ time perl -E 'say "package X$_; use autodie qw(open close);" for 1..100;' | perl

real	0m0.175s
user	0m0.166s
sys	0m0.011s

I'm back!

Fast forward to mid 2013. I last wrote about some checksum one-liner, and it was also pretty much among the last few Perl things I did that year before getting distracted by $WORK (again.)

Now is the time to change that ;)

Video Encoding Modules?

I'm putting the final touches on UAV::Pilot v0.3, which will have a better event-driven API and support control through Joysticks and (maybe) Wiimotes.

This brings me to the point on the ROADMAP I've been dreading: handling the video stream. The Parrot AR.Drone v2 sends an h.264 stream over the network. I can save this to a file easily enough, I suppose, but decoding and displaying the stream in real-time (probably to an SDL window) seems like an obvious thing to want to do.

However, the only CPAN module I've found for any kind of video encoding is FFmpeg, and it only supports reading from a file or URI, not an open network stream.

Does anybody know of another option out there? I can write the bindings to a C library myself, but I'd prefer to avoid it.

Stop Talking About Perl

I couldn’t agree more with Genehack’s “Stop Talking About Perl” talk at YAPC this past week. We spend so much time venting hot air. That’s not going to attract new users. Instead, we need to build cool stuff. Whether you’re into building cool new ecosystems like Moose, Dist::Zillla, and Plack, or if you’re into building cool new apps like Lacuna and The Game Crafter, building cool stuff and talking about that is the way to get people excited about your language. 

Actions beat words every single time. 

[From my blog.]

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.