You know you're in for a bad day of programming when....

You arnt allowed to write a line of code until you've produced a flowchart of your program

I went to a local technical college and enrolled in their "C Programmer" Diploma program back in 2001. This was one of the tenets of their philosophy. They were teaching Basic as the foundation language. Not VB, original Basic. Needless to say I left after a semester. I no longer program either. Totally soured on the concept.
 
I would think basic would be a rather bad choice for teaching as its not structured
I started with ms quick pascal, loved it actually ;)
 
I would think basic would be a rather bad choice for teaching as its not structured
I started with ms quick pascal, loved it actually ;)

I started with Pascal as well, on a Mac no less. I already had a foundation for programming when I enrolled in that program, which was why it was so frustrating having to take a class on flowcharting and then program in Basic.

I understand this school no longer teaches flowcharts and has scrapped Basic in favor of good old C. I can't help but think the only reason they had the prior curriculum at the beginning of this decade was because it was all the staff knew how to teach. Fortunately the old codgers that were teaching when I went there all seem to have moved on.
 
I would think basic would be a rather bad choice for teaching as its not structured
I started with ms quick pascal, loved it actually ;)

BASIC was nice, back in the Spectrum days. GOTO is the bane of Good. I'm teaching VB .Net this semester and aside from the market wanting maintenance programmers for the legion of VB6 apps out there, schools should go straight to C#.

All the easiness of Basic is pretty much gone (might as well give Small Basic a try if ease of learning is the goal) and the VB6 legacy behaviour still in there and hammered OOP implementation disgusts me.

EDIT: freudian slip
 
Oops, I mean to say bane of all that is good and holy! GOTO is evil, evil, kill it already! :devilish:
They can be useful to make code clearer when (assuming C/C++) 'break' just won't do the job.

For example,
  • You have a critical loop (and I do mean critical) that contains a switch statement and one of the options indicates that you must terminate that loop, or
  • when you need to break exit out of a doubly/triple nested loop
 
They can be useful to make code clearer when (assuming C/C++) 'break' just won't do the job.

For example,
  • You have a critical loop (and I do mean critical) that contains a switch statement and one of the options indicates that you must terminate that loop, or
  • when you need to break exit out of a doubly/triply nested loop

Any particular reason why an early return won't work better? My first thought was actually a thrown exception though then I remembered I'm in this forum where perf is paramount.

I guess the reason why I dislike GOTO so much is because when I was learning BASIC with my Speccy I did a program that implemented Aristoteles' dichotomy for Biology classification and because of the limitations of the language I had to write a LOT of GOTOs and label everything properly. Needless to say, debugging was a nightmare when a horse started getting classified as a species of insect. :p
 
I guess the reason why I dislike GOTO so much is because when I was learning BASIC with my Speccy I did a program that implemented Aristoteles' dichotomy for Biology classification and because of the limitations of the language I had to write a LOT of GOTOs and label everything properly. Needless to say, debugging was a nightmare when a horse started getting classified as a species of insect. :p

You had labels to GOTO ? You were lucky! We only had linenumbers on the C64!

Cheers
 
You had labels to GOTO ? You were lucky! We only had linenumbers on the C64!

Cheers

Lines numbers on Speccy too; which was a pain when we had to refactor code "above" - as you are no doubt alluding to! The expression spaghetti code doesn't convey the appropriate head-on-monitor experience. :p
 
Any particular reason why an early return won't work better?
Because there was more code after the loop.

I suppose one could put the loop in its own inlined function -so that it should be equivalent to just exiting from the loop - but not all compilers seem to handle inline very well. In either case, it would have been messier than what I ended up writing.
 
What are your thoughts on setjmp / longjmp or sigsetjmp / siglongjmp (s) ?
 
What are your thoughts on setjmp / longjmp or sigsetjmp / siglongjmp (s) ?
Jumping outside of a function? If I started thinking about that I'd begin applying the "Mallet of Enlightenment +1©" to myself :oops:.
 
Lines numbers on Speccy too; which was a pain when we had to refactor code "above" - as you are no doubt alluding to! The expression spaghetti code doesn't convey the appropriate head-on-monitor experience. :p

Exactly!!! having to inject 25 lines of code between line 95 and 100 is one of the reasons I started programming assembler 6 months after getting my C64.

Cheers
 
Exactly!!! having to inject 25 lines of code between line 95 and 100 is one of

Cheers

When I started with BASIC (urghhh) the system/editor had a facility that automatically renumbered to increments of 10. Of course, when a high school teacher then tried to introduce us to Pascal, my brain had already been tainted. Thankfully Uni enlightened me.

the reasons I started programming assembler 6 months after getting my C64.
Back in <cough> I only had access to a disassembler built in to the Apple][ ROM and so inserting code was a nasty issue.
 
10 print "Davros rules ok"
20 goto 10

My first program written on a zx81 on display in a local shop
marvel at its elegance
 
I still remembered that I tried to write a text based window system with auto-redraw and stuff, those line numbers were driving me insane... then the BASIC interpreter ran out of memory. >.<
 
speaking of text based windowing anyone remember framework2 from ashton tate ?

From wiki
"Framework was an integrated DOS-based office suite that combined a word processor, spreadsheet, mini-database application, outliner, charting tool, and a terminal program. Later versions also added e-mail support. Framework also had the distinction of being available in over 14 languages. Although DOS based, Framework supported a fully functional GUI based on character graphics"
 
Back
Top