comp.lang.c++@googlegroups.com | Google Groups | ![]() |
Unsure why you received this message? You previously subscribed to digests from this group, but we haven't been sending them for a while. We fixed that, but if you don't want to get these messages, send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
- I don't understand how this code compiles. - 1 Update
- Is it OK to OCCASIONALLY submit C++ code for comments in this group, like RFC? - 9 Updates
- C++ and Web Services (OT maybe?) - 3 Updates
- Onwards and upwards - 3 Updates
- Alternative? - 5 Updates
- Why is this - 1 Update
- Announcement of new C++11 library to handle measures - 3 Updates
Paavo Helde <myfirstname@osa.pri.ee>: Oct 01 11:22AM -0500 Chairman Mao <maotse30million@gmail.com> wrote in > { > struct B* p; > }; This code also compiles in C, which has two consequences: 1. The code must compile in C++, for C compatibility. 2. Struct B cannot be A::B, because C does not have such a concept. Thus, p here is bound to define a pointer to a top-level struct B. Probably this is specified in some obscure back-alley in the standard. Cheers Paavo |
David Brown <david.brown@hesbynett.no>: Sep 29 09:30AM +0200 On 28/09/14 16:17, Robert Hutchings wrote: > code on the internet, citing "Intellectual Property" issues. I am not > sure that I agree with that, but, as an employee, I am bound by their > decision. Thanks again to all! When you work for someone else, they own the code you write. They own the copyright, and they decide what may or may not be done with it. You are not free to post it or even discuss it without the employer's consent. And your employer is absolutely correct in making a blanket "everything we write is top secret intellectual property" statement, and only opening up for specific cases - this is the way most companies work. (There are others that are much more open, and gain many benefits from that, but that should only come after hard thought and discussion - everything secret is the default position.) You are also expected to be loyal to your employer, and not publicly criticise or condemn them (unless you suspect them of illegal or unlawful activity, which may include conning customers if you think the quality is not as high as it should be - but in that case a public newsgroup is not the right place to report it). If your employer sees the way you wrote about their code review policy, they would be justified in reprimanding you - and if you are unfortunate enough to live in a country like the USA which has almost no employee protection laws, they may even be able to fire you on the spot. If you think you have ideas that could improve your development process, such as code reviews within the company or discussing code snippets in public forums, then you should be discussing it with your colleagues and management - you can't take it upon yourself to change or ignore the policies of your company. |
Jorgen Grahn <grahn+nntp@snipabacken.se>: Sep 29 10:31PM On Sat, 2014-09-27, Vir Campestris wrote: > Before you post anything - make sure you aren't giving away any > commercial secrets. They don't have to be valuable for them to get very > cross with you. Put more strongly: I've always assumed I would get fired immediately if I ever posted anything I created while getting paid. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o . |
drew@furrfu.invalid (Drew Lawson): Sep 30 12:27PM In article <mNlWv.358129$J62.156216@fx03.am4> >When I entered my first software company, they said they also own all >the code I do on my spare time, even if its some game I am programming >at home. Is this really true as well? When you took that job, you most likely signed an employment agreement. If this was in that agreement, then it is true. Depending on jurisdiction, some parts of that agreement may not be enforcable. The agreements I've been under have included: 1) The company owns anything done on company time and company equipment, if it relates to the main business interests of the company. 2) The company owns anything done on company equipment. 3) The company owns any IP created during my employment, unless explicitly dislaimed. Any patents I receive must be assigned to the company. I think I'm currently under #3, but I haven't had reason to look recently. In some circles, #3 is called things like "the IBM rule," as they were well known for having and enforcing that. If you were working on the Great American Novel, it was recommended to pass it by HR and get acknowledgement that it was a personal work. >understand and accept that all the code done in workplace belongs to the >company, that is natural.... but I do not think its right that also code >outside work is theirs. Somewhat, this is for legal convenience. How do you prove that your project was done on your home computer, rather than on the company's dime? -- Drew Lawson | "But the senator, while insisting he was not | intoxicated, could not explain his nudity." |
Bo Persson <bop@gmb.dk>: Sep 30 06:30PM +0200 On 2014-09-30 01:43, Robert Hutchings wrote: > If I write C++ code that has nothing to do with > my employer, how can they claim it as "their" IP? THAT makes no sense > to me... And what if their huge team of lawyers claim that is DOES have something to do with your employer? Like their secret plans for a new product... Bo Persson |
Stuart <DerTopper@web.de>: Sep 30 09:36AM +0200 On 09/30/14, JiiPee wrote: > understand and accept that all the code done in workplace belongs to the > company, that is natural.... but I do not think its right that also code > outside work is theirs. Well, they can say anything they want, that's the beauty of freedom of speech. Whether it is legally sound or not is quite another story. Here in Germany your landlord can put a clause into your contract that you have to paper the walls regularly. However, such a clause is illegal in Germany and has therefore no effect. Worse, it can nullify the whole contract - which is why they put an severability clause into the contract as well. If your contract does not contain such a clause, things may turn out to be very interesting, indeed. Just out of curiousity: If you write a virus in your spare time which destroys all atomic weapons in the world (good job IMHO), and the Russians and the US Army are looking for someone to shoot, would it be your head in the block or your bosses? After all, it was _his_ code... ;-) Regards, Stuart PS: I wouldn't work for such a company in the first place. That doesn't mean that I have a problem with security, I just don't like ridiculous interference with my personal life (another thing would be if I worked for the MoD and went to anti-war demonstrations). It turns out that my contract contains a clause that I must not make statements about my work or my company to existing and _future_ clients of our company. That's a bummer. When I confronted my boss - whom I went to school with for two years - he admitted that he did not even read through this particular clause, he just copied the whole thing from the internet. |
David Brown <david.brown@hesbynett.no>: Sep 30 09:44AM +0200 On 30/09/14 01:18, JiiPee wrote: > understand and accept that all the code done in workplace belongs to the > company, that is natural.... but I do not think its right that also code > outside work is theirs. It is not uncommon for software companies to have this attitude - in fact, I believe it is the default legal position. The reasoning is basically that if you work for them as a professional programmer, then when you program you do so as a professional. Thus when you are programming, you are working - you are therefore either working for them (and they own the code), or you are moonlighting (which is illegal) and competing against your own employer. Of course it is usually possible to form agreements about what this covers, such as distinguishing between different types of programming, or for specific cases - just as you can take a second job with agreement from your main employer. A good employer will be happy to reach an accord of some sort - as long as you are not tiring yourself out with hobby programming to late at night (and thus unable to do your real job as well as you could), and as long as you are not competing with them in some way, then it is usually fine. The same thing applies in many professions, and there have been countless cases of disagreement when someone has made an invention at home that their employer then claims. So it is best to get details of such agreements in writing - especially if you are doing something that might turn out to be valuable. |
Stuart <DerTopper@web.de>: Sep 30 10:14PM +0200 Stuart wrote: >> bummer. When I confronted my boss - whom I went to school with for two >> years - he admitted that he did not even read through this particular >> clause, he just copied the whole thing from the internet. On 09/30/14, Osmium wrote: > those constraints in the USA are real close to zero. Unless you are Very > Special the company is not going to be willing to even enter negotiations > with you regarding the basics. It also displays an "attitude". Gosh, I hadn't suspected this. I wonder whether this is an "American" thing or just another indicator that software engineers are getting closer and closer to the status of a McDonald employee. If I look at the rates that are offered in most freelancer websites, I'd say that McDonalds employees are only slighly less paid. > A friend of mine wrote Science Fiction as a hobby. Our company refused to > give him permission to have it published since it might reflect badly on the > company. I can partly understand this. However, it would be better if your company allowed your friend to publish under a pseudonym. Regards, Stuart |
David Brown <david.brown@hesbynett.no>: Oct 01 09:48AM +0200 On 30/09/14 22:14, Stuart wrote: > closer and closer to the status of a McDonald employee. If I look at the > rates that are offered in most freelancer websites, I'd say that > McDonalds employees are only slighly less paid. It is not just an "American" thing - it is common world-wide for an employer to have rights to related things you do outside work. But there will be significant differences in defining "related" here. In Europe, "related" might mean "any sort of programming" - while in America it could easily mean "anything making money". There will also be significant differences in the attitudes taken by companies in enforcing such policies and contracts. In Europe, companies are allowed to take ethics and common sense into account, and they are allowed to consider the rights and feelings of their employees. In America, publicly traded companies are primarily responsible to their shareholders - their main legal obligation is to maximise profits, and everything else is secondary. So if you write a best-seller in your freetime, and the company thinks they could claim the rights to it, then they have no legal choice but to try to take it off you. Also, employers the world over have a right and a duty to protect their reputation, and that can place restrictions on what you do and how you act outside work hours. Rules for that sort of thing, and how they are enforced, will vary between the USA and Europe (and between countries in Europe). If you - as a male programmer - like to go clubbing wearing drag and fishnet tights in the weekends, you will quickly find yourself out of a job in most of the USA - while in northern Europe no one would bat an eyelid. |
"J. Clarke" <jclarkeusenet@cox.net>: Oct 02 07:08PM -0400 In article <m0dn1g$htv$1@dont-email.me>, david.brown@hesbynett.no says... > home that their employer then claims. So it is best to get details of > such agreements in writing - especially if you are doing something that > might turn out to be valuable. Just a reminder in all of this--Steve Wozniak created the Apple prototype in Hewlett-Packard's engineering lab while working as an employee of Hewlett-Packard. He offered the design to the company and when they decided they had no use for it he requested and obtained a release to market it on his own. Don't assume that a company, even a very large one with lots and lots of lawyers, will be completely inflexible on such a matter. |
Christopher Pisz <nospam@notanaddress.com>: Oct 01 06:44PM -0500 On 10/1/2014 5:19 PM, Jorgen Grahn wrote: >> C++ clients using web services. > Out of curiosity, what's a C++ client? Clients normally want to talk > to servers, not the other way around ... True... Wording. I want to talk to them and so do others. > Or a more precise question: what is your code doing, when it attracts > web service people? What area are you working in? Retrieving data from another system's database. Making two pieces of software, developed separately, usually using a different technology, share information. I can't really be more specific than that or the bosses might get upset :P Up to now, I've either made my own protocol and handed it to another company's team and went the way of just making a plain old socket on some specified port, or relied on flat file exports and the like. |
Jorgen Grahn <grahn+nntp@snipabacken.se>: Oct 02 02:01PM On Wed, 2014-10-01, Christopher Pisz wrote: > software, developed separately, usually using a different technology, > share information. I can't really be more specific than that or the > bosses might get upset :P Understood -- I realized that could be a limitation. > Up to now, I've either made my own protocol and handed it to another > company's team and went the way of just making a plain old socket on > some specified port, or relied on flat file exports and the like. I've done that too. Although I see it as a partial failure -- IMHO it's better if you can stick to designing text file formats and do Unix pipelines, perhaps tunneled over ssh. But that might very well not be feasible in your environment: it just happenes to often work in mine. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o . |
legalize+jeeves@mail.xmission.com (Richard): Oct 02 09:10PM [Please do not mail me a copy of your followup] Christopher Pisz <nospam@notanaddress.com> spake the secret code >REST and SOAP. Where would we start in C++ land without handy IDE code >generators and frameworks those .NET guys have? >Did boost have anything built in that I should look up? I'm not aware of anything in boost, although there is cpp-netlib that hopes to fill this void. <https://github.com/cpp-netlib/cpp-netlib> >I tried GSoap and failed at it after 3 days of trying. Any others to >look into? Yeah, GSoap isn't the greatest thing. I've used it successfully in the past to talk to WSDL based web services from C++, but I usually cringed when I looked at the code it generated from the WSDL. For WSDLs with objects with many (hundreds) of methods, the resulting library was tens of megabytes, which didn't install confidence in our team. The one thing GSoap has going for it is that if you need to talk to a WSDL based service from C++ and the WSDL is reasonably sized, then it provides a ready-made path for achieving that objective without writing tons of manual code. However, most of the world has left WSDL (SOAP) based web services behind and instead focused more on RESTful APIs. A good, free book on designing RESTful web services is here: <http://restfulwebapis.com/rws.html> If you want to supply a restful API from your C++ based server, then you might want to look at this stack overflow thread: <http://stackoverflow.com/questions/15183232/library-for-restful-api-in-c> -- "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline> The Computer Graphics Museum <http://computergraphicsmuseum.org> The Terminals Wiki <http://terminals.classiccmp.org> Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com> |
Christopher Pisz <nospam@notanaddress.com>: Sep 30 02:32PM -0500 On 9/30/2014 12:33 PM, Mr Flibble wrote: > possible should be portable so get rid of that Winsock shite and use > boost.asio. > /Flibble I don't particularly enjoy debugging boost.asio, but haven't really heard of anyone getting around that with iocp. Who started the thread, is hard to find out. |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Sep 30 06:33PM +0100 >> Only got one comment: use boost.asio and get rid of all that crap. > The C++ Middleware Writer is an alternative to the > serialization library in Boost more so than asio. That is no reason to not use boost.asio; boost.asio is for networking not serialization. Rule of thumb for modern software development: as much as your code as possible should be portable so get rid of that Winsock shite and use boost.asio. /Flibble |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Oct 02 08:55PM +0100 >> likely that it will go into next major revision of C++. > I don't consider asio to be beyond competition and > some of what's in the standard isn't very good. Stop reinventing a not very good wheel mate. Use boost.asio; abstract it if you like (I do). /Flibble |
Christopher Pisz <nospam@notanaddress.com>: Oct 01 06:48PM -0500 On 10/1/2014 6:44 PM, Victor Bazarov wrote: >>>> On 10/1/2014 3:36 PM, MikeCopeland wrote: >>>>> I'm scanning a std::vector and deleting certain elements as I >>>>> traverse the vector. SNIP >> also look at std::find_if in <algorithm>. > You probably meant std::remove_if ... > V Even better! |
Victor Bazarov <v.bazarov@comcast.invalid>: Oct 01 07:44PM -0400 On 10/1/2014 7:36 PM, Christopher Pisz wrote: > Not enough info given really. If you expect to go front to back, and > delete multiple elements, then that's probably the best way. You can > also look at std::find_if in <algorithm>. You probably meant std::remove_if ... V -- I do not respond to top-posted replies, please don't ask |
Victor Bazarov <v.bazarov@comcast.invalid>: Oct 02 08:19AM -0400 On 10/2/2014 7:19 AM, peter koch wrote: > documentation. Actually, this is only partly sarcastic. You must be > aware that remove_if does not remove anything, so it might be a bad > name although I am pressed to find a better one. std::rearrange_if ? (I'm for that one) std::preerase_if ? (worse, yet suggestive) After all, all that algorithm does is to *mutate* the sequence in a way that makes it easier to trim/excise the specific elements. V -- I do not respond to top-posted replies, please don't ask |
Jorgen Grahn <grahn+nntp@snipabacken.se>: Oct 02 02:05PM On Wed, 2014-10-01, MikeCopeland wrote: > traverse the vector. Help mI've received here suggest that I must use a > scalar index for this process, even though I'm using an iterator to > traverse the vector. Several people recommended std::remove_if() or variants as the right solution. There's no indexing there! At least none that you have to worry about. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o . |
Jorgen Grahn <grahn+nntp@snipabacken.se>: Oct 02 02:24PM On Thu, 2014-10-02, peter koch wrote: > Actually, this is only partly sarcastic. You must be aware that > remove_if does not remove anything, so it might be a bad name although > I am pressed to find a better one. std::last_judgement() maybe? The good go to Heaven, the bad to Hell? /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o . |
Victor Bazarov <v.bazarov@comcast.invalid>: Oct 01 04:22PM -0400 On 10/1/2014 4:05 PM, Bint wrote: >> and it is unsigned. >> /Flibble > Boy, that makes no sense to me. Which part? > I mean, I understand that an unsigned value > can never be negative, but if you throw it into a calculation with signed > values then it should just be treated as a positive value. And it is. > Let the left > side of the equation determine whether the result can be negative or > positive. And in your case what is the "left side"? > I can't believe that's how C works, that it forces the whole > expression to be unsigned! That's crazy, man! Are you in jest? I can't believe you can't believe it. There are old rules about promotions and conversions of arithmetic types (integral and floating point) in both C and C++, they are essentially the same. There is nothing to believe, really, you just need to learn them. And as you learn them you might just understand the logic behind them. Eventually. V -- I do not respond to top-posted replies, please don't ask |
Dombo <dombo@disposable.invalid>: Oct 05 10:37PM +0200 > I think that small micro-controllers, that is computers that address > no more than 64 KB of code, are still used, and that for that C++ > language is not actually used and should not be actually used. The Arduino people felt differently; few people realize that the Sketch programming language used to program a lowly 8-bit Atmel AVR micro-controller with significantly less memory than 64KB is actually C++. I wouldn't say that that is the best example of C++ on small micro-controllers, but I see few problems with judicious use of C++ on those other than that the benefits of C++ may be less significant for small programs. |
Jorgen Grahn <grahn+nntp@snipabacken.se>: Oct 01 11:30AM On Wed, 2014-10-01, Wouter van Ooijen wrote: >> but here are some apparent differences. > Eh, you really don't know B.U yet at the same time you are not satisfied > by it?? There is no rule which says you have to know Foo in and out before you're allowed to write Bar which does roughly the same thing. (Not that I have any opinion on either Boost.Unit or this one.) [snip more detailed criticism] /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o . |
Victor Bazarov <v.bazarov@comcast.invalid>: Oct 01 02:27PM -0400 On 10/1/2014 1:44 PM, Wouter van Ooijen wrote: > Dunno, I think that's beyond my grasp of English. But knowing (not just > guessing without looking) that Bar is too complex to use counts as > knowledge about Bar for me. Knowing about something and knowing something are two different things, trust me. Also, knowledge that something ("Bar") is too complex does not necessarily mean knowing it ("Bar") in depth (or, like some might put it, "really knowing" it). > non-trivial as a units library without first looking at what is laready > there (which btw is more than just boost.units). > Wouter I agree with you that it is peculiar to start designing something without looking at what is already there. I do not see how it can be said about Carlo's work, however. Seeing that it's not the first time you disclaim knowing English to grasp some obvious and elementary stuff, I think it is peculiar that you *judge* other posters statements written in English without putting any effort to understand it enough. Your alleged weak grasp of English does not preclude you from denying the benefit of the doubt to others. Carlo *evidently* looked at what was "already there" if you care to see what he stated in his second post. He knows how to use at least some mechanisms of Boost.Units. He gives measurements of the size of the resulting executable and the time it took to compile... Does this not present itself like "looking at what is already there"? V -- I do not respond to top-posted replies, please don't ask |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment