Video Lectures April 05, 2015

# Being good at programming competitions correlates negatively with being good on the job

A few days ago I watched How Computers Learn talk by Peter Norvig. In this talk, Peter talked about how Google did machine learning and at one point he mentioned that at Google they also applied machine learning to hiring. He said that one thing that was surprising to him was that being a winner at programming contests was a negative factor for performing well on the job. Peter added that programming contest winners are used to cranking solutions out fast and that you performed better at the job if you were more reflective and went slowly and made sure things were right.

Watch the relevant video fragment from the lecture:

Peter Norvig says that being good at programming competitions correlates negatively with being good on the job at Google.

You can watch the full lecture here:

How Computers Learn - Vienna Gödel Lecture 2015 by Peter Norvig.

I extracted the fragment from the QA session at 1h 11m 50s.

Browserling April 03, 2015

# How to pay \$400 instead of \$70,000 in Delaware franchise tax

If you're a first time entrepreneur incorporated in Delaware and you've authorized the standard 10,000,000 shares, you'll probably freak out when you receive your first Delaware franchise tax bill for approximately \$70,000.

I received a franchise tax bill for \$71k.

Don't freak out! You can pay just \$400 instead of \$70k. Here's why. In the state of Delaware tax can be calculated using two methods:

• The Authorized Shares Method (default method used to issue the tax bill)
• The Assumed Par Value Capital Method

You can calculate and pay tax using one of these methods. One of them will produce a smaller tax bill depending on the structure of your corporation.

Just call your Delaware registered agent and they'll take care of this.

Your registered agent will use the assumed par value capital method to recalculate the tax and you'll pay \$400.

And that's what I did. I paid \$400 in Delaware state taxes using par value capital method instead of \$70,000 that was on the bill.

Here's a brief overview of both methods.

## The Authorized Shares Method

Using the authorized shares method you pay \$75 for every 10,000 authorized company shares. Here's how you approximately calculate the franchise tax using this method:

```total number of authorized shares / 10,000 * \$75
```

If you've 10,000,000 authorized shares, you'll get hit with a \$75,000 tax. This is the default method that is used to calculate the franchise tax in Delaware. This is the tax bill you'll get. Don't pay this. Instead use the assumed par capital method.

## The Assumed Par Value Capital Method

The assumed par value capital method uses a completely different way to calculate tax that involves total gross assets, issued and authorized shares, and the par value per share. This method is much more complicated but it produces \$400 in the end. :)

It's quite impossible to explain the steps you need to take to calculate the tax using this method in a blog post. Please see examples, calculator and more information see How To Calculate Franchise Taxes on the State of Delaware website. Or better yet just call your registered agent and they'll calculate and pay this on your behalf.

Until next time!

Browserling March 30, 2015

# We've launched a public support forum for Browserling

I love my customers and users at Browserling so my team and I launched a public support forum a little while ago. Everyone is welcome to participate, even if you're not a Browserling's user. I love my blog readers, too. :)

The implementation was very straight forward. We created two database tables - one for discussion topics, the other for answers. The main support page selects all visible topics from the discussion topics table and renders them as html. When you go to a particular discussion topic, the answers get loaded from the answers table.

Being in touch with your users and solving their problems quickly and efficiently is something that every company should focus on. We strive to be excellent to our customers and users at Browserling.

Until next time!

Misc February 28, 2015

# My new workstation for the next two years (with pics)

I love working fast and I love getting things done quickly! I need fast computers to get things done quickly so I just built a new, fast and pretty cheap workstation. I'll use it for the next two years, then move it as a server, and get a faster workstation again. My budget for this build was \$2,000 (± \$250) but I managed to get a great build for less than \$1,500.

Kitties helping to unbox the new computer parts.

Here's the build that I got:

I created an Amazon list containing all these computer parts if you want to quickly buy them. I also created a PC Part Picker list.

I spent a lot of time choosing the components. I was optimizing for performance per dollar and electronic component quality. I run my computers 24/7/365 and do very important things on them, so I was ready to invest in high quality electronic components that won't fail on me.

At first I was thinking of going with the latest Intel's X99 chipset and the latest 22 nanometer Haswell-E architecture 5960X processor (8 cores) but after some research I decided to go with the Z97 chipset and 22nm Haswell 4790k processor (4 cores).

The new X99 chipset only supports DDR4 memory. DDR4 is just still too new and expensive, and it doesn't run much faster than DDR3 in real world applications. The 5960X has a base clock speed of 3Ghz but the 4790K runs at 4Ghz. 4790K outperforms 5960X by a huge margin in single threaded applications because of this extra gigahertz. It's actually the top #1 CPU in single threaded benchmarks, beating all Xeons, and other CPUs. And it overclocks like a beast to 4.7Ghz and more with no problems.

Intel i7 4790K processor in its original plastic package.

I chose the ASRock z97 Extreme6 motherboard. According to Tom's Hardware this motherboard leads the performance per dollar chart. Unlike other motherboards in the \$150 range, this motherboard has the high quality 12K capacitors and a 12-phase electric power circuit for the CPU. It was a no brainer to go with this board at this price.

Unboxing ASRock z97 Exteme6 motherboard.

My build has no graphics card because I don't play games and the 4790K has an integrated graphics processor (Intel HD Graphics 4600). Intel 4600 supports up to 3 screens and ASRock's Exteme6 motherboard has exactly 3 video outputs HDMI, DVI and Display Port.

Choosing the memory was very simple - the cheapest 16GB 1866Mhz DDR3 memory with 9ns CAS latency, which at the purchase day happened to be Crucial Ballistix Tactical BLT2KIT8G3D1869DT1TX0. There is no point in going with more expensive DDR3 memory (such as 2133Mhz memory or faster) because the benchmarks show that as the frequency goes up (to 2133Mhz or faster), the latency goes down (to 11ns or slower) and you don't get much benefits in real world applications. The synthetic benchmarks (raw write/read) show an increase, but the real world applications don't work that way and you get no benefits. 1866Mhz CL9 is the speed you want to go with with DDR3.

Installing two 8GB Crucial Ballistix 1866Mhz memory sticks.

For cooling I went with the top ranking air-cooling beast Phanteks PH-TC14PE. A cooler processor computes faster and has a longer life span. Unfortunately my Phanteks cooler arrived scratched, dirty and with someone else's fingerprints. The package had thermal paste smeared on it as well. It looks like Amazon messed up and put a returned cooler on sale. That was really upsetting because this cooler was priced at \$80 so I was expecting a brand new product.

The Phanteks PH-TC14PE cooler arrived scratched and dirty. So upsetting.

Mounting it on the motherboard wasn't easy. The spring screws simply wouldn't align properly and it took me more than 5 attempts to get it secured to the board. Perhaps that's why it was so scratched when I got it. The previous owner couldn't attach it to the board as well. Also the instructions were very confusing and I mounted the fans the wrong direction.

Phanteks PH-TC14PE with fans mounted the wrong direction.

For my next build I'm going with the Noctua NH-D15 cooler. The benchmarks show Phanteks and Noctua perform pretty equally. I tried Phanteks, was disappointed and now you, Noctua, have my attention.

I'd never go with water/liquid cooling though (such as Corsair H100i) because liquid systems need too much maintenance and they can leak if installed improperly. Even if installed properly, a liquid cooler can start leaking or it can have micro-leaks that will slowly cause problems down the road. I don't want to deal with these sorts of problems and I don't want to do any maintenance once my computer is under the desk. Once the computer is under the desk, it's under the desk.

As for the PSU, I went with Corsair AX760. It has brilliant engineering and is considered to be one of the best PSUs. It's also very expensive, currently priced at \$180. Corsair AX760 is a 760 Watt 80+ Platinum Certified PSU. When you're building a professional workstation, the PSU is the one thing you don't save money on and go all in.

Corsair AX760 is the PSU you want to go with when building a PC. It's modular, silent and super efficient.

Corsair AX760 runs at 90% efficiency at moderate loads.

Corsair AX760 runs at 90% efficiency at moderate loads.

I know 760 Watts is an overkill for a workstation that consumes 250 Watts at most but there aren't lower power Corsair AX-series PSUs. I'd have gone with 400W or 500W if there was one from Corsair. Corsair has a good reputation for the AX-series PSUs and I didn't want to try something new or less tested.

AX760 is also designed to be quiet. It doesn't use the fan if the load is less than 70% (530W).

Corsair AX760 has zero RPM fan mode if the load is less than 70% (530W).

I can't recommend Corsair AX760 highly enough. Corsair AX760 produces extremely low current ripple and current noise levels. Your motherboard, cpu and drives will love it. This is the PSU you're going with if you're building a similar PC.

Now talking about the hard drives, I messed up. I intended to go with Samsung 840 PRO 250GB drives, but I accidentally got Samsung EVO 840 250GB drives. Notice difference? PRO vs EVO.

I chose the drives based on The SSD Endurance Expriment. It shows that you just can't wear a Samsung 840 PRO. It's still kicking after 2PB of writes, while other drives in the experiment died at 800TB. I went on Amazon to get Samsung 840 PRO drive but didn't know there was EVO too, so I probably typed Samsung 840 in Amazon and ordered the first drives I saw. I just discovered this as I was writing this blog post. I thought I had the PROs until this moment.

I chose two identical drives for the system. I always go with multiple drives to prevent data loss in case of a failure. For this workstation I configured the drives in RAID1 (mirror). If one of the drives fails, I'm safe.

Two Samsung 840 EVO SSDs.

I've moved away from regular spinning HDDs for workstations. They're just too slow. My system boots in less than 10 seconds with the SSDs. The latest Intel Rapid Storage Technology's RAID drivers can read data from both drives in RAID1 mode, effectively doubling the read speed. I get 1GB/s read speed on my simple Samsung 840 EVO RAID array.

1000MB/s (1GB/s) read speed on Samsung 840 EVOs running in RAID1.

I still use HDDs for my Linux file server. They run in RAID6. I store terabytes of data for projects, random data (stuff) and data for workstation. The data is shared as network drives on Windows via Samba. But that's another story.

Network mounted drives for projects, stuff and workstation data.

Choosing the PC case was the hardest part. The PC case makers have all gone insane designing crazy cases with windows, buttons on top panel, weird shapes, etc. I just don't get it. A PC case should be a closed rectangular box with a power and reset button in the front. It took me forever to find a case that I liked. After reading many reviews I decided to go with the quiet Corsair Obsidian 550D case.

Corsair Obsidian 550d Computer Case. Just unpacked.

Installing Corsair AX760 PSU.

Installing ASRock Z97 Extreme6 motherboard with the Phanteks cooler.

It's working! (Phanteks fans mounted in the wrong direction.)

I don't recommend this PC case. At \$150 the quality just isn't there. I've seen better quality \$50 cases. I've no idea why it's ranked so highly by others. It's a trap.

Here are examples of the poor quality. Uneven front-panel USB ports with very sharp edges. So sharp you can cut fingers on the edges! Lowest quality USB ports I've ever seen on any front panel.

Corsair Obsidian 550D's quality sucks. Misaligned front USB-3 ports. Sharp too. You can cut your fingers.

Rushed cut and gluing of sound isolating material everywhere:

Obsidian's sound isolating material goes inch to the right on the inside of the front panel.

Uneven cuts in the side panel's isolating material.

Corsair has lost my respect as a PC case manufacturer and I won't buy a case from them again. Lame and unacceptable quality for a \$150 case.

Finally the extra bottom intake fan. Noctua NF-A14 140mm PWM Premium Fan. Impressive fan quality for an impressive price of \$25. I'd pretty much buy everything from Noctua if they manufactured all the computer parts.

Noctua NF-A14 140mm PWM Premium Fan's box.

Noctua NF-A14's box opens like a book.

Noctua NF-A14 fan unpacked. With a thank you note from the CEO.

The computer started working right away after I powered it up.

Booting into ASRock z97 UEFI BIOS for the first time. It's working!

Here are some additional pro-tips if you're building your own PC. The very first thing what you always want to do is to enable XMP and load the fastest memory profile.

Selecting 1866Mhz 9-9-9-27 XMP profile for the Crucial Ballistix Tactical memory.

The memory chips come with factory pre-configured XMP profiles so why stick with the default values when you can get extra performance for free.

After you've setup your computer and installed the software, the next thing you probably want to do is overclock the CPU. I overclocked this PC to 4.7Ghz at 1.32V. If you're not overclocking, you're losing out on free computing power. I just got a free 17.5% performance increase over the base speed of 4.0Ghz. Modern motherboards let you do so with a single click.

ASRock Z97 Extreme6 lets you overclock Intel's 4790k to 4.7Ghz with a single click from BIOS.

I overclocked my Intel i7 4790K to 4.7Ghz at 1.32 Volts.

As a bonus I got a new Microsoft Natural Ergonomic 4000 keyboard. Because you just can't code without it. If you're programming without this keyboard, then you're doing it wrong. Just kidding. :)

Brand new Microsoft Natural Ergonomic 4000 keyboard. I love this keyboard.

My next upgrade is going to be in about two years and I'll probably go with Intel's new Skylake platform. It's going to be very exciting. 14nm lithography!

Security January 31, 2015

You've to wait `2n` seconds between logins if you fail logging in `n` consecutive times.
The implementation of this security feature is just 20 lines long. Anyone can implement it in 15 minutes. The basic logic is the following - if a login is unsuccessful, then increase the unsuccessful-logins counter (`n`) for the user by one. If the login is unsuccessful again, figure out the time delta (`delta`) between the two logins in seconds and compare it to `2n`. If the time delta is less than `2n`, then make the user wait `2n - delta` seconds. Otherwise reset the counter and log the user in.