Technology
Corona – iPhone/iPad Development made easy.
by jandrews on Feb.07, 2010, under General Discussion, iPhone Programming
Last night I was browsing twitter when one of my tweeps mentioned an article about iPhone and Flash. The article basically stated that before the release of the iPhone there were discussions of using flash on the iPhone for application development. That talks went south and since then there was no turning back. Now whether there is any truth to that I don’t know. What made the article interesting was the mention of an SDK called Corona by a company called Ansca Mobile. Essentially it’s a scripting language similar to actionscript/javascript that allows you to build iPhone apps as if you were building a Flash application.
I’ve wanted to write Cocoa apps for a while, but with work, and life I haven’t been able to get enough time to wrap my head around Cocoa and bindings and all the fun that goes with it. I know Javascript very well. Since I am a web developer so I thought I would give Corona a shot.
Corona cost $99 but there’s a 30 day trial version. I downloaded the trial version, and started reading through the docs (ok skimming through the docs) and sample applications. I found the APIDocs to be poor. No real explanation on how to capture events, which on the iPhone is important. Touch events are everything when it comes to the phone. Also, the company seems to be indecisive about some of the touch event naming, like “drag”. They thought it didn’t make sense, but I easily knew what they were talking about. Though I probably would have called it “swipe”. The sample code however was full of useful snippets, and from that I was able to build a 45 line application. That’s right in 45 lines I had the application I have been wanting to write for 5 months. Now I haven’t been able to test it on an iPhone or within Apple’s iPhone simulator. I have tested it in Corona’s iPhone simulator, in order to test it elsewhere I need to pay the $99, so for all I know it could totally break. I will give them the benefit of the doubt that it will work fine on the iPhone, and could revolutionize iPhone development for those who want to quickly get something out without the time consumption of learning Cocoa Touch, or paying an iPhone developer up to $150/hr
I am looking forward to them having a version that supports the iPad, I am sure they are working diligently on it.
iPad
by jandrews on Jan.28, 2010, under General Discussion, Macintosh
It’s been one day since Steve Jobs announced the iPad to the world. Since then it seems like a world of haters has vomit their hatred of the iPad upon us. Complaining that it’s nothing more than an oversized iPod touch. What I am trying to figure out is this 1) why is that bad? and 2) Did you really expect something more? 3) Why did it have to be more?
In Steve’s keynote he talked about the computer and the smart phone and something in the middle. The iPad is not meant to replace the computer, and it’s not meant to replace the smart phone. It’s meant to compliment them. There are plenty of instances where you may want something portable like a phone, but not as clunky as a laptop, and that is where the iPad comes in. Something that doesn’t need a full computer operating system. Something that can become the device you need at the time.
Let’s say you are in the medical profession, do you really want to have to boot into a complex operating system like windows, linux or OS X that uses up battery life quickly? Or would you rather just turn on a device that allows you to open your application, view and enter patient data quickly and submit it to the servers in the hospital IT department? What if you are a photographer, or a real estate agent, or a business person in general who wants to track their appointments, calculate costs quickly. Applications designed specifically for you, so you don’t need to multi-task into other applications? That is what iPad is about.
Sure there are instances where multitasking may be nice, such as listening to Pandora Streams while doing something else in another application. It’s not a perfect device, but for people to condemn it for it’s faults and not look past them to the devices potential just seems real sad to me.
The iPad will be a great device once you get it in your hands, and see what it can do.
How not to attract web developers.
by jandrews on Dec.02, 2009, under Web Development
Today I was browsing Craigslist help wanted section. In the “computer gigs” section I came across this add.
Title: Web Application Developer Wanted.
We are looking to build a 25 to 30 page web application. If you are interested please supply a quote.25 to30 pages in total
YOU MUST MUST MUST have experience in SOAP API integrations and prove this.
The web application will in turn need to be connected / integrated to other applications such as SFDC (Salesforce.com) or iphone.
Looking for start to finish quote.Please send resume and contact info.
Thank you!
The title was clear and concise. It was enough to peak my interest, and see what it was about. The first two sentences though sent me turning the other way. They have an idea for a 25 page site. Without any description of what those 25 pages are they expect you to send in a quote? Then they go on to re-itterate how many page there are, like they already hadn’t pointed that out. Then we “MUST MUST MUST” have experience with SOAP API. Looking for a “start to finish” quote. A quote on something with no explanation of what it is, or on what technology; beyond SOAP API.
How on earth do you expect someone to quote a project if they don’t even know what is involved? If you have a project and you need someone to do the work for you. Figure out what tech you want to use, if you have no preference, specify that. Don’t ask for a quote, ask for resumes. Take some resumes first look them over, and find people who seem to have some technical expertise Ask them to sign an NDA, give them some specifics and then ask them for a quote.
With the ad above any quote you get will be wrong, and in the end either you or the developer will lose out because the project wasn’t properly speced.
Software Review – DragonCon iPhone App “Follow-me”
by jandrews on Sep.07, 2009, under Technology
While its fresh in my mind I think I am going to write about the DragonCon iPhone application. Thursday evening I was browsing either Twitter, or Facebook or Livejournal. I don’t remember which when I saw a link advertised for a Dragon*Con iPhone. It was basically advertised as a replacement for the little panel list booklet that I can’t read because the text is so fraking small. I was pretty psyched.
The application is pretty simple in design. There is a main page that has update information. There is an “Events” button, a “My Schedule” button, and a “Speakers” button. For DragonCon the “Events” button gave you a list of all the panels on all the different tracks and concerts from various acts at the convention. This was really handy. Not having to dig out a little booklet that was hard to read was a real PITA. You clicked on an event and the there was a way to add the event to your “schedule” page that had a day calendar look. You could plan your entire weekend and then all you would have to do is go to your “Schedule” page and see what you had chosen and life was nice and easy, not marking the little book and trying to find an event you read about but were unsure about, simply add it, and then go through the schedule and cull out the things that overlapped or were too far away for you to make it from the previous track. The idea at it’s simplest form is great. No wasted paper, and much easier to find panels.
It’s got problems thought, and to be fair the Application is called “Follow Me” and is created by “Core-apps LLC”. It is an event organization app that allows you to have information on panels exhibitors and updated information on. DragonCon is simply their client.
The biggest problem is the load speed. DragonCon has a LOT of events, and since the application talks to the internet to update those events you’re talking a connection EVERY time the application is loaded. It seems to load the XML (assuming it’s XML) EVERY time instead of doing something simple like checking the last modified date against a db to see if the schedule has changed. With 30000 people at the convention and most of them connected to cell towers trying to make connections for tweeting, surfing or using FollowMe. That lead to a VERY slow user experience. The app should only ever update when the data has changed, and then, only modify new data since that change. There are also a lot of things that they could have added to make the experience of using the application a lot better. “Speakers” for example gives list of all the speakers, there’s no cross talk to the events telling allowing me to see what events that speaker was in. There was no way to search only different tracks. All 3 days of events were listed in one list. Separating out Friday, Saturday, and Sunday would have made it easier for those of us trying to get to the sunday list late friday night to plan things. Instead you have to scroll through hundreds of panels that happen Friday and Saturday. Little things that with a little more thought could make this application rock the convention world.
Basically the idea is great, the execution needs some work. Yay DragonCon for doing this, They may want to consider a web version as well for those non-iphone users. Any web developer with half a brain could write something similar in a couple weeks, and then you’d make everyone’s life easier.
FollowMe gets 2 of 5 stars. DragonCon for using the tech to make my con experience better gets 5 for 5!
php 5 Random String Generator
by jandrews on Aug.05, 2009, under PHP Development
I am sure people have written something similar 1000 times, but with time they fade from the internet. Today I will share with you my Random String generating php class. Are you ready?
<?php
/**************************************************************************
Copyright 2009 James Andrews (email : contact at jamesmandrews dot com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation version 2 of the License
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
************************************************************************** */
class RandomString
{
/* static variables needed to create the random string */
private static $alphas = "abcedfghijklmnopqrstuvwxyz";
private static $alphasUpper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
private static $numbers = "1234567890";
private static $specialChars = "!@#$%^&*()-_+=[]{}|:;>.<,/?";
/*
* Function to generate a random string of roman characters
*/
public static function generateRandomAlphaString($stringLength, $type = "lower")
{
switch($type)
{
case 'upper':
$stringBase = self::$alphasUpper;
break;
case 'mixed':
$stringBase = self::$alphasUpper . self::$alphas;
break;
default:
$stringBase = self::$alphas;
}
return self::generateRandomStringWithLengthFromString($stringLength, $stringBase);
}
/*
* Function to generate a random string of numbers 0-9
*/
public static function generateRandomNumericString($stringLength)
{
return self::generateRandomStringWithLengthFromString($stringLength, self::$numbers);
}
/*
* Function to generate a random string of numbers 0-9 and roman characters
*/
public static function generateRandomAlphaNumericString($stringLength, $type = "lower")
{
switch($type)
{
case 'upper':
$stringBase = self::$alphasUpper . self::$numbers;
break;
case 'mixed':
$stringBase = self::$alphasUpper . self::$alphas . self::$numbers;
break;
default:
$stringBase = self::$alphas . self::$numbers;
}
return self::generateRandomStringWithLengthFromString($stringLength, $stringBase);
}
/*
* Function to generate a random string of numbers 0-9 and roman characters and other special characters
*/
public static function generateRandomStringWithAll($stringLength)
{
$stringBase = self::$alphasUpper . self::$alphas . self::$numbers . self::$specialChars;
return self::generateRandomStringWithLengthFromString($stringLength, self::$numbers);
}
/*
* Function takes a string length, and a "string from", and generates a random string
* of stringlength, with characters withing "string from"
*/
private static function generateRandomStringWithLengthFromString($stringLength = 0, $fromString = "")
{
$fromStrLen = strlen($fromString);
$returnString = "";
for($count = 0; $count < $stringLength; $count++)
{
$random = (rand() % $fromStrLen);
$random = rand(0,$fromStrLen);
$returnString .= substr($fromString, $random, 1);
}
return $returnString;
}
}
This class is useful anytime you need a random string of any length. All the functions are called staticly, so no need to create an object just call the class.
Example 1:
Create a random string of 12 lowercase-alphabet characters
print RandomString::generateRandomAlphaString(12);
Example 2:
Create a random string of 12 uppercase-alphabet characters
print RandomString::generateRandomAlphaString(12, 'upper');
Example 3:
Create a random string of 12 mixed-case-alphabet characters
print RandomString::generateRandomAlphaString(12, 'mixed');
Example 4:
Create a random string of 12 number characters
print RandomString::generateRandomNumericString(12);
Example 5:
Create a random string of 12 number characters or lower-case alphabet characters
print RandomString::generateRandomAlphaNumericString(12);
Example 6:
Create a random string of 12 number characters or upper-case alphabet characters
print RandomString::generateRandomAlphaNumericString(12, 'upper');
Example 7:
Create a random string of 12 number characters or mixed-case alphabet characters
print RandomString::generateRandomAlphaNumericString(12, 'mixed');
Example 8:
Create a random string of 12 number characters, mixed-case alphabet characters, or special characters
print RandomString::generateRandomStringWithAll(12);
This class will pretty much fill all your random string needs. Feel free to use it if you like, or make suggestions to changes, to make it better.