An old list

I’ve seen a new list go around about “things you don’t understand about silicon valley”. link

I remember a similar list that went around in 2000, right in the middle of the first boom. I updated it with the ‘new reality’ of 2001.

You now know you work in Silicon Valley when…

  • Old – You make $100,000 a year, yet still can’t find a place to live.
  • New – Unemployment Insurance is only $800/month, which only will pay your car payment so you consider staying a few nights in a homeless shelter to get away from sleeping in your bmw.
  • Old – Your commute time is 45 minutes and you live 8 miles away from work.
  • New – Your commute would be now only 15 minutes, if you still had that job. Now you trek over 45 miles and your commute is 1 1/2 hours.
  • Old – You stop asking how much things cost but, ask “How long will it take?”
  • New – You start asking, “how long will it take to earn the money to buy that?”, when you look at a $55 walkman.
  • You know vast differences between Thai, Vietnamese, Chinese, Japanese,
    Cantonese, and Korean food.
  • You haven’t had sushi in months, your Vietnamese is now just Pho because its under $5 for a bowl, and your Cantonese is limited to “2 items for $3.99 with coupon” specials at the nearest mall .
  • Your home computer contains mostly hardware/software that is not on the consumer market yet.
  • Your home computer’s ‘pro’ hardware made it to the consumer market 2 years ago, was in the bargain bin last year and now you get snickers from the geeks at Office Depot when you mention what you have.
  • You go to “The City” on weekends but don’t live there because you like your car.
  • You try to avoid the city, because it’s getting pretty quiet and you can’t afford the caltrain fare.
  • You think that “I’m going to Fry’s” is an acceptable excuse to leave the office for a while, and your boss does too.
  • You haven’t been to Fry’s in so long, you can’t remember what theme the Palo Alto store is.
  • You lost your alarm clock. You’ll get to work when you get there.
  • You have 3 alarm clocks set, so that you can get early to the job fair and avoid the 3 hour long line.
  • You go to an industrial-heavy-metal bar and see two guys get into a fight over what flavor of Unix is better.
  • You see this at bus stops now.
  • You own more than 10 articles of clothing that have hardware/software companies printed on them. Bonus for embroidered stuff.
  • You rue the day you went to the trade show and didn’t take every shirt that was given.
  • Even though Microsoft employs quite a few programmers in the Bay Area, they only work on Powerpoint, and the company is still the embodiment of Satan.
  • Still holds true
  • …Even if their stock IS worth more than yours.
  • The idea that stock is worth Anything, causes you and your peers to fall down laughing.
  • You see a billboard that says “FPGA2ASIC” and aren’t fazed.
  • You wistfully remember the gardens.com billboard on 101, and now just look at the GM, radio station and McDonald’s billboards that are like those in every other city.
  • When you need the updated Diamond Monster 3D drivers, you just walk across the street.
  • Given the stability of your computer as mentioned above, you haven’t
    thought about drivers in 18 months.
  • You have more bandwidth in your apartment or condo than most major
    universities.
  • The $500 you used to pay for bandwidth was canceled because your ISP went out of business, you went for DSL but before they delivered the new ISP went out of business, now you pay $9.95 for dialup like everyone else in the country.
  • None of the people you work with are bible thumpers.
  • The hard times converted you 8 months ago.
  • When you stand in line at Starbucks you wonder why the employees don’t have headhunters.
  • You apply for a job at the same Starbucks yet get turned down because you’re one of the 200 applicants who’s only skill is aeron chair configuration.
  • Your workplace vending machines dispense “100% natural twig-bars” right next to Jolt cola and Instant Espresso mix.
  • Your happiest day in the last 7 months was when you found the vending machines took Canadian quarters.
  • Your new car is older than your new job.
  • Your new car is older than you.

You used to joke to newbies to Silicon Valley about living in East Palo Alto, but now you’re giving it serious thought.

You are comforted that at least you we weren’t hit as hard as all the other
Silicon Valley wannabe’s (Silicon Alley etc.)

Dim Sum Effect

Given a situation where there is food available for shared consumption and where the food consists of groups of single items (Dim Sum or Hot Wings). The Dim Sum Effect is when the food is depleted to the point that every group of food has one item remaining. At this point, the rate of items eaten stops and with great reluctance the remaining individual items are eaten only after the person taking the item asks nearly everyone in the group whether they want the final item. If there are multiple types of item in a group, the food will deplete to the point that one of each type remains (wings vs drumsticks).

This is proof that altruism is a basic human behaviour.

Nelson’s Law of Demo Probabilities

The more embarrassing it is for a bug to appear in the product you are demoing the more likely it is to occur. Conversely, and also as common, during a demo of a bug in order to get help in fixing it, the more embarrassing it is for the bug to disappear, the more likely it is to happen.

Note, you cannot use this law to fix bugs.

Example:
The CEO of your company walks by your desk and asks you to demo this great product you are working on and are ready to release. It is nearly guaranteed to fail and show a bug.

A week later, after battling this bug and holding up the shipping date, you call the CTO to come in late and help you, and he brings the CEO as well. It is nearly guaranteed that the bug will disappear.

If, however, you attempted to use this law to fix said bug, and called the CTO in order to demo it with the hope it will dissapear, then both the original bug and a new set of bugs will appear.

So much f*&!king feta…

A story,

My good friend and I paid a visit to another friend in the vast metropolis of Fort Langley BC. The visit turned into a small party, naturally, so we had all been drinking, some more then others. As drunkards well know, at around midnite you get kind of hungry. An idea was presented to the group, “Lets get a pizza!”.

Much agreement flowed through the party about getting one, but then as all pizza requests like this one go, the second, and more decisive decision is always, “What kind of pizza?”. I immediately answered, “I feel … like something … kinda… salty… like Feta”. My friend agreed, “Feta sounds awesome”.

The host starts to dial, looking at us with a kind of disgusting glance, “You really want Feta?! Fucking Feta?!?”. “Yup, but add like ham or onions or something.” we said.

So he gets through to the pizza place, “I want a pizza, with ham, red onion and lots of fucking feta. I mean I want so much fucking feta on this pizza, that my friends here, who wanted feta, will be sick of fucking feta for the rest of their fucking lives.”

Our jaws drop, but slowly a smile forms which quickly turns to laughter, what the hell are we going to get? I thought, “They’ll laugh but it’ll just have a bit of feta on it”. So we head out to pick up the pizza, the most sober person driving, and I took shotgun. We pick it up, the box, well, it must have weighed 5-6 pounds and was sagging in the middle.

We get back to the house, open it up. Our jaws drop again, there is perhaps an inch to and inch and a half of solid feta on this pizza. Perhaps, in Ron Swanson fashion, they put all the fucking feta they had on the pizza.

But we ate it and it was good.

I was sick of fucking feta for around 6-8 months.

DIY Photo Booth

Finally got back to making something, it was a while, but it felt nice.

The Back Story

A year or so ago my wife and I hosted a 30th birthday for a close friend. At our wedding 5 years ago, we rented a photo booth and all of our guests rejoiced, so now for the birthday we wanted one again. Unfortunately rental photo booths run around $1500 and that was way over our budget for the party. However, as I use Macs for work, I know there is a nice photo booth app that replicates everything a real photo booth does, except automatically printing out the pictures. I figured that if I could figure out how to make it automatically print, I could just use that.

So I dove in and began writing some code. Picture the hacking scene from ‘The Social Network’ as I researched OSX automator plugins, learned some AppleScript and then relearned ImageMagick in Perl to composite the 4 pictures Photo booth created into one picture. All in all, around 6 hours of hacking and the resulting script and AppleScript was hackerific. That left pretty much no time to set up beyond getting the mac on a table with my printer.

Photo booth 2.0

Word of my hack spread, and when my close friend Rob hit 40, his wife Tanya asked me to re-create the photo booth. Well, there were some problems, the biggest one, was that my ‘photo booth’ consisted of a table with my laptop and printer sitting on it. Not exactly what most people consider a photo booth. “Well,” I thought, “I have a weekend before this, why don’t I whip up a box?” I knew WeirdStuff Warehouse had flat screens really cheap, and I pictured screwing it into a wooden box would be easy. Finally I had an extra printer so this should be pretty cheap. I figured in the end $20 for a monitor and $50 of wood should get me a booth and it should just take a few hours.

The Plan

  • Use my work mac and its photo booth software, hack it to auto print after each print
  • Trigger the event by positioning the mouse cursor on the button and soldiering a push button to a USB mouse to ‘click’
  • Create a simple box to hold everything, save time by only making the front ‘nice’. Attach a cheap flatscreen to it by cutting out a window.
  • Profit

On a side note, I picked the hottest weekend of the year to do this all. It got up to 95 degrees and my garage was a sauna. I must have went through 3-4 t-shirts a day.

But, with four power tools purchased, 24 hours of sawdust and splinters, paint and cursing, one routing redo and one complete rewrite of my printing code; the box was completed. This is how it went down, I started on Saturday, The deadline was 4pm on Wednesday.

Day 1 – Saturday

Off to Home Depot. I bought;

  • 8 4′ 2×2 boards
  • 8 4′ 1×2 boards
  • a cheap sheet of 4’x8′ 3-py plywood that I had them cut into 4 2’x4′ pieces.
  • a 2′ x 4′ birch 5-ply plywood for the front.
  • a router
  • a circular saw
  • 2 caster wheels, as I planned on using two pieces of wood for the other supports and ’tilting and rolling it’ like luggage.

The first step was creating the box. I used 2×2 wood and the 3 ply plywood. I basically used the 2×2 as a platform for screwing in the plywood sheeting. I created two sides with this. I planned to use 3 of the 4 3-ply pieces for the sides, the other one I’d cut in two for the top and bottom

I then went and routed some openings for the monitor and the paper output in the nice birch plywood. Thinking I had steady enough hands and could sand out any irregularities I routed out the monitor port by hand and promptly messed up, it was way too uneven. I tried straightening it out by screwing in some 1×2 boards as guides. This worked somewhat, so I screwed in four pieces on the bottom to create a nice even cut. I used the 3/4 inch bit on the router and got a nice curved corner too. I then sat it up and noticed that all these runs with the router ‘evening’ out things made the monitor port all ‘wonky’. I tried to fix it, but messed it up further, by now I had enlarged the port too much and you could see too much of the monitor. I looked at what time it was, and I noticed it was 9pm and that there still was time for trip #2 to Home Depot before they closed and buy another piece. After the home depot run, I took some 1×2’s and made guides for both top and bottom and that was it for the first day.

Day 2 – Sunday (Pool Party)

I mentioned how hot it was right? Well, we have a pool and we were throwing a pool party and to top it off we invited the guest of honor for the surprise birthday party over. All of this was planned because I was ‘supposed’ to be finished, so I had to work around the party. I got up early (10am), and routed out the holes, I did a good job finally and then I had to clean up the seemingly cubic yards of sawdust created by doing this before people arrived.

We had a good day on the pool, and now I had a couple of hours to ‘finish’ the booth.

  • I screwed in the ‘bad’ front temporarily to the sides I had created and anchored it all with 2x2s.
  • I screwed in some metal braces to make it really secure.

I now had a pretty good solid frame of 2x2s, so I could take off the old front. I ended up cutting it into two pieces and screwed it into the top and bottom. The poorly cut out holes now became ‘Vents’. I screwed in some castor wheels to the bottom and noticed the idea of using ‘wood’ supports as the other to legs wasn’t going to work. I rigged up something to get it to balance, but it was rocky and hampered the rest of the build. I really should have done that last. I then worked on the back door with some hinges. That didn’t work out so right, the caster wheels were rolling the whole thing away. When I was finished the back door wasn’t closing properly so I just screwed it shut. I was looking at it fairly satisfied and my wife came out to tell me it was 9:30 and I probably should stop using power tools. 9:30? I thought I had just started.

Day 3 – Monday

I had to go into my day job and work but on the way home from work I hit HomeDepot where I picked up

  • some polyurethane for the front and top as well
  • various brushes and paint accessories
  • two more caster wheels
  • a lock to hold the back,

At home I got to work, I screwed in the caster wheels, and then noticed I had no shelves for the printer and computer. I cut up the 3-ply that was going to be the top and used it as shelves with some 2x2s. I then worked on the wooden support for the monitor. I got that all screwed in and it was time to test. My heart was racing but the monitor fit in well, and the printer was good out the bottom hole. I then went on the back piece and worked on the hinges again. I had to cut off a bit of the siding, and I used a dremel to cut out some wood so the lock would work. I screwed on the other casters as well. Looking at the time, it was almost 9:30 again. I dusted things a bit, then washed down the front, putting a coat of polyurethane on the wood.

Day 4 – Tuesday. 1 day to go.

Before work I went in and sanded down the front, then put another coat of urethane on it. I also forgot to put a coat on the top so I put one on.

After work I raced home. I put another shelf in for the computer, then I had to work on the ‘button’ that would click the mouse. I hadn’t even tested this, so I quickly put on a coat of primer and I fired up the soldering iron. I suddenly got afraid that the button would be a small metal bubble on the circuit board, but I found a nice little switch. I took apart an old mouse and soldered in my bigger red button in place of the left mouse button. I realized I needed a way to connect and disconnect the button so I could test it, then attach it through the front. I searched what I had available and I found 2 9 volt battery connectors. That worked perfectly. I tested it all out, including the monitor and the mac and it all worked.

Now I needed to paint the box, so I mixed up all of these testers we had lying around and painted it. We were testing a dark grey for our living room, so it worked perfectly. I went inside and I rewrote the code to print. It was around 1am when I finished and managed to test printing using the monitor in the front. Of course the monitor has buttons and the wood was hitting them, turning up the contrast and such. I marked that down as something to do.

Day 5 – Wednesday

Crunch time. In all of this I forgot to drill out a hole for the red button. I got up in the morning and found to my incredible distress that when I made the hole the drill was ripping up the wood. I tried again with the router and realized my hole was too close to the monitor support so the router wouldn’t cut through. Then I remembered I had that Dremel tool. I took off the support and dremeled out the hole a bit, then dremeled out a groove for the monitor buttons. Off to work. I came home at lunch, and quickly got to work. I tested the monitor, and the button on the front were still being pressed. I quickly super glued in some cardboard in front of the buttons and luckily, I repeat luckily, it worked. I then put everything together and realized I had 3 USB devices (mouse, camera and printer) and only 2 ports on the Mac. Many expletives were yelled, and thankfully my wife ran out to get me a usb bus. I took the assembled front and screwed it into the rest of it. My wife returned with the the usb hub and it all worked perfectly. The first successful test happened at 1:30pm on wednesday. I then loaded it into the car, Toyota Matrixes (pre 2010) are awesome at moving things, and went into work for a bit before heading to the party.

At the party it worked flawlessly.

Code for photobooth is here, https://github.com/johnboy55/photobooth

 

Work Pet Peeve

Emails:

From:                  Subject:
CEO             Re: Re: re: Re: re:RE:FW: RE:Foo.com Sales call
SalesDude1      Bar.com Sales call 10%
SalesDude1      Re:Baz.com Sales call 50%
VPofSales       re:RE:re:FW Widget.org call 75%
SalesDude2      Baz.com Sales call 50%
VPofSales       RE:re:FW Widget.org call 75%
VPofSales       Re: re: Re: re:RE:FW: RE:Foo.com Sales call

Oh hey, there’s an email from the CEO, lets read that one….

<—begin email—->

FROM:CEO
Subject: Re: Re: re: Re: re:RE:FW: RE:Foo.com Sales call

Hey, I never heard back on wether this is done or not

>VP of sales wrote:

>Congrats on the big sale! Woo HOo!

>>From:Sales Dude #2

>>Hey, awesome news!

>>>From:Sales Woman
>>>Sounds awesome!

>>>>VP of Eng wrote:
>>>>This will really help our bottom line!
>>>>We'll get right on this!
>>>>>Director of Sales wrote:
>>>>>Hey, glad to hear everything went well at the call!
>>>>>You guys really rock!

>>>>>>CEO wrote:
>>>>>>This is really exciting!!!!
>>>>>>>Sales Dude #1 wrote:
>>>>>>>Foo.com really loved the demo! They're going to sign!

The Design – principles

As I posted before, I was thinking of using VGA for a while, but my first real breakthrough in the design was the thought that rather than just reading directly off of the chip I could read one byte off, store that in a latch, then with a 8-to-1 chip, I could read one bit at a time off of that and display it.  It meant, more importantly to me, that only three 74 series chips would be run at 25mhz, and all the others would be run at 3.125 Mhz, which meant no high-speed problems (which I read I should avoid). It also meant that my need for fast ram would be cut, and I’d have a tonne of time to do things, but I had already found and bought a fast ram chip. So with that, I devised three other principles, which I’d use in the design.

My Basic Principles;

  • TTL  and fast TTL at that, S, ACT, or F
  • Give the ram as much room as possible, but get fast SRAM
  • Simple bus management

Fast TTL

One of my biggest fears was that when it was finished, the various latencies due to propagation etc would cause some bug (Turns out this was true, but different then I expected). I didn’t have a great logic analyzer or scope, so I wanted to keep these as small as possible. Also, power and cost wasn’t going to be an issue, I wanted to not have to dance too much around delays. So I chose chips who’s delays were in the range of 1-10ns. In hind-site it seems as if didn’t really matter that much, if you have bus contention, 2-4ns is enough time to mess everything up and the design was simple enough that delays could really stack up.

Why TTL? Well, as I found, and is probably best suited for a post of its own, when looking for chips I found the most availability and speed in the TTL line. CMOS was often unavailable, it sucked reading about a great chip, then not being able to find it, or if it was available, it was surface mount and expensive.

Ram Speed

In looking at Rams, I found a really fast 12ns 256kb SRAM. VGA has a clock speed of 25.125 Mhz, which corresponds to roughly 40ns between clock cycles. I wanted RAM that was faster than one refresh, in case as I ironed out the design I needed to fall back to that. Even though my design could handle ram 10x slower, I didn’t want to be boxed into that.

Simple Bus Management

This was one of the biggest issues I had, how to communicate between the Arduino and the Card. This was my biggest shortfall as well. I thought the simplest approach was a ‘ram ready’ signal. I would send this from the card when I had enough time to expose the internal bus to the arduino. I realize now this was a big mistake, but at the time, it meant just some transceivers. The thought came to me that the SX-28 that was handling the bus availability would know when the bus would be ready, so it could signal to arduino that it was ok to send, and the arduino could just loop waiting for the signal to know it could progress to the next byte to be stored. At first I thought this could happen at the end of every scan line. But that was silly on my part, it turns out it was only really available a couple of times during the vertical refresh areas.

 

Arduino VGA Frame interface project.

Here is my VGA card in its completed Glory. Over the next few posts I’ll explain some of the theory behind it, and more importantly, I’m going to try to describe some newbie electronics issues I met and how I overcame them. When I was building this I found myself constantly researching in many books to figure things out. My mind sometimes is too rebellious, and when told, do it this way, it asks, ‘Why?’. It turns out it’s really difficult to find the answers in many cases, so I’ll try to dump as much as I can on this blog.

 

Electronics, A personal history.

 

I have always been interested in electronics,but I always found myself blocking on really sitting down and learning electronics, rather than just building kits.  I remember spending hours and hours building circuit after circuit with a Radio Shack 75-in-1 kit when I was 10-14 years old. I hoped to eventually learn why this resistor needed to be there or this capacitor. Reading through the booklet included I kind of understood, but I never really found a project that captivated my interest. During highschool, my electronics class consisted of figuring out the correct voltages and thickness of pencil lead that would melt staples or anything else we could find around. Well, either that or arguing Ford vs Chevy vs Mopar. I tried to build a ‘de-scrambler’ for TV, but lets say my teacher while ‘energetic’ either had his hands full with tool thieves or just wanted to appease them so he never really got around to teaching any serious theory or any help with my project. It was there I found out that car speaker box construction was ‘electronics’.

At my first job outside of college I got a look at a different view of electronics. There at Cymbolic Sciences, I was surrounded by electrical engineers and since we designed all our own processor boards, I just started hearing about Microcontrollers and FPGAs. I never got my hands on one, but my job brought me into contact with Matlab and more importantly, Simulink. Simulink can be used for many things, process simulation being one of the main things, but I found some elemental logic building blocks within it that piqued my interests. Using it this way it reminds me now of programs like Logisim. I remember spending one night (I worked the 4pm to 1am shift), playing around figuring out how to get the NAND gates to act as a simple flip/flop. Then I built a multiplexor and de-multiplexor out of logic and glued these with the flip/flops into a 64bit RAM block. Then I used that block in a different simulation… and well, I ran out of the 64 MBs of RAM my laptop had.

I would over the course of a the years experiment with different logic simulation programs; I got my wife to buy a copy of NI’s Circuit design suite using her student discount for example, but I was always stuck on ‘what to make’.

Then, a few years ago, my friend Delaney introduced me to a book, “The Black Art of Video Game Console Design”. I immediately was inspired, in a few days, my Xgamestation Pico was delivered and me and Delaney were planning many projects. I was most interested in writing to video. The Pico is around the idea of using a microcontroller (the SX-28)to handle all the video timing signals itself. This meant that in your program (written in either sx-28 assembly or a primitive ‘basic’) you had to deal with 80% of your program working around video timing and display. I got the idea of building a logic based video driver that the pico could write to and it would do all the video display. The first design used NTSC, but I found the color handling of NTSC to be really discouraging. That’s when Delaney told me what he learned about VGA. If you could handle the speed, with VGA you just had to control three voltages for the three colors, and you just need to bound two control lines to handle the vertical and horizontal syncs. Aha, I thought, here is the answer.

Around that time, I went to a Maker’s faire, I think it was the 2nd one, and saw the Arduino projects. I was trying to work around  the lack of control lines of the sx-28, and the pain of programming in assembly. I was considering the sx-48, but it was surface mount only, and I didn’t want to work with that… yet. But here, I could just buy an Arduino Mega, which was literally right in front of me, and I’d have as many control lines as I’d want, all with a nice little header to plug into. Plus, a really nice programming interface that was C based, instead of assembly. That’s when my VGA based video circuit solidified.