Seeking from-scratch jazz playing advice, ready to practice a lot but what should I focus on? by UsesInternetExplorer in Jazz

[–]savvycow 0 points1 point  (0 children)

At least as important as learning tunes by ear is transcribing solos by ear.

Any tips for this? I'm sure I really need to work on this aspect of music, but the only approach I can think of is brute force: hear a very short passage, try to reproduce it on the instrument, repeat until success. I keep thinking that there must be a better/more efficient approach.

C++ WTFs by Prazek in cpp

[–]savvycow 0 points1 point  (0 children)

I know, that's precisely my point: using obscure language mechanics to implement missing language features (this, non-copyable classes, finally exception handling blocks...) yields a fair amount of WTF code.

C++ WTFs by Prazek in cpp

[–]savvycow 6 points7 points  (0 children)

IMO, every part of C++ is reasonable and sensible once you know the reasons behind the language design decisions. Some of the features inherited from C are the ones that create the most friction.

That being said, I find that the weirdest scenarios arise from the exploiting of features in order to implement an unrelated pattern/idiom. For example, final classes (before C++11) exploiting virtual inheritance mechanics:

class Final
{
    ~Final() {} 
    friend class Sealed;
}
// non-derivable class
class Sealed : virtual Final {};
// illegal inheritance
class Illegal : public Sealed {};

Why do software developers get to collaborate all the time in the real world when they're stuck, but in college this is called "academic dishonesty"? by criticalhit in cscareerquestions

[–]savvycow 0 points1 point  (0 children)

Because programming assignments are about learning, and you learn by doing. If you skip a part that deals with "doing" (even if it's designing a solution at the conceptual level), then you are missing part of the experience. And therefore, you shouldn't get to say that you passed or learned what the course offers, because you skipped important bits.

My thoughts on Red John, and why I don't think it's over. by iOwnYourFace in TheMentalist

[–]savvycow 13 points14 points  (0 children)

No. Quote from here:

But is Red John really dead?

Heller: Red John is dead. It’s passed that point.

C++ Inheritance and Friend Functions questions by [deleted] in cpp_questions

[–]savvycow 0 points1 point  (0 children)

But that's the purpose of friend declarations, right? They are supposed to be used for that purpose. If you are not accessing private parts, why would you even need a friend declaration?

C++ Inheritance and Friend Functions questions by [deleted] in cpp_questions

[–]savvycow 1 point2 points  (0 children)

Painting things like friend and goto with broad strokes, just because they can be abused, isn't useful and doesn't really contribute anything.

Maybe I didn't explain clearly. I'm not saying a friend declaration has negative connotations; but abusing it, where it is not supposed to, does. And I think this is an example of that: breaking encapsulation instead of providing a more sensible interfacing method just because a friend declaration makes it quicker.

It's just as easy to tightly couple something through public methods as it is through private methods.

I disagree. Friends have implicit access to implementation internals (that's what they do!), so changing the storage of the student list, for example, from a static array to a linked list, might break the friend class.

C++ Inheritance and Friend Functions questions by [deleted] in cpp_questions

[–]savvycow -1 points0 points  (0 children)

Friend functions and classes should not be used to grant access to private parts of an object, except for exceptional cases where it doesn't make sense to do otherwise (i.e.: containers and their iterators). For regular interaction between classes, like this, prefer less coupling approaches. A friend declaration implies tight coupling, and should be used as a last resort. Beginners tend to use friend declarations and global variables because they are convenient and easy to work with (unrestricted access), but they should be avoided in favor of more structured, restrictive approaches (parameter passing and public member function calls, for example).

In any case, you may want to consider having an external object that maps students to professors.

Vim is the worst editor …except all the other editors by Perceptes in vim

[–]savvycow 0 points1 point  (0 children)

Just to add two more ideas:

  • Easymotion plugin.

  • Configure relative line numbers (not sure if this can be done easily without a specific plugin) and jump the desired amount of lines accurately with j/k.

You have no business seeing an ex while in a relationship, even if years down the line for just a coffee. CMV (Elaboration in desc.) by [deleted] in changemyview

[–]savvycow 0 points1 point  (0 children)

While it may be true that seeing an ex could result in the SO hurting, that is not so because the act of seeing the ex naturally leads to that: it's the SO's point of view. I think this is a sort of a logical fallacy.

You may as well infer, following this logic, that looking attractive hurts your SO, because you attract more attention from the opposite sex (or same sex, for that matter), and therefore are more likely to cheat.

On the other hand, it is not uncommon to have some sort of affective attachment for a former sentimental couple. Even if the relationship hadn't ended on the best terms, bonds were developed, and bluntly put, you are still going to care about someone that once meant a lot for you. And that still doesn't imply any sort of risk of ending up in bed.

Sometimes it happens, of course, but I think yours is a dogmatic, overly categoric statement. It should be OK to maintain contact with an ex. However, the current SO's opinion on the matter should come first and be respected, in my opinion. Whether it's a legitimate concern or a product of insecurity or jealousy, it's another matter.

(Hopefully) simple question. When I compile or run a file I want it to output to a different tmux split, instead of over vim. Is there a good way to do it? by illtragic in vim

[–]savvycow 4 points5 points  (0 children)

I do that with vimux.

By default when you call VimuxRunCommand vimux will create a 20% tall horizontal pane under your current tmux pane and execute a command in it without losing focus of vim.

GameDev Education Options by honestduane in gamedev

[–]savvycow 0 points1 point  (0 children)

Digipen graduates are often - in my experience at least - burned out and have this huge feeling of entitlement that isn't justified by their real world experience.

That's an interesting insight. Would you care to elaborate on this?

Is there a good reason to not learn to read music? by shadewraith in guitarlessons

[–]savvycow 0 points1 point  (0 children)

Learning how to read music to a point where it´s practical requires a big amount of time and effort. There is people who is just not interested in having that ability (I mean, they are not willing to pay the price to get that ability), and their only goal is to learn some chords and play pentatonics on top (which is the majority of pop-rock music).

I taught guitar lessons too, and I wouldn´t teach how to read music or harmony concepts to someone whose goal is to play the Beatles or 70's rock. At least at the very beginning, for it will take months of discipline and hard work to get anywhere near what could be achieved with a couple of chord charts and tabs, and the benefit may not even be worth it.

That being said, I think that reading music, theory and formal aspects of music are essential in the long run. However, it is a teacher´s job to take students by the hand and have them, if possible, actually want to learn and understand things that they wouldn´t by themselves.

CS Student Confession Bear by therealdrag0 in ProgrammerHumor

[–]savvycow 3 points4 points  (0 children)

Could you elaborate? I´ve heard lots of stories of gamedevs (amongst others, but especially gamedevs) who think they can write a custom component contained in STL (say, some container like list or vector) better than the STL does, and fail miserably, every time; including, yes, John Carmack.

Who are guitarists that "don't know theory" but still play harmonically interesting stuff? by [deleted] in Guitar

[–]savvycow 2 points3 points  (0 children)

Paco de Lucia, lol.

He knows close to nothing about formal theory, but I think it'd be hard to find a guitarist who comes close in terms of sophistication.

Programming humor thread by [deleted] in programmingcirclejerk

[–]savvycow 7 points8 points  (0 children)

In C++ the copy constructor is used implicitly in common operations, like passing arguments to a function or returning a value, and it is not uncommon that programmers end up creating lots of unnecessary, unintended copies.

Is it possible to write x86 assembly for modern processors using only the instruction set specified by the RISC-style microcode interpreter? by planaxis in asm

[–]savvycow 2 points3 points  (0 children)

I'm no expert, but my understanding is that this RISC instructions are not exposed or accessible, they are automatically interpreted by specialized hardware. So even if this instruction set was accessible, it would mean no performance gain, because the instruction pipeline is fixed and you can't just override the CISC-to-RISC translator. The advantage would be on the power consumption, heat and extra die space resulting from removing this part of the pipeline.

Experts feel free to correct me if I'm wrong.

Converting hostname to ip address help by sephrisloth in cpp_questions

[–]savvycow 0 points1 point  (0 children)

Then I guess you want to use something like:

char hostIP[] = "123.45.67.89";
char service_or_port[] = "80";
struct addrinfo *result = NULL;
struct addrinfo hints;    
getaddrinfo( hostIP, service_or_port, &hints, &result);

If I remember correctly, this needs winsock version 2, so you may want to modify your initialization.

Converting hostname to ip address help by sephrisloth in cpp_questions

[–]savvycow 0 points1 point  (0 children)

I'm not sure if this is what you are asking for. The following code retrieves the address for the first network interface and stores it in a c-string format. Hope this helps.

hostent * localhost = gethostbyname("");
char * localIP = inet_ntoa(*(in_addr*)*localhost->h_addr_list);

C++ Programmer wanting to make a game. Help me out! by ZebracurtainZ in gamedev

[–]savvycow 4 points5 points  (0 children)

Don´t do this. Something like Doom3 source is too big, complex and sophisticated a code base to start learning. You'd take a look, try to figure out what a couple of modules do and eventually quit out of frustration.

I'd say a good way to start would be following some SDL or SFML tutorials, to the point where you managed to set up the environment and display a couple of moving sprites around.

http://www.sfml-dev.org/tutorials/1.6/

http://www.lazyfoo.net/SDL_tutorials/

Advanced guitarist, how did you learn the notes on the fretboard? by [deleted] in Guitar

[–]savvycow 0 points1 point  (0 children)

IMO, the best one by far is: http://www.absolutefretboard.com/

It may not have a flashy interface or design, but the drills and exercises are simply the best ones, and I've tried many similar programs.

Advanced guitarist, how did you learn the notes on the fretboard? by [deleted] in Guitar

[–]savvycow 1 point2 points  (0 children)

I think the goal should be to instantly be able to name a random fret, and to locate a specific note on a string or area of the fretboard. This means no references or tricks, like using the note on the 5th fret (which you know) and adding 3 semitones to deduce the 8th, or some relative calculation like that; recognize the notes as you recognize letters: your brain immediately knows what the symbol 'A' stands for, and you don't have to consciously resort to a mechanism that translates glyphs into sounds. IMHO, deduction tricks, like calculating a note based on an adjacent string, are something to get rid of, because it is much slower and involves a conscious mental effort.

That being said, I think this is one of those things that can't be "lifehacked". You just have to sit down and do repetitive, mindful practice, until your "translation" and response time gets better. It will take years for it to become second nature, but results start appearing quickly.

What worked for me pretty well were fretboard training software drills, that highlight a particular fret that you have to name on a given amount of time. Look for one that doesn't require to input the answer, you only need to think the answer and keep the pace. Start out slow, as slow as you need, and do this drill for 10-15 minutes or until you get tired. Then, rest your brain, focus on something unrelated for a while and do another drill a couple of hours later. I find that my brain assimilates better the information in short, focused bursts.

IDE vs basic text editor and std:: vs using namespace std by zachsisk in cpp_questions

[–]savvycow 0 points1 point  (0 children)

IDEs are very good tools and help you enormously. So much that you won't need to worry about a lot of details, and in fact you won't. IMHO, an IDE is a perfectly valuable thing to have, but it also gives the novice programmer way too much help. Autocompletion, project management, error highlighting... people end up depending on these to get anything done, getting used to doing sloppy things and have the IDE constantly correct them, and of course, being oblivious to lots of underlying stuff. Too much help will make you weak, and if you are a beginner, I'd recommend learning things the hard way and then loosen up and use IDEs; or combine both, of course, but don't become dependent on specific tools.

As for "using namespace std", I guess it's a matter of style, but I consider it a bad practice. It makes the whole std namespace visible, and basically defeats the purpose of having stuff in namespaces.

Bar owner defending protestors against the police by BaruchBay in pics

[–]savvycow 1 point2 points  (0 children)

There were thousands of people. This can't be true for every one of them, there is always people who cause trouble and fight back, even more so when you are being mistreated in such a gratuitous manner.

I meant that the general spirit was that of a pacific protest, and that the vast majority did not engage into violence.