obarthelemy
Posts: 1407
Joined: Tue Aug 09, 2011 10:53 pm

Re: How to get back into programming ?

Fri Aug 12, 2011 6:33 pm

I'm shamelessly trying to take advantage of this much-nicer-than average community to answer a question I've struggled with for a bit, and never could get a nice or relevant answer to:

Back in my younger days (I'm 40) I used to be a dilettante programmer; ZX-81 then Spectrum, Basic then Assembly, most complicated projects were Othello/Reversi, a Pac-Man-ish clone, and a card game (Belote Coinchée, kinda a *very* simplified Bridge)...

Since then I've dabbled when there was a strong need: Office macros, DOS/4DOS scripts... Even had the pleasure of teaching pro programmers about .pif files to run almost-silent DOS install scripts in Windows. But the sad truth is I can no longer program simple stuff I'd like/need to: siphoning photos of my siblings' blogs to upload them to my parents' tablet, merging separate HTML files into a single one, consolidating several RSS feeds into a single custom feed...

I've tried time and again to get back in the saddle, but I'm quickly overwhelmed:
- which language to choose ? I need something cross-platform, there's PCs, Macs, Android, Linux and iOS around me. And one that is OK for both manipulating stuff that's on the Web, and local scripting.
- How to get started with it ? I don't need to be taught about variables and GOSUBs (I do about objects, though)
- Is there a way to avoid completely, or at least only slowly ease into, object programming ? I'm really not set to think that way (yet ?), and got frustrated after a few handful hours of javascript (where does the f**ing program pointer even START AT? Can the mixing of code and UI elements be more messy ?)

Everytime I pick something and try to run with it, I get the feeling after a few hours that I picked wrong: C, java, javascript, powershell... might be the tools/docs, might be me giving up too quickly... Is there a reasonably web-capable, mainly procedural, very cross-platform language out there with a nice IDE, libs, and docs ?

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6234
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: How to get back into programming ?

Fri Aug 12, 2011 7:08 pm

For your needs, it seems like you're after python.
But you're going to struggle getting something that will run on PC, Android and iOS, since Android has it's own SDK and so does Apple... you have to find what it is you want to do and use the right tools for the right job for the right platform.

C/C++ for proper applications.
Java is.... I don't have anything nice to say about it.
Java script is just for little visual elements in the browser, input data verification and so on... it's just for web developers to make pages more dynamic.
Powershell... well I am sure you know more about it than I do.

As far as GUI's go, if you want to go cross-platform, then wxWidgets and it's python bindings is a good way to go, but most (good) cross-platform gui frameworks are designed for C++.

Honestly though, I don't understand how you can go wrong with C++ or even C, considering your previous experience. There's nothing inherently wrong with object-oriented programming, you just need to think in a more abstract way.

Often books do start with variables and basic flow control, but you can just skim through it until you get to what you're after.

"a reasonably web-capable, mainly procedural, very cross-platform language out there with a nice IDE, libs, and docs" lol, pick any 3.

Anyway, considering everything you've said, python seems right up your street. Python books especially like to spend several chapters just on variables and how they are interpreted, but again, skim through that and refer back to it if you need to.

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: How to get back into programming ?

Fri Aug 12, 2011 9:06 pm

I'd also like to thrown in my 2 cents worth for the C/C++ (or even C#).

Java.. it has few redeeming qualities, but one of the big ones is it's extremely easy to go cross platform. A java program will run on anything that has Java installed (and this usually includes cell phones) without extreme tweaking. Of course you get this at a huge performance cost so... yeah.
Dear forum: Play nice ;-)

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: How to get back into programming ?

Fri Aug 12, 2011 10:32 pm

I've been lost since they did away with line numbers. lol I think the last time I did any programming was in Qbasic. did try a little visual C though!
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: How to get back into programming ?

Fri Aug 12, 2011 10:37 pm

Most good editors provide an option to display line numbers... or did you mean more, "Goto 43?"
Dear forum: Play nice ;-)

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: How to get back into programming ?

Fri Aug 12, 2011 10:55 pm

gosub 5000 and end of file. lol
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

eben
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 85
Joined: Sun Jul 17, 2011 11:54 am

Re: How to get back into programming ?

Fri Aug 12, 2011 11:04 pm

I'd vote for Python. As I've mentioned elsewhere, the hello world program in Python 2.7 is

print "hello world"

most other modern languages have a certain amount of Voodoo boilerplate surrounding the two magic words, which a novice programmer has to simply take on trust. For a lot of people, this seems to result in their "bouncing off" the language after a few hours.

AmyS3
Posts: 173
Joined: Tue Aug 02, 2011 4:12 am
Contact: Website

Re: How to get back into programming ?

Fri Aug 12, 2011 11:52 pm

to be realy platform independent, i would tend to a webbased programming language.
as long as the targeted device got a webbrowser you can run you´re programm.
if you dont want to make ultra komplex stuff, it would maybe suffice if you programm in html with a textbased database if needed..
you dont need a active internet connection for that since the html interpreter is the webbrowser itself.

if you want to make more komplex stuff and the target device has a internet connection, you can use php with a sql database as info storage.
but for that you will need a webhost with php and optional mysql. exept if you can install php/mysql on the device itself.

but i personaly prefer c++ to create more sophisticated programs. but this limits me to certain devices.

obarthelemy
Posts: 1407
Joined: Tue Aug 09, 2011 10:53 pm

Re: How to get back into programming ?

Sat Aug 13, 2011 1:33 am

Hey Eben, you forgot "10 " in front of "print" ^^.. That does look familiar.

Thanks for the answers guys. I'll give Python a spin, especially since there seems to be a Android version too. Project 1 will be that RSS mashup thingy, I've got it all spec'ed out.

User avatar
darethehair
Posts: 9
Joined: Mon Dec 05, 2011 9:41 pm
Contact: Website

Re: How to get back into programming ?

Mon Dec 05, 2011 11:58 pm

After decades of working in an IT environment as a DBA, taking every opportunity that I could to do actual *programming* (typically using whatever shell scripting language was available (i.e. ksh, awk, etc.) in the last few years I also wanted to 'get back into the game'. I picked Python, as others have mentioned. Recently -- also with the desire for 'cross platform' -- I am trying out HTML5 (which includes, for good or bad, Javascript). Only wrote one 'app' so far :)

toxibunny
Posts: 1382
Joined: Thu Aug 18, 2011 9:21 pm

Re: How to get back into programming ?

Tue Dec 06, 2011 5:25 am

I'm in exactly the same position as OP, and after quite a bit of looking for something suitable, I'm going with python, hopefully with Qt/QML to pretty things up once I've got into the swing of things a bit...
note: I may or may not know what I'm talking about...

nullstring
Posts: 178
Joined: Sun Oct 02, 2011 3:05 pm

Re: How to get back into programming ?

Tue Dec 06, 2011 5:47 am

Err, you guys shouldn't be choosing a single programming language "to do it all"

Each language has different features, different advantages, different disadvantages.

The best thing would be to get your feet wet with almost all of them, that way you can better understand why you would choose a certain language at a certain time.

Anyway, i'm actually replying cause I wanted a place to test out this list thing

Does
It
Work?

Wooloomooloo
Posts: 92
Joined: Fri Nov 25, 2011 10:52 am

Re: How to get back into programming ?

Tue Dec 06, 2011 10:43 am

Oh well... *sighs, stands up* I'm Wooloomooloo, and I have the same age, same exact problem as the OP, up to and including half-grokking OOP and anything beyond. (*choir replies "Hi Wooloomoloo..."*)

Actually, I'm working with embedded stuff, which (up to recently) pretty much managed to stay object-free, so that was never an issue. It does explain my fondness of working on raw-metal though (vendor supplied libraries are rarely all that much good and always far, far, far from being optimized anyway). I too tried and failed to break back into programming many times. Part of the problem has always been that unless you are trying to process raw data, anything half-usable needs a GUI - and putting one together before you can even write the first line of what you actually wanted to do is way more trouble than I manage to handle (yes I have seen wxWidgets et al. too - last time I checked what they had was still an IDE tops, not a usable RAD environment...)

Anyway - just wanted to say that I ended up sympathizing with Python too (yes it even runs on my S60 phone - well, almost but not really) - I guess that's what I'll look into next time I have (1) the time (oh dear...) and (2) a specific itch to scratch.

e2me2t
Posts: 2
Joined: Sun Dec 04, 2011 11:29 am

Re: How to get back into programming ?

Thu Dec 08, 2011 7:52 pm

Try Unity which is quite advanced and allows Java and C not to mention is available on most setups. It is very quick to get something up and running in the short term.
Hopefully programs will be able to run on the PI they have Libs for most systems.

antiloquax
Posts: 406
Joined: Sun Nov 20, 2011 11:37 am
Contact: Website

Re: How to get back into programming ?

Fri Dec 09, 2011 6:53 am

If anyone is interested in learning Python, I am doing this at the moment. You can see how I am getting on here:
http://teampython.wordpress.com/

gimliflea
Posts: 76
Joined: Fri Nov 18, 2011 4:14 pm

Re: How to get back into programming ?

Fri Dec 09, 2011 9:21 am

As an oldie ex assembler hacker I've been in that loop for ages. Finally got my first useful app going using Python3 and Idle3. I have tried python before 2 or 3 times but for some reason with python3 it seemed to click.
Good programming!
Giles.

User avatar
RaTTuS
Posts: 10565
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: How to get back into programming ?

Fri Dec 09, 2011 12:37 pm

perl ....
seriously - python is as good as you really need....
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

chrisg
Posts: 28
Joined: Wed Sep 21, 2011 6:41 pm
Location: Epsom, Surrey

Re: How to get back into programming ?

Fri Dec 09, 2011 1:36 pm

I'm another who was a child brought up programming Spectrum, BBC Micro and Archimedes. 30 years later I'm still programming as a career... and for fun when time allows.

I've been learning python with pygame over the last few days (been off work sick) mostly because of the positive things people have said about it on this forum, and also to learn something with a low barrier to entry to help get my daughters interested in computing.

This is probably a redundant comment, but I fully agree with other comments here: Python is a very nice language... and I have a pacman-like game with my daughters being chased by teddy-bears to show for it!

User avatar
r3d4
Posts: 983
Joined: Sat Jul 30, 2011 8:21 am
Location: ./

Re: How to get back into programming ?

Sat Dec 10, 2011 11:04 am

.. i cant del my own post =[
or add an image after posting
but i could probably down load mingle and mod it so i can
:?
go figure
Real life is, to most, a long second-best, a perpetual compromise between the ideal and the possible.
-
Meanwhile, the sysadmin who accidentally nuked the data reckons "its best not run anything more with sudo today"
-
what about spike milligan?

User avatar
r3d4
Posts: 983
Joined: Sat Jul 30, 2011 8:21 am
Location: ./

Re: How to get back into programming ?

Sat Dec 10, 2011 11:56 am

Quote from obarthelemy on August 12, 2011, 19:33
...
Everytime I pick something and try to run with it, I get the feeling after a few hours that I picked wrong: C, java, javascript, powershell... might be the tools/docs, might be me giving up too quickly... Is there a reasonably web-capable, mainly procedural, very cross-platform language out there with a nice IDE, libs, and docs ?

- How to get started with it ?

http:// en.wikipedia.org/wiki/Research
http:// en.wikipedia.org/wiki/Scientific_method

may be the worst links on the subject available
but !
imho no one is going to get far without some idea/implementation of what they try to describe

saying that the probability that im judged unqualified to give such advice is rather high .. that has never stopped me .
... or as you more elegantly put it 'dilettante' ,wtf ...

fork-ing with javascript
javascript in a web-page is not just javascript !!
and its almost unavoidable
if you want to play with ting in a browser .

hear are a few links i thinks be gd ,

JSON (JavaScript Object Notation)
http://www.json.org/ - i like the visuals , but its not just limited to javascript

http:// visibone.com/
"Subjects: Color, Fonts, HTML, CSS, JavaScript, MySQL, and PHP.
I believe complexity is best mastered by seeing the whole picture in rich detail; that expertise consists mainly of vivid mental pictures; that working knowledge is best aided by precise reminders within view or reach."
visibone.com/javascript/
http://www.visibone.com/javasc.....harts.html
(hint .jpg's in ur cache or on paper for you cash )

literateprograms -JavaScript

Turtle graphics (JavaScript) xD

'hear';s one i made copyed earlier http://terrapin.jgate.de/
( tho i did change the example )

IF // you want run some javascript out side of the browser
http:// jsdb.org/ - use's spidermonkey

http:// mozilla.org/rhino/ - use's java
http:// static.jgate.de/jar/appjet-1.0.4.jar - use's rhino

http:// nodejs.org/ - use's V8

IF // you want run some javascript in a server and a browser

http:// apps.jgate.de/ - uses appjet-1.0.4.jar

http:// nodester.com/ - uses nodejs
http:// cloudno.de/ - ''

ELSE // GFM (Go Forth and Multiply)
;)
// hope the links and rambling are of some use
edit added image
Real life is, to most, a long second-best, a perpetual compromise between the ideal and the possible.
-
Meanwhile, the sysadmin who accidentally nuked the data reckons "its best not run anything more with sudo today"
-
what about spike milligan?

bradburts
Posts: 341
Joined: Sun Oct 02, 2011 7:07 am

Re: How to get back into programming ?

Sat Dec 10, 2011 12:15 pm


This is probably a redundant comment, but I fully agree with other comments here: Python is a very nice language... and I have a pacman-like game with my daughters being chased by teddy-bears to show for it!

+1 to Python.
Found it a lot easier to pick up comming from C++ than Perl. Perhaps it was just that I found the worked example I needed to copy easier.

LIke the image, just about summarises this discussion ;)

PS
At the risk of having a Forth hit squad burst through my door - please not Forth.
Once had the pleasure of debugging Forth with a logic analyser. All I saw was DROP, NOT, SWAP, DROP. What the heck does that mean? ;)

bitcrafter
Posts: 5
Joined: Sun Dec 11, 2011 11:48 am

Re: How to get back into programming ?

Sun Dec 11, 2011 1:03 pm

Hi braburts, tap tap tap. (I'm not the FORTH squad bursting through your door, just a lurker, emerging softly)
I prefer high level languages. Especially for teaching. So I won't be using your logic analyser on my software, or for teaching programming. I have seen the code I generate from several high level languages. It's about impenetrable.

I am considering (amongst other options) using a stand-alone Forth on the pi, just to make the whole package graspable. I don't need to ask or answer the question what is an operating system. Instead I say 'Yes here's the hardware, and the software is what you are interacting with. It makes the hardware do things for you.'

For teaching purposes, I'll probably use packages to hide the Reverse polish notation, and so use variables instead of stack positions. (we _can make that more efficient later although I doubt it will be needed) Teaching Forth is nice because I can keep the top-level words very abstract and easy to use, and not discuss the lower level words (like pick, ROT) till later. if ever.

Just like you start learning C with write(... not Malloc(..

Can anyone say if there's an open-source (ideally, stand-alone) Forth that would drive a Pi? Anything that would adapt easily?

These links look useful, but I haven't understood them fully yet.
http://compgroups.net/comp.lan.....-for-ARM11

http://pygmy.utoh.org/#sec-1

http://mosquito.dyndns.tv/free.....README.txt

hlt32
Posts: 9
Joined: Sun Nov 13, 2011 4:13 pm

Re: How to get back into programming ?

Sun Dec 11, 2011 1:13 pm

Java

jmarsden
Posts: 4
Joined: Sun Dec 11, 2011 9:22 am

Re: How to get back into programming ?

Wed Dec 14, 2011 2:28 am

Quote from bitcrafter on December 11, 2011, 13:03
I am considering (amongst other options) using a stand-alone Forth on the pi, just to make the whole package graspable. I don't need to ask or answer the question what is an operating system. Instead I say 'Yes here's the hardware, and the software is what you are interacting with. It makes the hardware do things for you.' ...

Can anyone say if there's an open-source (ideally, stand-alone) Forth that would drive a Pi? Anything that would adapt easily?

Has anyone tried interesting the eLua http://www.eluaproject.net folks in porting their standalone Lua environment to the Raspberry Pi? No RPN wierdness, clearly intended as a standalone development environment (unlike at least some of the Forth projects you linked to, which assume a separate host PC for development), open source, and a relatively simple clean language. My suspicion is that eLua is more "size-apropriate" for the R.Pi than Forth, which is perhaps more suited for the really tiny minimalist embedded systems.

mark4th
Posts: 1
Joined: Wed Dec 14, 2011 4:31 am
Contact: Website

Re: How to get back into programming ?

Wed Dec 14, 2011 4:46 am

I had been looking for about a month for a nice cheap but powerful ARM development board before i discovered the PI specifically so I could develop an ARM Fortht. I am currently developing an AVR Forth and also plan a MIPS forth for my Asus router. Once I discovered the PI I knew I had my victim in sight. I shall probably wait till the stampede is over before ordering one but hopefully stocks wont run dry too fast :)

The first step will be to write an ARM assembler in my x86 Linux forth (www.isforth.com), use that to write the ARM Forth kernel to run on the PI and have it compile various extensions. Once that's done I can create a meta-compiler and have PI Forth recompile it's own kernel (i.e. it will then be self sustaining, no need for an external compiler)

Ans forth people should take note however that i fully intend to NOT support that standard. not now, not ever :) Im also not sure yet weather I will go with direct threaded (much easier to understand) or use native threading (somewhat faster execution).

Return to “Off topic discussion”