Categories
Uncategorized

Google needs to get their shit together

I have a game in the app store, Hexd, that runs ads with admob and I reached the payment threshold to be paid of a full $100.

Complaint number 1: When ever I tried to add a payment account I get and error. No big deal right, I’ll just contact support. OH WAIT THERE IS NO SUPPORT, only forums.

Complaint number 2: I want to invite a new account to my adsense account. So I send the invite and the other account accidentally creates a new account. Now both account have a message that one of them needs to be closed. The help page says to go to account then close account. The problem is that the account button is disabled on that account that was opened accidentally. I’ll just contact support but again ONLY FORUMS NO ACTUAL SUPPORT PEOPLE.

At this point I don’t care about the $100 of ad money and delete the original account.

Complaint number 3: I try to setup my primary website mountainbuffalo.com with adsense because I want to reset up ads in the game and you need to have adsense account to have an admob account. But my website apparently doesn’t have content because it just points people to the app store to get the game. WTF I say.

So I applied for this site to adsence, I have no intention of running ads on this site. I just want to run ads in my app. I hope whoever is looking at this site from google takes pity. If not I will have to find someone else to run my ads that’s not google.

Categories
Uncategorized

WFH

I’ve been forced to work from home now for 5 months, at time of writing, because of the global COVID-19 pandemic. I’m not going to go into detail what I think about the pandemic, expected for that it is very real and anyone who doesn’t think so is a moron.

In February, I was on the company ski trip and got a slack message from my manager on a Saturday, saying if I didn’t see the email from corporate security, that I need to cancel my upcoming work trip that was suppose to start on Monday. That when I stopped and read the email about all nonessential business travel is cancelled for the foreseeable future. That was unfortunate for me because I was scheduled to talk at a conference in September in Wales.

A few weeks later, when the mandate to work from home came out, on a Thursday, the offices closed well before the stay at home order in Colorado. I was mildly disappointed because that would mean no more free breakfast and lunch, but the precautions were completely appropriate. I figured it will be only for a few weeks to a month, 5 months later they are saying the offices will not be open until for awhile longer.

Since then I have been trying to adjust to the new life of working from my 400 sq ft apartment. At first it was a struggle, finding the best way to work. First I tried sitting in my Ikea POÄNG chair. Which let me tell you, it is uncomfortable after about 20 minutes. I was not using my desk in an attempt to separate my work from my personal life.

That became suboptimal after about a week so I switched to plug my work laptop into my ultra-wide monitor. I’ve been using that ever since. This was hard at first because I associated that setup with gaming on my gaming computer. To help dissociate that I used a different mouse and keyboard, as well as only gaming on the weekend. The next biggest thing was separating work and personal lives. I would sometimes work until 7 or 8 at night.

If your work-life balance tips to far in one direction. You have to ask yourself two questions, first are both things equally important to you and second how far are you willing to go to balance them out again?

First, I believe they are both equally important, having rest from work is very important.

Second, I have very specific cut offs that I try to conform to such as starting work at 9 than working until 5. Then not answering slack or emails outside these hours. Unfortunately programming is never has that clean of cutoffs, so I try to wrap things up around 5.

These are very first world problems, I am lucky that I work for a company that doesn’t make people go into an office where the employees might get sick. The essential workers are the real heroes, by reporting to work even though they might get sick.

Categories
Development

Xcode wackiness

Let’s just say I have a protocol that conforms to NSObject and NSCoping. It was something like this.

@protocol MyProtocol <NSObject, NSCopying>

- (void)example_doSomethingWithMyProtocol:(id<MyProtocol>)protocol;

@end

And also have a class, that has a method, and conforms to the protocol with a category.

@interface MyClass : NSObject <NSCopying>

@property (nonnull, nonatomic, copy) NSString *myString;

- (instancetype)initWithString:(NSString *)string;

- (NSString *)doSomethingWithMyClass:(MyClass *)myClass;

@end

@interface MyClass (Example) <MyProtocol>

@end

And the implementation looks something like this

@implementation MyClass

- (instancetype)initWithString:(NSString *)string
{
    self = [super init];
    if (self) {
        _myString = string;
    }
    return self;
}

-(NSString *)doSomethingWithMyClass:(MyClass *)myClass
{
    return [NSString stringWithFormat:@"%@ + %@", self.myString, myClass.myString];
}

- (nonnull id)copyWithZone:(nullable NSZone *)zone {
    return self;
}

@end

@implementation MyClass (Example)

- (NSString *)example_doSomethingWithMyProtocol:(id<MyProtocol>)protocol
{
    if (![protocol isKindOfClass:[MyClass class]]){
        return nil;
    }

    return [self doSomethingWithMyClass:protocol];
}

@end

So at this point, Xcode is happy. No warnings and no errors.

Let’s start the wackiness.

Let look at our protocol again. I don’t think we need to require NSCopying anymore, so let’s remove it. So our protocol now looks like this.

@protocol MyProtocol <NSObject>

- (void)example_doSomethingWithMyProtocol:(id<MyProtocol>)protocol;

@end

Let’s build and compile.

Whats this 1 warning! Heres the warning.

Why didn’t this warning show up before removing NSCopying. ¯\_(ツ)_/¯ You could just cast it, sure but where is the fun in that. Ok lets rest our protocol to the original. Yay, the warning wen’t way. Let’s now remove NSCopying from our class.

@interface MyClass : NSObject
...
@end

Oh, no we have a new warning.

This one has a “fix it” so let’s apply it. It add a copy with zone, so let’s just return self. If you noticed from before we already have a copy with zone method. We’re going to compile now, ok no errors but we have a new linker warning.

instance method 'copyWithZone:' in category from /.../MyClass.o overrides method from class in /.../MyClass.o

Oh dear, that doesn’t look good. Why didn’t it find the original when implementation. ¯\_(ツ)_/¯

What was the point of this exercise, well nothing and what’s some conclusions we can make. Well we can conclude that Xcode is wacky and does wacky things but if you work with Xcode, you already knew that. If you want the code from this experiment to experience the wackiness for yourself, you can get it here.

Categories
Travel

Japan for less then $1000

It’s alway been a dream of mine to go to Japan but I’m not a fan of spending money. I hear Japan is expensive. I want to spend less than $1000 out of pocket for a two week trip.

How I plan to do this, three words, credit card points. Heres a breakdown of my points at the time of writing.

  • Chase – 112,000
  • Amex – 60,000
  • Marriott – 13,000

Flights look to be about $800, since I have the Chase Sapphire Reserve I get 1.5 points per cent on travel, so ~52,000 points for the plane ticket. I also looked into transferring my points to an airline and I don’t get any more bang for the buck that way.

So If I use my chase point to get the flight that leaves the hotel. I need to think about the itinerary and what I want to see before I can make a decision on the hotel. However if I transfer all my points from remaining Chase and Amex to Marriott I’ll have 110,000. That will get me nowhere. Marriotts are really expensive in Japan.

Let’s look at booking the hotel through Amex. With my Amex points I can stay at trip adviser 4 star hotel for 5 nights in Tokyo. 5 nights down 9 to go. Ok, with my remaining Chase points I do 4 nights in Kyoto, 2 nights in Hiroshima, and 2 nights in Osaka.

Ok that just leaves when transportation between those cities, food, and things when I’m there which should come in under $1000. So I guess I’m going to Japan.

Categories
Uncategorized

Hello world!

Just setting up my blog. I can’t believe how easy this was to setup and why I didn’t do it sooner. Welcome to my blog, I don’t know what I’m going to be posting here. Probably random thoughts, tech related things, and/or tutorials. We’ll see how it goes.

Just about me, I’m Justin Anderson. I work at Twitter and I mostly do iOS development but I dabble in Android, web and backend. I’ve been doing iOS since iOS 4 and maybe before. I currently have an app in the store, Hexd. I also have a joke website artisanpasswords.com.