120ThingsIn20Years
Senior Member
OK.
I'll just do it and hopefully I don't do anything too wacky or too hard to change later
I'll just do it and hopefully I don't do anything too wacky or too hard to change later
Given there are nearly 400,000 apps in the Apple App Store and it requires a Mac to develop those ...At least there's not a lot of Mac users in the programming world
Have you compared VB.Net to VC.Net? The curly brackets are about the only difference! In 10 years they will be the same. What will we argue about then?This is a bit like the C versus Basic argument.
You know, the one that comes from the experts who have eventually mastered C.
The correct use of 'white spaces' in code ?What will we argue about then?
Well, that is the kind of thing I need.The correct use of 'white spaces' in code ?
CheckForLeverPress:
If PinC.2 = 1 then
Pause 50
GoSub Feed
Endif
GoTo CheckForLeverPress
goto start1
Sleep is for the weakTime you were in bed, 120
Here we go then, some white space;Well, that is the kind of thing I need.
So what's your rule for indentation then? It sort of looks good at the start:This is what I've been doing so far.
Try to ignore the GoTo's
Code:CheckForLeverPress: If PinC.2 = 1 then Pause 50 GoSub Feed Endif GoTo CheckForLeverPress goto start1
You legend!In LinAXEpad, try ticking or un-ticking the View -> Options -> Text -> Save in unix file format option. That might give some improvement but Linux and Windows/MS-DOS use incompatible end of line indications which is where the problem stems from.
the 4 then 5 error is because I did it by eye as the tab button doesnt work in the <code> </code> tags.So what's your rule for indentation then? It sort of looks good at the start:
- labels in col 1
- code indented 5 spaces
-...but then code inside a conditional indented another 4 spaces (why not 5?)
-...but then the code goes back to starting at col 1
You invited pedantry....
CheckForLeverPress:
If PinC.2 = 1 then
Pause 50
GoSub Feed
Endif
Return
Goto Start1
Pretty funny made-up story.
Programmer: Hey boss, look, I finished the code for the Acme project !
Looks like we're gonna make the deadline and get the $20,000 performance bonus !
Manager: Great Lester, you're the man! ACME has been banging my
box for 5 days on this! They want it now ! Let me take a look .....
...
Sheesh ! The things I have to go through around here to get stuff done!
But we mustn't forget companies pay the wages and set the rules, managers enforce those rules and it's for others to generally do as they are told, to comply with those rules.Manager: There's a problem cause I say there's a problem! Haven't you read Dikjstra!
No one past kindergarten level programming uses GOTO anymore you lazy idiot!
This is a disaster!
Sounds like the "Peter Principle" at work. I have seen many managers who rose to a level where they were out of touch...I worked as a programmer for a small UK company, many years ago. We had a contract with an oil company in Iraq.
The Director of the programming department went to Iraq (yes before all the hubbub), to demonstrate my cool new program. (It was supposed to collate lot's of oil pipeline temperature readings).
He did not tell me he was going, and he did not ask me for the latest version. He just helped himself to one of the disks in my disk box one day, and got on a plane.
A few days later, he was back and fuming at me!. He had taken the wrong disk with several partial versions, non working. I guess he had to blame someone.
I would have paid good money to see that meeting.
The Peter Principle states that "in a hierarchy every employee tends to rise to his level of incompetence", meaning that employees tend to be promoted until they reach a position at which they cannot work competently.
I had another indcident with the same programmer who caused the incident I discussed earlier. I was looking at program code pulled from the source code library. All of the formatting (indentation, white space, line feeds, comments, etc) had been removed from the program.While at that company, I heard amazing stories from my friend in the support department. Here's two:
-(On the phone) Client says 'It's asking me to insert disk 3, but I can't get it in with the other two disks.' (Old days of large floppy disks).
-(On the phone) Client says system has crashed. Support says do you have the backup disks? Client says yes, I am diligent about archiving backups. So the support guy drives 20 miles to the client and asks for the disks. He is given a ring binder with all the backup floppies in it. All of them HOLE PUNCHED to fit on the rings.
Yep! Showing it's age but still used widely in large corporations - especially with large mainframe relational databases like DB2, Oracle, etcAh COBOL. A mad language.
Start1:'======= check for feed status==============================
Do
let LastFeed = time/OneMinute 'calculate and store the number of minutes since last feed
if FeedsRemain = 0 then
goto Start1 ' bail out of the loop if they cant have any more feeds
endif
if LastFeed < FeedWait then
goto Start1 ' bail out of the loop if time isnt up
endif
[stuff deleted]
Loop
End
Start1:'======= check for feed status==============================
Do
let LastFeed = time/OneMinute 'calculate and store the number of minutes since last feed
if FeedsRemain > 0 then
if LastFeed > FeedWait then
Do the feed stuff
Endif
Endif
Loop
End