|
Ok, quick example
mov eax, 1
add eax, 5
imul eax, eax
Simple so far. See a real tutorial if you're actually interested. And don't let the size of the manual intimidate you, assembly is very incremental, you don't need to know much just to get started.
|
|
|
|
|
|
A second hand Commodore Amiga (for BASIC and [possibly, later on] some assembler) and an Arduino (for C# and a way of introducing hardware)
How do you know so much about swallows? Well, you have to know these things when you're a king, you know.
modified 31-Aug-21 21:01pm.
|
|
|
|
|
Brent Jenkins wrote: A second hand Commodore Amiga (for BASIC
That's why I bought a used MicroVAX 3100 -- the interactive mode of VAX BASIC. Just like when I learned BASIC on a PDP-11.
|
|
|
|
|
As a general programming language I would probably suggest C++, C# or even Java. I'd avoid C itself as a first language as the others to some extent protect the programmer from much of the low level coding considerations. I would however suggest that C should be learnt early but only once the basics are mastered.
If they are looking to work in AI then Prolog would be the logical choice
If the want it for systems admin work then Powershell in a Windows environment, bourne shell for *NIX, or the relevant control language for mainframe work.
I'd also suggest in the early stages coding it up on paper first as this should help to instill some rigour in their coding. The batch processing that I learned using where we punched the card deck submitted it and got the printout back 2-3 days later really helps ensure that you get the code to run correctly much earlier and so need to understand the language much better.
|
|
|
|
|
I he just wants a glimpse of programming, Java or C# - modern, high level. If he wants to understand computers then C, which is basically a glorified assembler, in which I mean close to the underlying hardware without the more annoying aspects of assembly language.
|
|
|
|
|
I was dithering between C# and C++, but decided on C++.
The C++ language may be used at various levels - from "C with classes" up to the latest and greatest(?) additions, and your code pays nolittle penalty for the existence of unused language features.
While the C++ library contains all the required automatic resource management classes, it also has a clean syntax for raw allocations. These are necessary when interfacing with legacy (C, assembly language, etc.) code.
Lastly, C++ provides a full implementation of templates, rather than the "generics" provided by C#.
I grant you that C# is a very good language for most purposes, but when low-level or numeric programming is required, C++ has tools that are not present (and cannot be written) in C#.
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
A small thing - and you're pretty much there in what you say.
C# hides too much from the programmer whilst making itself easy. From a syntactical point of view, there's no difference between a namespace, class, function, or pointer.
What in C++ would look like
System::Window::SomeClass gcnew ^managedMemory or perhaps one may need *unmanagedMemory;
in C# would end up as
System.Windows.SomeClass managedMemory
no need for ' -> ' (vs. ' . ') when everything's a pointer to managed memory.
You get my point. Both work - but in a sense, the C# developer might not even know what it is they're doing. On the other hand, for them, it can be argued it doesn't matter.*
(*C# lovers - no need to flame this - it's just an example and I really don't mean to condemn).
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "As far as we know, our computer has never had an undetected error." - Weisert | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
Python is not only an ultimate toolbelt for jack of all trades but you can be extremely productive on a lot of platforms. The language syntax is super clean and the most important things (basic data structures and operations: list, dictionary, set, tuples) are beautifully integrated into the language. Even if someone wants to specialize in other areas (asm, C, F#, ...) python can be learned in a few days or weeks and it will come in handy as a "tool" language coupled with anything else. It is usually installed on popular linux distros by default.
I agree that sometimes "it depends". Sometimes people are motivated to learn programming to achieve a goal and in some cases that goal may define the language. (It is still worth spending at least a few days or weeks learning python as a companion language as a tool or intro language.)
I think if you have to have a clue about indirection and allocation in most languages (e.g. arrays/objects in python and other object oriented langs), this is not a reason to go low level and less productive (like C).
Update:
I agree with a post below that programming is about learning a few basic patterns and algorithms (basic data structures and related operations, paradigms, ...) and the available libraries for the language. I think python is very strong in this regard: basic data structures and operations are integrated into the language, extremely good standard library (with the best interfaces I've seen across languages), crossplatform. At the same time it makes you very productive in no time even if you are a beginner.
modified 14-Jul-15 3:26am.
|
|
|
|
|
pasztorpisti wrote: At the same time it makes you very productive in no time even if you are a beginner.
There is nothing good in it. Not even a tiny bit.
Geek code v 3.12 {
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- r++>+++ y+++*
Weapons extension: ma- k++ F+2 X
}
|
|
|
|
|
This is also something that depends on the domain. If you bend the meaning of the words...
|
|
|
|
|
I disagree. Python is a great didactic language, for a number of reasons:
- it is available on just about any platform
- it requires very little tooling to get up and running
- it has elements of both functional and object-oriented programming
- it comes with a REPL, which makes it easy to get started doing small exercises
- it has a massive and active community, so it's easy to get questions answered
- it has minimal ceremony, which makes it quite readable (especially for the kind of simple cases that a beginner will be exposed to)
- there is no need to fuss about with a compiler
On that last point, I grant that learning and understanding how to work with a compiler is a necessary part of an education in programming, but it is IMO a more advanced topic than the basic I/O, control flow, etc. that are most useful to start out with when learning programming. It can also be frustrating, as a beginner, to have to fight through compiler errors before you can see your program do something (even if that something is a runtime error--a distinction without much of a difference to the more experienced programmer, but it can make a significant difference to the beginner).
I would never suggest that Python is the only language to teach with, or even that it is the best one. But to say that there's nothing good in it is just absurd!
|
|
|
|
|
Very good bullet points.
The reason for me to recommend this language is not only because it is simply awesome and yet easy to learn, but because it is very useful in practice so learning it isn't wasted time even if the student has intentions to jump on something else. Learning python is a very good investment even if "python" sounds silly and may make someone think that it's only a toy language with some toy libraries. Python is very mature, serious and widely used even if it isn't so hyped. With python knowledge it is possible to get a well paid job (for example in web/backend development, scientific computing) and it is often listed as an advantage or strict requirement for many non-pure-python job listings (including the best payed C++ jobs). Here are some bulletpoints for those who consider learning it:
- It is serious stuff with very good standard libs. Probably everyone heard about Google and Youtube, these make use of python. Here is a bigger list: https://en.wikipedia.org/wiki/List_of_Python_software[^]
- It is installed by default on most unix like distros. It is used as an embedded scripting language in a lot of programs that provide a scripting interface. (gdb, WireShark, Gimp, Paint Shop Pro, 3D editors and cad systems, WireShark, perforce, ...) A huge but quite incomplete list: https://wiki.python.org/moin/AppsWithPythonScripting[^]
- Every programmer should know at least one scripting language to do small silly tasks (automatization, code generation, text processing, network related testing, ...) - by learning python someone can get all these. In other popular general purpose languages these tasks are often not small and/or silly.
- Python also has it merits as a language and some nice surprises for those who don't know it. It has some language constructs that are simply awesome and missing or poorly implemented in other popular general purpose languages. (eg.: python decorators, metaclasses, ...)
- Very huge productivity boost in some domains. It is only a few lines of code to write some socket based client-server app with custom server side code including async IO or multithreaded-blocking and serialization. You will see that many other things are similarly simple in python thanks to the language and the superb standard libs.
|
|
|
|
|
Languages are only for second year students...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
C - it puts you in charge.
Understanding indirection is so basic to C and programming. It's not hidden away.
And data allocation sizes really meaning something.
Some may criticize, but allocating and deallocatting memory as your own personal responsibility is a lesson not only in programming, but in life.
How Sweet It Is!
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "As far as we know, our computer has never had an undetected error." - Weisert | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
Only after having extensively sweared against the screen (and then against the mirror once you got hold of the problem) you can begin to appreciate *some* automatic mechanism for the trivial tasks. Never abuse them though or doom is assured.
Geek code v 3.12 {
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- r++>+++ y+++*
Weapons extension: ma- k++ F+2 X
}
|
|
|
|
|
My first comment is not meant as an insult or anything like that - it's just I am sensitive to rhetoric (actually appreciate a good job): your statements about "you've seen . . . ", "some people . . . ", etc. are all true. They also really don't mean much in that that particular phraseology is applicable to almost anything and find exceptions to subjective rules is essentially always successful. Damn - my director can make VB6 work very much as though it were really a programming language!
My start in programming was Fortran - and that's a fairly high level language. Pre-Fortran-77, too. Learning C - via Microsoft QuickC - was an eye-opening experience. Admittedly VAX Macro-Assembler came in between them. Pick either one: they profoundly changed the way I coded.
At first, with C, it was really Fortran coding using C's language components. Then, one day (literally), it changed. It doesn't matter what I've had to go to (or back to) since then. The change was permanent - an appreciation of what I was really doing. Appreciation meant attention, as appropriate, to run more efficiently, ward off future problems, or plan ahead by avoiding coding into corners.
Arguably, the hated feature of those new to C (from those higher level languages) is understanding indirection, embracing it, and then exploiting it. Many modern languages don't allow the unbridled freedom (and responsibility!). When 640K was the memory limit, it was wonderful to be able to set a pointer to unused video RAM and gain back precious storage. Not to necessary these days, but the lessons are still there. It's certainly memorabilia to some of us. For some of us, we've had the pleasure of doing; but for the remainder there still is available the pleasure of knowing.
Like Yoda taught young Skywalker: Embrace the Force.
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "As far as we know, our computer has never had an undetected error." - Weisert | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
Then they can use it right away and perhaps get some small jobs faster.
|
|
|
|
|
Seems like an excellent reason NOT to pick Javascript.
Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
|
|
|
|
|
This is a hard question to answer without knowing the age/maturity of the person you are talking about. For kids who are younger and just starting out I might recommend something like Scratch or Python.
As they progress further and maybe are playing games Minecraft then the next progression is Java.
For those that are interested more in web development then I would have them start with Javascript.
I think the better advice though is that once that first language is taught/learned that you explain to younger developers that the learning process never stops and that they should look to expand their knowledge and skills.
|
|
|
|
|
I learned programming in VB.NET, a language that's pretty horrible according to many people (at least on CP).
Yet I turned out fine.
I'm now doing C#, which I'm doing fine too.
Recently did some JavaScript and guess what? I did quite alright!
Just know your loops, arrays, scope, variables, access modifiers, basic memory management, data structures, OOP concepts, some Functional concepts...
You'll be alright in most languages.
The difficulty lies in the frameworks and the subtle differences between languages (like optional vs. mandatory break; in switch statements in JavaScript and C#).
And the only way to get better at those is by learning more languages.
Still, as far as a first one goes I'd say C#.
It's nice, clean, rich, has C syntax (which makes a transition to many other languages easier)...
|
|
|
|
|
Sander Rossel wrote: Still, as far as a first one goes I'd say C#.
It's nice, clean, rich, has C syntax (which makes a transition to many other languages easier)...
I actually think having so many new languages adopt a C-style syntax is a poor decision but understandable. It's also potentially very dangerous as, e.g., C# and C++ are very different but no doubt devs going from C# to C++ must make a ton of mistakes. (Not done that myself as I went the other way.)
Kevin
|
|
|
|
|
Make them suffer like we did in the 70's ...
|
|
|
|
|
You made me interested in the subject and check more on the web - for a naturally curios as I am this is already great. But you also, indirectly, inspired me for my next D&D campaign - and this is absolutely fantastic!
Geek code v 3.12 {
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- r++>+++ y+++*
Weapons extension: ma- k++ F+2 X
}
|
|
|
|
|
OK, I also remember the happy days of FORTRAN on punch cards - the upgrade from FORTRAN IV to Fortran-77 was wonderful.
However, although I used to be a D&D DM and player myself - I can't see the connection apart from I once wrote a NPC character generator in FORTRAN.
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|