Archive for the ‘ Uncategorized ’ Category

Installing MySQL on MacOS with Homebrew

I was trying to install MySQL on MacOS and I followed the instructions to install it via Homebrew:

$ brew install mysql

Pretty easy, but then as I worked along I screwed something up where I could not load mysql in the command line. I would get the following error:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

So I do the logical step of uninstalling and reinstalling:

$ brew uninstall mysql
$ brew install mysql

I still get the same error. Two hours of browsing StackOverflow later, I figured it out. I failed to notice the following errors during reinstallation:

2019-02-21T01:02:48.455076Z 0 [System] [MY-013169] [Server] /usr/local/Cellar/mysql/8.0.15/bin/mysqld (mysqld 8.0.15) initializing of server in progress as process 18070
2019-02-21T01:02:48.457920Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.
2019-02-21T01:02:48.457929Z 0 [ERROR] [MY-013236] [Server] Newly created data directory /usr/local/var/mysql/ is unusable. You can safely remove it.
2019-02-21T01:02:48.457994Z 0 [ERROR] [MY-010119] [Server] Aborting
2019-02-21T01:02:48.458203Z 0 [System] [MY-010910] [Server] /usr/local/Cellar/mysql/8.0.15/bin/mysqld: Shutdown complete (mysqld 8.0.15) Homebrew.

This is the key line:
Newly created data directory /usr/local/var/mysql/ is unusable. You can safely remove it.

What do I do? Remove that directory!

$ sudo rm -rf /usr/local/var/mysql/

Then run the post install script:

$ brew postinstall mysql

And voilà, mysql loads!

$ mysql -uroot
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.15 Homebrew

Learn from my fail.

Android: Dialog Box with an EditText

A simple code snippet I found over at, shows how to create a dialog box with an EditText in it. I needed it to save a user’s login name into the preferences when first starting a program, but it pretty much has a limitless amount of uses

AlertDialog.Builder alert = new AlertDialog.Builder(this);


// Set an EditText view to get user input 
final EditText input = new EditText(this);

alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
  String value = input.getText();
  // Do something with value!

alert.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
  public void onClick(DialogInterface dialog, int whichButton) {
    // Canceled.

-Kevin Grant

What is an immutable array? What does immutable mean in coding?

I got an email from about some coding questions. Pretty much they are looking to hire some new people and are using these questions to generate interest / find candidates. The full list can be found here, but one question in particular I got lost in terminology slightly.

Imagine we have an immutable array of size N which we know to be filled with integers ranging from 0 to N-2, inclusive.

Did I learn about immutable in college? Maybe. Do I remember it? Certainly not. I googled for a few minutes, figured it out. As per usual, stackoverflow is a great place for answers.

A mutable object is simply an object that can be modified after it’s created/instantiated, vs an immutable object that cannot be modified.


So that’s what the keyword is, hope you learned something!

-Kevin Grant

Mobile AP 3.0 teaser…

-Kevin Grant

Services and notifications, just what you always wanted!

So have you ever wondered how to get a cool notification to show up in your app for something? Or have you ever wanted to know what a “service” in android was, or just something as simple as seeing some basic, example, skeleton code with some intuitive comments and variable names? Well, thats what I have produced for you! Some of this was copied from the Android site, some of this was created by some friends of mine, but all in all, its very basic stuff.

Download the code here. Just create a new project based off of this file and go nuts! The screenshots below show what it should generally look like when you run it!

Services are a great way to add some background processing to your applications. Services can almost be thought of as an Activity (which is what normal android programs are) but without a user interface. This means everything it does is in the background! Have a background service that sends a text message to your friend every 10 minutes, or have a service that creates a toast every 15 minutes to remind you how awesome you really are. This skeleton code gives you the framework to do just that!

If you found this example helpful, or would like to share how you utilized this in your own programs, post in the comments below, can’t wait to hear!

-Kevin Grant

I wanna be an engineer, so frickin’ bad

You said it brother.

New Stats!

We’ve been slacking here.  We apologize.  There is no excuse for this insubordinance.  This week look forward to our details of our experiences participating in the “Facebook Hackers Cup”, tutorials on Java Callback Functions, Services, Notifications, and Alarms!  There’s so much we want to share, bear with us while we try to document it all!

In the meantime, I would like to share our current app stats for Milestone 2 with you!

Category Total Change
Total app downloads (1/21/2011) 40,498 (+19,458)
Avg user rating 3.67 stars (205 / 379 5-star ratings) (-.06)
Avg downloads / day since last milestone 540.5 (+346.5)
Avg downloads / day since launch (144 days) 281.2 (+137.2)
Avg income / day $.79 USD (+.79)

If you want to see how we’ve been progressing, check out our stats from Milestone 1.

If you haven’t seen our new app portal, check out

Thank you everyone who has purchased Golden AP, your donations are immensely appreciated and we look forward to keep delivering you awesome apps throughout the rest of 2011.

-Kevin Grant

Limited Time Offer for Samsung Galaxy Vibrant owners and more!

Do you have a Samsung Galaxy Vibrant, or another Android Phone that has Mobile Access Point, and you wish that Mobile AP worked on your phone?

So do we!  For this limited time offer, we are offering Vibrant and other proven disfunctioning model owners a free copy of our donate version of “Golden AP” (the paid version of Mobile AP) to those who can provide us log files to make Mobile AP compatible with your phone!

If you would like to participate, please send an email to and we will send you instructions on how you can help and then receive the newest version of Golden AP!

-Kevin Grant

Android: Gecko-Indoor Positioning Calibration tool for developers

So, any developers out there interested in jumping into this indoor positioning market?  Well you’re not alone and a small company from Sweden called Qubulus wants to help facilitate your creativity.

Our aim is to support developer networks wherever they are to adopt indoor positioning to their projects, they are our most important customers.
— Ant Maran

Today, they released an application called “Gecko” that allows you to calibrate indoor environments for indoor positioning, with the ability to incorporate this positioning into your own personal applications, entirely for free!  The calibration process is a little time consuming (according to their FAQ about 2 hours for an office sized building), and you do have to work tightly with the Qubulus development team to get all of the positioning properly generated and ready for use, but once finished, the results produced are quite good considering there is no need for installing external hardware.

Check out the video below, and to get started, just set up a developers account over at

Leave some comments about your experiences with this, and we will share ours soon as well!


Mobile AP gets its own website?…!

I get a lot of questions about Mobile AP Shortcut, “why won’t it work on my phone?”, “Can you update for my phone please?”  Its a surprisingly popular little app, so we’ve decided to give it its own web page.  I present to you…

but wait… what is this phamous-apps domain…

-Kevin Grant