A new space for this blog
Dear friends, all new and old postings will be available at my new blog (www.asouza.com/blog) since now. Please update your RSS feed link if you want to be following it.
Thanks!
Alex
Dear friends, all new and old postings will be available at my new blog (www.asouza.com/blog) since now. Please update your RSS feed link if you want to be following it.
Thanks!
Alex
[Disclaimer: This blog has no intentions to be a definitive opinion on Lua or Corona development. It is just an opinion, under the perspective of a non-professional developer, working for the first time with both technologies. If you find anything wrong with the expressed opinions, please feel free to comment and I will revise the text.]
Few minutes ago I upload my app for Apple appreciation. I hope to see it published at the App Store in the next days.
Final interface.
Now, that this is finished, a final report on the application and Corona.
The Good
Ansca Mobile’s Corona is an infant SDK with lots of potential. It is much easier to code in Lua (interpreted language) than Object-C, or even Javascript (again, this is a personal opinion, based in my personal experiences).
Corona’s team are great people (have you ever received an email from a company’s CEO, trying to help you to solve problems? Yes, Carlos Icaza sent an email asking me if he could call my cell phone!), and they are working hard to have a great product.
Beta 2 has been updated every week, bring not only new features, as well as solving past issues. I am really excited to check the new Game Edition.
The samples they provide are also an excellent help to speed up your coding.
The Bad
Although Corona has been updated constantly, it does not have all the features the full SDK offers, meaning you cannot develop some apps like the ones you get from the App Store. Also, the current Corona SDK has much more potential for games than applications.
Specifically about A Temple A Day, I had to cut down several originally planned features, due the lack of some controls (mostly table view and asynchronous http request, for example). Fortunately, I could change my original idea to something doable but, consequently, I had to price down it.
Conclusions
If I had to develop a “regular” application again (and I plan to do it in a near future), I would probably spend more time with Appcelerator Titanium, instead of Corona. They are ahead in native controls. Unfortunately, I couldn’t “click” yet with their development tools and samples. Again, this is personal. I am waiting for the book they are writing about Ti.
Although, as of today, Corona is not that ready for apps in general, I am enjoying a lot to learn Lua, sharing experiences with the community in the forums, and planning my first game. The SDK may not be that strong for reference applications but, it really rocks when game is the main subject. As I mentioned above, I am looking forward for the Game Edition they are building at this moment.
If game is your “thing”, Corona is ready for you. Don’t wait and buy it with the special introductory price of $99, getting the Game Edition in this price. If you want to code apps with native controls, wait a little more or try other SDKs like Titanium or PhoneGap.
Myself, I will stick with Corona, keeping a closer look at Titanium progresses.
To the next app!
Alex
[Disclaimer: This blog has no intentions to be a definitive opinion on Lua or Corona development. It is just an opinion, under the perspective of a non-professional developer, working for the first time with both technologies. If you find anything wrong with the expressed opinions, please feel free to comment and I will revise the text.]
Last week, with the announcement of the new beta SDK from Ansca, I took a hard decision in reviewing my entire app (I had it 60% done), and re-start the coding, replacing the dozens of text files, for a SQLite database (thanks Ansca for bring SQLite to the SDK!).
I spent a few days reviewing the interface (check below how it is as of today), as well as handling some bugs or “unusual things”, that runs well in the simulator, but not in the device. For example, when user select a place, I get the place name, for example “Colonia Juarez”, as well as the file name for the place image (in this case “ColoniaJuarez”. In the same folder, I have the image files, which included “coloniaJuarez”. When running in the simulator, I got some warning messages informing that Corona “assumed” that “ColoniaJuarez” (the file name variable) is the same as “coloniaJuarez” (real file name), but the code ran perfectly. When I went to the device, I kept getting blank images. Now that I found the error, it seems a very simple thing but, I spent a few hours with alerts and “prints” trying to figure out what was happening.
Buttons in the interface mean: 1) More options (which shows the last 3 buttons), 2) Call place, 3) Directions to place and 4) Share info. Blank (future) menu in the bottom will allow users to list places by name, sort a place and discover the closest place to visit
Lastly, I cannot say how grateful I am for people like Scott Powers and Mike Hart, from the Corona forums. They keep helping me with my questions, and this app would take much more time to be developed without them.
I will share some code in the next posting.
Alex
[Disclaimer: This blog has no intentions to be a definitive opinion on Lua or Corona development. It is just an opinion, under the perspective of a non-professional developer, working for the first time with both technologies. If you find anything wrong with the expressed opinions, please feel free to comment and I will revise the text.]
I had lots of progresses in the past days, not only with Lua, but also with Corona. I bought the SDK, which gave me access to beta 2. Although I am not using any features from the beta code, it seemed to be very stable and with good potential.
I spent most of my time setting the interface (portrait and landscape modes), also learning the correct way to align text (thanks to all support coming from Corona forums!) and positioning/animating my main icons. Here a list of situations I found:
- As I mentioned, my app has portrait and landscape modes. In landscape, users will see a full 480×320 picture rendered. In portrait, they must see part of the “big picture”, in 320×480. I couldn’t find a way to use just one big image and position it accordingly. At the end, my temporary solution was to use 2 images, one for each scenario. My main concern here is the total size of the application, as I am duplicating files;
- I found a bug in rotating the status bar (it does not rotate at this moment). Ansca already flagged this as an official bug (see the image below);
App in portrait mode, with full menu closed (see the arrow).
Checking the current design, plus considering my and Corona’s limitations, I have reviewed some features and changing a little the application scope. Also, getting involved with Lua, I decided to review some coding too (that’s why I am not posting it here). I am cleaning the current code and I will post an update late today or tomorrow.
Overall, I am starting to enjoy Lua and looking forward to finish this app, in order to start a new one (probably a game).
App in landscape mode, with full menu opened.
[Disclaimer: This blog has no intentions to be a definitive opinion on Lua or Corona development. It is just an opinion under the perspective of a non-professional developer, working for the first time with both technologies. If you find anything wrong with the expressed opinions, please feel free to comment and I will revise the text.]
My app must be international. Saying that, I planned to allow it to find which is the current language setup in the device and, enabling the correct idiom according that. I created an “.idi” file for each language I am planning to reach. For example, the english.idi file contains:
line 1: Send Mail
line 2: More Picts
line 3: More Stories
and the list goes on…
Below the code I used to make the selection, according the information coming from the phone:
1: — Read idiom file according locale
2: local language = system.getPreference( “ui”, “language” )
3: local translatedStrings = {}
4: local function loadIdiom (language)
5: local path = system.pathForFile(language, system.ResourceDirectory)
6: local file = io.open(path, “r”)
7: if file then
8: local i = 0
9: while true do
10: i = i + 1
11: local line = file:read(“*l”)
12: if line == nil then break end
13: — load all strings according idiom
14: translatedStrings[i] = line –.. “\n”
15: end
16: print(translatedStrings[1]) –shows first line
17: end
18: io.close(file)
19: end
20:
21: if language == “en” then
22: loadIdiom(“english.idi”)
23: elseif language == “pt” then
24: loadIdiom(“brazilian.idi”)
25: else
26: loadIdiom(“english.idi”)
27: end
28:
As you can see, I started getting the current language at line 2. Lines 21 to 27 select the correct .idi file and call the function loadIdiom, which reads the correct file and save all lines in a table (array). With this table, I will be able to call the correct string according the number of the line. For example, when I need to refer to string Send Mail, I will use translatedStrings[1], considering the string Send Mail is in the first line of the .idi file.
Hope it helps!
Alex
![]()
After mocked up my main interface and define my feature list, I evaluated the things I can and cannot do with the current Corona SDK (I can’t get access to the beta SDK as I am using the trial version). My list of CAN’T do includes:
- no support for SQLLite database (this is crucial in my case as I will have a list of places that must be available, even if the user is not connected) – I am addressing this with data in a text file. This is not the way I would like to implement but, considering I will have only hundreds of records, it will work;
- no MapKit integration, meaning I will not be able to render a map in a small part of the screen (when the user taps “see in the map” I will have to render a full HTML file showing the map, over the main screen;
- no native components nor keyboard available in landscape mode. This is hard, specially because I was thinking to address iPad as one of my targeting platform (Apple requires that the iPad interface works both in Portrait or Landscape);
- no email integration (I can’t create the email’s body programmatically);
Ansca has published its roadmap for Corona but, although several topics seems to be in their list, dates are far from final (in most cases they only say Q2/Q3, meaning something may be available from April to September– this is not the best way to get new customers to their platform!)
Knowing my limits, I read all Corona documents, plus the Lua official book and started to code. Some findings at this moment (please feel free to correct me if I missed something):
- You can’t find the same number of Lua samples in the web as you do for languages like Javascript or PHP. It is hard to move on when you are stuck;
- Lua book is not updated (the live code is different than the code printed);
- Corona does not implement the full Lua 5, meaning some functions are not available (after hours trying to work with dofile, for example, I figured out this is not available in Corona);
[Update: Scott's comment below confirms that all Lua 5.1 is implemented in Corona. Thanks for this info. I hope Ansca can create a table with the functions not available due security issues with the iPhone SDK]
- Because Corona does not have integration with SQLLite yet (Lua can do that), I have to work a lot with arrays, a concept Lua does not have – the closest thing is tables. Problem is, tables are much more difficult/confuse to use than arrays (if you are familiar with arrays). Basic functions like arrayName.count (counts the number of elements in an array) do not exist in Lua tables (yes, in order to count how many elements I have in an array, I had to create a function who reads element by element and return the number found – crazy!).
[Update: Clearly I missed this info. There is a way to count arrays without the function I have used. In fact is is much simpler than I even imagined: to count the number of elements in a table called "places", all you have to do is: #places]
Although I expect a miserable life in the next weeks, developing in a language I do not know, without many examples to search, plus the fact Corona SDK documents could be improved (also it is oriented to games instead of apps), I will keep you posted on my progresses.
[Update: I agree that Corona offers lots of good examples and samples but I still think they could improve their documentation.]
Why am I doing that? Because I really think it is going to be easier to learn Lua/Corona plus developing my features according the limitations, than to learn Object-C. Time will tell if I am right or wrong (and you are going to know from here).
BTW, I have written a few functions I will comment in the next postings.
Alex

As you can see, the main screen is based in the great interface provided by Bing app (I love it) and it is not final yet.
Today I progressed a lot with the new environment. Before to talk about the application and Corona, let me tell you that the configuration of the iPhone SDK is painful. Thanks to the manual from Corona I could finished all the certification steps and could build my first demo apps.
So, let’s talk about Corona. I installed the trial version (30 days). It works smoothly, just not allowing me to build applications for real (meaning sending them to Apple Store or save them in my phone without the Trial alert). I am planning to buy it in the next days.
I spent the first few hours today in my first app designing the main screen (see above) in the new Fireworks CS5 (I am running the trial version – too much money for the same month). After being comfortable with the button positions, I moved on to code.
The application (I can’t disclose very much) will target people interested in to know more about <places I cannot tell now)> around the world. Users will be able to call, get more info and even send pictures and stories about the places to the community site I will build.
In the next posting I will discuss my first hours with Corona and Lua.
Alex
My new notebook arrived yesterday. After spending a few hours installing software, here go my first impressions:
1) The “thing” is really beautiful. The design is very slick, the keyboard feels nice and the screen is really gorgeous;
2) I installed Parallels 5 and Windows 7. Parallels implementation is very cool, allowing you to run Windows in several different modes (from full screen to just some icons in the Mac dock). The integration with the dock is amazing: you can have Mac and Windows icons as they were in the same system;
3) I need to adapt myself to the huge track pad (I bought a Microsoft mouse – really good!, in the case I don’t adapt very quickly);
4) The worse thing for me was to discover you cannot “maximize” your applications. Yes, you have to resize them manually if you want them to work full screen, like you do in Windows. It is going to be a matter of adaptation but, I really love to double click a window to maximize it;
5) I installed also Office 2011 Beta (I can’t go further than that). It is really cool, although a little different than the Office 2010 I am accustomed to use daily;
About my mobile app development journey, I applied also for the iPhone developers program but I didn’t received my authorization yet. This is very weird if compared with Microsoft. Here, you do not pay to become a developer, neither you have to wait “up to 24 hours” to get access to the software you paid $108.41 bucks ($99 plus taxes).
As soon as I get access to the SDK, I will install Corona and report my experiences.
Alex
After almost 10 years, yesterday I bought a Macbook Pro again (don’t leave yet if you are a Windows fan, I still have 3 Windows 7 machines at home, and I have bought already my Windows 7 Pro to install in the new notebook).
Why am I confessing this? Basically because I want to develop mobile apps to as many platform as possible. Like or not, the iPhone platform (including iPad and iPod Touch) has a huge penetration and, because Apple owns that, we developers have to have a Mac.
So, what about the machine? Clearly it is expensive for the components it has (I bought the 13.3’, who still has a Duo). For the same price, I could have bought something much more faster and with lots of other accessories, but running Windows. Again, it is the price to pay to be cross-platform.
My plans? Build apps to iPhone, iPod Touch, iPad and Android (future Windows 7 Phone Series and Blackberry). You may ask: “Do you code in Object-C"?”. No, I am planning to start with the Corona framework, from Ansca Mobile. The SDK from Ansca exports to iPhone, iPad and Android at this moment. Also, you code in Lua (much easier than Object-C or any other object-oriented language). Is it good? I don’t know yet but I am planning to share my learnings in the following posts.
Keep in touch,
Alex
Few months ago I received an email from a Microsoft partner asking me to write about the future of interaction. What is next in this field considering the innovations that came with Microsoft Surface and Apple iPhone? was his question.

First of all, let’s remind that this blog is just a space for my personal opinions, not Microsoft. Also, being a personal space it allows me to talk about not only Microsoft products but ANY other products and interfaces I admire.
Touch interactions
Like everybody, I was amazed with when I first saw the iPhone and Surface. I had seen several projects using this kind of interaction in the past but, all of them restricted to an specific environment, many times requiring hard setups to operate. The beauty of Microsoft and Apple’s products is the fact they are, for the first time, spreading the technology to the world. Now, it is a commodity. Today, almost every cellphone has a touch interface, Windows 7 will embrace the technology (in fact HP has already a multi-touch screen computer running Windows Vista), Apple brought this to their MacBook touchpad, and the list goes on. As you already know, the concept is pretty simple. Touch whatever you want. Your fingers are in control.
This kind of interaction however is not the answer for every problem. Are you happing filling out long forms using the screen keyboard? Can you play your favorite but complex games using just 1 or 2 fingers? I am not, although I recognize the great job some game developers are doing with the multi-touch SDKs available.
What about voice recognition?
An older but very effective way to interact with machines is voice recognition. Have you seen how many progresses we had in this area? It is present everywhere, from your supermarket kiosk to every call center. Use your voice to command your intentions. To be honest, this is a technology I expect to see developers and designers using more in a near future, specially when the voice recognition engines become more friendly to other languages than English. Don’t you think it would be nice to talk naturally, as we do in real life, and have your results back?
Motion capture
The progresses in motion capture technology have changed the motion picture industry and they are close to do the same in the game industry. Can you image to animate Gollum or a dinosaur using stop motion animation? No way!
The concept is simple: 1) define some control points in the object to be animated, 2) using a camera, capture the object, 3) with a software, discover the control points in the image and 4) process the results.
A great example is the Wii Remote, although they use a different kind of motion capture (some accelerometer controls send the position of the control to the console that triangulates the positions and replicates it into the games). No more 515 buttons in your joystick! Move your remote and you are done!
Although I like the Wii concept, I am not a fan of their games (I think they lack in graphic quality), neither of the model (ok, I am against the world, you may say) of interaction. I never like the idea to use special glass to be immersive in a virtual reality game, or any other kind of device. They are simply not natural and for me, the Wii remote is very similar to this model as you have to wear the remote (the Wii Board is cool thou!).
One thing that brought my attention lately is Project Natal, from Microsoft (to be honest, I know as many as you about this project). The idea (using the basic principle I mentioned above) is to capture player movements using a camera attached to XBOX 360. No need to wear any kind of device. Do your moves and the software does the rest. Are you curious about that? See the first public presentation at http://www.joystiq.com/2009/06/11/video-project-natal-invades-late-night-with-jimmy-fallon/
So, are these technologies the future?
Fact is we use all our 5 senses to interact with the real world. No current technology alone is providing yet the full immersion we would like to have. Touch is not the answer for every problem, neither is the Wii remote or even Project Natal but we have to agree they are great steps for the future of interaction.
With these public technologies we are already covered in touch, vision, audio. Now it is time to see what is coming for smelling and flavor detection. Wouldn’t you like to taste some food and maybe have all the ingredients detect by your tongue? Can you imagine being at home, tasting a good cheese or wine and have their name or brand automatically detected? Or just say to your computer: Please buy me the cologne I am smelling now.
Futurology apart, the advances in interaction technologies are amazing. Expect to see in a near future deep interaction like the ones you have visiting installations in several museums, where you can not only see, hear and touch things but also smell the environment. Imagine to play a game where you can smell the fear? It would be nice, no?
Stop imagine! Download the available SDKs and start to change the world!