Stop saying learning to code is easy
hanselman.com
hanselman.com
That part (the one that leads to being able to produce code) has actually always been rather "easy". It's the next steps that are usually hard. Learning data structures, design, architecture, how to collaborate with coworkers, how to fix, debug and review code, mastering the associated tools (shell, git, regex, making a given editor your home and harnessing its power, etc).
From what I've observed with more junior developers that are usually coming through self-learning or accelerated programs, it's not the "code" that is hard, it's those following phases because in the end, they're what really matters.
Though, don't get me wrong, it's absolutely nice that we're pushing programming literacy and making it more accessible for everyone, I just feel like we should not be selling false hope.
I learned all of those things way after shipping my first usable and useful code. These things don't make the programming learning curve steeper, they just make it longer.
If I'm going to hire you as a "software engineer" at an engineering salary, I expect you to know all those things.
Of my friends learning to code for masters degrees now, the ones with a natural coding mindset and studying it hard are taking about 2 years to hit a production engineering level. Most seem to be on a 3-4 year trajectory. That's pretty reasonable for a complex skillset.
Makes sense, I guess I was thinking more of the potential in teaching kids how to code so they can use that knowledge as biologists, economists, teachers, geologists and so on. Standards there are lower because you're competing with people who don't or barely know how to code, but there's still a lot of untapped potential in all of those different fields for automation and all the other good stuff that programming can bring.
That doesn't mean being literate isn't valuable.
Salaries are too high from the perspective of many executives because they have the programmers doing low-value work. Instead of carefully considering what merits building they just have them build everything and then see what sticks and what doesn't.
If programmers were paid like executives, they would only be asked to write code that made a clear difference towards a company's bottom line. Much thought would go into the decision-making and preparation process before code was written to make sure that both problem and solution were appropriate and well understood. You would have whole fields of lower-wage analysts whose job it was to prepare the work of the programmer. There would be much less code written, but the code that was written would be much more valuable.
There are many different kinds of hard. There's hard like "I have to put effort into it", there's hard like "if you were not born being able to do it, you can't do it", and there's hard like "even people who can do it are only capable at their absolute best moments".
So the issue is not "Is programming difficult?" - clearly any learned skill is difficult to bring to an expert level.
The question I see people asking is, "Can the average person with diligence and application ever learn to program well?", and the answer is obviously yes, they can. It's not "hard" like running a <3:50 mile is "hard".
It's also not hard like "Can you taste PTC or distinguish red and green", in that you either "are born with it" or aren't, and find it effortless if you are capable.
So many people that I've met assume that they're fundamentally incapable of understanding algorithmic thought, and that's very sad. They don't need to be Kernighan or Torvalds in order to gain value from learning some programming skills.
So yea writing code is easy, copy-paste and replace the stuff that seems relevant to you, especially when you have a quick iteration method like a REPL.
Control flow might take a while to fully grasp but still it's not hard to understand, but takes practice to get comfortable with.
It has nothing to with programming. We are trained through evolution to conserve resources as much as we possibly can.
The guy who invented the wheel was the first programmer.
Learning to code is NP-Hard ?
And something that I am missing in most of those articles is that writing code is actually the easy part of the job, the hard part is talking to the customer and figuring out what they actually want you to do and then keep up with them changing their mind every four weeks and still somehow manage to ship something that roughly does what it currently is supposed to do.
But nonetheless I would say that just reading a user story and coding it out is the exception, usually you write a if statement and then notice that there is nothing in the specification that says what to do in case the condition is false. And then you ask and suddenly it turns out that this whole thing totally conflicts what somebody implemented a month ago.
Personally I have never worked in a project where people where just supposed to code out a given specification, they were always also involved in gathering requirements and at least to some extend in shaping the architecture. Only the overall system architecture is usually already fixed by architects, most of the time to ensure that the system integrates well with the existing environment.
Quoting from the top-level comment:
> Writing good code - readable, maintainable, secure code with few bugs - on the other hand is really hard.
How is a project manager going to help with this? This is clearly the responsibility of the programmer, not the PM.
> the hard part is talking to the customer and figuring out what they actually want you to do and then keep up with them changing their mind every four weeks and still somehow manage to ship something that roughly does what it currently is supposed to do.
I wonder if you interpreted this too literally. Sure, the act of talking to the customer is itself a bit challenging in some cases, but I think the point is that it's especially challenging to engineer a system subject to changing requirements because if you're not good and careful you could build yourself into a corner.
A good PM can help a ton here by figuring out how to talk to the customer and spending a lot of time doing so. But I don't think there's any reason to believe that's actually harder than building the requested system, and if any requirement does change, it's not going to affect the PM directly at all -- it will be an order of magnitude harder for the developers to deal with that than the PM.
Finally, I think developers taking on management roles is exactly what's needed, and it's exactly what happens in most top tech companies. Sure, if you look at extremely high ranking VPs at a place like Google, you'll find many ex-McKinsey Harvard MBAs (alongside engineers as well), but in general the middle management at these places is composed of programmers to a very significant extent.
Then I teach them about html+css but starting only on the "easy-ish" part. So using my own library [1] for things like ".row" where you'd need either floats+negative margins or flexbox. Teaching them about images, images sizes (should be set at 100% in many situations), colors, backgrounds, paragraphs and links. That really motivates them.
Then some day they will need more advanced things, but if they can make a layout with the content then they become really motivated since they can see their programming real time.
I have to do this mainly because some people hate "irrationally" maths, so if I taught the same way I started learning --calculating primes-- then they'd be bored to death. Instead I like choosing something they are personally connected: what website do you like? Okay, let's do something similar...
I've even tried doing a small course for free [2], but so far it's not been really effective with those people I'm teaching, but some other friends asked me things about it :)
[1] http://picnicss.com/ [2] https://en.libre.university/subject/4kitSFzUe
CSS is a markup language, sure (although technically Turing-Complete, depending on the spec), but it's still conceptually telling a computer what you would like to happen. It's more declarative than imperative, but given the wide number of different programming paradigms, I don't think that's a problem.
> Serious question: how do you define "actual programming"?
Solving problems by expressing algorithms in a language a computer can interpret. CSS / HTML are not used for expressing algorithms or computations. They're used for describing visual representations. They're an output format.CSS has a spec in which it's Turing-Complete? Even if it's true, nobody uses CSS like a Turing-Complete language. It's like saying JSON is Turing-Complete because it's JavaScript.
What about running "rails new blog"? Is that programming?
What if you add "-d mysql"? Does that count?
What about changing a YAML config file? Not programming? Does it become programming if the config file is written in Python?
What if it has a loop? Or what if you know that a certain key in the config file will trigger a loop?
I don't think there is any firm line between computer use and computer programming. I think there is only a spectrum between specialized and generic computational primitives. HTML and CSS are somewhere in the middle of the spectrum, between tapping a button and applying voltage to circuits.
> My guess is you just don't consider declarative languages "real programming".
That's ridiculous. There's no "real" programming, and of course declarative programming is.. programming. However, with declarative programming you're still writing algorithms and doing computation (composing functions / querying predicates). > Does it become programming if the config file is written in Python?
Is it an algorithm? No. It's just like JSON is for JavaScript. > I don't think there is any firm line between computer use and computer programming.
Solving problems with algorithms is programming and while there is indeed a fuzzy line there, I still find it far-fetched to consider writing configuration files (which are static inputs without logic) or declaring html structure / css styles (which again, lack any logic) programming. div { color: red }
.foo { color: blue }
is equivalent to: if classes.contain("foo")
color = "blue"
else
color = "red"
How do you define algorithm in a way that excludes CSS?[0] http://arstechnica.com/gaming/2013/04/how-an-accountant-crea...
And you can graduate from coding to programming some basic javascript and get into fun stuff like Liquid (Shopify) without leaving the familiar browser environment and text editor of choice.
Interesting. The resource looks like a good start. Could you give some more detail on why you think it was not effective?
I too am thinking of teaching web design and development basics to my gf and a few other people who are interested. Do you have any tips / more resources to look at which would help?
So I would need to spend a large amount of man-hours to teach it, but if it's just for a couple of people I find teaching them myself, with real-time feedback, corrections and explanations works much better as everyone has different needs.
You either have to be willing to learn a simpler stack and pick up skills gradually, or deal with the intense frustration of drinking from the firehose right out the gate.
When I was in high school, I went from doing BASIC to elementary web stuff to trying to learn C++. (I didn't have practically anybody who knew how to code to guide me) I gave up and didn't go back to coding for some ten years, sticking to just being a power user.
If I were trying to teach someone to code nowadays, I wouldn't really know where to begin. People want instant gratification without the frustration. You can't have both. I've had limited success, but only after finally convincing them that they have to be patient.
I'm excited for functional package managers for this reason. It will give us a framework for describing machine state that's actually useful enough to give us real-world one-click install.
There have been lots of attempts that pick a stack e.g. Angular-seed for the MEAN stack but they make so many questionable choices that they don't have any longevity. At one point it might have looked sensible but now Mongo is out of favour and React has the ascendancy.
Maybe it needs an organisation like a Linux distribution, e.g. Ubuntu For Web, that chooses a complete end to end stack, develops missing glue, maintains forks when necessary and gives some sort of maintenance guarantee for LTS releases and supports upgrade paths.
Hell you don't even need a programming language - you could teach someone to code by drawing flow charts on a blackboard.
"if statements" and "For loops" those are the tools everything is built on. Want to teach someone to code start there not with a "Python tutorial".
I'm not saying that one view or the other is right. Rather, I'm just saying that it's not obvious which is better or even how much it matters. Posts like this—which basically do say "it's obvious that..." and little more—aren't contributing anything substantial.
I don't know what your intentions are, but you have a post titled "Stop saying learning to code is easy" and a photo of three women with laptops. Are you trying to make a correlation of women being glib about the difficulty of software development/programming?
If they are good at it and go deeper into software development or computer science, then it may get hard. But it is a pessimistic view to look for reasons why something will be hard, and pontificate on those problems. Why not just help people take some simple steps, get a few successes under their belts, and decide for themselves if they want to go into deeper more difficult waters.
It is easy. And it is very very hard.
Sure some one can drive and make a few $$'s a day. But to make that considerable source of income to send kids to a good education, to buy your self a home, a retirement and a decent income to retire one to cover all your expenses you have to do a heck lot more. That is when you realize the taxi license was likely least of your worries. You'd have to wake up at 3 am in the morning, suffer rude passengers, wash your car often, have the discipline to spectrum all those things that being successful in profession demands.
At the end you really come to the conclusion that what stopped you was not the lack of coding classes at college or government bureaucracy or union or any of that stuff. The true reason is its hard, and most people simply aren't resourceful enough to see through the end.
I am student, and freelance developer. And I ask myself a lot of times, what is the code that we write? Lines aren't clear like in electronics (I studied EE for 2 years, after which I pivoted to CS), where you got rules, theorems, which you use to analyze and build things. Code is a live thing. It grows, it changes, it lives and it dies. And the most paradoxical thing of all is that computers are pretty "dead" and dumb things, bunch of registers, ICs and transistors. (I am oversimplifying things here to prove my point better).
The way we approach writing code always changes, code can be pretty personal thing, you can have your own style (like handwriting). And possibilities are almost endless now!
So I think people in general should stop treating things with black or white principle. I feel that is very immature. Especially not coding.
Software development is single most weirdest and interesting things that happened to me. It makes me scary and enthusiastic at the same time. It is easy and hard at the same time. And I think it is really stupid to try to ascribe any of those exclusive attributes. But everyone has it's own opinion. And that is what makes dev culture and community so interesting in the end.
I was obsessed about learning how to code because I always played a lot of video games and loved electronics.
I don't have a degree, am chronically unemployed. I admit that learning code is really about understanding the details. Having a taste for computers and math is a huge advantage. If you don't, you will quickly hate it and only learn it for a job, but not for passion.
I agree that code looks lame and is really not accessible, while most people who need it, can't always afford to work with a programmer. There needs to be solutions like MIT's scratch or anything that is more intuitive than textual syntax. It's amazing what some people can manage to do with excel.
Teaching, mentoring, and onboarding students to enjoy coding is the real hard work.
It's a way to encourage while being up front with the amount of time and mental toil learning new ways of thinking and expressing your ideas takes.
It also encourages self-selection, as the few people who took it to heart are some of the best devs I know now, they saw the challenge and remained undaunted.
I tend to prefer terms like "tractable", where it's less about whether the given problem is "easy" or "hard", and more about whether I can find a productive way to reason about the problem. An easy subject can be made intractable by the wrong kind of presentation. Most subjects that are very /new/ to a given person may be intractable on the onset. Some subjects, ones that I would call truly "hard", do not become tractable for a very long time.
So I don't know if I'd call software development hard, but it's still a new and unfamiliar thing to a lot of people, and it can be quite intractable at various times, which is basically what "bad documentation" means.
I've recently pointed a friend towards FreeCodeCamp, he's never tried development but was asking about it (previous non-tech related jobs) so I pointed him to the website.
Yesterday he must have spent 8 hours doing tutorials, occasionally asking questions and has started building his first website. He's beginning to pick up the basic building blocks of programming, not for loops and if blocks, but data structures, debugging (Chrome is amazing), etc.
I think the hardest part of learning to code is choosing a language and deciding what to build. The rest is Stack Overflow and online tutorials. Oh, and a whole lot of time.
Sure to become an "Expert" you'll need to learn about a vast range of things that are not code, but affect code - like security, best practices, readability and maintainability, different stacks, etc. But getting your foot in the door with the basics is pretty easy.
I helped my friend learn to paint. Bought him a canvas and 4 brushes and some paint. He watched YouTube all day yesterday . I think he painted this circle thing that looked like a sun. Painting isn't hard.
The other day, one of our non-technical members of staff said "I think people are just to stupid to use our system". Glad she said it and not me.
As to it being political correctness, I would argue that has little to do with it. It's really marketing - an attempt to change the perception of something to achieve some goal. No one's feelings are hurt when you say something is challenging (I guess unless you explicitly say challenging compared to what).
Learning to code well is difficult and requires years of experience, obsession, and a titanic amount of patience.
That is the big difference to actually work in the field and have to do the boring stuff too :)
The first is shared across languages, getting to grips with ifs and cases and all that. That is relatively easy.
The second is pr language, and it involves learning what is available in the libs and similar. And how to use those to do things like read and write files, connect over networks, or draw a UI on screen. And those are bloody hard.
https://medium.freecodecamp.com/one-does-not-simply-learn-to...
Why not just give them some easy code, help them through it, and let them see if they enjoy it?
But you need real pros to build a skyscraper.
The thing with programming is that it's turned into one of those things people say "you are born for". So when newbies have trouble with it, they give up and say their minds don't "work that way". I think it's good to tell people that anyone can learn the basics of programming and get started. No need to be a genius for that. I don't know why but people seem to think programmers are "different" than the general populace (even from those with other hard jobs).
But it's not easy. We've all dealt with hard problems in our jobs, classes, or personal projects, right? If you tell people programming is easy they'll hit that first roadblock like the article says and quit. Seen it happen many times.
I think you also drastically underestimate the number of people who are specifically interested in hard things, not easy things. And in many cases these are exactly the sorts of people you want to hire.
The language of mathematics is also designed to be written and understood by people, and is used to describe the laws of physics. I, personally, find writing mathematical statements be comparable to writing code (and also Latin).
If you can write in plain but exact English what exactly do you want the system to do and how to do it; and what you wrote actually solves the problem that you intended, then you did 90% of the programming work and have 90% of the required skills. Yes, you'd still need to code that in a particular programming language so that "the computer would understand", but doing that takes a tiny portion of the total work time and learning the skills to do that also is simple and fast compared to learning how to do the first part properly.
On the other hand, if what you described actually describes something slightly different from what you wanted (which is very likely) and doesn't describe the behavior in a bunch of things that you didn't think of (which is even more likely) then the skills in that computer language or the "design by the language architect" won't help. And fixing issues like that take up the majority of programmer-hours in any nontrivial software project.
In environments with less absurd barriers to entry, like JavaScript, learning to code is easy (especially in light of the things Scott mentions in that post, such as the vast swaths of community support available when running into problems).