Monday, May 27, 2013

More random findings - how to module




Reading http://howtonode.org/how-to-module  I remembered reading substack's own guid https://gist.github.com/substack/5075355

Went back to http://nodejs.org/community/ trying to find the irc (it became the first step of substack advice when he copied his gist https://gist.github.com/substack/5075355 to a blog post http://substack.net/how_I_write_modules ) but then got side-tracked visiting the various other nodejs community pages http://nodejs.org/community/   like http://planetnodejs.com/ where I found a new interesting futurealoof article "no builds" http://www.futurealoof.com/posts/no-builds.html which I thought of sharing with od's own IT, found http://nodeup.com/  listened the podcast http://nodeup.com/forty
and one of the guys there said "growing up is the process of becoming a hypocrite you can live with".
I thought that was a pretty good stmt meaningful both the for particular context as well as a more general statement.

.... next morning
a few tweets from substack https://twitter.com/substack/status/339098167935119360:
when you start from scratch every time, you continuously re-evaluate your assumptions and you feel the full burden of boilerplate
and...
if you use a scaffold generator to write your boilerplate instead of typing it out by hand, you're less likely to get rid of the boilerplate

Looking for something like sonar for nodejs...http://nodejsrocks.blogspot.com/2012/06/never-mind-i-will-find-something-like.html I found yo.. http://yeoman.io/ . It seems that the yeoman/grunt/bower world is not consistent with the no-scaffolding world that substack, TJ and others are dreaming off.

Random findings : Npm, dirty, grunt, bower, components

Discovered grunt … a very contributor-happy system to address the too large, too much replicating across projects [MRJC]akefiles that people use.
I think its awsome … and the reason (thats its awsome) is that the guy/author managed to find a way to make it easy for people to contribute… where before they were not... via reusable grunt tasks/plugins.
- http://benalman.com/news/2012/08/why-grunt/
- http://gruntjs.com/


My new favorite guy https://github.com/sindresorhus/todo
(take a look at some of his repos… really interesting …. http://sindresorhus.com/bower-components/  (top right)
One of them is https://github.com/sindresorhus/GitHub-Notifier, a browser plugin that tells me if I have any unread notifs in github . Just added it to my chrome... It even make a sad face when it cannot connect to github.

I just found dirty  https://github.com/felixge/node-dirty
http://www.slideshare.net/the_undefined/dir-5299121
it has some aspects of gl's prototypeDB.

Nice... open source bootstrap themes :
http://bootswatch.com/ (I like the united/ubuntu one)

Interesting ..https://github.com/bower/bower/issues/39
TJ asking the bower community (which has become  a very powerful one) to change their component.json into bower.json so as it doesn't conflict with hisgithub-based (why have another registry if you rely on github…)  component manager that will win them all github.com/component/component
the nice people at bower agree to change their name and TJ suggest that they use his bot for automated PRs to all the registered bower modules.
https://github.com/component/bot

(watching TJ http://vimeo.com/48054442 ) explaining component (which apparently is an alternative to browserify which is also an alternative to bower…

All this space seems still rather in flux with no clear winner… and even though they are packaging js.. their corresponding css still remain rather not as well packaged  due to their more global by nature status..   http://www.forbeslindesay.co.uk/post/44144487088/browserify-vs-component

I found interesting the comment by substack :
https://twitter.com/substack/status/337310410657128448
ie don't bring all kinds of tools when a single tool will do it.

Looking at my boxchareditor I kind of feel that way.. had to use way too many tools to get a toy app up. (look in https://github.com/ogt/boxchareditor/blob/gh-pages/Makefile)
Anyway in the thread that ensued TJ says he doesn't really like grunt (as a more modern make replacement) - but he argues against using npm. He is happy with make.
Then substack points out how he was able to use npm  for everything in ploy… https://github.com/substack/ploy#scripts  (i re-read about ploy and it is quite an awsome tool by the way)

Found this article http://www.devthought.com/2012/02/17/npm-tricks/  which discuss about a bunch of interesting tricks about npm

Took a further look at the sparse blogging in http://www.devthought.com/
The guy founded LearnBoost … Wow I have been looking for that ...http://shelr.tv/about   he seems to have written something around that - but interactive codestre.am but is not up now..  https://twitter.com/rauchg/status/332211183539060736
https://github.com/antono/shelr.tv
(its unbeleivable the projects that have came out of learnboost… https://github.com/learnboost
stylus, socket.io knox mongoose...

Started looking at http://howtonode.org/how-to-module  (remembering substack's own guide https://gist.github.com/substack/5075355 ) saw that the author was writing it via wheat https://github.com/creationix/wheat   as a community contributed blog https://github.com/creationix/howtonode.org where anyone that wants to contribute forks, adds article, submits PR and assuming that it passes the quality bar of the owner/mainnainer it gets posted…

Followed to the author
https://github.com/creationix
http://creationix.com/
saw that he is really into online education, creating a programming learning environment/experience for kids => js-git
http://www.kickstarter.com/projects/creationix/js-git ,   https://github.com/creationix/js-git

and realized again some of the hot debate of packaging vs componentization:
"The Problem" https://gist.github.com/creationix/5657945

--
and after looking at js-git I had to look back again at the chromebook ( I got one from google 2 yrs ago… and never managed to get it up and runing due to some wifi security problems)
(it seems that the msft PR machine has flooded the media with "chromebook is failing/struggling" in April.. which means that at last the Chromebook is gaining real traction  http://www.zdnet.com/amazons-top-selling-laptop-doesnt-run-windows-or-mac-os-it-runs-linux-7000009433/

Wednesday, May 15, 2013

The great alexander game


We played one of my favorite games with gl yesterday. Think that smartmoney.com/marketmap is the world, we are great alexender and we randomly pick a country (company) to invade.



Greece and its city states is silicon valley and its tech savvy innovative < 10yr old companies. We exclude these. Its the rest of the world, the old fashioned world that is the target. Greg picks a continent "Consumer Goods" and in it he picks the company that does all the energy drinks.
Thats Monster Beverages, the recently renamed 70-80 yr old company that had a rebirth after it focused into the energy/sport drink space.
Its a 10B market cap.
SO what is the game then? The game is to try to figure out how to "invade that country". Using innovations/understanding of disandvantages that are obvious to anyone in silicon valley , try to come up with a hypothetical war plan that can pass the bar of two relatively smart guys talking about it without having any real clue about the industry at hand. It makes for a nice coffe break discussion..

So here is the war plan for Monster Beverages (I've never really had any Monster beverage - so I will pretend that "energy drinks" are the same as "sport drinks" and I will be talking here about sport drinks as if Monster is the company that owns the sport drink space.

So, sport drinks like gatorade, or vitamin water or things like that are extremely overpriced watery colored drinks that have lots of electrolytes depending on the case lots of carbs, or not so many, and taste that varies from fruity to weird. It doesn'y seem thought that the taste of these drinks is a really proprieterary recipee. It seems that it is fairly simple to create a replica with all the properties that costs not $2 per bottle but 10-25cents per bottle (like the normal sodas).

So why do people spend $2.
My simple answer is that this space captured the price un-elasticity of the relatively afluent sportsy group a group that grew substantially as market share over the last 10-20 years. Together with well targeted marketing (bottles shapes, colors) and lots of TV advertising , presence/promotions in all health clubs etc.. they become a well known brand in a very small amount of time (compared to century old soda brands).
Its high price finances
 - a expensive advertising model
 - incentivizes supermarkets for premium self space (safeway makes much more per sq inch of gatorade than coke)
 - a highly profitable corporation.

 Thats all good..
 Now seeing it from the tech side:
 - Someone is managing to sell colored/artificially flavored 20c /bottle water for $2 => thats wrong/inefficient
 - They do that by doing old fashioned typed of advertising that we know are loosing mind share (TV, magazines, stadium banners)
 - They rely on old fashioned distribution models (retailers) that are seeing their own market erose for anything that is "commoditized"

 The above more or less gives us the obvisou directions of attack:
 - Provide a lower cost alternatice
 - that doesn't pay for TV advertising
 - that doesn't rely / pay high margin retailers for distribution

 and possibly leverage more novel forms of viral marketing.

 Here is an example:
 (Assume that we have created a replica of the major gatorate like products and came up with an equally attractive bottle/labels names etc).
 We have a bottler that fills them up and we have no distribution - zero awareness.

 We will follow the soda drink model for advertising : free samples (soft drinks disperse 1/3 of their volume as "free samples" ie through the fast food industry where they practically make no money - allowing the fast food industry to make all the money (fast food industry produces the burger practically at a loss and makes all its margine through the soft drink - by providing an exclusive channel to a single company - cant find the research paper I have read all that...)).

 In our case we will address the rather un-targeted children sport tournament space as the space where we would real-sponsor with free samples.
 Typically every family with kids is involved in one or more sports, having weekly practices, matches and monthly or by monthly tournaments.
 Open tournaments typically have half a dozen of small vendors that sell anything from foods to drinks.
 We will need a methodology to identify all tournaments in all sports and contact the organizer with the proposal of "sponsored" "our sport drink" free for the tournament participants drinks in exchange for a free spot plus a few ad banners. Nobody has done sth like that so the odds are that we should be able to get something
 more than local tournament awareness: kids love to play games to make an extra $.. they are allready socially connected in instagram, kick and all kinds of kid-chat thingys. They have a iphone/android or know someone that does. To get the free drink all they need to is (sth like download the app, like the drink, broadcast their choice to their friends/followers... add the fb app... or any some combination of the above). The outcome is that they "market to friends, show proof, get a free expensive icy cold drink. Primary costs are the people/truck that run the tent.
 Ad Banners and bottle show - "can only purchased online" .(32 bottles at $1/bottle leaves enough room both for free shipping as well as for this kind of free sampling)

 Such program would allow awareness within a year.
 It would require investment - but it can grow locally area by area..(bay area first etc), which can make many things easier (including the actual shipping)


Thats all

Sunday, May 12, 2013

Retained Earnings Tax

I was at a friends birthday the other day , and there was someone at the table, a self made entrepreneur, apparently rather successful, the stereotype of someone who is sure about himself, thinks he knows the answers to any problem that he has thought of etc. etc. As it turns out he is rather fascinated about the problem of Retained Earnings tax. Without any further wikipedia search, here is his story:


"I started my company as a C Corp. because i thought that what real companies are/do. I was always extremely conservative in terms of my tax returns. Every year I get from Amazon all internet sales and report them. The one time that I have been tax-audited they ended up returning me taxes. Still the company was successfull and made good profits, year after year.. I paid the equivalent of 48% (Federal + California ) tax and left most of that taxed profits in the company. My accountant seeing kept on telling me that he should have made the company a S-Corp as opposed to an C corp and that I should take the money (as bigger salary) instead of letting it to become C-Corp profits. But I was always affraid to do that. Never having taking debt or any investment, I was seeing it as my company's weakness that I have to deal with. Having a big cash hoard is what makes a well funded company able to fund growth spurts acquisitions, or just ride the hard times when they come and I wanted my company to be like that.
Until one day my accountant told me that I owe a huge amount of tax, equivalent to a 15% of all my accumulated over the years earnings.. as "retained earnings tax".

He then went on to explain that this is really just one more example of the fight between the old foos the aristocracy and the bourgeois the people that have assets vs the people that produce income, the old money vs the new money.
In his view the following changes should happen to the tax law.
S-Corporations are extensions of one-self and are taxed fine they way they do today.
People should be taxes as today based on a combination of income tax, use tax (like sales tax)  AND asset tax (like the property tax). The asset taxes should be applied to all liquid and iliquid assets one might have. Be it land, buildings, shares of C-corps, domestic or foreign, bank accounts, gold diamonds, or commodities... The tax can be 1.25% annually, like the property tax (in his view we should be taxed more..)
C-Corporations should become pass through entities - C-corporations are not people and should not be taxed.
So when a company like Apple becomes huge its profits aren't taxed, neither its cash reserves. However, the shareholders of Apple are taxed and as their equity becomes bigger their taxes become bigger. Ideally unlike property taxes these taxes are like income,  a retiree owning a few shares will have to deal with a much lower tax rate than a billionaire.
Ah, and one last thing, Warren Buffet is old money. He is arguing for a bigger income tax rate when he is sitting on a 200B asset on which he doesn't pay taxes for: any large corporation today is creating a (rather expensive for small/medium business legal) scheme that allows it to report consolidated multiational profits even though within US they report no profits or losses. Profits are being report within sub-entities whose country of incorporation is a tax-heaven, ie doesn't cause significant corporate income tax and has no retained earnings tax, The company cannot bring its earnings back.... but is immune from the retained earnings taxation (like Apple who got a loan (using its foreign cash hoard as a collateral) to pay dividends, without having to bring the cash home, hoping for a tax law change in the future...).

One last thing I didn't discuss with him:

In his model, I can have a large company who I control through a small class of high voting power shares. That makes my net-worth small, (all shares are "owning" the future cash flows/profits equally) even though it retains my power.  Of course in a correct world, the price for the special shares that the google or facebook founders hold should be much bigger and not the same as the common share... Hm...

Friday, May 3, 2013

Bottom up vs top down

I have been having this argument with my friend gl. I have been telling him that he is not a true believer to cool-aid we have been drinking lately around small modules, reusable components in nodejs etc.
Yesterday he told me rather proud that he actually followed the model and published his first npm module.
I think that the difference of believes exists and understanding it is important.
GL is the hugest proponent of incremental design. Being a hci person he always wants to have an version of the end product no matter how primitive. I would call this iterative top down development.
His first version is almsot always  a simple hello world site, still it is displayed in the deployment context of the app, be it mobile web or desktop. He slowly adds minifeatures and so and on. At any point he has visibility of how close or how far he is from the end. At any point he co-workers/clients/mgr can take a look at the early prototype can give feedback or can even use the product.

I on the other side apply the rhetorical question, what services/modules if I had would make the building of my app trivial (substack's slogan). I am asking this question recursively, trying to force myself to avoid depth-first-search descent and do more of a BFS, as I go down trying to implement the next module I would need, re-asking the same question.. 

The result of the two paths (he does better than I do) may be reflecting more the difference in programming/focusing skills than a true advantage in one or the other methodology. The truth however,   is that gl will be writing little custom plugs that would slowly get some more meat and bones.. and then often he has written something that may already exist in some similar form. With his methodology publishing modules is an after the fact exercise... this thing I used I could make it more generic and publish it.

The negative of the methodology I follow are obvious. Starting building my app bottoms up, from its components, I cannot have a good idea of either how much effort/time is still needed. I also find myself too often falling into recursive black holes... as one particular component that I start building becomes so important that it ends up becoming my priority 1 for many many days..

I am not sure what exactly is the right balance here. How I can reap gl's advantages but still be true to the substack slogan...

Thursday, May 2, 2013

Work notes - new lessons from last HS/GH experiment

The last and greatest HS/GH experiment is still undergoing but there are already lots of learnings:

The experiment involved OD sourcing issues 3,4 and 5 of the boxchareditor repo. 
The experiment is the biggest i have ran so far in terms of size/budget/expected amount of work.

New elements in the experiment:
1. Test Validation (node-tap based)
2. Coverage Validation (node-cover based)
3. Code practices Validation (jshint based)
4. Task Dependencies

The test is still ongoing - but the first Issue has been successful with 20 hrs turnaround time from post to pull request acceptance.

None of the 1,2,3 were automated. The way that acceptance test was done by me cloning locally the developers fork and running

> cd /tmp;rm -rf boxchareditor; hub clone GulinSS/boxchareditor; cd boxchareditor;npm install;make

Make would run the tests, the coverage report, and lint and essentially prdocuce an error if any of the 1,2,3 validations were to fail.

The contractor applied to the job within 1hr from job post and immediately got hired.
It is interesting to point out that even though I invited past successful project hires the applicant responded faster. By the time I hire him he had gone to bed. He started working ~ 8hrs after job post.
Came back for syncing 15 hrs later - and from that point on we had an occassional back and forth
every hour or two initially in the issue comments and then on skype.

Interesting conclusions:
- Even though it is absolutely meaningful and productive to capture in written documentation, instructions every element that may be a recurring question from a contributor, still  ongoing interaction, (eg, communication guidance iterative review ) between the two parties are things that are normal and should be happening as part of a task. This may appear against the more pure idea of HS - which involved complete operational instructions and no communication besides the acceptance phase but I think it is a necessary compromise.

The contractor in this case
a) suggested to refactor the code following a significantly better architecture
b) the contractor suggest to unify some of the follow up tasks - given the new refactoring.
c) the refactoring exposed later a difference in the actual end user behavior of the system 
All of these made sense, all of these required interaction. The system ended up better as a result of these interactions. Overall I spend approximately 1hr in these interactions - while my estimate is that the developer spent > 10hrs developing them. 
I had to spend another 1hr in preparing the issue of which approx 20 minutes were the mechanical aspects that are being automated by gl.
Still, the leverage I obtained was very impressive.

Issues 3 and 4 were dependent on 2. This implied a few changes in the flow:
 - Jobs for issues 3 and 4 were created as private (awaiting the completion of Issue 2)
 - My plan was/is to make the dependent job available (ie invite) to the depending job's contractor and only if they were to reject it make it public.
 - The language in the template was updated to explain that successful hire would get first dibs to the dependent jobs as well.

It is interesting to note that the successful developer didn't have time to do features 3 and 4 showing again the importance of the global liquidity and the difficulty in relying in a preset pool of folks.