Tech and a few other things RSS 2.0
# Saturday, February 06, 2010
Augusten Burroughs, sounds familiar, oh yeah that's right, William Burroughs. Did Augusta choose to use a nom de plume because his real name has a direct correlation to Winnie-The-Pooh? Let me guess,  he choose Burroughs because he too is gay and wrote a shock novel similar to Naked Lunch like Willy B.?

Augusten isn't quite as revolutionary for his time as William nor is his best friend Jack Kerouac, but then again Running With Scissors has a clear story line, a welcome difference from Naked Lunch. Running with Scissors is a memoir of Augusten Burroughs (Christopher Robison). It intimately describes his life growing up and how far it fell from the norm. It is a fun read if you really enjoy setting the book down every 20 minutes, looking up at the sky in retrospect at what you just read and saying "what the fuck!" Would I recommend reading it -- maybe. I would classify it as the Jersey Shore of novels; nothing revolutionary or mind bending, but you just can't turn away from watching the characters with their skewed sense of reality and themselves.
 
Saturday, February 06, 2010 2:24:05 PM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
readings
# Friday, February 05, 2010










The Problem:
Getting a Powershell script to run a batch script.

The Solution:
powershell.exe -noexit d:\<path to my batch script>\Reporting_Code_Load.bat

Explanation:
All you need to do is add the line above as is to your Powershell script. The "-noexit" tells the command prompt to stay open, simply remove it if you don't want the command prompt to open.
Friday, February 05, 2010 3:47:22 PM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
.Net | powershell
# Wednesday, January 20, 2010

I'm told the best way to keep your New Years resolutions is to write them down. What a better place than my personal blog to attempt to keep me on the strait and narrow. Here is my list.

1. Read 1 book a month.
Since I recently finished school I now have my time back to read what I like. I have decided to start off reading fiction for some feel good wins during the first couple months then move on to something that I may improve from. I'll do a quick post of every book I read.

2. Get my PMP
Apparently a Masters in Business Administration with a very strong focus in finance from a reputable, though not tier 1, business school isn't a big deal anymore. Being a slave to the corporate demands I'm diving into becoming a project manager professional (PMP). It might be a little interesting I suppose. Though I'm betting the challenge of organizing teams will be a tiny bit easier than calculating derivatives and bond valuations.

3. Finish my Second iPhone Application

My first application is a fun little Online Banking hack for the company I work for. The second one I would like to create is a wine cellar type application for the iPhone. I know a few wine'os out there that have a huge "library", I believe this would be useful and YES someone else has done this, but I think I can do it better. :)

4. Use Less Cliche Statements
This could just be me, but I feel statements I use such as "The grass is greener on the other side," are because I am lacking the creativity to express how I truly feel so I go with something easy to grab, because it's, what is said, and not necessarily indicative of my true feelings.


Wednesday, January 20, 2010 11:05:55 PM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
Me
# Friday, January 01, 2010


The Problem:
Not being able to do a simple compare in an "if statement" between two alpha or numerical statements while programing in objective C.

The Solution:
NSOrderedSame

Example Of Use:
This compares the value of "key" to the value of "support." If they are equal then you get a return value of true.
if ([key compare:Support] == NSOrderedSame)
Explanation:
For some reason Objective-C decided to make it a little bit harder to compare values. Instead of just using the traditional way "[key compare:Support]" return a true value for the if statement OR "([key compare:Support] == 0) OR "([key compare:Support] == true)" they decided to make it a little bit more complex. As demonstrated above. I'm sure the writers of Objective-C have a good reason for this, but one more level of abstraction could make Objective-C that much friendlier to it's programmers and isn't that what it's all about in the end...getting more people to develop in your language.

Some of other comparisons you might want to use are:
NSOrderedAscending -- The left operand is smaller than the right operand.
This is equivalent to using "<" in most languages.

NSOrderedDescending -- The left operand is greater than the right operand.
This is equivalent to using ">" in most languages.
Friday, January 01, 2010 7:51:02 PM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
Mac | Mac OS X | Objective C
# Wednesday, November 11, 2009
If Scott Hanselman lives and die's by unit tests, why don't we all just fall in line? It seems the nerd community, has an uncanny ability to adopt silly things quickly. Things like xkcd.com or the idea of ninja's. I have yet to laugh at one xkcd or understand how ninja's are relative in any shape or form, because of this I felt I needed to read up on unit tests, specifically for C#, to find out if it's just hype or this is something development shops with a strong QA team really need to look at.

I read two books that covered the topic of unit testing. The first book was Foundations of Programming (recommended by Scottie H. himself and is free) and the second is Pragmatic Unit Testing In C# with NUnit. Both of them start off with the same old song and dance on how you might have up front costs of introducing unit tests to your code, but the stability these tests provide over the duration of your codes lifetime will cause such dramatic cost savings for the company, it would be foolish not to explore the idea. What a compelling sales pitch, a pitch salesmen, for just about any technology, have used since the beginning of technology in businesses. I'll cut all the used car salesman tactics out and state the most intriguing argument to unit test. It increases code stability and it's easy.

The next question I asked myself: What do I exactly test in the code-base I am working on? In Pragmatic Unit Testing (PUT) they give us an acronym to use in order to answer this question. BICEP.


BICEP, breaks down as such.

Boundary Tests
Inversion Tests
Cross Check Tests
Error Tests
Performance Tests

These are the 5 major aspects one should test, according to PUT and it provides unit testers with a place to start. The next major topic in discussing how to test code is decoupling one piece of code to another. Does your code talk to a middleware? How do you test if middleware is not done creating your service to consume or if middleware is down? In steps NUnit Mocks, NMock2, and DotNetMock. These 3 mock frameworks provide the developer with the ability to feed your tests predefined values, values decided by you. Without going into how to use these mock frameworks, I believe that outside of a few isolated situations they should not be used. The entire purpose of testing your code is to test that you are getting information back that fits the criteria you are looking for. If this information, that is beyond your control, changes on whatever level for whatever reason, you as a developer need to know. Putting in mock objects hides this.

Since I work for a web shop, the topic of web UI unit tests interested me. PUT recommend using Selenium. This makes sense because it still uses the nunit style of testing keeping all your tests to one testing style. Selenium seems a bit cumbersome in comparison to WaitN or iMacro, but I feel keeping all your testing in the same style outweighs the cons of not using Selenium. The more desperate testing sources you introduce, the more confusing it is for an outsider to step in and see the whole picture when learning the code, especially when it's not contained in a single solution.

Finally, I recommend reading both of the books mentioned, but lets be honest most of us care so little about unit testing we'll be lucky to read all of 1 of these books let alone all of both. If this is the case I recommend PUT, while the first few chapters read like the high school teacher striving to gain his students social acceptance, it's an easy read and you can jump into the book at nearly any chapter and get the exact information you are looking for on unit testing. This is something I wish all programming books could achieve.
Wednesday, November 11, 2009 3:12:32 PM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
.Net | readings | Unit Testing
Navigation
About the author/Disclaimer
        
My name is Ben Coffman. I'm in love with all things Mac yet I make a living in .NET. I view this as well rounded. When I turn the internet off I focus on family, random hobbies, and sharing moments in life.

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 2010>
SunMonTueWedThuFriSat
31123456
78910111213
14151617181920
21222324252627
28123456
78910111213
All Content © 2010,

Sign In