As a language how stable is Groovy? [closed] - groovy

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.
As a language how stable is Groovy? Do any big names use it?

I've been using Groovy for about 2 years and yes, it is stable. So far, I haven't faced any bugs in the language itself. The creators of the language release often. There is great tool support and there are many mature libraries and frameworks based on it. Take for example Grails, a Rails-like framework. If you go to its page, you will see that a lot of BIG names, such as LinkedIn, Netflix and Atlassian are using it. I myself am using Groovy in many projects with Ericsson, which is a BIG name too.

As for "big names", there may be some (you shouldn't care). Obviously, nevertheless, Groovy's got a basic problem with its poor performance compared to Java. Positively, it's doubtable that Groovy is used in any mission-critical projects where scalability counts.
Regarding stability (as in the "absence of bugs"), take a look at the Groovy issue tracker. Enjoy ROFL'ing at several bugs where Groovy (again and again) has stumbled upon its own "magic". - Groovy bugs are numerous, and often unresolved for years.
Regarding stability again (as in "backwards compatibility"), I'm too new to Groovy to say much about that. Nevertheless, the closures syntax had changed without a compatibility layer provided. (This would never ever happen in the Java language.)
- When looking at those points from a Java perspective, Groovy is a kindergarten. From a Scala perspective even, Groovy will never grow up.
- Which is not to say that Groovy had no clear advantages in other scopes (like, there is Grails). But you've asked about these.

Related

performance of basic set theory (intersection, union, exclusion) over large sets of objects, which is faster linq in c# or f#? [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 want to compare two collections of entity framework pocos based on union and intersection. I'm trying to find out if out of the box it would be better to process these sets using f# instead of linq?
You don't need to run a profiler -- F# 3.0 supports LINQ, so you should be able to put together a small benchmarking project which uses both LINQ and the standard F# Set<'T> and measures the time to complete whatever operations you need (use System.Diagnostics.Stopwatch for this).
Here's the thing -- the answer to this question is highly dependent on your exact needs, so you need to do a bit of testing to see which is faster for your use case. For example, if you create a little benchmark app and find that LINQ (in C# or F# 3.0) is faster by 10ms, do you just go with LINQ because it's faster? Maybe, or maybe not -- it depends on whether that 10ms savings is important for your application; in most cases, it probably isn't, so you should go with whatever solution is easiest to integrate with the rest of your code.
Personally, I'd go with F# 3.0 and LINQ here, because it allows for a very succinct definition, and it may also be faster if EF can offload some or all of the computation to the database server.

Ideal way to learn a new programming language [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 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.

How to effectively organize code in languages where the implementation and interface declaration are typically in the same file [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 usally code in C and C++ where implementation and declaration are in different files (.c/.h and .cpp/.hpp), but I often code in Haskell/Python/D where this distinction does not exist.
My problem is when my code tends to grow I struggle to have a clear vision of what is inside a file. I miss the "you know what to expect just by looking at the .h" and tend to become overwhelmed by the feeling of mess.
My best attempt to solve this is to put fold into the file, but I would like to know how do you do guys? Do you have some magic solutions that I haven't tried yet? Is that just a set of mind?
I continue to use separate files like you do in C++ and like Java enforces in other languages, and make a lot of use of import/require/etc. Just because it is not enforced by the language does not mean you can't systematically organize your file name and content ^_^
I don't think there are magic solutions, but the following tips might work
Use classes
Describe for each class their resonsibility
Write down which data is used in each class
Write down which functionality is used in each class
Start with small classes, they will grow eventually
When classes getting too big, split them.
Use one file per class.
Split methods/data in public/private (with the use of the convention _)
for Java, the maven structure helps a bit.
src/main/java
for your Main code
and
src/test/java
for your Test code.
Also in addition to that I follow this package structure.
All the interfaces which form the core api will be in a package ending with api.
The implementations will be in a package ending with impl.
I use the Java convention of placing classes and interfaces of a given name in a file with that name as much as possible. I also use Maven which has a default directory structure which is a pain to start with but very useful if you have to look at other people projects.
Do you have some magic solutions that I haven't tryed yet
I suggest the simpler the better. Less to remember. ;)

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.

Resources