September 25, 2012
If you upgraded to Xcode 4.5 recently and your unit tests are causing build failures, you’re in luck.

Find that build target for the tests and wrap the framework search paths in quotes. Seems dumb, but I’m sure someone will find it helpful.

If you upgraded to Xcode 4.5 recently and your unit tests are causing build failures, you’re in luck.

Find that build target for the tests and wrap the framework search paths in quotes. Seems dumb, but I’m sure someone will find it helpful.

September 25, 2012
Cutting Corners Hurts Everybody

You get what you pay for.

10:16am  |   URL: http://tmblr.co/ZOXs1yU3PuyL
(View comments  
Filed under: cost profit 
April 28, 2012
Mr. Meowgi

March 10, 2012
Xcode distributed as stand alone app on MAS

If you notice some command line things stop building, or your package managers are failing, try (re)setting your Xcode path

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

January 28, 2012
THE FIVE STAGES OF DEBUGGING BY A. WORKING CODER

Being confronted with a serious and difficult-to-diagnose bug can be one of the most traumatic and stressful experiences of a professional programmer’s career. Those who have been through such an ordeal rate the stress as on a par with that accompanying serious injury, divorce, or the death of a family member.
Researchers who have studied the psychology of computer programming have lately constructed a framework to understand the stages through which the programmer’s mind progresses as she/he works through the difficult process of resolving a bug. These stages are similar in concept to the well-known Kübler-Ross Stages of Grief, and for similar reasons. Like death and its attendant grief, fixing a bug is a process initiated by an event, at first unbelievable, which causes great anguish in the affected mind. However, this event must eventually be grappled with, endured, and brought to a satisfactory conclusion. Understanding the stages of bug fixing will make us better prepared to survive, persevere, and eventually bring closure … to our bug queues.


STAGE 1: RESISTANCE

How you’re feeling: Skeptical. Offended. Petulant.
1. Ignore it.
Maybe it’ll go away.
2. Mark it as “Works for Me”.
Maybe it was user error, or a local configuration problem. Yes, I’m sure that’s what it was. It’ll just go away.
3. Call it a Glitch.
I think it was just a weird one-off that nobody will ever see again. There’s no point in figuring out what went wrong. The {database/network/browser/something} hiccuped and that’s all this was. It won’t come back, I’m sure.
4. Hide.
I’m taking a couple of days’ sick leave. Maybe they’ll assign the bug to somebody else.
5. Mark it as “Working per Spec”.
Hey, look, I just implemented what was spec’d. If they want to change the behavior, UI will have to update the spec. Maybe they’ll decide they can live with it as-is.
6. Demand More Information.
I can’t do a thing with this bug until and unless I see the error logs for this particular exception scenario.
7. Assign it to another team member.
I was getting badly-formatted data from that other module, that’s the problem. Give it to the guy who maintains that module. I could check for that one weird corner case in my module, but the proper fix is for that other guy to make his code correct. He’s offshore anyway, so I’ll never have to face him.


STAGE 2: ACCEPTANCE

How you’re feeling: Resigned. Defeated. Annoyed.
1. Accept it.
All right, all right, all right! It’s my bug. I’ll fix it.
2. Put it on the bottom of your queue.
Maybe I can find another job before I’ll have to fix this bug.
3. Bargain with your manager.
OK, look: I could fix it the right way, and that will take a month. On the other hand, I could apply a band-aid to the problem, which won’t really solve it, but it’ll make it go away as far as the end-user is concerned. And that will take a couple of days.
4. Mark the bug with an outrageously padded estimate.
God, I hope that’s enough time.


STAGE 3: ENGAGEMENT AND DEPRESSION

How you’re feeling: Giddy. Light-headed. Nauseous.
1. Initial Research.
I can do this. I can do this! All it takes is a little organization, a little focus, a lot of caffeine, and a little time. I can do this.
2. Befuddlement.
Shit. This is unbelievable. I can’t make heads or tails of this code. It’s a mess. It’s a mystery to me how this code could even compile, let alone work. What chance do I have to figure out how it can fail?
3. Hide Again.
Look. I’m sorry. I had to have my appendix removed. Again. Yes, now that you mention it, I did used to have two. Now I don’t have any. Happy now?
4. Bitching.
Well, what did they expect, anyway? Trying to do this without so much as a decent debugger. What am I, clairvoyant? I had better debugging tools on my Commodore 64!
5. Spitballing.
What if I try … this? Nah, that doesn’t work. How about … that? Nope. How about … that? Shit, that makes things worse.
6. Despair.
I’ll never fix this bug. I’m a lousy coder. I’m stupid. What am I doing here, in a place full of smart people? Sooner or later they’re gonna catch on, and then I am finished around here.
7. Humiliation.
My manager asked me why I’ve taken the better part of a month to fix a bug I’d spec’d out as taking a couple of days’ worth of work. I don’t know how to read the logs and I broke my own build scripts. Now I’m afraid to ask for help because it’ll just make me look stupider than I already do.
8. Panic!
This thing is way more complicated than I thought it would be! The parts I thought would be really hard turned out to be really easy … and the parts I thought would be easy turned out to be a complete rewrite of about a half a dozen classes. Why did I ever tell my manager I could do this?
9. All-Nighter(s). Withdrawl from friends and family.
(incoherent mumbling, punctuated by bursts of loud profanity.)


STAGE 4. POSSIBLY FOOLISH EUPHORIA

How You’re Feeling: Grateful. Relieved. Awfully Impressed with Yourself.
1. Revelation.
Oh! Now I see how to do this…
2. Write the correct code.
I am so good. I am a coding machine!
3. Test it.
Yes! It passes that test. Yes! It passed that test. Boo! It fails that test. And I have no idea why…
4. Hide the test failures.
It’s a totally unrealistic corner case anyway. Nobody will ever see that in the field. It was really a pointless test.
5. Check it in.
I’m awesome. Is there pie in the kitchen?
6. Close the bug.
I heard there was pie in the kitchen.


STAGE 5. GRAPPLING WITH THE DEFINITION OF “DONE”

How You’re Feeling: Twitchy. Nervous. Superstitious.
1. They’ve Reopened the bug.
Really? They found another way to break it? Shit - it’s that corner case I swore would never come up.
2. Fix the fix.
Yes, I’m even checking cases where the employee age is an imaginary number, just to be sure.
3. Close the bug.
Yeah, bitch. You’re closed. Once and for all. Now stay dead!
4. Vow to never take on such a task ever again.
5. Realization that you are now considered the expert on that module.
Oh no! Now I’ve got three new bugs on that module.
At this point, you are expected to GOTO: Stage 1.
Furthermore, as a working coder, you will DO_UNTIL: Death, retirement, or promotion into management.

(credit, www.crankypm.com)

January 22, 2012

I’m starting to like doing UI clones.

2:39am  |   URL: http://tmblr.co/ZOXs1yFAXzM1
(View comments  
Filed under: Twitter iPad ios sdk code cocoa UX 
January 12, 2012
Why are you so bothered NOW? And GTFO Montel.

Boo hoo! Marines are pissing on dead taiban and it’s some big problem? We want them to be crazy enough to get blown up everyday and kill people in Afghanistan like ants, some which are simple farmers that get handed a gun and shoved out in front and used as a shield. Can we really think that we can draw that line at this point?

Yea its fucked up, but so is what they are forced to do every day. If you don’t like it GTFO and figure out a better way to solve problems instead of sending our future out into some shit hole in the middle of nowhere to burn $(I mean make things go bang bang) for 10 years.

And what’s even dumber is Montel Williams’ comment on the issue. Reinstate the draft will solve this problem? Yea instead of killing taliban and farmers they will be forced to walk into ridiculous wars and die on command, or even worse..

http://www.youtube.com/watch?v=_FxMigHwciU

Here’s an idea Montel, stick to endorsing these fake online banks that prey on the lower class, all while skirting around U.S and state law(s) and exploiting Native Americans.
I’m disgusted I ever respected you and watched your TV show.

January 7, 2012
Path / Facebook style UINavigationController replacement

This is a drop in replacement for UINavigationController to give it a Path/Facebook like slide animation. It adds two new properties to UIViewController and each viewController pushed has the ability to load its own sideControllers.

It’s super alpha and not ready for use yet. Download and try it, and if you’re smart and have a better way to calculate the bounce effect please let me know. Im pretty sure the physics are very wrong.

Demo video:
http://c.drunknbass.com/DIlC

https://github.com/drunknbass/DNBSwipyNavigationController

January 6, 2012
Dismiss iphone / ipad keyboard like whoa!

whoa!

void goAwayKeeKee() { 
    [[[UIApplication sharedApplication] keyWindow] endEditing:YES]; 
}

October 14, 2011
More cowbell!

First read this http://mur.mu.rs/?p=349

So my history with iPhones is basically being apart of this smaller circle of people who hung out in IRC and spent countless hours reversing iPhone frameworks to write stupid apps, that most of would take me 30 min to make today, but nevertheless we all played our part, some large(saurik, lucas newman, etc) and others small(drunknbass :) ). Ahh that was long.

People who were doing these things and putting out open source and helping push apps forward deserve a lot of credit.

Now i’m not saying Mike Lee wasn’t one of these people, I just never personally saw any contributions towards these efforts back in the day and he could very well have done a lot of stuff i never knew about, regardless, this is what really happened…

I believe it was WWDC ‘09 and I was out trying to catch up with some old pals from my early iOS days, jay freeman(saurik), (planetbeing), kyle mattews(modmyi), max(mxweas), mario(rock your iphone). We were out getting caught up and hanging out and decided to go by Denny’s to get some late night food. About 15 min into our meal a group of people come in and sit behind us(this turns out to be Mike Lee and some others).

Part of the way through his conversation he talks about how he was a major player in early jailbreak software and was the first iphone dev company (later to become tapulous) and Jay turned around and asked him a few questions and let him start telling us all about iphone and jail breaking and…(at this point I stopped listening to 60% of what he was saying because i thought he was just some guy trying to impress strangers).
Jay then introduced himself as Jay freeman and we all know what jay does for the jailbreak community.

—- And I might be wrong, but I believe the reason Jay sparked up this conversation is the same reason I ended up engaging with him, because i owe a shit lot to these people and wouldn’t be where I am today if it wasn’t for their generosity.

Eventually Mike was starting to get very loud and standing up being very aggressive. I didnt like the way the conversation with Jay was going so I threw out a snarky comment that pushed the wrong button.

“You are brainwashed by Apple”.

Now the context of why i said this was because at the time Apple was in some hot water regarding banning 3rd party compilers (Flash cs5, unity, etc) and also trying to lock down the advertising channels by making it impossible for Ad networks and Analytics companies to do business on iPhones, very similarly to how they did it recently to the ebook guys.
Anyways, we had our opinions that Apples moves were purely business, where the part of Apple Mike worked in was engineering and it was all rainbows and gumdrops, his opinion was bias, but that’s OK.

Anyway back to Denny’s.
Mike was now yelling and screaming into my face like he wanted to fight me.
At this point in time I did not know who i was talking to, all i knew was he was being rude to my friends and I didn’t appreciate it. Eventually I think i told him “Excuse me sir, but would you please calm down I’m trying to have dinner with my friends…well, it was kinda like that.

And that was it.

I had no idea who that guy ever was until about 3 months later there was some activity around something @bmf said(if you reallly wanna know i can figure it out).
I clicked a link and said hey, that was that guy from Denny’s!
I read up and recognized the name “Mike Lee”, but didn’t know for sure it was the same guy. After reading up I knew it was him. “World’s Toughest Programmer”.

Look… I don’t know what other people have said, and I personally don’t hold grudges. To me this was the highlight of WWDC because I was in bed sick with food poisoning and missed the entire week. I’m sure Mike is a good guy, it’s just I’m not the typical introverted programmer that would have pissed his pants with a (guessing)240lb Hawaiian dropping F-Bombs 3mm from his nose.

So to sum it up,
I’m too lazy to actually put this rambling into something with structure so if you can’t follow this rambling idiot, sorry.

I owe everything to the guys who helped me back in IRC learn how to fux with the iPhone and learn all the stuff that today pays my bills and helps me support my family.

I’m sorry Mike got so upset over something I said. I don’t dislike Apple and owe them just as much gratitude for what I have today.
I don’t know if Mike was drunk, I know i wasn’t. I remember this night very clearly ;)

Liked posts on Tumblr: More liked posts »