brandontreb.com Tips And Resources For Software Consultants

Beginning Jailbroken iOS Development – Getting The Tools

Developing for jailbroken is actually quite similar to regular iOS development with one addition. More Power! oh oh oh (said in a Tim Taylor voice (sorry for non-Americans that don’t get the reference)). With your device jailbroken, you have the ability to hook in to pretty much every class that Apple writes allowing you quite a bit of control over the iPhone’s functionality.

In today’s tutorial, I will simply be discussing the best way to get up and running with the tools necessary to write a jailbroken iPhone app. We will not be doing any coding, however this tutorial will be necessary for all posts going forward.

Theos

There are many ways to go about writing a jailbroken iOS app. Most of them are quite complex. @DHowett has come up with a brilliant tool called theos which drastically simplifies the process. My tutorial will pretty much be a regurgitation of his tutorial found here with some added cheesy jokes.

Theos is a command line utility that essentially generates a template for creating applications, libraries, preference bundles, tools, and mobile substrate hacks. These cover 99% of the jailbroken apps that you are likely to create.

One thing to note is DHowett talks about doing jailbroken iOS development on both Mac and Linux; my tutorials will be Mac-only.

Step 1: Install the iOS SDK

You will first need to install the official iOS SDK.

http://developer.apple.com/devcenter/ios/index.action

You can register for a free account and download the latest SDK. Once installed reboot your Mac and come back here. I’ll wait…

Step 2: Setting Up The Environment Variables

Start by deciding on a good location to install theos. The suggested location is /opt/theos. The only issue with doing it here is you will need to have administrator permissions as well as have to enter your password when updating files. For teaching purposes, I am going to assume you will install it here too.

Open the terminal and type:

<code class=’bash’>export THEOS=/opt/theos</code>

What we are doing is setting an environment variable. You can always see if this variable is set by typing echo $THEOS in the command line. It will need to be (re)set every time you reopen the terminal to develop a jailbroken app.

Step 3: Getting theos

DHowett uses subversion for version control on theos, so you need to make sure and have it installed. If you followed step one above, it should have been installed by default. We will be checking out theos into the THEOS directory specified in step 2.

In the terminal type:

<code class=’bash’>svn co http://svn.howett.net/svn/theos/trunk $THEOS</code>

You most likely will be asked for your password. You should now see the /opt/theos directory created with theos installed.

Step 4: Getting ldid

We now need to install the ldid tool. ldid is a tool written by Saurik (if you don’t know who he is, stop reading now). Basically, it simulates the signing process for the iPhone, allowing you to install your jailbroken apps/hacks on an actual device.

You can find this tool in many places, however DHowett has generously hosted it for us on his dropbox account.

Now, I had a tricky time getting this to download directly to my /opt/theos folder. So, I downloaded it to my desktop and then moved it in to /opt/theos/bin/ldid

<code class=’bash’>curl -s http://dl.dropbox.com/u/3157793/ldid > ~/Desktop/ldid
chmod +x ~/Desktop/ldid
mv ~/Desktop/ldid $THEOS/bin/ldid</code>

Alternatively, if you can get it to work properly, do it like DHowett suggests and download it directly into place.

<code class=’bash’>curl -s http://dl.dropbox.com/u/3157793/ldid > $THEOS/bin/ldid; chmod +x $THEOS/bin/ldid</code>

Step 5: Install dpkg

Dpkg is a tool to bundle up your app into a Debian package for distribution in a Cydia repository. You can install it through Macports.

<code class=’bash’>sudo port install dpkg</code>

Step 6: Creating A New Project

theos uses a tool called nic (new instance creator) to create a new project. Simply run nic by typing:

<code class=’bash’>$THEOS/bin/nic.pl</code>

and it starts the new instance creator. Here is a sample of making a jailbroken application.

<code class=’bash’>brandon-trebitowskis-macbook-pro:Desktop brandontreb$ $THEOS/bin/nic.pl
NIC 1.0 - New Instance Creator
——————————
  [1.] iphone/application
  [2.] iphone/library
  [3.] iphone/preference_bundle
  [4.] iphone/tool
  [5.] iphone/tweak
Choose a Template (required): 1
Project Name (required): FartLight
Package Name [com.yourcompany.fartlight]: com.brandontreb.fartlight
Author/Maintainer Name [Brandon Trebitowski]: 
Instantiating iphone/application in fartlight/…
Done.</code>

This will create a new folder with a basic template called fartlight (killer project, I know). In addition to the usual files it will contain a Makefile (for building the application) and a control file (information about the application when it’s in a Cydia repository).

This should now give you the basis for creating a jailbroken application/tweak/hack. In the next tutorial we will go over building, signing, and deployment. For now, you can check out the project I created with nic called inPulseNotifier. It’s a combination of a tweak (5) and a preference bundle (3) for the app settings.

Feel free to ask me a question in the comments and check out #theos on IRC.

Update Check out the next tutorial in this series here.

Happy coding!

Jailbroken iPhone Development – Would You Be Into It?

As of recent I have had a ton of interest in doing development for Jailbroken iPhones. I love the power, being able to hack anything on the device. It opens up a whole new world of possibilities.

My most current project (inPulseNotifier) is a Mobile Substrate hack which allows the iPhone to interface with an inPulse watch. It uses BTStack and boots up during the init method of your springboard. I will do a full writeup on this in the near future, but basically it forwards all of your phone’s notifications (SMS, Local, Push, Calendar) to your watch!

Serious Lack Of Resources

InPulseNotifier was a blast to create, however I found it incredibly challenging to find many resources about doing jailbroken development. I finally found theos which was a total lifesaver. Also, I had the code for mobileNotifier to follow along with.

IRC (yeah I’m a true hacker ;)) was also huge help, but there simply aren’t enough tutorials/examples on the web related to jailbroken iPhone dev. My guesses are either 1. it’s quite hard, 2. there’s not enough <font color”green”>$$$</font> in it, or 3. jailbreakers like to stay “underground”.

I haven’t quite figured it out, but I was curious what YOU thought about it as I’m considering doing some jailbroken iOS development tutorials on my blog. Please let me know in the comments. Are you down to “Hack the planet”?

Officially Running On Jekyll

Well, I have finally made the switch from WordPress to Jekyll and couldn’t be happier. Here are some of the bonuses I have seen thus far.

  1. SPEED: Just click around on my site. It is screaming fast now.
  2. Resources: Checking top on my server reveals that I have a TON of extra resources (which makes sense since Jekyll sites are way more lightweight).
  3. Ease of blogging: Ok, WordPress was pretty easy too, however, I was really starting to get sick of the post interface. I switch to Tumblr at some point simply for it’s minimalist interface. WordPress’ is gross and TinyMCE (the WYSIWG editor) is terrible. I love writing in TextMate!
  4. Offline publishing. I can write my posts anywhere since they are just .md (markdown) files. Check out Daring Fireball’s great writeup on this.
  5. Portability: Have you have tried to move your WordPress site? Yeah, it’s about as fun as chewing on tin foil with metal fillings.
  6. Focus on content: WordPress has quite a bit of focus on using rich media in your posts which tends to take away from the content if you are not careful. There is something about writing in a text editor that makes you forget about images/video/etc… unless it’s totally needed. So don’t be surprised if my posts aren’t as “rich”. (Hopefully they will be more clever :) )

I really urge you to see for yourself what it’s like blogging with Jekyll. I will do a writeup on my conversion process in the near future to help aid others in the switch. Until then, you can google around and find tons of great resources.

Considering Leaving WordPress For Jekyll

So, after my 6 year relationship with WordPress, I have been having some strong feelings for another (blog engine). Jekyll does everything that I want my wordpress to do.

  1. Not suck at security
  2. Not be bloated
  3. Not have a sucky post editor
  4. Expense – I have a few blogs hosted on Rackspace and my bill has gotten pretty pricey. I’m hoping to host my Jekyll site on App Engine for frizzle (free).

That’s about it. In case you live in a box (which most of us do since most houses are relatively square) and haven’t hear of it, Jekyll is a new blogging engine written in Ruby. Simply put, you write posts, run a command and it spits out static pages. You just upload these pages to your server (how old skool right?) Now you no longer have a dependancies on any server side language, fancy server configs, etc…

Jekyll has no(minimal) features, no comments, track backs etc… and no built-in SEO. It doesn’t even have an admin (since you are serving up static content). Sounds like a blast right? I’ll blog a bit about it as I make the migration and you will see, it’s going to be great!

I just finished reading this post from Hacker News, which was pretty much the nail in the coffin.

Huge Update To Smart Lockscreen Creator + Promo Codes

I have just updated Smart Lockscreen Creator and am giving away 10 copies!

Download It Here

I know you probably aren’t reading this as you race to see if any of the promos aren’t taken but…

Here is what’s new:

Misc

  • Added ability to generate a new image on startup. Just turn Auto-Start on in the settings

Weather

  • Toggle Fahrenheit and Celsius
  • Added missing weather images
  • Updated weather icons
  • Improved performance and stability of retrieving weather

Customization

  • Customize separator color and height
  • Customize which day of the week to highlight for a calendar
  • Ability to customize the background color of each widget

Minor Bug Fixes

The Promo Codes

METL6KNXW6TL
TWFHLKT7RYWK
J6JXJ7JPNJRN
XLP9FF9RAEA9
L74ATPTYXJ4F
A6KJPTLWE97P
HNWP6L7F6JW9
XEHNFKJPMR6Y
MFH3MNHKXF3A
FENRH4M9PAEA

Please leave a 5 star review :)

Download It Here

Free App Idea: Drop Tunes

Perhaps this already exists, if so, please link me to it.

The idea
Drop music into your Dropbox folder on your computer. Then open up the app which presents you with an iPod like interface for this music.

The genius
What’s great about it is, you have all of you music on your iPhone without using up disk space. Of course you may need to upgrade your Dropbox account to something greater than 2GBs to see any real value.

Smart Lockscreen Creator Released + Promo Codes

My latest iOS app, Smart Lockscreen Creator has just released on iPhone for $.99.

Download It Here

The Idea

Currently your lockscreen on your iOS device is nothing more than a pretty watch with a background. Jailbreakers have solved this issue with an incredible application called intelliscreen, which adds lots of interesting information to it. However, you and I are Apple fanboys and won’t violate our precious iPhones with jailbreaking. Enter Smart Lockscreen Creator.

Smart Lockscreen Creator allows you to build a completely custom (and smart) lockscreen image within the application. You then set this image as your lockscreen background. The following items are currently supported by the app.

  • Current weather, condition, high and low for any city/region in the World
  • Weekly forecast for any city/region in the World
  • Monthly calendar
  • Custom text
  • Blank space (useful when customizing the look of your lockscreen)
  • Line separator
  • Many more in the works!

Here are some promo codes. If you fail to grab one and have some interest in reviewing the app on your site, I would be happy to email you one.

FMP9LRW4FP99
MH7XHH3FLH4P
JH9E47JXP9KA
RYRAPRARPAJ3
4FKKW6LN7W9J
If you have any suggestion for lockscreen “widgets”, don’t hesitate to post them here.
Please give some review love as well 😉

Albuquerque Marathon Training

Well, I have finally decided to put my money where my mouth is when it comes to fitness and train up for a half marathon! The marathon I’m training for is the Albuquerque Half Marathon on Saturday, April 16th at 8 am (that logo is such an eyesore).

Two months seems like a relatively short time to prepare, especially for my first “real” run, however I am just aiming to finish rather than being competitive. Right now, I am running about 3-4 miles per day with a longer day of ~5 miles. As the weeks pass, I intend on upping that to ~5 miles/day with a longer run at about 10 miles.

If any of you are training for something similar, I would love any advice, feedback, criticism, encouragement, stories, etc… that you have. Just post em in the comments.

Also, for those of you who are on nike+, please befriend me. My username is (you guessed it) brandontreb.

I’m very excited about this goal and will be blogging along the way (amidst my other coding related posts of course).

It’s a long road ahead 😉

Tweet Press 3.2 Update – Sidebar Widget

I have recently had an overwhelming number of requests for a sidebar widget that displays your recent Tweetpress photos. Well, it’s finally here! The update was actually quite trivial to make. If I had known how simple it would be, I would have made it months ago.

Make sure you update to the latest version: tweetpress 3.2

How to use it
In the WordPress admin, click on Appearance and the Widgets from the sidebar menu. If your theme supports widgets (which is should), you will see a Tweetpress widget in the available widgets list.

Next drag that widget into the sidebar area and modify the settings.

You can configure the title of the widget as well as the number of photos to be displayed. Please comment here or shoot me an email if you experience any issues with it. I’m also open to suggestions.

It’s Elementary My Dear Watson

IBM's Watson on Jeopardy

Last night marked the beginning of the IBM Jeopardy challenge. For those of you who don’t know, IBM has been working for some time on a system (named Watson) that has overcome some amazing challenges. The goal: to build an entirely self-contained system that can beat the World’s best Jeopardy players.

Now, I’m not going to give you a rundown on it as I’m sure that you can (or have already) read it on a website far more popular than mine. I just wanted to publicly geek out for a second…

I was watching the episode of Jeopardy with my wife, and at first glance she was like “duh, of course a computer could win at Jeopardy”. This made me realize that to a non engineer, this seems like a trivial task since computers are magical Facebook boxes.

Now me on the other hand, I was giddy to the point of almost wetting myself. Seeing how far we have come in AI development and language processing is absolutely incredible.

I for one, will be glued to my tv tonight to watch Watson’s next round of Jeopardy.

Case Of The Mondays

Mondays…

The other day, I was faced with an interesting programming challenge and wanted to share my solution. I just submitted a pretty interesting app to the app store that does a number of things (more details soon). Among those things is the ability to generate a calendar.

The Problem

Generating the calendar was the easy part, however when displayed, I wanted it to highlight every Monday of the month. This turned out to be a bit trickier than I imagined.

Really the main challenge here was to determine which day contained the first Monday of the month. After that, we just loop incrementing by 7 and are done.

Looking At The Date Helpers

Looking at what I had to work with in NSDate, NSCalendar, and NSDateComponents, I really found only 2 things that could help me. From NSDateComponents, I could figure out the current day (numeric) and the current day of the week (numeric). Knowing this information was very important.

The Solution

Having the current day and day of the week allowed me to find the date of the Monday on the current week. This was the first challenge as demonstrated below. Assume weekdayComponents is the NSDateComponents generated from the current date.

<code class=’objc’>NSInteger weekday = [weekdayComponents weekday];
NSInteger day         = [weekdayComponents day];

// First, find how many days we are from Monday
int daysAwayFromMonday = weekday - 2;

// Now resolve the monday of this week
int mondayThisWeek = day - daysAwayFromMonday;

// Check if monday this week falls in last month
if(mondayThisWeek <= 0) {
    mondayThisWeek = day + (7 - daysAwayFromMonday);
}</code>

mondayThisWeek will now contain the day number of the Monday of the current week. If that Monday falls on the previous month, mondayThisWeek will be negative. Line 12 resolves that by carrying it into next week.

Finally, we just loop subtracting 7 from that Monday until mondayThisWeek is less than 7 to get the first Monday of the month.

<code class=’objc’>while(mondayThisWeek > 7) {
    mondayThisWeek -= 7;
}</code>

And there you have it. mondayThisWeek (improperly named at this point) will contain the day number of the first Monday for the current month.

So, this was quite a round-a-bout way to find this value. If you have a better solution, please feel free to trash on mine in the comments 😉 .

Farewell (For Now) iDevBlogADay

Hey guys,

I wanted to thank everyone for letting me be a part of the iDevBlogADay community. You guys have been super supportive and I really appreciate all of the commenting, retweeting, and upvoting of my iDevBlogADay articles.

I have found myself in a position with life (work + family) where I may no longer be able to consistently write a post per week. So, after 2 months of writing, it is time for me to pass the torch to the next blogger on the list.

I will still continue to blog (and continue my Twitter For Mac Series), so I really encourage you to subscribe to my RSS feed (or Twitter feed).

Thanks again and Happy Coding!

AppBlogger: A Tool For iOS App Developers And Bloggers

Imagine that you have just found the coolest app in the world and just can’t wait to tell all of your followers about it. So, you head to the admin panel of your blogging engine (hopefully WordPress) and begin to write your review. Now, you want to insert some screenshots, icons, descriptions, app store links, etc… So, what do you do? You head on over to Bing and type in google.com. Next, you search your app name and hopefully find the iTunes URL so that you can slowly grab some information about the app. #Fail

Dum duh dum duh (trumpet noises)!

Enter AppBlogger. AppBlogger is a little tool that I have been working on that uses “Instant Search” technology (jquery fanciness) to allow you to instantly search the app store and quickly get the information you need.

How Does It Work? (you say)

As you start typing, AppBlogger makes an asynchronous request to the iTunes web service and pulls a list of applications that match your search terms. This list is presented as a bunch of icons. You will then click on one of these icons to pull of the details page of that application.

The details page (see above screenshot) then contains everything you need to write a stellar blog post about that application. It provides text fields (for easy copy and paste) with icon URLs, download URL, and screenshot URLs.

I have some plans to integrate this in the near future with my Link Share tool to auto generate shortened URLs that contain your affiliate code (so you can make $). If you have any other suggestions for it, I would love to hear them.

I know many of you are heartbroken and were expecting the next iteration of my Twitter Client For Mac series. I want you to know, you are not forgotten and I will continue the series next Thursday. So Stay Tuned!

Check out AppBlogger!

This post is part of iDevBlogADay, a group of indie iOS development blogs featuring two posts per day. You can keep up with iDevBlogADay through the web site, RSS feed, or Twitter.

Image Manipulation: Retrieving And Updating Pixel Values For A UIImage

Grayscale Jobs

With the recent success of cool photo manipulation apps such as Camera+ and Instagram, it got me wondering. How do these photo apps modify the pixel data of the image.

After doing a bit of research on the subject, I found countless posts on Stack Overflow and the Developer forums about various methods to get and set the pixel values of a UIImage. Most of them unanswered or partially answered. I tested out many solutions and banged my head on my computer into the whee hours of the morning with no success. Every solution I tried seemed to completely destroy the image.

It wasn’t until this morning, I had an “aha” moment, changed one line of code and was able to produce a grayscale version of a UIImage.

Having the ability to get and set pixel values of a UIImage is super important if you want to create a photo related app that has “Filters”. Once you know the basics, you can apply your ninja math skillz to implement cool filter algorithms on the pixels. Below, I will show you onc such algorithm for converting an image to grayscale (it’s not that clever).

I should note, that a good majority of my code comes from Olie’s solution on this Stack Overflow post. His example simply returns and array of UIColor objects for a given image. Mine will modify those colors and write them back to a UIImage.

Converting A UIImage Into A Pixel Array

Here is the first part of our grayscale method. It is creating a char array from a global UIImage property named workingImage.

<code class=’objc’>- (IBAction) grayscale:(id) sender {
    CGContextRef ctx;
    CGImageRef imageRef = [self.workingImage CGImage];
    NSUInteger width = CGImageGetWidth(imageRef);
    NSUInteger height = CGImageGetHeight(imageRef);
    CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
    unsigned char *rawData = malloc(height * width * 4);
    NSUInteger bytesPerPixel = 4;
    NSUInteger bytesPerRow = bytesPerPixel * width;
    NSUInteger bitsPerComponent = 8;
    CGContextRef context = CGBitmapContextCreate(rawData, width, height,
    bitsPerComponent, bytesPerRow, colorSpace,
    kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);
    CGColorSpaceRelease(colorSpace);

    CGContextDrawImage(context, CGRectMake(0, 0, width, height), imageRef);
    CGContextRelease(context);
    .
    .
    .</code>

This is a lot of Core Graphics fanciness that isn’t super important to understand. It’s just getting the RGBA values from the image and writing them into the rawData char array. There are 4 bytes per pixel (red, green, blue, alpha), so this array contains 4 * height * width elements.

Modifying The Pixels of a UIImage

Here is where the magic happens. You can replace this code with the logic necessary to apply the filter you are making. Another clever way to approach this would be to pass this code in as a block into the method (I’ll leave that as an exercise for the reader :)).

<code class=’objc’>.
.
.
    int byteIndex = 0;
    for (int ii = 0 ; ii < width * height ; ++ii)
    {
    int outputColor = (rawData[byteIndex] + rawData[byteIndex+1] +
        rawData[byteIndex+2]) / 3;

    rawData[byteIndex] = (char) (outputColor);
    rawData[byteIndex+1] = (char) (outputColor);
    rawData[byteIndex+2] = (char) (outputColor);

        byteIndex += 4;
    }

.
.
.</code>

The first part is pretty straight forward, we have a for loop that goes from 0 to width * height. We index into the rawData array using a counter that we increment by 4 each time (remember 4 bytes per pixel). As you can imagine, the first pixel (rawData[byteIndex]) represents the red pixel, then green for +1, blue for +2, and finally alpha for +3. Note that the alpha byte is last because kCGImageAlphaPremultipliedLast flag above.

In order to do grayscale, we simple set all of the color values to the average color value. So, for example the color [218,232,244] (which is the light blue color of the WordPress editor’s toolbar) would be converted to [231,231,231] which is a fairly light gray color.

The most important step that everyone in the forums seemed to miss was casting the new value to a char. Remember we are using a char array, setting ints as values will generally screw up your image. (This was my “aha” moment that I mentioned above)

Writing The Pixels Back To a UIImage

The final step is to write the pixel data back to a UIImage. Again, I borrowed some of this code from somewhere else and unfortunately lost the link. If I find it, I will update the post.

<code class=’objc’>.
.
.
    ctx = CGBitmapContextCreate(rawData,
        CGImageGetWidth( imageRef ),
        CGImageGetHeight( imageRef ),
        8,
        CGImageGetBytesPerRow( imageRef ),
        CGImageGetColorSpace( imageRef ),
        kCGImageAlphaPremultipliedLast ); 

    imageRef = CGBitmapContextCreateImage (ctx);
    UIImage* rawImage = [UIImage imageWithCGImage:imageRef];  

    CGContextRelease(ctx);  

    self.workingImage = rawImage;  

    free(rawData);
}</code>

All we are doing here is creating a new Bitmap Context, writing it to our CGImageRef and constructing a new UIImage from that CGImageRef. Finally, we just update our workingImage with the modified one. Fancy, I know…

Now, much of this code is to work with my example (download below), but it could easily be tweaked to fit within your super awesome photo app. If you have any questions or comments PLEASE leave them here or send them to me on Twitter (but probably leave them here 😉 ).

Download The Sample Source Project

  • Note on the sample code: Before you give me crap about doing this in the main thread, I know. Don’t do these operation on the main thread. The example is meant to be quick and dirty and by no means is ready for production. Enjoy!

This post is part of iDevBlogADay, a group of indie iOS development blogs featuring two posts per day. You can keep up with iDevBlogADay through the web site, RSS feed, or Twitter.

[Pi]mp Wallpaper

Found on Reddit

What Does Your Workspace Look Like?

I am always very fascinated with the workspaces of others and frequently check out Lifehacker’s posts on their featured workspaces. So, for this iDevBlogADay post, I thought I would keep it short and simple with a request. I want to see (and I’m sure others do too) photos of YOUR workspaces (especially those of you with standing desks).

Seeing someone’s work area is especially inspring to me, I love seeing where others create and what they surround themselves with for inspiration and motivation.

So, I’ll start by sharing a photo of my current workspace. This is where the magic happens…

Within my workspace, you will find:

  • Macbook Pro
  • 24” Apple LED Display
  • iPad with Kensington Keyboard Case
  • Logitec Speakers
  • “Just Like Jesus” Daily Devotional
  • Embark (Target Brand) Fitness Ball
  • Apple wireless keyboard and Magic Mouse
  • Bonsai Tree (coming soon :) )

So there you have, this is my workspace. Please post a link to your workspace photos or email them to brandontreb [at] gmail [dot] com and I will append them to this post. I can’t wait!

Update: Here are some workspaces submitted by readers so far:

Submitted by Roaming Gamer

Submitted by Wayne D

Submitted by dwsjoquist

Submitted by zzelladonatella

Submitted by beninati

This post is part of iDevBlogADay, a group of indie iOS development blogs featuring two posts per day. You can keep up with iDevBlogADay through the web site, RSS feed, or Twitter.

Free App Per Day Service

As many of you may know, I created a site called Fresh Apps. This site started as sort of a Digg for developer submitted iPhone apps. Since then, we have added plenty of new features and have grown a community of over 10,000 iPhone users.

Recently, I have noticed a few services sprout up that basically have a schedule of apps that shift from paid to free for a given day. The most notable being Free App A Day.

After doing some research, sites such as these are charging a significant amount of money (I have heard up to $10,000) for a 1 day feature.

So, I was curious, given our user base, what do you (fellow iOS) developers think of FreshApps offering a similar service? If we did offer a similar service, here are some questions I have (and would love your feedback).

  1. How would you change existing services? What new features would you like to see? what features are worthless?
  2. How much would you pay for such a feature?
  3. Would you be interested in having your app featured the first month for a minimal cost ($1 or so)?
  4. Would you use an iPhone app that lists the upcoming paid to free apps?

Thank you all so much for your feedback. I’m just in the brainstorming time of this, but I will totally keep you up to date if anything comes of it.

New Year, New Blog Theme

I seem to change my WordPress theme more often than I change my socks. I just tend to get very bored with my blog aesthetics. Not to mention, I will always find someone out there with a cooler blog theme than mine.

After setting up a blog site for the pastor of my church (http://brownbishop.com), I fell in love with the Standard WordPress Theme. Not only is the theme absolutely beautiful out of the box, it’s also a theme framework giving you TONS of configuration options including custom layouts, social network integration, and analytics integration. I have seen quite a few amazing blogs built on top of the Standard Theme framework that all look incredible but completely different.

So, I urge you to check it out, It’s kind of pricey ($50), but well worth worth it in my opinion.

Cloud Storage Wallpaper

Source: http://simpledesktops.com/

This is my current desktop image. I thought is was pretty sweet so I’ll share it with you all.

Merry Christmas!

Changing Your Life In 2011

For this blog post, I decided to take a small break from my Twitter Client for Mac tutorial series and discuss something a little more useful 😉 . I felt that a fitness post would be most appropriate around this time of year as all of our “Geek Guts” begin expanding.

My Fitness Story

It’s December 23rd and as we gear up for Christmas, we are also compiling our New Year’s resolutions. And I’m sure that on most people’s (especially us computer geeks) lists is something related to weight and a healthy lifestyle. So, I wanted to discuss a little bit about how I made fitness a priority in 2010 and how you can too in 2011.

I began my fitness journey at the beginning of 2010 where I weighed in at 185 lbs and had 19% body fat. Now, I am in not way saying that I was a thick dude. I have been blessed with a stellar metabolism, but I definitely didn’t look “in shape”. More importantly I didn’t have a clue about living a healthy life style. Being a geek, I sat for hours at my desk every day, eating quick foods and drinking soda.

One night, I saw a commercial for the fitness program P90X and was actually very intrigued. Don’t worry, I’m not including any affiliate links or things of that sort, so please don’t think I’m trying to sell you on something. Needless to say, I went on YouTube to find out just how legit this program was. After some browsing, I was quite impressed and inspired. It seemed that after 3 short months (seriously no time), people had changed their entire life around in terms of health and fitness.

So, I did what any geek would do and took a visit to the Bay and acquired a copy from some Pirates. After checking out the program for a week or so, I was hooked and decided to go legit and purchase a copy. Within 3 months, I began to absolutely LOVE exercising, in fact I became a little addicted to it :/ . I learned how to track what foods I was intaking as well as replaced much of the crappy liquids I was drinking with water.

After completion of the program, I was down to 163lbs with a 12% body fat and have been exercising since. I’m not posting photos because I feel that would be in bad taste. Check out others on YouTube.

Getting Started

Now, this is a really lengthy intro (kind of sounds spammy too, sorry), but the point is, it’s not hard to get into a healthy routine. I have talked to tons of people about my “transformation” (I hate this term), and almost every person asks me how I got started. Everyone either feels that it’s too late for them, or they will start ‘tomorrow’. So, here is a formula for you lazy geeks (I can call you that because that’s what I was last year :))

  1. Grab a copy of P90X. Again, I’m not a P90X salesmen, Pirate a copy if you have to. Just get one! If you want to buy it, it’s about the cost of 3 months of the gym, which coincidentally is the length of the program (90 days) $120
  2. Buy a resistance band – These are everywhere (target, walmart, big 5, etc…) – $20
  3. Buy a pull-up bar – $30
  4. Quit stalling – Start this Monday and let me know how it goes :)

Now, this is just the beginning. The biggest problem with diets/fitness programs/etc is people don’t look at them as a lifestyle change, they see them as temporary. People say crap like “I want to be XYZlbs or fit into a size J”. Don’t do that! Sure these are nice goals to have, but DONT MAKE THEM THE REASON YOU EXERCISE AND EAT HEALTHY. If you do, you are just setting yourself up to fail. Exercise and don’t eat crap because you want to be healthy. Do it because you are sick of being tired and lethargic all the time.

I don’t have time to exercise

Of course you would say that… I did too. That’s why I love P90X. It’s only 1 hour a day and within that hour, you are told exactly what to do. I always felt that to exercise, I had to spend hours in the gym, running, lifting, blah blah… No, one hour a day. I spend that reading Reddit. Get up an hour earlier, go to bed an hour later. Stop eating on your lunch break and exercise then. You can always eat at your desk when you get back.

Staying Motivated

So, you have decided that 2011 is going to be your year; you are going to get in shape. Here are a few tips to help you stay motivated.

  1. Learn, learn, learn – Just as you spend time learning about new programming languages, or reading about yet another tablet device. Learn about new things to eat, new exercises to try, new goals. Whatever, just maintain the excitement by learning new things.
  2. Get others involved – This generally comes naturally. When others see you getting into shape, they will most likely want to join. This can be a great motivator, especially when you are feeling burnt out. Get a workout buddy to go to the gym, run, do P90x, etc… with.
  3. Find healthy things to consume that don’t suck – This is a huge challenge for people starting out. They think that they have to eat celery and chicken breasts all day. This is one thing I love about p90x. It comes with an incredibly (and delicious) diet plan including recipes. In a future post, I’m going to write about a stellar protein smoothie that I have every day.
  4. Get the crap out of your house – I’m serious, you won’t miss it. Cookies, Soda, Doughnuts, whatever…
  5. If you want soda, drink a soda – A can of soda is roughly 120 calories, this isn’t terrible. But don’t make it a habbit. Limit yourself and throw away your effin Big Gulp cup!
  6. Eat before you leave your house – this is huge. If you are hungry and you are out, what do you do? You go scoop up a McFeeces from McDonalds… Instead, eat some lunch meat or whatever before you go run those errands.
  7. Eat frequently with smaller portions – I told my dad that I eat about 5-7 times a day, and he responded with “you’re going to get fat doing that” Contrary to popular belief, it is far better for you to eat more frequent, smaller meals. This is tricky when you spend the day in the office. You have to somewhat plan your day in terms of food. Bring stuff to snack on such as nuts, popcorn, protein bars, and beef jerkey.
  8. Share your success – Blog, Tweet, Facebook, Youtube. Whatever it is, tell people about it. Others will surely praise you for this, and you will most likely motivate them. Plus, it will hold you accountable.
  9. Get a good water bottle and take it everywhere – Water is a tricky thing. It’s so hard to remember to drink enough. I have found that if I have water in front of me, I will always sip on it, especially when I’m sitting at my desk all day.

To wrap this up, I’m not trying to sell you on P90X or any other fitness program. I just feel that it will be a killer start and give you all of the tools needed to launch into a healthier, more fit 2011. Also, you will start seeing results very quickly.

Conclusion and Resources

I hope you have enjoyed this post and I would LOVE to answer questions as well as point to more resources. I have linked all of the referenced resources below for you to check out.

This post is part of iDevBlogADay, a group of indie iOS development blogs featuring two posts per day. You can keep up with iDevBlogADay through the web site, RSS feed, or Twitter.

Does He Have A Memory Leak?

My wife has this interesting problem of having vivid dreams about whatever she was last watching/discussing before bed. Last night, I was explaining to her all about memory leaks as I had a discussion with a coworker earlier in the day about them. She was curious, so I gave her a very simple explanation in which she could understand.

Later in the night (about 3 am), my son woke up screaming. He must have had a bad dream or something; so, I went in there, put him down and went back to bed. My wife rolls over, looks me straight in the eye and says in a groggy voice “Does he have a memory leak?”

I laughed so hard it woke her up. I then appropriately responded with “I have to go take a memory leak”.

Pocket MUD Update Approved

Wow, in record time (2 business days!), Apple approved the update to my iPhone app Pocket Mud. For those of you who don’t know, Pocket MUD is my FREE MUD client for the iPhone.

Here is whats included in the update:

  • Added support for Landscape!
  • Auto-reconnect on reopen
  • Multiple actions for triggers (just separate the actions with commas)
  • Added ability to play sounds when a trigger fires (please send sound suggestions to brandontreb@gmail.com)

The app is free, so please check it out and leave some (positive) feedback! :)

Download on iTunes

Advertising Now Available

Current Public Site Stats

I am now offering advertising in the sidebar for the killer price of $10. I felt that the Google Adsense ads looked super spammy and this is a much cleaner way to handle things.

So please give me a hand with these server costs, show off your sweet apps/site, and purchase an ad on the blog.

Either click the Advertise Here button on the side or click this link http://bit.ly/gMYepc

Thank you so much for your support!

That’s It! I Quit Programming.

Because I could never make something this cool/impressive:

YouTube – Introducing Word Lens.

Link: Minecraft Like Rendering Experiments in OpenGL 4 – Codeflow

I found this article while browsing reddit and was blown away. I have been a little mystified at the potential algorithms used by notch to render the terrain in Minecraft.

This provides a killer explanation of some interesting algorithms that can be used to generate such worlds. It also contains the source code that you can download and play with.

Minecraft Like Rendering Experiments in OpenGL 4 – Codeflow.