Twitter-Based Exception Logger

November 20th, 2009
1
2
3
4
5
6
7
8
try
{
   //some code goes here
}
catch (Exception e)
{
   logToTwitter("Application Name", e.getStackTrace());
}

Read the rest of this entry »

iPhone Development – Is It Really That Easy? (fin)

August 17th, 2009

I guess I’ve lagged on completing this blog entry series for long enough.

Indeed I was able to complete my application in the time frame I set out for. The application itself worked pretty well. I know I could have made it a lot better if I were actually able to get the application onto my iPhone during the development phase or have the simulator use the iTunes library as the basis for its library. I am now debating whether or not I want to put the application up on Apple’s App Store.

Read the rest of this entry »

On iPhone and Android-Powered Phones and Security

August 10th, 2009

I don’t mean for this to be a big entry, but I just wanted to point something out. I was reading the interview with Charlie Miller (of, recently, iPhone SMS vulnerability fame) and he said something that I never really thought about until now:

As an aside, Android implemented their SMS stack with Java. Therefore, it was not possible to corrupt memory, instead, we just got unhandled exceptions. So our attacks were limited to denial of service.

Since all of Android’s applications are actually written in Java rather than Objective C, this gives Android a bit more security when dealing with 3rd party code. Don’t get me wrong, as a developer I have to qualify that with though probably still possible, just harder to accomplish, there will probably be nothing as bad on Android phones as this iPhone SMS “threat” was. The best you can hope for is to crash Android’s JVM.

If Apple is so anal about trying to protect ATT’s cellular towers and thereby claiming jailbreaking an iPhone is bad, then why would they allow such a low level language to be the language of choice for developing on the iPhone? This is what happens when a company wants to push their language into even more of the mainstream.

On the Subjects of object == null and collection.size() == 0

July 28th, 2009

Let’s just get one thing straight here people, an object that is null does not mean the same thing as a collection/array of length zero. I’m sort of seeing this more and more as I continue my existence on this planet and I say we put a stop to this now. Take this example method declaration (written in Java):

public Collection<searchresult> getSearchResults(String searchTerm);</searchresult>

Straight forward enough, I would hope. This method takes in a searchTerm String, magic happens (ah abstraction), and a Collection of type SearchResult is returned. Now here is the kicker: what happens if the search query resulted in no results? What should be returned? And why?

Read the rest of this entry »

Subversion and Ignoring a file/directory using svn:ignore

July 19th, 2009

So one of my deep, dark secrets is that I’ve always used a visual Subversion client, be it in Eclipse using Subclipse or TortoiseSVN so needless to say I never learned how to use the command line tools of Subversion in depth. I’ve used svn co and svn add successfully, but that’s it and not in depth. Now that I’ve been developing an iPhone application on my Mac, I’ve run into a problem of not really finding GUI tools to use. The problem is further complicated by not really looking for GUI SVN tools to use. I figured it would be a good time to learn the command line tools available by default on OS X. I think they’re there by default anyway. Maybe they were installed when I installed Xcode? Whatever.

Read the rest of this entry »

iPhone Development – Is It Really That Easy? (part 4)

July 18th, 2009

I didn’t post yesterday mainly because I knew I wasn’t going to be doing any development last night. I needed to take a night off, so this post is about what I did two nights ago.

A couple of nights ago I decided that I should just start with my application and learn as I go. This actually turned out to be a pretty good idea. I didn’t have much time code at full stream, so I took the opportunity and what little time I had to set up the bare bones application, and by that I mean take what I learned in the “Hello, World” iPhone development example. I set up the buttons and label using Interface Builder as well as all the code that links up to the buttons and label.

There are two main parts left in my application: firing events and music control. Firing events I am working on right now which seems to be pretty straight forward. To be honest, if I wasn’t goofing around using NSLog I would probably be done with it right now. I am watching Star Wars as I code so my attention is split pretty evenly between the two.

Sunday, once I finish with some family time, I will get into the bulk of the music player. Thankfully I started this project after iPhone software 3.0 was released because, as it seems, controlling/playing music was not available to developers in earlier versions.

Wat?

Not sure how Apple could have thought that was a good idea. At least they saw the errors of their ways.

Thoughts so far: this is much easier than I had anticipated. Also setting up a new iPhone application from scratch and using Interface Builder is much easier the second time around.

iPhone Development – Is It Really That Easy? (part 3)

July 15th, 2009

Having completed Apple’s Hello World tutorial application, I feel like the application I want to write will not be that hard to do. I just wish that I had more time to actually learn the language and SDK in its entirety before jumping into it. After running through the demo application, I think that the application that I want to write will be pretty easy to do using the language, but alas “easy to do” means nothing without fully knowing your tool set. But I guess that is the bulk of this experiment; can this application get done in such a short amount of time with very little prior knowledge?

Read the rest of this entry »

iPhone Development – Is It Really That Easy? (part 2)

July 14th, 2009

Yesterday, I began the (about) 10 day long experiment to see if I could learn about the iPhone development process then actually write something useful. Though I haven’t written anything, I thought it would be important to at least get familiar with the language itself, Objective-C. I saw down with Apple’s Objective-C primer and read through it. Though rather short, it did provide quite a bit of detail regarding the language syntax and semantics. Thankfully it no longer is totally foreign to me, but as I thought I still think the syntax is pretty hideous.

Read the rest of this entry »

iPhone Development – Is It Really That Easy?

July 13th, 2009

I’ve managed to avoid this dirty topic, however I shouldn’t any longer since I am going to begin on an experiment. How easy can it possibly be to make an iPhone application? Can a simple one be created in about 10 days time? Most would say “Yes,” however I have no prior experience with Objective-C, let alone the iPhone SDK, or Xcode. With all these unknowns, can sufficient knowledge be picked up and put to use to write a rather trivial application for the iPhone?

Read the rest of this entry »

OS X Failure: Mounting Via Shell (Updated)

June 30th, 2009

No I am not dead and I am back with a Mac. So how about that? I definitely (probably said this before) want to get back into blogging but I ran into something tonight that is pretty irritating. So much so that I had to fire up the ol’ blog account and get to writing.
Now, I’m pretty sure I’m doing something wrong here but none the less I want to post this up and (hopefully) get some input on the situation. Here’s the deal. I want to mount (via Samba on an Ubuntu box named ubuntu1) a shared directory that is named test. I want to mount it in a directory inside my home in a directory named “test” on OS X. Why is it such a problem? Is it even possible to mount a Samba share this way? Note that /Users/mike/test exists but /Users/mike/test1/ doesn’t.
Read the rest of this entry »