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
J

jfren484

@jfren484
About
Posts
24
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • What is your favourite film (that didn't make much money)?
    J jfren484

    The Man Who Knew Too Little (1997) with Bill Murray. Laughed through the entire thing, but most people I mention it to have never even heard of it. It had a $20M budget and only made $13.7M, and it has a 41% on Rotten Tomatoes, but I love it.

    The Lounge question

  • Most head-slapping feature in a language
    J jfren484

    "1" === 1 is true

    Umm, this statement is false. Put "1" === 1 into the dev tools console and it will output false.

    The Lounge javascript database com lounge

  • Code Puzzler: How quickly can you figure out why this acting "weird"?
    J jfren484

    It's the assignment of the static member from the instance constructor. HUGE no-no. If you want to make a singleton without using a DI framework, at least make the constructor private and have the static "Context" member be a property that will create a new object if one doesn't exist, and set it to a backing field. Something like this (might need to make Current a method instead of property if you need to pass constructor arguments, but you get the idea):

    public class Singleton
    {
    private Singleton _current;

    public Singleton Current
    {
    	get
    	{
    		if (\_current == null)
    		{
    			\_current = new Singleton();
    		}
    		
    		return \_current;
    	}
    }
    
    private Singleton()
    {
    }
    

    }

    The Lounge help question javascript python php

  • Sinec it's quiet ... a midweek game.
    J jfren484
    1. Star Trek IV: The Voyage Home
    The Lounge com game-dev help

  • Looking for Software Recommendations: Sharing a mouse/keyboard between PC/Mac
    J jfren484

    I've used Remote Desktop this way myself. Have the one computer (the Mac) set up to use both screens. The use Remote Desktop to connect to the Windows computer and maximize that remote window on the secondary monitor. Now your Mac is the one screen and the Windows PC is the other.

    The Lounge question

  • A little VS bit I never knew existed.
    J jfren484

    I use this all the time. The code view is nice, but my favorite feature of the code-view version of the scroll bar is you can single-click on the scroll bar and immediately be taken to that point in the code, instead of having to (hold down the mouse button | scroll up/down with the mouse wheel | use the page up/down keys on the keyboard) and scroll until you get where you want to go. Another way I use this is that you can see the entire file at a glance. So searching for any commented code so you can rip it out, or seeing how many // TODO: comments you have, any compile warnings, etc is really simple.

    The Lounge visual-studio com tools question

  • To Native English speakers : "Double down" meaning
    J jfren484

    I think it's correctly used. I think it's saying the reporter is continuing to make the same accusation he/she made against XYZ previously and is even more determined in that approach, as opposed to switching tactics or asking different questions.

    The Lounge c++ question announcement

  • Xamarin Forms
    J jfren484

    I used it at a previous job (~2 years ago now). Got it working fine. Had to get all those dependencies taken care of that you're noticing, but I don't remember it being that painful.

    The Lounge csharp mobile visual-studio help question

  • So, if you're manager asked you to use a nickname...
    J jfren484

    Did you mean to say, "asked you to use a nickname because YOUR NAME sounded 'Islamic'"? If so, yes, that would be discriminatory. If you meant what you said and the manager asked you to use a nickname because [it] sounded "Islamic" (it being the nickname according to English grammar rules), that would be much more interesting. It would sound like the manager didn't want anyone to think they didn't hire Muslims, or that they hired any non-Muslims. Still discriminatory, though.

    The Lounge python com functional question learning

  • C# Object Initializer Syntax
    J jfren484

    Am I not seeing what you're seeing? I don't see ANY indentation there. FWIW, I prefer this indentation:

    var student2 = new StudentName
    {
    FirstName = "Craig",
    LastName = "Playstead",
    };

    The Lounge csharp visual-studio

  • Born programmer?
    J jfren484

    Don't you mean a Bjorn programmer? ;)

    The Lounge question

  • Born programmer?
    J jfren484

    From Wikipedia:

    Quote:

    Floors in the Pentagon are lettered "B" for Basement and "M" for Mezzanine, both of which are below ground level. The concourse is located on the second floor at the Metro entrance. Above ground floors are numbered 1 to 5.

    The Lounge question

  • Born programmer?
    J jfren484

    I've thought this through before, but only within a Day's context (because a day is based on the rotation of the earth and a year is based on the revolution of the earth around the sun, you CAN'T have anything other than 365.25 (approximately) days in a year). But for a day, if you have 100 units in the day, each would be very close to 15 minutes of our current measurement (14 minutes, 24 seconds). Since there are 100 in a day, they would be centidays. Since that term sounds horrible there would probably need to be something else to call them - maybe "hours" would just be redefined? If you divide each of those centidays/hours into 1000 smaller units, those would be fairly close to 1 second each (0.864 seconds) and could be called millihours (or maybe still "seconds" for each of use). Having units of time similar in duration to what we're comfortable with would make it easier to get buy-in. All of that is moot, though, because almost all computer software would have to be rewritten. If someone had come up with this BEFORE computers I think it would have stood a better chance.

    The Lounge question

  • Using IEnumerable nonsense for everything
    J jfren484

    Harold, is it easier on separate lines, or do you still find that difficult to read? (by the way, this is called "fluent syntax". I find when it's all on one line (except maybe calling .Single() or .First() or .ToList() at the end of something) it can be very difficult to read. But this I love:

    someStuff.Where(c => c != What)
    .Select(d => d + The)
    .Foreach(e => Hell(e));

    The Lounge question csharp

  • Using IEnumerable nonsense for everything
    J jfren484

    For debugging, though, if you convert the lambda expression into a lambda statement, you can put a breakpoint in it. That can help in debugging. Usually what I end up doing is split the fluent chain into separate pieces if I need to debug it. That being said, this is usually a style I employ as I'm finishing up code and have already tested it while doing my normal refactoring. (and when I know high performance is not necessary)

    The Lounge question csharp

  • Using IEnumerable nonsense for everything
    J jfren484

    No, it doesn't help for debugging. I think it helps for readability, though. I keep the first one on the same line and then line up all the dots like so:

    someStuff.Where(c => c != What)
    .Select(d => d + The)
    .Foreach(e => Hell(e));

    The Lounge question csharp

  • Using IEnumerable nonsense for everything
    J jfren484

    Depends what you mean by "speed". Speed of execution, of course not. But speed of coding, sure. You could argue that it doesn't make a big difference in coding it, but I'd argue that using a for loop instead of this approach doesn't make a big difference (per iteration) either. It's all in how you use it.

    The Lounge question csharp

  • Was Einstein winking when he said this?
    J jfren484

    den2k88 wrote: More obfuscated than THAT? Her brain. But you already said she was female. ;)

    The Lounge

  • Woman ordered to provide her fingerprint to unlock seized iPhone
    J jfren484

    John Simmons / outlaw programmer wrote: Unlocking your phone for them is tantamount to providing evidence against yourself, and that's a violation of the 5th amendment. The courts (and by extension, law enforcement) cannot compel you to testify against yourself. I understand what the argument is - I just don't think it makes sense. The government can force you to open your front door so they can come in and search your house when they have a warrant (or they'll just break it down, and they're not going to pay to repair it, AFAIK). How is that different from opening the "front door" of your phone or computer by unlocking it for them? Again, I understand that current legal precedent says that those ARE different, I just don't agree.

    The Insider News ios com question

  • Woman ordered to provide her fingerprint to unlock seized iPhone
    J jfren484

    That's what I was reading, too. I just don't understand why there would be a distinction. I would generally be in favor of the rights of the individual over the government, but in this case I think making a distinction between a key for the safe and the combination, that just seems silly. It doesn't make any sense. Whether one believes the government should get into the safe or not, it shouldn't matter what method the owner uses to secure it.

    The Insider News ios com question
  • Login

  • Don't have an account? Register

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