The value of a CS education

AlwaysWrong is *ALWAYS* wrong.

Reply to
krw
Loading thread data ...

What do you mean by that? Punched-card decks in the computer center?

A decent Basic is compiled like C or ADA.

Of course it does. "Real" programmers usually mock Basic as being too, well, basic.

PowerBasic is a cool language.

ERRCLEAR

TCP OPEN PORT 2000 AT IP$ AS # 8 TIMEOUT 50 CPORT% = 8

IF ERR THEN

LOCATE 22, 10: PRINT "TCP OPEN ERROR" SLEEP 2000 CPORT% = 0

END IF

TCP RECV #8, 2000, B$ ' FLUSH THE TCP BUFFER!

What language do you program in? Show us some of your code.

John

Reply to
John Larkin

...and interpretation isn't, by any definition, "batch".

Babble. Dimbulb posts examples regularly.

Reply to
krw

A linguistics major. Actually this isn't a stretch. Either a natural or programming language needs to conform to certain rules and practices in order to convey knowledge efficiently.

Not sure about that efficiency thing w.r.t Perl.

--
Paul Hovnanian     mailto:Paul@Hovnanian.com
------------------------------------------------------------------
All wiyht. Rho sritched mg kegtops awound?
Reply to
Paul Hovnanian P.E.

BASIC has never been shy about having lots of keywords. C can't even print! I'm surprised it even has arithmetic operators; they should have done mul(a,b) and such, function calls.

John

Reply to
John Larkin
[much elided]

Of course. Sadly.

I am tickled that -- 35 years later -- I still look forward to each day's work and grumble increasingly about my body's inability to sustain the long days (nights?) that my mind craves.

I wonder what it must be like to "push a broom"? :-/

On a personal note, then, why did you opt for the Physics (?) degree if your interest lay elsewhere?

Exactly!

We're finishing up a kitchen remodel. (when I say "we", I don't mean we are writing *checks* but, rather, are actually *doing*!)

A typical dishwasher installation adjacent to the sink routes the water supply, drain and power through a hole cut in the side of the sink cabinet.

In addition to being crude and sloppy ("Who cares? No one will ever *see* it!"), it also causes more clutter under the sink as the service loops for those pipes, hoses and wires are "stored" there.

Likewise, the water shutoff for the dishwasher often piggybacks on the "stop" for the sink. I.e., if you want to shut off the water supply to the dishwasher, you have to shut off the (hot) water supply to the sink! (so, if you have a problem with your dishwasher and have to resort to washing dishes "by hand", you will have to do so without the benefit of hot water!)

Instead of blindly following the "tradition", I opted to route the water and power supplies through the wall *behind* the dishwasher. This seems obvious -- until you notice that many/most dishwashers are *exactly* 24.0 inches deep (hint: cabinets share the same measurement :> ). I.e., there is no room for *anything* "behind" a dishwasher!

"Hmmm... maybe that's one reason why folks resort to butchering the sink base instead!"

Of course, the solution is obvious: recess the supplies *into* the wall so the appliance can sit flush with the wall without having to contend with interference from these lines.

And, while you're at it, put a *separate* stop in the water line to the dishwasher so you can shut off its water supply without affecting the sink!

[this effort was inspired from a similar effort I made to recess the "water filter" for the refrigerator into the wall behind the refrigerator!]

Having done this, I now understand the issues that are involved in a level of detail that I assume most home *builders* do not!

The trouble with this sort of learning experience is that it can be expensive (in my case, just my "time" -- the components were actually no more expensive). If a client/employer is footing the bill, this starts to become an ethical issue...

But you don't have to aim to be a "master". Just exposing yourself to the types of issues that are involved gives you another set of experiences on which to draw when making future "extrapolations" (as my refrigerator experience empowered me wrt the dishwasher).

Ah, but when you have 30 such devices in a home, now its no longer "a watt or two"! This is comparable to not caring about the efficiency of a matrix initialization loop. :-/

Walking around the house, presently, I see (active -- not counting items that I know to be unplugged or have *real* power switches):

- a cordless vacuum cleaner sitting in its charger (pretty blue LEDs lighting the thing up... I guess so I can find the 4 ft tall device in case I don't recall where I INSTALLED the charging station :< )

- charger for one of my tablet PC's

- charger for one of my laptops

- chargers for two PDAs

- chargers for four cordless phone handsets

- charger for PMP

[of course, all of these devices have lights that remind me that they are charging and/or charged]

- power supplies for two LCD monitors (I am giving the LCD monitors with "AC line inputs" the benefit of the doubt that they draw "very little" power when off... though since only one has a true *switch* in the power leads, I know that to be an illusion)

- power supplies for two NAS boxes

- wireless headphone charging/transmitter base

- a printer (the big printers have "real" power switches)

- a scanner (the two "less consumer" ones have real switches)

- a video digitizing box

- 7 computers

- 2 X-terminals

- a wireless "router" (doesn't even *have* a power switch!)

- network modem (also without a power switch)

- 3 network switches (no power switch even on the SOHO one)

- 4 UPS's

[OK, I'll admit to having a lot of kit... but, even a casual electronics/computer user has much of this!]

And, that doesn't count the regular household appliances (TVs, stereos, DVD players, microwave oven, clock in stove, soft controls for the range, etc.). Hell, even the *fans* have "soft controls"!

I'm *sure* that the furnace/AC is also burning a fair bit of power just waiting for a contact closure in the thermostat!

No *one* of these manufacturers saw *their* product as being particularly inefficient. And, when you look at the *relative* power consumption (off vs. on), none of them really are!

Yet, in toto, they conspire to waste a lot of power just to provide me the "convenience" of "soft controls", etc.

I've started a project to replace all of the multimedia kit, here, with a server based approach. In addition to removing the "eyesores" that all these little boxes (DVD player, VCR, stereo, TV, etc.) represent, part of the appeal was to cut down on "idle" power consumption.

I.e., feed power to the devices from a central location instead of having lots of little wall warts "keeping the walls warm". And, if you can feed the power centrally, you can also control it there! So, if "you" know you aren't playing music from this device, you can implicitly power it down! If your audience leaves the room, you can move the program material to wherever they ultimately end up -- and power down the device(s) they have abandoned.

[of course, there are other benefits, as well]

The point is, thinking about these things in the context that they

*will* be used -- instead of just in the isolation of your "product catalog" :-/ [End of sermon. Please leave your donations in the collection plate at the rear of the building on your way out... :> ]
Reply to
Don Y

On a sunny day (Sat, 01 Oct 2011 12:13:48 -0700) it happened John Larkin wrote in :

It would help if you knew what you were talking about.

Reply to
Jan Panteltje

Technically, he's right. It's the standard libraries that provide this functionality. (whether you consider them part of the language itself is a separate issue)

Of course, there is no similar concept in, e.g., BASIC.

To be fair, one could argue that (Dartmouth) BASIC can't handle imaginary numbers, non-ASCII strings, etc.

[How these "extensions" are handled says a lot about the philosophy behind C vs BASIC, etc. I.e., BASIC is burdened with the PRINT capability even if it is not needed -- and, *constrained* to the capabilities it is deployed with.]
Reply to
Don Y

How it is compiled and how it is ran are two different things, idiots.

Reply to
SoothSayer

Why is PRINT a burden? Modern compilers don't include code that's not invoked. Besides, my PowerBasic programs compile to tiny EXEs, even with PRINT USING. One test program, that includes TCP/IP, compiles to

17K. Our materials control program, serious stuff, is 400K.

And why is it constrained?

PRINT USING is one of the main attractions of BASIC.

I wrote a serial command parser in 68K assembly a while back. It assembled to about 400 bytes. One of my guys replicated it in C, for ARM, same function, 27K bytes.

John

Reply to
John Larkin

What about the run time that most likely has to be loaded on the system?

Jamie

Reply to
Jamie

  • Because it ties up a slot in the namespace.

(I can't recall if ANSI C requires "print" to be considered as a reserved keyword. I seem to recall the libraries were beyond the scope of the language -- regardless of how ubiquitous they are! In any event, the *user* -- not the language -- can define how print works... does it write on a console? printer? tape unit? or flash LEDs in bizarre, psychedelic patterns?!)

  • Because not all BASIC is compiled (i.e., an interpreter still has to know how to PRINT since it has no idea as to whether or not you *might* want to use that keyword).

Just because it's "BASIC" doesn't mean that it *will* be compiled or will be a specific dialect...

Can you pass a pointer to an object to a "subroutine" and have that object manipulated however the subroutine choses? Or, a pointer to a *function*?

Can you create a function having an arbitrary name and consisting of more than one line of code?

[Actually, Dartmouth BASIC wouldn't even let you create a *variable* named "XX"]

Can you create an array having 35 dimensions?

Can you support long doubles? Long long ints?

etc.

[PRINT *USING* is not part of Dartmouth BASIC.]

Can you print %g/%f/%e notation? (or, do you have to write a subroutine to do that for you) Can you expose the underlying encoding of a particular value? (i.e., bit pattern)

Can you print 7 (or more) significant digits?

Can you READ a *file*?

Can you print (emit) anything other than US-ASCII characters?

Can your "program" use more than ~8KW (TEXT + DATA)? :>

Did you realize that the following code fragment is illegal: IF X >= 101.002 THEN STOP DATA 1.1, 2.1, 3.1, 4.5, 5.3, 6.7 [...] 50.2 DATA 51.9, 52.3, 53.01, 54.99, [...] 100.26 (Why? :> )

[These are the sorts of reasons why BASIC is often "ridiculed".]

So? Swap job titles with the guy! (assuming the 26.6K savings is critical to your organization)

Reply to
Don Y

Fair enough. I operate my own business in much the same way (so, I have to assess each job to decide if I *want* to learn what will be required for the job *before* accepting it)

Ah. In my case, I'd rather learn about a lot of different things (deep enough to have more than a casual familiarity; not deep enough to consume time that could be spent learning other things -- like how to plumb dishwashers :> ). I rely on others to get that "last 10%" (hoping that I've made a big enough difference in the *first* 90%)

That was my point ----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ So, aren't there any smart power supply designers that can address this issue? Esp since it is so *pervasive* in modern devices? How many USB powered devices "stay on" (using ~2W) as long as they are connected to a host (even if they aren't being *used*)?

Reply to
Don Y

Just thought you'd like to know that _some_ CS folks do actually have passion and have worked on solving just the above kind of problem. (And yes, I read all three of Knuth's books in the mid 1970's, entirely for recreation.)

Look up the Bulldog Compiler PhD thesis, sometime when you get a chance. Lots of good stuff in there. Circa 1985 or so, memory serving. Your above point reminds me of it.

Jon

Reply to
Jon Kirwan

You just have to put in a real power switch. If you disconnect the mains, there's no drain. Of course you need an EEPROM or a backup battery for user settings, but that's just too bad.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics

160 North State Road #203
Briarcliff Manor NY 10510
845-480-2058

hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

Sure, I worked in the Computer Science department at IBM Research for several years. There are lots of good ones, but of course I really only know CS Ph.D.'s. I just think that the fashion-driven aspect of the field is deplorable.

Cheers

Phil

--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics

160 North State Road #203
Briarcliff Manor NY 10510
845-480-2058

hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

Given that I had a 16 MHz clock, and his is 250, and he's running out of cache, I wouldn't expect the ARM version to be much worse than 5x slower.

John

Reply to
John Larkin

AlwaysWrong is *always* wrong.

"Is ran"? Nice, DimBulb.

Reply to
krw

Don't forget, the "B" is for "Beginners'.

Beginners' All-purpose Symbolic Instruction Code.

Hope This Helps! Rich

Reply to
Rich Grise

I like to design my programs before I write them, but my pseudocode always seems to morph into C. =:-O

Cheers! Rich

Reply to
Rich Grise

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.