I was reading the example chapter from the book by Ayende and on the website of the Boo language I saw a reference to the Specter BDD Framework.
I am wondering if anybody is using it in their project, how that works out and if there are more examples and/or suggested readings.
Just in case you are wondering, I'm a C# developer and so I plan to use it in a C#/.NET environment.
A few year later visiting this question. I think we can safely assume Specflow and some others like NSpec became the tools we are using.
I'm not using it, but I've seen demos of it. It's very nice.
Boo has a lot of interesting extensibility points in parsing and interpreting the language itself that make it ideal for writing frameworks like Specter. The end result is much nicer looking than you'd be able to get with languages like C#.
Unfortunately, the fact that Boo isn't "in the box" and can't simply be something you check into your source tree and use really holds it back here. It's a much heavier adoption cost than just picking a framework like NSpec.
I have used it a little, I'm starting a new project right now and I plan on using specter. I'm really enjoying it.
Related
F# has recently caught my eye as something I'd like to learn more about, but I have never used the .NET platform and know very little about it. If I want to write a small website in .NET core can I do that with only F# or will I need to expand my learnings to include C#?
You can definitely use .NET Core with pure F#. There is no C# knowledge required, though it can be beneficial to familiarize yourself with it enough to understand usage and library documentation.
The official Getting Started with F# guide has a section on using .NET Core with "just F#", which you can use as a starting point.
As for writing a website, I highly recommend looking at the SAFE Stack intro, docs, and samples. It shows how you can use only F# for full stack web development, all using .NET Core.
This depends on your learning and working style.
Technically, F# does not need any support from C#. You can write complete programs of any kind whatsoever without ever touching C#.
However, a lot of F# resources online are geared towards migrating from C# to F#, and as a result are phrased in terms of the differences between the two. Something like "you've been doing this thing in C# before, but here's how it can be done way better in F#".
Additionally, a lot of .NET libraries are written in C#. The binaries are, of course, completely compatible with F#, so you don't need to do any sort of special tricks to use C#-written libraries. However, if you ever want to look at the source code, that's where C# knowledge would come in handy.
To be fair, there is quite a large number of F#-exclusive libraries out there, but the majority of .NET libraries are still in C#. So chances are, you will end up using some of them. Whether you would actually want to look at their source - that depends on your style.
There are some libraries that I could never get working nicely in F#, so I tend to have some C# projects built into my solution to handle things that I just could not find an elegant way of doing in F# - like using the high level "Nest" Elasticsearch driver. It is designed to give you very elegant code in C# but I found it was the exact opposite in F#, sort of defeating the point of using a high level driver.
C# is nothing to fear though, it is readable and intuitive for the most part. I came into F# with no knowledge of .NET and have learned what I've needed as I've gone along without any troubles.
I need to test various famous classification methods like kNN, ID3 and ... on a huge data-set of a project, and choose one for future use.
I have no limitation on language but performance and readable code both in learning and classification phase are very important.
therefore, I'm looking for a good library with following features:
includes various classification methods
high performance
easily usable
any suggestions?
You shuold take a look at PyBrain, a great machine learning module for Python. Can't tell you much about it, because I never really used it (just read about it and looked at several projects solved with it), but it seems to be very good.
You may also want to take a look at this list of Python machine learning modules:
http://web.media.mit.edu/~stefie10/technical/pythonml.html
Or at this SO question:
Is there a recommended package for machine learning in Python?
Try scikit learn - it is written in python and has variety classifiers and also metods for testing them.
Take a look at RapidMiner which comes with a Java-API and graphical tools for data mining. The community edition is free, I think.
I used the predecessor of this tool/library as a student but do not have professional experience with it, though.
I am looking for a tool that can convert a PHP application into ASP.Net application either c# or VB.Net.
I tried using the 'PHP to ASP.NET Migration Assistant' from microsoft but it leaves a lot of code un coverted and doesn't even create proper codebehind files.
Any ideas or tools that you know?
It's not going to work, sorry. Not only are the languages very different (the biggest difference arguably being that one is dynamically typed and the other is statically typed), but the entire architecture of the environment is vastly different. No automated tool is going to overcome this.
Even if you can find a tool that claims to accomplish this, it's going to emit terrible .NET code. It probably won't use any of the server controls, or at least not use any of them correctly. It's going to force the .NET code to try to do things "the PHP way" and end up costing you a ton in performance and maintainability.
Basically, there's just no way, reasonable or otherwise, to do what you're trying to do. Think of it this way... Have you ever seen automated translations between vastly different spoken languages? The results are humorous to say the least, and they are not accurate representations of the target language.
You're going to need a developer (or team of developers) to do this.
I don't think you can convert automatically a full php application into dotnet, as SLaks said, these languages are very different.
I started dotnet a half year ago, after years in php, and it's really different. You cannot use common techs from php, but you can use anothers. It's a different approach with different advantages, so an automatic tool can't do this.
Maybe you can convert some general php structures with a tool, but it won't be as good as if you write it by hand. And a complete app is nearly impossible.
For example, how would you convert a native php template based view system automatically? Maybe you can achieve this (never say impossible), but you shouldn't waste your time.
You can finish it much faster by hand than searching for a probably non-existent (or not good enough) tool.
As others have stated, an automatic converter from php to c#/asp.net is going to leave a lot to be desired.
Your question got me thinking (well, googling) about php on .net. My search found this: Welcome to Phalanger 2.x.
I don't know how mature it is (though being at 2.x implies some level of maturity); but I'm thinking that with something like this you can port your code over time, while still having the app up and running and still making incremental improvements to the application.
You can now run PHP on .NET with interop using http://phalanger.codeplex.com Some genius dun it!
I started my career coding in C/C++ on a vax system, but got into a few contracts where it was all VB and then became a specialist in VB, then to VB.net. Now I am aspiring to work for Microsoft and it seems that every job they post is in C/C++/C# and I can barely read C# code, it looks like the most convoluted mess to me and the inline syntax almost hurts my feelings.
I am looking for positive, non-flaming, helpful suggestions on how to pick up C# skills again. Books..Labs..etc? I have been coding simple projects using Silverlight and C# to try and work it out but it is extremely frustrating since there are very few examples that I can find that illustrate what each code set looks like. I've Googled but have yet to find anything helpful other than channel9 labs and working through some of the example code/projects from mix10.
I am not looking for a shortcut, but a good solid skills understanding. I swear it is easier to translate English to Latin than VB to C#.
I personally would start by converting a VB.NET project into C#, having done VB.NET it wouldn't be difficult once you got started as they both use the same underlying CLR.
Doing it this way step by step, looking up how to convert each bit you don't understand, you'll soon end up teaching yourself C# based on you're knowledge of VB.NET and you'll see they're really not that much different!
I find them very similar now I know them both, they just have a habit of doing things 'slightly' differently.
Also, have a look at this wiki page for a summary comparison of VB.NET and C#, and check out the examples at the bottom to see some basic syntax comparisons that will give you a starting point for converting VB.NET into C#.
Since VB.NET and C# are both first-class object-oriented .NET languages that compile down to the nearly the same CIL code, I find it fairly easy to switch between the two. Most of the learning curve in .NET comes from learning the myriad APIs; syntax doesn't take terribly long to pick up.
I'd recommend a good book that focuses on the language of C# (that is, not a framework such as Winforms, Silverlight, or WPF). A book that I really liked was Illustrated C# 2008 by Daniel Solis. It's great at exposing the C# language from end to end. (NOTE: Although it says "Illustrated" in the title, it's not filled with lots of pretty pictures. "Illustrated" simply means that the author uses lots of helpful diagrams to explain concepts).
Also, I spent a good deal of time solving math problems at http://www.projecteuler.net in order to learn C#. It helps to have real problems to solve to learn a language and Project Euler offers problems that are small enough that you can still focus on learning different aspects of the language.
It's odd that you are having this difficulty if you can still remember anything about C. I have a similar background but I don't find C# hard to read at all.
Are you getting confused by LINQ or lambdas / anonymous methods? EDIT you say it's LINQ: here are some links for LINQ.
The LINQ syntax is different in VB from C# and there's not much help out there for the VB syntax. The MSDN 101 VB LINQ samples are good, and I also liked the coverage in the book Programming VB 2008.
Lambdas are a way of writing methods inline that might be the "inline syntax" you are referring to? In which case, just read up on them and try them out: you could try them out in C# or VB.Net.
There were some useful articles on differences between C# and VB.Net in Visual Studio magazine back in Jan 2008.
What VB developers should know about C#
And for completeness, What C# developers should know about VB
You might also be interested in the question "what's allowed in VB that is prohibited in C# (or vice versa)"
Full disclosure: the bottom part of this answer is copied almost unchanged from this question on converting C# knowledge to VB.Net
Buy "Head first C#" and enjoy yourself coding. It is the best book (according to me and a few others) on the market learning C#.
Scott Hanselman posts a regular column of his blog called the "Weekly Source Code", which is made of source code -- generally C# --- which you can learn from by reading.
My first choice is that given by W69rdy: convert some project you've already done in VB to C#.
Second, I would skim the C# documentation, or an online source like that suggested by James, at least once a day looking for something you don't understand. Perhaps something as simple as a language keyword you don't recognize. Then write something that uses it: even something as simple as a small snippet.
If you are looking for a quick read and tutorial, this one will work. I agree with #TechNeilogy and #W69rdy that converting a program from VB.NET to C# will help with understanding the similiarities and differences between the languarges.
I converted a VB.NET Windows service to a C# Windows service and it helped greatly with trying to learn C#.
I was a VB .NET programmer as well. I found that using Jetbrain's Resharper Visual Studio plug-in really helped my learning curve. I was initially converting/optimizing a VB .NET project into C# and I found the coding assistance tools really helpful. Most of the time, I was just trying to find the C# equivalent so code completion usually put me in the right direction.
I've also recently been moving to C# from VB - I've found this converter invaluable as a learning tool when you don't know a bit of C# syntax but you can write it in VB.
You should start with some C# tutorials in internet to understand the how to work with c#, then read a book with maximum 300 pages.
After that you can start the converting from VB to C#. It is not difficult.
Good luck.
I use both vb.net and c# at work. Sometimes in the same project even. Honestly, when you switch back and forth, after the first couple misplaced or missing ; or Dim's, it's pretty easy to jump between the two. The rest of the stuff (class modifiers, event handlers, etc.) is only a quick google away.
The only way you are really going to make the step across, is to just make the step across and run with it!
Sure, check out a basic tutorial or read a guide on C# to learn the syntax basics, but then you need to find a reasonably simple, self-contained project to get stuck into. If you know some of the .NET framework (which you presumably do), then the jump won't actually be that great. Obviously, don't pick a vast, complex, mission-critical system to start with!
In fact, although my current project is my first c# project, I can't believe I didn't make the switch earlier. Apart from enjoying C#, I'm also finding it easier because I'm finding there are more good quality examples around.
I don't mean this patronisingly, but the answer is to simply start coding in C#!
There are plenty of books, resources, training CDs (check out AppDev.com for some great video based training) but nothing compares to just coding for real-life problems!
(And I agree with a previous comment about converting a recent project to C#.)
"That which we learn to do, we learn by doing" Aristotle
I am new to C#, C++ and .Net.
I am currently returning to programming from a stint in Networking and Cisco engineering. I used to program on IBM mainframes etc using Cobol, assembler, easytrieve, Rexx and clist etc so the command syntax is reasonably familiar to me as are programming standards and structures.
However I am having quite a bit of trouble getting to grips with the BCL and understanding the various components and what each is designed for and which is best to use in various situations, and in fact how some are actually used and coded.
I am often scratching my head wondering how the code came about from the descriptions I have found about the BCL components. Basically how to use them and code them seems to be a black art with no intuitive means at all.
So my question is, apart from the msdn library, which I am finding to be a bit over complicated for my current needs, is there any good reference book, site, pdf that can give me a reasonable description, usage notes etc of the most commonly used .NET components such as System.IO etc ?
I have read a few book on C# etc and have found a small program that does part of what I need to do in a project I have, requiring acces to devices via RS-232 ports, but when decoding the program I find myself wondering why the person used the components he did and how would I know which components I should use when I make the changes I need to and add in the extra code that I require and how do I actually use these components when I do find them ?
I do realise a lot of this will be down to plain old experience, but a helping hand in the right direction would really help a lot.
Many thanks, George.
C# 3.0 in a Nutshell is good for this, as is Accelerated C# 2008. I think I'd personally recommend Nutshell more.
Note that the next edition of Nutshell is being prepared - but I don't know what the timeframe is. (I'm sure there'll be a slew of books for .NET 4.0.)
(Note of bias: I'm a tech reviewer for C# 4.0 in a Nutshell, so I'm clearly not 100% impartial.)
I often use Google in preference to the standard Help, there are often better examples out there.