• This topic has 29 replies, 24 voices, and was last updated 5 years ago by PJay.
Viewing 30 posts - 1 through 30 (of 30 total)
  • Learning to program a PC
  • PJay
    Free Member

    I’ve often noted the threads that pop up here regarding learning to program. I’ve always been a keen computer user and started with a ZX-81 back in the 80s and enjoyed a bit of hobbyist programing (although I was never any good at it); I’m now thoroughly out of touch and haven’t coded anything for probably  15 – 20 years.

    I’m most familiar with old-school Basic, did a bit of COBOL programing at college and tinkered with Z80 & 6502 assembly language for fun. The most advanced language I used was Amiga E for the Commodore Amiga (which had an advanced pre-emptive multi-tasking, WIMP OS) which I believe was based on C. This was all pre-IDEs, coding was done in a text editor and linking/compiling from a command line and things like opening windows involved setting up strings of numbers and calling the appropriate OS routing with a pointer. I do therefore have some rudimentary (but archaic) coding skills.

    Having turned 50 (and fast approaching the sliver surfer generation) I have a strange desire to try to code again. I won’t be any good and I’m certainly not looking to learn a language as a career change but I do fancy seeing if I could write the odd utility program to run on my PC.

    Languages and operating systems have moved on massively, and this might be a non-starter as not only will I need to learn a new language and concepts (and IDE) but also a ferociously complex OS; even so,  I thought that I’d do a bit of investigating.

    Python seems to be recommended on STW as a good programming starting point (and after watching my young nephew write some Python code it looks understandable) but a bit of research suggests that it might not be the best option for PC programming.

    I did download Microsoft’s latest Visual Studio installer which offers a VS Community version for free, but then wasn’t sure how best to proceed.

    It appears that I can program for the PC specifically using C++ or alternatively, the Universal Windows Platform (which I think generates code for all Microsoft devices such as X-Box and phones) using C++, C# or Visual Basic; there is also mention of Python (but only in the context of web/cloud programming) along with a bewildering array of other options and Frameworks.

    So, thoughts & recommendations please (even if it’s only “steer clear” and buy yourself a decent computer game instead). Is this doable or a complete non-starter?

    DezB
    Free Member

    Dunno what you should choose. Mate of mine recommended Python as well, but that was for work purposes.

    Codeacademy looks a really good resource from when I thought about it, then lacked motivation:
    https://www.codecademy.com/learn/learn-python

    mikewsmith
    Free Member

    What do you want to code something to do?

    PJay
    Free Member

    What do you want to code something to do?

    Nothing in particular, I just recollect really enjoying tinkering with code all those years ago (I seem to be doing a lot of recollecting lately) and thought that it might be an interesting hobby again; it probably won’t be.

    onewheelgood
    Full Member

    Writing native apps for the PC is somewhat out of fashion these days. There used to be a huge choice of languages and toolkits, but I think that it’s now pretty much left to Microsoft with C# and VB.Net. Since you can now get these for no money, that isn’t such a bad thing. I’d stick with the MS stuff you’ve downloaded.

    UrbanHiker
    Free Member

    search out learn python the hard way. do the first free lessons, see if you like it. If you do, once you get to the paywall, download a copy of dive into python, which is free, and read that. Job done.

    brassneck
    Full Member

    Python for fun and portability. C# for actual Windows programs but steep learning curve. Powershell if you just need to get stuff done on Windows, it’s the Windows BASH scripting but as all WIndows automation is keyed into it there’s little you can’t do. Not sure I’d class it as fun though, if I was looking for a hobby I’d look at java on Android or Swift iOS development tbh.

    jam-bo
    Full Member

    Nothing in particular

    programming is just a tool to solve a problem. I use python & matlab for data analysis, and starting to learn Lua for some hardware scripting.

    nickjb
    Free Member

    I think you really need an outcome in mind to get something out of it. Maybe have a read up on some IoT projects and see if anything takes your fancy. You might find a Pi or an Arduino is also a better place to do your programming as its easier to get going and usually easier to make it do something interesting. It is quite fun having an Arduino on the bench and making it do things that you can actually see. Another opting is phone apps, lots of scope there, too.

    dissonance
    Full Member

    Sign up for MS dev essentials. Has various freebie offerings in terms of training etc.

    Exactly what do you want to do on the PC? Python can be used happily enough but depends on the exact usage.

    For utility tasks powershell may be the best bet since that is what it is designed for.

    TheBrick
    Free Member

    GUI stuff on windows C#

    GUI stuff on Linux mono and C# or QT and C++

    3d graphics C++ and direct X or opengl. Or unity and c#.

    Vision systems python and opencv then rewrite in c++ if you need the speed.

    Microcontroller C and a bit of ASM as / if needed.

    Numerical analysis, R. And or MATLAB.

    Real number crunching Fortran (ideally latest standard) and or C++. I prefer Fortran for number crunching personally.

    I think lisp is ment to be good for language stuff but I have no experience.

    Haskell for fun and a change. I have only played with it.

    Proof of concept try ideas python. Get loads going easily with loads of libs and toolkits available.

    Web, depends on what your host platform is and if you want a particular framework. I have tried C# and python with Django but not my area.

    TheBrick
    Free Member

    OS and drivers C and down C++.

    ElShalimo
    Full Member

    Does anyone on here use R ?

    jimdubleyou
    Full Member

    If you’ve just tinkering, I’d have a look at code academy (as mentioned above). There are courses that actually give an end product which is a good motivator.

    Obviously, RPGLE ftw though :p

    GlennQuagmire
    Free Member

    I’d say start with VB or C#

    Visual Studio 2017 Community is an excellent toolkit and can be downloaded for free.

    poly
    Free Member

    For tinkering python will be ideal, a low learning curve, loads of beginners guides and you aren’t worried about computational efficiency.  It also copes well with different styles of programming (from basic sequential scripts, to object oriented code, with some functional programming in the middle).  You can get some quick progress and then add bells and whistles later, eg gui, web etc.

    its probably not the go to language for pc development but its widely supported.  One of the frustrations is that because python doesn’t come preinstalled on a pc, unlike most Mac and Linux systems, if you want to share your code with “naive users” you need to jump through some extra hoops.

    Because python can still be run easily exactly as you said with text editors, it means there is much less emphasis on the IDE, which helps you focus on what your code is doing rather than the environment.  Many python devs use Sublime Text as a very basic IDE successfully.  A beginner may find something with breakpoints and introspection useful.  My current favourite is Spyder (free).

    PJay
    Free Member

    Perhaps Python would be a good starting point; at least the code I’ve viewed doesn’t seem totally bewildering. I could always progress to Visual Studio later if I get on with it.

    zilog6128
    Full Member

    programming is just a tool to solve a problem.

    +1 If you’re really stuck for ideas you could find some sort of course workbook with problems to solve, etc.

    Something tangible could be fun, like interfacing with a Pi/Arduino or (even better) robot Lego!

    Or go old school & go back to Z80 or the Amiga? Still active dev scenes around for both!

    Simple smartphone app which is relevant to work or a hobby? ConnectIQ app if you have a Garmin?

    kcr
    Free Member

    If you want to tinker with coding, and you have an ordinary Google account, you can start coding immediately in JavasScript using Google Sheets. Just create a new spreadsheet and go to Tools/Script Editor. There are lots of tutorials online to help you get started.

    I’ve used this to create a simple timed arithmetic game for my daughter to practice her tables, and recently a planner to help me try out different schedules for a long distance event.

    PJay
    Free Member

     ConnectIQ app if you have a Garmin?

    I do have a ConnectIQ compatible Garmin (Oregon 700) but wouldn’t have a clue how to start.

    zilog6128
    Full Member

    https://developer.garmin.com/connect-iq/programmers-guide/getting-started/

    talks you through installing the required software & creating your first app (simple watch face). Not programming, but opens the door!

    hedley
    Free Member

    Have a look at Rainmeter skins. Great fun to play with. Easy to learn scripting but very powerful. Can extend it with LUA as well.

    Cougar
    Full Member

    You say you want to learn to code without any real end goal in mind.  So really, I wouldn’t get too hung up on “PC programming.”  As someone else said, sitting down and writing Windows apps has kind of fallen by the wayside.

    You could do far worse than getting a Pi and cracking on with Python.  The cool thing here is you can Do Stuff with it.  One of the barriers I always faced when learning to code was coming up with what I wanted to write.  With a Pi you can get all manner of lights and sensors and things, and there’s a shedload of project ideas on the web.  https://www.raspberrypi.org/magpi/issues/ for instance.

    The other thing you could consider perhaps is some light web dev.  These days websites are all modular, WordPress et al, but there’s nothing to stop you kicking it old school.  HTML, then CSS, then JavaScript.  Develop a web front-end for your Python project. (-:

    5thElefant
    Free Member

    Get yourself a ZX-81, Spectrum, Atari ST (or whatever takes your fancy) emulator and fill you boots with old school basic.

    andytherocketeer
    Full Member

    Don’t need a Raspberry Pi for python. Just download it on whatever PC you’re using, and start tinkering.

    Pi or Arduino handy though to do the “blinking lights” or a fun project to do something useful.

    eg… like what was on Springwatch last night… A Rasberry Pi with camera attachment stuck in a lock-n-lock tupperware type container with a hole in it to make a wildlife camera trap. They didn’t go in to any details, but that’s what it was. More than easy enough to hack your own Python script to capture, record, file, images/vids and even serve it all up to be visible on a website.

    Or for just on a PC, stick on a copy of Jupyter and Python, and tinker away. Write a few lines, hit run, write some more….

    I’d definitely want to have a project to scratch an itch before just writing something.

    Toasty
    Full Member

    Making simple little games in something like Pygame or Corona (or one of the similar LUA variants) would be a vaguely friendly way to start out, no requirement learning a big IDE.

    There’s no wrong language to start with really, the principles you learn in one language will immediately transfer between languages very easily. Types of variables, methods, loops etc and you’re there, the rest is just fluff. Learning how a specific problem could be expressed as code is the learning part, you just need to dive in, set yourself a target and see if you can get there.

    Also bare in mind, when copy/pasting your first few bits of code, you don’t literally have to remember every function you’re using. For example, if you did dive into something like C++/DirectX, there are pages of setup code, just to get a triangle rendering, no one remembers this, copy/paste/configure is the way to go.

    skids
    Free Member

    Check this Python Book out, someone has accidentally left the PDF online http://bedford-computing.co.uk/learning/wp-content/uploads/2015/10/No.Starch.Python.Oct_.2015.ISBN_.1593276036.pdf

    deadkenny
    Free Member

    As said, start with an idea and pick a language that may be suitable for the task.

    Python isn’t special, and in many ways is a poor tool for some jobs, but it’s easy which is why it’s popular (I’d go so far as encourages lazy in true software engineering, but anyway, for hacking about it’s fine 😉 ). It does have good support though on IoT devices such as the Pi, for messing with hardware.

    If targeting Windows in particular though, .NET languages may be better, though you have choices. Old school Forms applications, WPF, new UWP apps.

    Python is another stack to install, whereas C# building a .NET app gives you an extremely small executable and the runtime is in the OS, and fast, with a huge amount of APIs to do Windowsy things. That said there are Python wrappers for .NET.

    But unless you have a real need to do Windows apps, you’re more likely to be tinkering with a Pi and the like, phone apps (probably Android, so Java or something webby) or doing something web related, the latter of which may involve JavaScript. JS will lead you down a road of endless new frameworks (whatever framework you pick, it’ll be out of date by next week, and pick up the new framework, then that’s out of date, etc), and then there’s the hell of package dependencies, especially with node. Again, thanks to laziness. Packages that depend on a hundreds of other packages, just to do something you could do in a line of code if you could be bothered.

    tthew
    Full Member

    I’m learning Python at the moment. Or at least I was until a few weeks ago, light evenings and nice weather have caused a bit of a hiatus.

    I wasn’t hugely keen on the Codecademy course. There wasn’t a great amount of detail and background in each lesson, and it was hard to reference back to earlier topics when you needed a bit of a reminder. I’m on the Python Crash Course book at the moment. Nicely paced, looking forward to getting into the 3 meaty projects that are included.

    PJay
    Free Member

    Lots of thoughts, thank you all. I’ll have a think and a tinker and see where it leads.

Viewing 30 posts - 1 through 30 (of 30 total)

The topic ‘Learning to program a PC’ is closed to new replies.