Learning programming languages *split*

If someone is learning "to code" just as a hobby, instead of doing it to find a future job, then I would recommend learning to cook instead, as cooking delicious foods will probably be more useful in daily life than coding. And most of what a person knows about cooking won't become "obsolete" in less than a decade like it's usually the case with software.
 
async/await is nice, not sure I trust the runtime about its performance/memory footprint though ;p

It is basically just syntactic sugar for Tasks, saving you from having to setup a Task with a function, running it, dealing with error handling ... it is interesting how many developers - like me I should add - don't actually get this at first, or I dare say sometimes ever. ;)
 
Don't have much time to elaborate, but I think languages like Haskell and F# are the future. Proof:




So, if you are already good at typical programming, give those languages a try. I certainly will whenever I learn Java and C#, Objective C and stuff.
 
By the way, I tried Objective C several times and hated its guts ... its syntax is way worse than barebones c and though you can almost treat it like c++ all the examples etc use the 'other' syntax. And I personally think that the general syntax of c, java, JavaScript and C# is already rather ... hmm. So if you were to learn development on iOS now, I'd absolutely go with the far more elegant Swift.
 
Hey cyan
If you spend all this time learning all these different languages, are you going to have time to get good at one of them ?
 
As others point out, an experienced programmer can program in any language. When you become experienced, favourite languages are usually the ones that annoy you the least. Here's a short annotated list of my favourites:

Domain specific languages:
bash - the amount of hackery that can be done in bash is astounding. Get familiar with shell programming and add over time.
SQL - Even if you don't need a query language or a relational data-model, SQL will force you to think in sets of tuples (arrays of structs) which will benefit the way you think about large amounts of data everywhere else. It really is the grand daddy of data-parallel languages.
PHP - Derision of this language is deserved; it's a mess. But it gets a few things right: Strings are a basic type, and arrays are really ordered sets, - dictionaries which remember insertion orders. That makes it a perfect fit for shovelling datasets from a DBMSes (hence its popularity). It also doesn't whine about mismatched types, but gets shit done NOW (might explode later, though).

General Purpose languages:
Java - From its origins as C++ for dumbasses to almost adding all the missing C++ bits. Learn this, it's everywhere. Most Android development, most business software systems (banking !) is in Java.
C++ - It's fast. Prepare to be mind fucked by pointers, references, lvalue and rvalue references.
C# - Cleaner and easier than Java. Application programming with WPF/XAML+C# will make you wish that every other platform (Android and iOS, I'm looking at you) were like this.
C - Nicknamed platform independent assembler, probabably as close to the metal as you get, - unless you end up programming consoles (God forbid).

As a career advice, I'd pick either Java or C# and become proficient in it. Then expand to other languages.

Edit: I share Arwin's disdain for Objective C. Don't like the syntax and absolutely hate the concept of optional methods in protocols; An API is a contract, it damn well better be implemented as specified.

Cheers
 
Last edited:
If someone is learning "to code" just as a hobby, instead of doing it to find a future job, then I would recommend learning to cook instead, as cooking delicious foods will probably be more useful in daily life than coding. And most of what a person knows about cooking won't become "obsolete" in less than a decade like it's usually the case with software.
It might depend on the personal circumstances. I heard that some code big companies use today was made by hobbyists learning a programming language. In my case, that's mostly a professional thing, because I am not just passionate about it, it is what I ever wanted to be --if not that, an astronomer.

I actually studied after primary school 2 years of Bachelor of Science, my parents moved on and then chose to study 5 years to become an administrative assistant, though my passion was computer science, and past year I started to study basic computer science. With my previous background I didn't have to but I didn't know, although I am glad I did because I learnt a lot about using Excel and stuff like that.

I didn't need that because I could get access to superior education in programming, which is what I am doing now, though they asked me to go to a general culture exam to get there directly from my administrative branch.

The exam was about bachelor level language, maths, physics, english :), technology and history. I started at 9AM and completed the exam at 6PM. Longest exam of my life, got a 9,25 -thanks to my teachers in the academy and many sleepless nights, and now here I am, studying programming and struggling to learn a single language to a deep level.

Another dream would be getting a degree in maths, but dreaming is free, and there is life.... I am not sure I will ever make it.
Hey cyan
If you spend all this time learning all these different languages, are you going to have time to get good at one of them ?
I think that could be a recipe for disaster. I am planning on learning how to program for Apple devices with Swift during this summer or, most probably, next summer. Right now I am focused on Java/C# and the one I am really comfortable with is F# , it works better with how I think. I am struggling with Java/C# in my studies. My background knowing 0, zip, nada about programming doesn't help either, but it makes it easier for me to learn from scratch, specially in languages which are Haskell, F# style.
 
Last edited:
By the way, I started writing some blogs last year, posted among others on linkedin: https://www.linkedin.com/pulse/i-repository-arwin-van-arum?_mSplash=1&trk=prof-post

Actually the one on the command pattern is also fairly suitable to beginning developers I think: https://www.linkedin.com/pulse/i-command-arwin-van-arum?_mSplash=1&trk=prof-post
hahah, thanks for sharing, the notes app reminds me of the fact that I had to make a notes app as an exercise in a book I read recently.. Though I didn't complete it yet, the code is a bit different compared to yours, which is normal, you are a programming engineer.

Reading your code it's quite obvious. Knowing that, do you know languages like Haskell or F# or want to learn them? Those might suit you fine, because you seem like the analytical, everything under control kind of guy.

On a different note, while not a 1st class programming language in Unity yet, I'd like to dabble at making a game, and F# can be used in Unity. So... study hours aside, I am going to focus on F#, and being a numbers guy.., I think functional programming is going to be helpful.

https://feedback.unity3d.com/suggestions/f-support
 
Forgot to mention that I completed the Begin to Code with C# book just yesterday. I paid my 30€ for it -it feels odd to see your name watermarked in a book-, completed most of the exercises and read it thoroughly..

My conclusion..., if you are a beginner like me, it is a great book in almost every possible way. If you are either an intermediate programmer or an expert in programming languages like Java, C# or C++ etc, make yourself a favour and save those 30€ for something else.

For a beginner, it's almost perfect. Well-written, it makes learning fun, etc etc, and as you learn you go from an absolute beginner level to a proficient programmer, as competent as any expert... Well, somehow, but the author explains the intricacies of the language very well, and after Chapter 10 you get deep into expert stuff.

You need practice to become an expert, but the advice and content is great. So why wouldn't I recommend the book to an intermediate or expert programmer? The thing is that despite learning the good stuff with this book, the author made it for absolute beginners.

And he created a quite powerful bunch of methods with his SnapsEngine that automate a LOT of things for you. So you need to draw something, call the method DrawADot or whatever, and there you are. SpeakString (automatic text to voice), and many many others.

With this book you learn how to program, but not how to program everything yourself.
 

some very interesting stuff -specially from the 41 minutes mark on. Carmack has said that functional programming is good for games, too, and programmed Wolfenstein 3D in like 10 times less the amount of lines of code using Haskell.

Plus, nor Haskell nor F# are owned by a company, they are free source and don't belong to anyone and accept support from people.
 
Yes there's a lot going for functional programming, the main drawback at the moment is performance, when it comes to simplicity, stability and maintenance it's a net win over anything else.
 
I'd call it performance predictability rather. Better abstractions that FP offers or more advanced runtimes can achieve performance parity with other languages/environments. It's just not a given.

For a language like C/C++ there's always the possibility of hand tuning the identified performance bottleneck. It's harder to do so if you are writing functional programming style. That said, I'm not entirely sure this is a commonly-occurring scenario. It definitely depends on the type of software ..
 
Yes there's a lot going for functional programming, the main drawback at the moment is performance, when it comes to simplicity, stability and maintenance it's a net win over anything else.
actually, I thought it'd be the other way around. I recall reading once while skimming through a forum that Haskell or F# had beaten C++ in some performance test. I took it with a grain of salt, but still...

For anyone interested... Some books to learn Haskell:

https://www.quora.com/What-is-the-best-book-to-learn-Haskell-in-2015 (I wonder what Carmack used to learn Haskell)

Books to learn F#:

http://fsharp.org/learn.html (Beginning F# 4.0 is very up to date -2016, F# current 4.0 version-. In the snippets I read it tells you things like how to enable F# Power Tools in VS)

Books to learn Swift:

https://www.quora.com/How-do-I-learn-Swift (for those like me who for now don't have an Apple device, there are tools for Windows to create and compile Swift code)
 
I found out from per experience that the best way to learn one of these languages (Haskell, F#, Swift) is to try these sites rather than anything else. The first two have a screen with the step by step tutorial and the right screen is the compiler. Superb!!

http://tryhaskell.org/ (this page has a web compiler and it's excellent to begin with Haskell, tutorial on examples of what you could type to the right and the compiler terminal to the left)

http://www.tryfsharp.org/ (the most complete of them, highly recommended, you can learn F# as a beginner, then there are more advanced exercises, expert coding... Recommended by F# experts for beginners to start learning. If your browser -Firefox, IE11, Chrome support Silverlight- supports Silverlight you can run the code on the browser instead of just typing it)

http://www.learnswiftonline.com/ (a nice starting webpage for Swift. It differs from the others in that there is no online compiler to show you the results of your code by following the text to the left, but if you use a Mac and have this page on the background, it teaches you step by step like the others, too)
 
Last edited:
My best code to date, but it's based on a tutorial (Discriminaded Unions: not uniform structures -a mushroom and a star have nothing to do with each other, if you know what I mean- and Pattern Matching. Still needs improvement 'cos I shouldn't need powerUp2 at all, but it's very readable, even a non programmer could get what's going on:

type PowerUp =
| FireFlower
| Mushroom
| Star

let powerUp = FireFlower
match powerUp with
| FireFlower -> printfn "Ouch, that's hot!"
| Mushroom -> printfn "Please don't step on me..."
| Star -> printfn "Let me play some special music for you."


type MushroomColor =
| Red
| Green
| Purple


type PowerUp2 =
| FireFlower
| Mushroom of MushroomColor
| Star of int


let handlePowerUp powerUp =
match powerUp with
| FireFlower -> printfn "Ouch, that's hot!"
| Mushroom color -> match color with

| Red -> printfn "Please don't step on me"
| Green -> printfn "1UP!!!"
| Purple -> printfn "Sorry, about that!
| Star duration -> printfn "Let me play some special music for you
for %d seconds." duration

//Test handlePowerup.
let powerUp2 = Star 14
handlePowerUp powerUp2
 
Last edited:
The list of best programmers of the world ever.

https://bloggerspassion.com/10-great-programmers-ever/

http://www.arkhitech.com/12-greatest-programmers-of-all-time/

http://www.itworld.com/article/2823...4-of-the-world-s-best-living-programmers.html

@Arwin , one of the best programmers, mentioned in the 3rd link, is Jon Skeet. He works for Google, and he wrote several books about C#. His book C# in depth, talks about async programming in Chapter 15, which you have defined as very complicated, but he tried to make it as easy to understand as possible, with the help of engineers behind that feature.

He writes in the book:

"Chapter 15 is all about asynchrony. C# 5 only contains one major feature --the ability to write asynchronous functions. This single feature is simultaneously brain-bustingly complicated to understand thoroughly and awe-inspiring elegant to use. At long last, we can write asynchronous code that doesn't read like spaghetti."
 
Back
Top