Less Wrong is a community blog devoted to refining the art of human rationality. Please visit our About page for more information.

Comment author: Jayson_Virissimo 18 September 2012 03:44:33AM 2 points [-]

A little. As your income increases, I expect your consumption to become more expensive in monetary terms, but as your business grows I expect the value of your time to increase and for your consumption patterns to become less expensive in terms of time. College is very expensive in terms of time.

Ah, I think I see the source of your confusion. If my start-up succeeds, then I plan to increase the time I spend doing it and schooling, since I currently work a full-time job and work on my start-up part-time.

The relevant options are full-time work/part-time entrepreneur or part-time school/full-time entrepreneur.

Comment author: datadataeverywhere 18 September 2012 04:00:32AM 1 point [-]

Indeed, I misinterpreted you in multiple ways. My model went something like "Jayson_Virissimo is currently working 60-80 hours a week on his start-up. Once it exceeds ramen-profitability, he intends to scale back his efforts to become a full-time student." How very foolish of me!

Comment author: bogus 17 September 2012 12:58:58PM *  1 point [-]

Your confusion is due to using "scope", which is actually a lexical concept. What you're dealing with here is variable substitution: in order to evaluate a function call such as posterior = ApplyBayes(prior, evidence1), the actual function arguments need to be plugged into the definition of ApplyBayes(·, ·). This is always true, regardless of what variable names are used in the code for ApplyBayes.

Comment author: datadataeverywhere 18 September 2012 02:19:06AM *  1 point [-]

I certainly hope that I'm not confused about my word choice. I write compilers for a living, so I might be in trouble if I don't understand elementary terms.

In all seriousness, my use of the word "scope" was imprecise, because the phenomenon I'm describing is more general than that. I don't know of a better term though, so I don't regret my choice. Perhaps you can help? Students that I've seen have difficulty with variable substitution seem to have difficulty with static scoping as well, and vice versa. To me they feel like different parts of the same confusion.

In a related note, I once took some of my students aside who where having great difficulty getting static scoping, and tried to teach them a bit of a dynamically-scoped LISP. I had miserable results, which is to say that I don't think the idea of dynamic scope resonated with them any more than static scope; I was hoping maybe it would, that there were "dynamic scoping people" and "static scoping people". Maybe there are; my experiment is far from conclusive.

EDIT: Hilariously, right after I wrote this comment the newest story on Hacker News was http://news.ycombinator.com/item?id=4534408, "Actually, YOU don't understand lexical scope!". To be honest, the coincidence of the headline gave me a bit of a start.

Comment author: Jayson_Virissimo 17 September 2012 10:11:43AM 1 point [-]

Schooling (for me) is as much consumption as investment. I'm merely saying that if my income significantly increases, then I will engage in more consumption (getting a degree in computer science, going on a pilgrimage in Europe, etc...). Is this really so strange?

Comment author: datadataeverywhere 18 September 2012 02:04:12AM 1 point [-]

A little. As your income increases, I expect your consumption to become more expensive in monetary terms, but as your business grows I expect the value of your time to increase and for your consumption patterns to become less expensive in terms of time. College is very expensive in terms of time.

I'm not saying this is a bad choice, but it is one that surprises me. I'm still interested in the answers to my questions. Do you intend to sell your start-up, have it run itself, or abandon it? It seems like those options cover the gamut (I might consider requiring < 40 hours a week of your time to be "running itself"; if you're quite dedicated, you could probably fit being a full-time student in even with the start-up taking 40+ hours of your time, making that an alternative option).

Comment author: NancyLebovitz 16 September 2012 02:38:12PM 1 point [-]

Is there a reason to use the same variable name within and outside a scope? It seems like a fertile source of errors.

I can see that someone would need to understand that reusing names like that is possible as a way of identifying bugs.

Comment author: datadataeverywhere 16 September 2012 08:19:10PM 0 points [-]

My post didn't indicate this, but the most common source of scope is functions; calling a function starts a new scope that ends when the function returns. Especially in this case, it does often make sense to use the same variable name:

posterior = ApplyBayes(prior, evidence)
...
function ApplyBayes(prior, evidence) = { ... }

Will have prior=prior, evidence=evidence, and is a good naming scheme. But in most languages, modifying 'evidence' in the function won't affect the value of 'evidence' outside the scope of the function. This sometimes becomes confusing to students when the function above gets called like so:

posterior = ApplyBayes(prior, evidence1)
posterior = ApplyBayes(posterior, evidence2)
posterior = ApplyBayes(posterior, evidence3)

Because their previous model relied on the names being the same, rather than the coincidence of naming being merely helpful.

Overall, I would say that this is still a fertile source of errors, but in some situations the alternative is to have less readable code, which is also a fertile source of errors and makes fixing them more difficult.

Comment author: Jayson_Virissimo 15 September 2012 07:45:42AM 6 points [-]

I've enrolled in 3 Coursera classes as a kind of warm-up for (possibly) going back to school to study computer science (if my start-up succeeds before then). They are:

  1. Introduction to Mathematical Thinking by Keith Devlin
  2. Learn to Program: The Fundamentals by Jennifer Campbell and Paul Gries
  3. Introduction to Logic by Michael Genesereth

Reply to this comment or PM me if you are interested in collaborating.

Comment author: datadataeverywhere 16 September 2012 03:14:38AM 3 points [-]

...going back to school to study computer science (if my start-up succeeds before then).

That's amusing. Usually I would say the value of the founder being present is much higher for a successful company than one that has failed. I would actually expect my freedom to pursue other avenues diminish as my success in my current avenue grows.

Do you mean that your start-up, if successful, will pretty much run itself? Or that if it hasn't succeeded /yet/, then you will feel obligated to stay and keep working on it?

Comment author: [deleted] 15 September 2012 09:19:47PM *  8 points [-]

I'm a hobbyist computer programmer considering a career in it.

When I was 6, I met a friend who was into star-trek and science and such. We used to talk about science stuff and dig up "dinosaurs" and attempt to build spaceships. I think a lot of my intellectual personality came from being socialized by him. The rest came from my dad, who used to teach me things about electricity and physics and microeconomics (expected value and whatnot).

I learned to program when someone introduced it to me and I realized I could make video games. (I was 18) I absorbed a lot of knowledge quickly, and didn't get much done. I would find some little problem, and then go and absorb all the relevant knowledge I could to get it exactly right. Even tho I didn't accomplish much, now I know a lot about computer science, which is helpful. Having some thing I was trying to do put a powerful drive behind my learning, even if I didn't actually act in a strategic or effective way.

My dad occasonally told me the importance of finishing the last project before beginning the next, but I don't think it properly transferred. I still have lots of trouble shipping.

One thing that bit me a lot was regressing into the deep wizardry tech instead of focusing on the end product. Architecture and tech are a lot more interesting than the mere surface of the product, but what matters is getting the thing done. The tech side is the dark side. Lots of interesting insight on this on prog21.dadgum.com (a blog)

I wish I'd encountered Paul Graham's essays a lot earlier. They have a lot of good advice about programming and growing up in general. I caught a lot of my ambition from there. The wider hacker news community is great too. Really inspiring and helpful community.

Overall (TL;DR:) Teach him to ship. This is important. Start with trivially small things if you have to, but make sure stuff gets to version 0.1 (releasable) at least. Do what you can to encourage friendships with other smart kids who are into science. Find something he's interested in and wants to build, or the rest of it will be directionless. Focus on the creative output, not on the tech. Get him reading interesting and inspiring battle-wisdom like paul graham and prog21. Don't make him hate it.

In response to comment by [deleted] on Open Thread, September 15-30, 2012
Comment author: datadataeverywhere 16 September 2012 03:08:03AM 4 points [-]

Of all my flaws, I currently consider my bias to thought (and study, research, etc.) over action my greatest. I suspect that LessWrong attracts many (a disproportionate number of) such people.

Comment author: siodine 14 September 2012 09:15:14PM *  1 point [-]

Yeah, I can pretty much recall 10k LOC from experience. But it's not just about having written something before, it's about a truly fundamental understanding of what is best in some area of expertise which comes with having written something before (like a GUI framework for example) and improved upon it for years. After doing that, you just know what the architecture should look like, and you just know how to solve all the hard problems already, and you know what to avoid doing, and so really all you're doing is filling in the scaffolding with your hard won experience.

Comment author: datadataeverywhere 15 September 2012 06:44:17AM 2 points [-]

Not too long ago, I lost a week of work and was able to recompose it in the space of an afternoon. It wasn't the same line-for-line, but it was the same design and probably even used the same names for most things, and was roughly 10k LOC. So if I had recent or substantial experience, I can see expecting a 10x speedup in execution. That's pretty specific though; I don't think I have ever had the need to write something that was substantially similar to anything else I'd ever written.

Domain experience is vital, of course. If you have to spend all your time wading through header files to find out what the API is or discover the subtle bugs in your use of it, writing just a small thing will take painfully long. But even where I never have to think about these things I still pause a lot.

One thing that is different is that I make mistakes often enough that I wait for them; working with one of these people, I noticed that he practiced "optimistic coding"; he would compile and test his code, but by feeding it into a background queue. In that particular project, a build took ~10 minutes, and our test suite took another ~10 minutes. He would launch a build / test every couple of minutes, and had a dbus notification if one failed; once, it did, and he had to go back several (less than 10, I think) commits to fix the problem. He remembered exactly where he was, rebased, and moved on. I couldn't even keep up with him finding the bug, much less fixing it.

The people around here who have a million lines of code in production seem to have that skill, of working without the assistance of a compiler or test harness; their code works the first time. Hell, Rob Pike uses ed. He doesn't even need to refer to his code often enough to make it worthwhile to easily see what he's already written (or go back and change things)---for him, that counts as an abnormal occurrence.

Comment author: siodine 14 September 2012 07:26:07PM *  4 points [-]

I've done it, and it's not as impressive as it sounds. It's mostly just reciting from experience and not some savant-like act of intelligence or skill. Take those same masters into an area where they don't have experience and they won't be nearly as fast.

Actually, I think the sequences were largely a recital of experience (a post a day for a year).

Comment author: datadataeverywhere 14 September 2012 08:59:23PM 0 points [-]

I don't know about you, but I can't recall 10k LOC from experience even if I had previously written something before; seeing someone produce that much in the space of three hours is phenomenal, especially when I realize that I probably would have required two or three times as much code to do the same thing on my first attempt. If by "reciting from experience" you mean that they have practiced using the kinds of abstractions they employ many times before, then I agree that they're skilled because of that practice; I still don't think it's a level of mastery that I will ever attain.

Comment author: NancyLebovitz 12 September 2012 01:46:26PM 2 points [-]

I think I'm over it, but back in college (the 70s), I understood most of the linguistic limitations of computers, but I resented having to accomodate the hardware, and I really hated having to declare variables in advance.

To some extent, I was anticipating the future. There's a huge amount of programming these days where you don't have to think about the hardware (I wish I could remember the specific thing that got on my nerves) and I don't think there are modern languages where you have to declare that something is a variable before you use it.

Of course, hating something isn't the same thing as not being able to understand that you need to do it.

Not graduating with a Computer Science degree isn't the same thing as not having a programming gear. What fraction of that 50% get degrees in other fields that require programming? What proportion drop out of college, probably for other reasons? What proportion can program, but hate doing it?

Comment author: datadataeverywhere 12 September 2012 11:33:18PM 1 point [-]

In my opinion, almost all of that 50% (that drop out) could program, to some extent, if sufficiently motivated.

A great deal of Computer Science students (half? more than half?) love programming and hit a wall when they come to the theoretical side of computer science. Many of them force themselves through it, graduate, and become successful programmers. Many switch majors to Information Technology, and for better or for worse will end up doing mostly system administration work for their career. Some switch majors entirely, and become engineers. I actually think we do ourselves a disservice by failing to segment Computer Science from Software Engineering; a distinction made at very few institutions, and when made, often to the detriment of Software Engineers, regrettably.

So to answer your question; of the 50% that drop out, I think most end up as sub-par programmers, but 80% of that 50% "have programming gear", to the extent that such a thing exists.

Comment author: NancyLebovitz 09 September 2012 03:27:34PM *  5 points [-]

My assumption was that people who can't seem to learn to program can't get to the gut-level belief that computers don't use natural language-- computers require types of precision that people don't need.

However, this is only a guess. Would anyone with teaching experience care to post about where the roadblocks seem to be?

Also, does the proportion of people who can't learn to program seem to be dropping?

On the other hand, I did the JavaScript tutorial at Codacademy, and it was fun of a very annoying sort-- enough fun that I was disappointed that there only seemed to be a small amount of it.

However, I didn't seem to be able to focus enough on the examples until I took out the extra lines and curly parentheses-- I was literally losing track of what I was doing as I went from one distant line to another. If I pursue this, I might need to get used to the white space-- I'm sure it's valuable for keeping track of the sections of a program.

My working memory isn't horrendously bad-- I can reliably play dual 3-back, and am occasionally getting to 4-back.

If there are sensory issues making programming difficult for a particular person, this might be hard to distinguish from a general inability.

Comment author: datadataeverywhere 12 September 2012 01:04:02PM 8 points [-]

I've taught courses at various levels, and in introductory courses (where there's no guarantee anyone has seen source code of any form before), I've been again and again horrified by students months into the course who "tell" the computer to do something. For instance, in a C program, they might write a comment to the computer instructing it to remember the value of a variable and print it if it changed. "Wishful" programming, as it were.

In fact, I might describe that as the key difference between the people who clearly would never take another programming course, and those that might---wishful thinking. Some never understood their own code and seemed to write it like monkeys armed with a binary classifier (the compiler & runtime, either running their program, or crashing) banging out Shakespeare. These typically never had a clear idea about what "program state" was; instead of seeing their program as data evolving over time, they saw it as a bunch of characters on the screen, and maybe if the right incantations were put on the screen, the right things would happen when they said Go.

Common errors in this category include: * Infinite loops, because "the loop will obviously be done when it has the value I want". * Uninitialized variables, because "it's obvious what I'm computing, and that you start at X". * Calling functions that don't exist, because, "well, it ought to". * NOT calling functions, because "the function is named PrintWhenDone, it should automatically print when the program is done".

These errors would crop up among a minority of students right up until the class was over. They could be well described by a gut-level belief that computers use natural language; but this only covers 2-6% of students in these courses*, whereas my experience is that less than 50% of students who go into a Computer Science major actually graduate with a Computer Science degree; so I think this is only a small part of what keeps people from programming.

*In three courses, with a roughly 50-person class, there were always 1-3 of these students; I suspect the median is therefore somewhere between 2 and 6%, but perhaps wildly different at another institution and far higher in the general population.

View more: Next