Related
I'm thoroughly intrigued by Scheme, and have started with some toy programming examples, and am reading through Paul Graham's On Lisp.
One thing I haven't been able to find is a book or website intended to teach Scheme to "OO people", i.e. people like myself who've done 99 % of their coding in c++/Java/Python.
I see that closures are sort of object-y, in the sense that they have local state, and offer one or more functions that have access to that state. But I don't want to learn Scheme only to port my existing habits on to it. This is why I'm learning Scheme rather than Common Lisp at the moment; I fear that CLOS might just serve as a crutch to my existing OO habits.
What would be ideal is a book or website that offers case studies of problems solved in both an OO language, and also in Scheme in a Schemey way. I suppose I would most appreciate scientific computing and/or computer graphics problems, but anything would do.
Any pedagogical leads would be much appreciated.
I doubt CLOS would serve as a crutch for old habits, I found it to be pretty different from the OO style in C++/Java/Python, and very interesting. I don't understand all the details, but I would recommend Peter Seibel's Practical Common Lisp. If you are reading On Lisp without much trouble, you should be able to dive into the chapters introducing CLOS in PCL. Also, I'd recommend his Google Tech Talk comparing Java and Common Lisp.
Here's a few more recommendations to make this a more full-fledged answer:
The classic text Structure and Interpretation of Computer Programs covers quite a few examples in chapter 3 of building modular systems using closures (and addresses issues with introducing state and mutability). Chapter 2 includes some generic and data/type-directed programming which could be helpful for motivating study of CLOS. This book really needs no introduction though, it's a towering work, and I've only been reading it slowly since the spring. Highly recommended if you are interested in Scheme.
While SICP is a great book, it's not without its flaws: A really interesting look at these is the essay "The Structure and Interpretation of the Computer Science Curriculum" which elaborates on a few criticism of SICP, and is written by the authors of How to Design Programs (I haven't read HTDP but I hear it's very good). While this essay won't teach you specifically what you are looking for - comparing functional and OO programming - it is really interesting anyway. Their freshman undergraduate course starts with a first semester introduction to functional programming using Scheme (I think, PLT/Racket) and is followed by a semester of OO programming with C++ or Java... at least that's the course they describe in the essay.
These slides from Peter Norvig address some of the design patterns common in OO programming and show why they are missing or unnecessary in dynamic, functional languages like Scheme and Lisp: http://norvig.com/design-patterns/
I cautiously recommend the book by the same authors as the Little Schemer books: A Little Java, A Few Patterns. I can't say for sure if this is a really a good book or not, it was incredibly strange and there are some really bad typesetting decisions (italic, serif, variable-width, superscript doesn't belong in a text on programming), but it might be interesting to take a look at. You can probably find it cheap, anyway. Don't take this recommendation that seriously. I think it would be better to stick to the Scheme texts.
p.s. I have to disagree with one comment stating that functional programming is not as complicated at OO programming, I think that's grossly misstating it. Functional programming in all its breadth is truly mind-boggling. When you go beyond map/filter/reduce and first-class functions, and take a look at other things in the functional realm like lazy evaluation, avoiding side effects and mutation, and the strong, static-typed languages, it gets pretty interesting, and is certainly just as complicated as traditional OO programming. I've only just scratched the surface myself but have discovered a great deal of new ideas. Programming is complicated business, whether OO or functional.
Congrat you, my friend ! Love cs, love functional programming.
If you are python developer it takes 3-4 days to think in scheme
Here is the best simple tutorial I have ever met http://www.shido.info/lisp/idx_scm_e.html
I found this course http://cs.gettysburg.edu/~tneller/cs341/scheme-intro/index.html and it may be useful for you
One beginner's resource that is very helpful and geared very much toward the casual reader is "The Adventures of a Pythonista in Schemeland". It's written (obviously) from the point of view of a Python programmer taking first steps with Scheme. One especially nice thing about it is that it includes an overview of the current implementations and compatibility issues between each scheme implementation, which, unfortunately, can cause some headaches when you're just starting out.
With regards to object systems, these two documents (linked from here) give nice examples of very simple toy implementations using closures that I found helpful in understanding their use in capturing state.
If you are starting off with Scheme, have a look at How to Design Programs. This book presents the "Schemey" approach to problem solving. I don't think there is a book that compares OO and functional solutions to the same programming problems. But there is a nice presentation that shows how dynamic languages like Scheme could provide simple solutions to problems that demand complex design patterns in statically typed OOP languages.
Can you please suggest a book for studying objected oriented approaches and programming.
http://headfirstlabs.com/books/hfooad/
This is the bible of OOP:
http://en.wikipedia.org/wiki/Design_Patterns
You can find a hard copy on the Amazon but if you Google you should be able to find an html version on the net somewhere.
Here are few links I found for supporting your cause. Hope these might help you -
http://oad.humansize.com/
http://www.itmweb.com/essay554.htm
http://cplus.about.com/od/learnc/ss/csharpclasses.htm
The standard work on object oriented design is Larman:
Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development
Can somebody point me to good intruductions into OOP main paradigms, like inheritance, polymorphism, encapsulation? I am looking for short article, about 2-3 pages, for very quick reading.
Thank you very much.
Just google for it http://en.wikipedia.org/wiki/Object-oriented_programming
The definitions from Alan Kay (he invented the term) on c2.com:
http://c2.com/cgi/wiki?AlanKaysDefinitionOfObjectOriented
http://c2.com/cgi/wiki?AlanKayOnMessaging
Which might not be the object-oriented you're looking for.
The big idea is "messaging" - that is what the kernel ...
is all about ... The Japanese have a small word - ma - for "that which
is in between" - perhaps the nearest English equivalent is "interstitial".
The key in making great and growable systems is much more to design how its
modules communicate rather than what their internal properties and
behaviors should be.
A very quickly reading cannot introduce you to the OOP paradigm. It's a very large topic and it's better that you study it with attention because it can determine how your code is structured.
I also suggest you to improve your knowledge of design patterns, when you'll correctly understand OOP.
This is hardly a niche topic. For a C#-angle on it take a look at MSDN's documentation: http://msdn.microsoft.com/en-us/library/ms173109%28v=VS.80%29.aspx
Take a look a the Simple English wiki article on OOP.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
I want to ask you to provide me with some articles (maybe books), which you possibly have found very convincing criticising the OOP methodology.
I have read some in the WWW on this topic and I didn't really find a 'definitive demotivator'.
It's not much about my personal attitude to the OOP, but I really would like to have something constructive, rigorous foundation for any kind of discussion and just abstract thinking.
You can post some original research too, but please be very constructive (as my personal request).
Which version of OOP? Alan Kay's original vision? The bastardized modern form of it that misses the point entirely and thus encumbers us with bizarre access control, member variables, etc? Inheritance-centric? Prototype-based? Compositional OOP?
Each form of OOP has its strengths and its weaknesses; its advocates and its detractors; its domains of utility and its domains of uselessness. There's nothing magical about OOP that makes it the Killer Paradigm and there's nothing infernal about it that makes it the Killer (of Programmers) Paradigm.
I can't really point you to any books or articles that killed my interest in OOP as a Silver Bullet (as opposed to one of many techniques I can use to keep my projects survivable). I can point to the funniest critique of a specific brand of OOP, however: Steve Yegge's classic "Execution in the Kingdom of Nouns".
Rick Hickey's Are We There Yet ? - A Deconstruction of Object Oriented Time was an eye opener for me. It's the most logical OO criticism I have come across.
If you want a criticism of OO programming, here's what I'd recommend:
Learn Smalltalk
Learn Erlang
Learn Scheme
Once you've done that, you will have plenty of criticism of the common interpretation of OO programming.
(Hint: OO was in many ways intended to more closely resemble the Actor model of computation, but the common interpretation of it is effectively a modification of the procedural/structured model)
Problem is - most people don't really know Object-Oriented Programming, so many designs SUCK.
Read the works of Scott Ambler, including his (now pretty old) Building Object Applications That Work. This has been eye-opening for quite a lot of people.
Maybe not quite what you were looking for but have a look at the Jan/Feb issue of IEEE Software magazine: Object-Oriented Analysis: Is It Just Theory?. The basic conclusion is that OOA does not provide a good cost/benefit ratio so is poorly utilized.
Given that OOA is not effectively utililzed or supported in the "real world", I suspect that for larger development projects the overall system architecture, deployed object model and class hiearchy end up being sub-optimal and poorly understood (implemented) by various parts of the development team. A second article in the same journal: Four Trends Leading to Java Runtime Bloat point to some common OOP issues that detract from deploying high-volume Java (OOP) systems. The observations made in this article probably apply to most highly architected OOP applications.
Do not take this as OO bashing, it just reflects that as software practictioners we have quite a bit of work to do toward developing better person-to-person communication mechanisms to convey highly complex and abstracted process models.
When you define a process in natural language. You use sentences where you define the subject who will do an action on one or more objects.
The only fix point is the action, the predicate of the sentence.
I don't think assigning actions to objects is a good idea.
There is only one verb, but can be multiple nouns.
In OOP you can write a file in at least 3 ways:
file.write(data);
or
data.writeToFile(file);
or
OperatingSystem.write(file, data);
Which object should implement the method? You need to think about this too.
While in the procedural way, you probably write
write(file, data);
And the only thing you need to think is the order of the operands which is usally does not matter.
(Well file and data may not be the best example but you probably see the point)
You should really see Mr. B. Jacobs's:
OOP Myths Debunked
(also known as OOP Oversold.)
http://cat-v.org has a great page on Object Oriented Programming.
Most of the page consists of humorous but not terribly informative quotes. However, at the bottom of the page are a number of links to articles challenging OOP. They are:
Bad Engineering Properties of Object-Oriented Languages by Luca Cardelli.
Why OO Sucks by Joe Armstrong
Pitfalls of Object Oriented Programming – By Tony Albrecht of Sony Computer Entertainment Europe, Research & Development Division.
Object-Oriented Considered Harmful by Frans Faase.
Object Oriented Programming Oversold!
I Hate Patterns – By Parand Tony Darugar.
Why arc Isn’t Particularly Object-Oriented – By Paul Graham.
The questions about inheritance in the Java IAQ.
Stop Writing Classes – Great talk about how classes are often used and abused. By Jack Diederich.
If you are interested in alternatives to Object-Oriented Programming:
cat-v.org. From their 'about' page: Cat-v.org hosts a series of sites dedicated to diverse subjects that share an idiosyncratic intellectual perspective, questioning orthodoxy and fomenting elitism and high standards in topics from software design to politics, passing by art and journalism and anything else interesting.
Structure and Interpretation of Computer Programs. Specifically teaches functional programming. Available free online here, for sale here. I cannot recommend this highly enough. It is absolutely revolutionary. It will change the way you think.
Any and all writings/videos/lectures by Rob Pike and Steve Yegge. Of particular interest is Yegge's Whirlwind Languages Tour.
I'd recommend learning a different programming paradigm or reading pro arguments for specific paradigms (http://www.info.ucl.ac.be/~pvr/VanRoyChapter.pdf). Besides OOP, I think the most widely used is the functional paradigm (search f.e. "Why functional programming matters"), but also have a look at the other ones. When you start looking at programming from a different perspective, the flaws of OOP start to appear automatically.
Simple exercise: define the objects IPerson, CMale and CFemale and implement the methods "sex" and "reproduce".
hows about steve yegge's execution in the kingdom of the noun
for java style OO
The Gideon Bible of object-oriented design patterns, aptly named Design Patterns. One of the best software design books I've ever read.
I posted this community wiki in the hopes of creating a thread of expertise. My question is thus ... "Where do the experts go to learn about the newest coding techniques?".
I'm basically looking for the leading/bleeding edge of architecture, design, development and theory.
I know conferences and trade shows are probably the best venues to see the latest and greatest, but for those on a limited budget (of both time and money) such as myself, I'm looking for websites that I can read in the evenings that will keep me current on what's new in the world.
I program mostly in C# but the websites need not be geared towards C#.
Blogs
Martin Fowler, the best starting point I think. (http://martinfowler.com/)
articles like "Consumer-Driven Contracts: A Service Evolution Pattern", "Mocks Aren't Stubs", "Inversion of Control Containers and the Dependency Injection pattern" (http://martinfowler.com/articles.html)
David Hayden (http://www.davidhayden.com/)
Reflective Perspective, a good daily feed (http://blog.cwa.me.uk/tags/morning-brew/)
Ayende (http://ayende.com/Blog/)
Eric Lippert - Works on the language. Sometimes read about new C# features before they're announced elsewhere.
Scott Hanselman
Journals
The Architecture Journal (http://msdn.microsoft.com/en-us/architecture/bb410935.aspx) And what's a great option - you can order free, paper based copies!
MSDN Magazine (http://msdn.microsoft.com/en-us/magazine/default.aspx)
Community
Codeproject.com, short and large articles
pnpguidance.com, tutorials, blogs and articles
Real applications and devteams
pattern&practices home: http://msdn.microsoft.com/en-us/practices/default.aspx, and P&P products
SCSF, the Smart Client Software Factory home. Learn about desktop enterprise systems. (http://msdn.microsoft.com/en-us/library/aa480482.aspx)
WCSF, the Web Client Software Factory home. Learn about busines(process) oriented web architecures. (http://msdn.microsoft.com/en-us/library/bb264518.aspx)
Enterprise Library
For free - I would recommend MSDN, particularly keep an eye on the C# and .NET technology pages. Lots of blogs, and nearly every announcements about what's up and coming is put there.
Serverside.net
The ondemand(previously recorded) webcasts from Microsoft are normally really good, but it's a painful number of clicks to actually get to the point where you can download the file, and sometimes you find that it is not available.
Also sometimes you can find a .NET User Group locally that will have speakers/sessions occasionally. These are also great ways to network and find out what kind of work is going on in your area.
Books, books, books! Good books are written by subject matter expects, involve input from many sources, are peer reviewed, well structured and go orders of magnitude deeper than trade shows, and most online material. When you buy a book, you get the experience of an expert for a very reasonable price.
NDepend documentation comes with two white books and also online blog posts and articles concerning the architecture for large .NET application:
Partitioning code base through .NET assemblies and Visual Studio projects (8 pages)
Defining .NET Components with Namespaces (7 pages)
Control Components Dependencies to gain Clean Architecture
Re-factoring, Re-Structuring and the cost of Levelizing
Evolutionary Design and Acyclic componentization
Layering, the Level metric and the Discourse of Method
Fighting Fabricated Complexity
I never get to go to PDC, but I do love to watch the videos.
As a previous post mentioned the MS PDC videos are on online. Same with Mix which has good MS Web development related content. Also, for general MS videos there is Channel 9, it's not all technical content, but it's worth searching if you are looking for something in particular.
Someone already mentioned blogs, here are a few more:
Scott Hansleman - lots of stuff on there, a lot of ASP, MVC stuff.
Phil Haack - another good MVC guy.
Rob Connery - again a lot of focus on MVC.
ScottGu - according to his blog he "builds a few products for Microsoft", which has to be the understatment of the year - he is in charge of ASP, IIS, SIlverlight and much more besides at MS.
Check out Sharp Architecture, it's very promising.
I've collected several RSS feeds that I regularly to stay up-to-date on .NET and Agile. If you like I can share the list with you. It contains most of the stuff already mentioned here.