Prince William: Put a ring on it!

At phamous-apps, we’re shameless fans of the royal wedding, and in lieu of this, we’re giving you another precious gem for your application arsenal. We present to you…

Prince William: Put a ring on it!

A simple mini-game where you can put a ring on Prince Williams finger. Description from the marketplace

The Royal Wedding is soon, and Prince William is refusing to wear his ring. Kate Middleton seems ok with it, but we all know that shes not!
In this minigame, “Put a Ring On it!” you need to put as many rings on the Prince’s hand as possible! Rack up a high score, let him know that you want that ring on there!

There seem to be some problems if you have a ridiculously large screen where the hand moves too fast, but just think of it as “expert mode” and you’ll be fine, until we can fix it anyways 😉

Is there an Android API for Google Maps 5.0?

I’ve been looking for this for some personal projects today. After a few hours of research and testing on 3/29/2011, my definitive answer is no.

There remains an unanswered comment on the official blog post about it here from December, and when using the latest 2.3.3 Google APIs in the SDK, I still receive tile based maps. I have also found numerous unanswered questions from stackoverflow and other QA sites to back up my statement that it is currently unavailable.

I will update this post when the Maps 5.0 API becomes updated, or if anyone hears otherwise before I do, please comment!

How to shoot yourself in the foot in any programming language

Searching through the documents on my hard drive this weekend I came across a document containing the joke of how to shoot yourself in the foot in any programming language. Well, not literally, but it does relate how the different languages behave by using the analogy of shooting one’s self in the foot. I forgot where I found this so if someone knows, post the link in the comments!

* * *

How to Shoot Yourself in the Foot in Any Programming Language

The proliferation of modern programming languages (all of which seem to have stolen countless features from one another) sometimes makes it difficult to remember what language you’re currently using. This guide is offered as a public service to help programmers who find themselves in such dilemmas.

You shoot yourself in the foot.

You accidentally create a dozen clones of yourself and shoot them all in the foot. Providing emergency medical assistance is impossible since you can’t tell which are bitwise copies and which are just pointing at others and saying, “That’s me, over there.”

After importing java.awt.right.foot.* and java.awt.gun.right.hand.*, and writing the classes and methods of those classes needed, you’ve forgotten what the hell you’re doing.

Your foot is ready to be shot in roughly five minutes, but you just can’t find anywhere to shoot it.

You shoot yourself in the foot with a gun made with pieces from 300 other guns.

Find a gun, it falls apart. Put it back together, it falls apart again. You try using the .GUN Framework, it falls apart. You stab yourself in the foot instead.

SELECT @ammo:=bullet FROM gun WHERE trigger = ‘PULLED’;
INSERT INTO leg (foot) VALUES (@ammo);

You shoot yourself in the foot, but nobody can understand how you did it. Six months later, neither can you.

You’ve perfected a robust, rich user experience for shooting yourself in the foot. You then find that bullets are disabled on your gun.

You shoot your right foot with one hand, then switch hands to shoot your left foot but you realize that the gun has turned into a banana.

You shoot yourself in each toe, iteratively, until you run out of toes, then you read in the next foot and repeat. If you run out of bullets, you continue anyway because you have no exception-handling ability.

After realizing that you can’t actually accomplish anything in this language, you shoot yourself in the head.

Using a COLT 45 HANDGUN, AIM gun at LEG.FOOT, THEN place ARM.HAND.FINGER. on HANDGUN.TRIGGER and SQUEEZE. THEN return HANDGUN to HOLSTER. CHECK whether shoelace needs to be retied.

You shoot yourself in the appendage which holds the gun with which
you shoot yourself in the appendage which holds the gun with which
you shoot yourself in the appendage which holds the gun with which
you shoot yourself in the appendage which holds the gun with which
you shoot yourself in the appendage which holds ….

Shoot yourself in the foot with a water pistol. On big systems, continue until entire lower body is waterlogged.

Foot in yourself shoot.

You shoot yourself in the foot, then spend all day figuring out how to do it in fewer characters.

The compiler won’t let you shoot yourself in the foot.

If you succeed, shoot yourself in the left foot.
If you fail, shoot yourself in the right foot.

Concurrent Euclid
You shoot yourself in somebody else’s foot.

Put the first bullet of the gun into the foot of the left leg of you.
Answer the result.

You spend days writing a UIL description of your foot, the trajectory, the bullet, and the intricate scrollwork on the ivory handles of the gun. When you finally get around to pulling the trigger, the gun jams.

% ls
foot.c foot.h foot.o toe.c toe.o
% rm * .o
rm: .o: No such file or directory
% ls

Not only can you shoot yourself in the foot, your users can too.

You’ll be able to shoot yourself in the foot just as soon as you figure out what all these bullets are for.

Visual Basic
You’ll shoot yourself in the foot, but you’ll have so much fun doing it that you won’t care.

You tell your program you want to be shot in the foot. The program figures out how to do it, but the syntax doesn’t allow it to explain.

After correctly packaging your foot, you attempt to concurrently load the gun, pull the trigger, scream and shoot yourself in the foot. When you try, however, you discover that your foot is of the wrong type.

You try to shoot yourself in the foot only to discover you must first reinvent the gun, the bullet, and your foot. After that’s done, you pull the trigger, the gun beeps several times, then crashes.

370 JCL
You send your foot down to MIS with a 4000-page document explaining how you want it to be shot. Three years later, your foot comes back deep-fried.

You try to shoot yourself in the foot but you just keep hitting the whitespace between your toes.

Dividing an array

Even if you don’t care about the practical applications of it in modern programming, it offers a look back when programming was more of a pain in the ass because shit needed to be set up properly as well as having a good algorithm. Actually it is still relevant in deeper technical programming that is closer to the hardware level. Probably not so much for app developers.

So let’s say you have an array using 16-bit integers. So you would have something like this:

unsigned short *myArray = new unsigned short[1024];

So you fill it up with data and all is good right? Well now your next requirement is that you want to divide each element into two parts, the lower byte and upper byte because the upper byte indicates the flashing pattern of the red LED and the lower byte indicates the flashing pattern of the green LED. Well FML, right? No!

We make a new byte pointer (a char in this case) and make it point to the typecasted main array:

unsigned char* birchPointer;
birchPointer = (unsigned char*) myArray;

Now because a char is a byte in size, when you advance the index it will point to the next 8-bit position. So let’s say myArray contains the following information:

myArray[0] = 0xBEEF;
myArray[1] = 0xCAFE;
myArray[2] = 0xBABE;

Now if you use the char pointer to access myArray, you’ll get the following information (providing your system is big endian):

birchPointer[0] = 0xBE;
birchPointer[1] = 0xEF;
birchPointer[2] = 0xCA;
birchPointer[3] = 0xFE;
birchPointer[4] = 0xBA;
birchPointer[5] = 0xBE;

If you’re using a machine that’s little endian (which most PCs are), then the byte values will be swapped like so (due to little endian storing the lower byte first in the memory sequence):

birchPointer[0] = 0xEF;
birchPointer[1] = 0xBE;
birchPointer[2] = 0xFE;
birchPointer[3] = 0xCA;
birchPointer[4] = 0xBE;
birchPointer[5] = 0xBA;

So there you have it: splitting a 16-bit array into an 8-bit array and learning something about how endians affect it.

Read more:
Size of C++ Datatypes
Big endian vs. little endian

Stop compiling, Mister Falcon!

Rage face!

Muffin fudger!

When I’m working in Visual Studio I have stored in my muscle memory a swift stroke of F7. F7 is the key that saves all files and compiles/builds my program without running it. I do this to check for compilation errors in the program (yes I’m a terrible programmer, STFU). Normally it doesn’t take too long, but I’ve only been working with small to medium sized projects. Recently I have been working on a much larger project and compilation on this program takes DAYS!! Ok, not really days, but more like two minutes, which takes days in computer time. I would hit F7 out of habit and then rage because it required a special compilation step instead of the automatic way to compile. This pissed me off to no end. I summoned the almighty Google and discovered that CTRL+Pause(Break) will stop compiling in Visual Studio. It’s so simple, a caveman could do it! That’s one less rage face I’ll be making during my days.

Word Clock gets its own page

Minor update, I’ve created a page for Word Clock. I’ve also turned Word Clock into a Chrome extension (which has a nice icon in the toolbar and a pop-up instead of a full-screen tab). Check it out at the new Word Clock page!

Word Clock

Be Kind, Please Find

Be Kind, Please Find is the first graphical program that Kevin and I worked on together. It paved the way to making more visually impressive software and eventually Android development. In the spring of 2008, we took a game development class after finishing our basic C++ programming classes in college. We did not think much of it at the time as we thought as the class was just going to be an easy way to get a minor and bump up our GPA, but that semester was the first step towards our future. The project taught us how to manage resources and tasks to ensure that important things got done. It also taught us the importance of creating a good demo and presentation as that is what hooks people in. Our college senior project mirrors the philosophy and spirit of this project which set the bar for future students. It is our honor and privilege to present Be Kind, Please Find to the world.

Be Kind, Please Find

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

Golden AP Gets to shine a little brighter today as well…

We don’t get too many downloads on Mobile AP Gold, and thats ok! The whole reason we made Mobile AP Shortcut to begin with is because we wanted everyone to have 1 button access to turn on Mobile AP! But, our select few gold members, we do love you, so Golden AP has been updated with slight differences from Mobile AP, to make sure you feel the distinction.

The largest distinction is we left the shortcut itself as an app, and slightly changed its icon to reflect its functionality. The widget in Golden AP is a 1×1 instead of a 2×1, and its only function is for one button enabling / disabling your mobile hotspot. This way if you don’t want the settings shortcut tacked on, you don’t have to. And of course, there is no 5 second ad delay (we’re bastards, we know).

Check out the screenshots and the table below, choose for yourself!

Whats the big difference anyways?! Golden AP Mobile AP
Access to Mobile AP Settings on all compatible phones: Yes Yes
Access to 1 touch enable on all compatible phones: Yes Yes
Sweet Gold Icon Yes No
Has ads No Yes
Widget Size 1×1 2×1
Has Shitty Graphics Yes Yes
Buys us 1 cup of ramen: Yes If you click the ad 69 times

You can buy Golden AP here for only $.99 USD.

-Kevin Grant

Android Apps: Golden / Mobile AP Shortcut 3.0 is here!

We are proud to announce Golden and Mobile AP Shortcut 3.0! We skipped 2.0 because we felt like it! After hours of laboring, we have figured out how to turn this handy dandy application from a helpful shortcut to an AMAZING WIDGET! Check out the screens below, and head to marketplace for Golden AP Shortcut for the paid version or Mobile AP Shortcut for the ad version.

-Kevin Grant