/ Re-learning to program

This topic has been archived, and won't accept reply postings.
JJL - on 18 Oct 2016
My computing started at school on a motorola 6800 and then (massive upgrade!) the Z80 (Research Machines 380Z). I learned assembly and interpreter BASIC, which, at that time, had no subroutines or objects.

Later I wrote APL for IBM in my gap year, and a very little COBOL.

Then it lapsed for a few decades.

I'm now curious to re-learn, but the world has moved on sooooo hugely it's hard to know where to start.

Suggestions for an accessible book (prefer to online!) and language? I should say that I have a couple of projects in mind, so a Pi is probably a bit light.

What's relatively easy to self-learn, yet quite useful when you have?

Would consider a course if someone can recommend one (London/Oxford).

Just trawling for now...
KevinD - on 18 Oct 2016
In reply to JJL:

I would probably go for Python, C# or Java. Probably go for Python since can be used more broadly.
Good IDEs available for all which makes learning less painful.
A Pi isnt exactly lightweight though. Terms of power i reckon it kicks the arse out of anything you used those few decades past.
For C# if you sign up with MS Dev Essentials you get a full copy of Visual Studio and SQL Server to play with. It can also be used for python.
MeMeMe - on 18 Oct 2016
In reply to JJL:

What projects have you in mind?

Only you probably want to pick a language that fits well with what you're doing.

I'd look at Java if I wanted to learn a general object orientated language.

Or C if I wanted to do more low level stuff.

Looking at what you've done C might be a simpler re-introduction for you as it's conceptually much closer to what you already know.
john arran - on 18 Oct 2016
In reply to JJL:

Whichever languages/tech you choose to pursue, http://www.w3schools.com/ is a great learning resource.
mp3ferret on 18 Oct 2016
In reply to john arran:
If you do choose to write webby stuff - I'd look at https://developer.mozilla.org. Its a much better resource than w3schools (sorry john) - which tends to be out of date or offers poor advice when it comes to good programming practice.

Anyway - learn a proper language - like c#. You've clearly got the talent to write code - so why go for an educational language like python when you can play with the big boys in .net - now available on pretty much every platform.

https://toggl.com/programming-princess
Post edited at 11:10
CurlyStevo - on 18 Oct 2016
In reply to JJL:
Personally I'd go for C#. It nicely structured, powerfull, fast and applicable to a lot of jobs. You have the added bonus that its still pretty close to the other C languages so conversion wouldn't be too hard (although don't expect a quick transition to C++ guru ;)
Post edited at 11:22
john arran - on 18 Oct 2016
In reply to mp3ferret:

> If you do choose to write webby stuff - I'd look at https://developer.mozilla.org. Its a much better resource than w3schools (sorry john) - which tends to be out of date or offers poor advice when it comes to good programming practice.

Thanks for that. It's been a few years since I used it last in anger and it was very useful at the time. I can quite believe it may not have been kept up to date.
KevinD - on 18 Oct 2016
In reply to mp3ferret:

> Anyway - learn a proper language - like c#. You've clearly got the talent to write code - so why go for an educational language like python when you can play with the big boys in .net - now available on pretty much every platform.

Python is rather more than a educational language. Its a versatile and capable language.
As for being available on every platform. Core is still in its teething stages.


wercat on 18 Oct 2016
In reply to JJL:

BBC BASIC for Windows, still being enhanced/supported and immensely powerful!

(being slightly facetious, but I've seen my 17 year old son progress from a BBC to the Windows version and frankly it's pretty amazing)

[Microtan65 user]
Rob Exile Ward on 18 Oct 2016
In reply to JJL:

I'm going to go completely off piste here. If you really want to see how the world has moved on, download Microsoft SQL Express and start learning T-SQL and stored procedures. SQL developers are masters of the universe.
wintertree - on 18 Oct 2016
In reply to JJL:

The Z80 is still going strong, derivatives are used in all sorts of embedded devices. Keep the faith!

If I was starting from scratch now, I would seriously consider Apple's Swift. Otherwise Python is very accessible, loads of books and ultimately very powerful. It also introduced higher level concepts like object orientation without a lot of the cruft from some languages.

Whatever anyone says, avoid JAVA.

If you're from the 8-bit era a nice distraction is to lean enough C to make a stack based virtual machine and to produce your own assembler and linker for it. You can get your own basic system up and running in a few days, and it's a learning experience. I did this for a fast LOGO VM.

brianjcooper on 18 Oct 2016
In reply to JJL:
Are you doing this for recreational reasons or, to get back into the computing employment market?
I would think if the latter, you need to check out the main languages used in the workplace.

SAP(ABAP/4) JAVA etc. (RPG400 may be old hat now)

Fortunately I retired 3yrs ago after 40yrs in IT. As an analyst programmer I went through language
cross training several times. It's never ending, but never boring.

Good luck.
Post edited at 12:45
Ramblin dave - on 18 Oct 2016
In reply to KevinD:

> Python is rather more than a educational language. Its a versatile and capable language.

Agreed. Like every language, it's got a preferred set of applications. You aren't going to get far doing mobile development or writing audio processors or device drivers in Python, for instance. On the other hand, it's widely used for back-end web stuff, for server scripting and automation and for AI and computational linguistics, and it seems to be rapidly turning into the lingua-franca of "medium data" wrangling.
planetmarshall on 18 Oct 2016
In reply to JJL:

> What's relatively easy to self-learn, yet quite useful when you have?

It's an impossible question to answer sensibly - I suspect you'll get as many different responses as there are respondents to this thread.

Tell us what your projects are and we can suggest something appropriate. Do you want to write an Algorithmic Trader on an FPGA with its own network stack, or a Facebook App that scrapes meterological websites to find out if Kinder is in yet?

Jimbocz - on 18 Oct 2016
In reply to JJL:

Regarding a course, take a look at Pluralsight, which has hundreds of courses available on line. Once you nail down what language and development environment you want to use, then you can take some courses there to get you going. It's free for the first month.

If I were in your position, I'd think first about what you want to achieve. If you want to get back commercial programming as a career, I would go very, very niche. Something like making iPhone apps , or whatever skill you are interested in that is commercially desirable. You can look on job boards to easily compare how lucrative skills might be.

if you just want to do some hobby stuff, then again the internet will tell you what other people are using for whatever you are interested in.

HTH
Jimbocz - on 18 Oct 2016
In reply to Rob Exile Ward:

They make money at it as well. Being a SQL DBA frequently comes up as the best IT job on surveys, but I believe that SQL development and data warehousing is more fun and better paid.
KevinD - on 18 Oct 2016
In reply to Rob Exile Ward:

> I'm going to go completely off piste here. If you really want to see how the world has moved on, download Microsoft SQL Express and start learning T-SQL and stored procedures.

Not worth bothering with express any more. Sign up for dev essentials (for free) and you get the developer edition plus a whole bunch of other things eg looks like 3 months of pluralsight currently.
Shani - on 18 Oct 2016
In reply to JJL:

If you want to future-proof then C# (not least because you get to use the best IDE - Visual Studio), and Javascript are the way to go. Bob Tabor's introductory courses are very good:

1) https://channel9.msdn.com/Series/C-Sharp-Fundamentals-Development-for-Absolute-Beginners
2) https://channel9.msdn.com/Series/Javascript-Fundamentals-Development-for-Absolute-Beginners
BnB - on 18 Oct 2016
In reply to wintertree:

> Whatever anyone says, avoid JAVA.

Yes. At all costs make sure you don't earn £400pd.
JJL - on 18 Oct 2016
In reply to JJL:
Oh Golly.

This is great, but also frightening!

Never been a career and not going to be - purely hobbyist. Three parts to my "need":

1. Generally I want to write bits of hack code to solve a particular question - so the thinking is mostly in the algorithm not the coding, if that makes sense? I wrote a chess program once for example (not an especially good one, but I was 16 at the time and memory was the uber-scarce resource). Python can probably do this? With the rust accumulating on my original skills, I have learned to push Excel quite hard!

2. The other targeted interest is some database-backed (moderate size - 1000s of records not millions) web things. A little like the logbooks/climbs register here, but actually to do with species identification by selecting characteristics (colours, sizes, etc) and pulling up options from that through to a web-interface. I'd like to then link to mapping for distribution etc. Does that prompt an obvious candidate?

3. Finally, it's partly about just getting back into something I enjoyed - devising algorithms (developing a hidden-surface algorithm is good mental workout for example) and tinkering them into code. I never learned an object oriented language, so would like to do that from scratch I guess (or near to).
Post edited at 13:51
wintertree - on 18 Oct 2016
In reply to BnB:

> Yes. At all costs make sure you don't earn £400pd.

I'm assuming the OP isn't motivated by looking for a new career. I had assumed that was obvious that they were talking about learning a language and not retraining...

Nobody is paid much money for knowing the JAVA language. It's their skills, experience and knowledge of the extended ecosystem of code and libraries and methods that command value.
Post edited at 14:05
JJL - on 18 Oct 2016
In reply to JJL:

No one has mentioned Ada yet?
Ramblin dave - on 18 Oct 2016
In reply to JJL:

By the sounds of it, Python would be a pretty good fit for you, then!

It's pretty high level, so it abstracts away a lot of the book-keeping that you have to deal with in some languages and lets you focus on the code. The standard library includes modules for handling standard lots of fiddly tasks - from XML parsing to logging to setting up an http server - so you don't have to reinvent the wheel every time you want to do anything, and there are a lot of good open source libraries for doing bigger and more complicated stuff (eg machine learning or heavy data analysis). There are also some good web frameworks from the very lightweight (Flask) to the all-singing-all-dancing batteries included (Django).

I think I originally learnt mostly from the main documentation:
https://docs.python.org/3/tutorial/index.html
although I've also heard good things about the Django Girls tutorials:
https://tutorial.djangogirls.org/en/

If you get serious, and once you've got to the point where you're generally starting to understand the basics of the language and to be able to more or less make it do what you want it to, I'd also recommend picking up copies of Brett Slatkin's Effective Python and Uncle Bob Martin's Clean Code to understand how to you could be doing it better with less effort. The latter is written in Java, but it's essentially language agnostic, with sound practical stuff on everything from how to name variables to object-oriented design.
Rob Parsons on 18 Oct 2016
In reply to JJL:

> No one has mentioned Ada yet?

I've used Ada in the past but wouldn't recommend it in this context.

If you're interested in native language support for concurrency (and, since you mention Ada, I wonder if that's what you're curious about) you might have a look at 'Go' - see https://golang.org/
Post edited at 15:00
Rob Exile Ward on 18 Oct 2016
In reply to JJL:

'The other targeted interest is some database-backed (moderate size - 1000s of records not millions) web things. A little like the logbooks/climbs register here, but actually to do with species identification by selecting characteristics (colours, sizes, etc) and pulling up options from that through to a web-interface. I'd like to then link to mapping for distribution etc. Does that prompt an obvious candidate?'

Funnily enough database design can be good fun, and to do it properly you really have to understand the phenomena/entities you are trying to describe. It's the complete opposite of how we used to be trained in the 70s, when we told to ask users what outputs they wanted, and then work out what data you needed to store to give them that; if you design a database correctly, and focus on the data, then the users can have any output they damn well want!

If you want to create a database it is worth doing a bit of theory, getting to understand the relational model and understanding 3rd normal form. There's loads of stuff on the web; mostly it's not particularly complicated but it's not intuitive either. Many developers seem to struggle!
mp3ferret on 18 Oct 2016
In reply to Jimbocz:

> They make money at it as well. Being a SQL DBA frequently comes up as the best IT job on surveys, but I believe that SQL development and data warehousing is more fun and better paid.

But you'll end up being a dba and all of the proper developers will laugh at you ;)
planetmarshall on 18 Oct 2016
In reply to JJL:

> 1. Generally I want to write bits of hack code to solve a particular question - so the thinking is mostly in the algorithm not the coding, if that makes sense? I wrote a chess program once for example (not an especially good one, but I was 16 at the time and memory was the uber-scarce resource). Python can probably do this? With the rust accumulating on my original skills, I have learned to push Excel quite hard!

Probably Python, though purely functional languages can be useful ( and fun ) for this kind of thing, such as Haskell. And Haskell has probably one of the best introductory guides to programming ever written - http://learnyouahaskell.com/

> 2. The other targeted interest is some database-backed (moderate size - 1000s of records not millions) web things. A little like the logbooks/climbs register here, but actually to do with species identification by selecting characteristics (colours, sizes, etc) and pulling up options from that through to a web-interface. I'd like to then link to mapping for distribution etc. Does that prompt an obvious candidate?

Again, probably Python ( and its web server, Django ). Your database could be SQL or something unstructured like Mongo. To be honest you could use just about any combination of languages to do this kind of thing.

> 3. Finally, it's partly about just getting back into something I enjoyed - devising algorithms (developing a hidden-surface algorithm is good mental workout for example) and tinkering them into code. I never learned an object oriented language, so would like to do that from scratch I guess (or near to).

For pure algorithms my typical workflow is to prototype something in Python and then port to C++ if I need to scale it up. Again, functional languages can be useful for this kind of thing but, in my experience, they tend to work better with list processing and graph algorithms than dense linear algebra ( eg matrix type stuff - the kind of thing you'd use Matlab for ).

captain paranoia - on 18 Oct 2016
In reply to Rob Exile Ward:

> SQL developers are masters of the universe.

Again, we go back to the question of what the OP wants to do with his software skills.

SQL may be great for business database transactions.

But it's not so great for writing embedded, real-time code...
paul__in_sheffield - on 18 Oct 2016
In reply to JJL:

Depends what you want to do with it.
If you want to earn gazillions as an engineering consultant, then Fortran and Matlab are king.
Otherwise the number 1 fallback is c++, although I still get asked for Lisp and the occasional bit of COBOL.
Actually, also Algol 68 once.
ads.ukclimbing.com
marsbar - on 18 Oct 2016
In reply to JJL:

Rather pointless but fun. https://scratch.mit.edu/

Probably not your cup of tea, but I mention it just in case. The children love it.
Rob Parsons on 18 Oct 2016
In reply to paul__in_sheffield:

> ... I still get asked for ... the occasional bit of COBOL.

In your job, you seriously get asked for *COBOL*? What's the context?

KevinD - on 18 Oct 2016
In reply to Rob Parsons:

> In your job, you seriously get asked for *COBOL*? What's the context?

Its apparently still buried away inside various banks. Although they are slowly thinking of moving away from it.
We had some stuff using it until last yearish.
paul__in_sheffield - on 18 Oct 2016
In reply to Rob Parsons:

> In your job, you seriously get asked for *COBOL*? What's the context?

Distributed real-time whole-aircraft simulation environment with Airbus and a bunch of others like Rolls-Royce, DLR and Goodrich. The real-time elements were physically distributed on different sites, and could be anything from c models to legacy executables where the source code had been lost (believe it or not, the CFD for an engine). The main sim ran under the Department of Defence's (US) High Level Architecture, some large scale databasing ran, for various reasons at one site under COBOL. Everything had C wrappers to standardise data handling.
I worked on the electrohydraulic actuators for the A380 which got integrated into this behemoth!
JJL - on 18 Oct 2016
In reply to paul__in_sheffield:

> If you want to earn gazillions as an engineering consultant, then Fortran and Matlab are king.

Fortran? I used to write that! Where's the cheque?
JJL - on 18 Oct 2016
In reply to paul__in_sheffield:

OMG. I heard:
> Bollocks whole-aircraft simulation bollocks with Airbus, and a bunch of others like Rolls-Royce, DLR and Goodrich. The bollocks were bollocked on different sites, and could be anything from c models to bollocks where the source code had been lost (believe it or not, the CFD for an engine). There was widespread bollocks.

> I worked on the bollocks of the A380 which got integrated into this behemoth!

paul__in_sheffield - on 18 Oct 2016
In reply to JJL:

> OMG. I heard:
Rob asked for context. looks like the context was bollocks. ;-)
JJL - on 18 Oct 2016
In reply to paul__in_sheffield:
> Rob asked for context. looks like the context was bollocks. ;-)

OK. I'm sorry. I didn't mean it like that.

I was bamboozled by the new (to me) words, To be honest I could apply the same (assumption of a greater knowledge than I actually have) to most of the replies. I'm really not that experienced guys!

Sorry Rob. I did manage to understand some useful things; I appreciate your answer.
Post edited at 22:20
JJL - on 18 Oct 2016
In reply to everyone:

OK. Let's reset the question a little.

The fact that I'm just about (with some googling) following the answers, suggests that you are flattering me with your interpretation of my former skills.

I'm good (really good) at seeing how to convert something into a line of enquiry or algorithm.

I know an intrigued young adult's view of programming and computers.

I know nothing of the layers and components that make up functional, modern coding. Object orientation and classes, functional vs imperative, are all new to me.

So, imagine fairly smart person in time capsule from 1980. How to get them up to speed?
KevinD - on 18 Oct 2016
In reply to JJL:

> So, imagine fairly smart person in time capsule from 1980. How to get them up to speed?

Quite hard since havent done that level of things for a while.
For Python:
Something like
https://automatetheboringstuff.com/
Is probably a fairly good introduction and uses fairly practical small tasks as the examples.
I am not sure there is anything equivilent for c#
Maybe something like
Beginning Object-Oriented Programming with C#
Or headfirst c# (I dont like the style but I know plenty who do).
wintertree - on 18 Oct 2016
In reply to JJL:

> So, imagine fairly smart person in time capsule from 1980. How to get them up to speed?

I honestly think very little has changed since my days writing Z80 assembler. In any language you have I/O, maths, flow control and that's about it. Object orientation is a very thin addition on top of that. Very powerful, but not complicated in its essence.

The problem you face is that whilst many languages are little more complex than 35 years ago, the environments surrounding them - the "standard libraries" etc - are far more complex as they've grown with the applications of computers.

One of the biggest changes is just how gods-damned complicated it now is to get direct access to the screen as an XY canvas, and to get immediate keyboard input. That's been abstracted away from the core language into user interface libraries. Which are almost never simple.

You could do worse than to buy a copy of "The C Language" by K&R and take a few days to work through it cover to cover. Then for a change you could work through the Python tutorial - https://docs.python.org/3/tutorial/

But, really, it's almost impossible to recommend anything given the wide range of well developed, freely available languages and environments out there. But still, I've got a lot of affinity for Python for almost everything really.

Alternatively I've written quite a lot of code for the PicoBlaze which is a "soft core" CPU implemented in an FPGA. The great thing about this is that the full source code for the CPU is freely available so you can look at all the grubby details of how the CPU is built, and even edit it yourself. http://www.xilinx.com/products/intellectual-property/picoblaze.html

> I know an intrigued young adult's view of programming and computers.

They think it's like J.A.R.V.I.S. from Iron Man. Very young people think it's all touch interfaces. Less flippantly you might want to Google around "computational thinking" and how its entered Key Stage 1 education. A really positive move that's about far more than programming.
Post edited at 23:35
Ramblin dave - on 18 Oct 2016
In reply to JJL:
> I know nothing of the layers and components that make up functional, modern coding. Object orientation and classes, functional vs imperative, are all new to me.

> So, imagine fairly smart person in time capsule from 1980. How to get them up to speed?

Oof, big ask. Software development is a pretty huge area and I doubt that many people are really up to speed on everything from embedded systems to web front-end to high performance number crunching to desktop applications.

The general approach I'd go with would be to start trying to solve problems using a reasonably modern language (Python is a fair shout given the possible projects you talked about above), and at the point when your code starts getting hard to find bugs or is confusing to modify and adapt, start reading about how write reliable, maintainable code, which is what quite a lot of the theory really boils down to. My reading list would include Bob Martin's Clean Code and Martin Fowler's Refactoring, then maybe Design Patterns by the Gang of Four, but other people might have a different perspective. At the same time, there's loads of information on the web, although it can be difficult to filter the good from the bad. It's also worth looking at open source projects that do similar stuff to what you're interested in, and figuring out what they've done that's good.
Post edited at 23:57
Rob Parsons on 19 Oct 2016
In reply to paul__in_sheffield:

Thanks for the reply.
Rob Parsons on 19 Oct 2016
In reply to wintertree:

> I honestly think very little has changed since my days writing Z80 assembler.

I agree with that by the way. There are huge layers of complication floating around nowadays - nobody has time (or need) to master them all - but none of the principles have changed.

To the OP: it's still the case (in my opinion) that every serious developer needs to know C, so going through K&R (as suggested above) is a good idea.

Another good idea made above is to take advantage of the huge amount of good quality source code now available to read on account of free software projects: you can learn a lot by reading it. That, come to think about it, *is* a real change: not too long ago, you wouldn't have had the chance to look at any 'commercial-quality' source code: it was all trade secrets. We all owe the free software community a large debt.
planetmarshall on 19 Oct 2016
In reply to Rob Parsons:

> To the OP: it's still the case (in my opinion) that every serious developer needs to know C, so going through K&R (as suggested above) is a good idea.

For what it's worth, I think this is terrible advice - particularly for a hobbyist. You will learn nothing from C except bad habits, and the only people that think serious developers need to know C, are C developers ( I speak as one ). As for learning SQL - if this is the kind of thing you do for fun then I can only assume you also enjoy spending a few hours at Ramshaw Rocks without taping up.

In summary - Python if you want to do something practical, Haskell if you're mathematically inclined and enjoy algorithms. If you want to write mobile Apps your choices will be dictated by the platform you wish to use ( unless you wish to do something perverse like write Android Apps in C++ and Qt. Don't, I've tried it ).

All the other suggestions seem to assume you want a career, or you want to be the 2nd person in the country other than Paul who still uses COBOL.


Mark Edwards - on 19 Oct 2016
In reply to wintertree:

> One of the biggest changes is just how gods-damned complicated it now is to get direct access to the screen as an XY canvas, and to get immediate keyboard input. That's been abstracted away from the core language into user interface libraries. Which are almost never simple.

Not always. One of my personal favourites is PowerShell, already installed on PCís (just needs switching on).
You can write noddy programs like you would in BASIC, scrape the net, manipulate jpgs, bmps and draw on the screen. OK, JAVA, C, C# have their uses, but PowerShell pretty much is the Windoze system. Not a bad place to start.
And on the Pi, take a look at:
http://raspberrycompote.blogspot.co.uk/2013_04_01_archive.html
Currently designing a Pi add-on using 4 MCP2515 CAN interfaces via the SPIís (and to my annoyance, it is performing well), next phase add LAN, WIFI and BlueTooth.

This topic has been archived, and won't accept reply postings.