Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Any tips?

Reply
Thread Tools

Any tips?

 
 
Balog Pal
Guest
Posts: n/a
 
      03-08-2013
On 3/8/2013 9:53 PM, Jorgen Grahn wrote:

> Ok, back to my original comment about the futility of these discussions.
> You don't trust me, and I don't trust you. Neither of us is going to
> change.


You missed the point despite I even described it in an earlier post.
It's not a ****ing or dick-measuring contest.

And I'm still interested in *how* you do the wasteless navigation --
can you tell us or it's a top secret?

 
Reply With Quote
 
 
 
 
Balog Pal
Guest
Posts: n/a
 
      03-09-2013
On 3/9/2013 9:48 AM, Paavo Helde wrote:
>>> Switching views in a non-IDE is Alt-Tab or equivalent, but I have not
>>> yet found convenient ways to switch views inside an IDE without
>>> reaching to the mouse.

>>
>>
>> In VS, for example, you can ctrl-tab, hold down the control key, and
>> then navigate to whatever active file and/or window you want with the
>> arrow keys. Just ctrl-tab wanders through the active open files.

>
> Thanks for the tip, it has not occured to me to use arrow keys in the
> ctrl-tab list though I have seen it occasionally (for navigating through
> the open files I am using Alt-W digit or Alt-W W instead).
>
> Now the next step would be to get the arrow keys working in the Alt-Tab
> list as well...


The other navigation feature I use very much is Alt-minus to go to
previous spot(s) (and forward with shift). That is something I doubt
single-window editors could hope to get.

I find it useful despite having a plenty of ways to have information
without leaving the edited spot (like tooltips, code definition window).

In the workflow of doing review -- either interactively or just
inspecting patches all the navigation support is also critical to
productivity IME. Not only affecting the raw time but precision. A
feature that shows documentation of a function by just hovering the
mouse over it can save overlooking some precondition or responsibility.
 
Reply With Quote
 
 
 
 
Nick Keighley
Guest
Posts: n/a
 
      03-09-2013
On Mar 6, 1:56*am, eli m <(E-Mail Removed)> wrote:

> I am coming to C++ from python. Do you guys have any tips for me? Examples: How to learn it effectively, what not to do, etc.


"Accelerated C++" might suit you. It tends to start with the powerful
high level stuff and only grubs around with pointers and such like
later on.

I liked the original Stroustrup (ToC could be better!) and he's now
written a book for beginners (no idea what its like).

I like the Effective books but again I'm a bit out of date on where
these are now.

I can't function without Josuttis on the standard library, but you may
be able to replace it with some of the better online stuff.

Oh and read the comp.lang.c++ FAQ (ignore his rants about "business
value")

Write Lots Of Code.


Happy programming!

 
Reply With Quote
 
Nick Keighley
Guest
Posts: n/a
 
      03-09-2013
On Mar 6, 5:25*pm, James Kanze <(E-Mail Removed)> wrote:
> On Wednesday, March 6, 2013 7:27:51 AM UTC, Saeed Amrollahi wrote:
> > On Wednesday, March 6, 2013 5:26:40 AM UTC+3:30, eli m wrote:
> > > I am coming to C++ from python. Do you guys have any tips
> > > for me? Examples: How to learn it effectively, what not to
> > > do, etc.

>
> * * [...]
>
> > 2. You should never learn "Modern" C++ with a book that was written before
> > 1997. My recommendations:
> > * 1) Andrew Koenig & Barbara Moo. Accelerated C++, Addison-Wesley, 2000.
> > * 2) Bjarne Stroustrup. Programming: Principles and Practice in C++,
> > * * *Addison-Wesley, 2009.
> > * 3) Bjarne Stroustrup. The C++ Programming Language, Addison-Wesley,
> > * * *2013. (Coming soon)
> > * 4) Stanley Lippman, Josee Lajoie & Barbara Moo. C++ Primer, 2012.
> > * 5) Bjarne Stroustrup. The C++ Programming Language, Addison-Wesley,
> > * * *special edition, 2000.
> > At this time, the point is: use C++98 or C++11, the books
> > 1, 2 and 5 are based on C++98 and 3 and 4 based on C++11.
> > of course there other good books. I believe the book #1 and #2
> > are really good. #1 is concise and #2 is very detailed about
> > programming not C++.

>
> The choice between 1 and 2 will depend partially on how much
> experience you have programming, in general. *If you know no
> programming, I would recommend 2, regardless of what language
> you ultimately want to program in, because that's what it
> teaches. *If you're already an experienced programmer, 1 is
> a lot shorter, and will still present everything you need to
> know that isn't general programming skills.
>
> * * [...]
>
> > 4. Use modern C++ programming environment.
> > My recommendation:
> > * - Visual Studio 2012, Visual Studio 2010 (Windows)
> > * - Code::Blocks (Linux/Ubuntu)

>
> I don't know. *I use Visual Studios 2012 (at present) under
> Windows, because that's my employers standard; I've always used
> vim, bash and makefiles under Unix. *And the vim, bash and
> makefiles environment is far more productive than the Visual
> Studios environment.


really? I've used both (well not vim). I've also used Qt Creator. I'd
like to see how you measure "productivity"

>*If you're just starting programming,
> something like Visual Studios is probably a pretty good idea, so
> you don't have to learn everything at once, just to compile
> hello world.


even compiling hello world is non-trivial with VS!

>*But if you are already an experienced programmer,
> it's probably worth your while to learn how to use more powerful
> tools; there's just so much you can't do in Visual Studios (or
> in any of the IDE's I've used under Linux, but I've not tried
> any new ones recently).


like? If I want to process text I use Perl and tend to use it as a
scripting language as well (bash syntax drives me nuts) but VS seems
fine for most stuff.

 
Reply With Quote
 
woodbrian77@gmail.com
Guest
Posts: n/a
 
      03-10-2013
On Friday, March 8, 2013 8:01:51 AM UTC, Ian Collins wrote:
>
> In my opinion Solaris (and the numerous OpenSolaris derivatives) have
>
> better developer tools than Linux, especially for analysing applications
>
> (and the OS) in a production0n environment.
>


I'm thinking about OpenSolaris again. Currently my Linux
server forks several copies of itself and the children
do an accept on the same socket. IIrc, that doesn't work
on Solaris. If that's right, what's the alternative on
Solaris?

I'm using Arch Linux right now and like it for the
most part. It seems easier to administer than the
version of Linux I was using previously. I haven't
used Solaris in a number of years, so am not sure
how the administration of Solaris compares with Linux.
Solaris might be right for me at some point, but am
not sure if that time is yet.

Brian
 
Reply With Quote
 
Nick Keighley
Guest
Posts: n/a
 
      03-10-2013
On Mar 7, 8:10 am, Jorgen Grahn <(E-Mail Removed)> wrote:
> On Thu, 2013-03-07, Balog Pal wrote:
> > On 3/6/2013 6:25 PM, James Kanze wrote:


> >> I don't know. I use Visual Studios 2012 (at present) under
> >> Windows, because that's my employers standard; I've always used
> >> vim, bash and makefiles under Unix. And the vim, bash and
> >> makefiles environment is far more productive than the Visual
> >> Studios environment.

>
> > Could you elaborate please? What makes the listed things more
> > productive? (Or did you meant it for yourself only based on familiar
> > ground, not in general?)

>
> Hopefully he did, or I'd have to start an Emacs-vs-Vim war
>
> Unix versus (other) IDEs has been discussed continuously for as long
> as I can remember, and it never leads anywhere. It's near impossible
> to find someone who knows both worlds well enough to have a useful
> general opinion, and if such a person exists she can't prove it to us.
>
> Personally: my workflow combined with a decent Unix environment
> doesn't feel limiting. And I don't think it's because my brain is
> wired in an unusual way. Can I switch to an IDE and change my
> workflow to become even /less/ limited? No idea; it would take years
> to find out, and I'm not prepared to make that huge investment with
> an uncertain outcome.
>
> Also, I've never seen anyone do anything with an IDE that I couldn't
> do as well or better. (That's not proof, because most people seem not
> to use their tools efficiently at all, no matter what the tools are.)


I tend to find GUIs slicker at what they're designed to do and fail
miserably when you want to do something different. Unix GUIs are
getting
better but still seem a little clunky compared with windows (I've no
modern experience of Macs (apart from trying to display a few photos
on
one and finding it a nightmare!)). Unix shells are nasty until you
try
and get anything done on windows when you realise how great they are!
Hence my choice of Perl as a scripting language. Its systax slightly
less **** than other shells and its sort of portable.

I suppose the ultimate would be a GUI with a scripting language (yes
I've heard of emacs), I understand Macs have something like this and
I've
used tools that tried to do this (Rational Rose, Understand) but
never
really grokked them.
 
Reply With Quote
 
Jorgen Grahn
Guest
Posts: n/a
 
      03-10-2013
On Fri, 2013-03-08, Balog Pal wrote:
> On 3/8/2013 9:53 PM, Jorgen Grahn wrote:
>
>> Ok, back to my original comment about the futility of these discussions.
>> You don't trust me, and I don't trust you. Neither of us is going to
>> change.

>
> You missed the point despite I even described it in an earlier post.
> It's not a ****ing or dick-measuring contest.


It feels a lot like one ... and this will be my last posting in this
part of the thread.

> And I'm still interested in *how* you do the wasteless navigation --
> can you tell us or it's a top secret?


I didn't understand you were asking a question. Do you mean this from
upthread?

|> It probably fits some workflow when you concentrate on a few-line
|> change. I'm currently reshaping an old codebase that's over 1MLOC in
|> size. Would be dead in the water if could not navigate error
|
|I do these tasks too, and I can assure you am not dead in the water!
|
|> or search
|> locations at once anywhere in the ~3300 files.
|
|Did I say I couldn't do that? I don't use IDEs, but I don't write my
|code in Notepad, either! This is a vital feature.

The last thing I assumed was obvious: tags. AIUI the first text
editor feature to target programmers -- it was supported in vi
back around 1980.

If you're asking about the larger "reshaping a large codebase" part, I
have no short, specific answer. I use a mix of techniques and
standard tools.

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .
 
Reply With Quote
 
woodbrian77@gmail.com
Guest
Posts: n/a
 
      03-10-2013
On Sunday, March 10, 2013 7:48:02 AM UTC, Paavo Helde wrote:
>
> Are you implying that some fundamental OS-level feature is missing on
>
> Solaris, making this platform unusable for some purposes? That's kind of
>
> hard to believe.
>


I was unsure if I could find the link again but did
find it with https://duckduckgo.com
..

http://plumeria.vmth.ucdavis.edu/inf...ok/ch17_13.htm

That says, "On some operating systems, notably Solaris, you cannot have multiple children doing an accept on the same socket. You have to use file locking to ensure that only one child can call accept at any particular moment."

Is that still the case with Solaris 11?


Brian
Ebenezer Enterprises - Proverbs 3:5,6.
http://webEbenezer.net
 
Reply With Quote
 
James Kanze
Guest
Posts: n/a
 
      03-13-2013
On Friday, 8 March 2013 10:25:50 UTC, Balog Pal wrote:
> On 3/7/2013 9:10 AM, Jorgen Grahn wrote:


[...]
> Yeah, I was pretty shocked to observe that with all those supposedly
> excellent unix-based tools my colleagues (who were linux guru level)
> could not do as much as walking a list of compiler errors with F4 --
> instead had to do actions to open the related sources and navigate to
> lines. (( I thought we left that behind in last century.


That would shock me too, since I've been doing it under Unix
(and Windows) since over 20 years. (Of course, it's not F4, but
some other key sequence. But I'm assuming that that's not your
point.)

--
James
 
Reply With Quote
 
James Kanze
Guest
Posts: n/a
 
      03-13-2013
On Saturday, 9 March 2013 11:34:28 UTC, Nick Keighley wrote:
> On Mar 6, 5:25*pm, James Kanze <(E-Mail Removed)> wrote:


[...]
> > I don't know. *I use Visual Studios 2012 (at present) under
> > Windows, because that's my employers standard; I've always used
> > vim, bash and makefiles under Unix. *And the vim, bash and
> > makefiles environment is far more productive than the Visual
> > Studios environment.


> really? I've used both (well not vim). I've also used Qt Creator. I'd
> like to see how you measure "productivity"


Getting working code out of the door. Actually, creating and
maintaining working code effectively, for a complete definition
of working code (i.e. maintainable, tested, documented...).

> >*If you're just starting programming,
> > something like Visual Studios is probably a pretty good idea, so
> > you don't have to learn everything at once, just to compile
> > hello world.


> even compiling hello world is non-trivial with VS!


You mean because you have to create a solution, with a project?

For anything more complex, the fact that you don't have to
write a makefile is a win for a beginner.

For production code, of course, the fact that you can't really
create arbitrary rules, like you can in a makefile, is
a problem. As is sharing "projects" between different
solutions, which use different compiler options. I've done it,
but it involves editing the project files by hand; at that
point, you're better off using makefiles, because the higher
level makefile can pass explicit information down to the project
file. (With VC++, you have to create rules conditioned on the
solution name.)

> >*But if you are already an experienced programmer,
> > it's probably worth your while to learn how to use more powerful
> > tools; there's just so much you can't do in Visual Studios (or
> > in any of the IDE's I've used under Linux, but I've not tried
> > any new ones recently).


> like?


If you limit yourself to the IDE, just about anything useful.
Try creating a project in which several different sources are
generated from other programs. There's special mechanism for
the case where a single source and header are generated by
a single tool (e.g. lex and yacc), and you can have one (but
only one) pre-build step. But the build system doesn't
understand any dependencies created by the pre-build, and if you
want two or more operations, you have to wrap them into some
sort of script. (The fact that the build system decides what
needs recompiling *before* doing the pre-build is a serious
error, since the purpose of the pre-build is normally to
regenerate some files.)

> If I want to process text I use Perl and tend to use it as a
> scripting language as well (bash syntax drives me nuts) but VS seems
> fine for most stuff.


Bash syntax is a bit special, but the real problem is that the
individual tools aren't always coherent. You need to learn
several different variations of regular expressions, for
example. It's still an order of magnitude better than Perl, but
I tend to use Python for anything non-trivial today (unless it's
non-trivial enough to justify using C++).

--
James
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
501 PIX "deny any any" "allow any any" Any Anybody? Networking Student Cisco 4 11-16-2006 10:40 PM
icmp weirdness - PIX 501 (does any really mean any??) news8080@yahoo.com Cisco 2 09-23-2005 04:04 PM
Anyone interested in getting any Certificationz from Microsoft, CISCO or any other IT CertificationzzzZ...?? get.certified@gmail.com Cisco 0 03-07-2005 03:09 PM
so what does IE or any of the IE shells have over firefox ? (any anti firefox ppl bother looking at recent plugins available?) *ProteanThread* Firefox 12 10-20-2004 08:31 AM
Does any one have any material for 70-015 Srinivas Iragavarapu MCSD 0 10-08-2003 05:48 AM



Advertisments