First iPhone app

Icon_final
I can't pin point an 'official' day that I started teaching myself how to program for Apple products.  The closest thing I can think of is when I purchased this book.  That was 1 year 6 months and 30 days prior to today (yesterday was the real release day of the app).  Granted I didn't systematically work on learning objective c.

For whatever it's worth if someone wanted to know my approach to learning objective c, this is what I did.  I bought the previously mentioned book (now outdated), watched a lot of youtube videos (be suspicious of these videos because there is a lot of bad info out there),  I joined the previously mentions book's forum and tried to help others as best I could, I watched what was available on lynda.com, and probably the most valuable resource was the iTunes U videos by Stanford University.  

Prior to learning objective c, I had a good grasp on php, html, css, and mysql.  Making the leap to an object oriented programming language was a challenge.  I would say if someone doesn't know anything about programming logic, it would be much more difficult to teach yourself what is going on.  I've also read that it's good to have an understanding of C, but I don't think that matters at all.

My last bit of advice in terms of learning objective c would be truely understand why things work/don't work.  I would follow tutorials and things would work but it did nothing for my understanding.  When it came time to think for myself, I had to compose the logic myself, which I would argue is the golden key.  After all that time, I still don't know anything about OpenGL which is the animation side of programming.

I wish you the best of luck if you decide to take on learning this language.

Movie theaters continue down the fail road

I recently saw this post from rogerebert.com.  Once again I'm reminded what I have been preaching this since late 2009.  Although I didn't delve into the specifics and my interests were of an entrepreneurial spirit it's fun to think I might be right.  The 2010 stats still show the same problems with the industry.  It will be enlightening to see the 2011 MPAA theatrical market stats.  Regardless, perhaps movie theaters should be investing in my other prediction if they want an innovative way out instead of riding the short wave of '3D' and international growth.

a href for Objective C

I'm trying an experiment in this post.  Hence it's a little different than previous posts.  I've been doing some coding in Objective C (used with Apple's Xcode SDK to make apps) recently and have found that learning Objective C coming from basic languages like php, html, css, etc. is a completely different ball game.  Sure there are tons of resources on the internet to get you started programing in Obective C.  You'll quickly learn that this content often consists of 12 year olds on youtube who don't really know what they are doing but they know how to do something basic.  Your other category of people are too smart programmers who give you the defacto link to Apple's developer guide.

The Problem

My problem was that I would look at Apple's developer guide and have no clue what I was reading.  My thought is there are a ton of people like this and I think I can help educate you to the point of being able to finally read Apple's developer guide.  Hence this experiment.  The following is a lesson that I personally think is the most important aspect of making an app.  I became very frustrated at how uneasy it was to make/understand the equivalent:
In words, create a button that 'links' me to a new view.  A lot of my research steered me in the wrong direction or inappropriate code.  I would consider this lesson to be of intermediate level.

The Lesson

When I was looking up ways to bring up a view via a button (just like an href link) the most common answer I found was:
Although this instance method works I did not feel like I was handling my specific case efficiently and had to find alternatives. Let's start from the horse's mouth and quote Apple's documents to illustrate the proper philosophy to changing views.

Views
 Being a beginner, I read this and did not understand that this was the answer.  Later I felt disgruntled that regardless of the which option you need it's more involved than the html <a href> tag.  I think the most helpful way to explain each bullet point is through code:

Example Projects

I've created an example of each bullet point except for the last two.  Tab bars are self explanitory, use the tab bar template as reference.  I don't intend to cover iPad programing in this lesson. Let me know if those projects help you understand how to change the view of an xCode project.  To literally create an link to a web site in Objective C is appropriate for another lesson.

More time lapse for fun

In this video I have a rough time working on the shell of the bike.  Lesson learned.  Set the scale of the drawing first so adjusting doesn't cause you to redraw the surfaces every time.  

(download)
This song is mostly instrumental,  65daysofstatic - Retreat! Retreat!

The current state of batteries/EV

Tron_legacy_2011_poster

So here's the deal.  I've been researching batteries for a few weeks now for one of my ambitious projects.  The project is to make a full enclosed electric bike so I can ride around the city and look like I'm from Tron.  The rest of this article will be about electric vehicles (EV) and NOT about hybrids.  Right now I'm reading: The TAB Battery Book.  "By 1900, nearly 40% of automobiles in the United States were powered by batteries."  This is one of the quotes I found astounding from this book.  Currently the market is virtually nonexistent. There are estimates of 5-8% market share for both hybrids and EVs by 2020 (source).  Here is a sample of the current commercial EVs available with top speed and distance specs:

 

Company – Vehicle

Top Speed (mph)

Distance (mi)/charge

Nissan – Leaf

90

100

Tesla – Model S

120

300

Zero Motorcycles – Zero S

67

43

 

My ideal specs for my project are top speed of 70 mph with a distance of 100 miles.  I mean how else am I going to out run the programs?  So finding a suitable motor is not hard.  The limiting factor is the battery.  My research led me to 3 companies that make batteries.

·         A123 Systems

·         Thunder Sky

·         LifeBatt

Sadly, A123 Systems doesn’t sell to ‘hobbyists’, Thunder Sky is Chinese, and LifeBatt assembles their batteries in Virginia.  I used an excel spreadsheet made by Lennon Rodgers to run my calculations.  LifeBatt is not very big in power and expensive for my specs.  So that leaves me to either use a Thunder Sky battery or build my own.  We’ll see how I feel by the end of the book mentioned earlier.  Additionally I’ll be live streaming some of my work on justin.tv for fun.  Will update when design is further along.

Traffic Lights

I'm not claiming to be an expert on traffic light technology.  Everything I write on this subject is based on lots of observation.

My thought process
I think it's time to improve traffic light design.  They are not dynamic enough to meet today's loads.  Almost every traffic light has one thing in common, timers.  Timers are the root to how traffic lights behave.  Sure, there may be some sensors to facilitate the operation but I think there is room for improvement.  We can make traveling more efficient and less wasteful if we think about improving traffic flow.
What the future will hold
When it comes to thinking about traffic, I always revert to da Vinci's thought process... the human body.  Da Vinci loved the design of the human body so much that when he was hired to do city planning, this was his guide.  He is absolutely right.  Obviously there are no traffic lights in the body or anything remotely close.  That's because blood has the advantage of actually being a fluid and collisions between blood vessels don't require vessel insurance.  Regardless, traffic flow is still a 'fluid' like flow.  I think the future of traffic lights will be more dynamic.  The keystone will not focus solely on timing but efficiency.
How it will work
I think there are 2 engineering equations that could be used as the backbone of traffic lights.  The first being volumetric flow rate (Qin = Qout in any intersection):
Q = a * v
Where a is the # of lanes, v is the average velocity.The second equation being efficiency:
 \eta = \frac{P_\mathrm{out}}{P_\mathrm{in}}  (this is in terms of power but can be changed to whatever is being measured)
Combine these 2 equations with the appropriate sensors at each intersection and you can have a dynamic intersection.  The algorithm would be designed to optimize efficiency of the intersection and change the lights accordingly.  The more cars leaving the intersection the higher the efficiency.  This would come in very handy when your driving around at 2am and there isn't another car for miles.
The objections
Granted, some intersections can be very complex.  Timers would still be needed for the cross walk parts.  Another draw back is that the volumetric flow rate is not a perfect representation of car flow.  For example, if 2 lanes merge into one, the cars do not increase velocity in the 1 lane section (a liquid would).  Therefore volumetric flow rate is not a perfect relation to cars.  Lastly, an intersection is only as efficient as the next intersection allows it to be (This is why it would be great to have an integrated efficiency grid throughout an entire city).
The Conclusion/Summary
This post is still a high level view of how to refine traffic lights.  Although I don't formulate an algorithm, it's a starting point to think about more dynamic traffic lights.  Traffic lights don't do enough to handle the modern traffic flows.  I'm suggesting an algorithm based on efficiency and volumetric flow rate.  This would reduce congestion and get cars moving in the right direction more accurately.

The Future of Theaters/Screens

So I got my idea from this post on engadget.  If you don't want the details just skip to the last section.  (I'm sure some artists or people have made things that personify this idea and I'd love to see them, just post the links in the comments)

My thought process is this
What they want to do to improve the design is not the right direction. Then I thought how could you just suspend the water molecules in space to make the projection stable. Also, using projectors has a huge disadvantage. Projectors need both line of site and you would need multiple projectors to get a wide range of perceptions. Then my thoughts turned to how this project could be expanded to give the sense of space and allow for actual interaction.

What the future will hold
A pixel is 2D. A TV is simply the assortment of 2D pixels.  3D TVs are not actually 3D.  These TVs are simply 2D pixels that have 2 perspectives (left eye, right eye).  Our mind generates 'depth' from these 2 perspectives which is not really there (there is no z axis).  The key to all of this is the sphere (i.e. water droplet).  The sphere will allow for many perspectives (like the rabit) and add the z axis.

Read more....

Read the rest of this post »