Domain: norvig.com
Stories and comments across the archive that link to norvig.com.
Comments · 215
-
Re:Coding lesson
Programming is never an easy task. It is like writing most people can learn to program (~3 month for the first language,just like for writing), close to nobody is Marcel Proust. It takes decades to be like Marcel Proust, nearly nobody puts enough effort to reach a proficiency level (10 years).
It is never about having a gift, it is about working harder than everybody else.
-
Teach Yourself Programming in Ten Years
Still completely relevant: http://norvig.com/21-days.html
Also applies to being taught the first few years.There is no silver bullet in coding or any other form of engineering, and even less so in learning it. You need talent, dedication, motivation stemming from the subject (not the potential paycheck) and a lot of time.
-
Re:You can learn to code in a few months
See "Teach Yourself Programming in Ten Years" http://www.norvig.com/21-days....
-
Re:object oriented programming
You have very well indoctrinated in static typing, that's fine.
Let's try an exercise. Look deeply into those "generics" and "templates" and "dynamic casts" and most of those "design patterns"[1] you have to learn. If look deep enough you will be able to see through them and find out that they are solutions to problems caused by static typing, which enable you to escape for static typing and make it more dynamic!
-
Lisp to C
How (and why) would you convert your Lisp code into C
Well that's pretty easy. There are tons of simple Lisp compilers. Heck building a LISP used to be an exercise for many years included (full source) with Microsoft's C compiler.
A few examples:
http://www.buildyourownlisp.co...
http://howtowriteaprogram.blog...
http://sbcl.sourceforge.net/
http://clisp.sourceforge.net/A little off topic but a Lisp in Java by a master of the programming craft which is worth looking at: http://norvig.com/jscheme.html
And finally also off topic but the original LISP in assembly: http://www.softwarepreservatio...In short the way you convert LISP to C is writing a LISP interpreter or compiler.
-
Re:Why they are slow?
Just because some implementations suck doesn't mean that locally stored data should be accessible with higher latency than remotely stored data on principle. That just doesn't make any sense.
-
Yep. It's all BS.
adding that the company is wittingly or not promoting an "unhealthy perspective that programming is an all or nothing endeavor -- that to excel at it, you have to go all in."
Obviously, only complete loonies would support such a preposterous idea as a serious time investment.
-
Re:Powerpoint Gettysburg Address
Wow, it sure does show how PPT can really water down a famous speech. This has me thinking could we have missed monumental speeches but were lost due to powerpoint? Come to think of it, even in modern times I rarely see a president or a governor use presentation slides. It is alway them in front of a podium reading from a teleprompter. Only time I can remember a high level elected official using presentation slides was Gov. Brown in 1970s where he showed pie charts illustrating California state budgets with passing of Prop 13.
-
Powerpoint Gettysburg Address
-
Re:Haskell
So you haven't discovered Haskell yet... No idea who modded you insightful but a more realistic view can be read here: http://norvig.com/21-days.html (currently down). Sadly I know and then have to maintain code written by people who seem to think like you. I really don't get it why this myth is still alive.
I've been maintaining, (Rewriting that is) Java EE code, that was written by people who obviously knew how to code, but they didn't know shit about Java and knew even less Java EE. And quite frankly, they didn't know shit about software architecture either.
-
Haskell
So you haven't discovered Haskell yet... No idea who modded you insightful but a more realistic view can be read here: http://norvig.com/21-days.html (currently down). Sadly I know and then have to maintain code written by people who seem to think like you. I really don't get it why this myth is still alive.
-
Re:Machine specific
-
Re:"Intelligence" is not earned.
-
Re:Cry Me A River
That may be true, but you miss the deeper underlying issue that TFA (the friendly article) is whining about.
They want to be able to be a programming superstar by reading a book such as:
* Learn Programming in 24 Hours!
* Learn Brain Surgery in 24 Hours!
* Learn Rocket Science in 24 Hours!
* Learn To Be A Concert Pianist in 10 EASY Lessons!
Various programming boards are flooded with people who want to know how to break into programming for big bucks, quick, overnight, but don't want to actually do the hard learning. -
Re:Scala
In my experience, Java is significantly faster than Python. You can see Peter Norvig's timings of those languages.
-
Re:Short Sighted
A year? I think http://norvig.com/21-days.html is a very good read.
-
it's been tried, but not extensively
The answer is research is sparse in this area, but the few times it's been tried (using competent programmers in each language rather than conflating learning the language and productivity in it), is LISP and LISP-like languages win when measuring programmer productivity and ability to express complex algorithms in small amounts of code, and C and C++ like languages win for ultimate ability to make the program run fast. But the variability from programmer to programmer in how fast the program runs can exceed the variability between languages so it pays to get high quality programmers who have an intimate understanding of both efficient algorithms and the underlying machine architecture, rather than think "the language will make the program run fast".
-
Re:You asked for thisI absolutely agree that something needs to be done, and I've thought a bit about this but hopefully someone with a PolySci background will give substantive feedback:
What I agree with
- 1) Need a new voting system -- Agree completely there isn't a single best (comparision here). Don't have the background to have a strong preference.
What I disagree with
- 2) Limited campaigning time -- I like that it forces them to not flip flop (it would be too obvious) but I suspect voters would have very shallow information on candidates.http://yro.slashdot.org/story/13/10/11/0043200/cpj-report-the-obama-administration-and-press-freedoms#
- 3) No political advertising, or [with conditions] -- I like Laurence Lessig's idea and haven't heard a better one.
- 4) No political parties -- I actually like this but I don't see how it can be enforced, I think this will happen informally if outlawed.
- 5) Single public forum for candidates -- I dislike centralizing control of where candidates are presented, too vulnerable to corruption.
- 7) State pooled representatives for congress. -- Concerned the representative will be ineffective if they come from an area with very different problems.
Neutral
- 6) No primaries --- I'm not sure how this would be enforced, or if it would really be beneficial, but I'm not sure it wouldn't either. More info please.
What I suggest
- 1) Voting system is a major but not sole part of the solution. -- Corruption and human errors have affected other areas as well. Media has massive biases, both major parties have die-hard supporters, civic engagement isn't part of our culture (beyond voting). We need a whole new voting ecosystem. I don't know how you would accomplish this, it will take many people many decades to change things. I do think the approach of identifying and targeting structural failings (like voting system) rather than individuals is the right approach.
- 2) Change should happen SLOWLY. -- Quick fixes never work this will be no different. Contrast Teach Yourself Programming in Ten Years to any Learn X language in Y days material.
- 3) Strategy 'war of attrition' -- I think attempting to change federal politics directly is a strategic mistake, in order for any structural change to get support you would need many people familiar with it and have proven success. People are justifiably suspicious of any change to the government, bills will be watered down, movements will be co-opted (Tea party). Trying these changes in small towns and cities first before moving to state and federal allows you not only to target areas with more receptive citizenry, and reduce costs, but reduces backlash you might expect from entrenched players on the national level. (Koch brothers care who gets elected president but have no idea who is running in SmallTown Iowa)
- 4) Game Theory 'Watch your step' -- I suspect this comes up a lot in poly sci already and I think would give insights on unexpected effects of any proposed changes Yale released a course to youtube, enjoyable instructor. (Obviously a lecture series isn't enough just trying to spread information)
- 5) Corporations are not democracies. This is a sore area, especially in America, but one I feel is important. The power structure varies from public firms to single owner firms to small groups of investors to significantly employee owned (Boeing or Mondragon) and others your might imagine. Each is simply a different way of running an organization with its own merits and flaws. The fact that we tend more towards top down management and industries with a few major
-
Hmmm, Interesting ...
This site made it clear to me than anywhere else
.. since it had code! Yesss, preciousssssss, code!http://www.norvig.com/beal.html
Python, not perl, but that's okay, close enough. It even had a working algorithm, love it!
Except even a simple toad can see that the numbers are going to get a wee bit big (even if they are all integers). Sure wish I hadn't lost the source to Toad's Infinite Math [tm], hacked back in the 80's. It was in Turbo Pascal, but let you do all the common math things (to include powers and factoring, of course) for integers as big as you had hard drive storage for
.. which was kind of big even then :-)I might just have to reengineer that; it was ever so much fun. And simple too
:-) Then solve (well, disprove) the conjecture, pocket the million, be suitably modest at the Nobel Prize awards ...Toad, mafematakul Toad
-
How about not presenting them in search results?
I'm amazed at how easy it is to find complete PDFs of popular, current textbooks on line by googling. For example, the following search:
Introduction to algorithms Cormen Rivest PDF
gave me two PDFs in the top results on the first page that appear to be illegal, from sites from Czechoslavakia and the Netherlands respectively. Now, it could be that the publisher of that textbook authorized that use, I don't know. But this happens so often that I think Google just takes a blind eye to this kind of thing, even though they have people who should know better.
-
Teach yourself programming in...
-
Re:Easy peasy
brute force != solving a sudoku
You can't brute force a sudoku, it would take about 1450 billion years using a super duper computer using only brute force. But you could use different solving techniques. Quote Peter Norvig:
"First, we could try a brute force approach. Suppose we have a very efficient program that takes only one instruction to evaluate a position, and that we have access to the next-generation computing technology, let's say a 10GHz processor with 1024 cores, and let's say we could afford a million of them, and while we're shopping, let's say we also pick up a time machine and go back 13 billion years to the origin of the universe and start our program running. We can then compute that we'd be almost 1% done with this one puzzle by now." http://norvig.com/sudoku.html
-
Not so hard
The following crappy solver I cobbled together solved it in 33 seconds under Cygwin:
https://github.com/fhstoica/NumbersAndLettersSudokuSolverCheck out Peter Norvig's web site for a very elegant solver and look for the "impossible puzzle" if you really want a difficult one:
http://norvig.com/sudoku.html -
Re:Deniers howling
It certainly is peer reviewed. You can see Peter Norvig's analysis of the research. You're just making shit up.
-
Re:The biggest problem with design patterns...
The biggest problem with design patterns is that they codify repeated constructs.
And, since we are teaching developers that repeating these constructs by rote is "the right thing to do", there is less call to actually push the problem to where it belongs...
The language implementation itself.
If you keep repeating "Factory", "Observer" (whatever), then why wouldn't you want something that can actually represent the concept?
Reducing the concepts into a (hopefully) smaller set should make this more directly implementable. Or, at least provide the building blocks to permit direct Pattern implementation is a library sense. (although, I have not read the book, nor the thesis, just going by the summary here).
But, I agree with you. Cutting edge development must take place in uncharted areas, and the use of patterns is "known space". It should be really known space, though, in that the Patterns must be subsumed (like subroutines and I/O libraries). Stressing about Patterns all the time will be... (or should be) wasteful.
Peter Norvig wrote an interesting article about this:
http://www.norvig.com/design-patterns/
(http://norvig.com/bio.html)
In the article, he shows how 16 of 24 GoF patterns simply disappear, or become considerably less relevant by proper language support.
However, if the programming community at large insists on weaker languages, we may need to take smaller steps, and the book being reviewed may be a useful step in that direction.
-
Re:hard AI
Actually, it's not artificial intelligence. It's cheap computers. Peter Norvig said that people were trying to write programs that would understand language, so they could translate it. It didn't work. At Google, they gave up on trying to understand the language, and figured out how to do it with brute-force algorithms. No need to understand what you're translating. http://www.stonetemple.com/search-algorithms-with-google-director-of-research-peter-norvig/
Most of what you read is nonsense anyway. http://norvig.com/reporters-and-parrots.html
-
Mod parent up!
This is going to sound "ageist" but
... the only advantage young programmers have is that they're willing to work 20 hour days and 7 day weeks for months at a time. And do it for less money.http://norvig.com/21-days.html
So you need about 10,000 hours of working in a field to become an "expert". If you believe that article (and I do). And someone who is an "expert" has, hopefully, seen enough mistakes and errors over those 10,000 hours to be able to head them off when they show up again.
That's what you're paying for when you hire the experienced programmers. The knowledge of what errors people usually make and why they make them.
So you get code with fewer errors and fewer re-writes to take out the errors that never got in in the first place.
-
Re:False Premise
First, I don't accept the premise that the study was flawed. But even if I did, it wouldn't mean there isn't a consensus because there is other evidence to support the claim. For example, take a look at Peter Norvig's essay: The Global Climate Change Consensus: My Experiment. This is exactly the sort of thing that climate change deniers and ID proponents do all the time. They attack evidence that others provide, but don't bother to provide evidence of their own. To support an argument you must provide evidence to support your argument, not just selectively attack arguments against it. Note that without even asking for evidence, the poster provided evidence to attack, attacked it, then made the claim that he proved what I was saying was wrong. The guy can't argue his way out of a paper bag, and yet he got modded by up people with a similar political agenda. Take a look at my sig for my reaction to this kind of thinking.
-
Re:Simple is hard
There's a comment on those "Teach yourself X in Y days" books by Peter Norvig, called "Teach Yourself Programming in Ten Years".
I suspect most of it is relevant to this thing, too.
I've been programming for about 15 years now (most of it on hobby basis) and I still learn new things.
-
Obligatory "you kids get off my lawn"
Peter Norvig's "Teach Yourself To Programming In Ten Years" http://norvig.com/21-days.html
Pretty much sums it up. There have also been many posters so far that have mentioned you can't just "make" someone a programmer. They have to want it, to enjoy it and to already "be" a programmer in mind and spirit. Same goes for the new British thing of forcing gradeschool kids to learn programming. Having it available as an option would be great, but forcing them into it won't give you more programmers, much less good ones. Meanwhile, all the kids that were going to become programmers will still do it whether you encourage them or not. Simple as that.
Surely the "Lean" up above is a typo, but there is a serious problem of late with Slashdotters and their spelling and grammar abilities. People who learned English as a second or third language get a pass, but for all you up and coming kids who are native speakers, what the fuck?
(my two hamfisted cents. I'm going back to Skyrim)
-
Re:My son is 13...
Hopefully in the future, SQL will die the death it so richly deserves. After 40 years, you'd think we'd have come up with something better
... :-)Also, if they want to "discover programming", there's this great tool that they probably already have access to, called, hmmm, wait a minute, it's coming to me
... oh, right, the Internet. And if you google for "learn how to program", the first unsponsored hit gives a realistic perspective teach yourself programming in 10 years.But seriously, if they want to learn how to program, there are already so many opportunities right in front of them - even basic things like a spreadsheet to keep track of their allowance or "cheat" on their homework - are a simple start. No need for any "occasion."
You don't want to come off as "the dork who always gives these awful geek presents". That would have the same negative halo effect as trying to introduce someone to linux by exposing them to an RMS speech and then having RMS sleep on their couch. It's like a previous article where someone wrote about how they gave DVDs with open-source software on them, and wondered why people weren't bowled over by it.
You really don't want to be *that* person. Even *that* person doesn't want to be *that* person.
Gift giving for nieces is simple. When in doubt - give chocolate. Because chocolate never goes out of style. If you've ever tasted some of the more expensive specialty chocolates, you'll know what I mean. Think of the sweatiest, dirtiest, raunchiest, kinkiest sex you ever had - and multiply by two. It's that good.
-
Re:What is the point?
Google provides support?
Seriously, though, what happens when Google patches 700 salesmen's laptops at an inopportune time? According to the documentation,
Customers on the Scheduled Release track gain access to new features on a regular, weekly release schedule following the initial release of those features. This delay allows time for administrators to familiarize themselves with new features using a test domain, educate support staff, and communicate any changes to their users. New features will be released on the Scheduled Release track each Tuesday, with at least a one-week notice following the initial feature launch.
What? Google expects "customers with complex IT environments" to "familiarize themselves with new features using a test domain, educate support staff, and communicate any changes to their users" in a week?
Google clearly has a rather superficial sense of familiarization in mind. Moreover, what sort of users, other than "IT people with nothing more interesting to do," would want to rely on a perfectly satisfactory tool to change on a weekly basis? Is it conceivable that Google's idea of "customer satistfaction" is akin to "boiling a frog"?
Perhaps Google Apps' target market is people who want an excuse to avoid taking the time to learn how to use their tools and companies who want an excuse to avoid training?
-
Shouldn't it be given some more time?
Peter Norvig questions "Why is everyone in such a rush?" and he suggests "Teach Yourself Programming in Ten Years" here http://norvig.com/21-days.html
-
Re:Climate Change Deniers
The observation that would not fit the prediction would be little or no warming. The falsifiable hypothesis is that an increase in carbon dioxide in the atmosphere causes warming. There are literally hundreds of published scientific papers you can read about the topic. It's been a very active area of research for decades. I'll point you to just one short summary of the research results.
-
Re:Middle East
No one is proposing changing "all human behavior" and the basis is solid scientific research. We're proposing reducing carbon dioxide emissions by developing technology for producing energy with lower carbon dioxide emissions and by using technology to improve energy efficiency. All the research points to the conclusion that Human activities
... are modifying the concentration of atmospheric constituents ... that absorb or scatter radiant energy. Most of the observed warming over the last 50 years is likely to have been due to the increase in greenhouse gas concentrations. You seem to be of the camp that believes if you keep repeating something often enough, people will believe it. You are probably right, in that people like you have convinced some people that AGW is a big hoax designed to control us. If that's true, surely you could produce some small smidgen of evidence to support your claim. -
Re:Misrepresenting Anthony Watts...
There is only one conclusion supported by the science. Human activities
... are modifying the concentration of atmospheric constituents ... that absorb or scatter radiant energy. Most of the observed warming over the last 50 years is likely to have been due to the increase in greenhouse gas concentrations. It's not a he said - she said argument. The science has reached only one conclusion. I know the media likes to pretend there are two equal sides to the argument, but as far as I can tell there's no science that concludes the warming is due to some other cause. You can point me to some if you know of any. -
Re:The universe is infinite
You can certainly be skeptical, but I see hardly anyone who is genuinely skeptical about AGW. I see lots of people who simply refuse to believe it, no matter what evidence is presented. They even argue that the evidence is all wrong. It reminds me of ID proponents who argue that all hominid fossils are fakes. As to your claim that much less work has been done on AGW, I should again point out that the hypothesis is over 100 years old, and all our observations and research are in agreement with the hypothesis. If you have some actual evidence that disagrees with AGW or a better hypothesis than AGW that explains the warming, let's have it. I have yet to see it. Don't throw a fit and say "You're not letting me be skeptical! Waaaa!" You sound like a baby. Present your argument. I have never seen a good one that suggests AGW isn't happening, but maybe you have something new.
-
Re:Keep up or shut up
I'm sorry about your dad, and I'm glad you're getting your zest for life back. And I totally agree that having interests away from computers is vital to living a happy, balanced life.
The "one new language a year" pretty much is just an arbitrary rule, but it's pretty common advice. It's turned up in _The Pragmatic Programmer_, Scott Hanselman practices it (http://www.hanselman.com/blog/ProgrammerIntentOrWhatYoureNotGettingAboutRubyAndWhyItsTheTits.aspx), http://norvig.com/21-days.html recommends learning 6 different languages that support different paradigms in 10 years. Eric S. Raymond points to the Norvig essay in the "Learn how to program" section of http://www.catb.org/~esr/faqs/hacker-howto.html. He also mentions that, after you've learned a few, you should be able to learn a new one in just a few days.
OTOH, there's probably a point of diminishing returns, where the only way you're really going to get any better is by stepping away from the computer and getting interested in other things: http://www.codinghorror.com/blog/2007/01/how-to-become-a-better-programmer-by-not-programming.html
Like I said, it's just a general observation, and it wasn't meant to be anything personal at all.
-
Re:Sudoku porn
The language doesn't really matter. Have a look at Peter Norvig's sudoku solver for a very elegant, small, and really fast implementation in python.
-
Re:Welcome, young grasshopper.
Why, yes, yes it is a large amount of time. But reasonable for the proposed contributing of useful things to something with as high standards as boost has. Perhaps a bit conservative, in fact.
Note that spending the time writing patches for other projects is a good idea indeed. The message is about gaining experience instead of trying to overreach without that, very necessairy, experience. It is empathically not about discouraging contribution in the general sense. Gaining experience was the point in the first place. That and picking the right place to do it.
In short: Boost is not a place where beginners can meaningfully contribute code. Pick another place, almost any other place. There are plenty.
Also, learn more languages. That is almost as imperative for the serious programmer. Perhaps especially so for open source programmers.
As for your doubt I offer this bit of wisdom. I didn't write it, but I do agree with it.
-
Re:If you're bothered by skepticism, it ain't scie
There's a mountain of evidence that increased concentrations of greenhouse gasses are causing the warming. The warming was predicted nearly 100 years before it happened. Now you're saying that because there's no other explanation for the warming it means we've all just been guessing all along, and there really isn't any evidence at all?
-
Re:Transparency rules for thee but not for me
The research is open for all to see. It has been subjected to unprecedented scrutiny, and yet no one can find that the scientific conclusions are unwarranted. Quite the opposite -- no matter how much the IPCC report and the CLU climate researchers are studied, no one can find fault with the science. As far as I can tell, not one scientific paper has been published that concludes that AGW is not happening. Saying that a judge denying a subpoena on the basis that no fraud was involved means there's a "liberal agenda" is grasping at straws.
-
Re:If you're bothered by skepticism, it ain't scie
I don't see anyone denying that an alternative explanation is possible. Climatologists make the statement that the observed warming is most likely due to increased concentration of greenhouse gasses in the atmosphere. In that statement is the very admission of an alternative explanation, otherwise they would say that they are 100% sure that the warming is due mostly to increased greenhouse gasses. If you have some evidence that something else is causing most of the warming, please don't keep it a secret!
-
practice
Once a day for five days for a year they should practice with the programming language of their choice.
There is no magic bullet, you're not going to learn Java or Python in 20 days with those dunderheaded, oversized volumes.
Just work at it and you'll get better.
-
Re:Easier for denialistsWe aren't blaming only humans. But the consensus is that humans are responsible for most of the warming of the last 50 years.
This conclusion is endorsed by the National Academy of Sciences, The American Meteorological Society, the American Geophysical Union and its parent organization, the American Institute of Physics, the national science academies of the G8 nations, Brazil, China, and India. and the American Association for the Advancement of Science.
-
Gettysburg Presentation
A classic: The Gettysburg Powerpoint Presentation.
-
Re:typical military response
What cherrypicking are you talking about? There is a consensus on AGW, with most climate studies showing AGW is happening and none showing AGW is not. That's why 97% of active climatologists agree that AGW is happening. I'm sure some climatology studies have been debunked -- there are several studies in physics that have been debunked in recent years, yet strangely I haven't heard anyone saying that physicists shouldn't be taken seriously.
-
Great article on similar topic by Peter Norvig
Warning Signs in Experimental Design and Interpretation
http://norvig.com/experiment-design.html
He does an excellent job of describing and illustrating common research mistakes, statistical and otherwise.
-
Re:Science or Religion?
I honestly don't care who believes and who doesn't believe. The more important fact is that peer-reviewed papers consistently come to the conclusion that AGW is happening. I have yet to see a peer-reviewed paper that comes to the conclusion that AGW is not happening. If there were evidence that AGW were not happening, I would think someone would think it important enough to write up a paper about it. Do they all just write blogs and make YouTube videos and never think to write a paper?
-
Teach yourself anything (well) in 10 years
Whenever I see titles like these ( Teach yourself X in ZY [days|hours|minutes|seconds] ) I always think of this article http://www.norvig.com/21-days.html