Teach Yourself Programming in Ten Years

22    13 Sep 2016 05:57 by u/tame

25 comments

9

Like the article. I always hated when people claim you can learn a language in a weekend. Maybe if you already know a few and just need to learn syntax, but it always seemed ridiculous.

As someone who's been interested in learning to program as a hobby. What are certain languages best or worst at? I started with C# just because my dad had the book already, what are the pros and cons for it?

Edit: phone hit enter when I meant to hit '.'

2

My only issue with C# is the fact that it is windows' and the compiler isn't that great. The free alternative (monodevelop) is passable.

That aside, it is a very simple language that does a lot of things for you (things that you would need to manage in C or C++) behind the scene.

My naïve opinion is that if you can write it in C#, just use C++ for the compiler (gcc). C++ is just a bit harder, but for someone like me who appreciates more control over what the program actually does, it's a benefit.

1

Yeah C# isn't bad, C++ forces you to pay more attention to your input and file handling. Java is a free-for-all when it comes to validating input, so I'd stay away from that as a newbie. Too easy to get into dot-notation for shitty libraries when you could be writing leaner code on the C side of the camp.

In any real terms, learning programming is a lifelong pursuit, unless you push out cookie-cutter shit apps for mobile or craptastic business apps that require very little real computation -- most of it is backend data manipulation.

Tech is a dual-edged sword, don't lose a lot of time to it. It isn't worth being the biggest propeller-head when life passes you by.

3

After a certain point, you can learn the basics of a language in a weekend. In fact, after a certain point, you are often expected to in school.

That said, you won't necessarily be terribly great in it, and you may not be able to do much useful because of a lack of knowledge of the relevant APIs.

In terms of what languages are best at/worst at, that's largely a matter of interpretation. A few samplings:

C - high-speed, moderately to highly portable code that gets close to the machine. However, this can have some difficulty with some machine architectures in terms of optimization (you're thinking like a human, but the CPU is designed to do things better when working with other assumptions in mind, e.g. out-of-order execution). Additionally it gives you enough rope to shoot yourself in the foot, and in a lot of cases the specific libraries you're working with are unique to the platform and not generalizable to standard C.

C++ - object oriented version of C, 99% backwards compatible, to the extent that you've probably never actually used a true, pure C compiler except maybe gcc. It has a lot of the same advantages in terms of speed but it does have noteworthy increases in bloat, and the OO paradigm is not the best. It is also criticized for having too many ways to do things, which can cause problems in collaboration.

Java - Decent (not spectacular) speed, highly portable in both binary and source form. Moderately universal these days; it's hard to go wrong with learning it. However, the language constructs leave something to be desired, Oracle has its hooks in it and it's often a memory hog. Plus, Swing is sluggish and in some cases it suffers too much because it thinks it's smarter than you, which it usually is, but sometimes it isn't and when it isn't it bites you in the ass hard.

C# - similar to Java in many ways, but less popular and much more Microsoft-centric.

Lisp - Parsing, to at least some extent, and artificial intelligence applications, particularly genetic programming. However, it is very counter-intuitive to human thought, and most practical implementations have to be interpreted. Uses the functional language paradigm, which is extremely non-traditional (your code is essentially forming a series of parse trees; it's half tree-building and half writing equations, almost).

Perl - Good for regular expressions and pattern analysis. Was an early favorite for web scripting applications and is still quite capable to this day. But the language can do things in so many ways that it's inevitably a mess unless you're using the options of "warnings" and "strict."

JavaScript - about as universal as a language gets these days; it's deep in every browser. However, its structure is lacking (though nowhere near as bad as Perl), it is interpreted in almost all implementations, and the fact that it's browser-centric does limit it.

Assembler - In theory, the fastest, and also the only way to do certain things, particularly when you're writing firmware or BIOS-type code. In practice, you can shoot yourself in the foot a lot if you don't know how the processor uses individual instructions, e.g. out-of-order operations in order to properly fill the instruction pipelines. It is also non-portable off of most architectures, and is extremely difficult to read.

BASIC - Easy to read and a classic over the years. It used to be so ubiquitous that just about every PC had it in ROM. Forms the core of Visual Basic from Microsoft. However, it has a lot of different dialects and ends up over-simplifying quite a few things at times. It also has limits in terms of how "close" it can get to the machine, and often has performance limitations.

COBOL - In theory this is good for executives who don't know how to read and write traditional code. In practice madness and death await you (which is why there are so few programmers for it around, aside from them getting old).

FORTRAN - I know very little about it, but supposedly it's excellent for science computing and certain high-speed calculations. It has not been very popular for some time, though; certainly popular enough to retain interest, though.

Prolog - Works by setting up a logic system instead of a traditional program. However, it's a language you can redefine "1" in, so I wouldn't advise it except as a learning platform for advanced programming language theory.

All this is off the top of my head and I haven't touched some of these in over a decade. Python is one I didn't cover since my experience with it is nearly non-existent, and I also didn't touch a few other highly popular ones I have no experience with, including Python, PHP, Ruby, and Objective C. YMMV.

As a note, if you are looking for future projects to tackle, Java is probably the most immediate use for getting a job and closest to what you're used to, C is of great practical use in terms of learning how the machine actually works, Basic (specifically Visual Basic) can get something GUI-centric working with minimal experience, and Python is popular enough that it's probably worth a look as well.

0

Fortran is one of the fastest compiled languages because there is no mucking about with dynamically sized objects - everything is static at runtime. Also, there is no recursion, but you can call two identical functions with different names to emulate recursion and it will (in most cases) run faster than real recursion and still use less RAM.

1

C# is the best starting point, it has a consistent framework that actually is build nicely and demonstrates how you should build your code too. If you design your code that it almost becomes exactly like the .NET framework then your project will become a success and be very scalable.

With C# I have built critical system, speedy systems, large scale systems, complex multi threaded systems, and the compiler is lightning fast. I get near C++ speeds too but I develop 100 times faster.

For very small projects it is a bit of overkill, but all my small projects have turned into big scaled applications over time. And project code turned into my own frameworks.

0

python

1

Python's a good learning language but (IMO, I know the rest of the world disagrees) not a great beginner language. It's very dense and you need to understand a ton of very high level programming concepts (weird variable scoping rules, OO, dynamic typing, lambda functions, list comprehensions, lazy evaluation...) to properly use it. People think C is hard for beginners but all you really need to learn is functions, control structures, and to get the concept of pointers and you're pretty much set.

0

In writing a lot of simple apps, you don't even have to know the whole language. Just enough to access data in a database and show reports and forums with buttons that can be pressed to activate stuff. For example you can write a program in procedural statements instead of object oriented designs.

I'd say easiest language to learn would be BASIC, Microsoft changed how Visual BASIC works so it is more like Java now since 2002 and Visual BASIC 6.0 was the last Classic Visual BASIC.

6

Finally, less pressure. I agree with these types of articles.

4

I have an XKCD News Substitutes script running, so this title appeared a bit more... sensational than it actually is.

Good article, though.

4

It would probably take 10 years to become a good programmer. But you can become an okay programmer in less than a year

4

I would think that for the majority of programming, decent-but-not-great is good enough. After all, programming is mostly about solving people problems, not computer problems, and the hard computer problems are already solved by the 10 year / 10,000 hour experts.

6

Not everyone becomes a good programmer, not even after 30 years.

3

Oh yeah, then how does a programmer from India with a weekend of reading a book apply for senior programming jobs? /s (but not really)

1

I have about 50 years of life left. Ten years is a long time.

1

That's why not many people are genuine experts in more than 2-3 things.

0

Doesn't it excite you that you have the potential to be an expert in five things?

1

From my personal experience, the title holds true.

0

10 years?! The hell?

0

He's talking about gitting gud, not just writing some hello world crap.

0

Even getting good. Thats like some master level.