Page 2 of 2 FirstFirst 12
Results 41 to 61 of 61

Thread: Reading Proficiency and Programming

  1. #41
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,988

    Re: Reading Proficiency and Programming

    Quote Originally Posted by TysonLPrice View Post
    Obviously...Someone from Missouri would never say something like that
    Good answer
    My usual boring signature: Nothing

  2. #42

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Reading Proficiency and Programming

    https://www.sos.mo.gov/archives/history/slogan.asp

    Other versions of the "Show-Me" legend place the slogan's origin in the mining town of Leadville, Colorado. There, the phrase was first employed as a term of ridicule and reproach. A miner's strike had been in progress for some time in the mid-1890s, and a number of miners from the lead districts of southwest Missouri had been imported to take the places of the strikers. The Joplin miners were unfamiliar with Colorado mining methods and required frequent instructions. Pit bosses began saying, "That man is from Missouri. You'll have to show him."
    And thus the disdain for Reading That Fine Manual began. Gives me da codz?

  3. #43

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Reading Proficiency and Programming

    The paper cited in post #1 above is one of the few I can find of value. I'd rather find more because one source leaves one prey to biases and errors.

    Sadly most searches on literacy seem to treat it absurdly. It seems to come down to whether or not one can bumble through a newspaper article aloud and only miss or be stumped by 1 word in 6! The statistics gathered tend to be pass/fail, sometimes divided into primary and secondary grade level groupings with no attempt to quantify the state of literacy in the working age population.

    It's like saying a banana is good enough to eat no matter the quality, age, or state of its decrepitude. Or the common fallacy that getting hired for a job that lets you write code grants one the status of "professional."

  4. #44

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Reading Proficiency and Programming

    A friend sent me the link to this today:



    I'm sure we can all find our own weaknesses there, but it also might help explain some of what is going on with the work economy.

  5. #45
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,900

    Re: Reading Proficiency and Programming

    I've got excellent agreeableness and I'll punch anyone who says otherwise.
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  6. #46
    Fanatic Member Peter Porter's Avatar
    Join Date
    Jul 2013
    Posts
    532

    Re: Reading Proficiency and Programming

    Quote Originally Posted by FunkyDexter View Post
    I've got excellent agreeableness and I'll punch anyone who says otherwise.
    I said "otherwise" out loud. Good luck trying to find me!

  7. #47
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,900

    Re: Reading Proficiency and Programming

    I have a particular set of skills...




    (They're SQL skills... be afraid)
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  8. #48
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,531

    Re: Reading Proficiency and Programming

    Quote Originally Posted by FunkyDexter View Post
    I have a particular set of skills...




    (They're SQL skills... be afraid)
    I will SELECT you... and I will DELETE you.


    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  9. #49
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,900

    Re: Reading Proficiency and Programming

    You've really got my backup
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  10. #50
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: Reading Proficiency and Programming

    Quote Originally Posted by jmcilhinney View Post
    If you need to comment about what you're doing then, in the majority of cases, you're writing bad code.
    This is one of my historically bad habits I've only started to correct in recent years. One of my biggest problems from way back when was always writing large complicated functions when the better approach was to break up large functions into smaller functions that are each very easy to understand. This makes code a whole lot more readable and easy to understand. Nowadays it's not odd to find functions in my programs that contain one or two lines of code.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  11. #51

    Thread Starter
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Reading Proficiency and Programming

    Proper code granularity isn't a simple judgement. Too granular and you suffer from procedure call overhead, too monolithic and you lose flexibility, comprehensibility, and maintainability.

    Some languages can help through features such as compile-time macros and procedure inlining.

  12. #52
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,195

    Re: Reading Proficiency and Programming

    Quote Originally Posted by Niya View Post
    This is one of my historically bad habits I've only started to correct in recent years. One of my biggest problems from way back when was always writing large complicated functions when the better approach was to break up large functions into smaller functions that are each very easy to understand. This makes code a whole lot more readable and easy to understand. Nowadays it's not odd to find functions in my programs that contain one or two lines of code.
    I agree and disagree. lol

    Sometime I find it more difficult to follow the logic when I have to bounce from sub/function to sub/function to .........

    when you want to refresh the logic in your mind you have to trace back through all these different procedures. I like being able to see a large block of code in one view. Sometimes I'll write large blocks, then when I have what I want I'll break it up into smaller procedures. I think that's probably just because of that's how code was written 30yrs ago and that's what my mind is use to. But I agree small procedure are more tidy and large blocks of code are just not the way OO programming is designed to work.

  13. #53
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,900

    Re: Reading Proficiency and Programming

    There's whole movement advocating for comment free code and has been for at least 20 years. Personally I'm a believer. You have to be rigorous in your coding habits though.

    Too granular and you suffer from procedure call overhead
    Just to be clear, with a modern compiler it won't (or shouldn't) result in extra calls being made by the compiled code. the compiler should be inlining all that stuff. If you mean overload from a human, rather than machine, perspective then yes but...

    I find it more difficult to follow the logic when I have to bounce from sub/function to sub/function to
    If the code is well written and structured you shouldn't need to. From the linked page, a good example is this:-
    Code:
    if(AllEnemiesHaveBeenDefeated 
        && IsFinalWave
        && PlayerHasEnoughHealth
        && PermadeathEnabled)
    {
        SpawnBoss();
    }
    When you read that code you shouldn't need to care how AllEnemiesHaveBeenDefeated is calculated, just that there are no more enemies to defeat. If you need to drill into the individual functions it's a red flag that someone probably wrote the function such that it has an unexpected side effect (probably expected by the guy that wrote it, but unexpected by you when you consume it).

    Of course, nothing's universal.
    Last edited by FunkyDexter; Dec 1st, 2021 at 06:09 AM.
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  14. #54
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    4,415

    Re: Reading Proficiency and Programming

    Quote Originally Posted by jmcilhinney View Post
    If you need to comment about what you're doing then, in the majority of cases, you're writing bad code.
    See my Signature.
    There is a quote i adapted to my Signature:
    "Code is like Humor: If you have to explain it, it's bad! - Cory House"
    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  15. #55
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,988

    Re: Reading Proficiency and Programming

    Quote Originally Posted by FunkyDexter View Post

    If the code is well written and structured you shouldn't need to. From the linked page, a good example is this:-
    Code:
    if(AllEnemiesHaveBeenDefeated 
        && IsFinalWave
        && PlayerHasEnoughHealth
        && PermadeathEnabled)
    {
        SpawnBoss();
    }
    When you read that code you shouldn't need to care how AllEnemiesHaveBeenDefeated is calculated, just that there are no more enemies to defeat. If you need to drill into the individual functions it's a red flag that someone probably wrote the function such that it has an unexpected side effect (probably expected by the guy that wrote it, but unexpected by you when you consume it).

    Of course, nothing's universal.
    While I agree in principle, that particular code does leave me with a question: Why is that final condition there?

    It is clear what the flag means, so long as the name is correct, but it looks like a bug, to me. Do you NOT spawn the boss if permadeath is not enabled? Frankly, I'd have a comment about that simply BECAUSE it looks wrong on the face of it.
    My usual boring signature: Nothing

  16. #56
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,900

    Re: Reading Proficiency and Programming

    Frankly, I'd have a comment about that simply BECAUSE it looks wrong on the face of it.
    Sort of. You would want to indicate the reason but you wouldn't do it via a comment, you'd do it by breaking out another function and giving it a descriptive title.

    The first improvement I'd make on that code would be to take all the conditionals and break them out to a boolean Method with a descriptive name. That would turn the above code into
    Code:
    If (OKToSpawnBossButOnlyIfPermaDeathEnabledBecauseShaggySaysThatsHowItShouldWork ())
       SpawnBoss()
    Trouble is that now we can't change the logic without invalidating the function name which is one of the reasons we don't want comments in the first place - they go stale. Also, the consuming code has an understanding of how the decision on whether to spawn has been implemented and why - that's bad, it should be agnostic. So the next thing I'd do is abstract that into an interface IImplementsOKToToSpawnBoss with a single method OKToSpawnBoss. Now I can provide an implementation of that interface with a truly meaningful class name e.g. OKToSpawnBossButOnlyIfPermaDeathEnabledBecauseShaggySaysThatsHowItShouldWork : IOKToSpawnBoss. That class can be injected into the consuming code and the method call made against it.

    So my consuming code now looks like:-
    Code:
    If (myOKToSpawnBossImpl.OKToSpawnBoss())
       SpawnBoss()
    ... clear, simple and readable and doesn't require any understanding of the logic that decides on whether to spawn a boss (or how to spawn a boss, for that matter)

    My implementation looks like this:-
    Code:
    public class OKToSpawnBossButOnlyIfPermaDeathEnabledBecauseShaggySaysThatsHowItShouldWork : IImplementsOKToSpawnBoss
    {
       public bool OKToSpawnBoss()
       {
          Return AllEnemiesHaveBeenDefeated 
              && IsFinalWave
              && PlayerHasEnoughHealth
              && PermadeathEnabled
       }
    }
    So the logic is contained in a class that clearly describes why Permadeath was enabled, no comment needed and, because it's sitting behind an interface, we can use dependency injection to feed in different behaviours with appropriate class names if we want to.

    The consuming logic is agnostic of the implementation, the implementation contains all the information to understand why it was done this way, and we can freely change the behaviour by injecting a different implementation of IOKToSpawn with a similarly descriptive name. (This adheres to the principle of Open to extension, closed to modification and is being achieved through inversion of control - two things I'd suggest all OO coders read up on and get their head around).


    edit>I edited the above several times to try and make it clear. If my edits crossed over with anyone reading it, apologies.
    Last edited by FunkyDexter; Dec 2nd, 2021 at 12:55 PM.
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  17. #57
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,195

    Re: Reading Proficiency and Programming

    If (OKToSpawnBossButOnlyIfPermaDeathEnabledBecauseShaggySaysThatsHowItShouldWork ())
    Wouldn't that have been fun back when we were using line editors. lol

    InteliSense is a great tool. It really allows for more easily readable code. Sure beats Dim var1 or Call CalcTot.

  18. #58
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: Reading Proficiency and Programming

    Quote Originally Posted by wes4dbt View Post
    InteliSense is a great tool. It really allows for more easily readable code. Sure beats Dim var1 or Call CalcTot.
    +1 This so much.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  19. #59
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,900

    Re: Reading Proficiency and Programming

    Wouldn't that have been fun back when we were using line editors.
    Yeah. I deliberately went overly verbose to make the point. In the age of intellisense you can use a frickin' essay as a variable/method name if you want so get as descriptive as you can.

    Sure beats Dim var1
    Early in my career I worked with proprietary language that had 20 pre-defined variables (10 numeric, 10 string) and that's all you had. Couldn't rename them, had to reuse them for everything you did. It was... challenging.
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  20. #60
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,871

    Re: Reading Proficiency and Programming

    Sounds like predecessor of Perl?
    https://perlmaven.com/the-default-variable-of-perl

  21. #61
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: Reading Proficiency and Programming

    Quote Originally Posted by FunkyDexter View Post
    Early in my career I worked with proprietary language that had 20 pre-defined variables (10 numeric, 10 string) and that's all you had. Couldn't rename them, had to reuse them for everything you did. It was... challenging.
    This is not really as strange as it might sound because when you think about it, this is exactly how assembly language works. Registers are akin to variables in high level languages, yet you cannot rename them and there are a limited number of them.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width