Honest Illusion

Where Lightning's Still the Biggest Thrill of All...
Welcome to Honest Illusion Sign in | Join | Help
in Search

Browse by Tags

All Tags » Code
Showing page 1 of 2 (19 total posts)
  • DEV102's Programming Job Interview Challenge #6

    Another week, another C# interview question from the good folk's at Dev102.com -- Although I use the term ''good folks'' advisedly, as this week they did not even acknowledge the solution I posted for last weeks puzzle (which was both correct, and, I believe, the first blog post about it). Anyway, time to move on to this week's question. ...
    Posted to Honest Illusion (Weblog) by James on June 2, 2008
  • DEV102's Programming Job Interview Challenge #4

    The folks at Dev102.com are offering weekly programming challenges, where they offer questions, and let bloggers post about them.  I meant to write an answer for last week, but never got around to it.  Just as well -- my answer would have been wrong.  SO, let's move on to this week's: How would you implement the following method: Foo(7) == ...
    Posted to Honest Illusion (Weblog) by James on May 23, 2008
  • How can I easily log a message to a file for debugging purposes?

    Today, either Bloglines.com or blogs.MSDN.com blinked, and suddenly I'm seeing old entries on the 'C# Frequently Asked Questions' blog as new.  No one has posted anything there in over two years. Anyway, reading the most recent message, it offered a method for logging a message.  Now, ignoring side debates over log4net vs nLog vs. the Event ...
    Posted to Honest Illusion (Weblog) by James on April 16, 2008
  • What's inside a foreach() statement?

    Recently I was looking at some C# code where the author, to loop through some collection,  would frequently use call GetEnumerator() and the manually step through the collections, calling MoveNext().  It seemed to me that the code could be written more cleanly using a foreach.   I got to wondering it the author knew some funky optimization ...
    Posted to Honest Illusion (Weblog) by James on May 18, 2007
  • Design Patterns: Thoughts on the Singleton Pattern

    (Note: I started writing this a couple days ago --- a short while before Andrew Matthews published his own very similar article.  He, of course, finished his first...) (Update: Fixed the spelling/grammar, and then wrote a bit more) Lately on some of the blogs I read, I've been seeing  people giving code implementing various Design Patterns.  ...
    Posted to Honest Illusion (Weblog) by James on March 13, 2007
  • More Fun with C# Iterators: Take, Skip, TakeWhile, SkipWhile

    As I was reading this article by Granville Barnett on some of the new operators available on LINQ queries, I thought, ''That's all well and good, but for the time being, we're living in a .Net 2.0 world.  I wonder if I could emulate those with just generics & iterators?''  As it turned out, it was quite easy. First up is Take:  Given a ...
    Posted to Honest Illusion (Weblog) by James on March 9, 2007
  • Implementing A Circular Iterator

    Many years ago, I wrote an article entitled ''Implement A Circular Iterator'' for The VisualC++ Developer's Journal.  (Unfortunately, VCDJ is now out of business, and it's successor, Visual Studio Magazine, doesn't maintain an online archive of articles from that magazine.  Fortunately, I kept a copy of it) The essence of the C++ code is that ...
    Posted to Honest Illusion (Weblog) by James on February 28, 2007
  • A quick way to go to Shrinkster links.

    I just read an article over on CodeProject on creating a small application to quickly go to a Shrinkster.com url, and as I was reading it, a simpler method occurred to me. Backing up a bit, Shrinkster.com is a site which holds a gaint database of web addresses.  If you wanted to give out a web page link on, say, an podcast, where you won't ...
    Posted to Honest Illusion (Weblog) by James on February 12, 2007
  • SkipFirst.cs

    Here's the C# source code for my SkipFirst Modifier for foreach().  Detailed description here
    Posted to C# (FileGallery) by James on February 5, 2007
  • C# Code: Adding Skip First to Foreach

    A couple years back, I made a proposal online for a new feature in C#.  It gathered some interest in the newsgroup.  I later emailed it to someone on the C# team at Microsoft (I believe it was Eric Gunnerson but I'd really have to look it up), who emailed back a very nice response saying basically, ''We thought about something like this, but ...
    Posted to Honest Illusion (Weblog) by James on February 5, 2007
1 2 Next >
Powered by Community Server (Personal Edition), by Telligent Systems