Anyone else seeing this on Google Play? RPC:S-7:AEC-0

Written by jasontheadmin on September 5, 2014
Google-Play-Store-logo

If you are seeing this error code on your Android device: RPC:S-7:AEC-0 then you are one of the many lucky individuals (like myself) who have been hit with some kind of crazy Google SNAFU. It has really been heating up this week and has been really frustrating. Here’s some things that (at least for me and some others) have not worked:

1. Removing your google account, cleaning Google Play data and Google Framework data. Then, reboot, add your account back, and then try to access the play store.

2. Factory reset your phone. DO NOT DO THIS. If you do, then you lose all the apps on your phone and you still can’t update or get them back. Then you’re stuck until Google fixes it which has been several days already.

3. Follow step one, but add a twist by adding another Google Account and then have them both on the phone. While this will let you use the new account to purchase and do things, you’ll now have two accounts on the phone and try keeping that sorted. Your primary account still won’t be working and if you purchase something with the new account you’ll end up having to purchase it again when your primary account works. Some people have reported the new account doesn’t work either.

After speaking with Google Play, sending them screenshots of my phone and a bug report from my tablet, they gave me a $5 Google Play credit. Of course, I can’t use it because I can’t purchase anything in the Play Store, but it’s there.

The full error message you’ll see is: Error retrieving information from server. [RPC:S-7:AEC-0]).

The important thing to remember is, don’t factory reset your phone. That’s probably the worst thing you can do.


What Are The Rails 4 ActiveRecord Migration DataTypes?

Written by jasontheadmin on July 15, 2014

This comes up a lot, so I’m providing this handy list of Rails 4 ActiveRecord Migration DataTypes here for reference.

These can be used across all database types.

If you happen to be using a PostgreSQL database, then you have access to these as well:

  • :hstore - storing key/value pairs within a single value. (Learn more about this new data type)
  • :array - an arrangement of numbers or strings in a particular row. (Learn more about it and see examples)
  • :cidr_address - used for IPv4 or IPv6 host addresses.
  • :ip_address - used for IPv4 or IPv6 host addresses, same as cidr_address but it also accepts values with nonzero bits to the right of the netmask.
  • :mac_address - used for MAC host addresses.

Please note, that they will be stored as strings if you use those with a non-PostgreSQL database.

 


Ruby: Why Use Ruby’s attr_accessor, attr_reader and attr_writer?

Written by jasontheadmin on July 7, 2014

Ruby has this handy and convenient way to share instance variables by using keys like

attr_accessor :var
attr_reader :var
attr_writer :var

You may use the different accessors to communicate your intent to someone reading your code, and make it easier to write classes which will work correctly no matter how their public API is called.

class Person
attr_accessor :age

end

Here, I can see that I may both read and write the age.

class Person
attr_reader :age

end

Here, I can see that I may only read the age. Imagine that it is set by the constructor of this class and after that remains constant. If there were a mutator (writer) for age and the class were written assuming that age, once set, does not change, then a bug could result from code calling that mutator.

But what is happening behind the scenes?

If you write:

attr_writer :age

That gets translated into:

def age=(value)
@age = value
end

If you write:

attr_reader :age

That gets translated into:

def age
@age
end

If you write:

attr_accessor :age

That gets translated into:

def age=(value)
@age = value
end

def age
@age
end

Knowing that, here’s another way to think about it: If you did not have the attr_… helpers, and had to write the accessors yourself, would you write any more accessors than your class needed? For example, if age only needed to be read, would you also write a method allowing it to be written?


Ruby: What Does %w(array) Mean?

Written by jasontheadmin on July 7, 2014

%w(foo bar) is a shortcut for [“foo”, “bar”]. Meaning it’s a notation to write an array of strings separated by spaces instead of commas and without quotes around them.

Also, the parenthesis can be almost any other character such as square brackets %w[…], curly braces %w{…} or even something like exclamation marks %w!…!. All of these have the same behavior (returning an array).


On Technology and Helping Others

Written by jasontheadmin on July 7, 2014

A friend of mine reminded me of this today. Let’s not be this guy:

Technology is great, and it’s empowering. We should all work to help spread it’s benefits to everyone. And, one of the most important ways of doing that is to take time to explain it and help others. If you just do it for them, people won’t learn. And, when we’re all learning and growing, we are empowering each other and making the world a better place. We all started this journey somewhere, together we can make it to the end.

And, if we remember that, then those we help will be able to say this: