Monday, December 16, 2013

Nexus 5 Review

The LG Nexus 5
Ok, let's keep this short and sweet because god knows there isn't much to say. These Google phones are getting harder and harder to tell apart. This LG Nexus 5 is a tweaked Nexus 4.

Overall Experience
The LG Nexus 5 experience is essentially the same as the Nexus 4 experience, with some upgrades. Which is awesome. The Nexus 4 was an excellent phone and the Nexus 5 builds upon that legacy. Yes, that is the exact same sentence from my Nexus 4 review.

It's based on the LG G2, just as the Nexus 4 was based on the LG Optimus G.

Build
The Nexus 5 goes back to a plastic back. But it doesn't feel cheap. It feels nice and smooth, even if it is a bit of a fingerprint magnet. Mine is matte black, so it looks and feels a bit like the cowl of Michael-Keaton-Batman.
From the back side
The front is basically the same as the N4. The screen is a quarter of an inch larger. Which is great. But the body is 4 cm longer.  Which is less great; but barely noticeable, especially with the smaller top and bottom bezels. It's supposedly only 9 grams lighter, but it feels even lighter than that. It feels like one of those fake phones with no internals. The lightness is awesome. That, combined with the glassless back makes it feel a lot less breakable than the Nexus 4. I suppose it also makes it feel less expensive, but I've been schlepping around this N4 for a year so anything new feels fantastic.  The Nexus 5 is 0.5 mm thinner, and at this point you wonder why they're not keeping new phones just as thin and adding more battery.

Camera
The Nexus 5 has a great camera. In the daylight. Night pictures are still pretty grainy, but when there's light things look good. Sometimes touching the screen to focus has the opposite effect, making everything blurry. The optical image stabilization isn't noticeable.

Display
The Nexus 4 had a pretty much perfect display. The Nexus 5 seems slightly brighter with a slightly better contrast. The color reproduction seems better but it could just be the warmer colors. If the Nexus 4 display is a tad blue, the Nexus 5 is a tad yellow. It's 1080p versus the Nexus 4's 720p, which makes things seem a little crisper, but it's hard to tell. The sharp pictures and text could be due to the larger screen size.

Battery
The battery life is the same.  It lasts all day with light use. It's not removable.

The Nexus 4 (left) and the Nexus 5
Performance
The Nexus 4 was fast with basically no lag and the Nexus 5 feels about the same.

Data
Although I routinely got 7-13 Mbps Internet on my Nexus 4, the Nexus 5's LTE is a welcome feature.  I've seen 31 Mbps downloads from my Ookla speed tests, which is double the speed of my already blazingly fast cable Internet at home.

Storage
Finally, Google recognized that we're in the 2010s and that people need a reasonable amount of storage. The Nexus 5 has a 32 GB version (although I have the 16 GB version): enough space for most people's music collections and other data they might want on their phones.  There's still no SD card slot.

Operating System/Ecosystem
The Nexus 5 comes with Android 4.4 KitKat.  There are a lot of under the hood changes that most users won't notice.  What stands out:
  • A new launcher with Google Now as the leftmost page and the home page as the second leftmost page
  • Transparent notification bar, button bar and app drawer
  • The Google Now search bar is always listening and will open if you say "Okay, Google"
  • A new dialer
  • Caller ID for businesses, so now the name and picture comes up when you dial that Pizza Hut number
  • Letting you select your launcher in settings
But since KitKat is available on other devices, you may already be used to these.  The Nexus 5 does, however, have a few drawbacks that are only available on the Nexus 5!
  • There is no more default SMS app. Unless you download a 3rd party texting app, you have to use Hangouts to send texts.  Which would be fine if I could list my texts separately from my Hangout conversations, but you can't.
  • T-Mobile's Visual Voicemail doesn't work with the Nexus 5 (as of Dec 17, 2013)
There are workarounds here. You can use a 3rd party app for texting.  Or you can probably find the .apk for the old Messaging app.  What sucks is that since texting is stored differently than before, some apps like SMSBackup+ can't restore your texts from your previous phone. You need to use a SMS app that can act as your default SMS app.  What worked for me:
  1. Download SMS Backup and Restore on both your new and old phones.
  2. Use it to backup all your texts on your old phone (I'm not sure if it supports MMS).
  3. Transfer the .XML file that contains your backed-up texts to your Nexus 5 (or other new phone) using something like Google Drive.
  4. Restore your texts on your new phone.  When it asks you if you want SMS Backup and Restore to be your default SMS app, say yes.  If you don't check the box for duplicate detection, this goes very fast. Mine copied like 5,000 texts in less than 2 minutes.
  5. Switch your default messaging app back to Hangouts (or whatever app you want to use).
As for T-Mobile's Visual Voicemail app, you can find the .apk file at xda-developers. Click on the file attached by o_z0ne. It works for me.

Everything else is the same as before:
  • Android has fewer apps than iOS, but there are so many at this point that you can basically find whatever you want. There are more apps than Windows Phone.
  • Android is way more customizable than both Windows Phone and iOS
  • The hardware ecosystem is still excellent, of course. SlimPort for video output (it seems to work a lot better than the Nexus 4), micro-USB for charging, and NFC to send links, apps, and pictures to people.
Other Notes
The Nexus 5 is available on AT&T, T-Mobile and Sprint (suck it, Verizon!). If you buy it from the Google Play Store, it's $350-$400, but it's more expensive from the carriers--reportedly because Google charges them more. I'm not sure what's stopping carriers from buying phones from the site and selling them for like a small markup.

Nexus 5,
posted up against the wall
So I recommend buying directly from Google and then getting a cheap no-contract plan.

Conclusion
Is the Nexus 5 worth the upgrade from the Nexus 4? Not just no, but hell no. GottaBeMobile agrees. It's just a few small, mostly unnoticeable upgrades. But most people have 2-year contracts, so it is definitely a worthy upgrade from the Galaxy Nexus for the performance, battery, screen and camera. Also, the Galaxy Nexus won't be upgraded to KitKat, so there's that.

The Nexus 5 slightly improves an already amazing phone: stock, always updated Android (ignore the Galaxy Nexus aberration); good camera; light; thin; good battery life; great performance; LTE; available on 3 carriers; fantastic display; and a 32 GB option; all for about half the price of any phone with competing specs. I'm going to make it easy for you: unless having a great night-time camera is important to you, I'd recommend this above all other smartphones.  If you want an awesome camera, get an iPhone 5S or Nokia 1020 or maybe a Galaxy S IV (I'm not sure what Android phone has the best camera).

Friday, November 29, 2013

Heads Up: Dark Patterns

Sometimes computer interfaces seem incredibly confusing and poorly designed. It's almost as if it's intentional.

It often is intentional.  These are called Dark Patterns.  For example, when purchasing cable television online I came across this screen:



Notice that right below the phone number input is a checkbox labelled "This is a cellphone number." It would seem that you could check that box so that the company will not call your cell and use up your precious minutes.  However, in smaller print, it says that checking the box will sign you up for activation, installation and promotional messages.  They want to know whether the number is a cell or not so that they can send you ads via text messages.  Why else would they hide the important information in small text?  If I were designing this form, the large text would say "Use this number to send me updates and promotional text messages".  That's clear and honest.  But less people would check the box if that was the case.

"A dark pattern is a user interface carefully crafted to trick users into doing things they might not otherwise do, such as buying insurance with their purchase or signing up for recurring bills." - Harry Brignull, founder of darkpatterns.org.  See all the different types of Dark Patterns at http://darkpatterns.org.

"Dark Patterns" also exist outside of software.  I'd call it a Dark Pattern when you get mail that says "Final Notice" on the front, as if some bill were due.  These types of junk mail advertisements usually hide the fact that they're selling you something.

Mortgage Data? This sounds official! There's no way this is an insurance advertisement!

On the computer or on a piece of paper, this type of communication is misleading and unethical, but still legal.  So be careful of these companies that are one step above Nigerian scammers.  However, companies that are straightforward with their customers or potential customers should be applauded.  They may sacrificing some short term gains made from naïve users, but they will make up for that loss with customer loyalty.

Friday, October 25, 2013

6+ Ways to Make Your Company as Great to Work for as Google

This post is for the CEOs and people who have the CEO's ear.

For the last four years, Forbes has named Google the #1 best place to work.  I'm told that Google gets huge numbers eager applicants every year.  Most of the software engineers I know want to work at Google.  As a Google employee, I can confirm that Google is indeed a great place to work.

But Google doesn't have some magic bullet.  Sure, spending money on employee perks are an obvious way to increase employee happiness, but it's not the only way.  And not every company can do what Google does, but most companies that employ a set of skilled professionals--especially software companies--can implement some or all of the features that make Google great.  And by making your company an awesome place to work, you will perfect the art of employee recruitment and retention.

I will list six ways to make your workplace better.  And then I will list some more.  It was getting to be a rather long list, so I tried to boil it down to six essentials.  And then failed.

1. Hire the smartest people
Seems like a no-brainer, but I don't think many companies follow this rule like Google does.  Whereas some companies will hire mediocre engineers because they simply need warm bodies to code, Google (sadly) discards a lot of good candidates because we are so serious about hiring brilliant people.  And while passing on good candidates is definitely a bad thing, Google is full of brilliant people as a result of our rigorous hiring process.  The obvious benefit is that smart people work more efficiently and can tackle difficult problems, but as an added bonus, having lots of smart people at your company helps recruit other smart people.  Ray Kurzweil works at my company!  Maybe I'll get to meet him someday!

Hiring the smartest people is hard to do if your company isn't one of the best places to work for, which is what brings us to #2...

2. Treat your employees well (with pay and perks)
If you ask most people what their employer could do to make them happier, the first thing they'll say is to increase their salary.  Obviously, you should pay your employees the going rate for their respective jobs, if you can afford it.  But money isn't everything.  Giving employees perks is another creative way to spend that extra cash you have on employee happiness.

Google employees get tons of perks, from game rooms, work parties, free meals, free valet, matching 401k contributions, gyms, free meals, beautiful working environments, free meals, and, lastly, free meals.  I'm very big on the free meals.  On-site perks, like the meals, will keep employees at work longer and prevent them from taking 2 hour off-site lunches.  All of which can boost productivity.  The only problems with perks are that they cost money and some people may take advantage of the employer's generosity.  Which brings us to #3...

3. Hire honest, caring people
Honest, caring people care about the company they work for, especially when that company cares for them. They try not to cheat the company by overusing perks. It also can help team dynamics.  But how do you recruit good, honest people?

When people talk about how evil a company Google is, I think it's amazingly hilarious and thoroughly frustrating.  Every single decision by Google that has ever been considered possibly evil by the public has been internally protested and ridiculed repeatedly by Google employees.  That's because the company is full of employees who care about the Google's economic, social, political, and psychological impact on the world and we hate it when a head executive makes a bad decision.  We honestly believe that, overall, we're doing good in the world.

Being good is hard and is often expensive, but it helps recruit and retain honest, caring people.  And it has a side benefit of helping the public image of your company.

5. Use the right tools
Google employees have tons of internal software and hardware tools that help us do our jobs.  Some companies are reluctant to upgrade software engineers' computers until they are too slow to run.  Some companies don't want to shell out money for software that can improve productivity.  Google generally keeps their engineers' hardware up to date, and buys or builds software tools that make our lives easier.  From our version control system, to our cloud code repository software, to our testing infrastructure, to our laptops; Google invests a lot of time, energy, and money into making sure we have the right tools for the job.  I'm not saying all our tools are perfect, but it's usually a question of which tool is best and not whether a manager will shell out money for it.

Good tools make employees productive and happy.

6. Share internal information
Sharing information means two things: managerial transparency and knowledge transfer with efficient, persistent interoffice communication.

Transparency is hard.  I once worked at a defense company where it was legally impossible because of security issues.  But at Google, we have a weekly all-hands meeting where we talk about what's going on in the company to a surprising detail, and low-level employees can ask CEOs and division managers questions.  I think it brings us together as a company and makes employees feel that they have a voice.  The downside is that some employees leak information about upcoming products and services.  These leakers are fired as soon as they are identified, of course, but the leaks are a known issue with our transparency.

Knowledge transfer is the most important part of sharing internal information.  Googlers teach other googlers through technical talks, postmortem talks after failures, coding tutorials for our different internal projects and lots of informal presentations.  I recently learned how to use a new integration test framework at Google.  As soon as I finally got it all working, I was told: "Good, now you can teach us all how to use it."  I strongly believe that the amount of engineer-to-engineer teaching we have at Google is what makes us an intellectual powerhouse.

And even when the teaching is not formal, we have a lot of interoffice communication.  We have online forums (implemented with Google Groups) where we can post any question we have about any tool or project and have it answered quickly by other people who are using the tool.  For internal tools, the person who answers your question will probably be the engineer who wrote the tool.  The great thing about forums is that the information and answers are online forever.

In addition to forums, we use email, chat, and video chat to ask experts how to get things working.  I'm working on a project now with a guy two states over from me.  I've sent and received code reviews from people all over the world.  This interoffice teaching and collaboration is incredibly powerful.

Knowledge transfer is more of a tool to make employees efficient, but I also think it makes Google a great place to work.  It makes our jobs easier, and we can build relationships with people we haven't met face-to-face.

Others
Now that I've detailed 6 excellent ways to make your company a great place to work, I'm going to list a few more that are almost as important:

  • 20% Projects. Googlers will sometimes spend 20% of their time on a side project and 80% on their main task.  This is a win-win for companies because employees are happy to work on something that they think is cool, and the finished project is usually something that improves Google.
  • Reuse Code. A lot of google code is stored in one repository that can be seen on internal websites.  This helps us not reinvent the wheel if we're writing something that's already been done before; and it helps to see different examples of how to implement something, when we're doing something slightly new.
  • Make telecommuting work. Because of my laptop, our excellent videoconferencing software and all our internal websites, I can stay home all day, for days and still be 95% as effective as I am at work.  This also helps with knowledge transfer; being able to attend meetings from home or on the road.
  • Dogfood.  If you have consumer products, use them.  It allows you to find bugs and poorly implemented features before the customer gets them.  It also saves money.  And if your products are cool, your employees will enjoy this.
  • Use free and open source software (FOSS) when possible.  Free means you save money, open source means you can hack it if you don't like it.  This makes your company a better place to work because the money can go elsewhere, like to your employees! The one caveat: only do this when it's right.  Don't use crappy tools just because they are free and open source.

I hope that more companies follow Google's methods.  Who knows, making our workplaces great might improve the human condition!

This article was not requested, sponsored, or endorsed by Google, Inc.

Saturday, October 12, 2013

Chromebook Pixel Review

Chromebook Pixel
The Chromebook Pixel is Google's take on a high-end Chromebook.  The idea seems ludicrous at first: a high-end version of a laptop whose main selling point was its low cost.  If you're going to sell a $1300 laptop, why not get a high-end Windows laptop or mid-tier Macbook?

The Pixel is a niche market for sure.  But to understand its existence, we must acknowledge the other benefits of Chromebooks.  Namely the ease-of-use, the lack of malware, the near-instantaneous startup and shutdown times, and the great battery life.  The Chromebook Pixel's keeps all of these features except one: the battery.

Overall Experience
I've never owned a high-end laptop before, so using the Chromebook Pixel is a special treat for me.  I only use it for work, and 99% of the time on my work laptop, I'm in a browser.  The other 1% of the time, I'm writing quick notes in gedit (a linux text editor) or in the terminal, ssh'ing to another device.  Because of this, the Pixel fits my use case perfectly.  For anyone who fits the use case of Google Chrome OS, it is an awesome device that is a pleasure to use.

Build
Since this is my first high-end laptop, I have little to compare it against, except for the few minutes I've spent using a Macbook Pro or Air.  The build of this laptop meets that Apple-level of quality.  It looks gorgeous, is light at about 3.4 lbs, has a unibody frame, is covered in a lovely anodized aluminum, has a good-looking backlit keyboard (the font is like a Macbook--or really, any high-end laptop nowadays), with the best touchpad I've touched.

I've touched Macbook touchpads and, truly, they are great.  I often think of them when I'm using my crappy Lenovo laptop touchpad, wishing a PC manufacturer--any PC manufacturer--could figure out how to make that touchpad and put it in a laptop that runs Windows.  While the Pixel doesn't run Windows, it seems to have the quality and responsiveness of a multitouch Mac touchpad, plus a glorious texture that I would compare to the tip of a pencil eraser.  It feels the lightest touch, and handles gestures with up to three fingers (if there are any four-finger gestures, I don't know what they are).  Admittedly, the Pixel would be improved with a right-click button, but using Alt + mouseclick or a two-fingered mouseclick does the same job.

The monitor swings open and closed with ease, but feels sturdy.  The keyboard feels as sturdy as a desktop keyboard.  The multicolor light on the back of the monitor is a delightful icing on the cake.  I've never felt this on a smartphone: it feels both simultaneously expensive and durable.  Like it costs a lot of money, but I could drop it a short distance and it would survive.

This laptop is damned sexy.

Hardware/Performance
The hardware seems excellent.  It's difficult to accurately test how much a Chromebook can handle because of the limitations of Chrome OS (how do you load Crysis on it?), but it never lags.

The specs are not super impressive, it's just an Intel Core i5 with 64 GB of storage, and 4 GB of RAM, but the OS puts those to awesome use.  Really, the 32 GB version would have been sufficient, since I don't store anything locally.  But I the SSD aspect helps out with the speed of the Pixel and perhaps its battery use.

Other notes:
  • The 720p webcamera is sufficient.  People will be able to see what you look like in Google Hangouts.
  • There is LTE included on this version, but I don't use it.
  • The laptop does get pretty hot after some use, but not crotch-scorchingly so.
  • There are two USB ports, but you're not going to use more than one, if that.

High resolution text. This is the same picture
from above, just zoomed in.
Display
The display is pretty much perfect.  The decision to make it 3:2 instead of the standard 16:9 was an odd one, but it works out.  I spend much more time reading documents than I do watching video (again, it's my work laptop), so 3:2 is perfect for that and other activities that involve horizontal movement.

The resolution at 2560 × 1700 is heart-stopping.  I don't know why they made the Pixel's screen so high-res.  There are only two times when I use it: when watching the hi-res video that came preloaded, and when looking at my super high-resolution desktop wallpaper.  It's nice to see that wallpaper every time I start the computer, but then I launch Chrome and look at stuff that would look just fine in a lower resolution.  I guess it also makes the fonts look nicer, but I don't have an issue reading text on lower resolution screens.

It's hard to say whether or not the touchscreen is a gimmick.  I find myself using it often, but that's probably just to justify its existence.  The screen is multitouch, so that's nice, although there is no pinch to zoom.  If you're not typing much, like if you're showing some webpage to someone sitting next to you, I can see using the touchscreen aspect a lot.  The screen is also very responsive to touch.

The viewing angles are so wide they jumped up in the air and got stuck.  But seriously, you can see the screen from any angle. Also, the IPS screen gets very bright.

Battery
Battery is the only hardware aspect that could've been improved.  Regular (cheap) Chromebooks can get 6 hours and more out of the battery because of their skimpy hardware.  The Pixel gets around 4 hours, which is slightly better than a high-end Windows laptop (they seem to be around 3 and less), but still not as much as you feel you deserve for such a lightweight operating system.

Operating System
The operating system is what makes the performance of this laptop excellent.  I've never been very impressed with the concept of Chrome OS.  I often find myself with slow or nonexistent Internet and am a big fan of local storage.  To enjoy any Chromebook you need to give yourself entirely to the cloud.  That doesn't necessarily mean using Google services like Drive, Docs and Play, but it does mean you have to use some online service, like Dropbox or SkyDrive.  For my work, this is easy.  The few times I'd use gedit for notes, I use Google Docs instead.  Whenever I'd use the terminal to ssh into work, I use Chrome's Secure Shell extension instead.  The OS meets 100% of my work use cases.  But I cannot use the Pixel for a home computer.  For home computing I need to be able to save things locally, use VLC to play mkv files, and other things like that.

However, for those of us who spend most of the time in a browser, the OS is fantastic.  Mostly the speed is what stands out.  This laptop starts up to the login screen in about 10 seconds (6 seconds when trying it now).  Another 5 seconds to log in--mostly because of my slow typing--and then you're in.  Unlike Windows, there's no waiting another 10 minutes for your computer to slowly become responsive.  It's at full speed from the moment you log in.

And when you log in, Chrome OS remembers all your tabs.  You don't have to worry about remembering which tabs are up and in what order because it saves everything.  It's a bit like if Windows' sleep mode, except no power is used.

Just like other Chromebooks, the Pixel is as easy-to-use as the Chrome browser and is impervious to viruses, trojans and worms.  The only aspect that is difficult to use with the Pixel is the keyboard.  There is no Caps Lock button, you have to use Alt+Search for Caps Lock.  Other keys like Page Up, Page Down, and Delete are achieved by key combinations.  Luckily, you can find all these combinations with Ctrl+Alt+/.

Conclusion
"Everyone should want a Chromebook Pixel--I certainly do. But almost no one should buy one." -The Verge.

"Google hammered one phrase home when asked who the Pixel was for: 'the power cloud user.' [...] If you're a busy executive whose work requires you to be online and on the go, [...] you should seriously consider the Pixel." -Mashable

I'm not sure even a busy exec should get this.  Even if you just need a basic computer to access the web, enjoy quality laptops and have no idea how to avoid viruses, the Chromebook Pixel is a hard sell at either $1300, or $1450 for the 64GB, LTE version.  A low-end Macbook Pro or Air would look and feel just as nice, and also cost cheaper.  There are a couple of Windows ultrabooks that would beat this in functionality and price.  A Windows Surface might be a good alternative.  The unique and peerless touchscreen and the instant startup time can't beat the functionality of a full-featured OS like Windows or OS X.

Basically, you should only get this if you require a simple, virus-free machine... and you can't stand Apple products.

Typed on my Chromebook Pixel.

Sunday, August 11, 2013

How Does the NSA Collect PRISM Data?

prism logo
News outlets and social media have been abuzz with talk of PRISM, the NSA's secret mass electronic surveillance program revealed by Edward Snowden.  For more information about what PRISM is, read the excellent article at The Verge, "Everything you need to know about PRISM". This article covers everything except how data is collected.

We still don't know exactly how data is collected. Slides from the top secret presentation that Snowden leaked to The Guardian and The Washington Post state that the NSA has direct access to the servers of Google, Facebook, Microsoft, Yahoo, Apple, AOL and others.  These tech companies have denied that such direct access exist.  For example, Yahoo stated publicly: "Yahoo! takes users' privacy very seriously. We do not provide the government with direct access to our servers, systems, or network."  The other companies have given similar statements.

Someone must be lying.  It doesn't make a lot of sense for a top secret internal presentation to be false. No one was supposed to see it.  However, tech companies don't have any reason to lie, either.  If they were complicit in the PRISM program, it will likely come out eventually, and their denials will result in extremely bad PR when their cooperation is revealed.  Although the government can use FISA warrants to collect data and keep the company quiet, I don't imagine that the company has a legal requirement to actively deny participation in government programs.

What is the truth?  Well, one hint is the XKeyscore program revealed by Snowden several weeks ago, which gives us insight into what data is being collected.  XKeyscore allows for the collection of emails, web searches, social media data, and other types of data.  According to one presentation it collects data on "nearly everything a typical user does on the internet." That still doesn't answer the question of how data is collected, but we can surmise from the type of data collected: this is mostly data that can be collected from internet service providers and major hubs of the Internet.

While tech companies have denied giving direct access to the government, I have not heard such claims from ISPs.  Since everyone accesses the Internet through an ISP, it would be a simple matter for the government to create a FISA warrant that allows the NSA to get access to an ISP's data and prevent the ISPs from disclosing that the warrant was ever received.  We know that the NSA is collecting phone call metadata from the four major US phone carriers (see MAINWAY). It would follow that the NSA is also collecting Internet data from the major US ISPs.

Even if the NSA isn't directly collecting data from ISPs, they could also collect data from major Internet routers that make up the backbone of the Internet.  I'm a little rusty on this, so I may not get this 100% correct, but the Internet is composed of a bunch of networks, which are connected by routers.  The only job of these routers is to forward packets of data to their destination.  Many of these routers are located in the US.  For example, one of the largest Internet networks in the world is Equinix, owned by Equinix, Inc.  Equinix has data centers all over the world, including over a dozen in the United States.  The NSA could serve Equinix with a FISA warrant, plant surveillance software one or more of their routers, and monitor all data passing through the router.  This would allow the NSA to spy on millions of users' Internet activities--and not just Americans, but anyone who was using this American network.  If the NSA monitored most of the major Internet routers that were physically located in the US, I imagine they could monitor most of the world's Internet traffic.

This is how I speculate the NSA is obtaining PRISM data.  While it does not give the NSA direct access to tech company servers, they can directly access data being sent to and from these companies.  I think the presentation perhaps exaggerated the directness of the data access.  Perhaps it was intentional on the part of the presentation authors.  PRISM users were supposed to think that tech companies were cooperating with the government, so that these NSA analysts would have less questions about the legality of PRISM.  Often, in secret facilities, one employee doesn't have the clearance to know what another employee knows.

In any case, I imagine that the NSA is using one or both of these ways to collect PRISM data.

Saturday, May 25, 2013

Other: Code, Grammar, Gender Politics, and Gender-Neutral Singular Pronouns

Not only do I obsess about software engineering and gadgets, but I'm a grammar geek as well. Furthermore, I'm very big into gender equality.  Which is why I had a minor struggle at work recently when I had to figure out what to write for a gender-netural singular pronoun in a code comment.

It was something like:
    // Give the user the option to disengage so that he or she or it can rejoin later
    foo.allowDisengage();

Because I'm writing professional code that could possibly be read by thousands of people, it was different from, say, a blog post, where one can write whatever he wants.  ;)  Writing code also means there is a limit to how many characters I can put on a line, and in this case I had 100 characters, which includes tabbing.  So what does one do when faced with this dilemma?

A lot of people would just write "they", as in "so that they can rejoin later", but that's grammatically incorrect and also physically painful to me.  Just using "he" is arguably sexist, and so the same could be argued for "she".  Switching between the two to give equal time to both genders (as I have done in college essays) isn't an option in such short documentation.  Using "he or she" is awkward and feels like a waste of letters when facing 100-character limits.

I'm a big fan of Spivak pronouns, which are words that were made up for the sole purpose of giving English some gender-neutral singular pronouns.  Instead of "she", "her" and "hers", you might right "ey", "em", and "eirs".  But I'd get a considerable number of questions in my code review if I used "ey".

Grammar Girl--a blog that everyone needs to bookmark--suggests you rewrite your sentences to avoid the problem, which is what I did.  Something like "Give the user the option to disengage so that rejoining later is possible".  The Grammar Girl also says that "they" is the future of generic singular pronouns, but I hope not.  I am a huge fan of not changing the definition of the English words so that, thousands of years from now, English speakers will be able to read current texts with no trouble.  Adding new words (like Spivak pronouns) is fine.  And there's no way to tell if a pronoun is referring to a single entity or multiple when you use "they".

A friend also suggested using "s/he", which probably would've served my purposes just as well.

Update: Everyone should just use singular "they".

Saturday, May 18, 2013

Code: FileStructExaminer

I wrote a program, FileStructExaminer.

It's a hex file viewer, for programmers and other people who look at data files a lot. It's free, open source, and GPL-licensed. And it's the main reason I've taken a year and a half break from this blog. Changing jobs also had an impact. To explain it further I will post the FAQ.

In theory, I should begin updating this blog now, but between a more demanding job and my other hobbies, I'm not sure what I can promise in terms of updates.

Downloads:




FileStructExaminer FAQ:

1. What is this? Who? When? Where?
FileStructExaminer is like a hex editor, except that you can't edit. You can view files.  So it's like a hex viewer.  However, the main point is to see structures within the file. It was written by Omari Christian and finished in early 2013.  Right now it is hosted at dropbox. Go to Omari's Tech Blog (omaritech.blogspot.com) for the current location of the program and its code.

2. Why? How?
This was created for several reasons, mostly for fun and also to exercise my Java programming skills. I wasn't programming in Java much at work when I began the project.  It was also created because the hex editor I was using at the time didn't allow conditional statements (if, else, etc.).  I couldn't find a single free hex editor that supported conditional statements, so I wrote this one.

It was written in Java, using the Netbeans IDE.  Java was used for practice reasons and because it's easy to make a nice GUI.  Java is also pretty portable.

3. How do I use it?
Please see the User Guide.  For help with the struct file language, see Grammar.

4. Why is it so terrible?
Several reasons.  All my reasons for starting this project pretty much were killed off.  I started writing this in 2012, when I wasn't using Java much at work and had a bit of free time to work on it.  I also thought I might use it, since I was working with binary files that had a certain structure to them.  A few months later, I found myself with a new job, writing only Java code, and with very little free time at all.  I was fairly certain I wasn't going to ever use this software.  I pretty much abandoned the project.

However, I had put a lot of work into it, and it was almost at a state where it was usable, so I eventually just decided to scrap a lot of features that I was going to put into it and put only the most basic functionality into FileStructExaminer.  That way, at least it would be released and my effort wouldn't be in vain.  Maybe it would be popular and I'd finish it.

It's sorta rushed for that reason.  There are a lot of features I wanted to put into it, most notably arrays, but also more operators, struct dereferencing, a struct definitions section and more.  Alas, there was no time and I was running low on motivation.

Also, it's the biggest project I've ever worked on outside of work or school and I did it all myself.  I feel proud of what I accomplished, but I acknowledge that it could've been much better.

5. How does it work?
Upon startup it checks the settings.ini (if it exists) file for a structure file.  If it doesn't exist, it is done starting up until the user provides a structure file.  When the user provides a structure file, the file is first lexed into a text file that's easier to read (spacing added, comments removed).  The file is then parsed into a list of items (vars, conditionals, structs, ints, chars and other datatypes).  Any errors in the structure file are shown to the user in the main window.  If the structure file is error-free, the user gives the program a binary file.  The binary file is then parsed.  Every structure file item in the list is assigned a value based on the data in the binary file.  If a condition in a if-conditional is true, the items in that if-block are parsed.  If not, they are ignored.

Assuming there are no errors parsing the binary file, the structure and data of the binary file are displayed in the main window.

6. Future plans?
I had planned to release this as a first version and add features as people requested them; now I have no plans to do so.  I don't have the time or inclination to work on this project anymore.  That's why I'm releasing the code.  If people see potential in this, perhaps they can continue the project.

7. I found a bug.
Then download the code and fix it?

Saturday, January 26, 2013

Nexus 4 Review

I never did a formal review of the Galaxy Nexus, which is fine because I'm going to do one right now.  The new LG Nexus 4 is so similar to the Samsung Galaxy Nexus, it's impossible to review one without reviewing the other. The Nexus 4 is to the Galaxy Nexus as the iPad 4 is to iPad 3: incremental upgrades.

Overall Experience
The LG Nexus 4 experience is essentially the same as the Galaxy Nexus experience, with some upgrades. Which is awesome. The Galaxy Nexus was an excellent phone and the Nexus 4 builds upon that legacy.

LG Nexus 4
Build
There's a significant difference between the Galaxy Nexus's build and the Nexus 4's build. The Galaxy Nexus was unique, with its curved back with a dimpled texture.  It felt very thin at its thinnest part.  And while it didn't feel plasticky, it didn't feel as "expensive" as, say, an iPhone.

The Nexus 4 feels expensive. Even though, for some strange reason, the few people I've let hold it say it feels lighter than the Galaxy Nexus, it's actually 4 grams heavier than the GSM Galaxy Nexus. It doesn't feel cheap at all. The front is Corning Gorilla Glass 2 and the back, like an iPhone 4 and 4S, is made of glass as well (glass only covers a small portion of the iPhone 5's back). This makes for a very smooth, expensive feeling.

That's not to say that expensive is always good. Lighter is generally better than heavier when it comes to electronics. This will be especially apparent when manufacturers start to replace the lost weight with durability or extra battery life (i.e. they add back the weight with protective casing and/or a larger battery). Also, glass cracks easily. There have been numerous reports of cracked and scratched back glass on the Nexus 4, so it seems that the back's glass is not Gorilla Glass. But I digress.

There's no curve to the back. The Nexus 4 is just a flat slab. With a sparkly back that shines like a disco ball. Simple. Elegant.

I had never cared much for LG Android phones before this, but LG looks and feels marvelous. I agree with Android Central when they say "LG brought it's A-game".

Photo taken with the Nexus 4

Cameras
The stock Android camera app has been good since Android 4.0 (Ice Cream Sandwich), and became excellent with Android 4.1 and 4.2 (Jelly Bean).  It's fast; taking pictures from the lockscreen is very convenient; and panorama and photo sphere are fun ways of capturing memories.

But all of that is also available on the Galaxy Nexus. What's changed is the hardware. Google has notoriously been a step behind when it comes to their phones' back camera. They finally catch up with the rest of the top-of-the-line phones like the Samsung Galaxy S III and Apple's iPhone 5 with a worthy 8 megapixel camera.

Also unavailable on the Galaxy Nexus (for unknown reasons) is a HDR mode. But that's mostly a gimmick. The key here is 8 megapixels. I can finally toss my old point and shoot camera in the trash.

The only issue I've had is that sometimes the camera will get "stuck" focusing and I am unable to take a picture until I exit the app and enter it again. I assume this is a temporary software problem that will be fixed in the next OS update.

Nexus 4
Koi!
Display
Since first reading about OLED, I thought that it was the future of all display technology. I thought every phone would eventually rock a SAMOLED display until they developed lasers that shot into your eyeballs or holograms or whatever the next screen technology will be. I think I was wrong.

Surely, the Galaxy Nexus had a great SAMOLED screen that had truly dark blacks and excellent brightness.  But the IPS LCD display on the Nexus 4 seems to match or better the contrast and brightness of the Galaxy Nexus, but with better color reproduction. SAMOLED screens seem slightly tinged with blue. And even though the screen is 0.05 inches bigger, the Nexus 4 display has a slightly better pixel density, since it's 768 x 1280 pixels, compared to the Galaxy Nexus's 720 x 1280 pixels.

Combined with the excellent build/design, the display makes the Nexus 4 look gorgeous.

Battery
The battery is as good as it was with the Galaxy Nexus. I honestly can't say if it's better or worse. The capacity is 2100 mAh, which is better than the Galaxy Nexus's 1750 mAh, but it seems to last just as long. Which is nice. Both phones last me all day with moderate use.  Even after an hour-long phone call, I'll lose maybe 20-25% of the battery and still have enough battery for the rest of the day.  The only problem is that the battery on the Nexus 4 is non-removable.

Performance
This was key. I had a lot of difficulty justifying this phone to myself after trying it out for a few minutes and realized that it was a minor, minor upgrade to the Galaxy Nexus. But one thing that had been annoying me was the slow, lagginess of my phone since upgrading to 4.2. 4.1 was a great OS. My Galaxy Nexus was plenty fast. It appeared that "Project Butter" had succeeded. Then came 4.2 and everything slowed down to molasses. It didn't help that I had a live wallpaper and used a 3rd party launcher (Apex Launcher, I highly recommend it!).

Nexus 4 has a quad-core CPU and it shows. I still have a live wallpaper (Koi Live Wallpaper, I highly recommend it!) and use Apex Launcher, but my phone screams along with no detectable lag at all. It doesn't even get hot.

This, along with the camera upgrade, is how I justify my conspicuous consumption.

Good speeds. That last one was ran
partially on wifi and then cut short.
Data
Let's be honest here: The lack of an LTE Nexus 4 option is a confusing mistake. After the difficulties Google had with Verizon Galaxy Nexus, I understand the lack of a Verizon Nexus 4. But in a year when even Apple released an LTE iPhone, it's difficult to comprehend why Google didn't release an LTE phone on Sprint or AT&T.

I suppose it doesn't matter that much, if you're on T-Mobile or AT&T. T-Mobile's HSPA+ is plenty fast.  I routinely got 5-7 Mbps with my Galaxy Nexus and lately I've been getting an outstanding 7-13 Mbps on my Nexus 4. I assume speeds on AT&T's HSPA+ are similar. The promise of 22 Mbps and better on an LTE provider like Verizon is great, but I think nearly 10 Mbps is good enough for most people, even heavy video users. I'm pretty sure it's better than my home Internet speed.

Storage
As with the Nexus S and Galaxy Nexus, there is no microSD slot for expanded storage on the Nexus 4. That's not good, but it's expected and comparable to the iPhone 5 and the Lumia 920, which also have no expandable storage.  What's a bit vexing is that the Nexus 4 only comes with 8 GB or 16 GB of storage. In 2012. In Q4 2012. The iPhone 5 comes in 16 GB, 32 GB, and 64 GB versions, and the Lumia 920 has a respectable 32 GB of storage.

As someone who has just over 16 GB of music, it's a bit frustrating that I can't get more storage, even if I'm willing to pay for it. To solve this issue, I use Google Music. This lets me sync my music in the cloud and manually download what ever songs I want to my phone. So far I've downloaded my new stuff and a lot of my favorite stuff. When I'm in an area with no reception, it means my music collection is very limited, but what you gonna do?

Operating System
When I purchased my Galaxy Nexus, it was running Android 4.0. One the first day of using it, I updated to 4.1. I could review those two OSes, but since both the Galaxy Nexus and Nexus 4 are both running 4.2 today, there's not a real reason to do that.

As can be expected, Android 4.2 (which is still called "Jelly Bean") is the best version of Android yet. Lockscreen widgets are awesome, photo sphere is awesome, and the Swype-like gesture keyboard is super duper awesome. Despite the hideous font on the lockscreen clock, it's a wonderful update. The only drawback of this OS (since lockscreen clock can be "fixed" with Fixed 4.2 Clock Widget, also highly recommended) is that the OS is slower than 4.1. But if you have a phone as fast as the Nexus 4, you won't notice the OS lag.

Google Now is a great personal assistant that is arguably as good as the iPhone's Siri. Aside from the weather and travel time cards, the cards aren't very useful yet, but they show promise.

As a mobile OS, Android continues to lead the pack in terms of versatility and customizability while iOS and Windows Phone play catch up. Since Ice Cream Sandwich, Android's been beautiful and stable. The only glaring oversight is a lack of an undo when typing.

As with any GSM Nexus device, you can look forward to the simplicity of pure stock Android--no bloatware--and OS updates as soon as Google creates them.

Apps/Ecosystem
As for apps, Android still is behind iOS in number and quality, but has all the important apps (e.g. Facebook, Instagram, eBay, Angry Birds, as well as a variety of flashlight apps, calculator apps and games). And unlike iOS, you can customize your phone with plenty of launchers and interesting widgets.

The hardware ecosystem is the same with Android: easy charging with micro USB cables that are so universal you can use them to charge Windows Phones and vice versa. Also cool is Android Beam (NFC). You can send pictures and web links instantly by simply touching phones. Surprisingly, this also works with other operating systems: I was able to send web links to Windows Phones with NFC like the Lumia 920. I had trouble sending pictures.

There are two new aspects of the hardware ecosystem: one is wireless charging. I haven't gotten the chance to use this yet since the Nexus 4 doesn't work with some of the popular wireless chargers out there and Google's wireless charging orb has yet to be released. The other new hardware item is Slimport, a new display-sharing technology. It's like MHL, where the micro USB port can be used to output HDMI video and audio. The advantage is that, unlike MHL, you don't need to connect your charging cable to the MHL adapter to use it. You can output to HDMI without an electrical outlet nearby. It's a little frustrating that the MHL adapter that worked just fine on my HTC EVO 3D and Galaxy Nexus doesn't work with my Nexus 4, but Slimport is better than MHL. Hopefully, the standard for outputting video won't change again and I won't have to keep buying new video cables every year.

Other Notes
This phone vibrates less strongly, which is bittersweet. The upside is that I can leave my phone on vibrate at work because it's not a loud vibration. My Galaxy Nexus vibrated so loudly with every notification, it sounded like a local earthquake was happening at my desk. The downside is that I'm probably less likely to feel and hear notifications when my Nexus 4 is on vibrate in my pocket.

One issue is that my computer doesn't charge my Nexus 4 when my computer sleeps. I always put my computer to sleep  (i.e. low power mode) every night, but before that, I plug in my phone for transferring files and syncing. It's worked just fine with every other smartphone I've had, from the iPhone 3G to the Galaxy Nexus. It doesn't work with the Nexus 4. Others have seen this problem, too. However, it's not a dealbreaker since I usually just sync through the cloud, using Google Music for music and Instant Upload for pics.

Conclusion
It's very telling that, if you go to Google's Nexus 4 webpage, a large portion of the features are Android 4.2 features instead of exclusive Nexus 4 features. It's quite clear that the main difference between this phone and the Galaxy Nexus is that the hardware has been incrementally upgraded. Most notably, the camera is better and the phone is a lot faster, due to the quad-core processor and extra gig of RAM.

Which is fine because the Galaxy Nexus is a great, still nearly top-of-the-line phone. I am tempted to say that the Nexus 4 is the Galaxy Nexus, perfected; but that's not quite right. Google still has to work on their storage problem and getting fast speeds on a CDMA carrier.

Comparing it to other phones gets hard. Is the Nexus 4 better than the iPhone 5? Sure, especially if you're on T-Mobile, where there is no iPhone. But if you're on Sprint or Verizon, if you want a good music experience (storage, syncing and playing), or if you want the best app ecosystem, iPhone wins.  Is the Nexus 4 better than the Lumia 920? Sure, unless you want the absolute best phone camera ever or if you want a good music experience. Is the Nexus 4 better than the Galaxy S III? Maybe, unless you're on Sprint or Verizon or you want lots of storage. The Nexus 4 vs the Galaxy S III is hard to call. I think a rooted Galaxy S III wins.

Disclaimer: This is my first post as a Google employee, but Google does not endorse nor even know about the opinions expressed in this blog. I receive no payment for this blog.  I try not to let the fact that my employer is Google affect my opinions in any way. Though I have long been a fan of many Google products, in the end, I remain a fan of technology above all.