Surface Pro 4 Review

As my family’s tech support guy, I purchased and configured some computers for family members. I bought a Surface Pro 4 (i5, 8GB, 256GB) with a keyboard on sale for $1000. I’ve had a chance to use it for nearly a month. My overall impression is that the Surface Pro 4 falls short of good in most dimensions. I’m writing this review using the Surface.

Software

Windows 10 support for the Surface is painfully bad. The constant glitches make it frustrating to use. Just now the touchpad wouldn’t recognize a tap so I could fix a spelling error. And then the taskbar wouldn’t pop up when the pointer goes to the bottom of the screen. It frequently doesn’t recognize the keyboard when attached. I have to randomly touch things hoping it will connect. Sometimes the computer wakes up and freezes. It sometimes gets confused when switching between tablet and computer mode. I’ve had Windows Hello go into a cycle of locking the screen, turn off the screen, come back on and recognize my face, then go back to my desktop. Over and over! The touchpad forgets my settings when I log in, but remembers when I just open the Settings app. It does not “Just Work” like an iPad. Windows 10 is a usability nightmare.

The battery drains quickly. I haven’t timed it, but it definitely lasts far less than both a MacBook and my 2013 MacBook Pro. Occasionally Windows 10 will tell me that Edge uses less battery than Chrome, but Edge is unbelievably slow. I’ve been using this Surface for a month, so all the indexing and scanning it might do on a new machine is long finished. Microsoft really needs to focus on energy consumption.

The Surface Pen is utterly useless. Drawing on a screen is a niche task. For most users the only place you might use it is with OneNote. Microsoft, in their infinite wisdom, provides 2 versions of OneNote with different feature sets. You write your notes, but only OneNote 2016 can convert handwriting. You can draw diagrams, but only OneNote app can convert shapes. Even there it’s stupid. It converts squares and circles into nice shapes, but it doesn’t do anything with lines. They also support converting math equations. It took me a dozen tries to get “3 X 3” recognized. Surely it would be easier to type for all these use cases.

Finally, touch support is terrible. (Just now I took off the keyboard and the screen froze. I had to sleep and wake up to get it going again.) The onscreen keyboard isn’t as smart as iOS. I turned on spell checking, add a period on double space, etc. The on screen keyboard isn’t doing any of that in Chrome nor Edge. It sometimes does the right thing when I search in Windows. Just typing this paragraph in Chrome using the on screen keyboard has been frustrating. When I position the cursor near the bottom of the text, the keyboard pops up and hides the text I’m editing. Just now the keyboard goes up and down as I type for no damn reason. I have to tap the text again and again to get the keyboard. The whole thing is just terrible.

Hardware

The Surface feels like a premium product. No plastic, very solid build, good construction. It is comparable in quality to a Macbook Pro. The screen is excellent. The speakers sound good to me. The cameras seem quite good. Certainly the front-facing camera looks much better than my Macbook Pro. WiFi has been working great so far. I like the magnetic power plug, and magnetic holder for the pen. Thus far the fans haven’t come on, so it’s very quiet. Finally, the weight is really nice for a laptop.

On the other hand, the combination of a tablet and a laptop means both suffer. The tablet is just too big and heavy to use as comfortably as my iPad (1.7 vs 1 lbs). As a laptop, the kickstand is awkward to extend, and it is definitely not stable on a lap. The keyboard actually has nice key travel and feel, but it is wobbly and bouncy when typing. The touchpad is tragic compared to a Mac. Seriously, how can the combined efforts of the PC industry not create an acceptable touchpad? Finally, the Surface gets warm even as I’m typing in this review. That’s not good for a tablet.

Conclusion

When everything works, the Surface Pro is not bad. When things don’t work, I’ll toss it aside and use any Apple product instead. As a reasonably competent programmer, it took me a long time to resolve some quirks. There are still several I haven’t fixed. When I post issues to the Microsoft forums, the bots there invariably suggest I reboot, and then reinstall the OS.

I don’t believe it’s in Microsoft’s DNA to actually do anything well. Everyone knows that Microsoft ships half-baked broken crap in version 1. Then they spend years fixing some old issues and adding new broken features. If you must have a Windows device and you have low expectations, then I suppose the Surface Pro is no worse than any other PC hybrid. Nevertheless, I’m considering returning this computer and demanding my relative buy a conventional Windows 10 laptop. I think the tablet/laptop support is totally broken in Windows 10. I’m hoping a simple laptop won’t have so many bugs. I’ll reconsider when the Surface Pro hits version 10.

Macbook Review

I purchased a 12″ MacBook to setup for a relative. I got the low end 2016 model (m3, 8GB, 256GB) on sale for $1050. They will be using the laptop for light computing tasks: browsing, email, some office work. No video processing, maybe some photo editing. TL;DR: The MacBook is surprisingly good

The quality of the hardware is as good as we expect from Apple. They deserve to earn a premium for the high-end parts and the solid construction. The screen is excellent. The sound is pretty good. The touchpad is absolutely terrific. It really feels like it’s moving! The MacBook is very lightweight and feels good in my hands. I don’t mind that there’s only 1 USB-C port, but 2 would be better. Battery life has been awesome. The computer never gets warm doing light tasks. It’s basically a very fast iPad in a laptop form factor.

And then there’s the keyboard. Apple has a history of being the first to remove essential features from computers. This time it’s key travel. When I tried the MacBook at the Apple store last year, I really hated the keyboard. After using it for a month, I can now say I don’t hate it. It’s tolerable, but not great. The key travel is 0.5 mm. Compare that to the excellent keyboard on a Thinkpad Carbon X1 at 1.86 mm travel. The new 2016 MacBook Pro keyboard uses the same design but increases travel slightly to 0.55 mm.

I really like everything about the MacBook except the key travel. Compared to the Surface Pro 4 with i5 processor, the MacBook feels more responsive and faster. I haven’t run any developer stuff on it, but for regular tasks the m3 chip is surprisingly good. I’d really like to try the MacBook with an i7.Fortunately, Asus copied Apple with the Asus Zenbook 3. The Asus supports a more powerful i7 processor, 16GB RAM and the key travel is 0.8 mm. The only downside is the screen is 1080p. I haven’t seen this in a store yet, but the specs look great.

If you can learn to like the keyboard, the MacBook is a great laptop for everyone except those needing high-performance.

 

Notes on Backups

My normal routine for data storage and backups has been ad-hoc and stupid. I use Windows File History and CrashPlan for Mac to backup computers to a home desktop. Other important data is stored on various cloud services. Unfortunately my 8 year old machine is starting to fail, so it’s time to solve this issue.

Continue reading

Write Fewer Tests in Python

Sqlite has 1000X more code for testing than in actual source code! That’s phenomenal, but it’s common for companies to have 5X-10X more testing code. This seems like an area that programming languages and development tools should tackle. That is, think of ways to reduce the huge amount of extra code written for testing.

As an experiment, I wrote a simple Skiplist in Python 3.5 in a stream-of-consciousness burst of sloppy coding. I used pylint to catch many obvious mistakes. It’s about as good as any decent IDE. After some back and forth I had code that could be loaded into the interpreter.

I next used hypothesis to write tests using the unittest library. This tool is a Python implementation of QuickCheck, a brilliant library for automated property based testing. Consider the following code to test insertion into a skiplist:

@given(nums=lists(integers()))
def test_insert_integers(self, nums):
    sorted_nums = sorted(nums)
    self.assertEqual(0, len(self.skip))

    for i in nums:
        self.skip.insert(i)

    for i in sorted_nums:
        self.assertIn(i, self.skip)
    for i in self.skip:
        self.assertIn(i, sorted_nums)

    self.assertEqual(len(nums), len(self.skip))

The given decorator tells hypothesis to generate random lists of integers to feed into this function. The function inserts all elements into the skiplist and asserts some properties. hypothesis was able to find lots of interesting bugs in my code by printing a small example that caused the error. Unfortunately, hypothesis doesn’t play well with unittest because this single test method actually runs lots of tests. So it doesn’t run setUp and tearDown correctly. But that’s easy to get around for now.

The next step was to use Python 3.5 type annotations and mypy to do static type checking. You can either write unittests to check all this, or let the tools handle it for you. The type annotations are a bit verbose, and the syntax for adding type declarations for fields is atrocious. Nevertheless, it works really well and caught a few corner cases in untested code. There is a problem, though. I can’t find a way to add constraints on generic types. In my code, I want to say the generic type T must support the __lt__ operator. Right now it seems to work somehow.

Finally, I used PyContracts to write design-by-contract style code. It allows one to write additional constraints on your code. For example, in choosing how many levels a skiplist has, I added a constraint to the constructor @contract(max_level='>0') which verifies the input. I didn’t see many opportunities to add contracts to my code because it’s supposed to allow nearly anything, like a list. While contracts in .NET are fantastic, PyContracts are good enough. Though it needs to play better with 3.5’s typing syntax.

Despite all this I found a bug that could only be discovered by a code review. Searching through a skiplist is supposed to be O(lg n). However, I had failed to begin each level’s search where the previous level left off. So my search was correct, but O(n). How could a test discover bugs that give correct results? It’s really a performance issue that would only be revealed for large N.

Overall using types, contracts and hypothesis seems to catch quite a few errors. The only minor issue is it would be nice if all these things cooperated better. For example, if I state the type of a function parameter then both the contracts and hypothesis should use this information. if I add a contract, then hypothesis should use that to craft random input more efficiently. What techniques could I add next to better test my code?

I Lost My Wallet in El Segundo

Actually I lost my wallet in Venice, CA, but no one wrote a song about that. So what do you do if you lose your wallet while traveling? I had no government ID, no credit/debit cards and no cash. Nothing. Luckily I was traveling with a friend, but if I were alone I’d be screwed. Credit cards were sent to me in 2 days. They would not send debit cards to me, only to my home address.

To get through the TSA without ID it helps to have anything that confirms your identity. I had my new credit cards. FYI: I had a copy of my passport, but they didn’t want copies of anything. Tell the TSA agent you have no ID. They will call a supervisor over. It took a while for the guy to show up, so go to the airport early. You put your name/address on a document. Then they call some other office, give them your info and they ask some questions. I was asked for the last 4-digits of my home phone. Then my previous address (I didn’t remember the zip code). They asked for the name of a close relative. I offered my dad’s name. Then they asked for his birthday. I don’t remember anyone’s birthday; however, it happened to be my dad’s birthday and my phone alert had gone off that morning. I only remember his age because he hit a milestone the previous year. So some quick math and I had his birthdate right. I went through security and then had more checking. They did a quick pat down, the bomb residue test on me and my luggage. They didn’t search anything. Although I look like a terrorist, the whole thing was fine.

In the future, I need to pack some backup. I should leave a debit card in my luggage so I can get cash and buy things. For some reason the TSA guy asked for that, so it might be a more legit form of identity. If you look at the list of valid ID, I only have a passport but I don’t carry it for domestic travel. It might be worth getting a Global Entry card as a backup ID. Alternatively, maybe the state will give me another non-driving ID even if I already have a driver’s license. I can just leave that in my luggage.

One-Way Sync on Windows

I have pictures scattered and duplicated across multiple Windows machines. I want them all on one machine. So if picture [A,B,C] is on machine 1 and [B,C,D] is on the central server, I only want to copy A over. Pretty simple.

I tried to use unison, a fancy synchronization tool that sort of runs on multiple platforms. But I could not figure out how to get it to do this. I tried using “-force”, but it kept synching in both directions. Finally I switched to Windows’ robocopy. The command line is “robocopy /s /xc /xn /xo source-path destination-path”. The first option “/s” says to go down all directories. The other options say don’t copy the file over if the file changed or is older/newer. It’s not a clean way to do it, but it seems to work.

Why I still won’t use Windows

TL;DR: It’s the service and hardware vendors that suck, not the OS.

I upgraded a family member’s computer to Windows 10. It went smoothly and the new OS UI seems fine. The laptop is a Dell XPS 12 (2013). Overall it’s an OK computer if touch is your thing. In doing this I discovered a lot of strange behavior in the hardware/OS interaction that was there before Win10. Things like (1) the computer suddenly wakes from sleep and drains the battery. (2) The USB port that does NOT support Powershare still provides power when the computer is asleep. (3) All the Power Plans have disappeared. And so on…

I expect problems with computers. The issue is it is damn near impossible for a novice to find a solution. In this case, even I can’t solve these problems. The support from the hardware and OS vendors is near non-existent. The forums are filled with dumbasses giving partial or incorrect answers. The OS doesn’t offer many clues. I’ve wasted far too much time searching for solutions.

Honestly, for most people Mac OSX is nothing special, except it Just Works. People spend 90% of their day in the browser anyway. Being able to walk into an Apple Store and have a “Genius” fix simple problems is a killer feature. AFAIK there is nothing comparable for Windows nor any consumer hardware vendor. Dell’s XPS support was never useful. Best Buy’s Geek Squad is a royal ripoff. ($70 to fix your email!) If Microsoft can’t entice hardware vendors to do a less shitty job they will continue to lose market share to simpler devices. The jury is still out on the Surface.

Google’s ChromeOS is the right idea, but still falls short. What can it do that can’t be done with a tablet + keyboard? Most people would rather get the latter. Some people still require extra software to connect to work and run work applications (like WebEx or Excel/PPT or VPNs). Those applications are ported to iOS/Android before ChromeOS. Also, the Chrome hardware is mostly $300 plastic garbage, plus the expensive Pixel.

Apple wins because their service is fantastic (IME), their hardware/OS combo Just Works, and OS X is good enough. Microsoft loses because even if Win10 were perfect, the service is abysmal and the hardware/OS combo is atrocious. The Surface might solve the last point. ChromeOS is in the middle because the hardware/OS just works, there is no service (AFAIK), and the OS might be just short of good enough for some people. A tablet + keyboard is better than ChromeOS for most people because iOS/Android has more apps.