[ale] I've decided again to learn programming again

Byron Jeff byronjeff at mail.clayton.edu
Fri Oct 14 14:31:50 EDT 2011


Let's pick up the rest of the thread...

On Fri, Oct 14, 2011 at 10:59:26AM -0400, Byron Jeff wrote:
> On Fri, Oct 14, 2011 at 06:42:11AM -0400, Ron Frazier wrote:
> > Hello all,
> > 
> > Those of you that have read some of my prior posts know I've been 
> > threatening for some time to relearn programming after 16 years out of 
> > the loop.  I discussed it here before, and we had discussions about the 
> > various merits, or unmerits of different languages.  I really was 
> > planning to learn C++, after you guys convinced me to not target C#.  I 
> > have, sitting next to me, some of the best C++ textbooks out there, 
> > including one by the inventor of C++.  The problem is, no disrespect to 
> > the authors, that these things are BORING, and intimidating.  I mean, I 
> > have to go through 400 pages of for next loops, if then's, and variable 
> > setting, etc. to even get to putting a GUI hello world program on the 
> > screen.  And, that's IF they even discuss GUI programming.  Now, I know 
> > you have to learn the basics, and I know these things are foundational, 
> > but I think this is the least enticing way to teach it.
> 
> The real problem is that there is a functional disconnect between 
> foundational programming concepts and GUI programming. GUIs are event
> driven creatures that rarely have a linear flow. We run into this problem
> all the time teaching introductory programming and invariably end up right
> back at linear console programming to teach basic concepts. It's difficult
> to branch out to non-linear event driven programming without a clear
> understanding of basic programming concents.
> 
> >  Not only that, 
> > programming desktop computers doesn't excite me nearly as much now as it 
> > did a decade and a half ago when it was relatively new.  Embedded 
> > programming interests me to a point, and I could do that in C++ 
> > sometimes, but I don't necessarily want to be programming thermostats 
> > and microwave ovens either.  Robotics interests me, but it can be very 
> > difficult and expensive to develop your own robotics lab.
> > 
> > The other thing that interests me that I might be able to start 
> > development for on my own, is mobile computing, specifically Android.  I 
> > recently heard that Android is the most popular smart phone OS on the 
> > planet.  And, it's pretty much the only game in town for non IOS 
> > tablets.  The thing is, you program Android in Java.  So, I have to 
> > choose between Java and C++ since I cannot really learn two languages at 
> > once.  So, I've decided to jump over to Java, before investing lots of 
> > time in C++, which I may come back to later.  By the way, my 
> > introductory Java and Android books are just as boring as the C++ books, 
> > but I guess I'll muddle through.

Tackling this from a language persepctive is the wrong approach IMHO.
Languages that are in a class together (in this instance C-syntax object oriented
languages) are simply not different enough in most repects to be considered
different. Strip the libraries and you'll find there are not too many
radical differences between any of the languages you alluded to above.

As for Android, if the platform was just a bit more mature, I would
recommend looking a Scripting Layer for Android (SL4A). It facilitates
programming the Android platform in scripting languages such as Python, PHP,
Lua, Ruby, and Rhino (a scriptable version of Java). There's a serious
reduction in scaffolding required to get going with SL4A as opposed to
writing in native Java. Just as a quick example here is a 4 line Python
program I grabbed from here:

http://www.submergedspaceman.com/blog/2010/02/16/android-scripting-environment-is-incredible-part-i/

that opens a text box, gets some text, and speaks it.

-------------------------------------------
import android

droid = android.Android()

message = droid.getInput('TTS', 'What would you like to say?').result
droid.ttsSpeak(message)
-------------------------------------------

The first 2 lines are all that's required for a program to get access to
all the interfaces that SL4A has bridged. All the current functions
accessible from SL4A can be found here:

http://code.google.com/p/android-scripting/wiki/ApiReference

But I'm not sure it's good for a novice because it's rough around the edges
and the UI elements, of which there are 3 types (web, popups, full screen
GUI) are each a bit incomplete. But once it solidifies, I personally see
little reason to generate apps for personal use in anything else.

As for boring, let me suggest a different approach. Books for programming
are designed to implement thorough and complete infrastructures for
teaching a significant amount about a particular programming language. It's
like a textbook on French cooking where you learn a lot of techniques and
basic sauces before getting to cooking real food.

Take a cookbook approach. Start with a project you want to do and use the
books and web pages for reference. Instead of waiting 300 pages to learn to
do X, start working on your project, and when you need to do X, look it up.

Now your education will be incomplete without a doubt. But your project
will motivate you to learn lots of important concepts in an incomplete
manner so that you can finish your project. 


> > 
> > So, having said all that, do you guys have any thoughts on setting up a 
> > cross platform Java development environment, learning Java, learning 
> > Android, etc.  I'm thinking using the Sun / Oracle JDK on both Windows 
> > and Linux, plus the Eclipse IDE, and whatever device emulators the 
> > Android books recommend.  When I can, I'll get an Android tablet to try 
> > things out on.  I have two good books on Android 2 from Apress.  They've 
> > now come out with similar books on Android 3.  All of them say to learn 
> > Java first though.  I think there will be a lot of Android 2 out there 
> > for a while, so it might be fine to start with the books I have.  Any 
> > thoughts and advice are appreciated.

I learned all the Android/Java I needed to write applications be reading
the Google Android developers site and the 10 million associated Android
development web pages. I skipped Eclipse and code on my Linux desktop by
hand using the Android SDK and a copy of Ant. Totally useless I know, but
just wanted to share.

> > 
> > Maybe, someday 8-( I'll see a GUI hello world that I created on a tablet 
> > device.  The very large learning curve for this is intimidating and 
> > frustrating.

See SL4A above. Look at the dialog functions in the UIFacade. A quick
tutorial for their use can be found here:

http://www.mithril.com.au/android/doc/UiFacade.html

The experimental SL4a FullScreenUI facade has a tutorial here:

http://code.google.com/p/android-scripting/wiki/FullScreenUI

I have not gotten a chance to try it yet. But it's on my list of things to
do.

Hope some of this helps.

BAJ

> > 
> > Sincerely,
> > 
> > Ron
> > 
> > -- 
> > 
> > (PS - If you email me and don't get a quick response, you might want to
> > call on the phone.  I get about 300 emails per day from alternate energy
> > mailing lists and such.  I don't always see new messages very quickly.)
> 
> I have to run. I'll come back to the rest of this thread a bit later.
> 
> BAJ
> 
> > 
> > Ron Frazier
> > 
> > 770-205-9422 (O)   Leave a message.
> > linuxdude AT c3energy.com
> > 
> > _______________________________________________
> > Ale mailing list
> > Ale at ale.org
> > http://mail.ale.org/mailman/listinfo/ale
> > See JOBS, ANNOUNCE and SCHOOLS lists at
> > http://mail.ale.org/mailman/listinfo
> 
> -- 
> Byron A. Jeff
> Department Chair: IT/CS/CNET
> College of Information and Mathematical Sciences
> Clayton State University
> http://cims.clayton.edu/bjeff
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo

-- 
Byron A. Jeff
Department Chair: IT/CS/CNET
College of Information and Mathematical Sciences
Clayton State University
http://cims.clayton.edu/bjeff


More information about the Ale mailing list