-
Jul 13th, 2021, 09:02 AM
#41
Re: Reading Proficiency and Programming
Originally Posted by TysonLPrice
Obviously...Someone from Missouri would never say something like that
Good answer
My usual boring signature: Nothing
-
Aug 10th, 2021, 01:02 AM
#42
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?
-
Aug 10th, 2021, 04:16 AM
#43
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."
-
Nov 23rd, 2021, 09:37 PM
#44
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.
-
Nov 24th, 2021, 08:38 AM
#45
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
-
Nov 27th, 2021, 06:57 PM
#46
Re: Reading Proficiency and Programming
Originally Posted by FunkyDexter
I've got excellent agreeableness and I'll punch anyone who says otherwise.
I said "otherwise" out loud. Good luck trying to find me!
-
Nov 29th, 2021, 04:57 AM
#47
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
-
Nov 29th, 2021, 08:29 AM
#48
Re: Reading Proficiency and Programming
Originally Posted by FunkyDexter
I have a particular set of skills...
(They're SQL skills... be afraid)
I will SELECT you... and I will DELETE you.
-tg
-
Nov 29th, 2021, 01:54 PM
#49
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
-
Nov 30th, 2021, 09:24 PM
#50
Re: Reading Proficiency and Programming
Originally Posted by jmcilhinney
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.
-
Dec 1st, 2021, 12:13 AM
#51
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.
-
Dec 1st, 2021, 03:18 AM
#52
Re: Reading Proficiency and Programming
Originally Posted by Niya
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.
-
Dec 1st, 2021, 06:04 AM
#53
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
-
Dec 1st, 2021, 06:54 AM
#54
Re: Reading Proficiency and Programming
Originally Posted by jmcilhinney
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
-
Dec 2nd, 2021, 10:49 AM
#55
Re: Reading Proficiency and Programming
Originally Posted by FunkyDexter
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
-
Dec 2nd, 2021, 12:28 PM
#56
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
-
Dec 2nd, 2021, 01:50 PM
#57
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.
-
Dec 2nd, 2021, 04:28 PM
#58
Re: Reading Proficiency and Programming
Originally Posted by wes4dbt
InteliSense is a great tool. It really allows for more easily readable code. Sure beats Dim var1 or Call CalcTot.
+1 This so much.
-
Dec 3rd, 2021, 08:29 AM
#59
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.
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
-
Dec 3rd, 2021, 08:36 AM
#60
Re: Reading Proficiency and Programming
-
Dec 3rd, 2021, 11:52 AM
#61
Re: Reading Proficiency and Programming
Originally Posted by FunkyDexter
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|