Ideal way to learn a new programming language [closed] - programming-languages

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 been trying my hand at php for quite some time but dont think i have reached the level of expertise i desired.I started reading an ebook and writing down all the code examples present there on my own,which i think is inefficient.
My question is addressed to anyone who's an expert in any programming language.I just wanna know how do you guys do what you do so well,and as i mentioned in the title,what is the most efficient way to approach a new programming language so as to gain maximum from it making it an enriching experience.I love coding,have studied quite a few languages but left them all at intermediate levels after learning the basics and some advanced portions.
Wanna excel at php,so any tips would be really helpful from any of you highly skilled programmers on the website.
Thanks!

I find that the most useful thing to do when trying to learn in programming is just to work at it. Just looking and copying someone elses code isn't going to get you very far, you'll learn faster by trying to attempt something, and you're probably not going to succeed for a while, but keep working at it, fixing bugs as you go, and it'll just start to stick.
Also the php.net documentation is pretty fantastic, so just keep that open as you go.
In php, try to make a basic dynamic site, then work your way up.

The thing that takes you from intermediate to expert is a combination of: practice, reading other people's code, and understanding the language specification and libraries.
Once you are at intermediate level, your primary reference should be the language definition and library documentation, and for third party libraries, their documentation, and their code, as necessary.
You can also consult advance-level third party materials, and try to implement relatively advanced or fundamental programming concepts (e.g. continuations) in the language, to push your understanding.

Related

What are the main benefits of using Haskell for web developing? [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 10 years ago.
I'm learning Haskell for great good.
I'm pretty into OOP and the various type systems. I used Java to develop webapps (Java EE, spring, Hibernate, struts 1.x), now I'm using regularly Python (pylons, django, sqlalchemy, pymongo) and Javascript. I had a huge improvement in my personal productivity: the lightweight approach, duck typing, awesome iterators, functions as first class citizens, simple syntax and configuration, fast tools like pip and distribute (and much more) helped me a lot.
But the first reason of my productivity boost is the Python language itself.
What are the main benefits of using Haskell for web developing?
For example, how its type inference can really improve my web app? So far, I noticed that when you decorate your function with its type-signature you are adding a lot of semantics to your program. I expect all this effort to come back in some way, to save many lines of code and to make them sound. I really like the sharp distinction between types and data, I'm starting to understand how they works, but I want something back :P
Don't get me wrong, I've just started studying Haskell so Maybe I'm missing some awesomness but I really want to understand its paradigm and when it's worth using it.
Most web applications aim to be stateless and handle concurrency well. Its also rather important to scale (Google SEO reasons, and user experience).
Haskell handles these problems rather well (although IMHO in more academic and perhaps less "human" intuitive way).
That being said due to the sheer lack of people doing web app dev (compared to say node.js) and that traditional web app dev has been more focused in a OOP mind frame it might be rather difficult.
I had some issues trying to use it as you can see in my questions below:
How do I do automatic data serialization of data objects?
Handling incremental Data Modeling Changes in Functional Programming

Learning a new language project [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 10 years ago.
Does anyone have a standard project that they use when learning a new language. Kinda like a specification document of a project that includes all aspects of programming. Does anyone use some sort of beginning type project when learning a new language? I guess it also depends on the type of language and what's it's capable of.
Contributing something to an open source project seems to work for me. In addition to getting exposed to some coding habits in the language , you get to work on something useful.
Going through the first few problems of Project Euler is a very good way to get a handle on topics like I/O, recursion, iteration, and basic data structures. I'd highly recommend it.
A friend of mine had a coworker who coded a minesweeper every time when he wanted to learn a new language with GUI.
I like making simple websites for learning.
Pro: you can put it online and show it to people.
Con: the language has to be suitable for web development.
Writing a simple ray tracer:
math functions (pow, sqrt, your own intersection routines)
recursion (because it is a whitted style recursive one)
iteration (for all pixels)
how to write custom types (rays, possibly vectors)
pixel wise graphics
have something to play with compiler's (optimization-) flags
optional:
simple GUI
file reading writing
I've also done so with metatrace.

Is there a need to code a new 3D engine? [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 10 years ago.
Coding a new 3D engine is fascinating but I there are so many out there. Is it sane for a programmer to start a new one? Are there industry sections in need?
Reasons to do it:
You want to learn about how to make a 3D engine, and don't really care if anyone but yourself uses it.
None of the existing engines do what you want and it's too much trouble to modify their source code (if you can even get it).
You have such an awesome idea and no other engine has done it so you need to do it because whatever you're doing doesn't exist yet.
Reasons not to do it:
You don't have enough of these resources: time/budget/expertise.
An existing engine fits your needs perfectly.
There are lots of reasons to build a new 3D engine (in no particular order):
The old one is a first person shooter, but you want a flight simulator.
The old one works, but isn't easy to use or has too many bugs
Someone else owns the old one
New hardware feature XYZ is fundamentally incompatible with the old engine
Someone is paying you to build one
You've never built one before.
Your game (simulation) only needs χ, but the old engine provides χ, ψ, ζ, α, β, γ, δ, and even π.
I happen to be building an OpenGL-based 3D engine in my off time right now. By implementing it myself, I'm expanding my basic knowledge of OpenGL way more than I would have by programming to someone else's interface (way more than I did when I implemented my own software affine texture mapped engine years ago). The downside is that I may never finish it :)
Generally, you code one if you have a need for one and there doesn't already exist one that suits your need.
Is there someone out there who needs an engine built for them because there doesn't exist one that suits their needs? Probably.
This is highly similar to the question should I write my own program/technology/framework X instead of using an existing one?" and that has been asked plenty, so I won't go over the usual boilerplate reasons.
While the answer to this question will always be somewhat subjective, a great deal depends on the context in which it is asked.
If it's being asked along the lines of I want to learn about game engines and rendering then it always can be beneficial to write your own game engine as developing the code is arguably the best way to learn. However, there may already exist good open sourced well documented engines to learn from as well.
If it's a commercial endeavor, then it's more of an issue of whether or not an existing engine provides what is needed. Modern commercial engines are written by some truly brilliant people and contain all the latest bells and whistles so it's more than likely they would suffice. This is evident by the sheer number of games that have been developed on two of the most popular game engines: idTech and Unreal engine. However, there still may be no tech related prohibiting factors to using an existing engine where writing your own is better. Such as if it can afford to be done, whether the engine can be licensed adequately, and, if the license can be afforded.

Any good book on domain driven design? [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 10 years ago.
I'm trying to find a good, simple introduction to domain driven design, but that is proving to be difficult.
The books I have looked at all share the same problems.
They are massive 300+ pages. I really wish this practice would change with computer books.
They shine in chapter 1, explaining the introductory and basic concepts. Then when it comes down to getting into the material they blaze through the advanced concepts with poor examples and little explanation, then jump to the next concept.
Am I asking too much when I ask is there a book for domain driven design under 300 pages that progresses at a constant pace?
I hate it when books spend so much time on the introductory concepts, yet don't bother explaining the more advanced stuff.
Update
The reason I want a sub 300 page book is because those 500+ page monsters have a lot of fluff in them and can't seem to get to the point (or skip it altogether).
Try this one - available online at InfoQ. On the plus side, it's free. On the downside, it might be too basic for you. If you want an introduction though, surely it's the basic concepts that you want to get to grips with first before delving into the advanced topics?
Domain Driven Design Quickly - 104 pages.
There's also another free download, DDD Step by Step - a really short introduction to DDD, only 34 pages.
(and the corresponding webpage Think DDD)

Languages that free you from clarifying your ideas [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.
ok, so is there a programming language that frees you from clarifying your ideas?
I couldn't help asking. But if there is one, what would you say comes closest today?
You mean, a programming language that lets you program without explaining what you want the program to do?
No, how would that work? The compiler needs to be told what program to compile.
Digging out an old, somewhat appropriate quote from Charles Babbage:
On two occasions I have been asked,
'Pray, Mr. Babbage, if you put into
the machine wrong figures, will the
right answers come out?' I am not able
rightly to apprehend the kind of
confusion of ideas that could provoke
such a question.
The compiler can't read your mind. The only way it can create a program to do what you want is to tell it what it is you want.
Of course, there are languages that free you from having to specify things that are irrelevant to your overall problem and are only relevant to the underlying implementation. (an obvious example is that most modern languages free you from having to worry about pointers or many other low-level concerns. Many languages also give you ways to iterate over sequences without having to write a manual for-loop. But you still have to "clarify your ideas", you still have to specify what your program should do. The best a language can do is free you from clarifying the things that are not relevant to your ideas.
That shouldn't be the role of a language, in my view. Instead, the language should help you to clarify your ideas, and let you express those clarified ideas in as intuitive a way as possible.
You could see it from two angles:
High-level languages like Prolog
free you from having to express every
messy detail of your algorithm. You just
sketch the high-level picture, and
prolog fills in the details (e.g.,
how to do search and deduct the
answers to your questions, etc).
On the other side of the spectrum,
low-level languages like C free you
from having to express your ideas in
an abstract way. You can just give a
sequence of very concrete, detailed
procedural steps (although you can
optionally introduce abstractions if
you want to).
So both extremes free you from certain aspects of expressing and clarifying your ideas.
I don't think so, but there are a few that prevent you from clearly expressing those ideas - I nominate BCPL.
For various problem domains, there are languages that free you from having to type a lot of stuff beyond what's necessary to clarify your ideas. But every language fails in some situations, and for some people. Not everybody is comfortable expressing their ideas in an object oriented design (say, C# or Java), as functions and closures (Scheme), as logical derivations (Prolog -- there are some problems for which it fits!), or as declarative statements of the desired result (XSLT, CSS, various DSL's, with varying success) -- yet each of these is the right answer in certain contexts, and most of them overlap to some extent. Indeed, few modern languages are all that purely oriented to single paradigms.
But some languages favour other things over expressiveness: such as having efficient implementations (C), or being easy to learn (say, Python or its scripting kindred).
I hope there isn't a language that frees you from clarifying your ideas. It should be the responsibility of all programmers to do that themselves, not to pass it off to some other person or programming construct.
All good points, was thinking more along the lines of scripting languages, where you can type away in the debugger until it does what you want (I've done that a time or two for some sysadmin wmi scripts).
Yes, Whitespace.

Resources