Quickie Poll -- C vs. C++

up

poll.

I knew a young dude (he was eventually fired), a very productive Java programmer, who was assigned the task of parsing many large files and finding and substituting some specific combinations of binary characters with predefined asci sequences. Simple ? He spent a day or two, built some java classes, used existring library classes, classes upon classes of useless java code, at least 500 lines of code he wrote himself His prog took forever to debug and run and at the end didn't work as expected

I happened to be passing by and had a pleasure of showing him (and the boss) how to do it in literally 3 lines of Perl and about 100 times faster

Back to school, dude

Try to improve your GPA

Reply to
fatalist
Loading thread data ...

Its a poor workman who doesn't have a decent set of screwdrivers.

Reply to
Michael A. Terrell

I've seen plenty of Robertson screws with stripped heads. I had to remove them with an angle grinder and five foot crow bar, followed by a set of vice grips.

Reply to
Michael A. Terrell

Same here. A lot of Robertson screws don't seem to have the square inset deeply enough prevent easy stripping!

I don't think I've ever seen a stripped Torx or hex socket screw. (...although I have managed to round off smaller Allen wrenches trying to remove really tight hex socket screws...)

Reply to
Joel Koltner

Some 'so' called Allen wrenches are not properly hardened. I've seen them twist off in the screw head. After digging out the crap, a real Allen wrench removed it with no problem.

One thing that helps is to stick a wrench into the head and hit it with a hammer before trying to remove it.

Excelite used to sell a nice set, with their 66 series handle. I've had my set for about 35 years.

Ever used 'Bristol' wrenches?

Reply to
Michael A. Terrell

Stainless steel is less stronger than normal steel.

--
Failure does not prove something is impossible, failure simply
indicates you are not using the right tools...
nico@nctdevpuntnl (punt=.)
--------------------------------------------------------------
Reply to
Nico Coesel

That's very likely the case -- for small hand tools, I often haven't paid enough attention to the quality of the tool.

I do find it rather annoying that some crappy screwdriver manufacturers actually color the tip dark grey to make it *look* like the tip was hardened when in actuality it's 100% cosmetic!

No, but they look pretty bullet-proof from the drawings on Wikipedia!

---Joel

Reply to
Joel Koltner

it's tempting to use those 'free' wrenches that come with furniture, but they are usually so soft that won't even let you take abart what you assembled with it. I have a coffee can full of them, for when someone wants to 'Borrow a hex key'. When they come back and tell me it was no good, I tell them to hit one of the Fastenal or Grainger's stores and buy what they need. ;-)

Or they chrome plate crap metal to hide what they are selling.

They didn't slip in the screw head, but they would snap. A lot of W.W.II surplus electronics used them for setscrews and in knobs. When the equipment was new, each wrench needed for repair was in a fahnstock clip. By the time the equipment was sold as surplus, they were mostly missing.

Reply to
Michael A. Terrell

s

REXX appeared in VM/370 in about 1979 or so.

Reply to
robertwessel2

SS and aluminum undergo some interfacial reaction that makes the screws seize up and gall when you try removing them. There's special anti-seize grease for that.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058
hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

Turns out it was first conceived in 1979 and appeared in a product in

1982. Great language--arbitrary precision arithmetic and associative arrays built in, really good string handling, and very very few nasty surprises. (Mike Cowlishaw articulated the 'principle of least astonishment' as one of the foundations of REXX's design, and he did a pretty good job of minimizing it.)

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058
hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

I would have to say both. Since I use VC++ to build projects involving PCB, I usually end up with at least one PC/VC++ program.

Visual Studio 5.0, if you consider it a language. Because I have it and it's good enough.

Quick and dirty user interfaces.

Both, but I always stay with the C subset if possible. Just habit.

8 or 32. Nothing in between.

32K to 64K.

C is usually easier to pick up on. But once you are familiar with it, you don't feel much differences between them. I have been using MFC/C+

  • libraries without thinking too much. On the micro side, it's almost always C.

Yes.

Yes.

Yes.

Exact same answers as me, except I use Visual Studio 6 - sure you didn't mean 6 ?

Reply to
IanM

At 1000 lines i would probably use C. For much larger projects the use of C++ becomes more common for me. For uCs i generally use ASM.

Marginally, at times.

8/16 bit uCs. 32/64 on desktops.

uCs so far under 8k. Desktop soft generally over 64k to many MB. GUIs are expensive.

I'd be mighty uncorfortable using any external lib on a uC. Can't avoid them on desktop.

Quite.

Quite.

I would be more likely to be the hardware engineer.

Reply to
JosephKK

I have stripped a few smaller Allen key screws and snapped more than a few heads off; not with torx yet. Clutch is pretty good as well.

Reply to
JosephKK

I got my introduction to Rocky Mountain BASIC for instrument control on the HP 9845B, the predecessor to the 9816, in 1978.

Reply to
JosephKK

s

You need to see this from the right angle: A class is a type. This allows you, the programmer, to cooperate with the compiler in very powerful ways.

You *might* want to expand the class ito a hierarchy, using all sorts of inheritance, virtual functions and all kinds of stuff that add a lot of overhead, but you don't need to.

Once you, the programmer, is free to declare your own types - classes - you all of a sudden get access to the most powerful featiures of C++ right now: Templates. This means that you can use the standard functionality of the STL merely by ensuring that your custom data type - the class - has some basic functionality.

As long as you make sure your class has a operator

Reply to
Rune Allnor

I even had a FP accelerator board that came with a RMB-compatible

*compiler*. For the time, that one _flew_. IIRC it used some obscure Intel iapx432 or i860 floating point chip, not a 68881.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058
hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

For small projects (as the OP asked) it is often very important how transparent the compilation process is. For small embedded targets, I nearly always read the generated assembly code to see that the result is satisfactory.

The more powerful abstractions are used, the less transparent the translation process is.

Properly used, C++ can at times produce nearly as good code as C, but it will be more tedious to tune the source. Also, the minimum run-time overhead is larger with most compilers.

--

Tauno Voipio
tauno voipio (at) iki fi
Reply to
Tauno Voipio

On Linux or Windows C++. STL and objects make life a lot easier. I looked into C++ for microcontrollers. IMHO C++ should be useful there as well. A lot of programmers emulate objects in C nowadays. Why not have the compiler deal with it and reduce the chance on bugs?

32

Depends on the project. Some of my projects need less than 1kB some need >500kB. In some cases the memory is limited. Clever coding can perform miracles.

I'd be happier to know how it was tested and with what optimisation setting it was compiled.

--
Failure does not prove something is impossible, failure simply
indicates you are not using the right tools...
nico@nctdevpuntnl (punt=.)
--------------------------------------------------------------
Reply to
Nico Coesel

I don't disagree with anything you've stated except perhaps the main point. There are just some projects that don't need the power, and thus the complexity, of C++. Simpler is better. Always.

--
Randy Yates                      % "She's sweet on Wagner-I think she'd die for
Beethoven.
Digital Signal Labs              %  She love the way Puccini lays down a tune,
and
mailto://yates@ieee.org          %  Verdi's always creepin' from her room." 
http://www.digitalsignallabs.com % "Rockaria", *A New World Record*, ELO
Reply to
Randy Yates

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.