Tuesday, June 1, 2010

About C / C++ / C#: Programming Challenge 36 Published

If you can't see this email, click here

About.com

C / C++ / C#

Fundamentals

Tips & Tools

Going Pro



From David Bolton, your Guide to C / C++ / C#
Challenge 35 is now marked, with details (and a lovely generated picture) below. Congratulations to Tiaan Geldenhuys for winning. New this week to me was an iPad, a beautiful albeit expensive bit of kit and a machine to develop for, not on! It makes a very nice E-Book reader. Programming Tutorials will be for the iPhone/iPod Touch first and then the iPad. Busy Times! Have a great week!

Programming Challenge 35 Marked + Challenge 36
Knight's Tour generated bu Tiaan GeldenhuysCongratulations to Tiaan Geldenhuys whose C++ entry won in a very fast 0.00001357 seconds, just pipping Gaurav Sarode's entry. Tiaan also gets a 2nd mention for entering two entries (the C# one came 3rd) and including code to output the Knight's Tour as a png graphic (Pictured as a gif).

Challenge 36

This is another speed trial (they're the most popular!) where you have to work out numbers in a Fibonacci like sequence.I say like because it's not the sequence that starts 0,1, the one everyone knows but one that starts with two different numbers. As this is basically brute force maths there's also one more thing to do. Find the closest prime number to that number if it's not a prime number.

ASP.NET MVC Music Store Example
Visual Studio 2010 includes ASP.NET MVC 2.0 and Microsoft have recently released a free working example of a simple music store including an 80 page PDF that walks you through the process of creating that website. However you don't need Visual Studio 2010, as you can download the free Visual Web Developer 2010 Express and SQL Server 2008 Express to try this out. (No purchase necessary!) . This blog entry provides a good overview. The code below (from that example) shows how ASP.NET MVC mixes html and C# to output a list of genres. Everything inside <% is parsed by ASP.NET and the stuff outside is treated as HTML. The PDF covers Master Pages, LINQ extensions, using the Entity Frame Work, Lambda expressions, Models, View and Controllers (the M, V and C in MVC), HTML helpers, Ajax.ActionLinks and use of jQuery. <asp:Content ID=\"Content2\" ContentPlaceHolderID=\"MainContent\" runat=\"server\"> <h3>Browse Genres</h3> <p>Select from <%: Model.NumberOfGenres %> genres:</p> <ul> <% foreach (string genreName in Model.Genres) { %>   <li> <%: genreName %>   </li> <% } %> </ul> </asp:Content> If you are new to ASP.NET and MVC in particular, this example provides a handy jump up the learning curve. Recommended.

Blackberry App Development in C#
If you know Blackberry development (which I don't!), you'll know that it's programmed in Java. Version 2.0 of C# wasn't that much actually different from Java because they were about 90-95% identical. Both languages have drifted apart somewhat with newer versions but still retain remarkable similarity. A friend of mine Lennie De Villiers has a blackberry and wants to write C# code for it. Naturally it will need translating into Java so he has started a project to create a translator from C# that outputs Java that runs on your Blackberry. My full-time job is in the kind of Enterprise environment that uses Blackberrys and develops Apps internally but I'm sure the C# developers there would welcome this. If you're interested in helping the project, contact Lennie via the Contribution Wanted Page.

Never Programmed Before? Start Here
Learn how to program computers as a living or just for recreational fun. Find out how to make a computer do what you want.

 


C / C++ / C# Ads
Featured Articles
Other Blogs You might find Interesting
Welcome to the C Area with Articles about C Programming
Welcome to the C++ Area with Articles about C++ Development
Welcome to the C Sharp Area with Articles about C Sharp Development
Learn about Commercial Software Development
All about Games Programming

 

More from About.com

Great Stuff Kids Love
From the hottest tunes and best online videos to favorite books and classic toys, here are our top picks for the kids in your life. More >



Join About.com's User Panel!
Share your opinions and help us make About.com more relevant, informative and enjoyable to use. More>




This newsletter is written by:
David Bolton
C / C++ / C# Guide
Email Me | My Blog | My Forum
 
Sign up for more free newsletters on your favorite topics
You are receiving this newsletter because you subscribed to the About C / C++ / C# newsletter. If you wish to change your email address or unsubscribe, please click here.

About respects your privacy: Our Privacy Policy

Contact Information:
249 West 17th Street
New York, NY, 10011

© 2010 About.com
 


Must Reads
Programming Challenges
About C, C++ and C#
C++ for Beginners
C++ Programming
Intro to OOP

Advertisement

No comments: