Wrox Programmer Forums
|
BOOK: Beginning C# 3.0 : An Introduction to Object Oriented Programming ISBN: 978-0-470-26129-3
This is the forum to discuss the Wrox book Beginning C# 3.0 : An Introduction to Object Oriented Programming by Jack Purdum; ISBN: 9780470261293
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning C# 3.0 : An Introduction to Object Oriented Programming ISBN: 978-0-470-26129-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 29th, 2010, 07:45 AM
Friend of Wrox
 
Join Date: Feb 2009
Posts: 194
Thanks: 5
Thanked 3 Times in 3 Posts
Default Mathematical puzzles

I found this site whilst searching for something to do on a rainy day, pretty interesting though some of you might enjoy it.
__________________
Follow me on twitter.

Where I work.

Connect with me on LinkedIn

Blog
 
Old May 29th, 2010, 08:54 AM
Friend of Wrox
 
Join Date: Sep 2008
Posts: 234
Thanks: 0
Thanked 32 Times in 30 Posts
Default Programming Problems

The problems presented at this site are not easy, but would be a great exercise for those who have a mathematical bent. If I were still teaching or writing new books, I might even use a few of these as programming exercises. However, I'm retired now (loving it and doing some embedded system programming with microcontrollers--really cool!) and not writing any more books right now. (I have an idea for two new books, but it's just not worth the effort any more. Wrox has found over 20,000 Internet sites that give away illegal electronic copies of their books...kinda reduces the incentive to write a book.)

Anyway, programming practice is the only way to become proficient at programming and the site mentioned here has enough programming problems to keep you out of trouble for a very long time!
__________________
Jack Purdum, Ph.D.
Author: Beginning C# 3.0: Introduction to Object Oriented Programming (and 14 other programming texts)
 
Old May 29th, 2010, 09:02 AM
Friend of Wrox
 
Join Date: Feb 2009
Posts: 194
Thanks: 5
Thanked 3 Times in 3 Posts
Default

Yeah I just moved on to problem two not a very elegant solution might give some of these a go in C++ as I have an interest in using that as well or at least something that doesn't run on .NET.

It's a shame you don't feel like writing any more because I am enjoying reading your C# book and have learnt a lot from it. Perhaps you might enjoy blogging?
__________________
Follow me on twitter.

Where I work.

Connect with me on LinkedIn

Blog
 
Old May 29th, 2010, 03:47 PM
Friend of Wrox
 
Join Date: Sep 2008
Posts: 234
Thanks: 0
Thanked 32 Times in 30 Posts
Default

Thanks for the kind words about my book. I do enjoy writing very much, but it does take a lot of effort to do it right and if you only get paid for every 10th copy or so, it really doesn't make it worth it. If I were still in the publish-or-parish environment, perhaps I'd continue to write, but since I'm retired, I don't have those pressures any more. I have been doing some blogging...
__________________
Jack Purdum, Ph.D.
Author: Beginning C# 3.0: Introduction to Object Oriented Programming (and 14 other programming texts)
 
Old May 29th, 2010, 04:01 PM
Friend of Wrox
 
Join Date: Feb 2009
Posts: 194
Thanks: 5
Thanked 3 Times in 3 Posts
Default

What do you blog about? Link?
__________________
Follow me on twitter.

Where I work.

Connect with me on LinkedIn

Blog
 
Old May 29th, 2010, 04:18 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

I remember running across that site many, many years ago.

Some of those problems aren't as interesting today as they were 8 or 10 years ago.

For example, problem #6 is trivial to to do in very little time on any modern computer.

If you were required to solve the problem by hand, say with just the aid of a 4-function calculator, there is a fairly elegant way to do so. But with a computer it is so much simpler to just use brute force--and it takes so little time--that I doubt anyone would opt for the elegant solution.

And other problems can be done with brute force in a very short time, whereas many years ago we might have tried to find shortcuts to make them execute faster. (Problem #4 seems of that variety, to me.)

OOOG. But then I discovered there is now more than one page! And some of the newer problems!! Ouch! Okay, I see the complexity of the problems *is* keeping up with advances in computer speed and memory! <grin style="lopsided"/>
 
Old May 29th, 2010, 04:33 PM
Friend of Wrox
 
Join Date: Feb 2009
Posts: 194
Thanks: 5
Thanked 3 Times in 3 Posts
Default

I think a new one is added every week or so.. just under 300 so far.
__________________
Follow me on twitter.

Where I work.

Connect with me on LinkedIn

Blog
 
Old May 29th, 2010, 08:13 PM
Friend of Wrox
 
Join Date: Sep 2008
Posts: 234
Thanks: 0
Thanked 32 Times in 30 Posts
Default Blog?

Will:

Mainly I've been hovering around the Arduino sites (there are many) as they are very helpful in the microprocessor coding I've been doing lately. It's been many years since I've done any electronic hardware design, so I've been brushing up there. Checkout Arduino.cc. It's amazing what there small controllers can do.

How's tricks, Old Pendant??
__________________
Jack Purdum, Ph.D.
Author: Beginning C# 3.0: Introduction to Object Oriented Programming (and 14 other programming texts)
 
Old May 30th, 2010, 04:45 AM
Friend of Wrox
 
Join Date: Feb 2009
Posts: 194
Thanks: 5
Thanked 3 Times in 3 Posts
Default

Out of interest are there noticeable performance increase amongst +, -, *,/,% or will it not matter?
__________________
Follow me on twitter.

Where I work.

Connect with me on LinkedIn

Blog
 
Old May 30th, 2010, 06:04 AM
Friend of Wrox
 
Join Date: Feb 2009
Posts: 194
Thanks: 5
Thanked 3 Times in 3 Posts
Default

On top of that problem two deal with the Fibonacci sequence (I remember learning this at school so I thought yeah this wont be too bad) and I don't think it will be but part of it has blown my mind a bit.

So I found the expression for it fn = fn-1 + fn - 2

And I was having some trouble writing this in c# so I found a fibonacci snippet:

Code:
static int Fibonacci(int x)
        {
            if (x <= 1)
                return 1;
            return Fibonacci(x - 1) + Fibonacci(x - 2);
        }
So firstly It seems to be returning itself (huh?) but also stepping through it I realised is it then calling itself a further two times in the part its returning:

Code:
return Fibonacci(x - 1) + Fibonacci(x - 2);
Is that right?
__________________
Follow me on twitter.

Where I work.

Connect with me on LinkedIn

Blog





Similar Threads
Thread Thread Starter Forum Replies Last Post
plsql mathematical function RatanKumar SQL Language 1 May 29th, 2008 09:04 AM
How to do Mathematical expressions (seriously) Apocolypse2005 Beginning VB 6 5 December 15th, 2006 03:35 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.