Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #13064 > unrolled thread
| Started by | "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> |
|---|---|
| First post | 2012-01-04 05:49 +0100 |
| Last post | 2012-01-04 11:33 +0000 |
| Articles | 12 — 7 participants |
Back to article view | Back to comp.lang.c++
sinners, repent! "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2012-01-04 05:49 +0100
Re: sinners, repent! Ian Collins <ian-news@hotmail.com> - 2012-01-04 20:04 +1300
Re: sinners, repent! "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2012-01-04 09:00 +0100
Re: sinners, repent! Goran <goran.pusic@gmail.com> - 2012-01-04 02:10 -0800
Re: sinners, repent! "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2012-01-04 11:09 +0000
Re: sinners, repent! hanukas <jukka@liimatta.org> - 2012-01-05 01:12 -0800
Re: sinners, repent! "Paul" <pchrist<nospam>or@yahoo.co.uk> - 2012-01-05 11:12 +0000
Re: sinners, repent! hanukas <jukka@liimatta.org> - 2012-01-05 13:11 -0800
Re: sinners, repent! Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-01-06 00:18 +0000
Re: sinners, repent! 88888 Dihedral <dihedral88888@googlemail.com> - 2012-01-06 08:18 -0800
Re: sinners, repent! hanukas <jukka@liimatta.org> - 2012-01-07 04:27 -0800
Re: sinners, repent! Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-01-04 11:33 +0000
| From | "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> |
|---|---|
| Date | 2012-01-04 05:49 +0100 |
| Subject | sinners, repent! |
| Message-ID | <je0lpb$aai$1@dont-email.me> |
I discovered that in 1997 (then as a fresh senior consultant with
Accenture) I wrote, for personal use, a header with Lakos style include
guards and even "using namespace std;" in the header!
And I wrote e.g. "string const &s" instead of more proper C++ mindset
"string const& s" -- ouch! And just blasted on with blank lines. It
seems that I was very very much in love with blank lines then. And
perhaps also my own name. Writing it TWICE in the header.
Well I can understand the Lakos-style guards; technology had not yet
progressed to the point where they have no advantage. But the "using
namespace std;"??? Did this have something to do with Visual C++ 5.0?
I shudder to think that at this point I had taught C++ at college level.
But on the other hand, this was all before C++ was standardized. Oh
right, that may have something to do with the namespace abuse.
Well I knew my Windows API, evidently, but not quite my C++!
On a positive note, I did already at this time use "Dependencies" and
"Interface" comment lines in C++.
That distinction does make for a very clean structure, when one has
background & experience from some modular language such as (in my case)
Modula-2 and UCSD Pascal. May C++ gain a module concept soon! Real soon!
<code>
////////////////////////////////////////////////////////////////////////////
//
// Module: APP EXCEPTIONS
// interface
//
// First of all, implements std operator new semantics (bad_alloc, nothrow)
// for Visual C++ 5.0 simply by installing a throwing new-handler -- the
// rest is already in place (but undocumented) in the VC++ 5.0 runtime lib.
//
// Secondly, defines an exception class [api_error] as
//
//
// exception
// runtime_error
// api_error
//
//
// Copyright (c) 1997 Alf P. Steinbach
// Author: Alf P. Steinbach
//
#ifdef __APP_EXCEPTIONS_H__
#error [app_exceptions.h] included twice. Guard your #include's!
#else
#define __APP_EXCEPTIONS_H__
#endif
//---------------------------------------- Dependencies:
#ifndef _STDEXCEPT_
#include <stdexcept> // runtime_error
using namespace std;
#endif
#ifndef _NEW_
#include <new> // bad_alloc
using namespace std;
#endif
#ifndef _INC_WINDOWS
#include <windows.h> // GetLastError
#endif
//---------------------------------------- Interface:
// The first constructor uses APIErrorMessage() as the string for what().
// The second constructor lets you specify the string for what().
// The APIErrorMessage() function retrieves the Windows error message text.
class api_error: public runtime_error
{
typedef runtime_error super;
// Construction & destruction:
public:
api_error( DWORD an_api_errorcode = GetLastError() ) throw();
api_error( string const &s, DWORD an_api_errorcode = GetLastError() )
throw();
api_error( api_error const &rhs ) throw();
api_error& operator=( api_error const &rhs ) throw();
virtual ~api_error() throw();
// Accessors:
public:
virtual string const APIErrorMessage() const throw();
virtual DWORD APIErrorCode() const throw();
// State:
protected:
DWORD error_code;
}; // api_error
</code>
Cheers, & may you not, in 2012, commit the sins I did above in 1997,
- Alf
[toc] | [next] | [standalone]
| From | Ian Collins <ian-news@hotmail.com> |
|---|---|
| Date | 2012-01-04 20:04 +1300 |
| Message-ID | <9mibvlFpeqU7@mid.individual.net> |
| In reply to | #13064 |
On 01/ 4/12 05:49 PM, Alf P. Steinbach wrote: > I discovered that in 1997 (then as a fresh senior consultant Isn't "fresh senior consultant" an oxymoron? -- Ian Collins
[toc] | [prev] | [next] | [standalone]
| From | "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> |
|---|---|
| Date | 2012-01-04 09:00 +0100 |
| Message-ID | <je10vd$ng7$1@dont-email.me> |
| In reply to | #13065 |
On 04.01.2012 08:04, Ian Collins wrote: > On 01/ 4/12 05:49 PM, Alf P. Steinbach wrote: > >> I discovered that in 1997 (then as a fresh senior consultant > > Isn't "fresh senior consultant" an oxymoron? > Not really. I came to consulting from a teaching position at Bodø College (now Bodø University). I started out doing Very Good Things at the college, then as an "amanuensis" (sort of lowest grade of professor in English countries, I think), like completely revamping their introductory programming course, and creating a new course in Windows GUI programming, but then the rules were changed so that had to have a doctorate to be employed as "amanuensis", and then consulting seemed a pretty good idea. And [comp.lang.c++] played a key rôle in that profession change. For Petter Hesselberg, then a manager at AC (now Accenture), was mightily impressed with what he'd read of my clc++ postings, in particular (which baffled me!) one answer I gave to a question (possibly his) about the repeat rate of the keyboard repeat on a PC (which surely must have been off topic). So I came to AC. And the only mention of me in any book, is, AFAIK, in the acknowledgments in Petter's "Programming Industrial Strength Windows". Well it might seem weird to today's youngsters here that at one time one could actually land a job through clc++ postings. Anyway, Cheers, & a happy new year, - Alf
[toc] | [prev] | [next] | [standalone]
| From | Goran <goran.pusic@gmail.com> |
|---|---|
| Date | 2012-01-04 02:10 -0800 |
| Message-ID | <4ceded04-959e-404e-a4c8-95c6cb3759ac@j9g2000vby.googlegroups.com> |
| In reply to | #13068 |
On Jan 4, 9:00 am, "Alf P. Steinbach" <alf.p.steinbach +use...@gmail.com> wrote: > Well it might seem weird to today's youngsters here that at one time one > could actually land a job through clc++ postings. Actually, just that happened to me last year, much to my amazement. Some company's recruiters approached me with the pretext that they saw some posting(s) of mine here. Talking with the recruiter, I concluded that she couldn't possibly understand postings here, so it must have been company's engineering staff that ticked it. I failed to land a job, but the offer was very real. Goran.
[toc] | [prev] | [next] | [standalone]
| From | "Paul" <pchrist<nospam>or@yahoo.co.uk> |
|---|---|
| Date | 2012-01-04 11:09 +0000 |
| Message-ID | <je1c21$3gk$1@adenine.netfront.net> |
| In reply to | #13071 |
"Goran" <goran.pusic@gmail.com> wrote in message news:4ceded04-959e-404e-a4c8-95c6cb3759ac@j9g2000vby.googlegroups.com... On Jan 4, 9:00 am, "Alf P. Steinbach" <alf.p.steinbach +use...@gmail.com> wrote: >> Well it might seem weird to today's youngsters here that at one time one >> could actually land a job through clc++ postings. >Actually, just that happened to me last year, much to my amazement. >Some company's recruiters approached me with the pretext that they saw >some posting(s) of mine here. Talking with the recruiter, I concluded >that she couldn't possibly understand postings here, so it must have >been company's engineering staff that ticked it. I failed to land a >job, but the offer was very real. Same thing happenend to me about 10 years ago. But I told them I wasn't a professonal. :) Alf was a consultant back then too. --- Posted via news://freenews.netfront.net/ - Complaints to news@netfront.net ---
[toc] | [prev] | [next] | [standalone]
| From | hanukas <jukka@liimatta.org> |
|---|---|
| Date | 2012-01-05 01:12 -0800 |
| Message-ID | <98695ace-b4bc-4e6b-b674-eb95b27cf534@p42g2000vbt.googlegroups.com> |
| In reply to | #13071 |
On Jan 4, 12:10 pm, Goran <goran.pu...@gmail.com> wrote: > On Jan 4, 9:00 am, "Alf P. Steinbach" <alf.p.steinbach > > +use...@gmail.com> wrote: > > Well it might seem weird to today's youngsters here that at one time one > > could actually land a job through clc++ postings. > > Actually, just that happened to me last year, much to my amazement. > Some company's recruiters approached me with the pretext that they saw > some posting(s) of mine here. Talking with the recruiter, I concluded > that she couldn't possibly understand postings here, so it must have > been company's engineering staff that ticked it. I failed to land a > job, but the offer was very real. > > Goran. Same here; I got offer from MIPS 10+ years ago and EA 15 years ago or so. I have never looked for a job or had a formal job interview, been too busy for that kind of hassle. For that reason don't have CV (written) either. The neat thing about being fluent in C/C++ is that the mindset of modern application developers is that it's "a crap language" and they prefer something more "modern" (ObjectiveC, Java, JS, you know the drill). That suits me just fine as I am not interested in jobs where those skills are required anyway. Win-win for everyone. ;) I did have to learn Python recently, though. Learning new stuff is refreshing and gives new vitalizing programming energy. I didn't learn it because I wanted to, but because I had to-- but I'm glad that I did. I wouldn't write driver stack for OpenGL|ES with it, but I would write scripts for Blender with it. <-- OK, so I did write blender scripts.. sue me.. ;)
[toc] | [prev] | [next] | [standalone]
| From | "Paul" <pchrist<nospam>or@yahoo.co.uk> |
|---|---|
| Date | 2012-01-05 11:12 +0000 |
| Message-ID | <je40j7$2asd$1@adenine.netfront.net> |
| In reply to | #13115 |
<snip> >.. sue me.. ;) How much are you worth? :-P --- Posted via news://freenews.netfront.net/ - Complaints to news@netfront.net ---
[toc] | [prev] | [next] | [standalone]
| From | hanukas <jukka@liimatta.org> |
|---|---|
| Date | 2012-01-05 13:11 -0800 |
| Message-ID | <d85909e1-5780-4452-8b9d-a1fb36cb0f1d@a17g2000yqj.googlegroups.com> |
| In reply to | #13117 |
On Jan 5, 1:12 pm, "Paul" <pchrist<nospam>o...@yahoo.co.uk> wrote: > <snip> > > >.. sue me.. ;) > > How much are you worth? :-P I think the penalty of writing Python is to write at least same amount of Java code. That would be like community service, there is a certain element of punishment to be found there.
[toc] | [prev] | [next] | [standalone]
| From | Jorgen Grahn <grahn+nntp@snipabacken.se> |
|---|---|
| Date | 2012-01-06 00:18 +0000 |
| Message-ID | <slrnjgcfee.1ls.grahn+nntp@frailea.sa.invalid> |
| In reply to | #13139 |
On Thu, 2012-01-05, hanukas wrote: > On Jan 5, 1:12 pm, "Paul" <pchrist<nospam>o...@yahoo.co.uk> wrote: >> <snip> >> >> >.. sue me.. ;) >> >> How much are you worth? :-P > > I think the penalty of writing Python is to write at least same amount > of Java code. That would be like community service, there is a certain > element of punishment to be found there. Why? IMHO, Python is the perfect second language for a (Unix) C++ programmer -- for when you feel like being sloppy, or when you have to do rapid prototyping. Unlike with Java, you don't have to join a cult to use it. You have to have *some* "sloppiness language" in your toolchest, be it Python, Perl, shell script or something Microsoft ... /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o .
[toc] | [prev] | [next] | [standalone]
| From | 88888 Dihedral <dihedral88888@googlemail.com> |
|---|---|
| Date | 2012-01-06 08:18 -0800 |
| Message-ID | <32316668.729.1325866702755.JavaMail.geo-discussion-forums@prdb10> |
| In reply to | #13143 |
Jorgen Grahn於 2012年1月6日星期五UTC+8上午8時18分23秒寫道: > On Thu, 2012-01-05, hanukas wrote: > > On Jan 5, 1:12 pm, "Paul" > o....@yahoo.co.uk> wrote: > >> <snip> > >> > >> >.. sue me.. ;) > >> > >> How much are you worth? :-P > > > > I think the penalty of writing Python is to write at least same amount > > of Java code. That would be like community service, there is a certain > > element of punishment to be found there. > > Why? IMHO, Python is the perfect second language for a (Unix) C++ > programmer -- for when you feel like being sloppy, or when you have to > do rapid prototyping. Unlike with Java, you don't have to join a cult > to use it. > > You have to have *some* "sloppiness language" in your toolchest, be it > Python, Perl, shell script or something Microsoft ... > > /Jorgen > > -- > // Jorgen Grahn <grahn@ Oo o. . . > \X/ snipabacken.se> O o . Python is dynamical typed but C++ is not. A static typed language to be used in some robot applications is kind of funny. But the robot age has not prevailed yet.
[toc] | [prev] | [next] | [standalone]
| From | hanukas <jukka@liimatta.org> |
|---|---|
| Date | 2012-01-07 04:27 -0800 |
| Message-ID | <5c034764-3b4f-493f-a755-8584efcf29bd@dp8g2000vbb.googlegroups.com> |
| In reply to | #13143 |
On Jan 6, 2:18 am, Jorgen Grahn <grahn+n...@snipabacken.se> wrote: > On Thu, 2012-01-05, hanukas wrote: > > On Jan 5, 1:12 pm, "Paul" <pchrist<nospam>o...@yahoo.co.uk> wrote: > >> <snip> > > >> >.. sue me.. ;) > > >> How much are you worth? :-P > > > I think the penalty of writing Python is to write at least same amount > > of Java code. That would be like community service, there is a certain > > element of punishment to be found there. > > Why? IMHO, Python is the perfect second language for a (Unix) C++ > programmer -- for when you feel like being sloppy, or when you have to > do rapid prototyping. Unlike with Java, you don't have to join a cult > to use it. > > You have to have *some* "sloppiness language" in your toolchest, be it > Python, Perl, shell script or something Microsoft ... > > /Jorgen > > -- > // Jorgen Grahn <grahn@ Oo o. . . > \X/ snipabacken.se> O o . Don't ask too many questions, I m trying to avoid being sued for $4 I accumulated in past 20 years. Keep it quiet, please. >B)
[toc] | [prev] | [next] | [standalone]
| From | Jorgen Grahn <grahn+nntp@snipabacken.se> |
|---|---|
| Date | 2012-01-04 11:33 +0000 |
| Message-ID | <slrnjg8e94.1ls.grahn+nntp@frailea.sa.invalid> |
| In reply to | #13068 |
On Wed, 2012-01-04, Alf P. Steinbach wrote: ... > Well it might seem weird to today's youngsters here that at one time one > could actually land a job through clc++ postings. Not really -- unless you mean "through clc++ postings and nothing else". I know more about the mindsets of many people here, than about those of many of my coworkers. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o .
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.c++
csiph-web