All posts by David

My first iPhone “App”


Well, there it is! As it lives and beeps. It’s my first iPhone App.

What does it do? Well, when you press the button, you get a little Jersey d-bag slang. Everyone it tired of the ubiquitous “Hello World”, and I am not different (in that respect, and also nothing like anyone else…. dichotomy, discuss).

The good news is that it took me about 10 minutes to “write” this app. I use the term write VERY loosely since I only wrote a little bit of JavaScript, instead of buckets of Objective-C (which I’m starting to study, I have a pile of books next to me here on the subject).

So, onto my first REAL application planning effort. I know what I want to build first. It’s simple but I want this app on my phone AND on my laptop for daily use. More on that when I get it built.

For now.. enjoy that which I have created. Marvel at it’s simplicity and power. Dare to dream what a single button can do…. bring you some poorly spelled d-bag slang from a cesspool of d-baggery known as New Jersey.

CIDR notation – Living in Net Block Hell

CIDR… what is CIDR? No, it’s not something you drink. Although, given enough exposure to it, It’s something that makes me want to drink (hard) cider. Be that as it may, it’s an important part of my job, de-cidering, I mean, deciphering these cute little buggers.

So.. just what does a typical CIDR notation IP block look like? Well, it looks like this:

67.213.31.0/26

Now, you might be asking yourself, what, why and who cares? So, to answer your questions:

What:
Well, it’s a CIDR block dumba**, that’s what we’re talking about here. Oh.. what does it mean you might really be asking me. It means: Classless Inter Domain Routing. Or, in layman’s terms, it’s like a sort of Internet Zip Code, a method of sub-organizing the massive worldwide IPv4 addressing system (which amounts to approximately 4,000,000,000 addressable ‘systems’, not counting those massive blocks that are set aside for private network use, such as the infamous 192.0.0.0/24.

Why
Well, there is a good question. In the early 90s it became apparent that the number of free IP addresses would be depleted. The total number of IPs was large enough then, but because of routing issues, they could only be used in blocks. Now, those that are even slightly in the know, know, (heheh) that that entire pool of IPs is projected to be exhausted in early 2011. Yeah… that’s right, NEXT YEAR! But, IPv4 and the new IPv6 that supersedes it is another discussion for another time. Right now, were talking about Cider!, uh CIDR! So, trying to get back on point, the use of these CIDR blocks was a way for routing tables (in those things they call routers, imagine that) to store and organize large pools of IPs, or small pools of IPs as one might see fit.

Who Cares?
Anyone that deals with internet IP infrastructure cares. Now, since it’s my business (what I’m paid to do) is watch the ENTIRE Internet to make sure that:

  • DNS (oh.. dont’ get me started) works for corporations large and small. And yes, DNS hijacking is real, it happens, but not only that sometimes they are corrupted accidentally, and people like me designed the software the keeps track of that.
  • I’m able to do other things with this data that I can’t talk about, period. So don’t ask.
  • And, last but certainly not least, it’s just how us geeks communicate. So be it.

Now, why is it a pain in the ass? Well, simply, I need to accurately decode these CIDR blocks into IP ranges (what I do with them is a classified trade and operational secret, so don’t ask, I just need to do this). And to do so requires MATH!. Math… nothing wrong with Math, but it’s math that is to computationally intense for me to do it in my head. Primarily because it’s based on bits, 32 to be exact. Bits are those nasty little binary components of the real numbers the rest of you common mortals pretend you know what you are doing with.

I’m not going to try to explain why routers care about CIDR, I’m only going to say ONE of the things I care about most, re: CIDR blocks is getting the actual (true) IP range values from that short-hand notation.

So, let’s take the fictitious example I displayed before (67.213.31.0/26). I don’t know whom off the top of my head (I have databases to do that sort of stuff for me) that CIDR block might belong to (and it might belong to more than one organization), but let’s pretend that CIDR (the one I picked out of thin air) is relevant.

First things first.. we need to know what the block notation of 26 means, so we’ll start there. This part is called the ‘Network Prefix’. It signifies the number of bits (from the left) that identify the starting point of that network block. In this case, the first 26 bits determine the NETWORK and the last 6 bits ( 32 – 26 = 6 ) the HOSTS that are within that NETWORK.

So.. taking that number, 67.213.31.0 :

  • 01000011.11010101.00011111.00000000
  • and knowing we need the first 26 bits, which would be:

  • 01000011.11010101.00011111.00------
  • The starting address point is.. ta, da! 67.213.31.0
    uh.. OK.. so that’s not super illustrative.. but do the math anyway.

    OK.. next.. we know that we have a block of 6 bits to play with, starting at ‘0’. so the range is:
    .00000000 to .00111111

    Now.. doing that big of math we get (drum roll please…)

    0 (where we started in that net block) up to 63 (which is what 111111 binary means in base-10.

    THUS:

    The IP range calculation for this 67.213.31.0/26 is:

  • 67.213.31.067.213.31.63

    Now.. don’t you feel a little enlightened?

    Maybe next week, if I’m in a good mood, I’ll write a CIDR translator program and post it to my blog, but don’t hold your breath, unless you want to PayPal me a a $1000, then I’ll do it this weekend.

  • Corporation or LLC – that is the question.

    I’ve always been one that is not at all comfortable relying upon a single source of financial well being. Since the early 80’s in one form or another I’ve owned and operated a business.

    Early on I have a little Electronics sales business selling Cell Phones to the well-healed during it’s hayday. It was fantastic. Hardly work, get paid well, and live La Vita Loca.

    I’d take a number of odd jobs during that time, driving computer mag tapes around Silicon Valley, installing car audio systems, systems administrator for a large multi-national corporation, Y2K mitigation for a number of organizations (not the least strange of which was the California Department of Corrections).

    At any rate, as I said, I’m not one that’s comfortable with a single source of income, so I’ve been investigating business structures to determine what my next organization will look like.

    I have plenty of experience being the President and CEO of a corporation, having ran one from 2000 to 2006. The structure offers a lot of advantages, such as dividing income between corporate tax concerns and personal tax concerns. Corporations also have the advantage of having ownership interest in other organizations. But there are also some disadvantages, not the least of which is very strict requirements and regulations on annual meeting, IRS and state tax filings, additional book keeping to track basis and stock ownership (plus managing different classes of stock).

    I was really more of a burden than a blessing to myself, which is to a large degree why I terminated operation in 2006 and became a W-2 wage slave.

    Since that time a number of interesting ideas have popped into my head. One of which are some software product ideas for the iPhone.

    My intent at this point is to move forward on development of 2 concepts. One of which will have a pretty limited market, the other, I hope, to have a much wider market, and is a type of social networking application. The second of which I hope to see wide spread usage. The plan, is for the first app to fund development of the second. That is the plan.

    Before I cut my first line of code, I wanted to know what type of organization I wanted to create. I need to have my business licenses in place, before I complete the Apple Developers Contract. They are quite clear that it won’t be approved for any shoddily / hastily created pseudo-company.

    I’ve done some reason on the Secretary of State’s website, checked a few of the fee structures, and such, but my primary source of research on the business organization from has been from the book LLC or Corporation – How to Choose the Right Form for Your Business“. Author is Anthony Mancuso, Attorney.

    It’s not a long read, about 250 pages, which I spend the last 5 evenings digesting. It’s rather repetitive, which was a little frustrating for me, initially. However, having completed the book I can understand at least one reason for it’s repetitive nature. If anyone were to pick up the book and *not* read the entire thing (why would you do that, well, sometimes I’ve been guilty of poaching the parts of books I need without taking the time to digest the entire tome) they would still get the frame of reference required to get useful information on the topic of interest. I’d say, it’s a modern writing method for the more ADHD nature of our society. In the end, it’s worth dealing with the repetitiveness. It has it’s place.

    Another helpful part of this book is extensive use of examples. More than once I’d read the example 2-3 times to really grok the point, and that was very helpful. The last chapter is also dedicated to some ‘real-world-ish’ examples of business formation decision making. All in all, it was well worth the $25.00 price tag.

    So, what did I decide to do? Well, an LLC is the type that I’ve decided to select for a number of reasons, but the primary ones I’ll list here:

    • Simplicity of formation
    • Limited personal liability for company debt
    • Pass-through tax advantages (this sword cuts both ways though)
    • Fewer operational requirements (no board of directors, meetings, etc.)
    • Simpler tracking of each owners basis in the company

    So, with my new company name selected, and my form of business decided, it’s time to move forward with foundation of the company.

    You know I’ll be sure to post information on that once the State registration has been completed any my licenses granted, EIN number acquired, and finally the domain names registered.

    Book: “Touching History” – untold story of 9/11

    I’m a fairly avid reader, seldom without at least one book to read. In fact I have two I’m working through right now. And by working through, I mean, working. Both of these A Beautiful Math and The Visual Display of Quantitative Information are pretty technical in nature, so they are not a typical casual evening read.

    Digressing, while fighting off a nasty cold, I took in a little television time on Saturday, the 9th Anniversary of that terrible day in New York City. Obviously there was little on the national broadcast crap-fest, nor the typical brain-dead cable fare to tide me over. But, I flipped onto CSPAN (a guilty pleasure, I’ll admit) and caught most of the 3 hour panel hosted by Lynn Spencer, a commercial airline pilot, whom wrote the book Touching History, The Untold Story of the Drama That Unfolded in the Skies Over America on 9/11.

    I was a fascinating panel discussion. The first panel was comprised of FAA and ATC personnel that were on the front line that morning, trying to sort out disaster, land nearly 5000 planes, and re-route the remaining International flights to other countries. The second panel was comprised of commercial pilots flying when the attack happened, and Air Force pilots that had to intercept countless commercial jets, with orders to shoot if they did not comply.

    Stories of a airport in Canada that was stacked 30 planes deep, fighter squadrons recalled from a training mission to be re-armed and then briefed on the rules of engagement for shooting down passenger aircraft, pilots that saw the planes hit the buildings while they were trying to land, others simple told to ‘get out of the area, just leave’.

    It was a moving 3 hours of television. I felt compelled to go find this book, but sadly, our local book store (I’m not even sure why I waste my time at Barnes and Noble) did not carry it. I know I can get it online, but I’d like to spend my money local, and support stores that carry books such as this.

    When I do get the book in my hands, I will be sure to read, and post my thoughts. In the mean time, you might look into it as well. If the book is anything like the articulate author I watched on TV, I’m pretty confident that I will not be disappointed.


    UPDATE: 23-SEP-2010
    Try as I might, absolutely no luck in finding the book in a brick-and-mortar store. Too many ‘Vampire Stories’ filling the shelves. A rather sad commentary on America’s literary tastes. Not all is lost, the book is in transit as I speak from an online e-tailer. I’m really looking forward to it. I’ll be sure to blog when I’ve started to read.

    Looks like it will be here sooner than estimated!

    Lynn Spencer "Touching History: The Untold Story of the Drama That Unfolded in the Skies Over America on 9/11"
        Previous estimated arrival date: October 07 2010 - October 15 2010
        New estimated arrival date: September 29 2010 - October 02 2010
    

    Loud helicopter, light sleep and a camera

    I can’t remember the last time one of the helicopters woke me up. This morning that streak was broken at 05:14.

    I’m not sure why, but the typically quieter EC-135 helicopter woke me straight up out of a deep sleep. I’m sure it was a deep sleep since I was somewhere off in dream land, and suddenly finding myself looking at the helicopter’s spot light as it landed. Why, or why.. on my day off, did it wake me up at 5 AM?

    All was not lost though. A project idea I’d been toying with for some time, could be tried. Some long time exposures of the helicopters arriving and departing the hospital.

    Catching them in time to get landing shots, that’s going to take quite a bit of luck (they are fast, and often you can’t hear them until they are on final). However, grabbing some photos of take-offs only requires some patience. This time, it was almost an hour of poking around the house waiting for them to leave. But when they do, it’s all business. I typically have 2-3 minutes (maybe less) to get setup after they fire up the engines.

    While waiting I tested out some exposures, macro and zoom shots, different white balance settings, ISO and apertures. When you have an hour to kill, this is not so hard.

    First shots were to bracket the time, exposure and ISO settings:

    Exposure and ISO settings
    Time: 30 seconds
    Aperture: f8.0
    ISO: 100
    Focal Length: 400mm
    Night photo of AirLift Northwest EC-135 -- tail N139AM

    Finally, at 6:00AM they fired up the engines and prepared to depart. Interior of the helicopter is light with bright blue light, which is visible in this photo, and also to the naked eye. I’d always thought that night aviation lighting was red, especially since blue light has a wavelength that is more difficult for the eye to focus upon. Perhaps there is a light barrier between the medical section and the cockpit.

    Exposure and ISO settings
    Time: 30 seconds
    Aperture: f9.0
    ISO: 100
    Focal Length: 340mm
    Night photo of AirLift Northwest EC-135 -- tail N139AM

    This one I cropped at a different aspect ratio to provide a little more perspective. Sort of a ‘lone helicopter in the night’ sort of shot. Not really that ‘lonely’ looking on top of a brightly lit hospital. It’s a first set of shots to see what I can learn.

    Exposure and ISO settings
    Time: 30 seconds
    Aperture: f22.0
    ISO: 100
    Focal Length: 100mm
    Early morning departure -- N139AM

    Finally, The Shot. Or really, the concept s shot I was going for. It did not turn out as I had expected, but I was still pleasantly surprised at the result. I opened the shutter right as the pilot pulled pitch, and the heli started to lift off. It remained open until well after it was out of frame. Typically they have on a spot light on during takeoff, but I did not see, nor the the camera capture one this time. I don’t know what it might have looked like (blown out photo, perhaps), if it had been on. Regardless, it’s close to what I was going for. If you put on a tin-foil hat and listen to Art Bell, you might think this is an alien landing. Use your imagination as you see fit.

    Exposure and ISO settings
    Time: 30 seconds
    Aperture: f22.0
    ISO: 100
    Focal Length: 100mm
    Night photo of AirLift Northwest EC-135 -- tail N139AM

    Blue Angels and Others at SeaFair2010 (Saturday)

    Granted, it’s been almost a week since the Blues flew at SeaFair 2010, but I do have a day job after all, and picking and processing photos is a time consuming affair. Regardless, here are some of the highlights from the fun on 7-Aug-2010 at the Museum of Flight in Seattle.

    Weather was pretty iffy, but the Blues still few a program to the delight of thousands. Here are some of those photos:

    Photos from SeaFair 2010

    Between myself and my daughter, we took almost 2000 images at SeaFair 2010.

    In this blog entry, I will be uploading a handful that really struck me as interesting or good. Here is the first, and so far, my favorite photo from the weekend.

    Sunday 8-August-2010 Blue Angles over Boeing Field - Landing Flyover

    I shot this photo on Sunday, as they were making the final airfield flyover, before landing.

    My next favorite is this one, which my daughter shot with a 50mm lens, standing on a chair, as they made their final flyover, before landing. I think she has an eye for photography. I checked the rest of the shots in the set, and there were no rapid frame pics, she shot this single frame. I love the composition. Lighting was terrible on Saturday when she shot this, but it still worked!

    Saturday 7-Aug-2010 - Blue Angels Flyover Break

    Shot by my daughter on Saturday from the Museum of Flight Cafe, as the Blues returned to land.

    Northern Lights Photography Mission – failure to success

    Tonight, the Northern Lights were visible at latitudes low enough, to be seen in the Puget Sound.

    Armed with my trusty Bogen carbon fiber tripod, my 17mm F/2.8 lens and a heart full of hope, I headed out to part of the county with a Northern facing beach. A few others were there to try to take in the spectical.

    Sadly fires burning in Canada to the north, provided enough haze and smoke to obscure any chance of seeing this great sight. But that doesn’t mean I might not catch it on the camera (stranger things have happened).

    Tonight, wasn’t one of them, BUT I did goof around with long exposures, lighting and moving objects.

    This is what I captured:

    Test shot - indoors
    Red sky at night
    Bright lights of oncoming traffic
    Vehicle lights on the desolate road

    Last shot. Reduced the time and waited for some departing traffic to pass me. A car came over the road in the opposing direction, but did not have it’s high-beams on, so shot was no totally washed out.

    Vehicle lights on the desolate road

    This has given me some ideas for other night photography projects. One I’d like to try is a set of long-exposure time lapse pics of the helicopters. So far, the opportunity has not yet presented itself.