Clojure presentation for beginners? - java

I need to make a presentation for beginners about the Clojure language. What are your suggestions on selecting topics on it? What are the points I need to include?
Note: By beginners, I mean that they are experienced in other programming paradigms, but not in the functional programming model.

I personally think this presentation is a great introduction to Clojure:
Clojure:Functional Concurrency for the JVM - Howard M. Lewis Ship
And obviously any presentation by Rich Hickey himself, for example
Clojure: A dynamic programming language for the JVM

You've got to think about your target audience. I'm going to make an assumption that they probably know Java.
The best authority on Clojure is the source himself, Rich Hickey. He's written an introduction to Clojure for Java Programmers.
Slides are here.
Him giving the presentation with audio is here and part2 is here.

If need, you can take my presentation about Clojure - PDF is freely available...

I found this blog entry yesterday -- impressive how easy is to make Clojure programs parallel (pmap in place of map :D ). Sadly, on my PC it didn't run on multiple cores but I haven't investigated it yet.
Use examples from books like Joy of Clojure -- they are very idiomatic and well designed. In this book there are also reasons on design of language and -- what is most important to you -- why functions+immutability is better for multithreaded programming than procedures+OO mutability.
Yes, I think parallelism is important to tell. But also -- in my opinion -- it is always crucial to convince non-lisp-listeners that The Parentheses Hell is not a hell but blessing ;) Tell about Beating the Averages and why Lisps are the most powerful languages in the world.
Try not to teach them a language but show why to learn it.
Oh, and prepare that someone in the audience will ask "why no for loop" or "why no constants" or "how come immutability doesn't lead to performance problems".

I would demonstrate the basics of the language by firing up a REPL and running through a bunch of basic language features, slowly building up to something more interesting.
This Clojure quick tutorial gist may give you some ideas.

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.

What Visual C++ references are worth a look for a Java programmer looking to get up to speed?

I have a lot of experience with Java/OO. There are tons of C++ tutorials/references out there, but I was wondering if there are a few key ones that a Java programmer might find useful when making the transition.
I will be moving from server-side J2EE to Windows Visual C++ desktop programming.
I have googled and found tons of resources, but am overwhelmed and don't know where to best spend my time. I have only a few days to get a good start.
Is Visual Studio Express / Microsoft Visual C++ the best IDE for me to start with?
Also, any words of wisdom from others who know and work with both languages?
The widely recommended books here are Scott Meyers Effective series. "Effective C++", "More Effective C++" and "Effective STL".
I would also recommend the C++ FAQ Lite and The C++ Programming Language.
I have been in these shoes before and I constantly find myself referring to two sources:
The first is C plus plus reference
Here you will find the basic standard C and C++ libraries that you will always need. They are the bread and butter.
The second is Microsoft's Visual Studio Development Center.
Here you'll find the linker error support for Visual Studio and their built in libraries.
Don't forget to give Visual Assist a try! Quite often intellisense breaks in VS2005 if your doing some serious business, though I can't speak for newer versions.
Good luck!
Visual C++ is a good way to go, you can get the express version for free from here
As far as books It really depends what you want to do. I like the Horton book as far as learning Visual C++, GUI, CLR and Database programming. The Lippman book is a very good tutorial on C++, but it only covers the basic language, which is large.
This will get you going with basic
constructs.(Lippman)
This will get you going with Visual
C++.(Horton)
Once you get past the basics then look at the Meyers books, as stated in other answers.
Effective C++: 55 Specific Ways to Improve Your Programs and Designs (3rd Edition)
There are a couple of others from this author, they are real good but have not been updated in a long time.
A real good online C++ FAQ is here.
If you put a comment stating what you plan to do with C++, we could give you narrower guidance to point you in the direction you want to go in
If to choose only one book for high-quality development - Scott Meyers "Effective C++". Because there are some quirks in C++, and you will definitely hit them without this (or few similar) book. Also reading it is a pleasure (hence you can read it fast), because of a mix of humor and easy to understand insightful points.
But it's not a tutorial though.
I haven't ever tried "fast" tutorial, but here is pretty good looking tutorial. I think it's perfect for experienced programmer - short articles explaining distinct language features with some examples and comments

Going from PHP to C/C++ & Java & beyond

I've been a LAMP developer for 5+ years. I have learned quite a bit on my own, but I feel like my "context" as a software developer is limited (ie. I can only create scripts & web applications). Ultimately I'd like to be able to create a range of applications from daemons to desktop apps. Additionally I'd like to learn more about the "internals" of programming (ie. PHP is a wrapper for c, perhaps I should learn more c?)
I'd like to know what resources & methods that have helped people further their knowledge of computer science / software creation. Unfortunately I don't think I'll be able to go back to school and get another degree :-P
If you want to jump in with both feet, there's MIT's Open Courseware. For example, here's the online version of the famous course "6.001 Structure and Interpretation of Computer Programs".
To take smaller steps, I'd suggest learning other programming languages that are complementary to PHP, like Python or Ruby. Maybe eventually Java. The more languages you learn, the easier it becomes to learn even more languages, or to deepen the knowledge you have of the languages you already know.
I would really recommend Stroustrup's excellent book to learn modern C++ :)
I don't recommend that you directly move to the MIT course ware and SICP. Start from some basics. Read the "C Programming Language" by Brian Kernighan and Dennis Ritchie. Write some C extensions to PHP. After you are comfortable with C move on to C++ (Read "The C++ Programming Language" by Bjarne Stroustrup) or Java (tons of documentation and tutorial are available at http://java.sun.com/). Note that the books you choose are important. While learning a new language, a book written by it's creator should be preferred, as it will show you the right idioms, which is very important. Then move on to learn about new paradigms, like functional programming. At this point I think SICP will be a good choice. Learn one or more functional languages - Lisp/Scheme, Clojure, Haskell etc.
Make it a point that you never stop learning!
Pick a language, then seek out resources for learning it.
The one thing I'd suggest is to treat C, C++ and Java as sibling languages. Don't think "If I start with C, I can proceed to C++ and then to Java" or similar. Each of them can and should be learned independently of the others.
Java is often said to be inspired by C++, which any C++ programmer can see is clear nonsense. It is inspired by the earliest versions of C++, the ones that had more in common with C. And likewise, C and C++ have little in common as well. Good C code is almost guaranteed to be horrible C++ code.
All three languages are worth learning, and all of them will probably teach you a lot about programming. So pick one, and buy a good book on it.
Have a look over at Stanford's online courses it is a great place to start programming in more complex languages.
the site has both java and c++ courses online and much more.
When i started to learn PHP i found this really good site http://tizag.com
It kept all the stuff i needed to learn basic.. When any complex programming was required i looked else where, However without tizag being my cheat sheet for web bassed languages i would have been lost;
My cheat sheet for C++ was http://cplusplus.com/doc/tutorial/
Its basic stuff, with very clear explination. However i do recomand you try coding the examples rather than just read over it.
Practice Makes Perfect (Speaking of Which gota beat Suzuka in GT5 Proluge in under 1:33:487)
Get a job as a starting C++ developer. A bit of fiddling around at home isn't going to do much good, except for getting your foot in the door at an interview. To get to that level, anything is good - Accelerated C++ being a good book, or The C++ Programming Language (quite hard to learn the basics from, but if you're proficient in other languages its doable).
Everyone here made great recommendations, here are my two cents to the lot. You can learn language internals, there is no dearth of them. There is so much to learn about them that you can go on for years. I suggest you read Art of Programming by Donald Knuth, it was a great experience for me and I don't know why it is not a standard textbook in our universities.
Programming is an art indeed and it's the only art I know.

Which sector of software industry uses C++? [closed]

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 11 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.
Like most people, I learnt C++ after C. I learnt C++ because it was one of those languages which fetched jobs. I am still studying (doing masters) though. One of my cousins has been working as a developer for around 12 years.
He advises me to learn Java so that I can land up in a good job. He says only few sectors like tele communications use C++ and almost all the enterprise software is developed in Java. I am working as a student technician in my university. The job involves Windows programming in C++. I learnt core Java. I do not know any of those Struts, Hibernate or whatever is out there.
To be on the safer side, I am planning to master both. But I think Java is an ocean, though it's easier to program in Java than C++ (this is my opinion. C++ lovers don't kill me).
What do you geeks and professionals out there advise me. Do you think I should learn both of them. Which sectors of the software industry use C++?
Best advice I ever got as an undergraduate was from my languages professor, who told me (paraphrasing here): "Don't memorize languages; don't marry yourself to a language. They're just tools. They all do the same basic things. Instead of learning a specific language, learn the foundations of good software development. Then you'll be able to take any language and be successful with it."
I feared learning new languages before he told me that. Afterwords, I took his advice to heart and it's made all the difference. Languages are just tools in your toolbox. If you can program and write good software in one language, you can do it in another.
C++ is still used extensively for performance intensive tasks. For example, I do a lot of work with video compression and decompression - it's all C++. Partly because we need the performance, and partly because all the 3rd party libraries which need to use are C++ so it's easier to integrate with them if we're using the same language.
A brief off-the-top-of-my-head listing of projects that use C++:
Device driver development
Games
Advanced engines (audio, image processing, etc)
Telecom
Embedded software (devices and such)
C++ is not even close to being dead.
My experience:
Bloomberg, Reuters, and all their bank/trading clients who want low latency market data feeds use C++. (Fidelity, JPMorgan, BNP, Citibank, etc.)
The defense industry uses C++. (among other languages - Java is also popular)
These industries also use java and other languages, but C++ is hard to beat. Note also that there is a HUGE existing C++ code base that will take a long time to go away (if ever)
It is not hard to know and use them both. Don't worry too much about a particular language. That is not the real crux of developing software.
Some site calling itself Google reckons it uses C++ extensively. Thank God they don't need performance to index the few websites out there.
If this Interweb thingy takes off, they'll be in real trouble though. (-:
Seriously though, apart from the current change of channel (reversion?) to C and Perl, the previous four projects were all C++.
a large scale departure control system for several of the world's major airlines (30,000 10MB log files per day)
a flight training simulator and ground based software proving platform for a new military aircraft
a large scale framework for an existing air-traffic control simulator that was used to incorporate the new Aeronautical Telecommunications Network (ATN)
an advanced radar processing and display system for an on-route air traffic control centre
All really interesing.
Video games still use C++. One example that comes to mind is the Torque engine which can be used for iphone and xbox game development.
C++ is not anywhere close to being dead, and as suggested by others, don't marry yourself to a language.
If you're learning C++ in terms of job prospects, I'd rather suggest you pick up a representative of a programming paradigm.
C - Imperative programming
C++/Java/Obj-C - OOP
Lisp/Haskell/Scheme - Functional Programming
Getting adjusted to the paradigms is usually harder than picking up the language itself. Hope others would chime in for other suggestions.
Many defense contractors, especially when dealing with hardware, use C++
Many makers of advanced medical equipment (e.g., MRIs) use C++.
I say learn both if you can. It's good to have the C++ foundation even if you end up in a sandboxed language like C++/C#. Too many people don't understand the basics.
Note that different cities have a majority of jobs in a specific language. Go to the craigslist job boards for the city you think you'd end up in and see what they seek. For example, Pittsburgh is a C# town whereas New York is more balanced.
C++ is still used extensively in engineering applications, such as high-end CAD/CAM systems.
I think the death of native code is much exaggerated. Even Microsoft has backed away from making C++ all about .NET in Visual Studio 2008. It seems to be actively improving its native C++ development tools again as well as making interop with the managed world more easy.
My advice, learn C#. These days almost 50% of the job listings were Java and almost the other 50% were C#, there were only a few listing C++.
That said, the people using C++ know why they are using it and probably have good use cases for it... meaning you would really learn how to use the language at the highest levels... meanwhile companies slogging out business logic applications in Java/C# will probably not teach you as much about programming as quickly.
If you do decide to take a C++ job, make sure the shop uses the STL effectively and that they are using Boost. Not looking at using Boost/STL, but actually using it.
Keywords: Banking (financial institutions), games
Oh, and also particle physicists and other scientists using the (in)famous ROOT framework.
And check out this list of C++ based applications.
Bjarne Stroustrup has a list of companies/applications written in C++.
Your university didn't have any Java based courses? That's odd!!
You should learn not just C++ and Java, but should be exposed to several languages and paradigms
I tend to agree with your cousin. Java definitely is used in more enterprise applications (think things that a bank or insurance company would need), while C++ is used in more "niche" markets. I also agree with you that Java is easier to learn and master than C++. No shame or offense in admitting that.
We use both where I work, writing embedded software in C++, but communicating with it from GUI apps written in Java. There's definitely plenty of room in the software industry for both (and many more) languages.
Most packaged software is still written in C++. That means games, office applications, graphics and video editors, and operating systems. In fact, if you think of the software you use every day that isn't online, chances are it is written in C++ (or C or objective-C). It's not written in Java, Python, Ruby, Perl, etc. While packaged software is becoming less prevalent, it's still used a whole lot and isn't going away anytime soon.
Operating systems, whether embedded or for the desktop are almost exclusively written in some C language. Attempts have been made to write them in Java or C#, but none of those have worked out. All of your drivers are written in some C variant as well. I don't see this changing any time soon.
Java is great until you have to start caring about the details it abstracts away. Most people don't need to do that.
My advice is to master whichever language you enjoy more. I know C++ and Java well, and have used both professionally. However, I would never accept another C++ job because I find C++ tedious and mind-numbing. I rather invest my time mastering more interesting languages.
I've been writing in C++ primarily for internal and external desktop applications within manufacturing and telecom companies for a long time, and only worked full time with Java for about 1 year out of 16.
Java never seemed to take over the desktop like they were predicting back in the mid 90s when it first came out, and now C++ seems to have more competition from .net and AJAX/web applications.
I can't really speak for it's use in back end systems, but I have seen more of it there than I've seen C++, so it depends of what kind of programming you are talking about (e.g. user facing vs. internal systems).
Well I suggest learning more than a couple languages. I work in the communications industry and yes we use C++, however a lot of projects we are working on are in Java as well.
I suggest you learn:
1) C++ / C
2) Java
3) Erlang or Haskel
4) Ruby
This will help you understand concepts that exist in one language but not in another. Also helps with marketability.
Take a look at the tiobe programming index and you will get a feel for languages on the rise.
C++ is heavily used in embedded systems.
It is being used in UI development. For eg. famous QT framework is written in C++.
Ultimately it depends on what you want to do. If you want to work in embedded systems, better learn C/C++.
I use C and C++ regularly at my job where I work on embedded devices. We're not talking super low level stuff, here, either. I do mid-level and UI work. Think Qt, Gtk+, Windows Mobile SDK, etc.
C++ is heavily used by ISVs. Think Microsoft, Adobe, Oracle, Sun, Symantec...
Game industry looks like go with C++ forever.
I had to scroll all the way to the bottom to finally see a post mentioning video games. C and C++ are huge in that industry.
As far as the "What should I learn question." That's pretty open ended, you want to learn as much as possible. So yes, you should learn both of them. As a few people have said, C# is a good one too. You should also learn Python, Ruby, or PHP and some web frameworks (Rails, Symfony, Django, ASP.Net). Web apps are pretty big these days.
If your bubble consists of only C++ you aren't going to be very marketable.
EDIT: Oops, I guess games were mentioned a lot more than I initially saw in here. My bad.
In my career I've developed C++ for:
Server applications (Securities industry)
Embedded software (Wireless telecoms)
Desktop application software (Wireless telecoms)
I've also seen a lot of adverts for C++ developers in the defense industry. There is work out there for C++ developers, not as much as there has been in the past, but still plenty of work.
Though I say it wouldn't hurt to learn Java, it is a good skill to have under your belt.

Categories

Resources