Jump to content
gdf

Life

Recommended Posts

On 2/8/2018 at 1:07 PM, Merus said:

The tricky thing about programming, and it's going to be tricky no matter how you learn it, is that it requires you to develop a unique mindset that doesn't really have much of an analogue in other fields. The code on the screen is a representation of an entire universe underneath it that doesn't necessarily behave how you expect. It takes practice!

 

I kind of want to argue against that, but then again there is some truth to it. Sorry if this post is already too off topic BTW, maybe we should move this convo to another thread?

 

I think programming on a certain level is about managing complexity, and as such it has analogues in EVERY FIELD. All fields probably have similar issues that a programmer might deal with. But yes, in programming that complexity is represented in abstractions and mathematical models, which can't be said for many other fields. Source code can be much more efficient in representing complexity than for example business processes that span humans and computer systems in other fields, or even physical systems. And you definitely need to learn some quite advanced skills to learn to play with these abstract models.

 

But at the source code level it's very easy to add accidental complexity - that's when programmers come up with the wrong abstractions and they end up making the whole system much more complex than it needs to be. I have personally seen the damage that a programmer with a lot of knowledge about new trends was able to make, convincing many people in our company that he knew what he was doing, and to some extent he did, but he also ended up leaving a big mess behind.

 

So the challenge in programming to me is about finding the right abstractions. In the real world (aka "other fields"), I think if you stumble on wrong abstractions, people will probably tell you and stop you. But in programming there is a lot of freedom in creating the abstract model* that represents what your program needs to do. And if you don't have the right mentors (often the case because good mentors are rare, in my experience) you can go in very wrong directions and even convince someone with a PhD that the thing you are doing is right, while it might not be.

 

But then again, it's not that serious. If you go in the wrong direction, you still learn from it and hopefully know better next time. And it doesn't mean you're a fraud (look up impostor syndrome, many people in programming apparently feel they might be frauds), it just means you made some mistakes and you can still learn a lesson and keep learning and try a different approach.

 

* [edit] also another challenge is that to manage the complexity of the model you actually need to use (or even invent) abstractions that don't necessarily have any correspondence to the real world things the program is dealing with. So some of the abstractions are solely about structuring the programs, and which abstractions are popular keeps changing over the years. Especially in web programming there are a lot of trends and things changing constantly, about what kind of abstrtactions are "in". I'm not super familiar with Python, but I think Python might be one of the most stable languages in this sense, that they don't keep changing how things are done. I might be wrong about that.

Share this post


Link to post
Share on other sites

This has been a cool discussion, sorry for not participating, took some much-needed holidays. Great post Erkki, though I'm not sure the meat of it is really for someone just starting out - it's extremely high-level.

 

As far as certifications go I never really needed to do that, I'm old enough that programmers were mostly self-taught anyway. I guess my master's degree counts somewhat. I think the best approach, as said by others before, is to pick something and mess with it. Languages that have a REPL (Read Evaluate Print Loop) are the most fun to experiment with, like for example the Javascript console in any browser, or the BASIC prompt for that matter. Or the immediate visuality of NetLogo is also a really nice way to get your feet wet.

 

For me the closest analogues to programming are 1) cooking and 2) writing, coming at it from opposite angles, but both focusing on communicating in a clear, unambiguous manner.

 

In cooking, you have a set of instructions, ie. a program. You the cook are actually executing the program, taking the role of the computer. However, unlike a computer, you're not a deterministic system that always does exactly as instructed. In fact, you might even go off and improvise a new dish. Then, if you want to enable other people to replicate that dish, you need to write it down in a way that lets other people read your instructions, perform them, and hopefully arrive at the same delicious result. Writing a recipe is like programming someone else's brain. A recipe is like a program: you start with data (ingredients) and through instructions transform the data into the desired configuration. Some actions are repeated often enough that you give them a special name (functions) so for example you could say

whisk(egg);
saute(onion, 5, MINUTES)

instead of expressly describing hand motions, pan temperature in degrees and the like. Good recipes are easy to follow and consistently produce the correct results.

 

Similarly, when writing, either a text or a program, you are trying to essentially capture a chain of information and logic in a way that lets the (reader/computer) internalise what you've written with minimal friction and ambiguity. A well-written program is almost exactly like reading a (admittedly very dry) essay with footnotes. There's a great book about this, called Clean Code - see here for a blog post about it.

 

Anyway, like Jon I'm always happy to help with specifics. Let me know!

Share this post


Link to post
Share on other sites

You're right, what I said is not that applicable to starting out. Sometimes I wish I could give advice to people who are going through a similar thing that I've gone through, but I usually can't because I forget (sometimes knowingly) what was going through my mind when I was just learning something. All I can say is that perhaps Python is indeed a good way to start. Although I've never used it for anything serious myself, I know they do use it at our company for some back-end systems.

Share this post


Link to post
Share on other sites

I use python extensively for work, and I think the best advice I could give is to find a book or blog or program that is specifically interested in data structures. I think understanding sets, lists, dictionaries, & strings is the key to understanding your tool set and how to solve the problems you're trying to solve. Getting comfortable with these concepts as mathematical and computer science objects will go a long way to having a core understanding of what the language is good at and good for.

 

Share this post


Link to post
Share on other sites

Another great alternative that came to my mind later is this: http://learnyouahaskell.com/chapters

 

You may not keep working in Haskell or similar functional programming but getting your mind around writing pure functions is going to pay off in huge dividends if you end up getting serious about programming. This actually hooks into what Erkki wrote above a little bit.

 

I also came across these Python courses which seem pretty good to me:

https://classroom.udacity.com/courses/cs101

https://classroom.udacity.com/courses/cs212

 

(I've especially heard good things about the second one, it discusses things like choices of data structure like Jenn is talking about)

 

Anyway, because there's a metric shitton of nerds out there, and many of them have strong opinions plus the tools to put them into practice, there's about as many programming languages and paradigms out there as there's days in the week. I'd browse until you find something that suits you and then stick with that for a bit.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×