Ask Ed

Hello all.  I’ve recently started a new experiment.  

I read through the forums (‘Recent Activity’) and try to find an interesting question which I can answer in a reasonable period.   Assuming I find one, I then write a short article on it and provide a solution to the problem.  

Some days, I don’t find an question meeting the above criteria.  Then, I come up with my own random question or concept and write on that.

In the future, if you have a question that seems to meet these criteria:

  • Doesn’t require your code to answer it (or you supply it in your question).
  • Is technical in nature.
  • Is about a Corona SDK feature or a Lua feature.
  • Seems like it will have a reasonably short answer.  I can only afford about one hour a day to do this.

, please consider adding the tag ‘Ask Ed’ to your question (see Topic Tags at top when you create a new post).

I’ll search for these and recent activity.

Meanwhile, here are my current articles:

, and assuming no questions pique my interest in the next few days, I’ll be writing on these topics:

  • Ask A Better Question, Get A Better Answer (i.e. How to help others help you on the forums.)
  • Calculating GPS Distances - A Concrete Example
  • … more ideas as they percolate to the top of the ol’ brain.

Videos and Code

When at all possible I will also try to post a video and of course the code for my discussions.

https://www.youtube.com/watch?v=5U2DaB8LXYQ

https://www.youtube.com/watch?v=3JAe9fefHsY

Cheers,

Ed

I have a maths problem that I think might be solvable in lua ; I need to be able to show that every even number is the sum of two primes. I would be really grateful if you could help me with this.

@Paul

Paul.  Is this a test?   ;) You’re talking about Goldbach’s Conjecture correct?  Well, the best I can do is test it, not prove it.  Nobody to date has been able to prove it.  You can get some code to test it here.

With the code, I ran through the even numbers between 4 and 100000.  In this range, there are 9591 prime numbers and all of the even numbers are in fact the sum of two of those primes.  The test runs in 66.2 seconds on my machine (in simulator).

@All

I’ve written these new articles since my last post:

https://www.youtube.com/watch?v=Rv49mkF1aV0

PS 

@Paul - Your question didn’t really meet the criteria, but it was fairly straightforward, so I wrote up a quick sample. 

Oh, and please correct me if it isn’t ‘Paul’.  I was lazy and didn’t type out your full handle! :frowning:

No, it was a leg pull :wink: And yes that is my actual name. Interesting though, bet nobody has attempted to verify GC in Corona before…

Hey Ed, thank you very much for your excellent tutorials. What a great idea! 

Here’s a question I just posted : How to save a display object from varying devices and get a fixed size file independent of device specifics.

http://forums.coronalabs.com/topic/49048-saving-images-to-a-size-how-best-to-handle-this/#entry253675

Sound like a good challenge? Thanks in advance even if this one does not quality. All the best.

Wonderful idea Ed!

I have a maths problem that I think might be solvable in lua ; I need to be able to show that every even number is the sum of two primes. I would be really grateful if you could help me with this.

@Paul

Paul.  Is this a test?   ;) You’re talking about Goldbach’s Conjecture correct?  Well, the best I can do is test it, not prove it.  Nobody to date has been able to prove it.  You can get some code to test it here.

With the code, I ran through the even numbers between 4 and 100000.  In this range, there are 9591 prime numbers and all of the even numbers are in fact the sum of two of those primes.  The test runs in 66.2 seconds on my machine (in simulator).

@All

I’ve written these new articles since my last post:

https://www.youtube.com/watch?v=Rv49mkF1aV0

PS 

@Paul - Your question didn’t really meet the criteria, but it was fairly straightforward, so I wrote up a quick sample. 

Oh, and please correct me if it isn’t ‘Paul’.  I was lazy and didn’t type out your full handle! :frowning:

No, it was a leg pull :wink: And yes that is my actual name. Interesting though, bet nobody has attempted to verify GC in Corona before…

Hey Ed, thank you very much for your excellent tutorials. What a great idea! 

Here’s a question I just posted : How to save a display object from varying devices and get a fixed size file independent of device specifics.

http://forums.coronalabs.com/topic/49048-saving-images-to-a-size-how-best-to-handle-this/#entry253675

Sound like a good challenge? Thanks in advance even if this one does not quality. All the best.

Wonderful idea Ed!