|
10-14-2021, 11:18 AM | #46 | |
Bono & Grbac wasn't enough
Join Date: Oct 2000
Location: Sioux City, IA
Casino cash: $11143829
|
Quote:
__________________
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Advertise here: $19.99 a month |
|
Posts: 37,589
|
10-14-2021, 11:21 AM | #47 |
Live free or die hard
Join Date: Sep 2000
Location: Durango, CO
Casino cash: $938382
|
Curly brackets?
Apparently it's been awhile since I dipped my toe in C world so I'll just say make the code more linear and unless he's coding for a French person use the English Language for comments. |
Posts: 27,247
|
10-14-2021, 11:32 AM | #48 |
Veteran
Join Date: Aug 2002
Location: Kansas City, MO
Casino cash: $4456254
|
It was a long time ago, but I believe that particular code was embedded in a classic ASP page. He was fetching options from the database to populate a select tag on a form.
I recall that the guy left a lot of comments too, which is usually a good thing, but his comments were unnecessary, as they didn't explain anything helpful. Example: Code:
// This is the database connection Dim ericDbConn = Server.CreateObject("ADODB.Connection") |
Posts: 1,213
|
10-14-2021, 11:38 AM | #49 | |
Bono & Grbac wasn't enough
Join Date: Oct 2000
Location: Sioux City, IA
Casino cash: $11143829
|
Quote:
__________________
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Advertise here: $19.99 a month |
|
Posts: 37,589
|
10-14-2021, 11:44 AM | #50 | |
Veteran
Join Date: Aug 2002
Location: Kansas City, MO
Casino cash: $4456254
|
Quote:
-- Phil Karlton https://martinfowler.com/bliki/TwoHardThings.html |
|
Posts: 1,213
|
10-14-2021, 11:53 AM | #51 |
I love your mom
Join Date: Feb 2020
Location: Sturgeon Falls, Ontario
Casino cash: $864957
|
|
Posts: 7,137
|
10-14-2021, 11:56 AM | #52 | |
I love your mom
Join Date: Feb 2020
Location: Sturgeon Falls, Ontario
Casino cash: $864957
|
Quote:
thanks fellas . |
|
Posts: 7,137
|
1 0 |
10-14-2021, 12:03 PM | #53 |
Veteran
Join Date: Aug 2002
Location: Kansas City, MO
Casino cash: $4456254
|
Oh, completely missed that! I assumed that he found an example of the code in French and was trying to use it in an English computer science class. He should probably keep those variable names in French then.
Glad to hear that this helped. Is your son looking to pursue a career in computer science, or is this just one of his classes? Programming can be intimidating at first, but if he sticks with it, things will become easier. All that gibberish starts to make sense at some point. |
Posts: 1,213
|
10-14-2021, 12:20 PM | #54 | |
I love your mom
Join Date: Feb 2020
Location: Sturgeon Falls, Ontario
Casino cash: $864957
|
Quote:
|
|
Posts: 7,137
|
10-14-2021, 12:41 PM | #55 |
Bono & Grbac wasn't enough
Join Date: Oct 2000
Location: Sioux City, IA
Casino cash: $11143829
|
Not sure how many more labs he will have, but here's a piece of advice our instructors gave us.
When you're trying to work out a problem with your code, step away. Do something else, get your mind off of it. Sometimes clearing your mind will bring you the answer. Also when you go to bed, put a pad and pen next to your bed. You would be surprised how many times that worked for me, waking up with either an answer to a problem or an idea of how to write a program in the middle of the night. Good luck.
__________________
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Advertise here: $19.99 a month |
Posts: 37,589
|
10-14-2021, 12:55 PM | #56 | |
I love your mom
Join Date: Feb 2020
Location: Sturgeon Falls, Ontario
Casino cash: $864957
|
Quote:
|
|
Posts: 7,137
|
Thread Tools | |
Display Modes | |
|
|