jarsen-blog
jarsen-blog
Hi, I'm Jason.
6 posts
Hi, I'm Jason. Together we can upgrade the universe.
Don't wanna be here? Send us removal request.
jarsen-blog · 13 years ago
Text
Be Excited About the Surface for the Right Reasons
Microsoft did a good job with their video for their new tablet, the Surface.
Great music. Wow. And you know what, the surface actually looks pretty neat. However, I made the mistake of reading the comments (and worse, adding a comment of my own). I'll freely admit, I'm an Apple fanboy. As such, I don't always agree with Microsoft fanboys. However, I don't hate Microsoft. They actually make some pretty good stuff. That being said, I found a lot of the comments interesting, and many of them largely ignorant. Here's what I think are the right and wrong reasons you should be excited about a new iPad competitor.
The Wrong Reasons
1. HDMI
HDMI is cool. It's useful. Great. The surface comes with an HDMI port. Awesome. (So do many android tablets...) Guess what? iPad can do HDMI too. You just need the adapter. But really, who cares when you can do 1080p wireless AirPlay? So you need an Apple TV to do it, boohoo: $99 to be freaking awesome.
2. Trackpad
"Woah, it has a trackpad, cool!" Dude, did you also know it has a freaking TOUCH SCREEN?!?!? 
"But then I have to move my hand to touch the touch screen! Less productivity!"... *facepalm* So, I assume you use a DVORAK key layout and only keyboard shortcuts—never the mouse. Cause you know, productivity. No time for QWERTY, it was designed to make us type slower.
To be sure, there are applications in which a mouse is useful. But most of those don't belong on a tablet.
3. Keyboard Case
Alright, it looks sexy; it's designed well. It has a built in trackpad (see point 2). It's super svelte and give me nerd chills. I will give you all those things. I really do like the surface's keyboard thing. Seriously. But there are plenty of sexy iPad covers, and iPad covers with keyboards, or you can use the apple wireless keyboard. So yeah, cool and all. But don't pretend that makes the surface a game winner.
4. Windows 8
We don't even know if it's good yet. For all you know you might hate it.
"But I can play League of Legends on it!"... Alright. Have fun.
The Right Reasons
1. Microsoft can Market
Watch the video again. Proof. Microsoft has been kinda in the background for a while, but don't think the slumbering giant doesn't know how to play the game.
2. Apps
Thanks to Windows 8, apps will be much more readily available. One of the hardest things for android is to get good quality apps out on the store. Nearly all of it is crap. It's partly because of the tools, and partly because anyone can make an android app. You don't have to shell out $100/yr to make an android app. Apple's developer program tends to brings out more serious developers. Furthemore, Apple's app store generates much more revenue. This brings out the devs, and the more devs, the more likely you are to get a good app.
Also, something about the culture—many people own macs because they are snooty and care about design. I find iOS apps to be consistently better designed than android apps. People see and feel the difference.
But I digress. Windows has a very established developer base and lots of software. This means they'll be much more likely to be able to compete with the app store.
3. Hardware
Better processor blah blah blah. Cool. I like fast. As long as the software is good. Who cares if it's fast if it sucks. However, we'll see if the Windows 8 kernel is as slimmed down as iOS; if you spend all the extra processing power on servicing your OS, so what.
4. Hardware
No device fragmentation. Microsoft will screw everyone else and make the hardware itself. You have learned well from Apple.
The Iffy Reasons
1. USB 3.0 + File System
USB 3.0 is nice. It's fast. From what I understand about the surface since it's Windows 8 it has an open file system. That means you can manage your own file system, share easier between applications, etc. OK. That's nice. But pros and cons here. Pro: you can do whatever you want. Con: You can do whatever you want. You have to understand the file system in iOS is the way it is because of the sandboxing and security restrictions. Windows 8 probably has some great security features, but sandboxing is a pretty solid security feature. Double edged sword.
iOS has some annoyances to deal with in the file system, to be sure. Hopefully iCloud and the new document storage stuff will help with that. We'll see.
In Conclusion,
I for one am very excited to see how this turns out. Great for Microsoft. They've done a lot of innovation and worked really hard. This is in no way some iPad clone—it's got a lot going for it. I really honestly hope the surface turns out to be great. Not cause I want to get one, per say, but because I think Apple needs some competition to make it even better.
0 notes
jarsen-blog · 13 years ago
Text
Making Custom Plain UIBarButtonItems
For the app I'm currently working on I needed to put some custom images into my toolbar. So, I whipped open my storyboard in IB and went to work. However, I noticed something very interesting... it seemed to be masking the images I provided and making everything white:
Crazy, right? So this drove me nuts for a while—I thought it might be just me. I searched about the internets and the only thing I could find was creating a custom view. Unfortunately that can't be done from IB (as far as I'm aware, although I noticed you can drag UIButtons into Navigation Items). Initially I tried setting the custom view to a UIImage, however I discovered setting the custom view breaks any IBActions you connected :(
Fortunately it was Tuesday, and that meant NSCoder's Night. Unfortunately, everyone there was just as mystified by it as me. So after a little late night coding, the best solution I came up with was this category:
https://gist.github.com/2967497
So, to create your custom button,  you must first create a UIBarButtonItem
in interface builder, set up your IBOutlet, and then call this class method on it. Here's an example:
https://gist.github.com/2967630
The end result is much prettier:
A nice little touch I was able to add after snooping about the docs is the showsTouchWhenHighlighted—it recreates the glow you get from pressing plain UIBarButtonItems that you lose when setting the custom view.
As with IBActions, this process also breaks any segues you have hooked up, so you'll have to trigger them manually. Just create a helper method that calls  performSegueWithIdentifier:sender: and then pass in the selector for your helper method.
5 notes · View notes
jarsen-blog · 13 years ago
Text
JLPocket: Better Pocketing
I like Pocket, it's a useful and sexy service. Naturally I want to integrate it into the app I'm working on. I hop on the website, find the iOS Developer API, and download it, only to find the code isn't quite as sexy as I'd hoped.
The first major problem is a security issue: storing password data in NSUserDefaults. Not good. NSUserDefaults is not designed for storing sensitive data such as passwords—the passwords are getting stored in plain text. The correct place to store passwords in an iOS app is in the keychain. 
The other two things that bugged me were having to use the delegate pattern (I really like blocks) and not having ARC.
So, I decided to rewrite the wrapper using keychain, blocks, and ARC. Yay! I call it: JLPocket. Grab it on github if you so please.
Since using keychain is not exactly painless, I decided to use Sam Soffes's SSKeychain, which seems to be a great library. It made working with keychain not so bad.
To get blocks working I replaced the call to initWithRequest:delegate:startImmediately: with sendAsynchronousRequest:queue:completionHandler:. I create a completion handler block which in turn calls the user supplied completion block after doing it's own deal. All the supplied block needs to do is take a response string and an error string. If there was no error processing the request the error string should be nil.
Anyway, from initial testing it seems to be working well. I have yet to test registration, however. So, beware.
Feel free to grab it and use it however you'd like. I'd love pull requests, comments, etc.
1 note · View note
jarsen-blog · 13 years ago
Text
Reverse Engineering Pinterest.app
Ever wanted to build an app that could open up the Pinterest app and pin something? Probably not. But here goes nothing anyway.
Instead of sleeping I got this crazy idea I should dive into some obfuscated javascript and figure out how the Pinterest bookmarklet in Safari was opening up the pinterest app. Turns out its got its own url scheme, pinit12://. Easy.
Next, figuring out what the rest of the crap is to tack on after the scheme. Turns out that wasn't very hard either. So basically it looks like this:
pinit12://pin/create/bookmarklet/?media=<image-url>&url=<url-where-image-was-taken-from>&title=<title-of-page>&is_video=false&description=<initial-description-text-that-user-can-change>
Here's a little example of how it might look in code. I hardcoded in the URL, but you would just throw in your own resources (url-encoded, of course).
Too bad there's no call back API :( Then you could open your own app back up when you're done. Like tweetbot.
On a side note, I think the engineers at pinterest have some interesting naming conventions...
2 notes · View notes
jarsen-blog · 13 years ago
Text
Core Animation: 100% Black Magic
I'm giving a presentation this evening for the BYU Cocoaheads on Core Animation. Should be interesting, having done iOS for 3 months and all—but as they say, jumping in headfirst is the best way to learn.
Here's the keynote: http://cl.ly/0z3K06061f0Q0m1I241b
And the XCode project for the demo where we create FeelGood, an app for combatting depression. It will make you happy and you can give yourself stars: http://cl.ly/1c1v3h2J0U441W2e3X1C
57 notes · View notes
jarsen-blog · 13 years ago
Text
Letting Go of Goals
Goals. Goals represent the desires of our hearts. They challenge and drive us to achieve. Goals light a beacon at the end of the road and show us where to go. Goals transform our dreams into action, and actions lead to reality. By our goals and the very sweat of our brows we hope to shape the world around us.
Goals schmoals. But who knows what he or she truly desires, or what life has to offer? The best laid plans of mice and men, gang aft agley. Failed goals lead to frustration and anxiety. Broken resolutions are stowed away until the new year. And in our haste to shape the world, we fail to let the world shape us instead. We may march forward unyielding—eyes on the prize—our whole lives, only to realize that what we sought lay at every step along the way.
Perhaps having simple, underwhelming goals can be best for us, however frightening that may sound. So often we're taught in our western culture that goals are the end-all, be-all. We even set goals to achieve our goals—our goals have goals, which in turn have their own sub-goals! We are led to believe that without them our world would crumple lifelessly to the ground in a great ball of fire, or at the very least we will fail to "achieve our full potential."
We love to put this on our walls and desktops:
“Far better is it to dare mighty things, to win glorious triumphs, even though checked by failure...than to rank with those poor spirits who neither enjoy much nor suffer much, because they live in a gray twilight that knows not victory nor defeat.”
Teddy Roosevelt
But what makes a thing mighty? Is there anything mightier than watching the sun set after a day of hard work? What make a triumph glorious? Is there any triumph more glorious than the smile of a loved one? And who, in reality, knows neither victory or defeat? Life is riddled with plenty of both—seeking out extra does not make you greater.
Obsession with the future or preoccupation with the past will never bring us joy; to be happy is to be great. True happiness comes from fulfilling our moral obligations, and perusing our passions. True happiness comes from looking for beauty now, and trying to see the world as God does. Simplicity does not imply complacency.
All this being said, I do not believe it inappropriate to remind ourselves of what is important, or to engage in self-reflection and improvement. So, in light of the belated new years, here are my tentative resolutions:
1. Make my bed every morning.
2. Meet a new person every day.
3. Follow my passions.
4. Use the internet less.
5. Seek beauty and simplicity in all things.
And that's it. I have no idea where I'm going or what I'm doing. I have no way of tracking my progress or measuring my growth. And I've never felt more free.
#me
1 note · View note