Is there an Online Programming Bible? [closed] - java

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 6 years ago.
Improve this question
I'm interested in Programming especially in Java. Is there a page, which explains different informatics topics in Java or generic for all OOP languages? I mean something wikipedia-styled, but more understandable and just for programming/informatics.
Maybe with exercises, but basicly it should explain different problems of informatics.

There are a lot of good online resources for learning Java, and many of them will teach you good OOP practices as well.
The Java Tutorials
Java API Specification
Thinking in Java 4th ed. by Bruce Eckel
The Java Language Specification
The Java Virtual Machine Specification
For programming in general though, I recommend Structure and Interpretation of Computer Programs.

For programming topics on Java, go to the Oracle (Sun) Java site. That's the holy grails of everything regarding Java. For a Wikipedia-style format, just go to wikibooks (as it will have topics on Java and other programming languages, not just OO.)
Other than that, a short answer to your question will be simply NO. Programming is too complex a topic for someone to create the type of material that you are asking.
If you are seriously interested in programming (and I mean seriously), focus on one language alone and learn it (as opposed to looking for the perfect language or trying to analyze all possible alternatives and falling into "paralysis by analysis".)
Again, if you are serious...
just pick one of the following:
C
Python
Ruby
Scala
C would make you face the nitty gritty of computing and people have been successful in learning programming with C as its programming languages (don't let OO and/or Ruby/Python/Java/.NET fanboys tell you otherwise.)
Python and Ruby are extremely beautiful languages that will teach to program, and do not force you to make everything into an object (a really retarded idea, more on that below.) Scala is another elegant and effective alternative.
Learn The Fundamentals of Programming First, the OO Analysis and Modeling (not the other way around
Avoid languages that force you to write everything in objects. That includes Java and C#. I've been working with Java for 12 years now, and it is a reliable platform. But it is a retarded language in that it does not allow you for procedural programming. Not everything is an object nor should be modeled as an object, sometimes not even in complex systems. People are still grappling with how to program correctly using a OO paradigm and they keep failing because they still don't get the capabilities and limitations of OO modeling and analysis.
So my suggestion is not to learn programming with Java (or C#). Go with the hard procedural (C) or the elegant, paradigm-agnostic (Python, Ruby or Scala.) Focus on modularity, structured programming and algorithms. Then, later you will be better equipped to truly understand where OO languages fit in.
I'm not going to delve into why I chose these 4 options or why I advise against Java and C#. That debate has been discussed a plenty and you can find it easily in stackoverflow and/or google. That's just my suggestion, from my experience (Java and otherwise), a suggestion that I always give to those serious about learning programming.
In the end, it doesn't really matter which of those four you pick. Just flip a coin, pick one and stick to it until you are decent with it. Focus on learning proper programming techniques, problem decomposition and algorithms rather than on the language itself.
Good luck.
edit:
I forgot to mention, if you are serious about learning programming, buy books. You won't learn from visiting sites. And you have to put your time in it (we are talking 4hrs a day at least... I don't see anyone learning programming with anything less than that.) Anything less is just make-believe going through the motions of learning.

I strongly recommend imo the best book written about Java.
Effective Java by Joshua Bloch

http://www.programmingpraxis.com could help you a lot since i go through most of the examples from there.Have a look.
EDIT:
http://www.cs.sunysb.edu/~skiena/392/javaprograms/
http://projecteuler.net

Continuing the Bill's recommendation
http://www.artima.com/insidejvm/ed2/jvm.html
Effective Java by Joshua Bloch.

I would recommend these: Sun Tutorials,
FreewareJava.com,
java2s

Related

C++ coming from Java and Objective-C

So, I know both Java and Objective-C quite well, but (perhaps strangely) never really learned C++. Obviously, the languages are all related, but there are syntactical differences that I don't fully understand. Is there a nice document that describes the basics of C++, but still assumes the learner knows a programming language? Perhaps even a tutorial that aims to describe the differences between the languages. This is what I'm looking for.
Also, is there a good tutorial on how to use C++ code inside a Mac or iOS app? The reason I feel the need to learn C++ is I'm trying to port a C++ program, and I heard you can use C++ code and just wrap it in an Obj-C GUI. Could someone point me to some documentation/tutorials on how to do this?
Thanks!
Even though the languages of this family are all related, that does not mean that you can casually move from one to the other and expect to write beautiful code. You have to learn the language's idioms and idiosyncrasies, and experience its strengths and way of thinking.
I would recommend reading Stroustrup's original book (a modern edition, of course). It's the most definitive reference (short of the actual standard) and it is very clearly written. The benefit of this approach is that you will be taught to think "how would I do this in C++", rather than "how do I transliterate this piece of Java code to make it compile". (Also this approach does away with any risk you might have of thinking you should "learn C first". Don't.)
On MacOSX, either download and build the free GCC, or get XCode (which comes with GCC). For iOS I don't know, I have a suspicion that you cannot deploy native code on it.
I would go for a pure C++ route, the quality of the material being the guide rather than finding ObjC+Java->C++ material.
At the university I am working for we have tried both ways for teaching C++ to students with a lot of programming experience, in particular Java experience, for obvious reasons.
The conclusion was that the specialized course did no better in teaching C++ than the generic one with some extra exercise materials. It's the quality of the teaching materials that matters.
Edit: You will probably receive a lot of good answers on the actual differences, also Voo's comment on your question is relevant.
I know what you feel - to have already worked on a couple of languages and learning C++. I was in the same boat too. While I was thinking for a while that it should be easy for me to learn it right away, it wasn't all that easy. So then I went back to the basics and started as a fresher to learn C++. 'C++ Primer' is an extremely good book to start with. Since you know most of the basics of programming, some of the first few chapters can be skimmed through. Once you are through with this, I'd recommend 'Effective C++' book and the C++ FAQs maintained here [http://www.parashift.com/c++-faq-lite/].
In fact, you could go through this FAQ first and see how much of it makes sense, and use that as a guide for figuring out where to do a deep dive.
HTH, K

Where to start if I want to understand how compilers and programming languages are made [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Learning to write a compiler
I know this is a broad question to ask, but where could I start learning how compilers actually work, how programming languages are made, I mean not how you use Java or Ruby but how people actually are making them. I will not try to replicate these languages in any ways but I want to understand the concepts and theory behind it. So what I need is either some directions on what I should search for, or even better and more appriciated are book recommendations.
Regards,
Jonathan Nash.
You might find Lets Build a Compiler by by Jack Crenshaw an interesting introduction.
Kept very simple and focussed on building actual functionality.
Compiler Constrution by Niklaus Wirth is pretty good and available for free from the link I provided (yes, legally). It's a bit old and uses Oberon for the examples but is easy to follow.
Create Your Own Programming Language by Marc-André Cournoyer is available online for USD 40 and consists of an eBook (including exercises and solutions), source code for two example languages (one in Ruby and one in Java) and a screencast on extending the JVM based language. This is probably the most newbie-friendly introduction you can find on the topic and afterwards you should have a pretty good idea about the steps involved (tokenizing, parsing, lexing etc.) and can continue your research with the provided links. It's a bit expensive, but IMHO it's worth it.
While not primarily a learning resource, the CoffeeScript web site has a section called "Annotated Source", which is really helpful in seeing how a programming language works. CoffeeScript's author started working on it after he read the book I mentioned in the previous bullet point btw.
You could take a look at the Dragon Book:
Compilers: Principles, Techniques and Tools by Aho, Lam, Sethi and Ullman
I've greatly enjoyed Language Implementation Patterns and learned a bunch. I wish I had read it before trying to implement a DSL some years ago.

Is there a more modern, OO version of "Let's Build a Compiler"? [closed]

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.
Improve this question
Is there a more modern, maybe object-oriented, equivalent to Jack Crenshaw's "Let's Build a Compiler" series?
A while back I stumbled across "Let's Build a Compiler" and could just not resist writing some code. I wrote a recursive-descent C compiler in C# that output .NET CIL. "Write once, leak everywhere" was my slogan.
Too bad I did not realize until too late that parsing C is a nightmare.
I am now interested in writing a Java compiler in Java that outputs .NET CIL or assemblies with the goal of being self-bootstrapping. I was hoping there might some newer tutorials kicking around.
As an aside, would you spend more time with up-front design or would you just write a ton of tests to support the ability to mercilessly refactor. Thinking back, I am leaning towards the latter. The compiler worked but the code was really awful.
It sounds like you completely missed the point of Crenshaw's tutorials. LBC isn't about writing pretty, clean, or efficient code. It's all about bringing something that's steeped in formal theory down to a level where the casual coder can easily and rapidly hack out a rudimentary (but working!) compiler.
When I read through LBC years back, I rewrote the examples in C#. I'm sure the class layout isn't the best, or tasks segregated properly, but it's comparable to his Pascal. I'd be happy to share the code with you if you like-- let me know and I can post it online and share the link.
In my spare time I've been hacking out some writing with the aim of unifying the philosophies of LBC and Basics of Compiler Design together-- walkling away with practical, working code at the end of each unit/chapter, with also discuss some theoretical stuff after exploring the ideas so the reader understands why things are the way they are. But it took Crenshaw years to write his incomplete series, so mine my be a pipe dream... and I use C (exactly because it's not C++ or Java).
Take a look at Terence Parr's "Language Implementation Patterns". He wrote ANTLR - a parser generator for Java - so knows his stuff. It explains the principles of compiler design really well and builds up gradually.
Martin Fowler's "Domain Specific Languages" is also good. It has a slightly different agenda than being a pure compilers course, but is a good reference on the key concepts of language design.
I'm a fan of "MiniJava" and associated work based on the "Modern Compiler Implementation in Java" family of books. This doesn't quite meet all the requirements you mention as a MiniJava implementation will, generally, generate native code - but the backend can easily be changed to emit MSIL or whatever.
I have recently built a compiler at my company using BNFC, at first I was instructed to use Flex and Bison (C/C++) but I found them to be a pain so I used BNFC to generate the Flex and Bison files.
Can't say I liked the code, my grammar was pretty big and so was the generated visitor but nothing I couldn't handle, I TDDed from the beginning so I always had enough tests to refactor and but I also kept a UML diagram to help me think about the additional classes I wrote.
There actually is a book called Implementing Programming Languages self described as "a self-study book, and to some extent, a manual to the BNFC tool" had I read it I would probably have struggled less with implementation decisions but overall I found BNFC to be intuitive enough to be able to use it by only reading the manual and the tutorial
Last but not least, it can also be used with other languages including Java (with Cup and JLex)
Have you taken a look at the PyPy project? It is a Python implementation of the Python language. Maybe it can provide some inspiration for your goal of self-bootstrapping Java?
What about Writing Compilers and Interpreters: A Software Engineering Approach by Ronald Mak?
When thinking of learning this stuff, you should have a look at book language-implementation-patterns and antlr-reference
If you like to learn by example, the code for Finch, a little programming language of mine:
Is written in object-oriented C++.
Is very clean.
Includes a bytecode compiler.
How about Watt & Brown's Programming Language Processors in Java. It demonstrates what OO patterns to use in (simple) compiler design. I used it with C# successfully.

Open source managed programming languages [closed]

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 7 years ago.
Improve this question
Are there any good, portable, open-source, high-level, statically-typed, imperative, object-oriented, garbage collected, safe languages/runtimes with reasonable performance besides Mono and Java? Mono is nice, but it is a Microsoft technology, and I'm kind of afraid of using it (I'm not sure how rational this fear is). The problem with Java is that it is just too simple (no unsigned data types, no structs, etc.).
Mono isn't a Microsoft technology. .NET is, but Mono isn't - Mono is an open-source implementation of the ECMA-334 and ECMA-335 international standards. Yes, they originated from Microsoft, but Mono itself is not Microsoft technology.
Not that Mono is a language, of course - C# is the language. But then languages aren't really open-source or not - implementations are.
It does sound like you've probably got an irrational fear of C# - and likewise of Java. There are certainly things I'd like to see in Java (and I significantly prefer C#), but it's still perfectly possible to write very significant applications in it.
I'd like to point out Vala, which is a language based on the syntax of C#, but which targets a C compiler (similar to Eiffel) and a lightweight, self-hosted runtime. It lacks garbace collection, though.
Eiffel fulfills all your requirements
On the CLR, there is Boo.
Boo is a new object oriented
statically typed programming language
for the Common Language Infrastructure
with a python inspired syntax and a
special focus on language and compiler
extensibility
The Boo Manifesto is a good starting point.
C++ with a garbage collector? Though you issues with Java are not all that much of a show stopper (unless you can detail why you need those things, on the face of it those arguments are usually not very sound, but sometimes they are).
Well, having no unsigned data type in java is rarely considered as a problem.
But what about Lisp - it was the language to introduce garbage collection, and probably the most powerful language at all.
Check the performance comparison by Peter Norvig (the google's research director). You might be surprised that Lisp beats even C++ in some areas and Java in all.
However Lisp seems not to be a main stream language - I'm wondering why's that?
Because it is kind of minimalistic - it probably could not be beaten in power by any current or future language to come.
(I guess what makes C# or Java so popular is not just the language but the libraries.)
How can you say that java is too simple?
Ok, one of the reasons for developing Java is to make it less complicated than C++ which has a 900+ page of specification. However, it's much more complicated than C.
About 10 years ago I attended a course by Les Hatton and he did research on making your C program safer to use. He argued that almost no-one could remember the 140 pages of C standard, so it would be exceptionally hard to understand something like C++.
Of course, your target may not require safety, but if you do it's something to remember.
scala is less verbose than java and it runs wherever java runs, as it compiles to java bytecode. twitter reimplemented some of their core infrastructure in scala.
There's always Python and Ruby
First of all, Mono is not Microsoft technology.
At second, there are only two serious Virtual Machines (VM) with mentioned features - .Net/Mono and Java. But, setting aside requirement of statically-typed language, you can draw an attention at newcoming Parrot Virtual Machine (Wikipedia article about Parrot).
And, of course, Ruby, Python Erlang, etc. are also crossplatform VM (for single dynamic language)
You may take a look on the D programming language.
But to be honest? I'd suggest to stay away of mono/C#. Why? Many reasons...
Also, for practical puroses take Java or C++.
Java is as good as C# even it is little bit different. C++ is as good as well because 99% of problems of GC are solved using reference counting so...
If you want to learn this in order to be able to be more suited for a job, I suggest you consider either .NET (if you want to go for a Microsoft platform) or Java (if you want to go for platform independence), and do a lot of coding. Both are very large platforms!
Anything else would be niche languages being used in only a few places, which can be very nice but is unlikely to land you a job anywhere but in those few places.

Java Developer looking for a 2nd'ary language to play with [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
What is best language to learn next to Java?
Criteria for this secondary language are:
High potential of being the "next big thing". e.g. If the market for Java open positions hypothetically dies/dwindles, what is the next programming language that will have a bigger market for open positions? Another way to frame this question is: If I own a small company that implements solutions in Java, what is the other language that I should use?
Can produce web applications.
Can produce desktop applications.
Easy and fun to learn.
Wide range of available libraries and frameworks (free or open source) that enhance and speed up your solutions.
Python almost meets all of them, but I don't know about being "the next big thing", but hey, Google uses it, and I think its popularity is raising.
It's a scripting language, btw.
I use it for web applications (using django), and you can definitely create desktop applications with it (although I haven't done that myself).
It is easy and fun! (although this is quite subjective, but it's tons easier and "funner" than Java)
For employability: Any of the .Net languages, probably C#. Then you're well set for most potential customers.
For stretching yourself: something functional (F# to cover .Net too?), or something Lisp, or Smalltalk - was once the next big thing but it probably never will be again, but still a language that changed signficantly my approach to programming in other languages.
If you are expert in java, you will probably really enjoy groovy.
It is backwards compatible with java and has a lot of the nice features of ruby and similar dynamic languages. It also has what is shaping up to be a nice rails-a-like in grails, and a good object-relational mapping framework in GORM.
What is really nice about it is you can mix and match groovy classes and java classes. So if you find yourself forgetting the groovy syntax, you can just drop into Java. And of course you can get at any Java library from it. At the same time you can benefit from groovy's really concise idioms for things like Beans properties.
(By the way it meets all your criteria listed above, too)
Learn a language that will probably not be the Next Big Thing™. Learning a new language usually means learning new concepts (unless you learn one that's very similar to another one you already know).
Learning new concepts has great advantages, no matter which language you program in, so it's a pretty good thing to do.
If you limit yourself to a language that's going to be the Next Big Thing™, then chances are that you'll find a lot of familiar concepts and only relatively few new ones (the IT world is conservative like that).
Learn something that looks interesting to you. Not only will you be able to learn faster, if it's interesting, but you'll also have more fun doing so!
How about Scala or JavaScript? Functional paradigms will stretch your thinking further and will be of benefit whether they are "the next big thing", or not.
Go for a different paradigm : functionnal, lisp, haskell, ocaml, erlang, scala, etc.
If you don't have any religious issues with Microsoft, I would argue for C#.
The only downside I can see is that it's not cross-platform. Otherwise it fits your requirements as far as I can see
Your criteria fairly closely matches Python and Ruby, they both have a growing market base in Web development, and are fully capable of producing desktop applications as well. Whilst they are fairly closely matched, Python has a slightly larger library of re-usable code modules, whilst Ruby's strength leans more to it's well-established frameworks.
As a side-note, You should ensure that you don't stop at 2 languages. Start learning a second one, then pick up a third and even fourth as you progress. Learning new programming languages becomes a more trivial task as the general learning curve evens out.
I must second Gilles here; to learn a different paradigm is very rewarding, and functional programming is [not unlikely to be] the Next Thing.
Erlang is great both in flexibility, ease of use (once you grasp the basic ideas) and - the best of all - it it very well suited for the high parallelism of future and current hardware. It also covers all your five criteria, though it might be more of a "server" language than a "desktop" language.
If you are interested, I suggest the book Programming Erlang by Joe Armstrong.
Personally, I'd go with Ruby and focus on running your Ruby scripts under JRuby. this way you get the expressiveness of Ruby with the JVM running your code. I've seen Rails and Merb running under Glassfish. Might seem odd, but you get all the nice instrumentation of Glassfish with your Ruby code. Things like JMX, RMI, etc. work well with JRuby.
Squeak by Example

Categories

Resources