As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have some experience with python, I asked for a new language, and said that i am having a hard time implementing what I have learned. they suggested I learn SICP. Saying it uses a great language and teaches great programming fundamentals.
But I notice it was published in 1984. Do you guys recommend it, or have I been trolled? :p
Thanks.
Yes, SICP is still a great book! The second edition, which is available online, as of 1996. Although, if you just want to learn Scheme instead of fundamental computer science, you might be better off with Teach Yourself Scheme in Fixnum Days.
I strongly encourage you to check out the book How to Design Programs. It focuses on the fundamentals of programming, not on the specific language, but it also uses Scheme as its language. It's also available free online.
You can also check out the current release of the second edition, which is in preparation (or the less-stable but more up-to-date current draft).
Firstly, you're loooking at the first edition. The second edition is from 1996.
You should VERY MUCH tackle the book. I've gone through about half and my mind is blown. I can't begin to explain how amazing it is. Not only will you develop an appreciation for elegance in programming, but you'll see the line blurred between coding and computer science.
Don't approach this book like a programming book. Approach it as if you want to learn the fundamentals of computation and computer science using programming as a means of expression.
SICP is one of the best books I've read for learning how to write programs well. I never used scheme outside of the work I did in that book, but it's well worth your time.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I've been programming for the last 6 years. I just recently started my first degree in computer science. My work seems to be constantly marked down for different reasons, amongst many of them:
Uncommented code
Writing too long identifier names and methods
Writing too many methods
After working as a programmer for six years for numerous startup companies, and absorbing best practices which include the requirement to write "self explanatory code" I find it very difficult to go back to bad practices.
What can I do?
Self documented code is not synonymous with comments.
I've argued with many senior devs around this point. Code can go a long way in communicating intent but there are some things which simply cannot (and should not) be documented through code.
For example if you have a highly optimised function/method or chunk of code which is heavily coupled to the underlying problem domain and requires very specific knowledge of the business or solution. Comments are needed in these scenarios.
Yes, yes, comments come with there fair share of problems but this doesn't mean they aren't helpful (or mandatory in certain cases).
I can't tell you how many times I've read a colleagues line of code and thought "what the hell?!?" only for them to explain that they needed to do that due to some quirk of some library or browser we were targeting etc.
Comments are a mechanism for a developer to justify a design decision.
As for your other problems, they are subjective. How long is too long? How many is too many?
Point them at Microsoft's guidelines if you are on the MS stack or there will be countless articles for whichever language you're using...
Hope that helps.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I need to do a project for class in Prolog but they gave us no guidance at all in the language it self. I was reading http://kti.mff.cuni.cz/~bartak/prolog/contents.html but I am not understanding anything of what I am reading.
Any better sources out there you can share?
Bratko's "Prolog Programming for AI" is excellent, clear, lively, accessible. Sterling and Shapiro's "The Art of Prolog" is very good too, very thorough with the basic/foundational stuff.
Bratko was the one were it "clicked" for me. I took this slogan from him (don't remember if he wrote it or if I distilled it from his book somehow) - in Prolog, to understand the question is to have your answer. Writing down the question properly gives you a runnable program, more or less. I remember reading a page on AVL trees where he wrote down the definition, and I turned the page expecting to see the "solution". But it was already about something else. Turning the page back I realized, that the statement of what AVL trees were, was already the program itself.
Many moons ago, I liked the book Programming in Prolog by William F. Clocksin & Christopher S. Mellish. It also helps to work through exercises and see how the language works. You can work through some problems from this site Werner Hett's P-99: Ninety-Nine Prolog Problems and here SWI Prolog is a good implementation to use.
I like Adventures in Prolog, but learning a logic language on your own can be very hard. You really can learn much faster and more correctly with a mentor or taking a college course.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I've been trying to read and understand the contents of this book: http://www.amazon.com/Introduction-Algorithms-Thomas-H-Cormen/dp/0262033844
But I'm finding the contents to be challenging purely because I don't understand the mathematical or pseudo code notation. Are there any resources or books I should read / study in order to help me understand the content? I think I'm looking for the missing mathematical link in my life. I need something to bridge the gap between school and college level.
Thanks
Chris
Maybe go for a book where the examples are given in a specific language rather than pseudo-code. e.g. Algorithms in C++ by Sedgewick is a grand book if you know C++. Many of the older books tend to use Pascal like pseudo code, where Pascal isn't as common as it once was.
Being able run the code under a debugger, single stepped watching variables change, is also a great aid to understanding how the algorithm works.
Be sure to read the first sections and the appendix at the end of the book, which has some mathematical background explained.
A good, not easy, but suitable for high school student, introduction to mathematics used in computer science is Concrete Mathematics, by Knuth, Graham & Patashnik.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I'm preparing for an exam concerning languages, grammars, parsing and compilers. It's not really my cup of tea and most resources I find use the language of mathematics to define the different terms of the trade and explain the different concepts I need to know rather than stick with English or French, which I would very much prefer. Therefore, I'm having some trouble both with finding the motivation to continue studying and with simply understanding the theory.
So here is my question: Do any of you know where I could find a "fun" way of learning all this? Or at the very least, maybe a more "concrete" and less "mathematical" way of handling this subject.
I need to cover the following so anything on these subjects is welcome!
Parsing (LR, LL, ...)
Grammars (Context-free, deterministic, ...)
Syntax analysis Static flow analysis
Impact analysis concerning software maintenance and dependency to user interfaces
Dynamic analysis
Here are some resources which could be considered "fun" (with an emphasis on the quotation marks) ways to learn about a technical subject, just to get a sense of what I'm looking for.
Why's Poignant Guide to Ruby
Try MongoDB (type Help +
Enter)
If you want to learn a lot in a short time, go learn about meta compilers from Val Schorre's 1964 (yes, you read it right) Meta II paper on how to build self-compiling metacompilers. As a freebie, they can compile conventional lanuages, too! The paper is 10 pages, describes meta compilers (as a virtual machine beleive it or not), and contains two complete compilers.
There's a mind-blowing moment you eventually arrive at when you grok how the compiler can compile itself... I learned compilers this way back in the early 70s and it is the most memorable compiler lesson I ever had. This is fun.
There is an online tutorial here which implements all the ideas in JavaScript..
The author of the tutorial is Dr. James Neighbors, the guy who invented the term "domain analysis". He used the MetaII ideas for a spectacular domain-specific code generator named Draco. Draco was a key inspiration to compiler-like tools I've been building for the last 30 years.
How long do you have to prepare? The "best" way to learn compilers is to dig into them and the best way to do that is to use the best book on compilers EVER WRITTEN: The Dragon Book It's old, but awesome. It's not cheap but it is, quite possibly, the most concrete and least mathematical way to learn about the magical compiler.
It doesn't have any flashing lights and it won't be in an awesome font like the Ruby guide, but it's in the top 10 Books Every Programmer Should Read
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I will be teaching only one lecture on basic Prolog to students with little to no experience in programming. I'd like them to see that programming and Prolog can be used in the real world, perhaps even to do cool things.
I have looked at this and this threads, but I cannot find anything that is visually appealing that I can show them when we wrap up the lecture.
Do you have any suggestions for cool applications that use Prolog? I'm especially looking for something that can be shown as a video or slideshow.
If what you want is to highlight the uses of prolog and use audio-visual media merely for presentation purposes, combining the following 2 links might do it:
Natural language processing with prolog in the IBM Watson system
IBM's Watson supercomputer destroys all humans in Jeopardy
Dynalearn is implemented in Prolog and has animations.
See:
http://personnel.univ-reunion.fr/fred/Enseignement/Prolog/index.html
under "La librairie clpfd", there are links to 3 finite domain constraint animations (N-Queens, Sudoku, Knight Tour) that are used in this class.
InFlow is written in Prolog. You may browse through the examples and / or contact the author for details. VisiRule might also help.
Disclaimer: I have not used either InFlow or VisiRule, but I do use WIN-Prolog which is the environment used for both programs.
+1 for Visirule. It is, as far as I can tell (and I've researched this topic quite a lot) a unique visual programming tool (I don't know of any other visual tool that is easily reduced to a turing-complete language). I have implemented a trouble-shooting website with it along with various other solutions. Highly recommended- version 5 coming out soon too.