Saturday, September 17, 2011

Why node.js? And Why not?

I've been thinking about this recently as I've been coming down from my node.js high (which fluctuates depending on my mood).

The node.js high is the thrill of two dreams colliding in an orgy of programming goodness (1) sharing code between client and server in a meaningful way and (2) a opinionated stance on IO without threads.

Sharing is caring
For those among us that have dealt with the web, it is very frustrated to have to replicate some business logic and templates between the front-end and the back-end. We have to do this to deliver the best possible customer experience. I've spent a lot of time trying to figure how to make good "write once" Ajax solutions. If you go 100% Ajax, then you fuck up SEO. If you go 100% Back-end, then you realize a less than ideal user experience. If the programming the language is the same down to how data is validated, transformed, and rendered, then the back-end and front-end can share a great deal of business critical code. I believe in the possibility to deliver a 100% "SEO" friendly and Awesome user experience.

I feel this current division between SEO (what most businesses needs to thrive) and UX (what makes it easier and fluid to use) is difficult to execute on. This is where the general idea of "Server Side JavaScript" delivers some very interesting ideas and potential. While I haven't seen the best platform yet, there is an opportunity to wow us.

Threads are Hard
I like multi-threaded programming for the intellectual challenges it poses, but I feel like they are mostly a waste for a single core. A single CPU can be much better managed the way node.js does it with an event loop (or you can use libev or libevent like a real programmer, yes, yes). Once you get to multi-cores thou, you a really talking about a distributed algorithm. The same intellectual challenges found in multi-threaded programming are isomorphic to those found in distributed algorithms (just with higher latency).

Hard is bad. I like hard because I'm that nerd in math class that does math problems for fun. Most people want to go home to their kids, play a video, and then get laid after eating a sandwich.  I go home to do math (which baffles my wife).

So, anything that keeps threads away and those hard problems are bay can be seen as nice. I'll be honest, node.js delivers well on this front. I've done some very impressive things with node.js that would make me shutter with threads, and then I load test it; it makes me happy. Out of the box, I get a nice way to express data flow with continuations. It's awesome. No race conditions (unless I'm doing something distributed), No deadlocks, No locks. It just works.

node.js feels like an Apple product.

Coming Down from the High
JavaScript was not designed for enterprise servers. I'll address this on two fronts, and I'll skip the 1.9GB limit because that's just a detail that real programmers can fix and then submit a patch.

The first front is that continuation passing of things that may leak has no safety in terms of releasing resources. If I intend to perform some IO and expect the function to hand off control to the continuation I pass, then I would like a guarantee that the continuation is going to be called.

This is a huge hole. Code written in node.js has to trust node.js 100% since that code surrenders its own control flow. Instead of crashing, node.js can silently hang customers which is not good at all. Having experience this issue more than once, building on node.js now feels like building on sand. Sure, I can go and fix the platform, but it feels like adding duct tape. I'm not sure if trusting node.js 100% is harder than threads or not.

The second front is type safety. I'll give some background about myself. I started in C which I'd call "moderately typed" because you do stupid things all the type. Then I moved up to C++ which was a little bit better. Then I did a bit of Java, and hated it. Then tried C# 1.0, it was OK. Then I did OCaml, and I loved it. I dabbled in Erlang, skipped it (it didn't make me happy). Did a bunch of C# 3.0+, and I loved it. Did tons of PHP and JavaScript, it was ok.Wrote some ruby junk, it didn't make me happy. I fell in love with Lisp and building things with AST. I found myself content with JavaScript, and I was riding the node.js high. Now I work in Java, and my side-projects are a combination of Java and JavaScript. node.js is my new Perl, and I love it for that. I'd prefer C#, but I don't want to spend $ for Visual Studio nor do I want to do C# without an IDE.

Having given the litany of my past, I have no investment in either static typing or dynamic typing. Either are fine. However, type safety is very important to me these days. I want to use type safety as way of expressing  both the ways things should work and the ways things misbehave. Things misbehave all the time for valid reasons.

I hate the way Java's try/catch let forces you do a bunch of silly things, but I love the idea that I can use it force myself and others to make sure they considered every case. I hate null because it lets you fuck up so much up. This is one reason I love OCaml's union types. I don't have to program with null. I can give every output of my function a meaningful value that forces the consumer to deal with. I've considered resurrecting my node.ocaml project to work on this, but I'd need to write a highly durable IO story for some of my work which I don't really want to do yet.

Future
There are a bunch of reasons I want to create yet another programming language, mix the things I want in OCaml, make it asynchronous so it compiles to finite state machines, remove null, make it easy to deal with error, make it pretty, add control structures for handling failure, build a better type system, better control over the heap, hook it up to the cloud, make deployment painless.

The problem with the directions I want to go is that the advances I want are marginally useful and expensive in the grand scheme of things. The things I want are better, but we live in a world which values "worse is better". When I put on the business man hat, then I agree with this statement. When I put on my academic beautiful code hat, then this statement makes me want to go into my cave and be a hermit.

node.js is worse, but that makes it better. The problems I have now will be patched. After enough investment, people will consider it reliable. People will build reliable libraries. Yet, I want to build stuff and not the platform anymore. While node.js is my new perl replacement (and it's fucking awesome at that), doing hard-core server side stuff for me is going on the back-burner.

But I wonder, are the gains there real or marginal? I don't know. I do know that node.js (like ruby was) is a risk that could either pay off big (as ruby has) or fizzle out. It depends on you.

Saturday, September 10, 2011

Why No OCaml?

I just saw Kevin Murphy's "Why OCaml?" appear on Hacker News, so I'd thought I'd provide some counter-points to the nine year old article.

Popularity: I can't hire people to build stuff with OCaml, nor are there many non-finance jobs that pay decent enough to work with OCaml. Besides, JavaScript is kind of sexy and Java is getting closures.

Type Checking: Java has type checking too, and at the same level of rigor. Java doesn't have the fancy polymorphic type inference thou. I'll be honest, I'm a type inference monkey; I love it. But, after a year, the code is very difficult to read without a bunch of documention to explain what the fuck each thing is. Ok, great, so I don't mind having type annotations. I love C#'s var syntax (didn't Java 7 get this?).

Compilers: OCaml's compiler is way out of date. Multicore support is lacking. There were some memory limit issues (if I recall).

Speed: According to the shootout, OCaml is losing to Java. This makes me sad as I was a Java hater. It looks like we live in a C/Java world. I do find the shootout results interesting for Java. This makes me sad because I was invested in OCaml for about a week as I worked night and day on node.ocaml.

Syntax: I'm older, and more mature now. Now, I like my code to be a bit more verbose and less conflated. I like the idea of having a syntax that makes things a bit over-ly verbose now. This is both because I'm older and need to get things done rather than reverse engineer the syntax, and I need new engineers to get up to speed faster.

Technology - Keeping poor people poor

Technology makes us better (mostly).

It's a simple promise. Someone is going to innovate and solve a problem or optimize an existing problem. This process creates wealth, but it also creates a poverty.

Let's consider the case of the baker. A baker would mix, kneed, and bake bread. Let's say the price of bread costs one bitcoin and it takes one hour to bake a loaf of bread. The baker has 10 families to feed with their oven. Everyday, the baker gets up and prepares bread in an hour and then loafs around for ten hours to exchange loafs and interact with customers. Each family gets their bread and pays one bitcoin. Now the baker traded ten bit coins for eleven hours of his time. This is good revenue that enables his family to live well in the cottage down the street.

This lasts about ten years until those families have double. Now, there are twenty families. He doesn't want to spend twenty hours loafing about to bake bread. He has the decision: innovate or expand. He is rather primitive and hires an assistant who then takes over the night shift. Eventually, the assistant gets pissed off about his less than fair wages and then builds his own bakery. Now, the society has two bakers. Years pass again, now there are fourty families. Each baker is stressed and tries the same thing, and the cycle repeats until there are four bakers.

Now, someone invents a high capacity oven that can bake four loafs per hour. It's a innovation that changes the world. These bakers have a choice since there is more bread than what is needed. The families know of the same innovation and now expect a lower price from the bakers because they are not working as hard. So, they lower the price to half a bitcoin. In lowering the price, they have to increase their volume to maintain their life style. Now, there is competition. Now, location, quality, selection, branding, and other ways to differentiate become a part of equation.

So, location is the key differentiation. Now to get bread, most families go to the original baker since he is at the heart of the town where most work is. Those other bakers? Well, they are fucked. Now they are unemployed in a useless profession until the families spawn more. Some of them try to work for the original baker who is now dominating the entire market. Each of them know that they can be replaced, so the market losers try to win in the new job market. The baker can't hire everybody, and why should he? Two people working half as hard as they used to satisify the same demand. The employee baker is now making more money what he was making (although not as much as the boss employee) and he is doing less work; he is happy. The other bakers are out in the cold.

Now, these bakers out in the cold either have to survive the "baker" recession which lasts until the next generation of families pop up. By then, the market mover can hire them as employees. But, it doesn't end as an eight capacity oven comes out just as the families are appearing.

This is the story we have.

Lessons.

Technology has the prime directive of making our life better in some way, shape, or form. This has the unfortunate consequence of requiring people to be agile to change. We invent stuff, and sometimes, it changes how we work enough to the point where we are more productive with less of our most precious resource: time.

If you want to be successful, then be prepared for and anticipate change. I live every day like a super computer is going to do my job tomorrow, and I love it. I'd much rather be camping.

We should want to be lazy, sitting on a beach, camping in the forest, climbing a mountain, playing chess. We should want these things. Some of us spend so much damn time trying to innovate and put ourselves out of a job that we forget to do the things we are working hard to achieve.

Course Correction

I'm a huge fan of education, and I love to learn. I'm a fan of any government program to try to take unemployed people and make them useful in other contexts.

I'd vote for something that reduced the work week from 40 hours to 32 hours yet required the same pay. I know some 40 hour jobs can be done in 4.

Poor people, by definition, can't change into the roles needed by magic. College is expensive. Computers cost money. Government training programs suck and only prepare people for 1-2 years until the next innovation makes them useless.

I'd be in favor of sacking a lot of wealthy finance people since I believe they did steal of a bunch of fucking money with stupid rules. I have yet to see how an excel spreadsheet could turn into a robot to do my dishes.

Friday, September 2, 2011

Intersecting Lines (The Art of Representing Data)

So, Atwood's Law. Yes, I'm thinking about writing a very light weight computational geometry library in JavaScript. I'm purposely going to target 2D computational geometry because (a) it is 'easier', (b) it can be more readily understood. So, I'm about to start work on the "kernel". I'm about to define a "line".

Well, how do I do that?

If I go back to what I taught college algebra students, then a line is

y = m x + b

Ah, yes, intercept-slope form. Beyond the fact that this is a very easy representation of a line, it is very fucking useless. Why? You can't express vertical lines. Let's look at another version

(y - y0) = (x - x0) m

Oh, yes, still useless. Can't express vertical lines. Ok, Ok. Back up, college algebra was apparently a waste of time since it didn't give a meaningful definition of line. Somewhere, probably graduate school, I realized a line a equivalence relationship of some sort. Aha, yes, a general form to a line.

a x + b y + c = 0

This is way better as I have a complete representation of a line. Yay! Ok, so, let's use it. I can take two of these bastards and solve the system of two unknowns. Ok, what happens when there is no solution?... uh, they are parallel and don't intersect. Ok, so, yes, I find the point at which they intersect. Is this useful? Well, it could be, but I've lost information. Let's look at this equation in vector form.

N (x - x0) = 0

This would be the normal-i-can't-remember-name-but-similiar-to-plane-equation form. This is a nice and cute representation, but it gives be a really poor way to intersect lines naturally. It has a beautiful explaination thou, basically, the line is a collection of all vectors that are orthogonal to to the normal (when translated to the origin). While this is a useless computational representation, it does tell us something useful about the general form. Namely, N = (a,b); isn't that nice.

So far, the general form has given us the most bang for our buck. However, it still sucks since this general form is a compressed representation of a line that enables me to (a) check to see if a point is in the line, (b) find more points in the line, (c) find a line that is perpendicular to it. In the platonic world, this set is awesome. However, the real world tend to suck and lines start somewhere. So, let's go back to that vector stuff and consider (briefly) an Affine linear combination.

L(k) = k * P1 + (1 - k) * P2

Is this a line? Well, it only has one variable and it has at least two points. Well, as cute and as insightful as this is; it is still useless. Too many operations.

L(t) = P0 + D t

This is what I am going to go with. I know where the line starts! I know which direction it is going! It is very easy to intersect two lines! It's easy to compute the normal of the line (use complex numbers to rotate D)! It is trivial to compute new points in the line! As an added bonus, I get rays and segments for free by trapping t in a one dimensional box. Yay!

Moral of the Story

There are many ways to represent the same or very similar data. The one you learned first was probably not the best.

Having been alive for a while, I've learned to try to think ahead of time to find the right representation for the data. That is, after-all, 90% of computing. If spend a bunch of your time writing algorithms, then you are probably doing something wrong.

Am I making the right decision? Not sure. See, now that I've decided which numbers to actually store. I now need to pick between an object, an array, or a composition of arrays. I'll benchmark that since that is part of the core, and it will affect both the performance, readability, and beauty of the code.

Final Decision: going with readability and the 3rd representation even thou it costs double the CPU cycles. Although, I am impressed with how fast JavaScript is.

Sunday, August 21, 2011

Using node.js as my Microsoft Word (+Bonjour)

I love the fact that node.js works on windows.

It's super duper cool.

I wrote yet another markdown processor this weekend as I was kinda out of range of internet to go and import one. I'll fix that later since my version is very weak. I also got a new computer, and I'm doing things a bit different. This should give me an opportunity to solve old problems using new technology.

The first one is printing files between operating systems. My wife has a printer, and I don't. I could solve my problem by buying a wireless printer, installing bonjour, or a USB stick. I'm too lazy for a USB stick, and I don't print enough to justify a wireless printer. The idea of installing bonjour makes me sick (why, I don't know). So, I made marp.

Marp is simply put an HTTP server + markdown + a template. That's it. But, now I can print from my wife's machine by walking to it. This is kinda sucky, but it solves my problem to the point where I am happy.

After spending two hours debugging and getting the markdown + template to where I wanted it for the first version, I hooked it up to node.js and a couple of path handlers, and I was done. I have a thing.

This is why I love programming. When I have problems, I can solve them.

This is also why I love the potential that is node.js. I can throw things together really fast that do really powerful things (I would call making a custom http server that resides in one file a powerful thing). The language isn't too terrible. The velocity I get is terrific. I can hammer simple things out really quick. The concurrency model is very easy to understand, so I don't have the typical race conditions that I would with threads. I can poop little products (that perform well) out very quickly, so I can iterate.

I am nervous about doing bigger things with it, but I'm optimistic that the node.js community will figure that stuff out.

Saturday, August 20, 2011

New computer, No Microsoft Office Needed

So, I've put together and have a new gaming rig/development machine for home. I'm getting up my linux VM now so I can do the real work (Only need Windows for steam and the volume of game choices, alas, I'm a gamer hooked onto Windows like a damn crack baby).

Office Freedom
I neither need nor want Microsoft Office. Yes, I am working on a book. No, I don't need office. I'm using Markdown inside of Notepad++. Thank the heavens I no longer need power point, and if I do, then I'll probably be dead already and burning in the 5th level of hell. I'll be honest, I'm a bit sad about excel. I'll get over it. BUT, we do have node.js for windows now. This, combined with some CSV trickery will serve me very well. The idea of having a cross-platform scripting language that doesn't suck, has closures, and is network ready it very exciting.

Development Freedom
I don't need Visual Studio anymore since I have no desire to touch C#. It is, in my opinion, toxic for my health. My language at work is Java, but when I come home: OCaml or JavaScript. Now that node.js works on windows, I'll be able to do some very cool shit and have confidence that if my work pans out, I could actually sell it.

The "Cloud" and my d:\ Drive
Basically, instead of migrating hard-drives and what-not to the new machine or using the network. I'm migrating all my stuff to a USB drive and S3. All my day to day stuff will be in Dropbox, and I'm working on my sync protocol now to mirror the USB drive to S3. It will be very pretty. So, this handles my data.

Data + Tools + Writing Tools = I Win!
What else do I need? Not much, I do say that I'm impressed with Windows 7 as a platform (although I don't want to develop for it anymore). Out of the box, it is pretty and not bad. I haven't had to fix the machine or anything. All the drivers worked. I'm glad I don't have to install a bunch of shit, and I don't want too. I'm only using Windows for games, and I'm getting really good performance in VirtualBox (even with the 2600K).

Happy, Happy, Joy, Joy

Thursday, August 11, 2011

New Computer Ordered

Ever since getting a woman, I've hardly spent anything on myself... hrmm. Anyway, today I fixed that and ordered a new computer. Why? because my current computer is dying like a thug.




  • Corsair CC800DW Obsidian 800D Black Aluminum Full Tower ATX Enthusiast Case
  • ASUS LGA 1155 SATA 6Gbps USB 3.0 Supported Intel Z68 ATX DDR3 2400 Motherboards P8Z68-V PRO
  • Intel Core i7-2600K Processor 3.4GHz 8 MB Cache Socket LGA1155
  • Corsair Vengeance Blu 16 GB PC3-12800 1600mHz DDR3 240-Pin SDRAM Dual Channel Memory Kit
  • Western Digital 300 GB VelociRaptor SATA 3 Gb/s 10,000 RPM 16 MB Cache
  • Noctua 6 Dual Heatpipe with 140mm/120mm Dual SSO Bearing Fans CPU Cooler NH-D14
  • Corsair Professional Series Gold High-Performance 850-Watt Power Supply
  • EVGA 03G-P3-1584-AR GeForce GTX 580 3072MB GDDR5 PCB PCI-Express 2.0 Graphics Card
  • Windows 7 Professional SP1 64bit

Saturday, July 16, 2011

Why Silicon Valley needs more money than NYC; wealth of a nation

Historically, before computers, I think Wall Street served a good purpose. It's ultimate goal was to make sure that great people who could transform the world had the resources needed to do so. The need to coordinate money into the hands of people who can use that money to create wealth is still needed. It's why the world needs investors. However, do we need Wall Street? Do we need the exchanges? Do we need Goldman Sachs?

These are fundamental questions. I don't know the answer, but I'm willing to bet the answer will converge to "No".

I think there is an opportunity for silicon valley to disrupt wall street.

I view wall street in aggregate as corrupt these days because it isn't about creating wealth; it's about managing and optimising money. Money is not wealth. I internally cry a bit when I see a math/computer science major head for NYC to make money. Will they make money? Yes. Will they make wealth for the nation? No.

I'm not really going to defend what I feel. I don't want too. I feel like Silicon valley needs to over-turn Wall street to change the leaders of the country.

We need people who want to make life better for everyone rather than exploit people with complex rules and financial instruments.

I believe we can build a better and brighter future.

The wealth of our nation has been derived from our ability to say "Fuck you nature" not "Let's subordinate most of the country to poverty".

When I look to silicon valley now, I see we are solving communication. This crazy thing called the Internet gives us new tools and new vehicles. I expect us to be able to vote from home. I expect us to remove the computational barriers that forced hierarchy on us. I expect the social web and the Internet to transform us into a culture of a switch rather than a hub.

I expect better out of us.

Why women shouldn't vote! (Men do stupid things)

In reading what is good about men? this early morning due to a bit of insomnia. It was an interesting read.

I'd like to apologize now for the link-bait title. I actually encourage women to vote (even more so now), and I have no problem with whatever feminists do. Also, for brownie points, I took women studies in college; primarily because I was seeking to understand why so women are so sparse in computer science.

In the "What is good about men?", if you take it as an axiom and ask follow-up questions. What are the consequences. What about women and voting? Why have women not had/have a vote? Why have men been against it? Why do men oppress it?

So, I was thinking about that when I was trying to get myself to sleep. It's interesting.

I think I got it. Initially, women didn't want to vote so they were not responsible for the stupid ass decisions the men were taking. That's nice, but why the aggression against it?

Well, I think the story goes like this. We are the children of victors. Once the victory is achieved, the peace settles in. A generation is born in peace and corruption and the conflicts moves inward. This corruption enables weaker men to gain prominence and weaker men need to put people into submission. That's where the differential is introduced.

As to laws and aggression, most people fear change and will fight based on that notion alone. Strong men embrace change because change is different, interesting, contains glory, and fun. Weak men fear change because strong men come out on top.

In any-case, I should return to sleep now. I thank HN for bringing it my attention whilst I desperately try to sneak back into bed.

Saturday, July 9, 2011

Nerd Rage: Bad Controls on iOS devices for games

Like, seriously, state machines are not hard.

Taking a few steps back, I bought a game on the App Store for over $0.99; when I spend more than $0.99, I expect magic and perfection.

When I get a buggy, clunky, and bad user experience, I get angry especially when I paid more than $0.99. Now, I could just sit from my magical armchair of developer perfection and complain, or I could write some crappy code and maybe educate some iOS fools with code. So, I spent 20 minutes to write an HTML5 joystick controller. Here it is world: angry code to do joysticks right.

Put this in your iOS 4 and enjoy the multi-touch-ness: http://ios.jeffrey.io/

Thoughts on good UX for mobile and games:

1. You need to control the event structure and not relegate it to some bounded box model. Bounded boxes are fine for buttons, but for things that need a level of fluidity and engagement, you need to control the entire screen.

2. You need to understand state machines and how to guarantee the absence of a bad state transition. Namely, the controls shouldn't stick nor flip-flop. It should be very simple.

3. You need to understand there are a multitude of thumb sizes.

4. You need to eat your own dog food.

I seriously wish I could get a refund. Argghhh!

The eternal engineering question

Build or Buy?

This question haunts me because if I buy, then I'm not getting exactly what I want and am compromising my wants. If I build, then I risk it being disappointed (and messing up), and worse if its not what I want, then I have to live with the shame and can't complain.

So, I was going to go to Mac

but then I started to look at the price and power of the laptops...



the mac book has same processor, 1/3 of the memory, 1/3 of the HD, smaller screen, 1/3 of the video memory. Argh! So, maybe I'll just build one like codinghorror. Gauh.


Sunday, July 3, 2011

Why writing programming languages is so fun yet so damn hard

I love sitting down on a Sunday day and throwing a parser with some tree manipulation to try to create a new way of expressing computing. However, it's hard.

I'll point out some goals that I think about when I'm in a PL mood.

(1) I hate garbage collection in a non-trivial way. It's stupid. Before you curse me into madness, there are a couple of ways of dealing with it. One, ignore it and have memory leaks. It's not rocket science to manage memory, but it can be a pain in the ass when you try to pass around ownership. Two, kill the heap. This, I've tried and it works; it isn't for the feint of art. Three, have reckless memory manage in contexts that get destroyed and share state via a DB like thing (i.e. Mysql, SQlite, or a DOM). I like Three a lot.

The nice thing about having reckless memory usage with a persistence back-end is that the thing that is reckless can fail. Say, you run out of memory, ok, create, kill the context. Now, from a performance point of view, this approach is strange to say the least. This is why I'm interested in embedding transaction logic into PL for optimization.

I don't have a solution to this as my last big language attempt just used a DB.

(2) Asynchronous is full of win. I'm not a fan of threads (Threads are Hard, m'Kay), and I would like a very easy way to think synchronously yet behave asynchronously. I'd like not to have to pass around closures, nor do I feel like yielding my code with co-rountines. I want something better..

(3) Saving state is fun. My last PL had the ability to zip of a closure, put it in a queue, and then distribute the computation. I'd like to be able to pause the state of the computation and move it between computers. The difficulty here is making it play safe with a persistent data store. See (1)

(4) I don't want to write a VM nor target low level code. My primary target must be C (or C++). I'd like the code to run on the iOS. I'd like it to be vanilla C. I'd very much like it to work in JavaScript. I'd like a real "write once, run anywhere" language that targeted machine code.

(5) I need closures; just because they make my life easy

(6) I like either dynamic types or polymorphic types (ala OCaml)

(7) I like type inference

So today, I made a very basic framework for expressing some of these ideas. I have mental solutions (because I've solved them before) for (3-7), but 1 and 2 are driving me nuts. I know C# has a kinda solution to 2 using co-routines, but's only ok. I want magic.

I want real magical shit in my PL, but magic is hard.

Morning Choice: Video Game or Code

Every weekend, I have a choice.

Do I play a video game? Or code?

Today I choose coding. Videos games are getting old.

And, I'm busting out ocaml because I'm going to try something very hard. I'm going to work on an asynchronous state machine compiler where you write code synchronously that turns into an optimized state machine.

Saturday, July 2, 2011

First Joke of the Morning

I'd like to talk about whole foods

The thing about whole foods is this: you need to read everything. The other day, I wanted some Parmesan cheese. So, I grabbed some at whole foods. It wasn't Parmesan. It involved sheep milk, and I was not amused. My hamburger helper like meal tasted like feet.

Comedy

Delivery is very hard, so I've written jokes that are hilarious. Well, to me at least.

One is based on a very funny yet embarrassing experience from my child-hood. In a casual setting, telling people makes them LOLz. However, trying to stand up and tell it to people. Woah, that's hard. Well, its hard for me because I'm a hard-core introvert that lives in my own fantasy world. Interacting with the outsiders tends to be a messy process. Fortunately, I've learned ways of dealing with it.

For instance, I used to have a deep fear of talking in front of people. So, I taught at college. That beat the fear out of me, and so I can go up and talk in front of people. It's oddly easy when the subject is boring like math, programming, or business.

What about messy and embarrassing past stuff? How do I not crack up during delivery?

Back to comedy: How do i take a personally embarrassing moment in my life and turn it into a deliverable routine?

To the twitter mobile!!!

Update: twitter was a failure. How about quora?

Wealth: the link between Hacker and Hustler

tl;dr;

hackers generate wealth, hustler's turn wealth into money

Longer version:

I was thinking about wealth the other day. How do you define wealth?

I think wealth is best defined by the ability to satisfy your want. If you want something and can't have it, then you are not wealthy (i.e. poor). So, I'm an inventor-hacker, and most of my want is satisfied with some work (except for things like space travel... I'm very space-travel-poor).

What about money?

Now, where does money play into this? When I grew up, my parents fought about money. My dad made it, and my mom spent a lot of it. So, I wanted nothing to do with money, and I put on the hat of the academic monk. I was happy in that role, but then I needed money (due to personal reasons). My personality isn't the type that settles for nickels and dimes when I actually have to go out and earn, so some friends and myself did the cool thing before it was cool. We did a start-up, and we were going to be bigger than Facebook and Texas! Multiplied!!

It was a failure; the next business wasn't a failure. I learned about money, and how to make it.

Money is time. It's someone else's time for doing something that neither you (nor them) want to do. That's the only thing that it is. It's nothing else.

So, if you want money, then you do things people don't want to do (or can't do) (like math), and do it well.

So, back to wealth. Wealth is satisfying want. If you have a lot of money, then you should be able to satisfy your want and be happy. What if your want can't be satisfied by money, yet you have it?
"There is no class so pitiably wretched as that which possesses money and nothing else." - Andrew Carnegie
What do you want? Answering this question is the key to your happiness. If you are a hacker, then the shear act of satisfying your want produces wealth. I've invented things my entire life, and I have to say that makes me very happy. I like making obscure tools for obscure problems. I like optimizing the shit out of the things. I like automating tedious things (because tedious things are bullshit). I oddly enjoy taking some shit ball mess of code and figuring out where it leaks memory. I like to solve problems, and I really-really love math.

The things that I do to satisfy my wants generate wealth.

What about the hustler?

The hustler's job is very straightforward: Transform the wealth that hackers generate into money. Build a nice cave, make the hackers happy on all non-hacking related dimensions, hire more hackers, and hire people to sell the wealth. Build a business that is good at transforming the wealth of your hackers into products for people, and then you win.

Extra credit: what do managers do? They make sure the hackers are producing the right kind of wealth. Tada!

Sunday, June 26, 2011

JSON, JSON, JSON

I love JSON.

I was going to write more than this for this weekend, but I got off topic.

Sunday, June 19, 2011

Pick your Archtype (CEO, Professor/CTO, Humanitarian)

I've tried to reply to Dan Miller's recent post in less than a paragraph, but it just doesn't work. So, here is the longer version.



I think it also depends on how you define success and how you measure the rewards. For instance, playing monopoly or a video game has very low risk, but it has reward. Can you make a living doing it? No. So, you have to do something else. Could you get good at it and have a part-time job mentoring other people in it? Sure.

I highly recommend Dan Pink's book "Drive" (or watch this awesome youtube video) which basically breaks down into three things people want: autonomy, mastery, and purpose.

It is very clear in your article that you are preferring autonomy and being your own trouble maker. Being a full-time entrepreneur is all about autonomy. What about mastery? Well, look to academics. It's not exactly rewarding in a capitalistic sense, but it is very clear how people driven by mastery end up there. What about purpose, this would be the domain of the non-profits.

So, it boils down to this: What is your arch-type?



When you answer this question, your path unfolds. Actually, answering this question is similar to what is your life's goal is probably key to your own sense of happiness.

γνῶθι σεαυτόν (Know thyself)

This is probably the most fundamental and important thing you can do in life. Stop pretending based on what others want or need out of you. Don't listen to others; they are wrong. Be yourself and understand yourself. Understand your strengths and your weaknesses. Maximize your strengths, compensate for your weaknesses. Find humility in your weaknesses. Find confidence in your strengths.

Saturday, June 18, 2011

Part-time Saturday Entrepreneur: Time Management

The first bit of advice would be to not write about time management. This entry is with respect to having a part-time business while maintaining a full-time job. It's also a longer comment to Dan Miller's recent blog post. Dan's my former employer and CEO of RedNova Labs and a great boss, and he has ambitious goals. This entry is about having a part-time business with less ambitious goals.

At any given time, I maintain the details of about 7 to 9 projects in my head with about 20 to 300 ideas on the back-burner. This annoys my wife since I'm always "on", so I try to make sure my wife has a time in the reserve.

So, how does time work into this hectic and crazyness. Well, there are 168 hours in a week. You should sleep for 56 of those hours. You should eat a good lunch and relax for 7 of them. You should eat a good dinner and relax for 7 of them. You should shower for 3 of them. You should take a long bath for 1 of them. You should also probably have about 3 hours of sexy time a week. You can rush your breakfast in about 2. You need to exercise about 9.

This gives 80 hours.

I live in an apartment, so I don't have to maintain a house. Houses cost me time.

I live in the city, so I don't have a long commute. Driving everyday is not for winners, and it is bad for the environment.

I don't have kids nor do I plan to have them.

My wife doesn't work outside the home, so I can have as much time as possible from life. I love having a house-wife! It's awesome.

My life is structured such that I'm not wasting precious time on stupid things that don't add value to my life.

Now, the rub is this. You can't focus all your time in one thing. You will burn out. You need distractions. Your distractions need not be a loss.

Instead, you need to manage your projects and manage your goals. Everyday, make progress.

As long as the progress bar moves towards 100% somewhere, you are winning. Now, you may not find the win you expect. For instance, moving projects forward slowly means they may become irrelevant or uninteresting. But, that doesn't mean the process of moving things forward was a waste of time. I learn things everyday, and I like that. I like to learn. Because of this, my life is in a constant state of win.

For instance, this blog could be considered a waste of time. But, I'm writing words and composing sentences trans-coding my thoughts from my disorganized grey matter. My writing style is developing. This helps my professional activities by improving my communication with others as well as opening up discussion with people. It's helping me express myself in a way that isn't code.

As long as you gain something from an activity, you win. It's as simple as that.

The key to keeping motivating is having the daily option to change your priorities. This is why work can be stressful because you are not in full control of the priorities. Your hobbies should not have priorities except to just try.

This is why my wife's business is not a service business. Service businesses require you to adjust your priorities to the people you are servicing (duh!). Instead, my wife's business is all about content. When the creativity is available, inventory is built. When the creativity is distracted, inventory is going stagnant. I'm looking forward to about a week every summer where I can sell inventory. I can hustle it at pike's place, and that helps me professionally in understanding want. Understanding want is the key to making customers happy.

So, if you want to be a part-time entrepreneur, then make sure the venture is compatible with it. Example part-time ventures: Making video games, writing books, composing songs, making youtube videos, teaching kids, mentoring college graduates, make swords, build a giant robot of death, coaching little-league, doing odds and ins for people, design board games, giving city tours, etc.

Now, the ultimate question is: What makes you happy?

I think this is the ultimate question. Once you answer it for yourself honestly, you can determine the path you really want to be on. How do you make it work for you? That's a different question which I don't have the answer for. I do know that what-ever you do, it at some level needs to make money.

This is the cruel reality of capitalism. At the end of the day, some of your projects need to bear fruit. The things you want to do may not bear fruit. A challenge for the social web is to make it possible so that more and more people can make a living doing things that they want to do. For instance, look at Etsy. It opens up a lot of doors for people that would of had to sit in tents during fairs; now those people can reach a global audience.

This is the challenge for full-time entrepreneur: make me more effective. Make sure I'm spending my precious time producing what makes me happy. Make it easy. Unblock me. Provide me a service that lets me jump over hurdles. Provide me marketing. Provide me sales. Figure that shit out, so I can win!

Part-time Saturday Entrepreneur: Week 1

I did some administrative stuff. Picked a name, got the domain, set up the domain, picked a background color (#E6DFD5), created a slogan, set up a basic landing page, setup and installed google analytics.

I wrote a children's book this morning; this unblocks my wife on the first project.

It has plot broken down into 22 scenes that when printed on two sides of paper should make for a decent sized children's book.

It has a title: "The Robotic Mr. Ducky"

It has a moral: "Errors are ok, you're just human. Don't be perfect. Find Love." (I know, how awesome is that).

So, now that I have the story done, my wife can edit it, illustrate it, compose it. Now, I need a dead-line. Well, one of my dear friend's from high-school is going to have a baby in two months. That sounds like a good dead-line.

All before 8:00 AM.

For the rest of the day, I'm making sure she can actually get to work. Is the desk clean and ready? Are the supplies accessible? Etc.

Friday, June 17, 2011

Part-time Saturday Entrepreneur: Introduction

So, I'm starting my wife's company. My wife is an artist, and she needs an art dealer. This is my hobby. What is your hobby?

All things aside, I want to talk about being an entrepreneur. So, I'm starting a new series. Namely, about being a part-time entrepreneur since I've got a full-time job that's funding my wife's venture.

So, what is my wife's company all about? I don't know, but it involves her turning her hobby into wealth, and my job is to sell it and turn that wealth into money. I've got six hours a week to do it.

Now, as to my writing. What should I write about today before I put on the CEO hat and get shit done for my wife's company tomorrow.

No idea. I have no idea what it means to be an art dealer! Awesome, something new to learn (I could be learning to fly, but my wife will not let me fly...)

Well, the first goal is to get the wife producing and turn on the factory.

Project 1: A children's book.

Seriously, I'm going to have her do a children's book and I'm going to write the content (because I'm an awesome writer as you well know). I'll turn off the cursing.

Once I get this as rough product, I'll buy illustrator.

I've never produced a children's book before, so what do I need to do? How do I promote it? The nice thing is that there are a lot of parents out there, so there is a market. I can sell copies at Pike Place market, but I fear that will fail. I could involve pike place market in the scenery (TODO: research the copyright of the "Public Market" sign). Now, I'm fairly sure I can get production going. However, sitting on inventory kind of sucks.

Ok, Ok, I'll hold off until tomorrow.

Sunday, June 12, 2011

The sucky thing about being a CTO (or C*O)

Your voice is representative of your company as you are in charge of the ship.

This is one reasons I left Kansas and my stewardship of a small company.

So, you can't write about religion in a controversial way. You can't be a atheist/agnostic in the mid-west and expect to have customers. You can't talk about the richness of human sexuality and represent a company in the mid-west. You can't raise money while wearing a death-metal t-shirt. You definitely can't wear pink and be happy at the same time.

Small business C*O have to conform to their environment. This is why I think liberal cities have much more successful entrepreneurial environments. If there is a strong gay presence, then I guarantee you can get away with a lot more things than in a conservative city. The attitude to fight for who you are is the same thing you need to build a company, so I think the correlation stands.

There are things that I want to fight for; I want to fight for gay rights, freedom, women's rights, and other noble things. The engineer in me wants the world to be better. It's in my blood as an American to fight. The problem is fundamentally, I'm not willing to let other people suffer for my fight. Maybe I'm a pussy? No, I think it is sensible. There is no point in recruiting people that don't share your fight.

The fundamental problem of the C*O is that the professional (market norm) and personal (social norm) roles in life are conflated due to PR, secret nature, and stupid human politics.

My favourite and all-time hero is George Carlin. You can not be like George Carlin and be a C*O (in the mid-west). If your company has a global foot-print, then you have to be careful. You have to be neutral.

Neutral is boring.

Neutral is death.

I want to live, so that means I have to experience life. Last Wednesday, I crashed #MozParty to spend time with a old friend. Today, I'm going to goth like bar that I've never been into to listen to music I've never listened too before.

So, I'm having a lot of fun in Seattle. I'm happy, and I can be my plucky self and share it with you. I like that.

Geek Hypervisor Mode; staying sane in the insane world

I call being a professional "geek hyper-visor mode". Namely, it is where you put you wants and personality aside to get the job done and work effectively.

What does this mean?

It means your religion of OS, programming language, library, framework are all out of context.

It means your design philosophy is aligned to what the team can execute on.

It means your goals are aligned with the companies goals.

It means you pick up new tools in your arsenal to #win.

It means exercising good judgement.

Unwind.

The fundamental problem of hyper-visor mode is that it can wind you up.

The wife helps.

Side projects help.

Comedy helps a lot.

Writing helps.

Cursing, oh, cursing lots helps. Fuck yeah!

Why I just give up on Linux Desktop

I've been an advocate for computation in general for the majority of my life. I have no real preference for either Apple, Microsoft, Google, or open source derived products. I measure products on their own merits.

For servers, computation, scalability, performance, expressiveness. Linux wins by far. This makes a great deal of sense when you consider the market. The Linux market is by developers for developers.

For enterprise-y shit like Outlook and Exchange, I'll trust Microsoft hands down compared to an advertising company (Why I use Google Apps for personal stuff? Well, ..., I'm lazy and cheap).

For finding shit, I can trust google.

For my phone, I love the iPhone since it is best product on the market that addresses my needs. Android? LOLz. Maybe... that depends on iPhone fucking up their momentum or another company building something that makes people happier than the cracked out iPhone.

Now, for a majority of my life, I've used both Microsoft Windows and Linux as my primary operating systems for Desktop. I give up on Linux in the Desktop, and while I like it for developing... It will probably never by my primary one at home. Why? I'm old now. I have things to do. I want my shit to work out of the box. It's just that simple. I don't want to tweak my usb wifi stick to work; I just want to plug it in and have it work with out me configuring a bunch of shit.

So, I'm abandoning Linux on the desktop since I primarily just have a ridiculously number of terminal screens open. Do I need an OS for that?

Besides, with all the cloud shit that people are producing, does the OS really matter anymore? I have been meaning to checkout a chromebook...

Now, let me think about Windows? do I want to live in the Windows world? FUCK NO. Windows is great for two things: Outlook and Video Games (I would say Visual Studio, but I don't drink that kool-aid any more).

Now, having seen the WDDC key-note, I have to say: Lion + iCloud = win. If all I need is Internet, then I'm golden. It should work out of the box without problems. For my consumer needs, I'm good.

So, that just leaves me with Games. While some of my favourite games are available on the Mac, I find myself leary of jumping the boat entirely. Maybe I should. I don't have time to play all my games anyway. Maybe this is the part where I grow up, and stop playing games entirely? Some weeks go by these days, and I don't touch a game at all.

OK, let's do a systems check on the games I'd probably sell a kidney for: I have a 360. Ok, so I'll be able to play Mass Effect 3. Diablo 3 will run on Mac. Ok, so far good. Portal 2? Check. Combine that with iPhone/iPad, and I should be set. If not, then I can use that bootcamp shit with one of my Window 7 dvds.

Ok, so I've decided. my next computer is going to be a mac. Now, should I get a laptop or a big ass machine? Hrmm... well, my ego and male obsession with bigger points me to the big 12 core bastard. Now, my wife would want one too. So, I have to be willing to get two of them.. Maybe not since that would heat up my apartment like crazy. So, let's plan on getting a laptop.

Sunday, June 5, 2011

Going old School; first epic walk in seattle

So, I like to walk. One idea I had which would be cool for runkeeper to do is to have fitness achievements based on GPS. Like, walk from A to B and explore the city. It could be a lucrative business for dense city markets.

Anyway, I was getting into the loop of "Oh, I should build that and turn it into a product" rather than walking. Instead, I'm going old-school. I'm going to use the printer and use a pen.

So, I'm looking at this map.

Then using gmap-pedometer, I plot out my course. Once I complete a few of these, I'll give my thoughts on it as a service.

Update. I failed at my original course, and I made a new one in real-time. It's even more epic. I did ~10 miles.

Booyah.

I'll post a few pics in a bit after my legs recover.

The secret to "Ideas are easy"

Once you get experience, you will have ideas.

Once you are present in the moment and see problems, you will have plenty of ideas.

Once you have problems, you will have ideas.

Are they good? marketable? Can you execute on them? What makes an idea good?

These are the hard questions that I struggle with because I'm interested in many things. I like puzzles. Puzzles are like mental sex.

Saturday, June 4, 2011

On College, UnCollege, and Why you should get a math degree

I think about education because I believe that education is powerful ... if effective. I feel that most of a person's college education is ineffective toward producing skills needed for the future (afterall, we can't predict the future). I was reading about UnCollege, and generally I accept the premise.

A majority of students that go to the majority of colleges are not getting a good education; they are paying people to teach them shit that isn't relevant to the future. They are paying people to deem them worthy as a cog.

Is college a waste of time? No. If you love learning, then you can learn things from brilliant people. This is why graduate school is so awesome. However, here in lies the con game. Smart and brilliant people realised that the majority of people don't like to learn, most people just want to have a good job so they do whatever it is that makes them happy (typically: sex, drugs, kids). So, the academics tell industry that college will make your workers better, and industry introduced it as a requirement.

This turns most of the college experience for those that don't love learning into a marathon. If you complete it, then you are worth hiring.

The sucky thing is that this inflates the number of gear-check courses which tend to not be interesting to smart brilliant people since they can master the material fairly quickly. There were a number of courses in my past where I showed up just for the tests and got As. Why was I paying for that? Well, that's a gear-check course for "normal" people.

Math

I love math. The majority of undergraduate math classes are gear-checks for engineering students. However, they are interesting enough to brilliant people. If you want to be brilliant, then surround yourself with brilliant people. Once you get past differential equations, you will be immersed in a new level of mathematics that will surprise you. It isn't a gear check anymore, it's fun stuff that is centered around learning.

For me, I found the math program to be an oasis of smart people doing clever things. It's an oasis because it's hard, and this means the supply is limited to those that have the love of learning.

So, if you go the college route and you are smart, then you should do a math degree.

Hackers

Problematically, good hackers don't have time to deal with the bullshit gear-check courses. They need to hack and get high off their brain. I'll be honest, I can do more and get more with a enthusiastic hacker with a GED than I can with a freshly minted CS graduate that started programming as a freshmen.

I've been exploring this problem, and I have my name picked out (and it's cool). Now, I'm trying to figure out the strategy and how to make it successful. I hope UnCollege will solve this niche because I know the war for talent is waging on now, but if we want to get more talent, then we need to invest in innovative ways of training people (namely by providing opportunities to learn effectively) well in-lieu of stupid bullshit gear-check courses.

What I want

I want a cheaper alternative to College that increases the supply of quality talent that is marketable. The more talent we can produce that's easier to hire means the more cool shit we humans can do.

Sunday, May 29, 2011

Gas + Commute = Bad: Before and After the move to Seattle

On March 21st, I left Overland Park, KS where I was driving an hour a day to work. Coming to Seattle, I wanted to live close to work, so I do. I can walk to work in less than 10 minutes. If I hustle, then it can be done in five minutes. I don't even need a bus. I'd like to share some numbers from my mint.com regarding gas usage.

January$363
February$402
March$293
April$39
May$0

The gas tank will be empty on June 1st, so I put $40 in it. I expect that to last until the end of june (at least). The only reason I have been driving recently has been due to my wife's check ups for her broken ankle. Beyond that, we can live in harmony without a car. Which is good because traffic in Seattle can suck it hard.

Now, you may be thinking, but I like saving the money by living in the burbs. OK, great. But, I get to have that smug feeling that I'm better than you because I don't use gas. That's way better. That combined with my wife's obsession to recycle means we are a green family with our heads planted firmly up our asses. It's awesome.

Saturday, May 28, 2011

Business for Programmers: Marketing Yourself with 10 steps

The nice thing about being in a start-up is that you work with marketers and salesmen close, and I had the pleasure of working with a fantastic marketer and superb salesmen. So, you may be wondering why a programmer needs to know anything about marketing?

Well, that's a good question. If you look at a business, then it breaks down into doing these four tasks:

Build Thing: Make a product/Offer a skill to service
Market: Find people that like said thing
Sell: Get money for said thing
Support: Make sure said thing survives customers

That's basically the entire understanding you need to understand business. If you can write a business plan in a page that addresses these four things, then you can build a business.

As a programmer, you are a business; ignorance of basic business fundamentals will own you in the future. You go to school or hack your projects out, and this will build your skill at building things. However, if you build something and no one uses it, then did you build anything?

Step 1: Have skills that fit the market
Do you have skills that you can market to companies? You need to have skills, and your product needs to fit the market. If you know COBOL, then you may want to upgrade to Java/.NET. If you know OCaml, then you may want to downgrade to Java/.NET. Learn PHP or Perl since it is a plague on web programming.

Step 2: Find a passion, pick you destiny
You need to be passionate about something, and you need to have an interest in computing. If you don't have passion, then you are not going to be a good product. This guide isn't going to be much help without passion. While you may be passionate about computing in general, you need to decide on one to build a career on. If you want to be a generalist, then you can free-lance or be a technical co-founder. If you want to be a specialist, then you need to find a company that needs that specialty.

Step 3: Join/start an open source project centered around your passion
Just get involved in the community or try to build your own. (a) it will help you network, (b) it will communicate your passions. Everyday, you need to be writing code on something.

Step 4: Have a github account
Make good code, and share it. I'll be honest, your resume compared to github is shit. Get something good on github that is tasty. Now, get 10 followers. Pick code to share is similar to the code you could stand writing for the rest of your life.

Step 5: Dedicate time to stackoverflow/quora/forums/linkedin/reddit
Make an effort to contribute/lurk every week. Scouring these sites gives you an idea about the entire market in two ways. It gives you an idea of your competition, and it gives you an idea about the current market conditions. Any site that clusters programmers is worth paying attention too.

Step 6: Build Karma on HN
If you don't have an HN account and consider yourself a hacker, then shame on you. You must be living in the cave. I get it; caves are fun. Now get an HN account and start contributing. Don't interject until you know you can add value to the conversation.

Step 7: Get over rejection
There is a new thing called rejection therapy, and I recommend it. I recommend buying some products and trying to sell it door to door, and you will understand the nature of sales. Understanding the nature of sales is critical to understanding the importance of marketing. You need volume.

Step 8: See the world as risk/reward and take bets.
Look at the newfangled shit that comes out of the industry. I remember betting badly against ruby due to it being stupid dynamically typed shit pie. I didn't take the risk on Ruby, and I lost out on the reward. There's a new thing now called node.js; is it worth the bet? I don't know, you decide.

Step 9: Put yourself in the business of your customers
The nature of programming is that the act is usually always helpful to someone. Who are you trying to help solve a problem? For who? You? Your Mom? Your friend's Mom? Your coworker? Your business partner? Before you can begin coding and solving problems, you need to know who you intend to help. If its just you, then fine. If it is your coworkers, then you should probably talk to them. Why do your customers need you? How do you make your customers more awesome?

Step 10: Meet people
We live in a new world where sites like meetup.com can trivialize the finding process. Everyone is looking to socialize with the right people. Once you find people. Don't fuck it up since that tends to make bitter people (i.e. you alone in your parents basement troll'n it up). Read "How to Win Friends and Influence People", and then try to apply the principles.

Monday, May 23, 2011

The Engineer and the Artist

I've noticed a pattern emerge amongst my friends and myself.

Many of my highly technical friends are computer scientists, mathematicians, scientists, and engineers. They would be the canonical examples of left-brain thinkers. Most of them have married (or in an active relationship) with an artist of some kind. The significant others are the canonical examples of right-brain thinkers.

The pairing is perfect.

Since I'm most familiar with my wife, I'll share some things I've learned about my wife and life in general.

My wife inspires me.

Before my wife, I was a methodical machine producing code. I try to change the world and make it better. Engineering, science, math are the ways we organic clumps of meat transform reality to make our lives better. Life is messy, and its our job as engineers is to clean it up. Why?

Once I've constructed the perfect reality where I sit in the middle of a vast plane of mathematical perfectness sitting on my throne of enlightenment, then what? Seriously, once I achieve the perfect state of the universe, then what? Once I've made all the money in the world, then what? Once I've built what I wanted to build, then what? Once I've built the ships to carry us out to conquer the universe, then what? Once I've conquered the universe, then what? Once I've reduced all existence to a single dense form, then what?

Explode, break it, and fuck things up. That's what.

Engineering is the way we improve our lives, but it is not the answer to the meaning of why we live. People find meaning in all sorts of ways. This is when I discovered art. Why is that pretty? Why does that move me? Why does a song sound beautiful? What are these emotional things? Why are the cracks in the pavement interesting?

These questions are the ones that turn a black and white reality into a messy pile of grey.

Who employs my wife? me. Now, if I could just get her to sign the damn employee agreement! Artists!

Seriously, I love my wife. Everyday, she teaches me what it means to be human. She breaks the mechanical barrier that I have around my heart, and she inspires me to be better. Not better in the engineering sense, but better in the sense of being a human being. Without my wife, I would probably turn into some troll.

Life needs more love.

I think engineers are attracted to artists for this reasons. If you are an engineer, then you have to deal with the shitty facts of reality. Like the speed of light. The speed of light is a mother fucking bitch. I hate it. Laws of thermodynamics suck too. Gravity, oh its a mother fucker! Seriously, life is full of shit that some engineer has to go in and work around.

Why do we deal with all this shit? Well, because life is harsh without engineering.

Now, I'm not saying that engineering is devoid of art, engineering can be an art. However, at the end of the day, the things engineers build have to work. This means that engineers can not wave around magic wands and make life better. It's slow methodical work that requires team-work.

Art fundamentally does not answer the ultimate question of life. This question, which spawns religion, is in my mind unanswerable using any formal reasoning system. I have no methodical way of exploring this question, so I don't. Art however is a great way to keep our minds off that question.

Meeting an engineer's significant other generally will generally tell you everything about them. My wife is the kindest person I've met. She feels bad for stepping on flowers. She's sweet and kind. She changes my world view much to my infantile protests. I swear, she doesn't have a mean bone in a body. She even recycles hard-core!

She inspires me to try to write poetry, and she opens my heart in a way that I can't express. I can't engineer a feeling, but her existence is like poetry.

Sunday, May 22, 2011

Instead

of hacking away at some bitcoin-bazarr, I spent the majority of my day making my wife happy, writing a love letter to my wife, and reading.

What did you do today?

Me the philosopher

I'm thinking about life and death and stuff; does that makes me a philosopher?

Yeah?

Sweet! I'll add that to website.

The dream that was our first failed start-up; start-ups are hard; the future is bright

I've recently discovered the awesomeness of bitcoin. Some years ago, me and some friends did a start-up before it was really super cool. The dream was simple: enable artists to buy and sell their shit as content is king.

There was a sub-text to the dream that was simple: FUCK MIDDLE-MEN.

We were building a in-system currency for enabling micro-transactions so people could sell things for fractions of a penny. We wanted to get prices to a point where indie artists could create and stimulate market demand by using low prices. In theory, it was awesome.

I fucked this up by being an academic trying to build a transaction system that would abide by all the rules of VISA/MC/banks, and then scale to the size of 10x facebook (Transactions are hard!). I say I fucked up because I think I put us in a position where we needed investment. There were lots of legal problems around our dream, and this was a big barrier to investment; so, we watched the dream die a slow and painful death. At least, in Kansas. Gauh, why did we try to do it in KS!

Now, the perfect solution is available via bitcoin. I'm honestly glad we didn't succeed because bitcoin + a weekend hack project could have put us out of business. We live in a bold new world with this internet thingy.

The dream we had can now be concisely built and done without worrying about VISA, Banks, Hackers or other shit. In fact, a bigger dream is available. Shit!, bitcoin could end piracy! (Well, kinda)

We are watching the death throes of the music industry. Eventually, the movie industry will end too. See, its not that music or movies are going to die. The middle-men, executives, organizers, and overhead to get the music and movies to consumers. They are going to go away with all the licenses.

Well, they aren't going to go away in a #rapture sense. They are going to have to accept a new reality (which is painful because most people hate change rather than embracing it). They are going to have to focus on the new emerging market and learn a new aspect of the trade. Well, people will skill will. People with no skills, they are kind of fucked... They should become artists.

How? Well, imagine a bit-torrent like protocol that required a bitcoin wallet. Sharing would be restricted between those people that have paid for it. The artist would simply start to seed their product with their wallet. In theory, this would lower the price of the content, increase the artist share. Lower product price + greater artist share should mean increased demand and thus more value to the artist. The ability to control pricing on the fly would enable artists to effectively market.

Downloading a client would be the most hard-core version of this scenario, but it is possible.

The interesting thing is that bitcoin is unstoppable. It may go into the black market, but eventually, it will win and be a legal form of currency. At least, for buying digital content.

What I'm considering now is whether or not it is worth it for me to build an escrow service with a search engine. It would be fairly simple with Elastic Bean Stalk, S3, some EC2 machines for search via Solr. Shit, I should be building this! Next weekend, I'm going upstairs to be with my wife.

What this system is going to create is a place for amateurs to get to a point where they can take on patronage projects. Once people effectively demonstrate that they can make things people want, then they can raise serious funds. Look at KickStarter. I love kick starter.

This is how small time videos produces will go big. I watch a bunch of YouTube people, and if they tried to raise serious funds, then I would fund them with some pre-sales. Now, how this will turn into $1B budget for making movies, only time will tell.

I think it is possible, and that is step one.

A good problem to have (unless you are Sony)

"A good problem to have" is entrepreneurial way of saying, we are fucking this up and pushing shit out the door, but it doesn't matter if no one uses it.

For many people, it works.

For some, it fails. See PSN.

When you incur technical debt that puts people at risk, then you must pay it.

My role in life is not to create "good problems to have". My role is to solve them. I like solving puzzles. This will make sense as I'm writing a larger entry, but I wanted to throw some content out the door that was self-contained to my future main-point.

Saturday, May 21, 2011

WeUseMath, so do I; I love math

I like math, and I used to own mathsex.com; I was trying to sell math a long time ago. I used math yesterday to see if I was about to blow smoke up my own ass. I like math because it's not bullshit. Fuck, my alias is mathgladiator.

Now, here is what I understand. The US has severely fucked up math education. Like, SERIOUSLY fucked it up. What does math need?

A new fucking name! I mean brand. The brand is toxic, and we should dump it. People hate math, and this is a religious zeal. I don't think it can be saved by smart people; it needs to be solved by good marketing.

Let's re-brand it as "hacking the universe of truth" or something like that. I wonder...

I'm too old for node.js; maybe

I got up today excited to do a bit of hacking since my desk is now cleaned and workspace is optimized for getting into flow. It took longer than expected to get to a steady state due to the new job, the move, the wife breaking her ankle, and exploring the awesome city of Seattle.

I started sketching out what I wanted to do today, and it required good S3, SQS, and EC2 libraries. And, I wanted to do it in node.js. The thing I wanted to build, well, I can't talk about it. But it is super cool.

The library support I wanted from node.js wasn't what I needed, and so there I was with a decision. Should I

(a) roll up my sleeves and do the whole github thing and get shit fixed
(b) say "fuck all" to the community and write a better more awesome library set
(c) mock up with a silly prototype
(d) scrap the thing and give up

The answer is C, I was done in ten minutes with the prototype. The idea makes me happy, and I can go back to bed where my wife which would ultimately be a better move than dicking around with code on a Saturday morning (boobs > code, deal with it). Should I decide to commit to the project more this weekend, then I'll probably do it in Java. Why? Because Java has rhino which is good enough for what I need. And, eventually, if my idea pans out, I may just throw away rhino and use antlr to do the serious business of writing what I ultimately need (because me + antlr = magic).

Answer B is what I would have done before I did start-up #2 (the one that made money), and this tends to be the reason why there are so many half-baked things in the Open Source community. In fact, there is a phase when you are young and you are compelled to create things. You have to prove it to yourself. Until you prove it to yourself, you tend to make the worst code ever (and also, most potentially, the most innovative code). The proof that I could create was when my first "product" was sold for $60k. All my code before the start-up was shit even the first "product", and while I feel bad for selling shit. Most shit that is sold is, well, kinda shitty to someone (That's why you need marketing, to find people that don't think your shit is shit). All my code during start-up #2 is meh. All my code now, well, it's production-worthy.

Answer A is what I would do if I was an active technology co-founder. Most old-school business guys don't understand open source. I'll write a blog post up on that one day. For now, just consider that this is a very good option provided the community lasts for long. That's the open source gambit. I think node.js is a young man's game. It's awesome and full of potential, but it will require a lot of work and reinventing many wheels to get to production worthy-ness. The libraries need to stabilize further before I can build on them (standing on the should of giants?) and do my research with them, and I'm not really willing to commit large portions of my time rewriting/fixing libraries that already exist in other languages. So far, beyond really awesome IO, node.js isn't that sexy for research.

Answer D is not really an option for me since I'm obsessed about seeing and feeling my ideas work and studying consequences. Until I get some half-baked crappy solution out the door, I can't be rational about and see it for the steaming pile of shit that it may (or the revolution of awesomeness that it could be). Until I test, taste it, and see it, I don't know. This is a fault about me. I also like to tell people about my steaming piles of shitty-code.

So, where do I stand on node.js? Node.js is awesome, and if I was a start-up CTO again, then I would be using it hard-core. Why? It is virgin territory and building with, promoting, and helping the community will build up your technology brand. Node.js helps a start-up more than established companies on two fronts: PageRank effort + recruiting. Google's PageRank is life-blood for many companies, and not having it can be bad and expensive. A link from the technology community is worth the weight of a fat baby in gold. Recruiting young-eager programmers is a key part of any companies strategy for growing and being successful. Building on node.js makes your company super sexy to young-eager programmers. For start-ups, this helps them rationalize a hit to their fair market value since they get to have sex with node.js on a daily basis (happiness is strange like that).

Now, I'm an old man with big and or important questions. And, while I find node.js to be that sexy chick at the programming bar, I find myself married to big and important questions which require mature and establish languages and platforms. So, when I fuck up, I know its me and not everything else (unless I've stumbled on a bug which should be rare, but more importantly easily observable in a mature platform). These are fundamentally more important than squeezing a bit more compute/io utilization out of a machine since I'm tackling problems that need to depend on a lot of production-worthy code.

Until you youngsters get your shit straight and make node.js mature, I don't have the time to fuck with it. So, I'm jumping back in the C# and Java camps with static typing and mature sexy code, and when I need awesome IO, I'll use erlang because erlang is awesome.

Thursday, May 19, 2011

Routine

Get up between around 8AM, deal with morning shit, walk to work, eat breakfast, get crackin' on work to set a context, walk to whole foods, eat an epic meal, walk back to work, get crankin' on work, go home, cook dinner, bed activities, sleep

Saturday, May 14, 2011

Adventure into Pike Place Market

OK, I am establishing my weekly routine/framework. Today, I'll post about my Saturdays. I'm on the slow carb diet, so every Saturday I eat some protein when I wake up (this wakes up the metabolism and prepares it for destruction), and then I head off to Pike Place Market for absolute destruction on some poor helpless carbs.

So, I walk from my place to westlake and mercer where I jump on a S.L.U.T (ok, SLU street car). I watch the road pass and see the space needle (pic). Getting out of the SLUS (not as fun acronym), I see a statue of some dude (pic). Walking down to the market, i see a nice sign and fumble around to take a picture with me in it (didn't see how with instagr.am to use the front camera). If you don't want to see my face, there here is a picture of just the sign.

Round one: Mac and Cheese (best ever). This mac and cheese is so good it makes all the other mac and cheese I've ever had a distant memory. This includes the mac and cheese from nicas cafe (very sorry byran...) and McCoys public house. Look at the picture again and tell me how it doesn't look amazing.

There is a cheese festival going on and I see a tent with a bakery (and this related to cheese how?). Ooh, brownie! That was tasty and sinful. Moist and fresh. That bakery services several places in town, but I've never had it that fresh before.

Round two: Since I managed to get out the door early today, I got to Piroshky-Piroshky early and had an Apple Cinnamon thing made by real Russians with really think Russian accents. Normally, the line is crazy big, so I'll come back next week to get things I've missed.

With enough carbs so far to choke a small child, I find a place to admire the view.

Moving on, need to destroy more carbs. I go look at the donuts, and I have a heartattack just thinking about them. However, today, I promised myself to try new things, so I moved on. After having a visual orgy of donut goodness.

Did you know that they have flying fish? Next time, I'll try to be quicker in dealing with my phone. See, I walk pass and see a fish fly. Then i wait and nothing happens, so I move on. I should take a chair.

Now, there is a hole here because I wander down the merchants. I also ate two chocolate covered pretzels. Unfortunately, they were consumed faster than I got get my camera out. My bad. There is some cool stuff that you can buy here. I fantasize about owning it, then move on realizing I'll have to carry in my next move. I got to the end of the street where there is a park. Pigeon!

The carbs have hit me now, and I need to sit down and stare. So, I look at the mountains. I get up and look over the side and HOLY SHIT A TRUCK. I also have the desire to own (or rent) a boat. The park (I suck as a tour guide, what is the name, oh well). A totem? Yes, a real totem. Also, there were some meditating Chinese people protesting in a non-violent way.

By accident, I discover that instragr.am has the ability to switch to the front-camera so I took a better picture of my head (oh, and the sign too).

Now, moving on, I get my wife some stuff. She loves seattle's food scene because it serves the gluten free market several orders better than kansas city. I get her two cookies.

Before I eat a cookie for myself, I drink some chocolate milk. That was the best damn chocolate milk I ever had.

Round Three: Cookie!!! NOM-NOM. That's a man size cookie. I eat one and get one to go.

Now, there are many interesting characters at pike place market. For instance, there is a metal man. Check him out. I give him a dollar and move on to buy some stuff for my wife.


The carbs take me down and I get tired, so I head on home on the S.L.U.T.

Now, dinner is going to be interesting...

Friday, May 13, 2011

Research Goals for 2011, Changed

Except I can't talk about them.

Trust me, they are super cool.

Sunday, May 8, 2011

Mastering programming and the role of deliberate practice

If you want to master programming and become the best that you can be, then it requires a lot of practice. However, writing lots of code or following lots of tutorials is not going to do it. You need to be deliberate. Being deliberate in your practices means you do the following four steps
  • Set a goal
  • Work
  • Reflect honestly
  • Pivot
and then you repeat...

Setting goals

If you don't have goals (and many don't), then you are going to fail. This is why I would say curiosity is a precondition to mastering programming. "How do I do ___ ?" Once you have a whole bag of those questions. Answering these questions and scratching the itch is how you set goals.

Setting effective goals

I think this is the hardest aspect of developing skills, and I think this is where getting a mentor makes the most sense. If you are fortunate, then you can set your own goals and figure out a strategy on achieving them.

Goals are recursive, and your ultimate task is to turn your goal into a series of actionable steps.

My general strategy is to pick the most ambitious goal you can think of that interests you and then start breaking it down. For instance, I wanted to build a computer algebra system. That's a daunting goal.

Daunting goals are good because they provide an end-game and generate many goals which you can iterate and improve on. You'll learn more from trying something big than trying a number of small exercises out of a book (This is my thesis statement for the future project I'm toying around with).

Let's say you've picked your daunting goal and you have no idea how to begin? This is the role of a mentor to look at your goal and say "first you need to do ___"?

Work

After you have your first goal, the next step is work hard. I'd like to say work smart, but that probably isn't going to happen. I say pick a time period and commit to working on it until that time period is up (or finish if it is going to be a success).

A combination of study, design, coding, testing will eventually pay off in either a failure or a success.

Reflect

Why did you fail/succeed? What was a complete waste of time? What felt like the most productive? What are you missing? Are those resolvable? A mentor can help you through these questions, but you need to first be ready to hear the results.

The more honest reflection you can give to your work, the better. Everything I do, I write postmortems for (both successes and failures). Some are one-lines and some are multi-page reports. I do this because I fuck up (a lot).

Pivot

Integrate your reflection and thoughts to help pick your next goal. Do you need to try something else? Do you need to try again after a refreshing bubble bath? Should you move onto to a different project? Did you get inspired to work on something else?

As long as you continue to practice something related to programming, then you will be successful.

Becoming a Master?

We often like to conflate being a master with being a monk like god where we have 1000 steps to reach our hut on top of the mountain. The reality is: being a master is more like being a self-aware student. You can look at a goal and then plan out how to tackle it. Being a master doesn't mean you can do it or accomplish it.

I think computing is becoming a lot like medicine where the things we build and study are escaping our grasp to fully comprehend. Instead, after some schooling and some resident program, we become practitioners.

Commodity Code

I prefer to think of everyone on the planet that makes money as a business that takes a pain and solves it for a fee. Compare hiring a coder locally versus out-sourcing to one in India. They both produce code, but is it the code that I want?

If I go local, then I'll spend 10% of my time managing employee and 90% doing my own thing. If I go remote, then I'll spend 30% of my time managing/spec writing and 70% doing my own thing.

Saturday, April 16, 2011

SEO god-mode with node.js /w Big Data Win

I'm killing WIN and making something else also called WIN because WIN is an awesome name.

Why? The biggest thing old WIN does right is URL management. Now, I'm going to build a new product that's so fucking awesome.

new WIN = node.js + jsdsom

Basically, a proxy server that puts your server behind a strict HTML parser. Why? the stricter the HTML means the debugging process will gurantee correct HTML. Good HTML can be analysed on the fly. So, now, software can be written with craptastic urls like something.php?foo=bar and be transformed via jQuery on the fly.

What about big data? Well, dealing with file uploads in PHP is kind of annoying. Instead, I can use node.js to hyper-visor the upload and them stream it into S3. This will give the php script a URL which is what PHP ultimately wants.

Detecting Duplicate Content

I think about duplicate content because I know that if I were to build a tool to detect it, then I could make a fair bit of $.

In general, you define an operator on content to transform it into a vector and then the dot product of the vectors will give you a clue into how similar they are in raw content (ignoring order of terms up to a point). Now, this operator is going to be complex. The natural algorithm that any one could build is going to have complexity O(N2). You can build clustering algorithms, but their performance may not be all that great and at worst are useless.

Solving the problem I want to solve may not be feasible without massive resources.

Does Google dedicate massive resources to detect duplicate content? Now, this is an interesting question, and I doubt they even need to. This line of thought gave me a clue on how to even build a product that would be modestly useful. Rather than thinking about how to detect duplicate content, I think about how to punish duplicate content.

It is very easy to punish duplicate content as you go. For instance, If I was google, then I would look at search results and prune out duplicate listings as I go. If I search for "mathgladiator", then duplicate content will rank similarly and be adjacent in a search (or close). This algorithm is O(M) where M is the number of search results. So, as Google returns results, it adjusts and punishes data that it believes is duplicate with some form of voting system. Over time, duplicate content is dead.

Ok, how to provide as a service? Well, take an open source search engine that provides full text search (Nutch?) and then have it crawl your site. Take a list of keywords/terms that you care about and then cron the search and then compare adjacent search results. Alert on content that compares.

Problematically, this doesn't solve the deeper issue, but it gives an advantage to those that can build this system.