Cookie Notice

As far as I know, and as far as I remember, nothing in this page does anything with Cookies.

2012/04/24

Pros and Cons of the JOBS Bill

I'm listening to this podcast from Coffee & Markets on the subject of the JOBS Act. JOBS stands for "Jumpstart Our Business Startups", and the part that is most significant in this point is the change in rules for funding small businesses.

They do a really good job of hitting the issues, and (unlike most of their podcasts) there's a real adversarial interchange on the core, which is as follows: Kickstarter is a neat idea, and there are many interesting ideas coming out of it. I haven't made a project and I haven't funded one, but I like the idea, but the thing to remember is that you're either 1) giving money to people to do something interesting, or 2) pre-ordering from them to do something interesting. You are not an early investor, so you don't get equity, so if your $100 is what made the difference for them to become the next Google or Facebook or Valve, you get to say "I helped with that", but you don't get to live in Marin County swimming in a pool of money like Scrooge McDuck. Until now.

From the Robocop Kickstarter page
The rule that the JOBS Act is overturning dates from 1933, where the Stock Market Crash took down a lot of small investors who had heavily invested in untrustworthy companies and ended up losing it all. I am more than sure that someone will try to Bialystock & Bloom the system by come up with an idea, funding it, intentially failing and pocketing the money. Or something akin to this. You don't need me to explain all the ways a business can fail.

I'm seeing this from three sides.

The first side is as a consumer. As a consumer, I want a Pebble watch. I want Ned Evett to make album after album of fretless guitar music. I want Detroit to have a RoboCop statue. I want the world to be filled with interesting things. We live in the future and it's about time we start taking advantage of it!

The second side is as a developer. I currently work for a Big 10 university, but I am more interested and involved in seeking out side projects. We are at a state with computing that you can develop an idea cheaply and easily on inexpensive PCs and deploy them with Amazon with a credit card. Moore's Law is creating a bigger and bigger tide of computational capability which crests over the rocks of consumer interest. Lots of people are trying to surf it. Many ideas don't work, but that's a learning opportunity about how to do it better next time.

The third side is as a citizen. As a citizen, I look at this and see a definite non-zero chance of people being screwed by this.

So, I'm largely but not wholeheartedly for this. Meanwhile, I'll dream up new ideas I can start to make Kickstarter projects for.

2012/04/18


This is why Google is Skynet.

Now, a bit of advertising


Fantastic from glen hinkle on Vimeo.

I don't use Mojolicious. Right now, I'm learning Dancer. But rainbows, unicorns and pie are three great things.

2012/04/13

I am large. I contain multitudes. Plus fat. But mostly multitudes.

There's the computer programmer side, which is mostly served here. There's the musician side, which is why I created my first Blogger blog, Sans Direction. I sometimes like to take photos, which I often post to Akbar Zeb. (There's a story to that one. Ask me sometime.)

I've started to be reasonably active on Google Plus, and I've decided that I should use their API to create an RSS output, then use ifttt.com to put them in a blog. I was doing that with Posterous, but it stopped working, and I thought better of it (thinking I could do something better and more specific with that, maybe QS-specific?), and created a new blog. Nonplussed Rants.

Instagram is also available for Android, and I am using ifttt to move my Instagram photos to a Tumblr named Sans Direction. Both should start filling up with content from other tools soon.

2012/04/03

Maybe Perl IS A Write-Only Language: Rereading a Regular Expression

OK, I don't really believe that, but I found this in my code base during a refactor today.

        $array[ 0 ] =~ s/[^\w\d\._]+/_/gomx ;

It took me some re-reading and reminding to decipher what it is supposed to be doing.

The brackets are holding a group, which contains everything that isn't a word character, a digit character (which is also a word character, so it is redundant), a period or an underbar, and replaces it with an underbar.

The carot (^) is a negator, and the square braces are a group. [^A-Z] matches any character which isn't a capital ASCII letter, which is to say, any character that is not in the group of letters between A and Z.

The flags, "/gomx", prove to me that this is my code, and it dates it to a point after I had bought and read through Perl Best Practices (where Damian Conway recommends to always use /m and /x) but before a presentation in my Perl Mongers group argued that the /o flag was useless. The usage, if I correctly recall, was to "precompile" the regular expression, making repeated uses faster. The speaker benchmarked it and found it didn't affect performance, or didn't affect performance positively, or didn't affect performance much. Looking in perlre, I'm not seeing evidence that /o is still in the language.

/g means global. Normally, regular expressions work on the first thing it matches, but this flag means it works on everything that matches.


/x extends formatting, allowing you to separate and document your regular expression. I clearly didn't do that. If I had documented this code, I wouldn't be blogging it now. /m allows you to treat multi-line strings like one-line strings. This code runs on tab-delimited data, line-by-line.  Damian Conway's suggests in Perl Best Practices that you always use these, even when you don't need them. Randal Schwartz told me on Google Plus that this is paramount to cargo-cult programming. (I don't believe I have done terrible damage in my attempts to present their positions. I also don't believe I have standing to argue on one side or the other. For further details, talk to them.)

So, this code takes everything that isn't in the small set of characters and replaces groups of them with a single underbar. Another redundancy is that underbars are word characters. m{[\w]} matches '_' just as m{[\w_]} does. It would be a better regex if it didn't match _, so that a string like '%^&_%*(&' would become '_' not '___'. This would be a better regex:

        $array[ 0 ] =~ s/[^A-Za-z0-9\.]+/_/gmx ;

And it would be better still if I documented it. So, this is clearly a case where I had a problem, brought in regexes, and now have two problems. Thank you JWZ.