F# or C# for personal Silverlight project? - c#

I'm about to start working on a rich-internet-application project for a student organization at my university. I will be the only programmer, and what technologies to use is totally up to me. I've already decided on going with Silverlight, but I'm not sure whether to use C# or F#. Here are some of the things I'm keeping in mind:
C#:
I already know it and have used it extensively with Silverlight at work. I have no F# and little general FP experience.
Some say the OOP paradigm works better for complex stateful UIs.
Maintenance: I'll be in school for three more years, but after that if the app is still in use they may have a better time finding someone else to maintain it if I use a more common language.
C# experience is probably more valuable in the "real world".
F#:
The main reason is I want to learn something new. Functional programming languages seem pretty cool (I find myself using the FP features of C# very often, and think they're the biggest improvement in C# 3.0). I think I'd have a lot more fun if I used F#, but am I being unrealistic in thinking the cost in time and effort might not outweigh the benefits?

In my opinion, when you are a student, you should be trying to put your fingers in as many pots as possible.
The more languages you play with, the more understanding you will have of the "best" ways of doing things in a specific language.
As for "experience" being more valuable in the "real world". Personally I only ever consider true commercial experience when looking at potential candidates. Experience in a language when you're in a job and being paid is extremely different to experience in using a language when learning / studying it. Things you do whilst studying are about gaining skills and knowledge whereas things you do in a commercial environment give you experience in solving real life problems.
Bottom line... play with the cool stuff whilst you still can!

Because you expect to create something useful that will live past your tenure as maintainer, I would suggest writing the majority in C#. What you can do to scratch your new-technology-itch, though, is pull out distinct, well-defined components that don't interact directly with the UI and write those in a separate F# assembly.
I've done something similar with a project that I've open sourced in the past. My fundamental UI logic (in this case, the V-VM parts of the M-V-VM) were in C# because it works so well with WPF technologies. Then, certain functionally-oriented components of the Model itself I broke out into a separate assembly and wrote in F# just to get some limited exposure to the language.
It's not a jump-with-both-feet approach to learning technology, so I probably didn't learn as much as I could have. An F#-only project wouldn't have taught me nearly as much about exposing F# functionality to the greater .Net world in a friendly way, either, though.
No matter what, the key in a situation like this is for you to have fun and enjoy what you're doing. :)

You can make F# business logics project (a dll).
And then the user interface in C#. And in user interface project you can add a reference to the F#-library.
This is a good solution in general when using Silverlight: The power of F# is (functional) programming but currently C# will have a better tool-support.

I know it's not in your list, but if you're interested in learning something new, you might consider GWT - You write your client in Java (which ought to be an easy jump from C#), and then the compiler turns the client side into JavaScript. Should be a bit more cross-platform compatible than Silverlight, and it's an interesting fusion of technologies (CSS, JavaScript, and Java aren't going anywhere in the near future).

I just gave a talk about programming reactive Silverlight applications in F# at London F# user-group meeting. The recording of the talk (and samples) are available here, so you can take a look at that.
Here are a few points you could consider:
I think F# has some very nice features that make programming this kind of applications more elegant than in C# (for example, you can nicely model program as a state machine and encode this direcly in code).
F# is still relatively new, but I believe that there is a decent chance that finding someone familiar with F# after three years will be much easier than today (and finding younger students who are interested to learn something new should be easier :-)).
I was surprised that there is already quite a demand for good F# programmers in the London area. This will be probably different in different places, but I think that F# is becoming a "nice-to-have" feature on CV for some jobs.

I'm presuming that this will be used in an intranet environment. Otherwise, I'd question whether the choice of Silverlight is really the best due to market penetration.
The second point I'd raise is that one of the really key skills for most web developers is Javascript. (Nowadays, that would be Javascript with a library like JQuery to manipulate the DOM, simplify AJAX, etc.) unless the application is particularly complex, there might be some merit in considering DHTML+Javascript as a starting point, and only looking at other technologies if it proves too much for that.
However, if you're set on going down the Silverlight route, then C# is by far the most likely to be supported. If you're still learning, then it's also the route that has the best documentation. F# has some excellent documentation around, but unfortunately not nearly as much as for C#.
You briefly mention the time and cost commitment. Unless you're quite comfortable with functional programming, F# is liable to take significantly longer, in part due to unfamiliarity and in part due to the amount of reference documentation to help you on your way.
While it it undoubtedly good to have knowledge of a range of programming languages under your belt, what's more valuable to most employers is a solid understanding of their language of choice - so diversifying too much can miss that. When looking to learn an unfamiliar programming language starting with something like solving Project Euler problems may present a better way of starting out, rather than diving straight into a major project with a new language. If you start in C#, you can always create an F# project that implements functions more suitable for its focus, and reference it from the C# one, to dip your toe in its waters while not automatically committing a lot of additional time to it.

Related

Language choices when porting a classic asp app to .NET

First, let me ask you to consider this as a real question, and not a subjective one.
That out of the way, here's my situation: We are looking to port our existing classic ASP application to .NET, but we're unsure of what language to use for the new app.
I personally would 'prefer' C#, as I'm more familiar and comfortable with that languages way of doing things, but, the original code is VBScript, so it would possibly be easier to port to VB.NET ... One possible situation I fear would be that, because the code is so similar between the two variants of VB, that we might end up getting stuck on something that is not similar between the two, even though it looks like it would work. A shift to a wholly different language might avoid that kind of situation.
Does anyone have any practical examples of this kind of situation? Insights to illuminate the issue with? Do the potential benefits of a complete paradigm shift outweigh the gains from a high degree of 'copy-and-paste-ability' ?
I have used C#.NET and just recently learned VB.NET and I have to say that once you get around the small syntactical differences, VB is also a very good language. So for you, this is a win win.
That being said, I think a syntax change will help protect the project from any careless copy pastes from the old dirty code base. I believe a fresh start with a fresh language is your best bet for a top notch re-write.
There are 10X as many questions re: C# as there are VB.NET on StackOverflow. That seems to indicate there are more developers using C#, or perhaps a more thriving community (or maybe it just means C# is harder or C# developers don't know as much).
Any gains made due to the similarity of VBScript to VB.NET are far outweighed by the fact that you need to learn the new data types, .NET namespaces, and a new style of web development using webforms or MVC (my preference).
For this reason I think the choice of language should be made independently of what was used before.
3 years ago I had to make this same decision. My preference would have been C# but we ultimately went with VB.Net because that was the closest language available to the developer base we had. All of the developers had experience with VBScript, so learning VB.Net was easier for them. While the framework is the framework and the rest is just syntax and best practices, you'd be surprised the difference in learning curve just by adding a few curly braces for VB developers (the reverse seems to be exactly the same for C# developers going the other way with an itchy semi-colon finger, learning new keywords and relearning event syntax).
You should look at your developer pool and consider what is the easiest for your team to perform development and maintenance. If this is not a serious criteria (because the developers are proficient equally in both), then I would recommend a C# approach. The primary reason is that the VBScript will be relying on outdated methodologies, but converting to VB.Net will not necessarily throw exceptions for these methods whereas C# will. It will also force you to touch every aspect of your application, which (while tedious) will provide your team an opportunity to evaluate how older methods may be refactored into more efficient processes.
Just keep in mind - the "easiest" seeming solution seldom is.
When moving to ASP.NET, I believe that less focus needs to be on the page itself, and more on how you're going to write the business logic. This is a subjective question because different units will have different results.
That said, always play to your strengths. If your team is more familiar with C# than VB.NET, use C#. If they're more familiar with VB.NET, use VB.NET. If they have no real .NET Experience, then you probably want to set up some sample projects with which they can play to see which will be easier to learn. You want the most bang-for-your-buck, and that means making sure the team is as comfortable as possible.
Further, I wouldn't worry too much about copy & paste code, as there are enough differences that any professional developer (as in one who acts professional, not just one who gets paid) will see how much he/she is changing and go back through the rest of the code to ensure it is working properly.
The difference between an ASP.NET and Classic ASP application is already so big, that it will not be an easy copy/paste port anyway.
So I think you should go for the language that you feel most comfortable with (and as another answer suggests, there is a much larger community using C# than VB.Net).
Why are you rewriting the application? What are the short and long term objectives you hope to achieve through this change?
At a high level there is not much to choose between VB and C# - both are extremely functionally rich labguages that compile to teh same IL code.
Personally I moved to C# a few years ago because the vast majority of code examples found on the net are in C#, and the programmer's best friend is the internet where you may just find that nugget of useful information that save you hours of head scratching.
In your situation, by fircing yourself to rewrite the code in a different language will force you to possible rething the implementation and therefore review carefully the code and functionality required - if yuo have the time and budget. If you are up against tight deadlines then VB would be the natural choice, but may negate the benefiots if the rewrite.
I have been in exactly this position, and I urge you not to translate the app in two ways at once--from VB to C# and from classic ASP to ASP.NET.
You have chunks of business logic in your code that will not need to change much, so why change it? You are guaranteed to introduce new bugs in the translation.
I can't count how many times I thought, "this looks exactly the same, why isn't it working?"
Just adapting your code to the new codebehind pattern will be challenging enough. A vast and worthwhile improvement, of course, but not trivial.
VB.NET and C# are so incredibly similar that technically the choice is almost irrelevant. Each language has some minor things they excel in, but overall, the two are practically identical, just with wildly different syntax.
With that said, I highly recommend going with C#, just because it's the language the .NET community really got behind. It will have the most books, websites, blogs, forums, you name it. Not having to translate the oodles of examples out there on the net into VB.NET alone makes C# a better choice. I think in my 10 years of being a .NET developer, I could count the number of people I've ran into that genuinely chose VB.NET on one hand. Most people that are using VB.NET are using it in a "stop gap" fashion, with the intention of ultimately going to C#.
Many people go for C# because they think that VB.Net and C# is only syntactically different which is just not true. VB.Net has better features for handling interactions with COM components for example, like optional parameters (these are now available in C# 4.0). But there are catches too in a line by line conversion of VB to VB.net. A very simple example is the array index. If I'm not mistaken array indexes start from 1 in vb and in vb.net it starts from 0 which causes horrible bugs. Overall, I'd definitely consider going for VB.Net even though I work basically in C#.

migrating to C# from Java

I saw a thread similar to this, but the reason I'm asking this is because my situation is different.
I've been a tester (automated and manual) but I have a good Java programming knowledge although I haven't worked as a programmer.
My company is considering to move me to a C# programming role. Will it be hard for me to learn C# without any prior experience in programming?
Thanks
My 2 cents is that once you understand core concepts of programming you can move to any programming language. Try and remain as language agnostic as possible.
Specific to your question, you should be able to make the transition without much effort at all.
C# and Java are so similar you won't have any problems at all. That said, there are a few differences, this page does a pretty thorough job of demonstrating them.
One thing it doesn't mention is LINQ, which is definitely different as we're seeing the two languages start to diverge a bit more.
I have difficulties combining the statements "I have good Java programming knowledge" with "without any prior experience in programming". How can you have good Java programming knowledge without any experience in programming?
That said, if you are an able Java programmer, moving to C# should not be very difficult.
Speaking strictly about syntax, C# pretty similar to Java so you should have no problems there (at least it will feel familiar at first).
Moving to C# will not be a problem at all.
Since you already know Java, you'll find many concepts in C# easy to understand.
In fact, it's always a great thing to learn and work on multiple languages throughout your career, especially if they cover different paradigms.
I've had 4 programming jobs in my life, and for 3 of them I had no experience at all with the language before starting the job. The 1 for which I did have experience ended up being a complete disaster of a workplace.
If there's any correlation between how well you know a specific programming language before taking a job, and how you can get/do a job at a place where they use that language, I have yet to see it in my 10+ years. I'd say it's probably one of the least important factors contributing to your success.
Unless you plan to work at a company for a very short period of time, you'll learn many new things, and probably new languages, while working there. Whether you happen to know the one they're using now is like how tall Michael Jordan was when he was in high school: after a few dozen/hundred/thousand hours of practice, completely irrelevant.
Without any industry experience in Java it won't be easy to work in... Java. What I mean is you will have exactly the same difficulties in C# as you would have in Java. The language change won't be the problem -the big difference will be working with real world requirements and practices.
Don't take me wrong, I don't mean you will have problems: you'll just learn a lot of new things. If you have a solid "conceptual" base switching from Java to C# will be easy, I did the same pretty much effortless.
Read a good book (for ex. Troelson's Pro C#) and you'll quickly pick up the most important differences. Then with time you'll learn the other stuff that is really different from Java (for ex. WPF, Linq, etc.).
In conclusion, don't be afraid and go for it!
C# should be trivial to learn if you know Java. The differences at the programming level are largely syntactic for the most part.
The difficulty (and this is the same with Java) is the language is just an enabler for a large number of libraries and technologies. So you could have no trouble picking up C# but you might hit a brick wall learning WPF because there is no analog in Java. etc. Or you might be trying to write ASP.NET but you have never learned JSP / Spring in Java so have nothing to relate to.
The best strategy is start small, get familiar with the constructs and then try to implement something useful. e.g. in WPF, you could write a simple Twitter client using webservices. In ASP.NET you might write a simple blog app hooked up to database app.
Once you get the basics and assuming you follow best practice, it should be easy enough to expand outwards.
If you have programming knowledge skills it would be not very difficult to move into c#. In my experience coming from PHP I suggest you the following steps,
Books:
1- C# 4.0 in a Nutshell The Definitive Reference
2- Apress.Pro.ASP.NET.MVC.Framework
Tutorials:
1- check the website http://www.asp.net and probably the best thing could be to move directly into MVC
2- check the nerddinner tutorial http://nerddinnerbook.s3.amazonaws.com/Part1.htm in order to get in knowledge of how this work.
3- Download Nerddinner code http://nerddinner.codeplex.com/
4- use entity framework instead of linq based on MS election for the future
5- Download some starter-kits from http://www.asp.net/mvc/samples/mvc-music-store to check the way it work.
Hope it helps. brgds,

Is there a reason I should not start with C#

I think I'm leaning toward C# and .net as a concentration language for learning web development. I would like to learn good programming fundamentals and I've looked at pretty much everything else. The four I've narrowed it down to have been C#, Python, Ruby and PHP. Is there a reason to stay away from C# (and I don't think the cost issue would really apply to my solo-developer situation but I could be totally wrong). Any thoughts?
I realize that these are all great languages so I'm not trying to ask which is the best overall. However, would Ruby be a viable alternative for a first language or does it have too much "magic under the hood" coupled with Rails, and unorthodox methodologies? I do like what I've seen with the language.
This is likely to result in a flamewar but I think C# is a pretty good language to start with for Web Development.
It is a full featured object oriented language and is statically typed and compiled. It's very well documented and has a huge developer community.
If you absolutely have to run on Linux/Apache and do not want to use Mono, that would be a reason not to use C#. Other than that, I don't think there is a compelling reason not to, particularly with ASP.NET MVC, which lets you move away from the WebForms model.
This is not to say that WebForms is necessarily bad but some might object to WebForms as it introduces abstractions that are not inherent in other web development platforms.
If you go with C# for web development, depending on your experience with web technology, I'd heartily recommend starting with ASP.NET MVC before ASP.NET Web Forms.
ASP.NET Web Forms is the original style of building ASP.NET applications, and tries to abstract a lot of the details. It allows you to build applications without realising what's happening under the hood (post data, state management). In my opinion, these abstractions although making things easy at first begin to "leak" when you get into more complicated scenarios (as this tutorial proves).
ASP.NET MVC on the other hand makes it easier to build web sites that are a lot "closer to the metal" while still keeping you productive. If you want absolute control over the resulting HTML and aren't afraid of things like cookies, form tags, post and query string data, then you might enjoy ASP.NET MVC a lot more.
Of course it would be beneficial to know both. But if I was starting now, I'd probably start with MVC and move to Forms (then realise how bad it is and move back :)).
There are no "best language over all". You use one tool for the purpose it has been made, that's why there are several tools.
Since your question is "why not learn C#", I'd say :
If you plan to work with other OS then Windows (Mono cannot compare).
If work in an env or with people not .net friendly (e.g : bank, scientists)
If you work in an env or with people that are expert in another good tech (never underestimate the use of a good master).
If you think Free Software matters so much that using a MS product is not worth it.
If you don't like MS Visual Studio (working in c# without a good IDE is a pain).
If You plan to program something that .net is not suited for (e.g embedded devices, scripting, real-time, fault tolerant system, AI, etc).
If you are a web dev and can't afford a Windows Server Licence.
If you want to learn programming with the very basics, including simple functions and quick and dirty scripts.
Now, I program in Php, Python, Java and C#. Python is my language of choice, but c# is really the first MS programming tool that seduced me : it's clean and efficient. Really, it's about what you want to do, not a question of religion.
Make YOUR choice.
That's said, C# sucks and Python rocks.
I agree C# is a pretty complete language, it's syntax is clean and extensible. There's a huge amount of web resource already available, but and it's a big but, it effectively ties you to windows as your platform. For web especially that's an important consideration. On the desktop windows is king, but for web servers the market it isn't nearly so dominant.
Another side issue, if you're looking at rich media on the web you have to consider Flash and/or Silverlight. If you go C# then you're someway to using Silverlight without learning a different language.
Don't worry about the cost. The compiler is free to use, along with the rest of the Fx SDK, and you can even download Visual Studio for free.
The disadvantage to learning C# is that it ties you to a proprietary platform and software stack. Now, there is Mono, which does a good job of implementing much of C# and .Net, but the primary and most complete implementation is Microsoft's which is non-free.
I have not used C# enough to debate it's technical merits with respect to Ruby or Python. I can say, however, that learning to use and even contribute back to free software can be quite educational, in addition to the other benefits (discussed in length elsewhere) that free software provides.
c# is a good language to start with because:
It is a very good and very clean language
It has an excellent library (.NET framework). This is one of the most important things to consider when choosing a language.
It is very popular, you'll always be able to find the answer you are looking for from the community.
If you know c#, you pretty much know VB.NET.
c# is syntactically similar to Java. Learning c# won't teach you Java's libraries, but it will significantly reduce the learning curve if you want to enter the Java camp.
c# is syntactically similar to c++. Again, it uses a different library and unlike c++ you get memory management; but the learning curve should be somewhat reduced if you decide to play with c++.
As for the web...
ASP.NET webforms does a lot of magic for you. ASP.NET MVC (just released) does almost no magic for you. For learning, MVC is the better choice.
C# is a great language to use. And since you are using it via the web and not desktop applications for example, you don't have to worry about being multi-platform since the code is run on your server and the output delivered to the clients. With that said, you will have to find Windows hosting (which can sometimes be a bit more expensive) or use mono (which isn't exactly the most updated software out there). The downsides are minimal though, grab a copy of the express edition and go for it!
I think the cost of deployment might be a different thing, i.e. if your project needs to scale horizontally, and add more servers to load balance or even for geographically distributed servers. Usually the windows hosting will run a bit more than linux (without even considering the flame wars reasons).
C# is fine for starting if you are doing web development. However, I recommend that you don't start programming with web development. Web development is hard to get right. Way harder than little command line things. I recommend that you get some good experience programming for the command line, and then move up to GUI, and then move on to the web. The web has a whole bunch of things you have to worry about. You have to know 3 languages (HTML, JS, C#(or insert your server side language here)). Plus you have to worry about all the browser quirks and stuff. And that's without even getting into databases. Which is usually used in most web applications, but opens up a whole other can of worms.
Considering all the answers so far, I thought I'd look at all four languages mentioned.
While I've done a lot of development in PHP, and sadly continue to do so, I think PHP was never a great language (though it had a few great elements) and these days there's not much point picking it up. It remains extremely easy to get into but I think in general, PHP is a "bad habit".
Python is a great language, but to me, Ruby is all that Python is and a bit more. Personally I would go for Ruby.
C# is also a great language, but while I haven't used C# enough to say anything with confidence, I feel that Ruby is a better choice.
No reason in particular to stay away from C#. It's as good a language as any. Stackoverflow uses it for example, so it works on a successful website, and you can get jobs programming in it.
The proprietary thing would be a consideration if you were programming as a hobby or off your own limited budget, or you wanted to contribute to the development of the compiler/language. I'm guessing neither of these are the case. (Edit: as others have pointed out, open source environments for C# exist.)
It depends on a couple of things. C# and .Net is populate and th tools are really very easy (complared to Java! Java developer talking here...) but Windows Hosting is expensive vs LAMP (which include Ruby, Python and PHP).
For me it all depends on the tool that you want to use. For web services etc I would use C# but for a simple website PHP since its easy.
It also depends on the job market of your location... here in South Africa you get alot more C# jobs and not much PHP etc. Off course if your a freelance you will struggle to find work.
For me Ruby again is good for my own person stuff but you don't get any Ruby jobs here.
My advice? Learn the differences for yourself. Play around with both of them. If you have a project in mind, write a prototype for it in them. You'll always be at the mercy of other peoples' biases otherwise.
ASP.net (C#) and Ruby on Rails are used in high-profile sites, so you can't go too wrong with either one. Might I also suggest that you try out Python programming with django? It's what I tend to prefer for web programming.
I'm a C# .Net developer and I think it's great, but I'll highlight a danger in the Asp.Net WebForms. It is unlike the majority of other web frameworks and does A LOT of magic under the covers. As others have said ASP.Net MVC is probably more inline with other web frameworks (Rails for example). Web Forms abstracts a lot of the nuts and bolts of webdev away which If you want to be web developer you'll end up needing to know. So yes C# is great but I'd start with MVC and then look at web forms possibly. Also looking at other languages and frameworks is highly encouraged there's always stuff to learn.
Commercially I am a C# developer. I love C#. C# is a great strongly typed language. With Resharper installed I can build my ideas in code rapidly and flex it to my will.
When I go home each evening I use Ruby. Even though I have no refactoring support (snif.) I find I am much more productive in Ruby than in C#.
I worked writing a large ASP.Net application for a couple of years. We implemented MVC to try to detangle the view from the model. It always felt like I was fighting the framework, not working with it. The latest .Net frameworks for doing web application are based on Rails... just a couple of years behind. I love the language. I love the CLR. I'm not too keen on .Net.
I find the ruby community to be friendly and vibrant. The rails open source community produces loads of tutorials and plugins that make getting up to speed easy and putting your application together simple.
Another thing to consider (as far as choosing a language to learn) is that ruby is an Object Oriented language. Even classes are objects. C# is a Class Oriented language, ie. it provides you one way to create objects.. define a class first. (not totally true.. you can generate assemblies in memory using codedom.. but that is by no means easy).
This may seem like a subtle point, but there is a difference.. and until you get experience with an OO language like ruby or smalltalk it's not obvious what that is. Once you have felt the freedom of building objects by mixing in functionality at runtime etc. you find that all the 'work-around's you had to do in C# disappear. Not having the safety net of interfaces does seems scary at first.
In all, I'd learn ruby..
If you are new to programming (totally) I'd start with http://pine.fm/LearnToProgram/
Then I would learn BDD (RSpec) and get test infected as soon as possible.
Then I'd consume rails tutorials and screen casts until my eyes popped
The only problem is .. if you start with ruby then later go to C# you'll find yourself going "Aaaaagh! This would be so much easier to do in ruby" all the time. I know I do.
It really depends on what you are trying to achieve. I program in both and to be brutally honest, if you are trying to make a career out of programming, I get paid twice as much for .NET programming. The types of clients that I do PHP dev work for are not the types that pay a lot (PHP is often chosen based on saving some $$$). .NET seems to be much more entrenched in larger corporations.
Just my observation...
No disadvantages really except that you will be unwelcome in those social groups (and even geographical regions) that pose themselves against the "evil Microsoft".
The language (better .NET platform) is quite good. One important thing is that it is being very actively developed causing some people trouble keeping up. But I'd rather have rapid development compared to year-long stagnation.
You might consider checking what employers in your area prefer as a technology stack.
Considering licensing costs you can consider the following: If it is a small site you can use Visual Studio Express/SQL Server Express for free and it will be sufficient. If you come up with some major heavy trafficked project you will likely to find a way to make revenues and cover licensing costs.
Learning C# is great in 2009.
Way back in the day, when I entered the professional world, the language landscape was very different. I coded professionally in C and Modula 3 (Pascal replacement language).
My point is that I would plan for the technical landscape to change over time, and plan for that in your professional career development.
Learning multiple platforms is a great way to accomplish this. For example, you could have C#/.NET as your primary skill, but also work with JAVA. When a new platform emerges, you could add it as your transition or backup skillset.

Should I learn Openedge as a C# programmer

We have an Progress OpenEdge (http://en.wikipedia.org/wiki/Progress_4GL) develop team in the company I work for.
I'm the only c# developer there and really like it. So now the manager asks me to learn programming in OpenEdge. He doesn't want me to become a good OpenEdge programmer but he wants the team members to understand both worlds. He hopes the team will benefit from this.
I'm not unwilling to learn but I want to become a better developer and there are so many more aspects of .Net I like to discover.
So are there there any good point about Progress OpenEdge I would profit from or should I stay away from it.
OpenEdge is a powerful framework for building CRUD applications; but it is a niche skill with no SAP-like salary premium for possessing it; conversely decent OpenEdge developers are hard to get hold of for bog standard rates - it would not be unknown for a manager to recruit an OpenEdge developer by the backdoor.
The core ABL (OpenEdge language) is different enough a language from the mainstream to be interesting for an inquisitive programmer and for your bosses arguments for everyone to understand where the others are coming from to make sense.
So, bearing those points in mind:
It's worth learning the basics to enrich your understanding of your core competencies, along the lines of "What should they of England know, who only England know?". You may also find the ease of data access eye-opening.
It is not worth spending too much time distracted from developing your expertise in a framework which is infinitely more widely used.
If your manager wants you to learn OpenEdge, then he has a reason for it. One reason could be that you will be taking on some of the development, perhaps providing cover when others are off. The other reason could be, as he says, that he want the team to understand both worlds.
What you need to find out is if the Progress people are going to be looking at .NET as well. If not, you know which of these reasons he has in mind.
It is never a bad idea to learn new (and different!) languages. It keeps the mind working and teaches you concepts that might not be available in your language. Learning OpenEdge will have no adverse effects on your C# knowledge and you can likely learn them in tandem. I personally am currently reading up on C#, Python, PHP, Ruby and Groovy all while doing most of my work in Java, I simply want to know everything. (Not to mention reading about multiple frameworks for said languages).
In short, you will always profit from learning a new language as it will give you a different perspective than the one you are used to.
What version of OpenEdge are you using? I might be biased but I would say that yes it is worth it. There are people looking for OpenEdge developers and with Progress recently releasing a product we call "OpenEdge GUI for .Net" that allows you build .Net frontends with .Net controls using only OpenEdge ABL code, there will be more and more shops that will be looking for people that have an understanding of the OO .Net world but also understand ABL.
One of the other good things about the ABL is that it is Extremely backwards compatible (no VB6 nightmares when we upgrade versions) (although some may say this backwards compatibility is a fault).
The ABL now is mixing its tradition Procedule manner with OO concepts so you can use one or the other or both theories depending on what makes sense.
The main thing I imagine you will be learning is the data access components and yes, that won't help you out in the .Net world, but I think you will find it easier to learn then other data access and so, will be an asset to have.
Lastly, if you have a good grounding in .Net as it seems you have, you will be a great asset to your employer (and be another box to tick on future job applications) in helping their OpenEdge devlopers understand the .Net ideas. I don't think progress will ever make ABL compile to CLR code (excuse me if I have terminology wrong. Is it meant to be bit code? You know the code that runs in a .Net VM) but they do know that .Net is winning the Desktop battle and they are borrowing a few concepts (.Net GUI and Datasets for one). I would hope (bias again) that you would look at some of the OE data access and say, I wish .Net had an easy way to do that!
It is a niche but niches can be very worthwhile. It can also be like being stuck in mud. Which it turns out to be depends on lots of factors but as others have said it is always good to learn new stuff.
I make 75 euro's an hour with my 12 years of Progress / Webspeed / Sonic experience.
OpenEdge seems is mostly used by software developers for building products. End users typically only interact with the rdbms end of an application. Learning any new language is a good thing IMHO, and the more different it is to what you are used to the better - we learn better when our assumptions and habits are challenged and extended. OE as a rdbms is pretty much "set and forget" needing very little in the way of maintenance. Suggest you go to the Progress forums online and look for the DBA Admin guide, work through that, then read the Embedded SQL because that will probably make more sense to you in short space of time.
And after all of that is digested just go ahead and write something. Nothing beats putting rubber to the road and building something usable. Ask the other dev's for a support problem, or a sinple form to get built, and just do it.
If your code interacts with an OpenEdge program, then it behooves you to learn something about the environment so you can interact with it better.

Why learn Perl, Python, Ruby if the company is using C++, C# or Java as the application language? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I wonder why would a C++, C#, Java developer want to learn a dynamic language?
Assuming the company won't switch its main development language from C++/C#/Java to a dynamic one what use is there for a dynamic language?
What helper tasks can be done by the dynamic languages faster or better after only a few days of learning than with the static language that you have been using for several years?
Update
After seeing the first few responses it is clear that there are two issues.
My main interest would be something that is justifiable to the employer as an expense.
That is, I am looking for justifications for the employer to finance the learning of a dynamic language. Aside from the obvious that the employee will have broader view, the
employers are usually looking for some "real" benefit.
A lot of times some quick task comes up that isn't part of the main software you are developing. Sometimes the task is one off ie compare this file to the database and let me know the differences. It is a lot easier to do text parsing in Perl/Ruby/Python than it is in Java or C# (partially because it is a lot easier to use regular expressions). It will probably take a lot less time to parse the text file using Perl/Ruby/Python (or maybe even vbscript cringe and then load it into the database than it would to create a Java/C# program to do it or to do it by hand.
Also, due to the ease at which most of the dynamic languages parse text, they are great for code generation. Sure your final project must be in C#/Java/Transact SQL but instead of cutting and pasting 100 times, finding errors, and cutting and pasting another 100 times it is often (but not always) easier just to use a code generator.
A recent example at work is we needed to get data from one accounting system into our accounting system. The system has an import format, but the old system had a completely different format (fixed width although some things had to be matched). The task is not to create a program to migrate the data over and over again. It is to shove the data into our system and then maintain it there going forward. So even though we are a C# and SQL Server shop, I used Python to convert the data into the format that could be imported by our application. Ultimately it doesn't matter that I used python, it matters that the data is in the system. My boss was pretty impressed.
Where I often see the dynamic languages used for is testing. It is much easier to create a Python/Perl/Ruby program to link to a web service and throw some data against it than it is to create the equivalent Java program. You can also use python to hit against command line programs, generate a ton of garbage (but still valid) test data, etc.. quite easily.
The other thing that dynamic languages are big on is code generation. Creating the C#/C++/Java code. Some examples follow:
The first code generation task I often see is people using dynamic languages to maintain constants in the system. Instead of hand coding a bunch of enums, a dynamic language can be used to fairly easily parse a text file and create the Java/C# code with the enums.
SQL is a whole other ball game but often you get better performance by cut and pasting 100 times instead of trying to do a function (due to caching of execution plans or putting complicated logic in a function causing you to go row by row instead of in a set). In fact it is quite useful to use the table definition to create certain stored procedures automatically.
It is always better to get buy in for a code generator. But even if you don't, is it more fun to spend time cutting/pasting or is it more fun to create a Perl/Python/Ruby script once and then have that generate the code? If it takes you hours to hand code something but less time to create a code generator, then even if you use it once you have saved time and hence money. If it takes you longer to create a code generator than it takes to hand code once but you know you will have to update the code more than once, it may still make sense. If it takes you 2 hours to hand code, 4 hours to do the generator but you know you'll have to hand code equivalent work another 5 or 6 times than it is obviously better to create the generator.
Also some things are easier with dynamic languages than Java/C#/C/C++. In particular regular expressions come to mind. If you start using regular expressions in Perl and realize their value, you may suddenly start making use of the Java regular expression library if you haven't before. If you have then there may be something else.
I will leave you with one last example of a task that would have been great for a dynamic language. My work mate had to take a directory full of files and burn them to various cd's for various customers. There were a few customers but a lot of files and you had to look in them to see what they were. He did this task by hand....A Java/C# program would have saved time, but for one time and with all the development overhead it isn't worth it. However slapping something together in Perl/Python/Ruby probably would have been worth it. He spent several hours doing it. It would have taken less than one to create the Python script to inspect each file, match which customer it goes to, and then move the file to the appropriate place.....Again, not part of the standard job. But the task came up as a one off. Is it better to do it yourself, spend the larger amount of time to make Java/C# do the task, or spend a much smaller amount of time doing it in Python/Perl/Ruby. If you are using C or C++ the point is even more dramatic due to the extra concerns of programming in C or C++ (pointers, no array bounds checking, etc.).
Let me turn your question on its head by asking what use it is to an American English speaker to learn another language?
The languages we speak (and those we program in) inform the way we think. This can happen on a fundamental level, such as c++ versus javascript versus lisp, or on an implementation level, in which a ruby construct provides a eureka moment for a solution in your "real job."
Speaking of your real job, if the market goes south and your employer decides to "right size" you, how do you think you'll stack up against a guy who is flexible because he's written software in tens of languages, instead of your limited exposure? All things being equal, I think the answer is clear.
Finally, you program for a living because you love programming... right?
I don't think anyone has mentioned this yet. Learning a new language can be fun! Surely that's a good enough reason to try something new.
I primarily program in Java and C# but use dynamic languages (ruby/perl) to support smoother deployment, kicking off OS tasks, automated reporting, some log parsing, etc.
After a short time learning and experimenting with ruby or perl you should be able to write some regex manipulating scripts that can alter data formats or grab information from logs. An example of a small ruby/perl script that could be written quickly would be a script to parse a very large log file and report out only a few events of interest in either a human readable format or a csv format.
Also, having experience with a variety of different programming languages should help you think of new ways to tackle problems in more structured languages like Java, C++, and C#.
One big reason to learn Perl or Ruby is to help you automate any complicated tasks that you have to do over and over.
Or if you have to analyse contents of log files and you need more mungeing than available using grep, sed, etc.
Also using other languages, e.g. Ruby, that don't have much "setup cost" will let you quickly prototype ideas before implementing them in C++, Java, etc.
HTH
cheers,
Rob
Do you expect to work for this company forever? If you're ever out on the job market, pehaps some prospective employers will be aware of the Python paradox.
A good hockey player plays where the puck is. A great hockey player plays where the puck is going to be.
- Wayne Gretzky
Our industry is always changing. No language can be mainstream forever. To me Java, C++, .Net is where the puck is right now. And python, ruby, perl is where the puck is going to be. Decide for yourself if you wanna be good or great!
Paul Graham posted an article several years ago about why Python programmers made better Java programmers. (http://www.paulgraham.com/pypar.html)
Basically, regardless of whether the new language is relevant to the company's current methodology, learning a new language means learning new ideas. Someone who is willing to learn a language that isn't considered "business class" means that he is interested in programming, beyond just earning a paycheck.
To quote Paul's site:
And people don't learn Python because
it will get them a job; they learn it
because they genuinely like to program
and aren't satisfied with the
languages they already know.
Which makes them exactly the kind of
programmers companies should want to
hire. Hence what, for lack of a better
name, I'll call the Python paradox: if
a company chooses to write its
software in a comparatively esoteric
language, they'll be able to hire
better programmers, because they'll
attract only those who cared enough to
learn it. And for programmers the
paradox is even more pronounced: the
language to learn, if you want to get
a good job, is a language that people
don't learn merely to get a job.
If an employer was willing to pay for the cost of learning a new language, chances are the people who volunteered to learn (assuming it wasn't a mandatory class) would be the same people to are already on the "fast track".
When I first learned Python, I worked for a Java shop. Occasionally I'd have to do serious text-processing tasks which were much easier to do with quick Python scripts than Java programs. For example, if I had to parse a complex CSV file and figure out which of its rows corresponded to rows in our Oracle database, this was much easier to do with Python than Java.
More than that, I found that learning Python made me a much better Java programmer; having learned many of the same concepts in another language I feel that I understand those concepts much better. And as for what makes Python easier than Java, you might check out this question: Java -> Python?
Edit: I wrote this before reading the update to the original question. See my other answer for a better answer to the updated question. I will leave this as is as a warning against being the fastest gun in the west =)
Over a decade ago, when I was learning the ways of the Computer, the Old Wise Men With Beards explained how C and C++ are the tools of the industry. No one used Pascal and only the foolhardy would risk their companies with assembler.
And of course, no one would even mention the awful slow ugly thing called Java. It will not be a tool for serious business.
So. Um. Replace the languages in the above story and perhaps you can predict the future. Perhaps you can't. Point is, Java will not be the Last Programming Language ever and also you will most likely switch employers as well. The future is charging at you 24 hours per day. Be prepared.
Learning new languages is good for you. Also, in some cases it can give you bragging rights for a long time. My first university course was in Scheme. So when people talk to me about the new language du jour, my response is something like "First-class functions? That's so last century."
And of course, you get more stuff done with a high-level language.
Learning a new language is a long-term process. In a couple of days you'll learn the basics, yes. But! As you probably know, the real practical applicability of any language is tied to the standard library and other available components. Learning how to use the efficiently requires a lot of hands-on experience.
Perhaps the only immediate short-term benefit is that developers learn to distinguish the nails that need a Python/Perl/Ruby -hammer. And, if they are any good, they can then study some more (online, perhaps!) and become real experts.
The long-term benefits are easier to imagine:
The employee becomes a better developer. Better developer => better quality. We are living in a knowledge economy these days. It's wiser to invest in those brains that already work for you.
It is easier to adapt when the next big language emerges. It is very likely that the NBL will have many of the features present in today's scripting languages: first-class functions, closures, streams/generators, etc.
New market possibilities and ability to respond more quickly. Even if you are not writing Python, other people are. Your clients? Another vendor in the project? Perhaps a critical component was written in some other language? It will cost money and time, if you do not have people who can understand the code and interface with it.
Recruitment. If your company has a reputation of teaching new and interesting stuff to people, it will be easier to recruit the top people. Everyone is doing Java/C#/C++. It is not a very effective way to differentiate yourself in the job market.
Towards answering the updated question, its a chicken/egg problem. The best way to justify an expense is to show how it reduces a cost somewhere else, so you may need to spend some extra/personal time to learn something first to build some kind of functional prototype.
Show your boss a demo like "hey, i did this thing, and it saves me this much time [or better yet, this much $$], imagine if everyone could use this how much money we would save"
and then after they agree, explain how it is some other technology and that it is worth the expense to get more training, and training for others on how to do it better.
I have often found that learning another language, especially a dynamically typed language, can teach you things about other languages and make you an overall better programmer. Learning ruby, for example, will teach you Object Oriented programming in ways Java wont, and vice versa. All in all, I believe that it is better to be a well rounded programmer than stuck in a single language. It makes you more valuable to the companies/clients you work for.
check out the answers to this thead:
https://stackoverflow.com/questions/76364/what-is-the-single-most-effective-thing-you-did-to-improve-your-programming-ski#84112
Learning new languages is about keeping an open mind and learning new ways of doing things.
Im not sure if this is what you are looking for, but we write our main application with Java at the small company I work for, but have used python to write smaller scripts quickly. Backup software, temporary scripts to manipulate data and push out results. It just seems easier sometimes to sit down with python and write a quick script than mess with classes and stuff in java.
Temp scripts that aren't going to stick around don't need a lot of design time wasted on them.
And I am lazy, but it is good to just learn as much as you can of course and see what features exist in other languages. Knowing more never hurts you in future career changes :)
It's all about broadening your horizons as a developer. If you limit yourself to only strong-typed languages, you may not end up the best programmer you could.
As for tasks, Python/Lua/Ruby/Perl are great for small simple tasks, like finding some files and renaming them. They also work great when paired with a framework (e.g. Rails, Django, Lua for Windows) for developing simple apps quickly. Hell, 37Signals is based on creating simple yet very useful apps in Ruby on Rails.
They're useful for the "Quick Hack" that is for plugging a gap in your main language for a quick (and potentially dirty) fix faster than it would take to develop the same in your main language. An example: a simple script in perl to go through a large text file and replace all instances of an email address with another is trivial with an amount of time taken in the 10 minute range. Hacking a console app together to do the same in your main language would take multiples of that.
You also have the benefit that exposing yourself to additional languages broadens your abilities and learning to attack problems from a different languages perspective can be as valuable as the language itself.
Finally, scripting languages are very useful in the realm of extension. Take LUA as an example. You can bolt a lua interpreter into your app with very little overhead and you now have a way to create rich scripting functionality that can be exposed to end users or altered and distributed quickly without requiring a rebuild of the entire app. This is used to great effect in many games most notably World of Warcraft.
Personally I work on a Java app, but I couldn't get by without perl for some supporting scripts.
I've got scripts to quickly flip what db I'm pointing at, scripts to run build scripts, scripts to scrape data & compare stuff.
Sure I could do all that with java, or maybe shell scripts (I've got some of those too), but who wants to compile a class (making sure the classpath is set right etc) when you just need something quick and dirty. Knowing a scripting language can remove 90% of those boring/repetitive manual tasks.
Learning something with a flexible OOP system, like Lisp or Perl (see Moose), will allow you to better expand and understand your thoughts on software engineering. Ideally, every language has some unique facet (whether it be CLOS or some other technique) that enhances, extends and grows your abilities as a programmer.
If all you have is a hammer, every problem begins to look like a nail.
There are times when having a screwdriver or pair of pliers makes a complicated problem trivial.
Nobody asks contractors, carpenters, etc, "Why learn to use a screwdriver if i already have a hammer?". Really good contractors/carpenters have tons of tools and know how to use them well. All programmers should be doing the same thing, learning to use new tools and use them well.
But before we use any power tools, lets
take a moment to talk about shop safety. Be sure
to read, understand, and follow all the
safety rules that come with your power
tools. Doing so will greatly reduce
the risk of personal injury. And remember
this: there is no more important rule
than to wear these: safety glasses
-- Norm
I think the main benefits of dynamic languages can be boiled down to
Rapid development
Glue
The short design-code-test cycle time makes dynamic languages ideal for prototyping, tools, and quick & dirty one-off scripts. IMHO, the latter two can make a huge impact on a programmer's productivity. It amazes me how many people trudge through things manually instead of whipping up a tool to do it for them. I think it's because they don't have something like Perl in their toolbox.
The ability to interface with just about anything (other programs or languages, databases, etc.) makes it easy to reuse existing work and automate tasks that would otherwise need to be done manually.
Don't tell your employer that you want to learn Ruby. Tell him you want to learn about the state-of-the-art in web framework technologies. it just happens that the hottest ones are Django and Ruby on Rails.
I have found the more that I play with Ruby, the better I understand C#.
1) As you switch between these languages that each of them has their own constructs and philosophies behind the problems that they try to solve. This will help you when finding the right tool for the job or the domain of a problem.
2) The role of the compiler (or interpreter for some languages) becomes more prominent. Why is Ruby's type system differ from the .Net/C# system? What problems do each of these solve? You'll find yourself understanding at a lower level the constructs of the compiler and its influence on the language
3) Switching between Ruby and C# really helped me to understand Design Patterns better. I really suggest implementing common design patterns in a language like C# and then in a language like Ruby. It often helped me see through some of the compiler ceremony to the philosophy of a particular pattern.
4) A different community. C#, Java, Ruby, Python, etc all have different communities that can help engage your abilities. It is a great way to take your craft to the next level.
5) Last, but not least, because new languages are fun :)
Given the increasing focus to running dynamic languages (da-vinci vm etc.) on the JVM and the increasing number of dynamic languages that do run on it (JRuby, Grrovy, Jython) I think the usecases are just increasing. Some of the scenarios I found really benifited are
Prototyping- use RoR or Grails to build quick prototypes with advantage of being able to runn it on the standard app server and (maybe) reuse existing services etc.
Testing- right unit tests much much faster in dynamic languages
Performance/automation test scripting- some of these tools are starting to allow the use standard dynamic language of choice to write the test scripts instead of proprietary script languages. Side benefit might be to the able to reuse some unit test code you've already written.
Philosophical issues aside, I know that I have gotten value from writing quick-and-dirty Ruby scripts to solve brute-force problems that Java was just too big for. Last year I had three separate directory structures that were all more-or-less the same, but with lots of differences among the files (the client hadn't heard of version control and I'll leave the rest to your imagination).
It would have taken a great deal of overhead to write an analyzer in Java, but in Ruby I had one working in about 40 minutes.
Often, dynamc languages (especially python and lua) are embedded in programs to add a more plugin-like functionality and because they are high-level languages that make it easy to add certain behavior, where a low/mid-level language is not needed.
Lua specificially lacks all the low-level system calls because it was designed for easeof-use to add functionality within the program, not as a general programming language.
You should also consider learning a functional programming language like Scala. It has many of the advantages of Ruby, including a concise syntax, and powerful features like closures. But it compiles to Java class files and and integrate seamlessly into a Java stack, which may make it much easier for your employer to swallow.
Scala isn't dynamically typed, but its "implicit conversion" feature gives many, perhaps even all of the benefits of dynamic typing, while retaining many of the advantages of static typing.
Dynamic languages are fantastic for prototyping ideas. Often for performance reasons they won't work for permanent solutions or products. But, with languages like Python, which allow you to embed standard C/C++/Java inside them or visa versa, you can speed up the really critical bits but leave it glued together with the flexibility of a dynamic language.
...and so you get the best of both worlds. If you need to justify this in terms of why more people should learn these languages, just point out much faster you can develop the same software and how much more robust the solution is (because debugging/fixing problems in dynamic languages is in my experience, considerably easier!).
Knowing grep and ruby made it possible to narrow down a problem, and verify the fix for, an issue involving tons of java exceptions on some production servers. Because I threw the solution together in ruby, it was done (designed, implemented, tested, run, bug-fixed, re-run, enhanced, results analyzed) in an afternoon instead of a couple of days. I could have solved the same problem using an all-java solution or a C# solution, but it most likely would have taken me longer.
Having dynamic language expertise also sometimes leads you to simpler solutions in less dynamic languages. In ruby, perl or python, you just intuitively reach for associative arrays (hashes, dictionaries, whatever word you want to use) for the smallest things, where you might be tempted to create a complex class hierarchy in a statically typed language when the problem doesn't necessarily demand it.
Plus you can plug in most scripting languages into most runtimes. So it doesn't have to be either/or.
The "real benefit" that an employer could see is a better programmer who can implement solutions faster; however, you will not be able to provide any hard numbers to justify the expense and an employer will most likely have you work on what makes money now as opposed to having you work on things that make the future better.
The only time you can get training on the employer's dime, is when they perceive a need for it and it's cheaper than hiring a new person who already has that skill-set.

Categories