Tech and a few other things RSS 2.0
# Sunday, July 03, 2011
A couple weeks ago I did a code binge to nearly finish creating a beer app for the iPhone. I seriously spent 12 hours one Sunday, eating (err drinking) only energy drinks. The bi-product of this was a nearly finished app, and me being burnt out on coding Objective-C...for a short bit :) , the collateral damage is I haven't been posting any code errors fixes I find while coding. These blog posts drive the bulk of my traffic mostly from Google and oddly enough Baidu (Google search engine for China).

Looking at my wife's blog I decided to do a what I like in technology today list just so I can keep posting content for my regular readers...all five of them 4 of which are my family members. :)

1. Google's self driving car. I honestly can't wait until this becomes a reality, don't get me wrong, on the odd Saturday, with perfect weather, I love to take my car out, roll the the windows down, open up the sunroof and just drive with the freedom of life blowing through my hair. Outside of these perfect Saturdays, I'm mostly driving to work with random trips here and there. Nothing excites me more than the ability to hop in my car pull out my laptop or book of the moment and just start reading until I arrive. Nevada has taken the first steps into making this a reality.

2. Grooveshark.com. A very not nerdy girl from my last job showed me this website about 2-3 years ago. When it comes to just listening to your favorite music the way you want it (no last.fm or Pandora business where you can't make your own playlists with the exact songs you want to listen to). It's a wonderful site, clean lay out, and unbeatable music selection. I do question it's legality...ah hell I don't care how it gets through the loopholes as long as I can choose the music I want to listen to when I want to listen to it.

3. Adafruit.com/blog. It's just nerds making fun, semi-practical things utilizing technology. It doesn't get much nerdier, but it certainly tickles the geek brain on potential projects. When I'm done with my beer app, I want to make something that responds to a twitter feed, maybe automatically shut off the lights when I twit lights-out to a specific twitter account. Who knows, the sky's the limit and that is the best part of what this site does for me.

4. Capital One's technology ambition. I've seen more than a few company's technology department, most of them stale with very little drive to step it up. These stale companies are the kind of companies where you sit at your desk over lunch and read about the cool stuff Google and Facebook are building and think, damn, I want to be a part of that. In the banking world of technology, Capital One, is that company. They are working very hard and fast to move to the top in technology offerings and they understand this starts with building a strong foundation. The technology ambition of this company is not just in their projects it's in their people. You can feel it, taste it in the air, and appreciate the passion everyone brings to the table. Expect to see big things from this company in the next 3-6 years. I fully believe they have the potential to be a game changer in the banking industry.

5. Scott Hanselman. This guy is a nerd. Not even a little bit of a nerd, we are talking hardcore drinking the cool aid nerd, BUT the passion, talent, and great presentation skills he has keeps me coming back. He regularly updates his blog with intriguing material (no easy feat coming from a guy who has his own) and is not afraid to express his true opinions even if it may not fall in line with his employers(Microsoft) believes 100% of the time. Which, I believe, in the end, gives him more credibility. He's a .Net guy, but chances are he probably knows more about nearly any other language than you would suspect. If you ever get a chance to see him speak about .Net stuff do it, even if you don't do .Net, you will enjoy yourself regardless.




Sunday, July 03, 2011 1:08:41 PM (Central Standard Time, UTC-06:00)  #    Comments [2] - Trackback
Me
# Friday, June 17, 2011
I'll just put the first paragraph of the article (WSJ Blog Post).

"You’d have thought a 50% drop in Research in Motion’s share price between February and yesterday afternoon would have priced in a lot of bad news, yes? You’d have been wrong. It just keeps getting worse by the hour."
  WSJ Link

I really can't see how this is a surprise to anyone. RIM's phones suck, they suck really really hard and I haven't met a single person who disagrees with this. This company had such a great lead on every other smart phone and then they just blew it. I'm certain this company will be used in business schools as examples of what not to do for many years to come.

Friday, June 17, 2011 7:52:38 AM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
Blackberry
# Monday, May 23, 2011


Code:
NSUInteger       newIndex[]   = {0, row};
NSIndexPath	*newPath      = [[NSIndexPath alloc] initWithIndexes:newIndex length:2];
There is quite a few things assumed in these 2 simple lines of code. Let's break it down into newbie terms.

First you must understand that a "section" is an area of grouped rows in a tableview. You see this in many iPhone apps. Think about the "Settings" app. Click around in it and you will see sections.

Next you must understand that a tableview assigns the property "cellForRowAtIndexPath" with a NSIndexPath value. In short this property looks at the NSIndexPath's first value for the section the row is in and then the second value for the row itself for the value you are trying to retrieve. 

The 0 in the "newIndex[]" is for the "section" in the tableview, stating this will be the 1st section (in this case the only section). and the "row" is for the...well row in the section within the tableview.

So in the next next line with "*newPath" you have the code assigning the "newIndex" with a "length" of 2. What you are reading here is that tableview should look two nodes deep in your array of sections with each node in your section array caring an array of row nodes (think nested arrays).

The first node is the section array and the second node is the row.
So in our example:
Node 1 = specific node in section array (here its node 0), 
Node 2 = specific node in row array nested in Section array.


If the above is italicized text is confusing see screen shot I attached. The picture may make it easier to understand. Array 0 is the array of section nodes, where each section node contains an array of rows.





An different way to create the NSIndexPath that might be easier to read is to use this function.
Code:
NSIndexPath *myPath = [NSIndexPath indexPathForRow:myRow inSection:mySelction];
Here is the exact definition from Apple Documentation, with the knowledge I gave you above it should be a bit more clear now. A "category" by the way, is, in short, a way to add extra methods to a class without subclassing it.

Many methods of UITableViewDelegate take NSIndexPath objects as parameters and return values. UITableView declares a category on NSIndexPath that enables you to get the represented row index (row property) and section index (section property), and to construct an index path from a given row index and section index (indexPathForRow:inSection: method). Because rows are located within their sections, you usually must evaluate the section index number before you can identify the row by its index number

Monday, May 23, 2011 4:38:30 PM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
Objective C | xCode
# Monday, May 16, 2011
Having close friends that are openly gay and now married (yeah Iowa), I feel like I have, at the least, an insight to what they have to go through in their lives. Some might say that gay is all the way accepted by society today. That is wrong! Here is my case, name any openly gay political figure for the US. There are zero...openly gay that is (unless they get caught in a bathroom....and why is it always the super conservative republicans, hmmm that's a whole different story). At any rate, Google's Chrome did a great job at promoting "It Gets Better." Maybe one day this silly violence towards gays will go away. 


Monday, May 16, 2011 6:11:05 PM (Central Standard Time, UTC-06:00)  #    Comments [1] - Trackback
cause


I found myself wondering what the difference between these two items are in Objective-C and when exactly to use them. In short, you should use @class in your header file and #import in your implementation file with the exception of conforming to a protocol (interface in .net) in your header file, in which case you need to use #import not @class in your header file, but of course there is a little more to it than that. Here is the best answer I got from stackoverflow.com -- I added a few things to make the below statement a little easier to read, because we don't all speak nerd.

Use a forward declaration (AKA "@class")  in the header file if needed, and #import the header files for any classes you're using in the implementation. In other words, you always #import for the files you're using in your implementation, and if you need to reference a class in your header file use a forward declaration as well.

The exception to this is that you should #import a class or formal protocol you're inheriting from in your header file (in which case you wouldn't need to import it in the implementation).


There you go the simple and easy explanation on when to use @class and #import. Now back to the code.

Monday, May 16, 2011 5:50:32 PM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
Objective C
Navigation
About the author/Disclaimer
        

My name is Ben Coffman. I like to build things: programs, programming teams, programming departments and maybe one day a company with lots of programmers. When I turn the internet off I focus on my family, random hobbies, and sharing moments in life.

Blogs I follow:

1. 2andahalfd.com

2. Jeff Lamarche

3. Scott Hanselman

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Ben Coffman

Archive
<February 2012>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910
«Older Posts Newer Posts»
All Content © 2012,

Sign In