Karl Seguin

Sponsors

The Lounge

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Foundations of Programming Ebook

I'm excited to finally release the official, and completely free, Foundations of Programming EBook. This essentially contains all 9 Foundation parts including a conclusion and some typical book fluff (table of content, acknowledgement and so on). A number of spelling errors were corrected, along with some small technical changes and clarifications - largely based on feedback, so thanks for everyone who provided it! Otherwise it's exactly the same as what's been posted here over the past several months.

Download it from http://codebetter.com/files/folders/codebetter_downloads/entry179694.aspx

Download the CodeBetter.Canvas Learning Application to see the foundations applied in practice: http://codebetter.com/blogs/karlseguin/archive/2009/09/01/canvas-gets-a-spark.aspx

 Foundations Of Programming 

If the above link fails, you can also get it from http://www.openmymind.net/FoundationsOfProgramming.pdf

You can also download the raw .docx file from http://openmymind.net/FoundationsOfProgramming.docx


Posted Tue, Jun 24 2008 9:53 PM by karl
Filed under:

[Advertisement]

Comments

Rob wrote re: Foundations of Programming Ebook
on Wed, Jun 25 2008 12:33 AM

You rock!

Bryan Reynolds wrote re: Foundations of Programming Ebook
on Wed, Jun 25 2008 12:57 AM

Very cool!  Thanks!

DotNetKicks.com wrote Foundations of Programming Ebook
on Wed, Jun 25 2008 1:18 AM

You've been kicked (a good thing) - Trackback from DotNetKicks.com

Shadi Marei wrote re: Foundations of Programming Ebook
on Wed, Jun 25 2008 1:36 AM

Excellent idea Karl.

Grant Palin wrote re: Foundations of Programming Ebook
on Wed, Jun 25 2008 1:37 AM

Excellent - yay for free ebooks!

David Tchepak wrote re: Foundations of Programming Ebook
on Wed, Jun 25 2008 1:44 AM

Thanks for this Karl. It is a great read. You've done a terrific job.

Stephen Smith wrote re: Foundations of Programming Ebook
on Wed, Jun 25 2008 3:16 AM

Just an expression of thanks for all the educational and inspirational blogs from all the bloggers I find at codebetter.com. (Jeremy Miller should be blogging at a sustainable pace! Not prolifically.)

I would attribute half of my effectiveness as a developer to the power of the practices I use so I am always looking to discover more powerful practices and to evangelise them with in my own work environments. I love what I do, I love doing lots of it and each time I do it I love doing it better, smarter based on what I have learnt from doing, from working with others and from my own continuing professional development activities such as the codebetter site and the Alt.NET and Agile/XP community. The ALTernative to writing testable code is writing DEtestable code.

I would attribute the other half of my effectiveness to my ability to contribute to a team. It is a team that delivers business value, not individuals. The question of what makes a team so much more than the sum of its parts is just as applicable to a development team as it is to a sporting team.

Having said all that for the lack of Agile/XP/Alt,NET opportunities in the .NET space I find myself a square peg in a round hole on an "MSDN Microsoft" project that has never yet delivered anything after 4 1/2 years. Being a greenfields project we can always  upgrade to the latest Microsoft Visual tooling. Several weeks ago the CEO said in summary "we are using the latest Microsoft technologies so it must be good." I am sure that is what Microsoft Marketing would love to hear. It could be described that the project has degenerated into a research project into the latest Microsoft technologies.

Reflective Perspective - Chris Alcock » The Morning Brew #122 wrote Reflective Perspective - Chris Alcock » The Morning Brew #122
on Wed, Jun 25 2008 3:26 AM

Pingback from  Reflective Perspective - Chris Alcock  » The Morning Brew #122

thomasvochten.be wrote Foundations of Programming eBook
on Wed, Jun 25 2008 3:48 AM

Foundations of Programming eBook

mdm wrote re: Foundations of Programming Ebook
on Wed, Jun 25 2008 5:15 AM

Hi, there's a typo in the Acknowledgement "either working, learning, writing our playing" should read "either working, learning, writing or playing". Am I right?

Just my 2c.

at3r wrote re: Foundations of Programming Ebook
on Wed, Jun 25 2008 5:42 AM

love your articles, more more I want more. No really is there more?

Eduardo Costa wrote re: Foundations of Programming Ebook
on Wed, Jun 25 2008 5:58 AM

Very nice work! Congratulations!

Eduardo Costa.

.NET Developer Notes wrote Free Foundations of Programming Book by Karl Seguin
on Wed, Jun 25 2008 6:20 AM

Free Foundations of Programming Book by Karl Seguin

Dew Drop - June 25, 2008 | Alvin Ashcraft's Morning Dew wrote Dew Drop - June 25, 2008 | Alvin Ashcraft's Morning Dew
on Wed, Jun 25 2008 8:28 AM

Pingback from  Dew Drop - June 25, 2008 | Alvin Ashcraft's Morning Dew

Dan Martin wrote re: Foundations of Programming Ebook
on Wed, Jun 25 2008 8:33 AM

Thanks for the book!

karl wrote re: Foundations of Programming Ebook
on Wed, Jun 25 2008 8:40 AM

Thanks for the love all.

@mdm

Damn you! the one part I didn't have her read over, of course there'd be a typo. I doubt it's the only one though...I can always hide behind the free part ;)  I'll queue a bunch up and transparently post a new version at some point :)

Brendan Tompkins wrote re: Foundations of Programming Ebook
on Wed, Jun 25 2008 9:20 AM

Oh my God!  What an amazing contribution to our field!  And under such a great license.  This is truly an accomplishment!  

Jay Smith » Free Foundations of Programming E-book by Karl Sequin wrote Jay Smith » Free Foundations of Programming E-book by Karl Sequin
on Wed, Jun 25 2008 10:31 AM

Pingback from  Jay Smith » Free Foundations of Programming E-book by Karl Sequin

Cihat Altuntaş wrote re: Foundations of Programming Ebook
on Wed, Jun 25 2008 10:48 AM

Iam a big fun of your series. And finally EBook . Its a great resource Thanks Karl

Angel "Java" Lopez wrote Libro Foundation of Programming, listo para bajar
on Wed, Jun 25 2008 11:49 AM

Gracias a Cladio M.E. Bastos Iorio de http://www.blumer.com.ar me entero de la aparición de este libro

Ferry de Boer wrote re: Foundations of Programming Ebook
on Wed, Jun 25 2008 11:55 AM

Thanks for the great contribution to the community. I've read some of your elaborated posts and I definately loved them. I'm going to read this asap.

wrote Foundations of Programming Ebook - Karl Seguin (Free!)
on Wed, Jun 25 2008 3:43 PM

No me gusta repetir post ya se de Geeks.ms o de otro universo, pero bueno esto es interesante y quería

Arjan`s World » LINKBLOG for June 25, 2008 wrote Arjan`s World » LINKBLOG for June 25, 2008
on Wed, Jun 25 2008 5:04 PM

Pingback from  Arjan`s World    » LINKBLOG for June 25, 2008

david wrote re: Foundations of Programming Ebook
on Wed, Jun 25 2008 5:37 PM

Many thanks for this.  The best introduction I've come across to the .NET world beyond WebForms + DataSets

Karl Seguin wrote Foundations of Programming - PDF
on Wed, Jun 25 2008 8:21 PM

UPDATED: There's an official free ebook now available here . Tim Barcz was kind enough to compile

TrackBack wrote http://dotnetkicks.com/other/foundations_of_programming_ebook
on Wed, Jun 25 2008 8:22 PM
TrackBack wrote http://dotnetslackers.com/_net/re-118212_foundations_of_programming_ebook.aspx
on Wed, Jun 25 2008 8:22 PM
Andres wrote re: Foundations of Programming Ebook
on Wed, Jun 25 2008 10:07 PM

Thank you. I really appreciate this.

Skwr wrote re: Foundations of Programming Ebook
on Thu, Jun 26 2008 12:07 AM

Any chance of an A4 version of this?

links for 2008-06-26 | Michael Koby (mkoby.com) wrote links for 2008-06-26 | Michael Koby (mkoby.com)
on Thu, Jun 26 2008 1:31 AM

Pingback from  links for 2008-06-26 |  Michael Koby (mkoby.com)

giovanni wrote re: Foundations of Programming Ebook
on Thu, Jun 26 2008 3:58 AM

Excellent work .... and it's free also

gi wrote re: Foundations of Programming Ebook
on Thu, Jun 26 2008 3:59 AM

excellent work ..and it's also free

Ειδήσεις του dotNETZone.gr wrote Foundations of Programming Ebook from codebetter.com
on Thu, Jun 26 2008 6:00 AM
Daniel wrote re: Foundations of Programming Ebook
on Thu, Jun 26 2008 11:28 AM

Great contribution! What did you use for your code listings? They look slick.

karl wrote re: Foundations of Programming Ebook
on Thu, Jun 26 2008 11:56 AM

@Skwr: unlikely

@Daniel: manual labor

Janko wrote re: Foundations of Programming Ebook
on Thu, Jun 26 2008 6:38 PM

What a great idea! Thanks!

steve j wrote re: Foundations of Programming Ebook
on Thu, Jun 26 2008 10:06 PM

Thanks for sharing your hard work.

I've just begun looking at Workflow Foundation. It appears to be an architecture that's bigger than its name. For example, in the Shukla/Schmidt book, the authors make it a point to favor  "WF" over "workflow" (which they insist is "colloquial", whatever they mean by that).

I'm early into it but have the sense that everything you're advocating here --and more-- might be subsumed by coding to the WF model/architecture. Among other things, DI is just built in (if not called out as such).

Microsoft has undersold this piece IMO. Perhaps they're building on it themselves (like they once did with COM, e.g. VBA, IE, etc.). Sharepoint and Biztalk are just the obvious clients.

It's worth a look,  anyway.

joeyDotNet wrote How did I get started in software development?
on Fri, Jun 27 2008 1:03 AM

How did I get started in software development?

Foundations of Programming - free ALT.NET e-book « HSI Developer Blog wrote Foundations of Programming - free ALT.NET e-book « HSI Developer Blog
on Fri, Jun 27 2008 3:12 PM

Pingback from  Foundations of Programming - free ALT.NET e-book « HSI Developer Blog

Geek Book » Foundations of Programming - Free Ebook wrote Geek Book » Foundations of Programming - Free Ebook
on Sat, Jun 28 2008 8:18 PM

Pingback from  Geek Book » Foundations of Programming - Free Ebook

Dragos wrote re: Foundations of Programming Ebook
on Sun, Jun 29 2008 6:11 PM

Thank you very much for the book!

Weekly Link Post 48 « Rhonda Tipton’s WebLog wrote Weekly Link Post 48 « Rhonda Tipton’s WebLog
on Sun, Jun 29 2008 6:18 PM

Pingback from  Weekly Link Post 48 « Rhonda Tipton’s WebLog

???????????????????? ???? ???????????? ???????? » Blog Archive » ???????? ???????????????????? ????????????: ???????????? ???????????? ?????????? wrote ???????????????????? ???? ???????????? ???????? » Blog Archive » ???????? ???????????????????? ????????????: ???????????? ???????????? ??????????
on Sun, Jun 29 2008 10:15 PM

Pingback from  ???????????????????? ???? ???????????? ????????  » Blog Archive   » ???????? ???????????????????? ????????????: ???????????? ???????????? ??????????

Weekly Links #7 | GrantPalin.com wrote Weekly Links #7 | GrantPalin.com
on Mon, Jun 30 2008 1:21 AM

Pingback from  Weekly Links #7 | GrantPalin.com

Alex on ASP.NET wrote Leseempfehlung: Foundations of Programming (kostenloeses eBook)
on Mon, Jun 30 2008 4:07 PM

Leseempfehlung: Foundations of Programming (kostenloeses eBook)

Hello World :-) wrote EBook - Foundations of Programming
on Tue, Jul 1 2008 6:38 AM

Voici un lien vers un excellent EBook de Karl SEGUIN (un contributeur régulier du site CodeBetter.com

Buchempfehlung: Foundation of Programming (eBook) | Code-Inside Blog wrote Buchempfehlung: Foundation of Programming (eBook) | Code-Inside Blog
on Tue, Jul 1 2008 8:52 AM

Pingback from  Buchempfehlung: Foundation of Programming (eBook) | Code-Inside Blog

Thomas wrote re: Foundations of Programming Ebook
on Tue, Jul 1 2008 12:38 PM

Excellent work, Karl. Thanks.

Daily Blog Post 07/01/2008 « Murratore’s Weblog wrote Daily Blog Post 07/01/2008 « Murratore’s Weblog
on Tue, Jul 1 2008 6:58 PM

Pingback from  Daily Blog Post 07/01/2008 « Murratore’s Weblog

Beginner’s Mind « HSI Developer Blog wrote Beginner’s Mind « HSI Developer Blog
on Wed, Jul 2 2008 5:47 PM

Pingback from  Beginner’s Mind « HSI Developer Blog

Johan Lindfors wrote re: Foundations of Programming Ebook
on Thu, Jul 3 2008 1:16 AM

Great resource Karl, well worth the read both for beginners and advanced .NET developers in my opinion.

I'm a bit surprised 'though that a book on "Foundations of programming" doesn't include a chapter or at least some notes on Security.

Kostenloses E-Book « Kostja’s .NETte Welt wrote Kostenloses E-Book « Kostja’s .NETte Welt
on Fri, Jul 4 2008 10:06 AM

Pingback from  Kostenloses E-Book « Kostja’s .NETte Welt

Bite my bytes wrote Links of the Week #43 (week 27/2008)
on Sun, Jul 6 2008 5:05 PM

Links of the Week #43 (week 27/2008)

Zunanji viri wrote Links of the Week #43 (week 27/2008)
on Mon, Jul 7 2008 3:56 AM

Development Foundations of Programming Ebook - Free eBook from Karl Seguin. Microsoft Visual C# 2008

Derik Whittaker wrote Foundations of Programming EBook - Great Read & ITS FREE
on Thu, Jul 10 2008 9:38 AM

If you have not hear, Karl Seguin has authored a great, short eBook which he is giving away free to the

DaRage wrote re: Foundations of Programming Ebook
on Thu, Jul 10 2008 10:38 AM

I've been following the series from the begging and I should say that I learned a lot and it pointed me to great ideas.

Many thanks

Sean Kearon wrote re: Foundations of Programming Ebook
on Thu, Jul 10 2008 6:12 PM

Karl - great book, thanks!

Yann Trevin wrote re: Foundations of Programming Ebook
on Fri, Jul 11 2008 7:13 AM

Karl, there is a typo at page 14. You wrote: "The first thing we'll do is create three classes:", then you list in the example FOUR classes (Car, Model, Package, and Upgrade).

karl wrote re: Foundations of Programming Ebook
on Fri, Jul 11 2008 8:14 AM

Yann:

Thanks. I'm making all corrections as they come in. I haven't pushed out a new version yet (there hasn't been anything really major), but I will eventually.

Jason Clark wrote re: Foundations of Programming Ebook
on Fri, Jul 11 2008 8:22 AM

Simply put, reading this book has helped me understand why I wasn't happy developing the "MSDN" way, and helped me see what all the fuss was about.  Thanks so much for your time and effort in helping effect change in the community.

Yann Trevin wrote re: Foundations of Programming Ebook
on Fri, Jul 11 2008 8:31 AM

Typo at page 22. In the sample query, you wrote "Updagrades" as table name instead of "Upgrades".

Your book is very interesting. I like in particular the examples you have chosen. They are simple, concise, and yet complete and very explicit. Congratulations.

Scott Isaacs wrote re: Foundations of Programming Ebook
on Fri, Jul 11 2008 10:04 AM

Karl -

Really looking forward to reading the book.  Was hoping to read it on my WM6 phone, but the format doesn't seem to be working for that.  Oh well, laptop and/or paper will have to do.  :)

Thanks,

SI

Elegant Code » Book review: Code Leader - Using People, Tools and Processes to Build Successful Software wrote Elegant Code » Book review: Code Leader - Using People, Tools and Processes to Build Successful Software
on Sat, Jul 12 2008 4:56 AM

Pingback from  Elegant Code » Book review: Code Leader - Using People, Tools and Processes to Build Successful Software

Dave Mellors wrote Learning how to program - again!
on Sun, Jul 13 2008 5:06 AM

The problem with not programming all the time is keeping up with the constant developments in programming

leo lear wrote re: Foundations of Programming Ebook
on Mon, Jul 14 2008 4:11 AM

I am so glad I found your pdf. It's gonna change the way I code forever. Thank you.

Yann Trevin wrote re: Foundations of Programming Ebook
on Mon, Jul 14 2008 4:18 AM

Typo at page 24: again "Updagrades" instead of "Upgrades".

Type at page 62: 2 closing parenthesis in 2nd paragraph.

Format inconsistency at page 66: the final 'y' character of "try/finally" has not the expected format.

MarkFreed wrote re: Foundations of Programming Ebook
on Mon, Jul 14 2008 6:00 PM

Fantastic book!

Here are a few minor corrections to consider adding to your list:

Page 31

Change the link to the StructureMap website from "structuremap.sourceforge.net)" to "structuremap.sourceforge.net"

Page 70

Code example:

Missing closing brace '}' in the try block.

Page 71

Code example:

In UpgradeException method change:

_upgradeId = i.GetInt32("upgradeId");

to:

_upgradeId = info.GetInt32("upgradeId");

In GetObjectData method change:

 info.AddValue("upgradeId", _upgradeId);

to:

   i.AddValue("upgradeId", _upgradeId);

Also consider calling base.GetObjectData(i, c) and adding a closing brace '}' to this method.

Thanks for such an excellent book.

Foundations of Programming - Learning Application - taccato! trend tracker, cool hunting, new business ideas wrote Foundations of Programming - Learning Application - taccato! trend tracker, cool hunting, new business ideas
on Sat, Jul 19 2008 1:06 PM

Pingback from  Foundations of Programming - Learning Application - taccato! trend tracker, cool hunting, new business ideas

Andrei Ignat Blog wrote Despre fundatiile programarii
on Tue, Jul 29 2008 8:49 PM
So you want to learn NHibernate - Part 1/2, Prerequisites (or NHibernate = Marijuana.NET) « HSI Developer Blog wrote So you want to learn NHibernate - Part 1/2, Prerequisites (or NHibernate = Marijuana.NET) « HSI Developer Blog
on Thu, Jul 31 2008 1:53 PM

Pingback from  So you want to learn NHibernate - Part 1/2, Prerequisites (or NHibernate = Marijuana.NET) « HSI Developer Blog

dbones notes wrote Alt.Net events are in the UK
on Sat, Aug 2 2008 1:40 PM

Alt.Net events are in the UK

Louise wrote re: Foundations of Programming Ebook
on Sun, Aug 3 2008 10:02 PM

Congratulations Karl !!

Karl Seguin wrote Back to Basics: LinkedLists
on Mon, Aug 4 2008 3:04 PM

I tend to subscribe to the belief that programmers with some C background are typically better off than

Community Blogs wrote Back to Basics: LinkedLists
on Mon, Aug 4 2008 4:00 PM

I tend to subscribe to the belief that programmers with some C background are typically better off than

OASIS Development Blog wrote Finding our collective development identity
on Fri, Aug 8 2008 9:18 AM

Finding our collective development identity

So you want to learn NHibernate - Part 0.5, Prerequisites (or NHibernate = Marijuana.NET) | The Freak Parade wrote So you want to learn NHibernate - Part 0.5, Prerequisites (or NHibernate = Marijuana.NET) | The Freak Parade
on Fri, Aug 8 2008 6:39 PM

Pingback from  So you want to learn NHibernate - Part 0.5, Prerequisites (or NHibernate = Marijuana.NET) | The Freak Parade

IAmNotMyself wrote Foundations of Programming Ebook
on Mon, Aug 11 2008 12:50 AM

Foundations of Programming Ebook

Karl Seguin wrote What's in a Title?
on Thu, Aug 14 2008 11:56 AM

The relative hype around the Foundation ebook has been pretty fun. Today I noticed a very detailed (and

Community Blogs wrote What's in a Title?
on Thu, Aug 14 2008 1:14 PM

The relative hype around the Foundation ebook has been pretty fun. Today I noticed a very detailed (and

What’s in a Title? - taccato! trend tracker, cool hunting, new business ideas wrote What’s in a Title? - taccato! trend tracker, cool hunting, new business ideas
on Thu, Aug 14 2008 3:19 PM

Pingback from  What’s in a Title? - taccato! trend tracker, cool hunting, new business ideas

Román (roman dot fq at gmail dot com) wrote re: Foundations of Programming Ebook
on Wed, Aug 20 2008 6:12 AM

Karl

I have a bunch of friends that will love reading something about this, I think it is going to be a good shift in the way they code right now. But their ability to read in English is not that great. Do you know of any translation or are willing to accept any translation to Spanish? I'd offer myself and will thoroughly read the license. Left my email in the Name, please let me know....

karl wrote re: Foundations of Programming Ebook
on Wed, Aug 20 2008 7:06 PM

Translations are welcomed. Roman, I'll get in touch and we can speak further.

.NET Charm wrote Code Better
on Fri, Aug 22 2008 12:16 PM

Code Better

martins privates blog : » eBook: Foundations of Programming wrote martins privates blog : » eBook: Foundations of Programming
on Mon, Aug 25 2008 1:22 AM

Pingback from  martins privates blog :   » eBook: Foundations of Programming

ddd wrote ddd
on Wed, Sep 10 2008 10:39 PM

Pingback from  ddd

Keith Rull wrote Keith's Free eBook Recommendations Of The Month
on Thu, Sep 11 2008 7:11 PM

Speaking of free books... Below are the list of free ebooks that I recommend reading/downloading for

Alt.NET UK Conference 2.0 at Mark Needham wrote Alt.NET UK Conference 2.0 at Mark Needham
on Sun, Sep 14 2008 11:33 AM

Pingback from  Alt.NET UK Conference 2.0 at Mark Needham

Vijay Patel wrote re: Foundations of Programming Ebook
on Mon, Sep 15 2008 7:52 AM

Excellent reading material!  I've recommended this eBook to my entire development team as well as consultants that we work with.

It's unfortunate that developers don't always have time to learn/practice/experience new ideas and better ways of working, but this eBook is an excellent primer.

However, let's not forget that "Domain Driven Design" also requires experience and practice, and getting constant feedback from the business is critical to getting the design right.

If you're interested in rapid domain modelling, we offer a tool that creates interactive prototypes directly from domain classes. You can download a trial from our website.

Keep up the good work!

Cheers,

Vijay Patel

backyard ni donglloyd wrote re: Foundations of Programming Ebook
on Thu, Sep 18 2008 1:28 AM

challenging..you got me!

Bob wrote re: Foundations of Programming Ebook
on Wed, Oct 15 2008 8:49 AM

just fyi - your book has a typo on page 20:  "If you are, than you’re absolutely right (mostly right anyways…for now let’s assume that it’s always a simple process)."

"than" should be "then"

Foundations of Programming Ebook - Matthew Botos wrote Foundations of Programming Ebook - Matthew Botos
on Sat, Oct 18 2008 1:34 PM

Pingback from  Foundations of Programming Ebook - Matthew Botos

Anthony Potts wrote re: Foundations of Programming Ebook
on Thu, Nov 13 2008 4:36 PM

Karl,

   Great book. A couple of people from our local dot net user group (fsdnug.org if you are interested) have read it and so now we are working on learning each of the concepts which you highlight .

    Now, obviously the example program comes with no guarantee of working at all times, but me and another gentleman from our little group have the Beta version of the MVC framework installed and the sample program compiles but then doesn't like the reference to System.Web.MVC. Where I am most confused is that you have included the dlls from (what looks like) Preview 5, and I didn't change those references, but it still doesn't work.

If you don't want to support such a thing I understand, if you could recommend a fully fledged sample application that you have seen that you partivularly like  that was written targetting the MVC Beta Framework?

Thanks for all your work on the topic and the work that you put into your blog. I have found it very educational and inspiring.

Anthony Potts

Michael Paladino wrote re: Foundations of Programming Ebook
on Thu, Nov 13 2008 10:50 PM

I've been working with Anthony Potts and finally got the application running on a machine with ASP.NET MVC Beta installed.  Basically, the solution was to uninstall the Beta System.Web.MVC assembly from the GAC.  Dylan Beatie discusses this issue here:  dylanbeattie.blogspot.com/.../working-on-aspnet-mvc-beta-and-preview.html.

Anyway, thanks for a great application to learn from.

Michael

Unhandled Exceptions » Blog Archive » Foundations of Programming E-Book: Revisiting an Old Friend wrote Unhandled Exceptions » Blog Archive » Foundations of Programming E-Book: Revisiting an Old Friend
on Fri, Nov 28 2008 8:35 PM

Pingback from  Unhandled Exceptions  » Blog Archive   » Foundations of Programming E-Book: Revisiting an Old Friend

Desirea wrote re: Foundations of Programming Ebook
on Thu, Dec 4 2008 9:43 AM

This is just what this trainer needed for student resources.

R wrote re: Foundations of Programming Ebook
on Mon, Dec 22 2008 9:13 AM

You really should put a PayPal button somewhere, you deserve a beer for such nice initiative..

Miyagi Coder wrote re: Foundations of Programming Ebook
on Fri, Feb 6 2009 3:55 PM

You are an MVP in my book...

Download free ebooks wrote re: Foundations of Programming Ebook
on Thu, Feb 12 2009 2:45 AM

gr8 book thanks for the book.. like it

Libros de programaci??n gratuitos (m??s) | CyberHades wrote Libros de programaci??n gratuitos (m??s) | CyberHades
on Thu, Feb 12 2009 6:02 AM

Pingback from  Libros de programaci??n gratuitos (m??s) | CyberHades

Libros de programaci??n gratuitos (m??s) | CyberHades « HiperEidon wrote Libros de programaci??n gratuitos (m??s) | CyberHades « HiperEidon
on Thu, Feb 12 2009 8:37 AM

Pingback from  Libros de programaci??n gratuitos (m??s) | CyberHades « HiperEidon

Jeremy D. Miller -- The Shade Tree Developer wrote A Coalition of the Willing
on Sun, Mar 1 2009 10:15 PM

I’m breaking a personal rule by using a banned phrase in my blog today, and I’m going to compound that

Community Blogs wrote A Coalition of the Willing
on Sun, Mar 1 2009 10:47 PM

I’m breaking a personal rule by using a banned phrase in my blog today, and I’m going to compound that

Javier wrote re: Foundations of Programming Ebook
on Thu, May 7 2009 5:36 PM

Great Book Karl.

tower defense wrote re: Foundations of Programming Ebook
on Sat, May 9 2009 4:17 AM

I think it is going to be a good shift in the way they code right now. But their ability to read in English is not that great. Do you know of any translation or are willing to accept any translation to Spanish? I'd offer myself and will thoroughly read the license.

karl wrote re: Foundations of Programming Ebook
on Sat, May 9 2009 9:19 AM

@Tower Defense:

I've been meaning to change the license to something less strict. As for translations, I welcome them, but it seems like a hell of a lot of work.

Pavel wrote re: Foundations of Programming Ebook
on Sat, May 9 2009 12:21 PM

Hello Karl,

I've started to read your book a few days ago, for now one half is behind and it seems a really great book! Just 2 moments:

1) Do you consider go a littler bit deeper on every topic (chapter)? It can be a step-by-step process. I think you are talented on how to give information and what to give - you know what it is better to write and explain, you write very good examples, you also show subtle but popular problems and so on.

2) Do you consider to write more on database testing? I think this is a very important and interesting task and for me it's a pain in the ass :) - my tests for database look very ugly, I don't know why :)

Great work, keep it on!

Pavel wrote re: Foundations of Programming Ebook
on Sun, May 10 2009 5:41 AM

I am reading chapter 6 - ORM, the section about quick overview of Inline SQL vs Stored Procedures. As for recompiling and abstraction - stored procedures DO able to help here. For example in 2-tier systems (without application server), if you use inline SQL, changes in database schema or query logic can lead to changing all the clients. But if you use stored procedures in such a system - you will more rarely change all your clients when database schema changes.  Imho it would be nice if you mention it in the book.

karl wrote re: Foundations of Programming Ebook
on Sun, May 10 2009 10:49 AM

@Pavel:

I do like to cover each topic more in-depth. I've blogged about each topic quite a bit already, for example, you can probably find 10 posts on unit testing. There's also a lot of other good information out there.

I don't know much about DB testing. I pretty much write automated integration tests that hit the DB. That's it.

The DB vs ORM debate is old. I've found that when it comes to data access, ORM vs Sproc is the least of my performance worries. The other day I converted an sproc that took minutes to run, to an ORM call that took seconds - it had nothing to do with the access strategy, everything to do with writing a smart query. There are situations where direct db calls (via sprocs) will be necessary, but in your average system they'll likely account for less than 5%. You can use an ORM for the other 95% and save yourself a lot of coding.

Pavel wrote re: Foundations of Programming Ebook
on Sun, May 10 2009 6:48 PM

After several months since I first hear about mocks, I finally understood why you really need to mock your DAL - to make DAL functions return what you need in 1 or a few lines of code, instead of writing many lines of code or even pages of code - to fill your database with data necessary for test to make DAL method return what we need.

It is your book helped me to suddenly understand it.

Thank you.

Pavel wrote re: Foundations of Programming Ebook
on Tue, May 12 2009 6:41 PM

Karl, you wrote:

"I've often seen developers catch exceptions where they occur only to log and rethrow (more on rethrowing in a bit). This causes a lot of unnecessary and repetitive code - better to let exceptions bubble up through your code and log all exceptions at the outer edge of your system."

If you catch all exceptions in one place (like using UnhandledException or ThreadException handlers), the problem is with displaying a friendly message to a user. exception.Message may contain not a friendly one. But if you catch exceptions earlier, you know what the current code block is doing and you can show a friendly message, like "Error occurred during loading Excel application" or "Error occurred during saving customer information to the database".

What do you think?

karl wrote re: Foundations of Programming Ebook
on Wed, May 13 2009 5:59 PM

Pavel:

I'm not convinced that you can't come up with meaningful messages in a global error handler.

Even if you can't, the benefits of centralized errors outweigh those of providing context-sensitive messages. How useful are context-sensitive messages to users (I'm strictly talking about exceptions here, not non-exceptional messages?) Chances are he/she will try again regardless of what you display.

Anyways, if you're the one throwing the exception, you can add an Type property to your custom exception that exposes an Enum which you can use to display more meaningful messages.

dbones notes wrote Example Architectures - for .Net
on Sun, Jul 19 2009 1:43 PM

Example Architectures - for .Net

progg.ru wrote Бесплатная книга Foundations of Programming
on Thu, Oct 8 2009 11:19 AM

Thank you for submitting this cool story - Trackback from progg.ru

ponte wrote Regreso a las bases: Memoria
on Mon, Dec 14 2009 12:15 PM

Lo que sigue es una traducción de una sección del ebook gratuito Foundations of Programming

ponte wrote Regreso a las bases: Memoria (Parte 2)
on Wed, Dec 23 2009 8:19 PM

Lo que sigue es una traducción de una sección del ebook gratuito Foundations of Programming