Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

ssclaire

@ssclaire
About
Posts
46
Topics
12
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • CamelCase naming convention
    S ssclaire

    Cedric Moonen wrote:

    I really don't like having underscores in method or variable names

    Agreed. I'll manage either way but I prefer keeping a single symbol (variable/method name) easily discernable unlike:

    unfortunately_wrong_because = this_symbol - looks_a_lot_like - this-symbol;

    The Lounge csharp c++ java com tools

  • Forum Preview Tool
    S ssclaire

    It would be really nice to have a split-screen forum preview tool like this[^]. I read about it here[^]. It's fantastic. Basically, it's a forum preview tool that lets you preview how your post will look live... while you write it. The top shows what you type with your tags in place while the bottom shows how the post will look when it is posted for things like bold, italics, inline code, and

    code blocks.

    Actually, I wouldn't mind having an online article editor that works like this, too. What do you think?

    Site Bugs / Suggestions com question discussion

  • Okay. I'm Definitely Upgrading to Windows 7 Now.
    S ssclaire

    Yes. Actually, I was thinking it would be nice if it also had an "Open a copy of the file as read only."

    The Lounge com

  • Securing strings in .NET....possibility?
    S ssclaire

    I'm still trying to figure out what security scenario you are trying to protect from. Some sort of forensic analysis of memory (like wiping a hard drive)? Sorry if I misunderstand. But the whole concept is fraught with problems. As you said, .NET and Windows is free to move and copy memory at will. Virtually any string operation will make a copy of the original string(s). What about, paging to disk? That would seem to be much more of a vulnerability. Also, what about interning? Someone correct me if I am wrong but, doing something like this:

    string firstString = "abc";
    string secondString = "abc";
    SecureWipe(FirstString);

    ...could potentially destroy the contents of secondString (because of the unsafe code pointing to the intern'ed string). Besides, as Dave said (above), if you did something like this:

    string firstString = "abc";
    string secondString = "xyz";
    secureWipe(firstString);
    secureWipe(secondString);

    firstString and secondString would likely be overwritten with the same "random" character sequence. That's not "secure". Move the instance of Random() outside of SecureWipe() so it is only executed once.

    .NET (Core and Framework) csharp dotnet security performance help

  • Okay. I'm Definitely Upgrading to Windows 7 Now.
    S ssclaire

    Trollslayer wrote:

    Quite a while ago I said that Windows 7 is what they wanted Vista to be but ran out of time.

    It would be a real boon to Microsoft's PR if they offered free (or significantly discounted) upgrades from Vista to Windows 7.

    The Lounge com

  • Automatic metric / imperial conversion in posts
    S ssclaire

    Oo, ah. What if I am trying to explain that there are 182-degrees C in a circle :omg:. Did you see that Bruce Willis movie called "The Whole 8.2296 Meters?" Winnie the Pooh sings, "Deep in the 40.4685642 hectares wood where Christoper Robin plays..." :rolleyes: .

    Site Bugs / Suggestions asp-net json

  • Circuit City Gone! Does Anyone Care?
    S ssclaire

    Pete O'Hanlon wrote:

    It's not so good for the poor people who are just about to lose their jobs.

    That's true. As a retail store veteran myself, I should say I am against the store but I support the troops.

    The Lounge com question

  • Okay. I'm Definitely Upgrading to Windows 7 Now.
    S ssclaire

    Hot damn! Finally. Windows 7 Tells You Why You Can't Touch That File[^] Seriously. I really, really want this feature built-in. :| No really. Stop looking at me like that. I'm not joking.

    The Lounge com

  • Circuit City Gone! Does Anyone Care?
    S ssclaire

    Circuit City fails to be wanted, will now be liquidated[^] Half-empty shelves, no selection, horrendous prices, poor layout. The best thing to come out of Circuit City in the last 10 years will be its final liquidation sale.... Good riddance.

    The Lounge com question

  • Any Amusing Bugs Found in Windows 7?
    S ssclaire

    So has anyone come across any real "boners" in Windows 7? I know it is still in beta but this one made me chuckle (sorry, I don't remember the exact wording): Windows cannot shut down because it is waiting for a process to end. Process: **Explorer.exe** Action: **Playing "logoff.wav"**

    The Lounge beta-testing question

  • Zune Theme for Windows 7
    S ssclaire

    Is there a Zune theme for Windows 7? I've been using it on XP and I really like it. For anyone who hasn't seen it: Zune Theme for Windowx XP[^]. But I can't find any mention of it for Windows 7. Thanks.

    The Lounge com question

  • View of the world through a 6 year old
    S ssclaire

    My three-year-old daughter tells people that I tickle the computer all day. Whenever it beeps, or makes any sort of sound, she says that I made it giggle.

    The Lounge question hardware performance help

  • Weird Technology
    S ssclaire

    My toothbrush has been charging like this for the last 10 years. You place the brush-part on top of the charger -- no plug, no electrical connection -- and it just charges. There's no "radiation" involved (as in radioactive); just magnetic induction, the same way anything that plugs into a transformer (wall brick) works.

    The Lounge com

  • Instead of using nested if-else
    S ssclaire

    The argument is "are guard clauses in methods okay?" And how do you handle resource cleanup if one of the guard clauses fail? I haven't seen a convincing consensus either way. A specific example: Let's say you have 10 resources to allocate (like opening files, networks, etc) -- for brevity here, let's just use four resources. All resources have to be allocated for the method to continue. So what we are trying to avoid is something like this (yuck):

    isMethodSuccessful = false; // assume this isn't going to work
    resource1 = OpenMyFile(myFile);
    if (resource1 == SUCCESS)
    {
    resource2 = OpenSomeNetworkConnection(networkID)
    if (resource2 == OKAY)
    {
    resource3 = CreateNewFile(outputFile);
    if (resource3 == SUCCESS)
    {
    resource4 = ConnectToSomething(mySomething);
    if (resource4)
    {
    //
    // Do all my logic here
    //
    isMethodSuccessful = true; // return success
    }
    else
    {
    DeleteFile(resource3); // do cleanup
    CloseNetwork(resource2);
    CloseFile(resource1);
    }
    }
    else
    {
    CloseNetwork(resource2); // do cleanup
    CloseFile(resource1);
    }
    }
    else
    {
    CloseFile(resource1); // do cleanup
    }

     return (isMethodSuccessful);
    

    }

    Guard clauses will convert that mess into something like this:

    resource1 = OpenMyFile(myFile);
    if (resource1 != SUCCESS)
    {
    return failure;
    }

    resource2 = OpenSomeNetworkConnection(networkID)
    if (resource2 != OKAY)
    {
    CloseFile(resource1); // do cleanup
    return failure;
    }

    resource3 = CreateNewFile(outputFile);
    if (resource3 != SUCCESS)
    {
    CloseNetwork(resource2); // do cleanup
    CloseFile(resource1);
    return failure;
    }

    resource4 = ConnectToSomething(mySomething);
    if (!resource4)
    {
    DeleteFile(resource3); // do cleanup
    CloseNetwork(resource2);
    CloseFile(resource1);
    return failure;
    }

    //
    // Put all your logic here
    //

    return (success);

    ...which is far from ideal (i.e. more yuck). So what's the best code logic in this situation?

    C / C++ / MFC

  • fun little game
    S ssclaire

    How the heck do you get past level 15? There are three buttons and a number of triangles. I tried pushing all the buttons at once (with cooperation). I tried clearing all the triangles and a combination of both. Any suggestions?

    The Lounge html com game-dev question

  • fun little game
    S ssclaire

    thrakazog wrote:

    Yeah, you really need a mouse with a rapid fire to open that 100 click box.

    Hint: Not if you have 3,4,5,6+ "yous" clicking on it at the same time.

    The Lounge html com game-dev question

  • Prototyping/UI Mock-up Tools - Available options and Best fit
    S ssclaire

    Jim Crafton wrote:

    That explains why everyone on the subway these days is in their own little world and never talks or makes eye contact anymore!

    In many cases, this is a good thing.

    The Lounge csharp html asp-net com

  • Mouse has ADHD
    S ssclaire

    Todd Smith wrote:

    I used to be pro at cleaning the lint off my old mouse balls.

    Sorry. I just had trouble getting past the phrase "old mouse balls." Poor mouse.

    The Lounge question

  • Global warming / cooling change in your area?
    S ssclaire

    Oh, noooooo. This has been an on-going joke in my family for the last forty years... literally. Start keeping track, now. Seriously... Do this... Keep track that, twice every year, there are people who will say: _"Wow. It seems like summer (or winter) came really fast this year. Like, there was **no** spring (or fall) at all. It's like we went from winter, right into summer (or from summer into winter)."_ Pay attention. Now that fall (or winter) is coming, you'll see what I mean. And, now that you noticed this predictable pattern this year, it will drive you crazy for the rest of your life. Welcome to my life.

    The Lounge java html com question announcement

  • Time waster
    S ssclaire

    Damn you, Simon Stevens. CAN'T... STOP... WATCHING...

    The Lounge
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups